A hard disk grouping method, device, electronic equipment and storage medium

By distributing hard drives into different groups based on their serial numbers, the problem of poor heat dissipation is solved, resulting in efficient heat dissipation and extended lifespan for the hard drive groups.

CN116030848BActive Publication Date: 2026-02-06ZHEJIANG DAHUA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211688786.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-27
Publication Date
2026-02-06
Estimated Expiration
2042-12-27

AI Technical Summary

Technical Problem

In existing technologies, when disks are grouped based on their location numbers, the heat dissipation of the hard drives is poor, which affects their lifespan.

Method used

By receiving hard drive grouping instructions, the hard drive number information is obtained, and the hard drives are distributed into different hard drive groups based on a preset numbering interval, ensuring that the hard drive numbers in each hard drive group are not adjacent, thereby improving the heat dissipation effect.

Benefits of technology

By distributing the hard drives into a separate configuration, the heat dissipation of the hard drives is improved, and the service life of the hard drives is extended.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116030848B_ABST
    Figure CN116030848B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of data storage, in particular to a hard disk grouping method and device, electronic equipment and a storage medium, which are used to improve the heat dissipation effect of a hard disk, wherein the method comprises the following steps: receiving a hard disk grouping instruction, the hard disk grouping instruction carrying preset hard disk group identifiers and the respective corresponding hard disk numbers; obtaining the hard disk number information in a hard disk set to be grouped, the number information being sequentially marked according to the physical arrangement order of the hard disks; and based on the hard disk number information and the hard disk group identifiers and the respective corresponding hard disk numbers, the hard disks are respectively attributed to the corresponding hard disk group identifiers according to a preset number information interval mode, so as to form corresponding hard disk groups. In this way, the dispersed hard disks are grouped into a hard disk group according to the preset number information interval mode, the hard disks in the same hard disk group are dispersed in various regions, which is beneficial to the heat dissipation of the hard disks, improves the heat dissipation effect of the hard disks, and prolongs the service life of the hard disks.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data storage, and particularly relates to a hard disk grouping method and device, electronic equipment and a storage medium. BACKGROUND

[0002] In the field of mass data storage, a Redundant Array of Independent Disks (RAID) is usually used to build a basic framework, and multiple individual physical hard disks are combined into a logical hard disk in different ways for data storage.

[0003] Network video storage servers, network hard disk video recorders (Network Video Recorder, Network Hard Disk Video Recorder) and other storage servers need to store video information for a long time, and usually have a large number of hard disks installed, such as 24 disk positions, 48 disk positions, 64 disk positions, etc. At the same time, in order to improve the read-write performance and data security of the hard disk, the multi-disk position storage server supports the RAID function, and each hard disk is grouped to obtain multiple disk groups, and each hard disk in a disk group works together.

[0004] In the related art, when grouping each hard disk, the hard disks with adjacent position serial numbers are usually combined into a disk group.

[0005] Referring to Figure 1 FIG. 1 is a schematic diagram of grouping hard disks with adjacent position serial numbers in an embodiment of the present application, and the storage server has 24 hard disks, which can be divided into three disk groups by default, hard disks 1-7 form a disk group 1, hard disks 8-14 form a disk group 2, hard disks 15-23 form a disk group 3, and hard disk 24 is a hot standby disk.

[0006] However, since the hard disk generates a large amount of heat when working, if the hard disks with adjacent position serial numbers are combined into a disk group, it is not conducive to heat dissipation of the hard disk, for example, as shown in Figure 1 When the disk group 1 works and the other disk groups enter the sleep mode, the hard disks 1-7 in the disk group 1 are gathered together, which leads to poor heat dissipation of the hard disk, thereby affecting the service life of the hard disk. SUMMARY

[0007] Embodiments of the present application provide a hard disk grouping method, device, electronic equipment and storage medium to improve the heat dissipation effect of the hard disk.

[0008] The specific technical solutions provided by the embodiments of the present application are as follows:

[0009] In a first aspect, a hard disk grouping method is provided, comprising:

[0010] receive a hard disk grouping instruction, the hard disk grouping instruction carrying preset hard disk group identifiers and respective corresponding hard disk numbers;

[0011] obtain hard disk number information of the hard disks in the set of hard disks to be grouped, the number information sequentially marked according to physical arrangement orders of the hard disks;

[0012] based on the hard disk number information and the hard disk group identifiers and respective corresponding hard disk numbers, respectively attribute the hard disks to the corresponding hard disk group identifiers according to a preset number information interval mode to form corresponding hard disk groups, wherein the hard disks included in each hard disk group correspond to non-adjacent number information.

[0013] Optionally, based on the hard disk number information and the hard disk group identifiers and respective corresponding hard disk numbers, respectively attribute the hard disks to the corresponding hard disk group identifiers according to a preset number information interval mode to form corresponding hard disk groups, comprising:

[0014] based on the hard disk number information and the hard disk group identifiers and respective corresponding hard disk numbers, in combination with the preset number information interval mode, determine respective target numbers corresponding to the hard disk group identifiers;

[0015] based on the respective target numbers corresponding to the hard disk group identifiers, determine the hard disks included in each hard disk group identifier;

[0016] respectively attribute the hard disks included in each hard disk group identifier to the corresponding hard disk group identifier to form corresponding hard disk groups.

[0017] Optionally, based on the hard disk number information and the hard disk group identifiers and respective corresponding hard disk numbers, in combination with the preset number information interval mode, determine respective target numbers corresponding to the hard disk group identifiers, comprising:

[0018] based on the hard disk group identifiers, determine a total group number of the hard disk groups;

[0019] based on the respective corresponding hard disk numbers of each hard disk group identifier and the total group number of the hard disk groups, determine respective allocation numbers corresponding to each hard disk group identifier;

[0020] based on the respective allocation numbers corresponding to each hard disk group identifier and the hard disk number information, determine unallocated numbers;

[0021] based on the unallocated numbers, the hard disk number information, and the respective allocation numbers corresponding to each hard disk group identifier, determine respective target numbers corresponding to each hard disk group identifier.

[0022] Optionally, based on the respective corresponding hard disk numbers of each hard disk group identifier and the total group number of the hard disk groups, determine respective allocation numbers corresponding to each hard disk group identifier, comprising:

[0023] For each hard disk group identifier, the following operations are performed respectively:

[0024] Based on the number of hard disks corresponding to one hard disk group identifier and preset parameters, a serial number set corresponding to one hard disk group identifier is determined;

[0025] Based on the serial number set and the total number of groups, each target serial number value corresponding to one hard disk group identifier is determined;

[0026] Based on each target serial number value and one hard disk group identifier, each allocation number corresponding to one hard disk group identifier is determined.

[0027] Optionally, based on each unallocated number, each hard disk number information, and each allocation number corresponding to each hard disk group identifier, each target number corresponding to each hard disk group identifier is determined, including:

[0028] Based on each hard disk number information, a number threshold is determined;

[0029] For each allocation number corresponding to each hard disk group identifier, the following operations are performed respectively:

[0030] If one allocation number corresponding to one hard disk group identifier is greater than the number threshold, the allocation number is replaced by a random unallocated number, and the unallocated number is taken as a target number corresponding to one hard disk group identifier;

[0031] If one allocation number is not greater than the number threshold, the allocation number is taken as a target number corresponding to one hard disk group identifier.

[0032] Optionally, based on each hard disk number information and each hard disk group identifier and the number of hard disks corresponding to each hard disk group identifier, and in combination with a preset number information interval mode, each target number corresponding to each hard disk group identifier is determined, further including:

[0033] Based on each hard disk number information in the set of hard disks to be grouped, a minimum random number and a maximum random number are determined;

[0034] Based on the minimum random number and the maximum random number, a random value set is determined;

[0035] The number of hard disks corresponding to each hard disk group identifier is taken as the number of random numbers corresponding to each hard disk group identifier, and each random number corresponding to each hard disk group identifier is obtained from the random value set respectively;

[0036] Each random number corresponding to each hard disk group identifier is taken as a target number corresponding to each hard disk group identifier.

[0037] In a second aspect, a hard disk grouping apparatus is provided, including:

[0038] The receiving module is configured to receive a hard disk grouping instruction, the hard disk grouping instruction carrying preset hard disk group identifiers and respective corresponding hard disk numbers;

[0039] The obtaining module is configured to obtain hard disk number information of the hard disks in the hard disk set to be grouped, the number information being sequentially marked according to a physical arrangement order of the hard disks;

[0040] The processing module is configured to, based on the hard disk number information and the hard disk group identifiers and respective corresponding hard disk numbers, respectively attribute the hard disks to the corresponding hard disk group identifiers according to a preset number information interval mode, to form corresponding hard disk groups, wherein the hard disks included in each hard disk group correspond to non-adjacent number information.

[0041] Optionally, based on the hard disk number information and the hard disk group identifiers and respective corresponding hard disk numbers, respectively attributing the hard disks to the corresponding hard disk group identifiers according to a preset number information interval mode to form corresponding hard disk groups, the processing module is further configured to:

[0042] Based on the hard disk number information and the hard disk group identifiers and respective corresponding hard disk numbers, and in combination with the preset number information interval mode, determining respective target numbers corresponding to the hard disk group identifiers;

[0043] Based on the respective target numbers corresponding to the hard disk group identifiers, determining the hard disks included in each hard disk group;

[0044] Respectively attributing the hard disks included in each hard disk group to the corresponding hard disk group identifiers to form corresponding hard disk groups.

[0045] Optionally, based on the hard disk number information and the hard disk group identifiers and respective corresponding hard disk numbers, and in combination with the preset number information interval mode, determining respective target numbers corresponding to the hard disk group identifiers, the processing module is further configured to:

[0046] Based on the hard disk group identifiers, determining a total group number of the hard disk groups;

[0047] Based on the hard disk group identifiers and respective corresponding hard disk numbers and the total group number of the hard disk groups, respectively determining respective allocation numbers corresponding to the hard disk group identifiers;

[0048] Based on the respective allocation numbers corresponding to the hard disk group identifiers and the hard disk number information, determining unallocated numbers;

[0049] Based on the unallocated numbers, the hard disk number information, and the respective allocation numbers corresponding to the hard disk group identifiers, determining respective target numbers corresponding to the hard disk group identifiers.

[0050] Optionally, when the processing module determines the respective allocation number corresponding to each hard disk group identifier based on the respective hard disk group identifier and the respective number of hard disks corresponding to the respective hard disk group identifier and the total number of hard disk groups, the processing module is further configured to:

[0051] For each hard disk group identifier, the following operations are performed respectively:

[0052] Based on the number of hard disks corresponding to one hard disk group identifier and a preset parameter, a serial number set corresponding to one hard disk group identifier is determined;

[0053] Based on the serial number set and the total number of hard disk groups, a target serial number value corresponding to one hard disk group identifier is determined;

[0054] Based on the target serial number value and one hard disk group identifier, an allocation number corresponding to one hard disk group identifier is determined.

[0055] Optionally, when the processing module determines the respective target number corresponding to each hard disk group identifier based on the respective unallocated number, the respective hard disk number information, and the respective allocation number corresponding to each hard disk group identifier, the processing module is further configured to:

[0056] Based on the hard disk number information, a number threshold is determined;

[0057] For each allocation number corresponding to each hard disk group identifier, the following operations are performed respectively:

[0058] If one allocation number corresponding to one hard disk group identifier is greater than the number threshold, one allocation number is replaced by a random unallocated number, and the unallocated number is used as a target number corresponding to one hard disk group identifier;

[0059] If one allocation number is not greater than the number threshold, one allocation number is used as a target number corresponding to one hard disk group identifier.

[0060] Optionally, when the processing module determines the respective target number corresponding to each hard disk group identifier based on the respective hard disk number information and the respective number of hard disks corresponding to each hard disk group identifier, and in combination with a preset number information interval mode, the processing module is further configured to:

[0061] Based on the hard disk number information in the set of hard disks to be grouped, a minimum random number and a maximum random number are determined;

[0062] Based on the minimum random number and the maximum random number, a random value set is determined;

[0063] The number of hard disks corresponding to each hard disk group identifier is used as the number of random numbers corresponding to each hard disk group identifier, and the respective random number corresponding to each hard disk group identifier is obtained from the random value set;

[0064] The hard disk groups are respectively identified by the respective random numbers as the respective target numbers.

[0065] In a third aspect, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method of any one of the first aspect when executing the program.

[0066] In a fourth aspect, a computer readable storage medium is provided, which stores a computer program, wherein the computer program is executable by a processor to implement the steps of the method of any one of the first aspect.

[0067] In a fifth aspect, a computer program product is provided, which includes a computer program stored in a computer readable storage medium, and when a processor of an electronic device reads the computer program from the computer readable storage medium, the processor executes the computer program, so that the electronic device executes the steps of the method of any one of the first aspect.

[0068] In the embodiments of the present application, the processing device receives a hard disk grouping instruction, the hard disk grouping instruction carries preset hard disk group identifiers and their respective corresponding hard disk numbers, obtains hard disk number information in a set of hard disks to be grouped, the number information is sequentially marked according to the physical arrangement order of the hard disks, and based on the hard disk number information and the hard disk group identifiers and their respective corresponding hard disk numbers, the hard disks are respectively attributed to the corresponding hard disk group identifiers according to a preset number information interval mode, to form corresponding hard disk groups. In this way, the dispersed hard disks are grouped into a hard disk group according to the preset number information interval mode, and since the hard disks in the same hard disk group are dispersed in each region, it is beneficial to heat dissipation of the hard disks, improves the heat dissipation effect of the hard disks, and improves the working life of the hard disks. BRIEF DESCRIPTION OF DRAWINGS

[0069] Figure 1 A schematic diagram of a hard disk grouping of adjacent position serial numbers in the embodiments of the present application;

[0070] Figure 2 A schematic diagram of an application scenario in the embodiments of the present application;

[0071] Figure 3 A flowchart of a hard disk grouping method in the embodiments of the present application;

[0072] Figure 4 A schematic diagram of hard disk number information in a set of hard disks to be grouped in the embodiments of the present application;

[0073] Figure 5 A flowchart of obtaining hard disk groups in the embodiments of the present application;

[0074] Figure 6A A first flowchart for determining the target numbers corresponding to the hard disk groups in the embodiments of the present application;

[0075] Figure 6B A second flowchart for determining the target numbers corresponding to the hard disk groups in the embodiments of the present application;

[0076] Figure 7 A flowchart for determining the allocation numbers corresponding to the hard disk groups in the embodiments of the present application;

[0077] Figure 8 A flowchart for determining the allocation numbers corresponding to the hard disk groups in the embodiments of the present application;

[0078] Figure 9 A flowchart for determining the unallocated numbers in the embodiments of the present application;

[0079] Figure 10 A flowchart for determining the target numbers in the embodiments of the present application;

[0080] Figure 11 A first flowchart for determining the random numbers corresponding to the hard disk groups in the embodiments of the present application;

[0081] Figure 12 A second flowchart for determining the random numbers corresponding to the hard disk groups in the embodiments of the present application;

[0082] Figure 13 A flowchart for determining the hard disks contained in the hard disk groups in the embodiments of the present application;

[0083] Figure 14 A flowchart for obtaining the hard disk groups in the embodiments of the present application;

[0084] Figure 15 A structural diagram of the hard disk grouping apparatus in the embodiments of the present application;

[0085] Figure 16 A structural diagram of the electronic device in the embodiments of the present application. DETAILED DESCRIPTION

[0086] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all the other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0087] Some terms in the embodiments of the present application will be explained below to facilitate the understanding of those skilled in the art.

[0088] (1) Redundant Array of Independent Disks (RAID): a method of storing the same data in different places of multiple hard disks. By placing data on multiple hard disks, input / output operations can be overlapped in a balanced manner, improving performance. Because multiple hard disks increase the mean time between failures, storing redundant data also increases fault tolerance.

[0089] (2) Hot spare disk: used to replace a damaged hard disk in a RAID, used to carry data in a damaged hard disk.

[0090] (3) Processing device: used to receive hard disk grouping instructions, group the hard disk set to be grouped, the processing device can be a standalone physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Basic cloud computing services such as platform. It can also be an electronic device, including but not limited to mobile phones, computers, smart voice interaction devices, etc.

[0091] (4) Terminal device: can be used to send hard disk grouping instructions, the terminal device can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart television, a smart watch, etc., but is not limited thereto.

[0092] The preferred embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0093] As shown in Figure 2 , it is an application scenario diagram of an embodiment of the present application. It is an application scenario diagram of an embodiment of the present application. In the application scenario diagram, a processing device 210 and terminal devices 220 (including terminal device 2201, terminal device 2202, …, and terminal device 220n) are included. The processing device 210 and the terminal devices 220 can be directly or indirectly connected through wired or wireless communication. The processing device 210 receives the received hard disk grouping instructions sent by the terminal devices 220, the processing device 210 obtains the hard disk number information in the hard disk set to be grouped, and then based on the hard disk number information, the hard disk group identifier and the respective corresponding hard disk number, the hard disks are respectively attributed to the corresponding hard disk group identifier according to the preset number information interval mode, to form the corresponding hard disk group.

[0094] It should be noted that, Figure 2Only one application environment of the hard disk grouping method provided in the present application is shown in the actual application, and other application environments can also be included. For example, the application environment can only include a terminal device, which can perform hard disk grouping by itself.

[0095] Based on the above embodiments, refer to Figure 3 FIG. 1 shows a flowchart of a hard disk grouping method in an embodiment of the present application, which specifically includes the following steps:

[0096] Step 30: receiving a hard disk grouping instruction.

[0097] The hard disk grouping instruction carries preset hard disk group identifiers and their respective corresponding hard disk numbers.

[0098] In the embodiment of the present application, the terminal device generates a hard disk grouping instruction based on the preset hard disk group identifiers and their respective corresponding hard disk numbers, and sends the hard disk grouping instruction to the processing device, and the processing device receives the hard disk grouping instruction sent by the terminal device.

[0099] For example, assuming that the preset hard disk group identifiers are 1, 2, and 3, the hard disk number corresponding to the hard disk group 1 is 7, the hard disk number corresponding to the hard disk group 2 is 7, and the hard disk number corresponding to the hard disk group 3 is 9, the terminal device generates a hard disk grouping instruction and sends it to the processing device, and the hard disk grouping instruction received by the processing device carries the hard disk group identifiers 1, 2, and 3, and the hard disk number corresponding to the hard disk group 1 is 7, the hard disk number corresponding to the hard disk group 2 is 7, and the hard disk number corresponding to the hard disk group 3 is 9.

[0100] Step 31: obtaining the hard disk number information of each hard disk in the hard disk set to be grouped.

[0101] The number information is sequentially marked according to the physical arrangement order of each hard disk.

[0102] In the embodiment of the present application, the processing device obtains the hard disk number information of each hard disk in the hard disk set to be grouped when receiving the hard disk grouping instruction.

[0103] For example, refer to Figure 4 FIG. 2 shows a schematic diagram of the hard disk number information of each hard disk in the hard disk set to be grouped in the embodiment of the present application. The first hard disk 1 in the physical arrangement order of each hard disk in the hard disk set to be grouped corresponds to the number information 1, the second hard disk 2 corresponds to the number information 2, the third hard disk 3 corresponds to the number information 3, the fourth hard disk 4 corresponds to the number information 4, the fifth hard disk 5 corresponds to the number information 5, the sixth hard disk 6 corresponds to the number information 6, the seventh hard disk 7 corresponds to the number information 7, the eighth hard disk 8 corresponds to the number information 8, and the twenty-fourth hard disk 24 corresponds to the number information 24.

[0104] In the embodiment of the present application, the processing device obtains the hard disk number information of each hard disk in the hard disk set to be grouped based on the hard disk grouping instruction received by the terminal device.​​​​​​​​​​​​​​​​​​​​​Step 32: Based on the number information of each hard disk and the hard disk group identifier and the number of hard disks corresponding to each hard disk group identifier, each hard disk is attributed to the corresponding hard disk group identifier according to a preset number information interval mode, and a corresponding hard disk group is formed.

[0105] In each hard disk group, the number information corresponding to each hard disk is not adjacent.

[0106] Specifically, when step 32 is performed, the processing device specifically performs the following operations. Referring to Figure 5 Fig. 3 shows a flowchart for obtaining each hard disk group in an embodiment of the present application. The following will be described in combination with Figure 5 The specific operations performed will be described in detail.

[0107] Step 320: Based on the number information of each hard disk and the hard disk group identifier and the number of hard disks corresponding to each hard disk group identifier, in combination with a preset number information interval mode, the target number corresponding to each hard disk group identifier is determined.

[0108] Optionally, two possible implementation manners are provided in the embodiment of the present application for determining the target number corresponding to each hard disk group identifier.

[0109] The first manner: referring to Figure 6A Fig. 4 shows a first flowchart for determining the target number corresponding to each hard disk group identifier in an embodiment of the present application. The following will be described in combination with Figure 6A The specific operations performed will be described in detail.

[0110] Step 3200: Based on the hard disk group identifier, the total number of hard disk groups is determined.

[0111] In the embodiment of the present application, the processing device determines the total number of hard disk groups according to the hard disk group identifier carried by the hard disk grouping instruction.

[0112] For example, assuming that the hard disk group identifiers are 1, 2, and 3 respectively, the total number of hard disk groups is 3.

[0113] Step 3201: Based on the hard disk group identifier, the number of hard disks corresponding to each hard disk group identifier, and the total number of hard disk groups, the allocation number corresponding to each hard disk group identifier is determined.

[0114] Specifically, when step 3201 is performed, the processing device specifically performs the following operations. Referring to Figure 7 Fig. 5 shows a flowchart for determining the allocation number corresponding to each hard disk group identifier in an embodiment of the present application. The following will be described in combination with Figure 7 The specific operations performed will be described in detail.

[0115] For each hard disk group identifier, the following operations are performed respectively:

[0116] Step 3201-1: Based on the number of hard drives corresponding to a hard drive group identifier and preset parameters, determine the sequence number set corresponding to a hard drive group identifier.

[0117] In this embodiment of the application, after obtaining the number of hard disks corresponding to a hard disk group identifier, a sequence number set corresponding to a hard disk group identifier is obtained based on the number of hard disks corresponding to a hard disk group identifier and preset parameters.

[0118] Optionally, in this embodiment of the application, when obtaining the sequence number set corresponding to a hard disk group identifier, the difference between the number of hard disks corresponding to the hard disk group identifier and a preset parameter can be calculated. The sequence number set includes values ​​from 0 to the difference, thereby obtaining the sequence number set corresponding to the hard disk group identifier.

[0119] The sequence number set corresponding to a hard disk group identifier can be represented as: m = 0 ~ (dc), where m is the sequence number set corresponding to a hard disk group identifier, d is the number of hard disks corresponding to a hard disk group identifier, and c is a preset parameter. The preset parameter can be 1, and this application embodiment does not limit it.

[0120] For example, see Figure 8 The diagram shown is a schematic of determining the corresponding allocation number for each hard disk group identifier in an embodiment of this application. Assuming the preset parameter is 1, the number of hard disks corresponding to hard disk group identifier 1 is 7, and the number of hard disks corresponding to hard disk group identifier 3 is 9, then the sequence number set corresponding to hard disk group identifier 1 is 0 to (7-1), and the sequence number set corresponding to hard disk group identifier 3 is 0 to (9-1). That is, the sequence number set corresponding to hard disk group identifier 1 is 0, 1, 2, 3, 4, 5, 6, and the sequence number set corresponding to hard disk group identifier 3 is 0, 1, 2, 3, 4, 5, 6, 7, 8.

[0121] Step 3201-2: Based on the sequence number set and the total number of groups, determine the target sequence number values ​​corresponding to a hard disk group identifier.

[0122] In this embodiment of the application, after obtaining the sequence number set corresponding to a hard disk group identifier, the target sequence number value corresponding to the hard disk group identifier is obtained based on the sequence number set corresponding to the hard disk group identifier and the total number of hard disk groups.

[0123] Optionally, in this embodiment of the application, when obtaining the target sequence number values ​​corresponding to a hard disk group identifier, the product between each sequence number value in the sequence number set corresponding to a hard disk group identifier and the total number of groups can be calculated to obtain the target sequence number values ​​corresponding to a hard disk group identifier.

[0124] Among them, the target sequence number value corresponding to a hard disk group identifier can be represented as: a i =m i *n, a iThe i-th target serial number value corresponding to a hard disk group identifier, m i The i-th serial number value in the serial number set corresponding to a hard disk group identifier, n is the total number of hard disk groups.

[0125] For example, as shown in Figure 8 the serial number set corresponding to hard disk group identifier 1 is 0, 1, 2, 3, 4, 5, 6, the serial number set corresponding to hard disk group identifier 3 is 0, 1, 2, 3, 4, 5, 6, 7, 8, and the total number of hard disk groups is 3, the target serial number values corresponding to hard disk group identifier 1 are 0*3, 1*3, 2*3, 3*3, 4*3, 5*3, 6*3, and the target serial number values corresponding to hard disk group identifier 3 are 0*3, 1*3, 2*3, 3*3, 4*3, 5*3, 6*3, 7*3, 8*3, that is, the target serial number values corresponding to hard disk group identifier 1 are 0, 3, 6, 9, 12, 15, 18, and the target serial number values corresponding to hard disk group identifier 3 are 0, 3, 6, 9, 12, 15, 18, 21, 24.

[0126] Step 3201-3: determining the allocation number corresponding to a hard disk group identifier based on the target serial number value and the hard disk group identifier.

[0127] In the embodiment of the application, after obtaining the target serial number values corresponding to a hard disk group identifier, the allocation number corresponding to the hard disk group identifier is obtained based on the target serial number values corresponding to the hard disk group identifier and the hard disk group identifier.

[0128] Optionally, in the embodiment of the application, when the allocation number corresponding to a hard disk group identifier is obtained, the sum of the target serial number value corresponding to the hard disk group identifier and the identifier value of the hard disk group identifier is calculated, so as to obtain the allocation number corresponding to the hard disk group identifier.

[0129] Wherein, the allocation number corresponding to a hard disk group identifier can be represented as: b i =x+a i , b i is the i-th allocation number in the allocation number corresponding to a hard disk group identifier, a i is the i-th target serial number value in the target serial number value corresponding to a hard disk group identifier, and x is the identifier value of a hard disk group identifier.

[0130] For example, as shown in Figure 8As shown, assuming the target sequence numbers corresponding to hard disk group identifier 1 and hard disk group identifier 2 are 0, 3, 6, 9, 12, 15, and 18, and the target sequence numbers corresponding to hard disk group identifier 3 are 0, 3, 6, 9, 12, 15, 18, 21, and 24, and the identifier value of hard disk group identifier 1 is 1, the identifier value of hard disk group identifier 2 is 2, and the identifier value of hard disk group identifier 3 is 3, then the allocation numbers corresponding to hard disk group identifier 1 are 1+0, 1+3, 1+6, 1+9, 1+12, 1+15, and 1+18, and the allocation numbers corresponding to hard disk group identifier 2 are 2+0. The allocation numbers corresponding to hard disk group identifier 3 are 3+0, 3+3, 3+6, 3+9, 3+12, 3+15, 3+18, 3+21, and 3+24. That is, the allocation numbers corresponding to hard disk group identifier 1 are 1, 4, 7, 10, 13, 16, and 19; the allocation numbers corresponding to hard disk group identifier 2 are 2, 5, 8, 11, 14, 17, and 20; and the allocation numbers corresponding to hard disk group identifier 3 are 3, 6, 9, 12, 15, 18, 21, 24, and 27.

[0131] In this way, the allocation numbers corresponding to each hard drive group are evenly distributed, which is beneficial for hard drive heat dissipation.

[0132] Step 3202: Based on the allocation number and hard disk number information corresponding to each hard disk group identifier, determine each unassigned number.

[0133] In this embodiment of the application, after obtaining the allocation number corresponding to each hard disk group identifier, the number information of each hard disk that does not belong to the allocation number is taken as the unallocated number, thereby determining each unallocated number.

[0134] For example, see Figure 9 The diagram shown is a schematic of determining each unassigned number in an embodiment of this application. Assuming that the assigned numbers corresponding to hard disk group identifier 1 are 1, 4, 7, 10, 13, 16, and 19, the assigned numbers corresponding to hard disk group identifier 2 are 2, 5, 8, 11, 14, 17, and 20, and the assigned numbers corresponding to hard disk group identifier 3 are 3, 6, 9, 12, 15, 18, 21, 24, and 27, and the hard disk number information is 1 to 24, then the unassigned numbers are 22 and 23.

[0135] Step 3203: Based on each unassigned number, each hard disk number information, and each assigned number corresponding to each hard disk group identifier, determine each target number corresponding to each hard disk group identifier.

[0136] Specifically, during step 3203, the processing device performs the following operations. (See also...) Figure 10 As shown, it is a flowchart illustrating the process of determining the target number in an embodiment of this application. The following is a detailed explanation in conjunction with the attached diagram. Figure 10The specific executed operation is described in detail:

[0137] Step 3203-1: determining the number threshold based on the hard disk number information.

[0138] In the embodiment of the application, the hard disk number information is compared to determine the maximum value of the number information, and the maximum value is taken as the number threshold, so as to obtain the number threshold.

[0139] For example, assuming that the hard disk number information is 1-24, the maximum value of the number information is 24, and the number threshold is 24.

[0140] For each allocation number corresponding to each hard disk group identifier, the following operations are respectively executed:

[0141] Step 3203-2: judging whether one allocation number corresponding to one hard disk group identifier is greater than the number threshold, if yes, executing step 3203-3, otherwise, executing step 3203-4.

[0142] Step 3203-3: replacing one allocation number with a random unallocated number, and taking the unallocated number as one target number corresponding to one hard disk group identifier.

[0143] In the embodiment of the application, if one allocation number corresponding to one hard disk group identifier is greater than the number threshold, the allocation number is replaced with a random unallocated number, and the unallocated number is taken as one target number corresponding to the hard disk group identifier.

[0144] For example, assuming that one allocation number corresponding to hard disk group identifier 3 is 27, the number threshold is 24, and the unallocated numbers are 22 and 23, the allocation number 27 is greater than the number threshold 24, the allocation number 27 is replaced with a random unallocated number 23, and the unallocated number 23 is taken as one target number corresponding to hard disk group identifier 3.

[0145] Further, the remaining unallocated number 22 is taken as the target number of the hard disk group identifier as the hot spare disk.

[0146] Step 3203-4: taking one allocation number as one target number corresponding to one hard disk group identifier.

[0147] In the embodiment of the application, if one allocation number corresponding to one hard disk group identifier is not greater than the number threshold, the allocation number is taken as one target number corresponding to the hard disk group identifier.

[0148] For example, assuming that the allocation number corresponding to the hard disk group identification 3 is 24, and the number threshold is 24, the allocation number 24 is not greater than the number threshold 24, and the allocation number 24 is taken as a target number corresponding to the hard disk group identification 3.

[0149] The second mode is as follows: Figure 6B As shown in FIG. 4, which is a second flowchart for determining the target numbers corresponding to the hard disk group identifications in the embodiments of the present application, the following will be described in combination with the accompanying drawings. Figure 6B The specific operations will be described in detail as follows:

[0150] Step 3204: Determine the minimum random number and the maximum random number based on the hard disk number information in the hard disk set to be grouped.

[0151] In the embodiments of the present application, after obtaining the hard disk number information in the hard disk set to be grouped, the minimum value and the maximum value of the number information are determined by comparing the hard disk number information, the minimum value is taken as the minimum random number, and the maximum value is taken as the maximum random number, so as to obtain the minimum random number and the maximum random number.

[0152] For example, assuming that the hard disk number information is 1-24, the minimum value of the number information is 1, and the maximum value is 24, the minimum random number is the minimum value 1, and the maximum random number is the maximum value 24.

[0153] Step 3205: Determine the random value set based on the minimum random number and the maximum random number.

[0154] In the embodiments of the present application, after obtaining the minimum random number and the maximum random number, the random value set is determined according to the minimum random number and the maximum random number.

[0155] For example, assuming that the minimum random number is 1 and the maximum random number is 24, the random value set is {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}.

[0156] Step 3206: Take the number of hard disks corresponding to each hard disk group identification as the number of random numbers corresponding to each hard disk group identification, and obtain the random numbers corresponding to each hard disk group identification from the random value set respectively.

[0157] In the embodiments of the present application, after obtaining the random value set, the number of hard disks corresponding to each hard disk group identification is taken as the number of random numbers corresponding to each hard disk group identification, and the random numbers corresponding to each hard disk group identification are obtained from the random value set respectively.

[0158] Optionally, the respective random number corresponding to each hard disk group identifier is obtained from the random value set respectively, and the following operations can be performed for each hard disk group identifier respectively: a plurality of random values corresponding to the random number of one hard disk group identifier are taken from the random value set.

[0159] For example, referring to Figure 11 Fig. 1 is a first schematic diagram of the respective random number corresponding to each hard disk group identifier in the embodiment of the present application, assuming that the random value set is {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}, the number of hard disks corresponding to hard disk group identifier 1 is 7, the number of hard disks corresponding to hard disk group identifier 2 is 7, and the number of hard disks corresponding to hard disk group identifier 3 is 9, then the number of random numbers corresponding to hard disk group identifier 1 is 7, 7 random values 3, 5, 9, 12, 18, 23 and 24 are taken from the random interval as the respective random number corresponding to hard disk group identifier 1, and the remaining random values are taken as the remaining random value set 1, the number of random numbers corresponding to hard disk group identifier 2 is 7, 7 random values 1, 7, 8, 10, 15, 16 and 20 are taken from the remaining random value set 1 as the respective random number corresponding to hard disk group identifier 2, and the remaining random values are taken as the remaining random value set 2, the number of random numbers corresponding to hard disk group identifier 3 is 9, 9 random values 2, 4, 6, 11, 13, 14, 19, 21 and 22 are taken from the remaining random value set 2 as the respective random number corresponding to hard disk group identifier 3, and the remaining random value is taken as the remaining random value set 3, and the last random value 17 is taken as the random number of the hot spare disk.

[0160] Optionally, the respective random number corresponding to each hard disk group identifier is obtained from the random value set respectively, and the following operations can be performed for each hard disk group identifier respectively: a plurality of random values corresponding to the random number of one hard disk group identifier are taken from the random value set.

[0161] In addition, it is worth noting that if the random value obtained from the random value set has been taken as a random number, a new random value is obtained.

[0162] For example, referring to Figure 12As shown, the second schematic view shows that each hard disk group identification corresponds to each random number, and it is assumed that the random value set is {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}, the random value 3 is taken from the random value set, the random value 3 is taken as a random number corresponding to a hard disk group identification 1, the random value 1 is taken from the random value set, the random value 1 is taken as a random number corresponding to a hard disk group identification 2, the random value 2 is taken from the random value set, the random value 2 is taken as a random number corresponding to a hard disk group identification 3, the random value 5 is taken from the random value set, the random value 5 is taken as a random number corresponding to a hard disk group identification 1, finally, the random numbers corresponding to the hard disk group identification 1 are 3, 5, 9, 12, 18, 23, and 24, the random numbers corresponding to the hard disk group identification 2 are 1, 7, 8, 10, 15, 16, and 20, and the random numbers corresponding to the hard disk group identification 3 are 2, 4, 6, 11, 13, 14, 19, 21, and 22, and the last random value 17 is taken as a random number corresponding to a hard disk group identification as a hot spare disk.

[0163] In this way, the random numbers corresponding to each hard disk group identification are randomly distributed, and there are non-adjacent numbers, which is beneficial to heat dissipation of the hard disks.

[0164] Step 3207: taking each random number corresponding to each hard disk group identification as each target number corresponding to each hard disk group identification.

[0165] In the embodiment of the application, after obtaining each random number corresponding to each hard disk group identification, each random number corresponding to each hard disk group identification is taken as each target number corresponding to each hard disk group identification.

[0166] For example, it is assumed that the random numbers corresponding to the hard disk group identification 1 are 3, 5, 9, 12, 18, 23, and 24, the random numbers corresponding to the hard disk group identification 2 are 1, 7, 8, 10, 15, 16, and 20, and the random numbers corresponding to the hard disk group identification 3 are 2, 4, 6, 11, 13, 14, 19, 21, and 22, then the target numbers corresponding to the hard disk group identification 1 are 3, 5, 9, 12, 18, 23, and 24, the target numbers corresponding to the hard disk group identification 2 are 1, 7, 8, 10, 15, 16, and 20, and the target numbers corresponding to the hard disk group identification 3 are 2, 4, 6, 11, 13, 14, 19, 21, and 22.

[0167] Step 321: determining each hard disk contained in each hard disk group identification based on each target number corresponding to each hard disk group identification.

[0168] In this embodiment of the application, after obtaining the target number corresponding to each hard disk group identifier, the number information of each hard disk is matched with the target number to obtain the hard disks contained in each hard disk group identifier.

[0169] For example, see Figure 13 The diagram shown is a schematic of each hard disk included in each hard disk group identifier in this embodiment of the application. Assuming that the target numbers corresponding to hard disk group identifier 1 are 1, 4, 7, 10, 13, 16, and 19, the target numbers corresponding to hard disk group identifier 2 are 2, 5, 8, 11, 14, 17, and 20, and the target numbers corresponding to hard disk group identifier 3 are 3, 6, 9, 12, 15, 18, 21, 24, and 23, then hard disk group identifier 1 includes hard disk 1, hard disk 4, hard disk 7, hard disk 10, hard disk 13, hard disk 16, and hard disk 19; the target numbers corresponding to hard disk group identifier 2 are hard disk 2, hard disk 5, hard disk 8, hard disk 11, hard disk 14, hard disk 17, and hard disk 20; and the target numbers corresponding to hard disk group identifier 3 are hard disk 3, hard disk 6, hard disk 9, hard disk 12, hard disk 15, hard disk 18, hard disk 21, hard disk 24, and hard disk 23.

[0170] Step 322: Assign each hard drive contained in each hard drive group to the corresponding hard drive group identifier to form the corresponding hard drive group.

[0171] In this embodiment of the application, after obtaining the hard disks contained in each hard disk group identifier, the following operations are performed for each hard disk group identifier: the hard disks contained in a hard disk group identifier are grouped into a hard disk group.

[0172] For example, see Figure 14 The diagram shown is a schematic of obtaining each hard disk group in an embodiment of this application. Hard disk group identifier 1 includes hard disk 1, hard disk 4, hard disk 7, hard disk 10, hard disk 13, hard disk 16, and hard disk 19. The target numbers corresponding to hard disk group identifier 2 are hard disk 2, hard disk 5, hard disk 8, hard disk 11, hard disk 14, hard disk 17, and hard disk 20. The target numbers corresponding to hard disk group identifier 3 are hard disk 3, hard disk 6, hard disk 9, hard disk 12, hard disk 15, hard disk 18, hard disk 21, hard disk 24, and hard disk 23. Hard disk 1, hard disk 4, hard disk 7, hard disk 10, hard disk 13, hard disk 16, and hard disk 19 are combined into hard disk group 1. Hard disk 2, hard disk 5, hard disk 8, hard disk 11, hard disk 14, hard disk 17, and hard disk 20 are combined into hard disk group 2. Hard disk 3, hard disk 6, hard disk 9, hard disk 12, hard disk 15, hard disk 18, hard disk 21, hard disk 24, and hard disk 23 are combined into hard disk group 3.

[0173] Based on the same inventive concept, this application also provides a hard disk grouping device, see reference. Figure 15 The diagram shown is a schematic representation of the hard disk grouping device in an embodiment of this application, specifically including:

[0174] The receiving module 1501 is configured to receive hard disk grouping instructions, the hard disk grouping instructions carrying preset hard disk group identifiers and respective corresponding hard disk numbers;

[0175] The obtaining module 1502 is configured to obtain hard disk number information of a set of hard disks to be grouped, the number information being sequentially marked according to a physical arrangement order of the hard disks;

[0176] The processing module 1503 is configured to, based on the hard disk number information and the hard disk group identifiers and respective corresponding hard disk numbers, respectively attribute the hard disks to the corresponding hard disk group identifiers according to a preset number information interval mode, to form corresponding hard disk groups, wherein the hard disks included in each hard disk group correspond to non-adjacent number information.

[0177] Optionally, based on the hard disk number information and the hard disk group identifiers and respective corresponding hard disk numbers, respectively attributing the hard disks to the corresponding hard disk group identifiers according to a preset number information interval mode to form corresponding hard disk groups, the processing module 1503 is further configured to:

[0178] Based on the hard disk number information and the hard disk group identifiers and respective corresponding hard disk numbers, and in combination with the preset number information interval mode, determining respective target numbers corresponding to the hard disk group identifiers;

[0179] Based on the respective target numbers corresponding to the hard disk group identifiers, determining the hard disks included in each hard disk group identifier;

[0180] Respectively attributing the hard disks included in each hard disk group identifier to the corresponding hard disk group identifier to form corresponding hard disk groups.

[0181] Optionally, based on the hard disk number information and the hard disk group identifiers and respective corresponding hard disk numbers, and in combination with the preset number information interval mode, determining respective target numbers corresponding to the hard disk group identifiers, the processing module 1503 is further configured to:

[0182] Based on the hard disk group identifiers, determining a total number of hard disk groups;

[0183] Based on the hard disk group identifiers and respective corresponding hard disk numbers and the total number of hard disk groups, respectively determining respective allocation numbers corresponding to the hard disk group identifiers;

[0184] Based on the respective allocation numbers corresponding to the hard disk group identifiers and the hard disk number information, determining unallocated numbers;

[0185] Based on the unallocated numbers, the hard disk number information, and the respective allocation numbers corresponding to the hard disk group identifiers, determining respective target numbers corresponding to the hard disk group identifiers.

[0186] Optionally, when the processing module 1503 determines the respective allocation number corresponding to each hard disk group identifier based on the respective hard disk group identifier and the respective number of hard disks corresponding to each hard disk group identifier and the total number of hard disk groups, the processing module 1503 is further configured to:

[0187] For each hard disk group identifier, the following operations are performed respectively:

[0188] Based on the number of hard disks corresponding to one hard disk group identifier and the preset parameter, the serial number set corresponding to one hard disk group identifier is determined;

[0189] Based on the serial number set and the total number of groups, the target serial number value corresponding to one hard disk group identifier is determined;

[0190] Based on the target serial number value and one hard disk group identifier, the allocation number corresponding to one hard disk group identifier is determined.

[0191] Optionally, when the processing module 1503 determines the respective target number corresponding to each hard disk group identifier based on the respective unallocated number, the respective hard disk number information, and the respective allocation number corresponding to each hard disk group identifier, the processing module 1503 is further configured to:

[0192] Based on the hard disk number information, the number threshold is determined;

[0193] For each allocation number corresponding to each hard disk group identifier, the following operations are performed respectively:

[0194] If one allocation number corresponding to one hard disk group identifier is greater than the number threshold, the allocation number is replaced by a random unallocated number, and the unallocated number is used as a target number corresponding to one hard disk group identifier;

[0195] If one allocation number is not greater than the number threshold, the allocation number is used as a target number corresponding to one hard disk group identifier.

[0196] Optionally, when the processing module 1503 determines the respective target number corresponding to each hard disk group identifier based on the respective hard disk number information and the respective number of hard disks corresponding to each hard disk group identifier, and in combination with the preset number information interval mode, the processing module 1503 is further configured to:

[0197] Based on the hard disk number information in the set of hard disks to be grouped, the minimum random number and the maximum random number are determined;

[0198] Based on the minimum random number and the maximum random number, the random value set is determined;

[0199] The number of hard disks corresponding to each hard disk group identifier is used as the random number corresponding to each hard disk group identifier, and the random number corresponding to each hard disk group identifier is obtained from the random value set respectively. The random number corresponding to each hard disk group identifier is used as the target number corresponding to each hard disk group identifier.

[0200] Based on the above embodiments, refer to Figure 16 Fig. 1 shows a structural schematic diagram of an electronic device in the embodiments of the present application.

[0201] The electronic device in the embodiments of the present application can include a processor 1610 (Center Processing Unit, CPU), a memory 1620, an input device 1630, and an output device 1640, etc. The input device 1630 can include a keyboard, a mouse, a touch screen, etc. The output device 1640 can include a display device, such as a Liquid Crystal Display (LCD), a Cathode Ray Tube (CRT), etc.

[0202] The memory 1620 can include a Read Only Memory (ROM) and a Random Access Memory (RAM), and provide the processor 1610 with program instructions and data stored in the memory 1620. In the embodiments of the present application, the memory 1620 can be used to store the program of any of the hard disk grouping methods in the embodiments of the present application.

[0203] The processor 1610 calls the program instructions stored in the memory 1620, and the processor 1610 is used to execute any of the hard disk grouping methods in the embodiments of the present application according to the obtained program instructions.

[0204] Based on the above embodiments, in the embodiments of the present application, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the hard disk grouping method in any of the method embodiments.

[0205] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can be in the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can be in the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.

[0206] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flow or blocks Figure 1 one or more flow or blocks

[0207] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart block or blocks. Figure 1 one or more flow or blocks Figure 1 one or more flow or blocks

[0208] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flow or blocks Figure 1 one or more flow or blocks

[0209] Obviously, numerous modifications and variations of the present application are possible in light of the above teachings. It is therefore to be understood that within the scope of the appended claims and their equivalents, the application can be practiced otherwise than as specifically described.

Claims

1. A hard disk grouping method, characterized by, The method comprises the following steps: receiving a hard disk grouping instruction, the hard disk grouping instruction carrying preset hard disk group identifiers and their respective corresponding hard disk numbers; obtaining hard disk number information in a set of hard disks to be grouped, the number information being sequentially marked according to the physical arrangement order of the hard disks; based on the hard disk number information and the hard disk group identifiers and their respective corresponding hard disk numbers, attributing the hard disks to the corresponding hard disk group identifiers according to a preset number information interval mode to form corresponding hard disk groups, comprising: based on the hard disk number information and the hard disk group identifiers and their respective corresponding hard disk numbers, combining the preset number information interval mode to determine respective target numbers corresponding to the hard disk group identifiers, comprising: based on the hard disk number information in the set of hard disks to be grouped, determining a minimum random number and a maximum random number; based on the minimum random number and the maximum random number, determining a random value set; taking the hard disk numbers corresponding to the hard disk group identifiers as the respective random number quantities corresponding to the hard disk group identifiers, and obtaining respective random numbers corresponding to the hard disk group identifiers from the random value set; taking the respective random numbers corresponding to the hard disk group identifiers as the respective target numbers corresponding to the hard disk group identifiers; based on the respective target numbers corresponding to the hard disk group identifiers, determining the hard disks included in the respective hard disk group identifiers; attributing the hard disks included in the respective hard disk group identifiers to the corresponding hard disk group identifiers to form corresponding hard disk groups; wherein the number information corresponding to the hard disks included in each hard disk group is not adjacent.

2. The method of claim 1, wherein, The method comprises the following steps: based on the hard disk number information and the hard disk group identifiers and their respective corresponding hard disk numbers, combining the preset number information interval mode to determine respective target numbers corresponding to the hard disk group identifiers, comprising: determining the total number of groups of the hard disk groups based on the hard disk group identifiers; determining respective allocation numbers corresponding to the hard disk group identifiers based on the hard disk group identifiers and their respective corresponding hard disk numbers and the total number of groups of the hard disk groups; based on the respective allocation numbers corresponding to the hard disk group identifiers and the hard disk number information, determining unallocated numbers; 3. The method of claim 2, wherein, based on the unallocated numbers, the hard disk number information, and the respective allocation numbers corresponding to the hard disk group identifiers, determining the respective target numbers corresponding to the hard disk group identifiers. The method comprises the following steps: for the hard disk group identifiers, the following operations are performed respectively: based on the hard disk numbers corresponding to one hard disk group identifier and a preset parameter, determining a serial number set corresponding to the one hard disk group identifier; based on the serial number set and the total number of groups, determining respective target serial number values corresponding to the one hard disk group identifier; based on the respective target serial number values and the one hard disk group identifier, determining respective allocation numbers corresponding to the one hard disk group identifier.

4. The method of claim 2, wherein, The method comprises the following steps of: determining the target number corresponding to each hard disk group identifier based on the unassigned number, the hard disk number information, and the hard disk group identifier, comprising: determining the number threshold based on the hard disk number information; for the assigned number corresponding to each hard disk group identifier, the following operations are performed respectively: if the assigned number corresponding to one hard disk group identifier is greater than the number threshold, the assigned number is replaced by a random unassigned number, and the unassigned number is used as the target number corresponding to one hard disk group identifier; 5. A hard disk grouping apparatus, characterized by comprising: if the assigned number is not greater than the number threshold, the assigned number is used as the target number corresponding to one hard disk group identifier. comprising: an accepting module configured to accept a hard disk grouping instruction, the hard disk grouping instruction carrying preset hard disk group identifiers and the hard disk numbers corresponding to the hard disk group identifiers respectively; an obtaining module configured to obtain hard disk number information in a hard disk set to be grouped, the number information being sequentially marked according to the physical arrangement order of the hard disks; a processing module configured to attribute each hard disk to the corresponding hard disk group identifier according to a preset number information interval mode based on the hard disk number information and the hard disk group identifier and the hard disk numbers corresponding to the hard disk group identifiers respectively, to form corresponding hard disk groups, comprising: determining the target number corresponding to each hard disk group identifier based on the hard disk number information and the hard disk group identifier and the hard disk numbers corresponding to the hard disk group identifiers respectively, in combination with the preset number information interval mode, comprising: determining the minimum random number and the maximum random number based on the hard disk number information in the hard disk set to be grouped; determining a random value set based on the minimum random number and the maximum random number; taking the hard disk numbers corresponding to the hard disk group identifiers as the random number quantities corresponding to the hard disk group identifiers respectively, and obtaining the random numbers corresponding to the hard disk group identifiers from the random value set respectively; taking the random numbers corresponding to the hard disk group identifiers as the target numbers corresponding to the hard disk group identifiers respectively; determining the hard disks included in each hard disk group based on the target numbers corresponding to the hard disk group identifiers respectively; 6. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, attributing the hard disks included in each hard disk group to the corresponding hard disk group identifier respectively to form corresponding hard disk groups; wherein the number information corresponding to the hard disks included in each hard disk group is not adjacent.

7. A computer readable storage medium having stored thereon a computer program, characterized in that: The processor executes the program to implement the steps of the method of any one of claims 1-4.

8. A computer program product, characterised in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1-4. The computer program is stored in a computer readable storage medium; when the processor of the electronic device reads the computer program from the computer readable storage medium, the processor executes the computer program, so that the electronic device executes the steps of the method of any one of claims 1-4.

Citation Information

Patent Citations

  • Management method for storage arrays, device and controller

    CN103688248A

  • Method, system and device for allocating hard disks belong to a placement group and storage medium

    CN109002259A