Data access method, computing device, and computer storage medium
By generating and applying access policies for storage devices, and matching the corresponding access methods according to different address information, the problem of low data access performance of storage devices is solved, and more efficient data access is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ALIBABA (CHINA) CO LTD
- Filing Date
- 2022-11-15
- Publication Date
- 2026-07-31
AI Technical Summary
The data access performance of existing storage devices is low and cannot meet user needs because the same and fixed access method is used for data in different partitions.
By obtaining the spatial layout information of the file system corresponding to the storage device, an access policy is generated. The access policy includes the access method corresponding to different address information and is sent to the storage server so that the storage server can match the corresponding access method according to the target address.
It improves the data access performance of storage devices by responding to access requests with appropriate access methods for different addresses, thereby optimizing data read and write operations.
Smart Images

Figure CN115756321B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data storage technology, and in particular to a data access method, a data access system, a computing device, and a computer storage medium. Background Technology
[0002] In practical applications, users often need to access the storage devices of computers or servers to store data into or retrieve data from the storage devices.
[0003] In related technologies, storage devices are typically accessed through the following methods: a user performs a data access operation on the file system. After receiving the user's data access operation, the file system determines the storage address in the storage device corresponding to the data access operation and sends the storage address to the storage server in the storage device. After receiving the storage address, the storage server directly performs a data access operation on the corresponding storage space in the storage device, such as storing data in the corresponding storage space or reading data from the corresponding storage space and returning it to the file system.
[0004] In the process of realizing the concept of this invention, the inventors discovered that the methods for accessing storage devices in related technologies have the technical problem of low data access performance of storage devices, which cannot meet the needs of users. Summary of the Invention
[0005] This invention provides a data access method, a data access device, a data access system, a computing device, and a computer storage medium.
[0006] In a first aspect, one embodiment of the present invention provides a data access method, comprising:
[0007] Obtain the spatial layout information of the file system corresponding to the storage device;
[0008] The spatial layout information is parsed, and an access strategy is generated based on the parsing results. The access strategy includes an access method corresponding to at least one address.
[0009] The access policy is sent to the storage server so that the storage server can store the access policy and, upon receiving a data access request including a target address, determine a target access method matching the target address from the access policy and access the target address in the storage device according to the target access method.
[0010] Secondly, another embodiment of the present invention provides a data access method, including:
[0011] Obtain the access policy corresponding to the storage device; the access policy includes at least one access method corresponding to address information;
[0012] The access policy is sent to the storage server so that the storage server can store the access policy and, upon receiving a data access request including a target address, determine a target access method matching the target address from the access policy and access the target address in the storage device according to the target access method.
[0013] Thirdly, another embodiment of the present invention provides a data access method, including:
[0014] Obtain a data access request, wherein the data access request includes a target address;
[0015] In response to the data access request, a target access method corresponding to the target address is determined from the access policy; wherein the access policy includes an access method corresponding to at least one address information;
[0016] Access the storage space corresponding to the target address in the storage device based on the target access method.
[0017] Fourthly, in one embodiment of the present invention, a data access device is provided, comprising:
[0018] The information acquisition module is used to acquire the spatial layout information of the file system corresponding to the storage device;
[0019] The information parsing module is used to parse the spatial layout information and generate an access strategy based on the parsing results. The access strategy includes an access method corresponding to at least one address information.
[0020] The information sending module is used to send the access policy to the storage server so that the storage server can store the access policy, and after receiving a data access request including a target address, determine a target access method matching the target address from the access policy, and access the target address in the storage device according to the target access method.
[0021] Fifthly, another embodiment of the present invention provides a data access device, comprising:
[0022] The policy acquisition module is used to acquire the access policy corresponding to the storage device; the access policy includes at least one access method corresponding to address information.
[0023] The policy sending module is used to send the access policy to the storage server so that the storage server can store the access policy, and after receiving a data access request including a target address, determine a target access method matching the target address from the access policy, and access the target address in the storage device according to the target access method.
[0024] Sixthly, another embodiment of the present invention provides a data access device, comprising:
[0025] A request acquisition module is used to acquire data access requests, wherein the data access requests include a target address;
[0026] A request-response module is used to respond to the data access request by determining, from the access policy, a target access method corresponding to the target address; wherein, the access policy includes an access method corresponding to at least one address information;
[0027] The access module is used to access the storage space corresponding to the target address in the storage device based on the target access method.
[0028] In a seventh aspect, embodiments of the present invention provide a data access system, including:
[0029] An access agent is used to obtain the spatial layout information of the file system corresponding to the storage device; parse the spatial layout information and generate an access policy based on the parsing result, the access policy including an access method corresponding to at least one address information; and send the access policy to the control manager.
[0030] The control manager is used to obtain the access policy corresponding to the storage device and send the access policy to the storage server.
[0031] A storage server is configured to receive access policies; obtain data access requests, the data access requests including a target address; in response to the data access requests, determine a target access method corresponding to the target address from the access policies; and access the storage space corresponding to the target address in the storage device based on the target access method.
[0032] Eighthly, embodiments of the present invention provide a computing device, including a processing component and a storage component;
[0033] The storage component stores one or more computer instructions; the one or more computer instructions are invoked and executed by the processing component to implement the data access method provided in this embodiment of the invention.
[0034] Ninthly, embodiments of the present invention provide a computer storage medium storing a computer program, wherein when the computer executes the computer program, it implements the data access method provided in the embodiments of the present invention.
[0035] This invention provides a data access method. In this method, by acquiring and parsing the spatial layout information of the file system corresponding to the storage device, an access policy is generated. The access policy includes access methods corresponding to different addresses in the storage device. The access policy is then sent to the storage server in the storage device. Therefore, when the storage server receives a data access request including a target address, it can determine the target access method matching the target address from the access policy and access the target address in the storage device according to the target access method. This technical solution allows for responding to access requests for different addresses in the storage device using the access method corresponding to that address, thereby improving the data access performance of the storage device.
[0036] These or other aspects of the invention will become more apparent from the following description of the embodiments. Attached Figure Description
[0037] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0038] Figure 1 The flowchart illustrating a data access method provided in one embodiment of the present invention is shown in the schematic diagram.
[0039] Figure 2 The flowchart illustrating a data access method provided in one embodiment of the present invention is shown in the schematic diagram.
[0040] Figure 3 The flowchart illustrating a data access method provided in one embodiment of the present invention is shown in the schematic diagram.
[0041] Figure 4 This diagram illustrates a data access system provided in an embodiment of the present invention.
[0042] Figure 5 The diagram schematically illustrates a block diagram of a data access device provided in one embodiment of the present invention;
[0043] Figure 6 A block diagram illustrating a data access device according to another embodiment of the present invention is shown schematically.
[0044] Figure 7 A block diagram illustrating a data access device according to another embodiment of the present invention is shown schematically.
[0045] Figure 8 A block diagram of a computing device provided by an embodiment of the present invention is shown schematically. Detailed Implementation
[0046] To enable those skilled in the art to better understand the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.
[0047] In some of the processes described in the specification, claims, and accompanying drawings of this invention, multiple operations appearing in a specific order are included. However, it should be clearly understood that these operations may not be executed in the order they appear herein, or may be executed in parallel. The operation numbers, such as 101, 102, etc., are merely used to distinguish different operations and do not represent any execution order. Furthermore, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should be noted that the descriptions such as "first," "second," etc., in this document are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to different types.
[0048] In practical applications, users often need to access the storage devices of computers or servers to store data into or retrieve data from the storage devices.
[0049] In related technologies, storage devices are typically accessed through the following methods: users mount a file system on the storage device and then read and write data on the storage device through the file system access interface. Specifically, when a user performs a data access operation on the file system, the file system receives the user's data access operation, determines the storage address on the storage device corresponding to the data access operation, and sends the storage address to the storage server on the storage device. After receiving the storage address, the storage server directly performs data access operations on the corresponding storage space on the storage device, such as storing data in the corresponding storage space or reading data from the corresponding storage space and returning it to the file system.
[0050] After the file system is mounted on the storage device, the file system usually manages the space layout of the storage device. Specifically, the file system partitions the storage space of the storage device, and each partition can have a different purpose. For example, each partition can be used to store different types of data, and correspondingly, different types of data often have different characteristics.
[0051] In the process of realizing the concept of this invention, the inventors discovered that in the related technologies for accessing storage devices, for data with different characteristics in different partitions, the storage device usually uses the same and fixed access method to access these data, which results in a technical problem of low data access performance of the storage device and cannot meet the needs of users.
[0052] To address the technical problems existing in related technologies, embodiments of the present invention provide a data access method. This method involves acquiring and parsing the spatial layout information of the file system corresponding to the storage device, generating an access policy, and including access methods corresponding to different addresses in the storage device. The access policy is then sent to a storage server in the storage device. When the storage server receives a data access request including a target address, it can determine the target access method matching the target address from the access policy and access the target address in the storage device according to the target access method. This technical solution allows for responding to access requests for different addresses in the storage device using the access method corresponding to that address, thereby improving the data access performance of the storage device.
[0053] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0054] Figure 1 The schematic diagram illustrates a flowchart of a data access method according to an embodiment of the present invention. This data access method can be executed by an access agent and may include the following steps:
[0055] 101. Obtain the spatial layout information of the file system corresponding to the storage device;
[0056] 102. Parse the spatial layout information and generate an access strategy based on the parsing results. The access strategy includes an access method corresponding to at least one address.
[0057] 103. The access policy is sent to the storage server so that the storage server can store the access policy and, upon receiving a data access request including the target address, determine the target access method that matches the target address from the access policy and access the target address in the storage device according to the target access method.
[0058] According to embodiments of the present invention, the file system can be pre-mounted on a storage device, such as a cloud hard drive, a hard drive, a disk array, etc. The specific file system can be determined according to the operating system type of the computing device. For example, when the operating system is Windows, the file system can include FAT32, NTFS, etc.; when the operating system is Linux, the file system can include ext2, ext3, xfs, etc.
[0059] According to embodiments of the present invention, after the file system is mounted on the storage device, the file system typically manages the space layout of the storage device. Specifically, the file system partitions the storage space of the storage device, and each partition can have a different purpose. For example, each partition can be used to store different types of data, and correspondingly, different types of data often have different characteristics. For instance, the first partition can be a journal zone, which is mainly used to record change logs for restart recovery; the second partition can be a metadata zone, which is used to record metadata information and data location pointers of files and directories; and the third partition can be a data zone, which is mainly used to store the specific data content of files or directories. After the file system is mounted to the storage device, the address information of each partition is relatively fixed.
[0060] After the file system manages the space layout of the corresponding storage device, it can generate a corresponding space layout document. The space layout information can be obtained by obtaining the space layout document of the file system. The space layout information can be used to record the correspondence between the address space of the storage device and the data type stored.
[0061] According to an embodiment of the present invention, the access policy can be generated in the form of a set of tags, the tags including address information of at least one storage space in the storage device and the access method corresponding to the address information.
[0062] According to an embodiment of the present invention, the address information may include, for example, the LBA (Logical Block Address) of the storage space in the storage device.
[0063] According to embodiments of the present invention, the access strategy can be implemented as semantic tags, which may include address information of storage space in the storage device and tags corresponding to the address information. The tags can be used to characterize the access method corresponding to the address information. For example, the semantic tags can be: S = [(LBA1, Tag1), (LBA2, Tag2), (LBA3, Tag3), (LBA4, Tag4)]. Wherein, S can be the identification information of the storage device, LBA can be the address information of an address space in the storage device, and Tag can be the access method corresponding to the address information.
[0064] In another embodiment of the present invention, the Tag can also be used to characterize the data type of the data stored in the LBA address space of the storage device. The data type may include, for example, log data, metadata, hot data, cold data, etc.
[0065] According to embodiments of the present invention, since computing devices have different access requirements for different data types, the corresponding access method can be determined based on the data type.
[0066] According to an embodiment of the present invention, data types and corresponding access methods can be recorded in a data table. Thus, after determining the data type, the access method corresponding to the data type can be determined by retrieving the data table.
[0067] According to an embodiment of the present invention, the address information can be implemented as an address range, for example, the address information can be (LBA1, Size1). Wherein, LBA1 can be the starting address of the storage space in the storage device, and Size1 can be the range length. An address range can be uniquely determined by the starting address and the range length.
[0068] According to embodiments of the present invention, the access method may include, for example, raising / lowering IO priority, whether to compress, whether to place on high-speed media, whether to cache, etc.
[0069] According to an embodiment of the present invention, sending the access policy to the storage server can be specifically implemented as follows:
[0070] The access policy is sent to the control manager of the computing device, which then forwards the received access policy to the block manager, which manages the storage device. The block manager associates the received access policy with the storage device's metadata and sends the access policy to the storage server.
[0071] According to an embodiment of the present invention, a storage server can be used to manage data access requests received by a storage device.
[0072] According to an embodiment of the present invention, after receiving an access policy, the block manager can persist the access policy and send it to the storage server after the storage server starts.
[0073] According to an embodiment of the present invention, in order to prevent the access policy from being lost due to power failure of the storage device, the block manager can persistently store the access policy and distribute the access policy to the storage server each time the storage server starts, thereby achieving the technical effect of improving the storage security of the access policy.
[0074] According to an embodiment of the present invention, after receiving an access policy, the storage server can store the access policy. When the storage server receives a data access request, it can parse the data access request to obtain the target address to be accessed carried in the data access request.
[0075] According to an embodiment of the present invention, after obtaining the target address, a pre-stored access policy can be obtained, and the target address can be matched with at least one address information included in the access policy to determine the target address information that matches the target address, and the access method corresponding to the target address information can be determined as the target access method.
[0076] According to embodiments of the present invention, for example, when the file system partitions the storage device, it uses the storage space corresponding to the first address information to store log data. Since log data requires low write latency but is rarely read, and because it is periodically reclaimed and cleaned up, caching is unnecessary, and the data lifecycle is short, the access method corresponding to the first address information can include, for example, no caching, no compression, or the use of erasure coding to reduce storage space usage, and an access policy is generated accordingly and sent to the storage server. When the storage server parses the obtained access request and determines the target address, if the target address corresponds to the first address information, then it can respond to the access request using a pre-determined access method corresponding to it. Correspondingly, if the target address corresponds to the second address information, the storage device can respond to the access request using a pre-determined access method corresponding to the second address information.
[0077] According to an embodiment of the present invention, accessing a target address in a storage device according to a target access method can be specifically implemented as follows:
[0078] The target access method and data access request are sent to the storage device so that the storage device can modify the initial access parameters based on the target access method, generate the target access parameters, and respond to the data access request using the target access parameters.
[0079] According to an embodiment of the present invention, the initial access parameters can be the default access parameters of the storage device. Based on the initial access parameters, the storage device can process the obtained access operation based on the default access method.
[0080] According to an embodiment of the present invention, the initial access parameters may include a variety of adjustable parameters, such as IO priority, whether to cache, and whether to compress, each corresponding to an adjustable parameter.
[0081] According to an embodiment of the present invention, after the storage device obtains the target access method, it can adjust the adjustable parameters corresponding to the initial access parameters based on the target access method to generate the target access parameters.
[0082] According to an embodiment of the present invention, a data access request may include, for example, a data write request or a data read request. When the data access request is a data write request, the data access request may also include the data to be written to the storage device.
[0083] According to an embodiment of the present invention, through the path of control manager, block manager, and storage server, access policies can be transmitted to the underlying storage device with minimal intrusion into the file system. This allows the storage device to determine the access method corresponding to the target address included in the access request, thereby optimizing data read and write operations and improving the access performance of the storage device.
[0084] According to an embodiment of the present invention, the data access method further includes:
[0085] Obtain data access instructions;
[0086] The target address is determined based on the initiator of the data access command;
[0087] Send a data access request, including the target address, to the storage server.
[0088] According to an embodiment of the present invention, after the file system performs spatial layout on the storage device, it can allocate the storage space of the storage device to applications running on the computing device. For example, the storage space corresponding to (LBA1, Size1) can be allocated to application A, and the storage space corresponding to (LBA2, Size2) can be allocated to application B. Thus, after obtaining a data access instruction, the target address to be accessed by the data access instruction can be determined by identifying the initiator of the data access instruction.
[0089] According to an embodiment of the present invention, parsing spatial layout information and generating an access strategy based on the parsing results can be specifically implemented as follows:
[0090] Obtain the data type corresponding to at least one address information recorded in the spatial layout information;
[0091] Determine the access method corresponding to the data type;
[0092] The mapping relationship between address information and access methods is determined as the access strategy.
[0093] Figure 2 The schematic diagram illustrates a flowchart of a data access method provided by an embodiment of the present invention. This data access method can be executed by a control manager and may include the following steps:
[0094] 201. Obtain the access policy corresponding to the storage device; the access policy includes at least one access method corresponding to address information;
[0095] 202. The access policy is sent to the storage server so that the storage server can store the access policy and, upon receiving a data access request including the target address, determine the target access method that matches the target address from the access policy and access the target address in the storage device according to the target access method.
[0096] According to an embodiment of the present invention, sending the access policy to the storage server can be specifically implemented as follows: forwarding the access policy to the block manager for managing the storage device, the block manager associating the received access policy with the metadata of the storage device and storing it, and then sending the access policy to the storage server.
[0097] According to an embodiment of the present invention, a storage server can be used to manage data access requests received by a storage device.
[0098] According to an embodiment of the present invention, after receiving an access policy, the block manager can persist the access policy and send it to the storage server after the storage server starts.
[0099] According to an embodiment of the present invention, in order to prevent the access policy from being lost due to power failure of the storage device, the block manager can persistently store the access policy and distribute the access policy to the storage server each time the storage server starts, thereby achieving the technical effect of improving the storage security of the access policy.
[0100] According to an embodiment of the present invention, after receiving an access policy, the storage server can store the access policy. When the storage server receives a data access request, it can parse the data access request to obtain the target address to be accessed carried in the data access request.
[0101] According to an embodiment of the present invention, obtaining the access policy corresponding to the storage device can be specifically implemented as follows:
[0102] The access policy from the virtual machine is obtained. The access policy is generated by parsing the file system space layout information deployed in the virtual machine.
[0103] According to an embodiment of the present invention, obtaining the access policy corresponding to the storage device can be further implemented as follows:
[0104] Get the user's custom access policy sent through the interface.
[0105] According to an embodiment of the present invention, the control manager can provide an OpenAPI (Application Program Interface) to the outside world, and users can send custom access policies to the control manager through the OpenAPI.
[0106] Figure 3 The schematic diagram illustrates a flowchart of a data access method according to an embodiment of the present invention. This data access method can be executed by a storage server and may include the following steps:
[0107] 301, Get data access request, the data access request includes the target address;
[0108] 302. In response to a data access request, determine the target access method corresponding to the target address from the access policy; wherein the access policy includes an access method corresponding to at least one address information.
[0109] 303, Accessing the storage space corresponding to the target address in the storage device based on the target access method.
[0110] According to an embodiment of the present invention, a data access request may include, for example, a data write request or a data read request. When the data access request is a data write request, the data access request also includes the data to be written to the storage device.
[0111] According to an embodiment of the present invention, after receiving an access policy, the storage server can store the access policy. When the storage server receives a data access request, it can parse the data access request to obtain the target address to be accessed carried in the data access request.
[0112] According to an embodiment of the present invention, after obtaining the target address, a pre-stored access policy can be obtained, and the target address can be matched with at least one address information included in the access policy to determine the target address information that matches the target address, and the access method corresponding to the target address information can be determined as the target access method.
[0113] According to embodiments of the present invention, for example, when the file system partitions the storage device, it uses the storage space corresponding to the first address information to store log data. Since log data requires low write latency but is rarely read, and because it is periodically reclaimed and cleaned up, caching is unnecessary, and the data lifecycle is short, the access method corresponding to the first address information can include, for example, no caching, no compression, or the use of erasure coding to reduce storage space usage, and an access policy is generated accordingly and sent to the storage server. When the storage server parses the obtained access request and determines the target address, if the target address corresponds to the first address information, then it can respond to the access request using a pre-determined access method corresponding to it. Correspondingly, if the target address corresponds to the second address information, the storage device can respond to the access request using a pre-determined access method corresponding to the second address information.
[0114] According to an embodiment of the present invention, the address information includes an address range.
[0115] According to an embodiment of the present invention, determining the target access method corresponding to the target address from the access policy can be specifically implemented as follows:
[0116] Determine sequentially whether the target address belongs to at least one address range;
[0117] The access method corresponding to the address range of the target address is determined as the target access method.
[0118] According to an embodiment of the present invention, the address information may include, for example, the LBA (Logical Block Address) of the storage space in the storage device.
[0119] According to embodiments of the present invention, the access strategy can be implemented as semantic tags, which may include address information of storage space in the storage device and tags corresponding to the address information. The tags can be used to characterize the access method corresponding to the address information. For example, the semantic tags can be: S = [(LBA1, Tag1), (LBA2, Tag2), (LBA3, Tag3), (LBA4, Tag4)]. Wherein, S can be the identification information of the storage device, LBA can be the address information of an address space in the storage device, and Tag can be the access method corresponding to the address information.
[0120] According to an embodiment of the present invention, the address information can be implemented as an address range, for example, the address information can be (LBA1, Size1). Wherein, LBA1 can be the starting address of the storage space in the storage device, and Size1 can be the range length. An address range can be uniquely determined by the starting address and the range length.
[0121] According to an embodiment of the present invention, the data access method further includes:
[0122] In response to the storage server starting successfully, a request to obtain access policies is sent to the block manager;
[0123] Receive the access policy sent by the block manager. The access policy is generated based on the space layout information of the file system corresponding to the storage device.
[0124] Store the access policies.
[0125] According to an embodiment of the present invention, the block manager can receive the access policy sent by the control manager. After receiving the access policy, the block manager can persist the access policy and send it to the storage server after the storage server starts.
[0126] According to an embodiment of the present invention, in order to prevent the access policy from being lost due to power failure of the storage device, the block manager can persistently store the access policy and distribute the access policy to the storage server each time the storage server starts, thereby achieving the technical effect of improving the storage security of the access policy.
[0127] According to an embodiment of the present invention, accessing the storage space corresponding to the target address in the storage device based on the target access method can be specifically implemented as follows:
[0128] The target access method and data access request are sent to the storage device so that the storage device can modify the initial access parameters based on the target access method, generate the target access parameters, and respond to the data access request using the target access parameters.
[0129] According to an embodiment of the present invention, the initial access parameters can be the default access parameters of the storage device. Based on the initial access parameters, the storage device can process the obtained access operation based on the default access method.
[0130] According to an embodiment of the present invention, the initial access parameters may include a variety of adjustable parameters, such as IO priority, whether to cache, and whether to compress, each corresponding to an adjustable parameter.
[0131] According to an embodiment of the present invention, after the storage device obtains the target access method, it can adjust the adjustable parameters corresponding to the initial access parameters based on the target access method to generate the target access parameters.
[0132] According to an embodiment of the present invention, the data access method further includes:
[0133] Receive the data access result sent by the storage device in response to the data access request;
[0134] Send the data access result to the party that initiated the data access request.
[0135] According to an embodiment of the present invention, the data access request includes a first data access request and a second data access request, wherein the first data access request and the second data access request come from different initiators; the access method includes access priority;
[0136] According to an embodiment of the present invention, accessing the storage device based on a target access policy can be specifically implemented as follows:
[0137] Determine the priority relationship between the first priority corresponding to the first data access request and the second priority corresponding to the second data access request;
[0138] The priority relationship, the first data access request, and the second data access request are sent to the storage device so that the storage device can respond to the first data access request and the second data access request in sequence based on the priority relationship.
[0139] According to an embodiment of the present invention, the priority may include IO priority.
[0140] According to an embodiment of the present invention, by configuring different IO priorities for different request initiators, the storage device can process multiple access requests in sequence according to IO priority when receiving access requests from multiple request initiators at the same time, so that latency-sensitive requests can be processed first.
[0141] This invention also provides a data access system, including:
[0142] An access agent is used to obtain the spatial layout information of the file system corresponding to the storage device; parse the spatial layout information and generate an access policy based on the parsing result, the access policy including an access method corresponding to at least one address information; and send the access policy to the control manager.
[0143] The control manager is used to obtain the access policy corresponding to the storage device and send the access policy to the storage server.
[0144] A storage server is configured to receive access policies; obtain data access requests, the data access requests including a target address; in response to the data access requests, determine a target access method corresponding to the target address from the access policies; and access the storage space corresponding to the target address in the storage device based on the target access method.
[0145] Figure 4 The diagram illustrates a data access system provided in an embodiment of the present invention.
[0146] like Figure 4As shown, 401 can be a virtual machine, 402 can be an access agent deployed in the virtual machine, 403 can be a control manager, 404 can be a block manager, 405 can be a storage server, and 406 can be a storage device. There can be multiple storage servers 405 and multiple storage devices 406.
[0147] The file system can be mounted in the virtual machine 401. After the file system is mounted on the storage device 406, the storage device can be partitioned, and the data types to be stored in each partition can be determined, generating a space layout document.
[0148] Access agent 402 can obtain and parse the space layout document to determine the space layout information of storage device 406. After determining the space layout information, access agent 402 can generate semantic tags for storage device 406 based on the space layout information.
[0149] Then, the access agent 402 can send the generated semantic tags to the control manager 403. In addition to receiving the semantic tags sent by the access agent 402, the control manager 403 can also receive user-defined semantic tags through the provided OpenAPI.
[0150] After obtaining the semantic tag, the control manager 403 can send the semantic tag to the block manager 404. The block manager 404 is used to associate the received semantic tag with the metadata of the storage device 406 and store it, and then send the semantic tag to the storage server 405.
[0151] Multiple storage servers 405 can access multiple storage devices 406, and the data stored in multiple storage devices 406 can be the same, so as to avoid data loss when one of the storage devices 406 fails.
[0152] The file system deployed in virtual machine 401 can receive user data access requests. After receiving a data access request, the file system can send the data access request directly to storage server 405. Specifically, the file system can randomly send the data access request to any storage server 405.
[0153] After receiving a data access request, the storage server 405 can parse the data access request to obtain the target address to be accessed carried in the data access request. After obtaining the target address, it can obtain the pre-stored semantic tags and match the target address with at least one address information included in the semantic tags to determine the target address information that matches the target address, and determine the access method corresponding to the target address information as the target access method.
[0154] After determining the target access method, the storage server 405 can randomly schedule the target access method and data access request to any storage device 406, so that the storage device 406 processes the data access request based on the received target access method to optimize data reading, writing and storage, and returns the processing result to the storage server 405, so that the storage server 405 can send the processing result to the file system.
[0155] Figure 5 The diagram illustrates a block diagram of a data access device 500 provided in one embodiment of the present invention. The data access device 500 may include an information acquisition module 501, an information parsing module 502, and an information sending module 503.
[0156] The information acquisition module 501 is used to acquire the spatial layout information of the file system corresponding to the storage device;
[0157] The information parsing module 502 is used to parse the spatial layout information and generate an access strategy based on the parsing results. The access strategy includes an access method corresponding to at least one address information.
[0158] The information sending module 503 is used to send the access policy to the storage server so that the storage server can store the access policy and, upon receiving a data access request including the target address, determine the target access method matching the target address from the access policy and access the target address in the storage device according to the target access method.
[0159] According to an embodiment of the present invention, the data access device 500 further includes:
[0160] The instruction acquisition module is used to acquire data access instructions;
[0161] The address determination module is used to determine the target address based on the initiator of the data access command;
[0162] The first request sending module is used to send data access requests, including the target address, to the storage server.
[0163] According to an embodiment of the present invention, the information parsing module 502 includes:
[0164] A type determination unit is used to obtain the data type corresponding to at least one address information recorded in the spatial layout information;
[0165] The mode determination unit is used to determine the access mode corresponding to the data type.
[0166] The policy determination unit is used to determine the correspondence between address information and access methods as the access policy.
[0167] Figure 5The data access device can perform Figure 1 The implementation principle and technical effects of the data access method in the illustrated embodiment will not be repeated here. The specific methods by which each module and unit of the data access device in the above embodiments performs its operations have been described in detail in the embodiments related to this method, and will not be elaborated upon here.
[0168] Figure 6 The diagram illustrates a block diagram of a data access device 600 according to another embodiment of the present invention. The data access device 600 may include a policy acquisition module 601 and a policy sending module 602.
[0169] The policy acquisition module 601 is used to acquire the access policy corresponding to the storage device; the access policy includes at least one access method corresponding to address information.
[0170] The policy sending module 602 is used to send the access policy to the storage server so that the storage server can store the access policy and, upon receiving a data access request including the target address, determine the target access method matching the target address from the access policy and access the target address in the storage device according to the target access method.
[0171] According to an embodiment of the present invention, the strategy acquisition module 601 includes:
[0172] The first acquisition unit is used to acquire the access policy from the virtual machine. The access policy is generated by parsing the file system space layout information deployed in the virtual machine.
[0173] and / or
[0174] The second acquisition unit is used to acquire the user's custom access strategy sent through the interface.
[0175] Figure 6 The data access device can perform Figure 2 The implementation principle and technical effects of the data access method in the illustrated embodiment will not be repeated here. The specific methods by which each module and unit of the data access device in the above embodiments performs its operations have been described in detail in the embodiments related to this method, and will not be elaborated upon here.
[0176] Figure 7 The diagram illustrates a block diagram of a data access device 700 according to another embodiment of the present invention. The data access device 700 may include a request acquisition module 701, a request response module 702, and an access module 703.
[0177] The request acquisition module 701 is used to acquire data access requests, which include the target address.
[0178] The request-response module 702 is used to respond to a data access request by determining the target access method corresponding to the target address from the access policy; wherein the access policy includes the access method corresponding to at least one address information.
[0179] Access module 703 is used to access the storage space corresponding to the target address in the storage device based on the target access method.
[0180] According to an embodiment of the present invention, the address information includes an address range;
[0181] According to an embodiment of the present invention, the request response module 702 includes:
[0182] The judgment unit is used to sequentially determine whether the target address belongs to at least one address range;
[0183] The access method determination unit is used to determine the access method corresponding to the address range of the target address as the target access method.
[0184] According to an embodiment of the present invention, the data access device 700 further includes:
[0185] The second request sending module is used to send an access policy acquisition request to the block manager in response to the successful startup of the storage server.
[0186] The policy receiving module is used to receive access policies sent by the block manager. The access policies are generated based on the spatial layout information of the file system corresponding to the storage device.
[0187] The policy storage module is used to store access policies.
[0188] According to an embodiment of the present invention, the access module 703 includes:
[0189] The first information sending unit is used to send the target access method and data access request to the storage device, so that the storage device can change the initial access parameters based on the target access method, generate target access parameters, and respond to the data access request using the target access parameters.
[0190] According to an embodiment of the present invention, the data access device 700 further includes:
[0191] The result acquisition unit is used to receive the data access result sent by the storage device in response to the data access request;
[0192] The result sending unit is used to send the data access result to the request initiator of the data access request.
[0193] According to an embodiment of the present invention, the data access request includes a first data access request and a second data access request, wherein the first data access request and the second data access request come from different initiators; the access method includes access priority.
[0194] According to an embodiment of the present invention, the access module 703 includes:
[0195] The priority determination unit is used to determine the priority relationship between the first priority corresponding to the first data access request and the second priority corresponding to the second data access request;
[0196] The second information sending unit is used to send the priority relationship, the first data access request, and the second data access request to the storage device, so that the storage device can respond to the first data access request and the second data access request in sequence based on the priority relationship.
[0197] Figure 7 The data access device can perform Figure 3 The implementation principle and technical effects of the data access method in the illustrated embodiment will not be repeated here. The specific methods by which each module and unit of the data access device in the above embodiments performs its operations have been described in detail in the embodiments related to this method, and will not be elaborated upon here.
[0198] In one possible design, the data access device provided in the embodiments of the present invention can be implemented as a computing device, such as... Figure 8 As shown, the computing device may include a storage component 801 and a processing component 802;
[0199] Storage component 801 stores one or more computer instructions, wherein the one or more computer instructions are invoked and executed by processing component 802 to implement the data access method provided in the embodiments of the present invention.
[0200] Of course, computing devices may also include other components, such as input / output interfaces and communication components. Input / output interfaces provide an interface between processing components and peripheral interface modules, which can be output devices, input devices, etc. Communication components are configured to facilitate wired or wireless communication between the computing device and other devices.
[0201] The computing device can be a physical device or an elastic computing host provided by a cloud computing platform. In this case, the computing device can refer to a cloud server, and the aforementioned processing components, storage components, etc., can be basic server resources rented or purchased from the cloud computing platform.
[0202] When the computing device is a physical device, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or as a single server or a single terminal device.
[0203] This invention also provides a computer-readable storage medium storing a computer program, which, when executed by a computer, can implement the data access method provided in this invention.
[0204] This invention also provides a computer program product, including a computer program that, when executed by a computer, can implement the data access method provided in this invention.
[0205] The processing component in the corresponding embodiments described above may include one or more processors to execute computer instructions to complete all or part of the steps in the method described above. Alternatively, the processing component may be implemented as one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to execute the method described above.
[0206] Storage components are configured to store various types of data to support operation within the device. Storage components can be implemented from any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0207] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0208] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0209] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0210] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A data access method, comprising: Obtain the spatial layout information of the file system corresponding to the storage device; The spatial layout information is parsed, and an access strategy is generated based on the parsing results. The access strategy includes an access method corresponding to at least one address. The access policy is sent to the storage server so that the storage server can store the access policy and, upon receiving a data access request including a target address, determine a target access method matching the target address from the access policy and access the target address in the storage device according to the target access method.
2. The method according to claim 1, further comprising: Obtain data access instructions; The target address is determined based on the initiator of the data access instruction; Send a data access request, including the target address, to the storage server.
3. The method according to claim 1, wherein parsing the spatial layout information and generating an access strategy based on the parsing result includes: Obtain the data type corresponding to at least one address information recorded in the spatial layout information; Determine the access method corresponding to the data type; The correspondence between the address information and the access method is determined as the access strategy.
4. A data access method, comprising: Obtain the access policy corresponding to the storage device; The access strategy includes at least one access method corresponding to address information; The access policy is sent to the storage server so that the storage server can store the access policy and, upon receiving a data access request including a target address, determine a target access method matching the target address from the access policy and access the target address in the storage device according to the target access method.
5. The method according to claim 4, wherein obtaining the access policy corresponding to the storage device includes: The access policy is obtained from the virtual machine, and the access policy is generated by parsing the file system space layout information deployed in the virtual machine. and / or Get the user's custom access policy sent through the interface.
6. A data access method, comprising: Obtain a data access request, wherein the data access request includes a target address; In response to the data access request, a target access method corresponding to the target address is determined from the access policy; wherein the access policy includes an access method corresponding to at least one address information; Access the storage space corresponding to the target address in the storage device based on the target access method.
7. The method according to claim 6, wherein the address information includes an address range; Determining the target access method corresponding to the target address from the access policy includes: Determine sequentially whether the target address belongs to at least one address range; The access method corresponding to the address range to which the target address belongs is determined as the target access method.
8. The method according to claim 6, further comprising: In response to the storage server starting successfully, a request to obtain access policies is sent to the block manager; The access policy sent by the block manager is received, and the access policy is generated based on the space layout information of the file system corresponding to the storage device; The access policy is stored.
9. The method according to claim 8, wherein accessing the storage space corresponding to the target address in the storage device based on the target access method comprises: The target access method and the data access request are sent to the storage device so that the storage device can modify the initial access parameters based on the target access method, generate target access parameters, and respond to the data access request using the target access parameters.
10. The method according to claim 8, further comprising: Receive the data access result sent by the storage device in response to the data access request; The data access result is sent to the party that initiated the data access request.
11. The method of claim 6, wherein, The data access request includes a first data access request and a second data access request, which come from different initiators; the access method includes access priority. Accessing the storage device based on the target access policy includes: Determine the priority relationship between the first priority corresponding to the first data access request and the second priority corresponding to the second data access request; The priority relationship, the first data access request, and the second data access request are sent to the storage device so that the storage device responds to the first data access request and the second data access request in sequence based on the priority relationship.
12. A data access system, comprising: An access proxy for performing the data access method as described in any one of claims 1 to 3; A control manager for performing the data access method as described in any one of claims 4 to 5; A storage server for performing the data access method as described in any one of claims 6 to 11.
13. A computing device, comprising a processing component and a storage component; The storage component stores one or more computer instructions; the one or more computer instructions are to be invoked and executed by the processing component to implement the data access method as described in any one of claims 1 to 3, or the data access method as described in any one of claims 4 to 5, or the data access method as described in any one of claims 6 to 11.
14. A computer storage medium storing a computer program, wherein when executed by a computer, the computer program implements the data access method as described in any one of claims 1 to 3, or the data access method as described in any one of claims 4 to 5, or the data access method as described in any one of claims 6 to 11.