Data storage method and device for software disk array, medium and product

By setting compression attribute parameters in the software disk array and selecting the appropriate compression algorithm to compress the data, the challenges of traditional RAID systems in terms of storage efficiency are solved, and higher storage efficiency and lower storage costs are achieved.

CN120010794AActive Publication Date: 2025-05-16SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202510503418.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-22
Publication Date
2025-05-16
Estimated Expiration
2045-04-22

AI Technical Summary

Technical Problem

Traditional RAID systems have challenges in storage efficiency, especially in the big data environment. How to effectively utilize existing storage resources to improve storage efficiency and reduce storage costs has become an urgent problem.

Method used

By setting compression attribute parameters in the software disk array, including the identification code of the target compression algorithm and the identification code of the data type, a suitable compression algorithm is determined, and the data to be stored is compressed and stored, thereby improving storage efficiency.

Benefits of technology

Through intelligent compression technology, the use of storage space is reduced, storage efficiency is improved, storage costs are reduced, and performance is improved during data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120010794A_ABST
    Figure CN120010794A_ABST
Patent Text Reader

Abstract

The invention discloses a data storage method and device for a software disk array, a medium and a product, and relates to the technical field of data storage, data are stored in the software disk array, and when the software disk array is created, set creation parameters not only include preset configuration parameters of the software disk array, but also include configuration parameters of the software disk array. The method further comprises preset compression attribute parameters, a software disk array with compression attributes is configured, the compression attribute parameters can indicate the software disk array to conduct corresponding data compression operation when data are stored, and the data are compressed according to the configured compression attribute parameters of the array. When a user performs data read-write operation on the software disk array, the data can be compressed by adopting a reasonable and efficient compression algorithm; through the intelligent compression process, the occupation of the storage space is reduced, the storage efficiency is improved, the storage cost is reduced, and the volume of the compressed data is reduced, so that the transmission speed of the data is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data storage, and in particular to a data storage method, device, medium and product of a software disk array. Background Art

[0002] The continuous development of information technology has promoted the growth of data storage demand. With the rapid growth of data storage demand, users have higher and higher requirements for storage systems. At present, the traditional RAID (Redundant Arrays of Independent Disks) system can rely on the redundancy of physical disks to ensure data security and provide data redundancy, but it still faces challenges in storage efficiency. Especially in the big data environment, the rapid growth of data has caused the storage cost to rise gradually. How to effectively use the existing storage resources to improve storage efficiency and reduce storage costs has become a problem that needs to be solved urgently.

[0003] It can be seen that how to effectively utilize storage resources is a problem that those skilled in the art need to solve. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide a data storage method, device, medium and product of a software disk array, which can solve the problem of how to effectively improve the utilization rate of storage resources in a RAID system.

[0005] In order to solve the above technical problems, an embodiment of the present invention provides a data storage method of a software disk array, comprising: Executing a creation command through a disk array management tool, and creating a software disk array according to preset configuration parameters and preset compression attribute parameters; wherein the compression attribute parameters include a first identification code or a second identification code, the first identification code is used to specify a target compression algorithm selected by the software disk array, and the second identification code is used to characterize the type of data to be stored in the software disk array; If there is data input to be stored, determining a target compression algorithm currently selected by the software disk array based on the configuration parameters and / or the compression attribute parameters; Using the target compression algorithm to compress the data to be stored to obtain compressed data; The compressed data is stored in the hard disk corresponding to the software disk array.

[0006] On the one hand, the compression attribute parameter further includes a compression switch bit, and the compression switch bit is used to control the opening and closing of the data compression function of the software disk array; before determining the target compression algorithm currently selected by the software disk array based on the configuration parameter and / or the compression attribute parameter, it also includes: The compression switch bit is configured to a corresponding state in which the data compression function is turned on.

[0007] On the one hand, the software disk array further includes an algorithm library and an application programming interface corresponding to each compression algorithm in the algorithm library, wherein the algorithm library is used to provide a compression algorithm; and the target compression algorithm is used to compress the data to be stored to obtain compressed data, including: An application programming interface corresponding to the target compression algorithm is called to compress the data to be stored using the target compression algorithm to obtain compressed data.

[0008] On the one hand, it also includes: If compressed data is input, the compressed data is decompressed using a target compression algorithm corresponding to the compressed data to obtain original data.

[0009] On the one hand, determining the target compression algorithm currently selected by the software disk array based on the configuration parameters and / or the compression attribute parameters includes: If there is data to be stored input, a compression request for the data to be stored is generated based on the data to be stored, the configuration parameters and the compression attribute parameters; the compression request includes the memory address of the data to be stored, the data size of the data to be stored and the target compression algorithm currently selected by the software disk array; receiving the compression request, and determining a target compression algorithm currently selected by the software disk array based on the compression request; Storing the compressed data in a hard disk corresponding to the software disk array includes: Generate a compression response of the data to be stored based on the compressed data and the target compression algorithm; the compression response includes the memory address of the compressed data, the data size of the compressed data and the target compression algorithm used when compressing the data to be stored; The compressed response is received, and based on the compressed response, the compressed data is stored in a hard disk corresponding to the software disk array.

[0010] On the one hand, it also includes: Cache pending compression requests to generate a request queue; Receiving the compression request includes: The compression request is read from the request queue.

[0011] On the one hand, it also includes: Cache the compressed responses to be processed to generate a response queue; Receiving the compressed response, comprising: The compressed response is read from the response queue.

[0012] On the one hand, determining the target compression algorithm currently selected by the software disk array based on the configuration parameters and / or the compression attribute parameters includes: Obtaining a first identification code from the preset compression attribute parameters; The target compression algorithm currently selected by the software disk array is determined based on a preset corresponding relationship between the compression algorithm and the first identification code.

[0013] On the one hand, determining the target compression algorithm currently selected by the software disk array based on the configuration parameters and / or the compression attribute parameters includes: Obtaining a second identification code from the preset compression attribute parameters; Determining the data type to be stored in the current software disk array based on a preset corresponding relationship between the data type and the second identification code; The target compression algorithm selected by the current software disk array is determined according to the type of data to be stored in the current software disk array.

[0014] On the one hand, determining the target compression algorithm selected by the current software disk array according to the type of data to be stored in the current software disk array includes: Determine from the algorithm library an available compression algorithm that supports the data type to be stored in the current software disk array; A compression algorithm with the highest compression rate among several available compression algorithms whose compression efficiencies are greater than a first preset value is determined as a target compression algorithm.

[0015] On the one hand, determining the target compression algorithm currently selected by the software disk array based on the configuration parameters and / or the compression attribute parameters includes: Determine the array level of the current software disk array based on the configuration parameters; The target compression algorithm selected by the current software disk array is determined according to the array level of the current software disk array.

[0016] On the one hand, determining the target compression algorithm selected by the current software disk array according to the array level of the current software disk array includes: If the current software disk array is a disk striping array, the compression algorithm with the fastest compression speed in the algorithm library is determined as the target compression algorithm; If the current software disk array is a disk mirror array, the compression algorithm with the highest compression ratio in the algorithm library is determined as the target compression algorithm.

[0017] To solve the above technical problems, an embodiment of the present invention further provides an electronic device, including: Memory for storing computer programs; The processor is used to execute the computer program to implement the steps of the data storage method of the software disk array as described above.

[0018] To solve the above technical problem, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the data storage method of the software disk array as described above are implemented.

[0019] To solve the above technical problem, an embodiment of the present invention further provides a computer program product, including a computer program / instruction, which implements the steps of the aforementioned software disk array data storage method when executed by a processor.

[0020] It can be seen from the above technical solution that data is stored in a software disk array. When creating the software disk array, the set creation parameters include not only the preset configuration parameters of the software disk array itself, but also the preset compression attribute parameters. A software disk array with compression attributes is configured. The compression attribute parameters can instruct the software disk array to perform corresponding data compression operations when storing data. The beneficial effect of the present invention is that according to the compression attribute parameters of the configured array, a user can use a reasonable and efficient compression algorithm to compress data when performing data read and write operations on the software disk array. Through this intelligent compression process, the storage space occupancy is reduced, the storage efficiency is improved, the storage cost is reduced, and the compressed data volume is reduced, thereby improving the data transmission speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0022] Figure 1 A schematic diagram of a flow chart of a data storage method of a software disk array provided in an embodiment of the present invention; Figure 2 A schematic diagram of the implementation structure of a software disk array provided in an embodiment of the present invention; Figure 3 A schematic diagram of a data compression process of a software disk array provided by an embodiment of the present invention; Figure 4 A schematic diagram of a method for selecting a first compression algorithm provided in an embodiment of the present invention; Figure 5 A schematic diagram of a method for selecting a second compression algorithm provided in an embodiment of the present invention; Figure 6 A schematic diagram of a method for selecting a third compression algorithm provided in an embodiment of the present invention; Figure 7 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0023] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0024] The terms "including" and "having" in the specification of the present invention and the above-mentioned drawings, as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may include steps or units that are not listed.

[0025] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0026] Next, a data storage method of a software disk array provided by an embodiment of the present invention is described in detail. Figure 1 As shown, Figure 1 A flowchart of a data storage method of a software disk array provided by an embodiment of the present invention; the data storage method of the software disk array includes:

[0027] S11: Execute a creation command through a disk array management tool, and create a software disk array according to preset configuration parameters and preset compression attribute parameters; wherein the compression attribute parameters include a first identification code or a second identification code, the first identification code is used to specify a target compression algorithm selected by the software disk array, and the second identification code is used to characterize the type of data to be stored in the software disk array.

[0028] It is understandable that in order to effectively improve the storage efficiency of software RAID, when building a RAID array for a host, configuration parameters and compression attribute parameters will be used as creation parameters when creating a RAID array to create a RAID array. Configuration parameters include the name of the created RAID array, the level of the RAID array, the number of disks in the RAID array, a list of disk devices, etc. Compression attribute parameters include a compression switch and a first identification code and / or a second identification code that can characterize the compression method of the RAID array. When creating a RAID array, the disk array management tool can determine the hard disk corresponding to the software RAID to be created based on the configuration parameters, and use the compression attribute parameters to define the compression method that the currently created software RAID needs to use when storing data in the future, that is, the target compression algorithm.

[0029] It is not difficult to understand that the disk array management tool is specifically the mdadm tool, which can realize the creation of a RAID array. At the same time, in the present application, the compression-related parameters of the RAID array are configured in the process of creating RAID with the mdadm tool, and finally a RAID array with compression attributes can be created and configured, and a compression management module is built into the MDRAID (Multiple Device RAID) to realize data compression and decompression. According to the compression attributes of the configured array, when the user performs data read and write operations on the array, the IO (Input / Output) data can be compressed or decompressed by adopting a reasonable and efficient compression algorithm. A RAID array with integrated compression function is realized by reusing the creation command (creat instruction) when the software disk array is created. The creation command creat is used to specify the creation of a new RAID array. The present application does not make any special restrictions on the specific configuration values ​​of the configuration parameters and compression attribute parameters, which can be selected and set according to the storage function required by the host. The present application does not make any special restrictions on the specific types and implementation methods of the first identification code and the second identification code.

[0030] As a specific embodiment, the RAID management tool mdadm supports configuring an array with a compression attribute by creating a command. A compression attribute parameter is added to the creation command parameter. The specific parameter structure of the compression attribute parameter is shown in Table 1, wherein compress represents a compression switch, and generally 0 or 1 is used to represent whether the compression function of the RAID array is turned on or not. algo represents the compression algorithm specified for the RAID array, that is, the first identification code; data_type represents the type of data that the RAID array will store when in use, that is, the second identification code; the first identification code and the second identification code are not limited to one byte as shown in Table 1, and can also be implemented using multiple bytes. For example, different IDs (Identifiers) corresponding to several compression algorithms of different types can be defined in advance. When a compression algorithm needs to be specified for a certain RAID array, the ID corresponding to the compression algorithm is directly configured as the first identification code to the compression attribute parameter; for another example, different IDs corresponding to different types of data are defined in advance. When the data format that a certain RAID array needs to store is determined, the ID corresponding to the data format is directly configured as the second identification code to the compression attribute parameter. By configuring the first identification code and / or the second identification code in the compression attribute parameter, the compression management module can be subsequently helped to determine the target compression algorithm that the RAID array needs to adopt when compressing or decompressing data. The first identification code and the second identification code are generally used as part of the compression attribute parameter structure at the same time, that is, the compression attribute parameter includes the first identification code and the second identification code at the same time. If the type of data to be stored by the host is relatively fixed, the second identification code will be configured to a corresponding value, and the first identification code will remain in a state of an empty value or an invalid value. If the compression algorithm supported by the host is relatively fixed, the first identification code will be configured to a corresponding value, and the second identification code will remain in a state of an empty value or an invalid value.

[0031] Table 1 Schematic diagram of the parameter structure of compression attribute parameters

[0032] S12: If there is input data to be stored, determine the target compression algorithm selected by the current software disk array based on the configuration parameters and / or compression attribute parameters.

[0033] S13: Using a target compression algorithm to compress the data to be stored to obtain compressed data.

[0034] It is not difficult to understand that after the RAID array is created, MD RAID can save the compression properties of the RAID array, especially the target compression algorithm, to a preset location by parsing the creation parameters of the mdadm tool when creating the array, so that subsequent data read and write operations can be performed based on the target compression algorithm. When writing data, that is, storing data, the target compression algorithm selected by the current software disk array is determined from the preset location, and the target compression algorithm is used to compress the data to be stored.

[0035] It should be noted that the present invention also adds a compression management module in the MD RAID driver module. The compression management module is responsible for compressing or decompressing the data using a reasonable and efficient compression algorithm in the algorithm library according to the compression attribute in the input message of the IO data in the input queue, and putting the compressed data into the output queue, that is, step S12, step S13 and step S14 are implemented through the compression management module, and subsequently the MD RAID writes the processed data from the output queue to the disk or returns it to the user.

[0036] S14: Storing the compressed data in the hard disk corresponding to the software disk array.

[0037] It is understandable that the compressed data can be formally written and stored in the hard disk corresponding to the software disk array. The hard disk corresponding to the software disk array is the hard disk specified in the configuration parameters when creating the software disk array. A RAID array may have multiple corresponding hard disks, so it is possible to achieve storage redundancy of the data by storing the compressed data in multiple hard disks at the same time to improve the security and reliability of storage. This application does not make any special restrictions on the specific type of hard disk corresponding to the RAID array and the implementation method.

[0038] Further, for a host, several RAID arrays corresponding to it can be created according to the needs. Since the present application directly completes the configuration of the compression attribute of the entire RAID array when it is created, for the RAID array in the present application, data compression will be performed with one array as a unit, and one RAID array can only use one corresponding target compression algorithm. Therefore, when a host needs to implement different types of compressed storage, it can choose to build several RAID arrays corresponding to the compression methods of several requirements, and each RAID array adopts a different compression algorithm to realize the host's needs for different types of compression methods. If the second identification code is used to represent the target compression algorithm, it is best to store only one type of data in a RAID array. Therefore, when constructing a RAID array, it is necessary to determine the type of data that needs to be stored in the host according to the storage requirements of the host, and define the second identification code according to this data type, so as to create the RAID array required by the host. If the host has multiple different types of data that need to be stored, or as the host function expands, there are other types of data that need to be stored, it is necessary to increase the creation of several RAID arrays corresponding to several data types of the host IO data, each RAID array corresponds to a data type, and realizes the compression storage and decompression reading of IO data of one data type. When the target compression algorithm is determined by array level, the level corresponding to each RAID array is fixed. In this case, the storage requirements of the host can be met by creating several RAIDs of different levels.

[0039] It should be noted that see Figure 2 As shown, Figure 2 A schematic diagram of the implementation structure of a software disk array provided by an embodiment of the present invention; the RAID management tool is set in the user space of the host, which is convenient for users to define configuration parameters and compression attribute parameters, and create different RAID arrays according to their own storage requirements or data compression requirements. The MDRAID and file system layers are set in the kernel space of the host. The RAID public layer can extract the common characteristics of RAIDs of various levels, register with the upper layer according to the implementation template of the block device, and provide public functions and interface registration functions to the RAID personality layer. The RAID personality layer is the personality embodiment of RAIDs of various levels. It registers a personality interface with the RAID public layer, and uses the public functions provided by the RAID public layer to implement personalized functions based on the lower layer. RAID personality is implemented in the form of an independent module and can be dynamically loaded. Specifically, it can be implemented through independent RAID arrays of different levels of RAID 0, RAID 1, RAID 4 / 5 / 6. At the same time, a compression management module is added to MDRAID to realize data compression and decompression in the entire data storage / reading and writing process. At the same time, MDRAID corresponds to several hard disks at the hardware level to realize data storage.

[0040] As a specific embodiment, the entire data storage process includes the following steps: first, the RAID system is configured, and an MDRAID array with a compression switch turned on is configured using the mdadm tool. Then data input can be performed, and the data to be stored can be input, and the data can include data of types such as text, image, audio and video. When there is data input, the compression management module will select the compression algorithm through data type identification or other methods, and select the corresponding compression algorithm according to the data type or RAID level to be stored by the user. Then continue data compression, call the algorithm interface corresponding to the compression algorithm to compress the data to be compressed, and perform data storage after compression processing, and store the compressed data in the hard disk after being divided into blocks according to different RAID levels. The process in which the user reads data from the RAID system is opposite to the above-mentioned data storage process. The stored compressed data is first read out, and the compression algorithm corresponding to the data is determined according to the compression process of the data, and the algorithm interface corresponding to the compression algorithm is called to decompress the compressed data, and the decompressed data is returned to the user.

[0041] Furthermore, in order to improve the reliability and security of data storage, compression redundancy can be set in application scenarios with relatively high requirements for data reliability. For a certain input data to be stored, two or more RAID arrays corresponding to the data to be stored are set. The two or more RAID arrays use different target compression algorithms, and both compress the data to be stored and generate compressed data for storage. When the data needs to be read, the two or more RAID arrays simultaneously decompress the data for data reading. Finally, the accuracy of the data is determined by comparing the data read from each RAID array, avoiding problems such as data corruption caused by compression errors or other anomalies. When the data to be stored is stored in each RAID array, storage redundancy is further combined, and more reliable data storage is achieved by combining storage redundancy and compression redundancy.

[0042] The present invention develops a new data storage method for software disk arrays, including steps such as data class identification, compression algorithm selection, data compression, compressed data storage, and data decompression and recovery, realizing MDRAID supporting data compression, effectively realizing data compression in MD RAID system, not only improving storage efficiency, but also reducing storage space occupation and improving storage efficiency through intelligent compression technology, and improving performance during data transmission and recovery, reducing the size of compressed data and improving data transmission speed, and optimizing the dynamic performance of RAID system through performance analysis and dynamic adjustment. Through the integration of compression function, RAID system can automatically compress and decompress data without affecting user experience, thereby improving storage space utilization and overall system performance. Storage redundancy technology in MDRAID can also ensure data reliability, and ensure data integrity and availability even in the case of partial disk failure.

[0043] On the one hand, the compression attribute parameter also includes a compression switch bit, which is used to control the opening and closing of the data compression function of the software disk array; before determining the target compression algorithm selected by the current software disk array based on the configuration parameter and / or the compression attribute parameter, it also includes: Configure the compression switch bit to the corresponding state where the data compression function is turned on.

[0044] It is not difficult to understand that the compression function of the RAID array can be turned on or off by configuring the compression switch bit in the compression attribute parameters. If the compression switch bit indicates that the data compression function is turned on, then when there is data input to the RAID array, the compression management module in the RAID array will be triggered to perform the identification of the target compression algorithm and data compression and other processes. If the compression switch bit indicates that the data compression function is turned off, the compression management module will not be triggered, and the input data will be directly allocated to the corresponding hard disk for storage. In this application, the RAID array needs to turn on the compression function to achieve higher utilization of data storage, so it is necessary to pre-configure the compression switch bit to the corresponding state of the data compression function turned on. When the RAID array has original storage requirements in actual applications, the compression switch bit can be adjusted to the corresponding state representing the data compression function turned off. The specific implementation method and configuration method of the compression switch bit are not particularly limited in this application. The two corresponding states of turning on or off can be realized by assigning a byte of 0 or 1. The configuration can be mainly realized by manual assignment by the user.

[0045] Specifically, by configuring the compression switch bit, the compression function of the RAID array can be flexibly controlled, so that the RAID array can not only realize data storage by compressing data, but also realize the original storage requirements in specific application scenarios, further improving the flexibility of the RAID system and expanding the applicable scenarios of the RAID system.

[0046] On the one hand, the software disk array also includes an algorithm library and an application programming interface corresponding to each compression algorithm in the algorithm library, wherein the algorithm library is used to provide compression algorithms; the target compression algorithm is used to compress the data to be stored to obtain compressed data, including: The application programming interface corresponding to the target compression algorithm is called to compress the data to be stored using the target compression algorithm to obtain compressed data.

[0047] It is understandable that, in order to facilitate the RAID array to implement different compression methods in different application scenarios, an algorithm library can also be directly set in the RAID array, and the algorithm library includes multiple compression algorithms of different types. After the compression management module determines the target compression algorithm required by the current RAID array, the corresponding application programming interface can be directly called from the algorithm library to implement the call of the target compression algorithm, so as to compress the data. When data decompression is required, the compression management module can also use the same method to implement the call of the target compression algorithm, so as to decompress the data. Therefore, the RAID array also needs to configure the API (Application Programming Interface) interface corresponding to each compression algorithm in the algorithm library, so that the compression management module provides the corresponding API interface. The specific implementation method of the algorithm library, etc., is not specifically limited in this application, and the algorithm library can also be set in the corresponding host. The specific implementation method of the application programming interface, etc., is not specifically limited in this application, and the call of different compression algorithms can also be implemented in other ways, and this embodiment is not specifically limited here.

[0048] Specifically, the selection and calling of the target compression algorithm can be achieved by setting the coordination of the algorithm library and the API interface. The compression algorithm only needs to be encapsulated in the API and can be directly called when needed. This realizes the reuse of the compression algorithm and is conducive to the rapid implementation of the entire data reading and writing process. By setting the algorithm library, it is convenient for the RAID system to directly call different compression algorithms in different application scenarios.

[0049] See also Figure 3 As shown, Figure 3 A schematic diagram of a data compression process of a software disk array provided by an embodiment of the present invention; on the one hand, it also includes: If there is compressed data input, the compressed data is decompressed using the target compression algorithm corresponding to the compressed data to obtain the original data.

[0050] It is not difficult to understand that the software disk array is not only set up for data storage, but also involves the data reading process. When the data to be stored is compressed and stored on the hard disk, when the user reads the data, the compression management module needs to decompress the data to obtain the original data, so as to return the original data to the user and realize data reading. That is, a set of corresponding data compression when writing and decompression operations when reading data. The data is input into the compression management module in FIFO (First In First Out) mode, and is compressed / decompressed by the compression management module and then output from the compression management module in FIFO mode. The decompression can use the target compression algorithm consistent with the corresponding compression process. Therefore, for a created RAID array, the entire data reading and writing process generally only uses one target compression algorithm.

[0051] Furthermore, there are two situations for the input data input into the compression management module at this time, one is the input of data to be stored, and the other is the input of compressed data to be read. At this time, the software RAID or compression management module can determine whether the data belongs to data to be stored or data to be read based on the source of the input data and / or its output target, thereby triggering the compression or decompression operation accordingly.

[0052] Specifically, when the user reads out the data, a corresponding data decompression operation is also required to restore the data, thereby ensuring that the original data is returned to the user, making it convenient for the user to directly view and process the data, thereby improving the efficiency of data use.

[0053] On the one hand, determining the target compression algorithm selected by the current software disk array based on the configuration parameters and / or the compression attribute parameters includes: If there is data to be stored input, a compression request for the data to be stored is generated based on the data to be stored, the configuration parameters and the compression attribute parameters; the compression request includes the memory address of the data to be stored, the data size of the data to be stored and the target compression algorithm selected by the current software disk array; receiving a compression request, and determining a target compression algorithm selected by the current software disk array based on the compression request; Storing compressed data in the hard disk corresponding to the software disk array includes: Generate a compression response of the data to be stored based on the compressed data and the target compression algorithm; the compression response includes the memory address of the compressed data, the data size of the compressed data and the target compression algorithm used when compressing the data to be stored; A compression response is received, and based on the compression response, the compressed data is stored in a hard disk corresponding to the software disk array.

[0054] It can be understood that in the entire data reading and writing process, data compression and decompression can be achieved in the form of requests and responses. When there is data input, the compression management module directly determines the target compression algorithm from the preset position, and then generates a data packet request based on the input data and the target compression algorithm. The input data at this time may be data to be stored or compressed data to be read. If the input data is data to be stored, the corresponding request is a compression request, and the response is a compression response; if the input data is data to be read, the corresponding request is a decompression request, and the response is a decompression response. This embodiment takes the compression operation as an example for explanation, and the decompression operation is similar, which will not be repeated in this application. The format structure of the input data packet request is shown in Table 2, where addr represents the memory address of the input data, size represents the data size of the input data, and after receiving this request, the compression management module can obtain the input data to be stored according to addr and size, and compress or decompress it. algo represents the compression algorithm type specified by the compression attribute parameter, that is, the first identification code in the compression attribute parameter, d_type represents the type of data that the RAID array will store when in use, that is, the second identification code, and level represents the array level of the RAID array, which can be obtained from the configuration parameters. The request generally includes three parameters: algo, d_type and level. If the compression management module determines the target compression algorithm based on the first identification code in the compression attribute parameters, the value of algo is obtained in the request, and the other two parameters remain empty or invalid. If the compression management module determines the target compression algorithm based on the second identification code in the compression attribute parameters, the value of d_type is obtained in the request, and the other two parameters remain empty or invalid. If the compression management module determines the target compression algorithm based on the array level, the value of level in the configuration parameters is obtained in the request, and the other two parameters remain empty or invalid.

[0055] Table 2 Schematic diagram of the request structure input to the compression management module

[0056] Correspondingly, after the compression management module completes the compression or decompression operation on the data, it will generate a compression response or decompression response corresponding to the compression request or decompression request, so as to output the compressed data for storage or return the decompressed data output to the user. The format structure of the output response is shown in Table 3. The input and output of this embodiment refer to the data input to the compression management module and the data output from the compression management module. Among them, addr represents the memory address of the output data, size represents the data size of the output data, and the compression management module can store the compressed data in the corresponding location according to addr and size after the data processing is completed, or send the decompressed data to the corresponding location. Algo represents the type of compression algorithm used in the compression or decompression process, that is, the target compression algorithm; result represents the processing result, which is a sign of whether the current data processing process is successful or not. Users or operators can use this field to check whether the compression or decompression of the compression management module is completed normally.

[0057] Table 3 Schematic diagram of the response structure output by the compression management module

[0058] Specifically, by implementing data compression / decompression processing in the form of requests and responses, data is input with requests and output with responses, which facilitates statistical analysis of the use of compression algorithms through information such as request sending time, response return time, request parameters, and response results, so as to timely discover performance problems or abnormal situations in the system and make corresponding optimizations and adjustments. Both compression and decompression operations can be requested, which facilitates the call of compression algorithms under different needs and scenarios.

[0059] On the one hand, it also includes: caching the compression requests to be processed to generate a request queue.

[0060] Receiving a compression request includes: reading the compression request from a request queue.

[0061] On the one hand, it also includes: caching the compressed responses to be processed to generate a response queue.

[0062] Receiving a compressed response includes: reading the compressed response from a response queue.

[0063] It is not difficult to understand that, considering that the compression management module may face multiple requests, and the processed data may not be directly output to the corresponding end due to transmission delays, etc., corresponding request queues and response queues can also be set. The request queue can cache data requests that need to be compressed or decompressed, that is, the input queue of the compression management module; the response queue can cache compressed or decompressed data responses, that is, the output queue of the compression management module. The compression management module reads the request messages in the request queue in turn, processes the data, and puts the processed responses into the response queue. The data transmission module in the software RAID reads the response messages in the response queue in turn, and outputs the processed data to the hard disk for storage or returns it to the user.

[0064] Specifically, by setting up request queues and response queues, requests and responses in the data processing process can be effectively cached, thereby avoiding the loss of requests and responses, achieving orderly storage and management of requests and responses, waiting for processing by the compression management module or the data transmission module, and avoiding abnormal situations such as crash of the RAID system due to instantaneous high load, thereby ensuring the stable operation of the RAID system under high concurrency conditions, ensuring that requests can be effectively processed and responses can be reliably transmitted to the corresponding locations.

[0065] See also Figure 4 As shown, Figure 4 A schematic diagram of a first compression algorithm selection method provided by an embodiment of the present invention; on the one hand, determining the target compression algorithm selected by the current software disk array based on configuration parameters and / or compression attribute parameters includes: Obtaining a first identification code from a preset compression attribute parameter; The target compression algorithm selected by the current software disk array is determined based on a preset corresponding relationship between the compression algorithm and the first identification code.

[0066] It is understandable that the compression attribute parameters can directly specify a target compression algorithm for the software disk array by directly configuring the first identification code, and the compression management module can directly call the corresponding API interface according to the specified algorithm type. Since the first identification code will be implemented in the form of an identifier, etc., it is necessary to pre-establish a preset correspondence between the compression algorithm and the first identification code so that the compression management module can directly determine and call the corresponding target compression algorithm according to the first identification code. This application does not make any special restrictions on the specific implementation method of the preset correspondence between the compression algorithm and the first identification code, and it can be pre-stored in the host or RAID array using a correspondence table or the like. Figure 4As shown, the LZMA algorithm (Lempel-Ziv-Markov chain algorithm), Bzip2 algorithm, or Deflate algorithm is directly specified for each RAID array. When data processing is required, the corresponding algorithm can be directly called from the algorithm library to achieve data compression or decompression.

[0067] Specifically, the target compression algorithm used by the corresponding RAID array can be directly specified according to the application requirements of the host, which is flexible, effective and easy to implement, so that the RAID array can meet the data compression requirements of specific application scenarios.

[0068] See also Figure 5 As shown, Figure 5 A schematic diagram of a second compression algorithm selection method provided by an embodiment of the present invention; on the one hand, determining the target compression algorithm selected by the current software disk array based on configuration parameters and / or compression attribute parameters, including: Obtaining a second identification code from a preset compression attribute parameter; Determine the data type to be stored in the current software disk array based on a preset corresponding relationship between the data type and the second identification code; The target compression algorithm selected by the current software disk array is determined according to the type of data to be stored in the current software disk array.

[0069] It is not difficult to understand that a reasonable and efficient compression algorithm can also be provided according to the data type data_type. Therefore, the second identification code in the compression attribute parameter can also be defined according to the actual data storage requirements of the host to inform the compression management module of the data type that the current RAID array needs to process, and then the corresponding target compression algorithm is selected according to the data type. Therefore, it is necessary to pre-establish a preset correspondence between the data type and the second identification code to help identify the data type that the current RAID array needs to process. The specific implementation method of the preset correspondence between the data type and the second identification code is not particularly limited in this application. The correspondence between the data type and the target compression algorithm can also be selected and set according to the actually available compression algorithm, such as Figure 5 As shown, for text data, you can choose Huffman coding (Huffman Coding); for image data, you can choose JPEG compression (Joint Photographic Experts Group compression); for video data, you can choose H.264 coding (ITU-T H.264 / ISO / IECMPEG-4 AVC), etc.

[0070] Specifically, different types of data have different characteristics. Identifying and determining the data compression method required for the current RAID array based on the data type can enable the selected target data compression algorithm to fully adapt to the characteristics of the stored data, achieve a high compression ratio, increase the compression speed, ensure the data quality after compression and decompression processing, and effectively balance data quality and storage space occupancy.

[0071] On the one hand, the target compression algorithm selected by the current software disk array is determined according to the data type to be stored in the current software disk array, including: Determine from the algorithm library an available compression algorithm that supports the data type to be stored in the current software disk array; A compression algorithm with the highest compression rate among several available compression algorithms whose compression efficiencies are greater than a first preset value is determined as a target compression algorithm.

[0072] It is understandable that when identifying and determining the target data compression algorithm based on the data type, it is first necessary to consider the data formats supported by each compression algorithm. Therefore, it is necessary to first select several available compression algorithms that support the data type from the algorithm library, and then determine the optimal compression algorithm as the target compression algorithm by comparing the compression efficiency and compression rate. The method for determining the optimal compression algorithm is not limited to the method proposed in this embodiment to determine the compression algorithm with the highest compression rate among several available compression algorithms with compression efficiency greater than the first preset value as the target compression algorithm. There are many implementation methods, and this application does not make any special restrictions here. This application does not make any special restrictions here on the specific value of the first preset value and the implementation method.

[0073] Furthermore, after the available compression algorithms are determined, two or more compression algorithms with better performance are selected from the available compression algorithms to realize compression redundancy. Taking two redundancies as an example, the compression algorithm with the highest compression rate among several available compression algorithms with compression efficiency greater than a first preset value is determined as the target compression algorithm of the first RAID array, and the compression algorithm with the highest compression efficiency among several available compression algorithms with compression rate greater than a second preset value is determined as the target compression algorithm of the second RAID array, or the compression algorithm with the second highest compression rate among several available compression algorithms with compression efficiency greater than the first preset value is determined as the target compression algorithm of the second RAID array, and the two target compression algorithms are respectively used to compress and store the data to be stored in the first RAID array and the second RAID array to realize compression redundancy.

[0074] Specifically, on the basis of supporting the corresponding data format, the target compression algorithm can be selected by comprehensively considering the compression efficiency and compression ratio, thereby ensuring the compression / decompression speed during the data reading and writing process and ensuring the rapid response of the RAID system.

[0075] See also Figure 6 As shown, Figure 6 A schematic diagram of a third compression algorithm selection method provided by an embodiment of the present invention; on the one hand, determining the target compression algorithm selected by the current software disk array based on configuration parameters and / or compression attribute parameters, including: Determine the array level of the current software disk array based on the configuration parameters; The target compression algorithm selected by the current software disk array is determined according to the array level of the current software disk array.

[0076] It is not difficult to understand that you can also select the corresponding default compression algorithm for different RAID levels. At this time, you can directly read the configuration parameters of the software disk array to determine the array level of the current software disk array, and then select the corresponding target compression algorithm. The correspondence between the array level and the target compression algorithm can also be selected and set according to the actual available compression algorithms, such as Figure 6 As shown, for RAID 0 (disk striping array), you can select the LZ4 (Lempel-Ziv-4) algorithm, for RAID 1 (disk mirroring array), you can select the LZMA algorithm or the Zopfli algorithm, for RAID 5 (independent disk array with distributed parity), you can select the LZMA algorithm or the Deflate algorithm, and for RAID 6 (independent disk array with dual distributed parity), you can select the LZMA algorithm or the Zopfli algorithm.

[0077] Specifically, different levels of RAID arrays differ in the way they store data, including redundancy, read and write performance, etc. Therefore, different target data compression algorithms can be selected by identifying and determining the level of the RAID array, so that the selected target data compression algorithm can be fully adapted to the characteristics of the stored data, achieve a high compression ratio, and improve the compression speed.

[0078] On the one hand, the target compression algorithm selected by the current software disk array is determined according to the array level of the current software disk array, including: If the current software disk array is a disk striping array, the compression algorithm with the fastest compression speed in the algorithm library is determined as the target compression algorithm; If the current software disk array is a disk mirror array, the compression algorithm with the highest compression ratio in the algorithm library is determined as the target compression algorithm.

[0079] It is understandable that RAID 0 improves performance through striping, but has no redundancy mechanism. It is suitable for scenarios with high performance requirements but low data security requirements. Since RAID 0 has no data redundancy, the selection of compression algorithms should focus on improving performance. You can consider using algorithms with fast compression speed, such as LZ4, to maximize IO throughput. RAID 1 provides the highest level of redundancy, and each hard disk has a mirror. It is suitable for scenarios with strict requirements on data redundancy. Since the data volume of RAID 1 is twice that of a single hard disk, you can consider using algorithms with high compression ratios such as LZMA or Bzip2 to optimize storage space. RAID 5 uses striping technology with distributed parity, which provides a good balance between performance and reliability. It is suitable for applications with more random reads and writes and intensive data. You can choose algorithms such as LZMA or Deflate to balance the compression ratio and speed. When selecting a compression algorithm, you need to balance the compression ratio and compression speed. Specifically, you can use a compression algorithm with the highest compression ratio among several compression algorithms with a compression speed greater than a third preset value as the target compression algorithm. RAID 6 adds an extra parity check information on the basis of RAID 5, providing higher data redundancy. It is suitable for scenarios with extremely high data security requirements. You can consider using compression algorithms such as LZMA or Zopfli to ensure high data compression ratio and security. When selecting a compression algorithm, you need to balance the compression ratio and compressed data integrity. Specifically, you can use a compression algorithm with the highest compression ratio among several compression algorithms whose compressed data integrity is greater than the fourth preset value to determine it as the target compression algorithm.

[0080] Furthermore, for RAID arrays of different levels, two or more optimal compression algorithms can be selected from the compression algorithms according to their needs to achieve compression redundancy. Taking two redundancies as an example, for RAID 0, the compression algorithm with the fastest compression speed in the algorithm library can be determined as the target compression algorithm for the first RAID array, and the second-rank compression algorithm with the second-rank compression speed second only to the fastest can be determined as the target compression algorithm for the second RAID array. For RAID 1, the compression algorithm with the highest compression ratio in the algorithm library can be determined as the target compression algorithm for the first RAID array, and the second-rank compression algorithm with the second-rank compression ratio second only to the highest can be determined as the target compression algorithm for the second RAID array. For RAID 5, the compression algorithm with the highest compression ratio among several compression algorithms in the algorithm library whose compression speed is greater than the third preset value can be determined as the target compression algorithm for the first RAID array, and the compression algorithm with the highest compression speed among several compression algorithms in the algorithm library whose compression ratio is greater than the fourth preset value can be determined as the target compression algorithm for the second RAID array. For RAID 5, the compression algorithm with the highest compression ratio among several compression algorithms in the algorithm library whose compression data integrity is greater than the fifth preset value can be determined as the target compression algorithm for the first RAID array, and the compression algorithm with the best compression data integrity among several compression algorithms in the algorithm library whose compression ratio is greater than the sixth preset value can be determined as the target compression algorithm for the second RAID array. The corresponding two target compression algorithms are used to compress and store the data to be stored in the first RAID array and the second RAID array, respectively, to achieve compression redundancy.

[0081] Specifically, for RAID arrays of different levels, the different compression effects of various compression algorithms can be comprehensively considered, and the compression algorithm that best suits each RAID level can be selected, thereby taking into account different compression parameters such as compression / decompression speed, compression ratio, data integrity, etc. during the data reading and writing process to achieve the best compression effect.

[0082] In order to solve the above technical problems, an embodiment of the present invention further provides a data storage device of a software disk array, comprising: A creation unit, configured to execute a creation command through a disk array management tool, and create a software disk array according to preset configuration parameters and preset compression attribute parameters; wherein the compression attribute parameters include a first identification code or a second identification code, the first identification code is used to specify a target compression algorithm selected by the software disk array, and the second identification code is used to characterize the type of data to be stored in the software disk array; An algorithm determination unit, configured to determine, if there is input data to be stored, a target compression algorithm currently selected by the software disk array based on the configuration parameters and / or the compression attribute parameters; A compression unit, used for compressing the data to be stored using the target compression algorithm to obtain compressed data; The storage unit is used to store the compressed data in the hard disk corresponding to the software disk array.

[0083] For the description of the features of the data storage device of the software disk array provided in the embodiment of the present invention, reference may be made to the relevant description of the embodiment of the data storage method of the software disk array, which will not be described in detail here.

[0084] See also Figure 7 As shown, Figure 7 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. To solve the above technical problems, an embodiment of the present invention further provides an electronic device, including: Memory for storing computer programs; The processor is used to execute a computer program to implement the steps of the data storage method of the software disk array as described above.

[0085] The electronic device provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer or a desktop computer.

[0086] Among them, the processor 61 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 61 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 61 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 61 may be integrated with a graphics processing unit (GPU), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 61 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.

[0087] The memory 60 may include one or more computer-readable storage media, which may be non-transitory. The memory 60 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 60 is at least used to store the following computer program 601, wherein, after the computer program is loaded and executed by the processor 61, the relevant steps of the data storage method of the software disk array disclosed in any of the aforementioned embodiments can be implemented. In addition, the resources stored in the memory 60 may also include an operating system 602 and data 603, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 602 may include Windows, Unix, Linux, etc. The data 603 may include, but is not limited to, data in the data storage method of the software disk array, etc.

[0088] In some embodiments, the electronic device may further include a display screen 62 , an input / output interface 63 , a communication interface 64 , a power supply 65 , and a communication bus 66 .

[0089] Those skilled in the art will understand that Figure 7 The structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure.

[0090] For the description of the features in the electronic device provided by the embodiment of the present invention, reference may be made to the relevant description of the embodiment of the data storage method of the software disk array, which will not be described in detail here.

[0091] It is understandable that if the data storage method of the software disk array in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the current technology, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, magnetic disk or optical disk, etc. Various media that can store program codes.

[0092] To solve the above technical problems, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the data storage method of the software disk array as described above are implemented.

[0093] For the description of the features in the computer-readable storage medium provided in the embodiment of the present invention, reference may be made to the relevant description of the embodiment of the data storage method of the software disk array, which will not be described in detail here.

[0094] To solve the above technical problem, an embodiment of the present invention further provides a computer program product, including a computer program / instruction, which implements the steps of the aforementioned software disk array data storage method when executed by a processor.

[0095] For descriptions of features in the computer program product provided by the embodiments of the present invention, reference may be made to the relevant descriptions of the embodiments of the data storage method of the software disk array, which will not be described in detail here.

[0096] The above is a detailed description of a data storage method, device, medium and product of a software disk array provided by an embodiment of the present invention. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0097] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0098] The above is a detailed introduction to the data storage method, device, medium and product of a software disk array provided by the present invention. This article uses specific examples to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, the present invention can also be improved and modified, and these improvements and modifications also fall within the scope of protection of the present invention.

Claims

1. A data storage method for a software disk array, characterized in that: include: Executing a creation command through a disk array management tool, and creating a software disk array according to preset configuration parameters and preset compression attribute parameters; wherein the compression attribute parameters include a first identification code or a second identification code, the first identification code is used to specify a target compression algorithm selected by the software disk array, and the second identification code is used to characterize the type of data to be stored in the software disk array; If there is data input to be stored, determining a target compression algorithm currently selected by the software disk array based on the configuration parameters and / or the compression attribute parameters; Using the target compression algorithm to compress the data to be stored to obtain compressed data; The compressed data is stored in the hard disk corresponding to the software disk array.

2. The data storage method of the software disk array according to claim 1, characterized in that: The compression attribute parameter also includes a compression switch bit, and the compression switch bit is used to control the opening and closing of the data compression function of the software disk array; before determining the target compression algorithm currently selected by the software disk array based on the configuration parameter and / or the compression attribute parameter, it also includes: The compression switch bit is configured to a corresponding state in which the data compression function is turned on.

3. The data storage method of software disk array according to claim 1, characterized in that: The software disk array further comprises an algorithm library and an application programming interface corresponding one-to-one to each compression algorithm in the algorithm library, wherein the algorithm library is used to provide compression algorithms; The target compression algorithm is used to compress the data to be stored to obtain compressed data, including: An application programming interface corresponding to the target compression algorithm is called to compress the data to be stored using the target compression algorithm to obtain compressed data.

4. The data storage method of the software disk array according to claim 1, characterized in that: Also includes: If compressed data is input, the compressed data is decompressed using a target compression algorithm corresponding to the compressed data to obtain original data.

5. The data storage method of software disk array according to claim 1, characterized in that: Determining a target compression algorithm currently selected by the software disk array based on the configuration parameter and / or the compression attribute parameter includes: If there is data to be stored input, a compression request for the data to be stored is generated based on the data to be stored, the configuration parameters and the compression attribute parameters; the compression request includes the memory address of the data to be stored, the data size of the data to be stored and the target compression algorithm currently selected by the software disk array; receiving the compression request, and determining a target compression algorithm currently selected by the software disk array based on the compression request; Storing the compressed data in a hard disk corresponding to the software disk array includes: Generate a compression response of the data to be stored based on the compressed data and the target compression algorithm; the compression response includes the memory address of the compressed data, the data size of the compressed data and the target compression algorithm used when compressing the data to be stored; The compressed response is received, and based on the compressed response, the compressed data is stored in a hard disk corresponding to the software disk array.

6. The data storage method of the software disk array according to claim 5, characterized in that: Also includes: Cache pending compression requests to generate a request queue; Receiving the compression request includes: The compression request is read from the request queue.

7. The data storage method of software disk array according to claim 5, characterized in that: Also includes: Cache the compressed responses to be processed to generate a response queue; Receiving the compressed response, comprising: The compressed response is read from the response queue.

8. The data storage method of a software disk array according to any one of claims 1 to 7, characterized in that: Determining a target compression algorithm currently selected by the software disk array based on the configuration parameter and / or the compression attribute parameter includes: Obtaining a first identification code from the preset compression attribute parameters; The target compression algorithm currently selected by the software disk array is determined based on a preset corresponding relationship between the compression algorithm and the first identification code.

9. The data storage method of a software disk array according to any one of claims 1 to 7, characterized in that: Determining a target compression algorithm currently selected by the software disk array based on the configuration parameter and / or the compression attribute parameter includes: Obtaining a second identification code from the preset compression attribute parameters; Determining the data type to be stored in the current software disk array based on a preset corresponding relationship between the data type and the second identification code; The target compression algorithm selected by the current software disk array is determined according to the type of data to be stored in the current software disk array.

10. The data storage method of software disk array according to claim 9, characterized in that: Determining a target compression algorithm selected by the current software disk array according to the type of data to be stored in the current software disk array includes: Determine from the algorithm library an available compression algorithm that supports the data type to be stored in the current software disk array; A compression algorithm with the highest compression rate among several available compression algorithms whose compression efficiencies are greater than a first preset value is determined as a target compression algorithm.

11. The data storage method of a software disk array according to any one of claims 1 to 7, characterized in that: Determining a target compression algorithm currently selected by the software disk array based on the configuration parameter and / or the compression attribute parameter includes: Determine the array level of the current software disk array based on the configuration parameters; The target compression algorithm selected by the current software disk array is determined according to the array level of the current software disk array.

12. The data storage method of software disk array according to claim 11, characterized in that: Determining a target compression algorithm selected by the current software disk array according to the array level of the current software disk array includes: If the current software disk array is a disk striping array, the compression algorithm with the fastest compression speed in the algorithm library is determined as the target compression algorithm; If the current software disk array is a disk mirror array, the compression algorithm with the highest compression ratio in the algorithm library is determined as the target compression algorithm.

13. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program to implement the steps of the data storage method of the software disk array as claimed in any one of claims 1 to 12.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the data storage method of the software disk array according to any one of claims 1 to 12 are implemented.

15. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the data storage method of the software disk array according to any one of claims 1 to 12 are implemented.

Citation Information

Patent Citations

  • Broad-strip disk array based on asymmetric hybrid type disk image and storage method of broad-strip disk array

    CN104778018A

  • Implementation method of efficient storage

    CN105573677A

  • Storage system data compression method and system, apparatus and storage medium

    CN109032506A

  • Data compression method and device

    CN110430168A

  • Method, apparatus and computer program product for storing data

    CN111104052A