Data access control method and device

By generating and allocating multiple access processes in the storage controller to process data access requests of the storage device, the problem of low data access efficiency of storage devices is solved, and the data access rate and efficiency are improved.

CN119025032AActive Publication Date: 2024-11-26INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411046714.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-11-26
Estimated Expiration
2044-07-31

AI Technical Summary

Technical Problem

In the prior art, the data access efficiency of the storage device is low, resulting in a long execution time for the target data access process of the storage device and a low data access efficiency.

Method used

By configuring the data cache space in the storage controller, receiving the target access request, generating multiple access processes based on the access information, and allocating a data cache area for each process in the data cache space, and then calling the corresponding cache area to execute the storage device Data access operations compress the call delay between multiple access processes.

Benefits of technology

The time required to access the target data to the storage device is shortened, and the data access rate and efficiency are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119025032A_ABST
    Figure CN119025032A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data access control method and device.The method comprises the steps that a target access request is received, and the target access request is used for requesting to execute target data access on storage equipment; responding to the target access request, and generating a plurality of access processes for the target data access according to the access information of the target data access; distributing a data cache region for each access process in a data cache space according to process information corresponding to the access process; the corresponding data cache region is called through the access process to execute data access operation on the storage device, and the data access operation is used for accessing the target data in the storage device. Through the data access method and device, the problem that the data access efficiency of the storage device is low in the prior art is solved, and the effect of improving the data access efficiency of the storage device is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the computer field, and in particular, to a data access control method and device. Background Art

[0002] With the development of data storage technology, in order to optimize the data access rate of storage devices, the related technology configures a high-speed data cache device for the storage device. When the system performs IO (Input / Output) data transmission, the data is first written to the data cache device, and then the data is integrated in the data cache device before being transmitted to the storage device, rather than directly storing the data in the storage device. In this way, the system can directly return to the next operation after writing the data to the data cache device, without waiting for the data to be written to the storage device, which reduces the waiting time and improves the performance of the storage device. With the increase in the demand for data storage, the data access process to the storage device is relatively complicated. Sometimes, in order to complete the access to the target data in the storage device, it is necessary to call multiple data access processes in succession. Multiple access processes call the data cache device in turn to complete the data access to the storage device, thereby realizing the access operation to the target data of the storage device. As a result, the execution time of the access process to the target data of the storage device is long and the data access efficiency is low. Summary of the invention

[0003] The embodiments of the present application provide a data access control method and device to at least solve the problem of low data access efficiency to storage devices in the related art.

[0004] According to an embodiment of the present application, a data access control method is provided, which is applied to a storage controller, the storage controller is connected to a storage device, a data cache space is configured in the storage controller, and the data cache space is used to cache access data of the storage device, including: receiving a target access request, wherein the target access request is used to request to perform target data access on the storage device;

[0005] In response to the target access request, a plurality of access processes are generated for the target data access according to the access information of the target data access, wherein the access information is used to indicate the access mode of the target data access request to access the target data in the storage device, and the plurality of access processes are used to implement data access logic for accessing the target data in the storage device according to the storage mode of the storage device for data;

[0006] Allocating a data cache area for each access process in the data cache space according to process information corresponding to the access process, wherein the process information is used to indicate a data access mode of the corresponding access process to the storage device;

[0007] The access process calls the corresponding data cache area to perform a data access operation on the storage device, wherein the data access operation is used to access the target data in the storage device.

[0008] Optionally, generating a plurality of access processes for the target data access according to the access information of the target data access includes:

[0009] In a case where the access information is used to indicate that the target data access is to store the target data in the storage device, acquiring data storage information of the storage device, wherein the data storage information is used to indicate a storage method in which the storage device stores data;

[0010] A plurality of access processes are generated according to the data storage information for implementing writing of the target data into the storage device in accordance with the data storage manner indicated by the storage device.

[0011] Optionally, generating, according to the data storage information, a plurality of access processes for implementing writing of the target data into the storage device in accordance with the data storage mode indicated by the storage device, includes:

[0012] In a case where the data storage information is used to indicate that the storage device is a device that stores data based on verification information, constructing a write process for the target data according to the data storage information of the storage device, wherein the write process is used to indicate that the target data is written to the storage device according to the write mode corresponding to the data storage information, and the verification information is used to indicate data storage conditions in multiple storage spaces included in the storage device;

[0013] Extracting a first access operation, a second access operation, a third access operation, and a fourth access operation included in the write process, wherein the first access operation is used to read first verification information stored in the storage device from the storage device, the first verification information is used to indicate the data storage status in the multiple storage spaces included in the storage device before writing the data to be written into the storage device, the second access operation is used to read the data stored in the storage device before writing the data to be written, the third access operation is used to write second verification information into the storage device, the second verification information is used to indicate the data storage status in the multiple storage spaces included in the storage device after writing the data to be written, and the fourth access operation is used to write the data to be written into the storage device;

[0014] Create a first process for calling the data cache space to perform the first access operation on the storage device, create a second process for calling the data cache space to perform the second access operation on the storage device, create a third process for calling the data cache space to perform the third access operation on the storage device, and create a fourth process for calling the data cache space to perform the fourth access operation on the storage device, wherein the access process includes the first process, the second process, the third process and the fourth process.

[0015] Optionally, generating, according to the data storage information, a plurality of access processes for implementing writing of the target data into the storage device in accordance with the data storage mode indicated by the storage device, includes:

[0016] In a case where the data storage information indicates that the storage device is not a device for storing data based on verification information, splitting the target data into a plurality of sub-data, wherein the verification information is used to indicate data storage conditions in a plurality of storage spaces included in the storage device;

[0017] The access process for calling the data cache space to store the sub-data in the storage device is generated.

[0018] Optionally, allocating a data cache area for each access process in the data cache space according to the process information corresponding to the access process includes:

[0019] Classifying the plurality of access processes according to the data types of the data accessed by the access processes to obtain process categories included in the plurality of access processes;

[0020] In a case where the process category is used to indicate that the plurality of access processes are all processes for accessing the data included in the target data, the cache area of ​​the data cache space is evenly divided according to the number of the plurality of access processes to obtain the data cache area corresponding to each access process;

[0021] In a case where the process category is used to indicate that a plurality of access processes include processes of a first process type and processes of a second process type, a first cache area is allocated from the data cache space to the processes of the first process type, and a second cache area is allocated from the data cache space to the processes of the second process type, wherein the processes of the first process type are used to call the first cache area to access verification information in the storage device, and the verification information is used to indicate data storage conditions in a plurality of storage spaces included in the storage device, and the processes of the second process type are used to call the second cache area to access data in the storage device, and the data cache area includes the first cache area and the second cache area.

[0022] Optionally, the performing a data access operation on the storage device by calling the corresponding data cache area through the access process includes:

[0023] In the case where the multiple access processes include a verification information access process and a data access process, initial verification information is read from the storage device through the verification information access process and stored in a first cache area, and initial data is read from the storage device through the data access process and stored in a second cache area, wherein the verification information access process is used to perform a verification information access operation on the storage device, and the data access process is used to perform a data access operation on the storage device, and the initial verification information is used to indicate the data storage status in the multiple data storage spaces included in the storage device before the target data is accessed on the storage device, the first cache area is a cache area allocated in the data cache space for the verification information access process, and the second cache area is a cache area allocated in the data cache space for the data access process, and the data cache area includes the first cache area and the second cache area;

[0024] generating target verification information of the storage device according to the initial data, the initial verification information and the target data, wherein the target verification information is used to indicate the data storage status in the multiple storage spaces included in the storage device after the storage device completes access to the target data;

[0025] Cache the target verification information into the first cache area, and cache the target data into the second cache area;

[0026] The target verification information cached in the first cache area is stored in the storage device through the verification information access process, and the target data cached in the second cache area is written to the storage device through the data access process.

[0027] Optionally, the generating target verification information of the storage device according to the initial data, the initial verification information and the target data includes:

[0028] Creating a third cache area in the data cache space for running a target program, wherein the target program records a calculation logic for calculating verification information;

[0029] storing the target program in the third buffer area;

[0030] The target program is called in the third buffer area to calculate the initial data, the initial verification information and the target data to obtain the target verification information.

[0031] According to another embodiment of the present application, there is provided a data access control device, which is applied to a storage controller, the storage controller is connected to a storage device, a data cache space is configured in the storage controller, and the data cache space is used to cache access data of the storage device, including: a receiving module, which is used to receive a target access request, wherein the target access request is used to request to perform target data access on the storage device;

[0032] a generating module, configured to respond to the target access request and generate a plurality of access processes for the target data access according to the access information of the target data access, wherein the access information is used to indicate the access mode of the target data access request to access the target data in the storage device, and the plurality of access processes are used to implement data access logic for accessing the target data in the storage device according to the storage mode of the storage device for data;

[0033] an allocation module, configured to allocate a data cache area in the data cache space for each access process according to process information corresponding to the access process, wherein the process information is used to indicate a data access mode of the corresponding access process to the storage device;

[0034] An execution module is used to perform a data access operation on the storage device by calling the corresponding data cache area through the access process, wherein the data access operation is used to access the target data in the storage device.

[0035] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.

[0036] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0037] Through this application, multiple access processes are generated for target data access according to the access information of the target data access, and the multiple access processes are used to implement the data access logic of accessing the target data in the storage device according to the data storage method of the storage device, and then the corresponding data cache area is allocated to each access process in the data cache space according to the process information corresponding to the access process, so that the corresponding cache area can be called by the access process to perform data access operations on the storage device, and the call delay of calling the data cache space between multiple access processes is compressed, and then the time required for accessing the target data of the storage device is shortened, thereby improving the data access rate of the storage device. The problem of low data access efficiency of the storage device in the related art can be solved, and the effect of improving the data access efficiency of the storage device can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 It is a hardware structure block diagram of a server device of a data access control method according to an embodiment of the present application;

[0039] Figure 2 is a flow chart of a method for controlling access to data according to an embodiment of the present application;

[0040] Figure 3 This is an optional data access schematic according to an embodiment of the present application. Figure 1 ;

[0041] Figure 4 This is an optional data access schematic according to an embodiment of the present application. Figure 2 ;

[0042] Figure 5 is an optional data access flow chart according to an embodiment of the present application;

[0043] Figure 6 It is a structural block diagram of a data access control device according to an embodiment of the present application. DETAILED DESCRIPTION

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

[0045] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0046] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 1 is a hardware structure block diagram of a server device of a data access control method according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0047] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the data access control method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0048] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0049] In this embodiment, a data access control method is provided. Figure 21 is a flow chart of a data access control method according to an embodiment of the present application, which is applied to a storage controller, the storage controller is connected to a storage device, and a data cache space is configured in the storage controller, and the data cache space is used to cache access data of the storage device, such as Figure 2 As shown, the process includes the following steps:

[0050] Step S202, receiving a target access request, wherein the target access request is used to request to perform target data access on the storage device;

[0051] Step S204, in response to the target access request, generating a plurality of access processes for the target data access according to the access information of the target data access, wherein the access information is used to indicate the access method of the target data access request to access the target data in the storage device, and the plurality of access processes are used to implement data access logic for accessing the target data in the storage device according to the storage method of the storage device for data;

[0052] Step S206, allocating a data cache area in the data cache space for each access process according to process information corresponding to the access process, wherein the process information is used to indicate a data access mode of the corresponding access process to the storage device;

[0053] Step 5208: Call the corresponding data cache area through the access process to perform a data access operation on the storage device, wherein the data access operation is used to access the target data in the storage device.

[0054] Through the above steps, multiple access processes are generated for target data access according to the access information of the target data access, and the multiple access processes are used to implement the data access logic of accessing the target data in the storage device according to the data storage method of the storage device, and then the corresponding data cache area is allocated to each access process in the data cache space according to the process information corresponding to the access process, so that the corresponding cache area can be called by the access process to perform data access operations on the storage device, and the call delay of calling the data cache space between multiple access processes is compressed, and then the time required for accessing the target data of the storage device is shortened, thereby improving the data access rate of the storage device. The problem of low data access efficiency of the storage device in the related technology can be solved, and the effect of improving the data access efficiency of the storage device can be achieved.

[0055] In the above embodiments, the storage device is a device for storing data, and the storage device may be, but is not limited to, a RAID (Redundant Arrays of Independent Disks) composed of one or more storage disks.

[0056] Optionally, in an embodiment of the present application, the data cache space in the storage controller can be, but is not limited to, a place where the storage device exchanges data with an external bus. The storage control line transmits the data to the cache, and then the cache exchanges data with the external data bus. The data cache space can be a storage chip on the storage controller, which has an extremely fast access speed compared to the hard disk platter on the storage device. The main function of the storage controller is to speed up the reading and writing speed of data, improve the efficiency of the storage device, avoid unnecessary waiting time, reduce the delay caused by the operation, improve system performance and obtain better response time.

[0057] In the embodiment provided in the above step S202, the target data access may include but is not limited to writing the target data into the storage device or reading the target data from the storage device, and this solution does not limit this.

[0058] Optionally, in an embodiment of the present application, the storage device may be, but is not limited to, a disk array composed of multiple disks, the disk array may be, but is not limited to, an independent redundant disk array, the storage device may be, but is not limited to, configured to store data in a storage method based on verification information, or in a storage method not based on verification. When a data storage method based on verification information is adopted, the multiple disks included in the storage device store data and verification information of the multiple disks, the verification information is obtained by calculating and encrypting the data stored in the storage device, the verification information may be, but is not limited to, parity data, and the data storage method based on verification information may be, but is not limited to, RAID5 and RAID6, involving a process of writing parity data; when receiving a write IO command, it first reads the data D0 before modification in the data block of the address to be entered, and then reads the verification information P0 in the current stripe, and then calculates the parity information P1 of the stripe after the data is written based on the three groups of data D0, P0, and D1, and finally issues two write IO commands, one to write D1 and the other to write the parity information P1. It can be seen that in actual operation, the array needs to read, read, write, and write a total of 4 IOs to complete a write IO operation. Similarly, RAID6 divides a command into three reads and three writes, a total of 6 IO commands to complete.

[0059] In the embodiment provided in the above step S204, the multiple access processes may be, but are not limited to, processes for implementing data access operations at different access stages of target data access. Therefore, the method of generating multiple access processes for target data access may be, but is not limited to, by parsing the access stages required for target data access, and then configuring access processes for implementing access operations at the access stages. For example, when the storage device adopts a data storage method based on parity data, the target data access is to store the target data in the storage device. In order to complete the storage of the target data in the storage device, it is necessary to access the parity data in the storage device and access the storage data stored in the storage device. Therefore, the target data access can be converted into a parity data access process and a storage data access process. Further, the parity data access process can be configured as a parity data reading process and a parity data writing process. The parity data reading process is used to read parity data from the storage device and store it in the data cache space, and the parity data writing process is used to write the parity data stored in the data cache space to the storage device; similarly, the storage data access process can be configured as a data reading process and a data writing process, and this scheme does not limit this.

[0060] Optionally, in an embodiment of the present application, the multiple access processes may also be access processes for multiple sub-data included in the target data required to access the target data, and the method of generating multiple access processes for the target data access may be to split the target data process to obtain multiple sub-data, and configure each sub-data with a corresponding access process, and the access process is used to implement the access operation on the corresponding sub-data in the data cache space. This scheme does not limit this.

[0061] In the embodiment provided in the above step S206, each access process is allocated a corresponding data cache area in the data cache space. During the allocation, the data cache area and the access process can be in a one-to-one correspondence, that is, one access process uniquely corresponds to one data cache area. At the same time, multiple access processes with the same data access method to the storage device can also be allocated to share a data cache space, which is not limited in this article.

[0062] Optionally, in an embodiment of the present application, the process information may include, but is not limited to, information indicating the type of data that the access process needs to access, or may also be information indicating the type of operation performed by the access process on the data, such as allocating the same data cache area to access processes with the same type of data that the access process needs to access, or allocating the same data cache area to access processes with the same type of access operation performed on the data. This solution does not limit this.

[0063] In the embodiment provided in the above step S208, the data access operation performed by the access process calling the data cache area may include but is not limited to writing the content stored in the data cache to the storage device, or reading the content stored in the storage device from the storage device and caching it in the data cache area. This solution does not limit this.

[0064] As an optional embodiment, converting the target data access into multiple access processes according to the access information of the target data access includes:

[0065] In a case where the access information is used to indicate that the target data access is to store the target data in the storage device, acquiring data storage information of the storage device, wherein the data storage information is used to indicate a storage method in which the storage device stores data;

[0066] A plurality of access processes are generated according to the data storage information for implementing writing of the target data into the storage device in accordance with the data storage manner indicated by the storage device.

[0067] Optionally, in an embodiment of the present application, if the storage device has different data storage methods, the data access process during process data access is different, and therefore, the method of generating an access process for target data access is also different. For example, when the data storage information indicates that the storage device adopts a data storage method based on verification information, at this time, in order to write the target data into the target memory, it is necessary to first read the current first verification information of the storage device from the storage device, and then read the first data currently stored in the storage device from the storage device. The process generates second verification information based on the first verification information, the first data and the target data, and then stores the second verification information to the storage device and stores the target data to the storage device. Therefore, the target data access can be converted into a first process for reading the first verification information, a second process for reading the first data, a third process for writing the second verification information and a fourth process for writing the target data. Then, the processes can be classified according to the execution sequence of the first process, the second process, the third process and the fourth process, so that the first process and the second process are configured to be executed in parallel, and the third process and the fourth process are configured to be executed in parallel, thereby compressing the time required for the access operation to be executed. Further, In order to further speed up the execution time of the data access operation, each process can also be split into multiple sub-processes, that is, the first verification information is split into multiple first sub-verification information according to the size of the first verification information, and a first sub-process is configured for each first sub-verification information, and the first data is split into multiple first sub-data according to the data information of the first data (for example, the process is split based on the data size of the first data, and the first data is split based on the storage position of the first data in the storage device, and the data stored in the same storage position is determined as a first sub-data), and then a second sub-process is assigned to each first sub-data. Similarly, the third process can be split into multiple third sub-processes, and the fourth process can be split into multiple fourth sub-processes, and then multiple first sub-processes and multiple second sub-processes are determined to be executed in parallel, and multiple third sub-processes and multiple fourth sub-processes are configured as processes executed in parallel. Therefore, the data storage space can be split into multiple data storage areas according to the memory occupancy of the first sub-process and the second sub-process, and each data storage area uniquely corresponds to a sub-process, and after the first process and the second process are executed, the data cache area is split into multiple data storage areas again according to the memory occupancy of the third sub-process and the fourth sub-process. Through the above content, by splitting the process and executing the sub-processes in parallel according to the execution sequence, the execution time of target data access can be compressed to the greatest extent and the data access rate can be improved.

[0068] Through the above content, when the target data needs to be written to the storage device, by obtaining the data storage information of the storage device, an access process is generated for the target data access according to the storage method of the storage device storing data, thereby improving the accuracy of the generated access process and improving the data access efficiency to the storage device.

[0069] As an optional embodiment, the generating, according to the data storage information, a plurality of access processes for implementing writing the target data into the storage device in accordance with the data storage mode indicated by the storage device, includes:

[0070] In a case where the data storage information is used to indicate that the storage device is a device that stores data based on verification information, constructing a write process for the target data according to the data storage information of the storage device, wherein the write process is used to indicate that the target data is written to the storage device according to the write mode corresponding to the data storage information, and the verification information is used to indicate data storage conditions in multiple storage spaces included in the storage device;

[0071] Extracting a first access operation, a second access operation, a third access operation, and a fourth access operation included in the write process, wherein the first access operation is used to read first verification information stored in the storage device from the storage device, the first verification information is used to indicate the data storage status in the multiple storage spaces included in the storage device before writing the data to be written into the storage device, the second access operation is used to read the data stored in the storage device before writing the data to be written, the third access operation is used to write second verification information into the storage device, the second verification information is used to indicate the data storage status in the multiple storage spaces included in the storage device after writing the data to be written, and the fourth access operation is used to write the data to be written into the storage device;

[0072] Create a first process for calling the data cache space to perform the first access operation on the storage device, create a second process for calling the data cache space to perform the second access operation on the storage device, create a third process for calling the data cache space to perform the third access operation on the storage device, and create a fourth process for calling the data cache space to perform the fourth access operation on the storage device, wherein the access process includes the first process, the second process, the third process and the fourth process.

[0073] Through the above content, by constructing a write process for writing target data in a data storage device based on verification information, the data access operations at various stages required to write the target data to the storage device in a storage method based on verification information are determined according to the write process, and then an access process for calling the data cache space is created for each data access operation, thereby determining that the access process can fully cover the required data access operations in the data storage scenario based on verification information, and then an access process for calling the data cache space is created for each access operation, thereby realizing the allocation of one data cache space to multiple access processes for parallel calling, thereby improving the utilization rate of the cache in the data cache space while speeding up the execution speed of data access operations.

[0074] As an optional embodiment, the generating, according to the data storage information, a plurality of access processes for implementing writing the target data into the storage device in accordance with the data storage mode indicated by the storage device, includes:

[0075] In a case where the data storage information indicates that the storage device is not a device for storing data based on verification information, splitting the target data into a plurality of sub-data, wherein the verification information is used to indicate data storage conditions in a plurality of storage spaces included in the storage device;

[0076] The access process for calling the data cache space to store the sub-data in the storage device is generated.

[0077] Optionally, in an embodiment of the present application, the target data can be split into multiple sub-data by splitting the target data into multiple sub-data with a granularity of the target data according to the granularity of the target data, or it can also be divided according to the storage location of the data included in the target data in the storage device, such as determining multiple data segments stored on the same disk as one sub-data, and this scheme does not limit this.

[0078] Through the above content, when the storage device is not a device that stores data based on verification information, the target data can be split into multiple sub-data, so that the original sequential writing operation of multiple sub-data to the storage device is converted into parallel writing of multiple sub-data to the storage device, thereby shortening the writing time of the target data and improving the data writing efficiency.

[0079] As an optional embodiment, allocating a data cache area for each access process in the data cache space according to the process information corresponding to the access process includes:

[0080] Classifying the plurality of access processes according to the data types of the data accessed by the access processes to obtain process categories included in the plurality of access processes;

[0081] In a case where the process category is used to indicate that the plurality of access processes are all processes for accessing the data included in the target data, the cache area of ​​the data cache space is evenly divided according to the number of the plurality of access processes to obtain the data cache area corresponding to each access process;

[0082] In a case where the process category is used to indicate that a plurality of access processes include processes of a first process type and processes of a second process type, a first cache area is allocated from the data cache space to the processes of the first process type, and a second cache area is allocated from the data cache space to the processes of the second process type, wherein the processes of the first process type are used to call the first cache area to access verification information in the storage device, and the verification information is used to indicate data storage conditions in a plurality of storage spaces included in the storage device, and the processes of the second process type are used to call the second cache area to access data in the storage device, and the data cache area includes the first cache area and the second cache area.

[0083] Optionally, in an embodiment of the present application, when the process category indicates that multiple access processes access the data included in the target data, the multiple data access processes are access processes that can be executed in parallel, so a cache area can be allocated to each access process, thereby realizing parallel execution of multiple access processes.

[0084] Optionally, in an embodiment of the present application, the cache sizes of the first cache area and the second cache can be allocated according to the data cache requirements of a process of the first process type and the data cache requirements of the second process, that is, the first cache area is allocated according to the data cache requirements of the first process, and the second cache area is allocated according to the data cache requirements of the second process, thereby avoiding the waste of data cache space resources due to the allocated cache area being too large, and the saved cache space can be used to execute other data access situations, thereby improving the corresponding efficiency of data access requests.

[0085] Through the above content, by classifying the data type processes accessed by the access processes, the data accessing the same data type can be classified into one category. Since the access to the same type of data on the storage device is not executed in parallel, the access processes are classified according to the data type and the processes of the same type are assigned a data cache area, thereby improving the utilization rate of the data cache area.

[0086] As an optional embodiment, the performing a data access operation on the storage device by calling the corresponding data cache area through the access process includes:

[0087] In the case where the multiple access processes include a verification information access process and a data access process, initial verification information is read from the storage device through the verification information access process and stored in a first cache area, and initial data is read from the storage device through the data access process and stored in a second cache area, wherein the verification information access process is used to perform a verification information access operation on the storage device, and the data access process is used to perform a data access operation on the storage device, and the initial verification information is used to indicate the data storage status in the multiple data storage spaces included in the storage device before the target data is accessed on the storage device, the first cache area is a cache area allocated in the data cache space for the verification information access process, and the second cache area is a cache area allocated in the data cache space for the data access process, and the data cache area includes the first cache area and the second cache area;

[0088] generating target verification information of the storage device according to the initial data, the initial verification information and the target data, wherein the target verification information is used to indicate the data storage status in the multiple storage spaces included in the storage device after the storage device completes access to the target data;

[0089] Cache the target verification information into the first cache area, and cache the target data into the second cache area;

[0090] The target verification information cached in the first cache area is stored in the storage device through the verification information access process, and the target data cached in the second cache area is written to the storage device through the data access process.

[0091] Optionally, in an embodiment of the present application, the target verification information can be obtained by calculating the initial data, initial verification information and target data by the storage controller, or it can be obtained by allocating a cache area in the data cache space for running the verification information calculation program, and sending the verification information calculation program to the cache area, controlling the verification information calculation program to run in the cache area, thereby obtaining the calculated target verification information.

[0092] Optionally, in an embodiment of the present application, in order to avoid repeated calls to the same cache area by access processes with different running times, a target identifier can be configured for the cache area, and the target identifier is used to characterize the occupancy status of whether the cache area is occupied. Then, when it is detected that the target identifier of the cache area is the first identifier, information or data can be written to the cache area and wait until it is written to the storage device. When the data or information is extracted from the cache area, the cache area is in an unoccupied state, and the next access process can call the cache area.

[0093] Through the above content, by using the verification information access process to call the first cache area to alternately perform the operations of reading verification information from the storage device and writing verification information to the storage device, and the data access process to call the second cache area to alternately perform the operations of reading data from the storage device and writing data to the storage device, the occupancy rate of the cache area is improved. And by executing the verification information access process and the data access process in parallel, the access time of the target data access is compressed, and the data access efficiency is improved.

[0094] As an optional embodiment, generating target verification information of the storage device according to the initial data, the initial verification information and the target data includes:

[0095] Creating a third cache area in the data cache space for running a target program, wherein the target program records a calculation logic for calculating verification information;

[0096] storing the target program in the third buffer area;

[0097] The target program is called in the third buffer area to calculate the initial data, the initial verification information and the target data to obtain the target verification information.

[0098] In order to improve the access efficiency of storage devices to data, the present application divides the data cache space of the storage controller into multiple cache areas, so that each access process can perform corresponding data access operations on the storage device by calling the corresponding cache area. In this process, the access process's calls to the cache area can be executed in parallel, thereby speeding up the execution rate of the access operation and avoiding the problem of low data access operation execution rate due to the access process waiting for the calling permission of the cache space when calling the cache space as a whole in the related technology, as well as the problem of waste of cache space resources. The embodiment of the present application takes the cache space (cache) being divided into two cache areas as an example (i.e., a dual-core cache), that is, the cache space is allocated to cache area A and cache area B, and a flag bit is set for cache areas A and B respectively, and the problem of data conflict is avoided by whether the flag bit is in place.

[0099] The IO data mode of the storage device is divided into two cases, namely, the case where XOR data verification exists in RAID5 and RAID6, and the case where there is no data verification.

[0100] For the case where the storage device needs to store data through data verification, Figure 3 This is an optional data access schematic according to an embodiment of the present application. Figure 1 ,like Figure 3As shown, the storage control device includes a host and a cache space, and the above data access control method can be configured but not limited to running on the host. At this time, the HOST receives a data write request (i.e., a target access request) to write data D1 to the storage device. First, cache area A reads the data D0 before modification in the data block of the address to be written once, and the HOST simultaneously determines whether the flag bit of cache area B is '1'. If not, cache area B already has data to execute, which is in an inoperable state and needs to wait for the next timing to arrive; if it is '1', it is an operable state, and cache area B is used to read the check information P0 in the current stripe at the same time, and then the parity check information P1 of the stripe after the data is written is calculated based on the three groups of data D0, P0, and D1, and the calculated P1 is placed in cache area B; the flag bits of cache areas A and B are determined by timing signals. If both are in an operable state, the data D1 is written to the hard disk through cache area A, and the check data P1 is written to the hard disk by cache area B. It can be concluded that in actual operations, I / O data includes reading from cache A, reading from cache B, writing to cache A, and writing to cache B. Each cache is read and written twice, performing two I / O operations.

[0101] For storage devices that do not require data verification for data storage, Figure 4 This is an optional data access schematic according to an embodiment of the present application. Figure 2 ,like Figure 4 As shown, the HOST will implement the I / O processing method of parallel input and output through the dual-way buffer area, that is, the buffer exchange method. The HOST writes the I / O into buffer A and buffer B respectively, generating write times TA and TB; then buffer A and buffer B write to the hard disk respectively, generating write time T M and T N .

[0102] Figure 5 is an optional data access flow chart according to an embodiment of the present application, such as Figure 5 As shown, at least the following steps are included:

[0103] S501, when the server needs to perform an I / O write operation, it sends a target operation request to the storage controller (needs to write a 4k audio file to strip 3 of the RAID5 array, and the strip size is 128k by default).

[0104] S502: The storage controller determines whether there is a data verification situation.

[0105] S503, determine whether the flag bits of cache A and cache B are "1" and whether they are in an operable state.

[0106] S504, if it is "1", it is in operational state, the RAID card uses cache A to obtain the existing data (D0) in strip 3 of the RAID5 array; and uses buffer B to read the parity information (P0) in the current stripe.

[0107] S505, calculating new parity information of the stripe according to the 4k audio file, the information in the read current stripe and the parity information.

[0108] S506, buffer area A writes the 4k audio file into stripe 3, and buffer area B writes the generated new parity information into stripe 3.

[0109] S507, cache A is inoperable, and step S503 is executed after waiting for a clock signal.

[0110] S508, when verification information is not required and the target operation request needs to write a 4k audio file to stripe 1 of the RAID1 array of two disks (disk 0 and disk 1), the strip size is 128k by default, the host writes the 4k audio file to cache A and copies the data of cache A to cache B.

[0111] S509, cache area A writes the 4k audio file to stripe 1 of disk 0 in the RAID1 array, and cache area B writes the 4k audio file to stripe 1 of disk 1.

[0112] S510, completing a data I / O.

[0113] Through the above content, by introducing dual-core cache, the status of cache is determined by dynamically identifying the flag bit of the clock signal, thereby improving the performance of the storage link. It has a high improvement effect on the overall performance of the server storage link and enhances the competitiveness of the product.

[0114] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0115] In this embodiment, a data access control device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0116] Figure 6 1 is a structural block diagram of a data access control device according to an embodiment of the present application, which is applied to a storage controller, the storage controller is connected to a storage device, and a data cache space is configured in the storage controller, and the data cache space is used to cache access data of the storage device, such as Figure 6 As shown, the apparatus includes: a receiving module, configured to receive a target access request, wherein the target access request is used to request to perform target data access on the storage device;

[0117] a generating module, configured to respond to the target access request and generate a plurality of access processes for the target data access according to the access information of the target data access, wherein the access information is used to indicate the access mode of the target data access request to access the target data in the storage device, and the plurality of access processes are used to implement data access logic for accessing the target data in the storage device according to the storage mode of the storage device for data;

[0118] an allocation module, configured to allocate a data cache area in the data cache space for each access process according to process information corresponding to the access process, wherein the process information is used to indicate a data access mode of the corresponding access process to the storage device;

[0119] An execution module is used to perform a data access operation on the storage device by calling the corresponding data cache area through the access process, wherein the data access operation is used to access the target data in the storage device.

[0120] Through the above content, multiple access processes are generated for target data access according to the access information of the target data access, and the multiple access processes are used to implement the data access logic of accessing the target data in the storage device according to the data storage method of the storage device, and then the corresponding data cache area is allocated to each access process in the data cache space according to the process information corresponding to the access process, so that the corresponding cache area can be called by the access process to perform data access operations on the storage device, and the call delay of calling the data cache space between multiple access processes is compressed, and then the time required for accessing the target data of the storage device is shortened, thereby improving the data access rate of the storage device. The problem of low data access efficiency of the storage device in the related technology can be solved, and the effect of improving the data access efficiency of the storage device can be achieved.

[0121] Optionally, the generating module includes:

[0122] an acquiring unit, configured to acquire data storage information of the storage device when the access information indicates that the target data access is to store the target data in the storage device, wherein the data storage information indicates a storage method in which the storage device stores data;

[0123] A generating unit is used to generate, according to the data storage information, a plurality of access processes for implementing writing the target data into the storage device in accordance with the data storage method indicated by the storage device.

[0124] Optionally, the generating unit is used to:

[0125] In a case where the data storage information is used to indicate that the storage device is a device that stores data based on verification information, constructing a write process for the target data according to the data storage information of the storage device, wherein the write process is used to indicate that the target data is written to the storage device according to the write mode corresponding to the data storage information, and the verification information is used to indicate data storage conditions in multiple storage spaces included in the storage device;

[0126] Extracting a first access operation, a second access operation, a third access operation, and a fourth access operation included in the write process, wherein the first access operation is used to read first verification information stored in the storage device from the storage device, the first verification information is used to indicate the data storage status in the multiple storage spaces included in the storage device before writing the data to be written into the storage device, the second access operation is used to read the data stored in the storage device before writing the data to be written, the third access operation is used to write second verification information into the storage device, the second verification information is used to indicate the data storage status in the multiple storage spaces included in the storage device after writing the data to be written, and the fourth access operation is used to write the data to be written into the storage device;

[0127] Create a first process for calling the data cache space to perform the first access operation on the storage device, create a second process for calling the data cache space to perform the second access operation on the storage device, create a third process for calling the data cache space to perform the third access operation on the storage device, and create a fourth process for calling the data cache space to perform the fourth access operation on the storage device, wherein the access process includes the first process, the second process, the third process and the fourth process.

[0128] Optionally, the generating unit is used to:

[0129] In a case where the data storage information indicates that the storage device is not a device for storing data based on verification information, splitting the target data into a plurality of sub-data, wherein the verification information is used to indicate data storage conditions in a plurality of storage spaces included in the storage device;

[0130] The access process for calling the data cache space to store the sub-data in the storage device is generated.

[0131] Optionally, the allocation module includes:

[0132] a classification unit, configured to classify the plurality of access processes according to data types of the data accessed by the access processes, so as to obtain process categories included in the plurality of access processes;

[0133] a processing unit, configured to equally divide the cache area of ​​the data cache space according to the number of the plurality of access processes, to obtain the data cache area corresponding to each access process, when the process category is used to indicate that the plurality of access processes are all processes for accessing the data included in the target data;

[0134] An allocation unit is used to allocate a first cache area from the data cache space to a process of the first process type, and to allocate a second cache area from the data cache space to a process of the second process type, when the process category is used to indicate that a plurality of access processes include processes of a first process type and processes of a second process type, wherein the process of the first process type is used to call the first cache area to access verification information in the storage device, and the verification information is used to indicate data storage conditions in a plurality of storage spaces included in the storage device, and the process of the second process type is used to call the second cache area to access data in the storage device, and the data cache area includes the first cache area and the second cache area.

[0135] Optionally, the execution module includes:

[0136] a reading unit, configured to read initial verification information from the storage device through the verification information access process and store it in a first cache area, and to read initial data from the storage device through the data access process and store it in a second cache area, in the case where the multiple access processes include a verification information access process and a data access process, wherein the verification information access process is used to perform a verification information access operation on the storage device, and the data access process is used to perform a data access operation on the storage device, and the initial verification information is used to indicate the data storage status in the multiple data storage spaces included in the storage device before the target data is accessed on the storage device, the first cache area is a cache area allocated in the data cache space for the verification information access process, and the second cache area is a cache area allocated in the data cache space for the data access process, and the data cache area includes the first cache area and the second cache area;

[0137] a generating unit, configured to generate target verification information of the storage device according to the initial data, the initial verification information and the target data, wherein the target verification information is used to indicate the data storage status in the plurality of storage spaces included in the storage device after the storage device completes access to the target data;

[0138] a cache unit, configured to cache the target verification information into the first cache area, and cache the target data into the second cache area;

[0139] A processing unit is used to store the target verification information cached in the first cache area into the storage device through the verification information access process, and to write the target data cached in the second cache area into the storage device through the data access process.

[0140] Optionally, the generating unit is used to:

[0141] Creating a third cache area in the data cache space for running a target program, wherein the target program records a calculation logic for calculating verification information;

[0142] storing the target program in the third buffer area;

[0143] The target program is called in the third buffer area to calculate the initial data, the initial verification information and the target data to obtain the target verification information.

[0144] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0145] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.

[0146] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0147] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0148] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0149] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0150] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0151] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A data access control method, characterized in that: Applied to a storage controller, the storage controller is connected to a storage device, the storage controller is configured with a data cache space, the data cache space is used to cache access data of the storage device, the method comprises: receiving a target access request, wherein the target access request is used to request to perform target data access on the storage device; in response to the target access request, generating a plurality of access processes for the target data access according to access information of the target data access, wherein the access information is used to indicate an access method for the target data access request to access the target data in the storage device, and the plurality of access processes are used to implement data access logic for accessing the target data in the storage device according to the storage method for storing data by the storage device; A data cache area is allocated in the data cache space for each access process according to process information corresponding to the access process, wherein the process information is used to indicate the data access method of the corresponding access process to the storage device; and a data access operation is performed on the storage device by calling the corresponding data cache area through the access process, wherein the data access operation is used to access the target data in the storage device.

2. The method according to claim 1, characterized in that Generating a plurality of access processes for the target data access according to the access information of the target data access includes: In a case where the access information is used to indicate that the target data access is to store the target data in the storage device, acquiring data storage information of the storage device, wherein the data storage information is used to indicate a storage method in which the storage device stores data; A plurality of access processes are generated according to the data storage information for implementing writing of the target data into the storage device in accordance with the data storage manner indicated by the storage device.

3. The method according to claim 2, characterized in that The generating, according to the data storage information, a plurality of access processes for implementing writing the target data into the storage device in accordance with the data storage mode indicated by the storage device comprises: In a case where the data storage information is used to indicate that the storage device is a device that stores data based on verification information, constructing a write process for the target data according to the data storage information of the storage device, wherein the write process is used to indicate that the target data is written to the storage device according to the write mode corresponding to the data storage information, and the verification information is used to indicate data storage conditions in multiple storage spaces included in the storage device; Extracting a first access operation, a second access operation, a third access operation, and a fourth access operation included in the write process, wherein the first access operation is used to read first verification information stored in the storage device from the storage device, the first verification information is used to indicate the data storage status in the multiple storage spaces included in the storage device before writing the data to be written into the storage device, the second access operation is used to read the data stored in the storage device before writing the data to be written, the third access operation is used to write second verification information into the storage device, the second verification information is used to indicate the data storage status in the multiple storage spaces included in the storage device after writing the data to be written, and the fourth access operation is used to write the data to be written into the storage device; Create a first process for calling the data cache space to perform the first access operation on the storage device, create a second process for calling the data cache space to perform the second access operation on the storage device, create a third process for calling the data cache space to perform the third access operation on the storage device, and create a fourth process for calling the data cache space to perform the fourth access operation on the storage device, wherein the access process includes the first process, the second process, the third process and the fourth process.

4. The method according to claim 2, characterized in that: The generating, according to the data storage information, a plurality of access processes for implementing writing the target data into the storage device in accordance with the data storage mode indicated by the storage device comprises: In a case where the data storage information indicates that the storage device is not a device for storing data based on verification information, splitting the target data into a plurality of sub-data, wherein the verification information is used to indicate data storage conditions in a plurality of storage spaces included in the storage device; The access process for calling the data cache space to store the sub-data in the storage device is generated.

5. The method according to claim 1, characterized in that The allocating a data cache area for each access process in the data cache space according to the process information corresponding to the access process comprises: Classifying the plurality of access processes according to the data types of the data accessed by the access processes to obtain the process categories included in the plurality of access processes; In a case where the process category is used to indicate that the plurality of access processes are all processes for accessing the data included in the target data, the cache area of ​​the data cache space is evenly divided according to the number of the plurality of access processes to obtain the data cache area corresponding to each access process; In a case where the process category is used to indicate that a plurality of access processes include processes of a first process type and processes of a second process type, a first cache area is allocated from the data cache space to the processes of the first process type, and a second cache area is allocated from the data cache space to the processes of the second process type, wherein the processes of the first process type are used to call the first cache area to access verification information in the storage device, and the verification information is used to indicate data storage conditions in a plurality of storage spaces included in the storage device, and the processes of the second process type are used to call the second cache area to access data in the storage device, and the data cache area includes the first cache area and the second cache area.

6. The method according to claim 1, characterized in that The performing a data access operation on the storage device by calling the corresponding data cache area through the access process includes: In the case where the multiple access processes include a verification information access process and a data access process, initial verification information is read from the storage device through the verification information access process and stored in a first cache area, and initial data is read from the storage device through the data access process and stored in a second cache area, wherein the verification information access process is used to perform a verification information access operation on the storage device, and the data access process is used to perform a data access operation on the storage device, and the initial verification information is used to indicate the data storage status in the multiple data storage spaces included in the storage device before the target data is accessed on the storage device, the first cache area is a cache area allocated in the data cache space for the verification information access process, and the second cache area is a cache area allocated in the data cache space for the data access process, and the data cache area includes the first cache area and the second cache area; generating target verification information of the storage device according to the initial data, the initial verification information and the target data, wherein the target verification information is used to indicate the data storage status in the multiple storage spaces included in the storage device after the storage device completes access to the target data; Cache the target verification information in the first cache area, and cache the target data in the second cache area; The target verification information cached in the first cache area is stored in the storage device through the verification information access process, and the target data cached in the second cache area is written to the storage device through the data access process.

7. The method according to claim 6, characterized in that The generating target verification information of the storage device according to the initial data, the initial verification information and the target data comprises: Creating a third cache area in the data cache space for running a target program, wherein the target program records a calculation logic for calculating verification information; storing the target program in the third buffer area; The target program is called in the third buffer area to calculate the initial data, the initial verification information and the target data to obtain the target verification information.

8. A data access control device, characterized in that: Applied to a storage controller, the storage controller is connected to a storage device, the storage controller is configured with a data cache space, the data cache space is used to cache access data of the storage device, the device comprises: A receiving module, configured to receive a target access request, wherein the target access request is used to request to perform target data access on the storage device; a generating module, configured to respond to the target access request and generate a plurality of access processes for the target data access according to the access information of the target data access, wherein the access information is used to indicate the access mode of the target data access request to access the target data in the storage device, and the plurality of access processes are used to implement data access logic for accessing the target data in the storage device according to the storage mode of the storage device for data; an allocation module, configured to allocate a data cache area in the data cache space for each access process according to process information corresponding to the access process, wherein the process information is used to indicate a data access mode of the corresponding access process to the storage device; An execution module is used to perform a data access operation on the storage device by calling the corresponding data cache area through the access process, wherein the data access operation is used to access the target data in the storage device.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 7 when executed by a processor.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Method and device for implementing data access

    CN102541773A

  • Memory pool management

    CN116069240A

  • Processor, memory controller, system-on-chip chip and data prefetching method

    CN116069719A

  • Data storage method and related device

    CN116560560A

  • Single-sided distributed cache system

    US9164702B1