Data access method and device, electronic equipment and storage medium
By querying the IO path status in real time in a distributed block storage system and adopting efficient serialization protocols and adaptability strategies, the problems of insufficient performance and large system overhead are solved, and the read and write performance and availability of cloud disks are improved.
Patent Information
- Application Number
- CN202411310988.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2024-12-13
AI Technical Summary
In high-performance cloud disk applications, the serialization performance of Protobuf is poor, which makes it difficult to meet the IOPS requirements. The "read slave node" and "local write" characteristics of the Executor module have improved availability but increased System overhead, resulting in read and write path delay and performance degradation.
By querying the IO path status in real time in the computing node, adopting adaptive processing strategies and sending methods, using efficient serialization protocols such as Flatbuffers, avoiding global locks and thread switching, directly communicating with block services in user space, and switching the IO path status to Take into account performance and usability.
Improves the read and write performance of cloud disks, reduces data access time, improves user experience, and ensures system stability and availability in abnormal situations.
Smart Images

Figure CN119127087A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of AI (Artificial Intelligence), specifically to technical fields such as big data and cloud computing, and in particular to data access methods, devices, electronic devices and storage media. Background Art
[0002] Distributed block storage is a technology that converts multiple physical storage media into cloud disks that users can use. Users can use cloud disks like ordinary physical disks. Cloud disks are highly reliable, highly available, highly elastic, and support backup. The distributed block storage system includes control nodes, storage nodes, task execution nodes, and computing nodes. As the first node for users to access cloud disks, computing nodes need to send users' read and write requests to storage nodes. Summary of the invention
[0003] The present disclosure provides a method, device, electronic device and storage medium for data access.
[0004] According to one aspect of the present disclosure, a data access method is provided, which is performed by a computing node in a distributed block storage system, and includes:
[0005] In response to receiving a data access request sent by a client, determining a target replication group RG to be accessed, and querying a path status of an input / output IO path; wherein the path status is used to indicate whether an abnormality occurs in the distributed block storage system;
[0006] Using a target processing strategy adapted to the path state, the data access request is processed to obtain a first access request, and a target block service associated with the target RG is determined from a plurality of block services of a storage node in the distributed block storage system;
[0007] Based on the target sending mode adapted to the path state, sending the first access request to the target block service; wherein the first access request is used to access the target RG to obtain a first access response;
[0008] In a case where a first access response sent by the target block service is received, the first access response is sent to the client.
[0009] According to another aspect of the present disclosure, a data access device is provided, which is applied to a computing node in a distributed block storage system, including:
[0010] A determination module, configured to determine the target replication group RG to be accessed in response to receiving a data access request sent by a client, and query the path status of the input / output IO path; wherein the path status is used to indicate whether an abnormality occurs in the distributed block storage system;
[0011] a processing module, configured to process the data access request by adopting a target processing strategy adapted to the path state, obtain a first access request, and determine a target block service associated with the target RG from a plurality of block services of a storage node in the distributed block storage system;
[0012] A sending module, configured to send the first access request to the target block service based on a target sending mode adapted to the path state; wherein the first access request is used to access the target RG to obtain a first access response;
[0013] The sending module is further configured to send the first access response to the client upon receiving the first access response sent by the target block service.
[0014] According to another aspect of the present disclosure, there is provided an electronic device, comprising:
[0015] at least one processor; and
[0016] a memory communicatively connected to the at least one processor; wherein,
[0017] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the data access method proposed in the above aspect of the present disclosure.
[0018] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium of computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the data access method proposed in the above aspect of the present disclosure.
[0019] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the computer program implements the data access method proposed in the above aspect of the present disclosure.
[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0022] Figure 1 A flowchart of a data access method provided in the first embodiment of the present disclosure;
[0023] Figure 2 A flowchart of a data access method provided in Embodiment 2 of the present disclosure;
[0024] Figure 3 A flowchart of a data access method provided in Embodiment 3 of the present disclosure;
[0025] Figure 4 A flowchart of a data access method provided in Embodiment 4 of the present disclosure;
[0026] Figure 5 A flowchart of a data access method provided in Embodiment 5 of the present disclosure;
[0027] Figure 6 A flowchart of a data access method provided in Embodiment 6 of the present disclosure;
[0028] Figure 7 A flowchart of a data access method provided in Embodiment 7 of the present disclosure;
[0029] Figure 8 A flowchart of a data access method provided in Embodiment 8 of the present disclosure;
[0030] Fig. 9 A flowchart of a data access method provided in Embodiment 9 of the present disclosure;
[0031] Fig.10 A schematic diagram of the structure of a data access device provided in Embodiment 10 of the present disclosure;
[0032] Fig.11 A schematic block diagram of an example electronic device that can be used to implement embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0033] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0034] In a distributed block storage system, the compute node is deployed with an Executor module, which is responsible for receiving and processing read and write requests from virtual machines to cloud disks. The Executor module needs to send read and write requests to the Blockserver of the storage node, and forward the read and write success response sent by the Blockserver to the user after receiving the read and write success response.
[0035] Among them, Blockserver saves data through several RGs (Replication Group, a collection of multiple data nodes). The user's data on the cloud disk is dispersedly stored on these RGs, and these RGs are dispersedly stored on different storage nodes. Among them, RG is a replication group based on the distributed consistency protocol Raft. Each RG has three copies, distributed on three Blockservers, and the consistency of the three copies is maintained through the Raft protocol.
[0036] Among them, the virtual machine's read and write requests for the cloud disk carry the data range to be accessed in the cloud disk, that is, the read and write requests carry the data access range. The Executor module can use a hash algorithm to determine which RGs the data access range falls on, and then obtain the metadata of the corresponding RG from the Master (controller) module of the control node to determine which Blockserver to access. After that, the Executor module serializes the read and write requests in Protobuf (Protocol Buffers, a data serialization protocol) format, and sends the serialized read and write requests to the Blockserver through RPC (Remote Procedure Call).
[0037] It should be noted that since the metadata of RG is information with a low frequency of change, in order to avoid the Executor module from frequently accessing the Master module, the Executor module can use the global cache to save the previously obtained metadata, so that before accessing the Blockserver, the Executor module can directly obtain the metadata of the corresponding RG from the global cache instead of obtaining the metadata of the corresponding RG from the Master module.
[0038] It should also be noted that when the metadata of RG changes, the Executor module will get a specific error code when accessing the Blockserver using the old metadata. It may redirect to the new Blockserver, or obtain the latest metadata of RG from the Master module again, and then update the metadata of RG in the global cache. Subsequent data access will use the updated metadata of RG.
[0039] After obtaining the meta information, the Executor module can send read and write requests to the Blockserver. Due to the complexity of the basic environment of the distributed block storage system, the read and write requests sent to the Blockserver may not be successfully returned. In the event of an abnormality in the distributed block storage system environment, some methods need to be taken to improve the availability of the distributed block storage system. "Read slave node" and "local write" are two methods to improve the availability of read and write requests respectively.
[0040] Among them, "read slave node": each RG has three copies, one of which is the Leader, and the other two are Followers. When a write request arrives, the Leader will write a log and notify the other two Followers to write the log. When most nodes write the log successfully, the Leader believes that the log can be submitted, so it starts to execute. After each execution, an ApplyIndex will be updated to record which log is currently executed. Among them, the ApplyIndex on the Leader is the latest, while the ApplyIndex of the Follower may lag behind. The Executor module locally records the ApplyIndex of the corresponding cloud disk when it was last written. When reading from the slave node, as long as the ApplyIndex at this time is not less than the ApplyIndex when the cloud disk was last written, it can be considered that the data read from the current cloud disk is the latest.
[0041] Among them, "local write" means that when an abnormality occurs in the distributed block storage system environment, the data is temporarily written to the computing node, and then flushed to the back-end Blockserver after the network stabilizes.
[0042] The above two methods improve the availability of cloud disks and have good effects in abnormal situations such as machine downtime and network failure.
[0043] In summary, in the related technology, the Executor module uses Protobuf's RPC protocol to send read and write requests and receive read and write success responses sent by Blockserver. However, Protobuf's serialization performance is poor, and it is difficult to meet the ultra-high IOPS (Input / Output Operations Per Second, the number of read and write operations per second) requirements of high-performance cloud disks, so the RPC protocol needs to be optimized. In addition, the "read slave node" and "local write" features of the Executor module, although they improve the availability of the distributed block storage system, also cause certain system overhead, resulting in increased latency on the read and write paths and reduced performance. The numerous atomic variables and lock operations in the Executor module also have a significant impact on the overall read and write performance, limiting the improvement of cloud disk IOPS.
[0044] Therefore, in response to at least one of the above-mentioned problems, the present disclosure proposes a data access method, device, electronic device and storage medium.
[0045] The data access method, device, electronic device, and storage medium of the embodiments of the present disclosure are described below with reference to the accompanying drawings.
[0046] Figure 1 A flowchart of a data access method provided in Embodiment 1 of the present disclosure.
[0047] The data access method of the embodiment of the present disclosure can be applied to computing nodes in a distributed block storage system.
[0048] like Figure 1 As shown, the data access method may include the following steps S101 to S104:
[0049] Step S101, in response to receiving a data access request sent by a client, determining a target replication group RG to be accessed, and querying a path status of an IO (Input / Output) path; wherein the path status is used to indicate whether an abnormality occurs in a distributed block storage system.
[0050] The client refers to a software program that runs on an electronic device and provides services to users. The electronic device can be any device with computing capabilities, such as a personal computer, a mobile terminal, etc. The mobile terminal can be a mobile phone, a tablet computer, a personal digital assistant, a wearable device, and other hardware devices with various operating systems, touch screens, and / or display screens.
[0051] The data access request includes a read request and a write request.
[0052] The path status includes, but is not limited to: a fast path (FAST), a slow path (SLOW), and a waiting path (WAIT), wherein the fast path is used to indicate that the distributed block storage system is in a normal state (i.e., the network environment of the distributed block storage system is in a normal state, and all machines in the distributed block storage system are also in a normal state (or a normal working state)), the slow path is used to indicate that the distributed block storage system is in an abnormal state (for example, the network environment of the distributed block storage system is in an abnormal state, and / or, at least one machine in the distributed block storage system is in an abnormal state), and the waiting path is used to indicate that the distributed block storage system recovers (or transitions) from an abnormal state to a normal state.
[0053] In the disclosed embodiment, when a computing node receives a data access request sent by a client, a data access range may be extracted from the data access request, and a target RG to be accessed may be determined from multiple RGs according to the data access range.
[0054] Exemplarily, the computing node may use a hash algorithm to determine the target RG to be accessed according to the data access range.
[0055] In the embodiment of the present disclosure, the computing node may also query the path status of the IO path in the distributed block storage system at the current moment.
[0056] Step S102, adopting a target processing strategy adapted to the path state to process the data access request, obtain a first access request, and determine a target block service associated with the target RG from multiple block services of storage nodes in the distributed block storage system.
[0057] Among them, the target processing strategies adapted to different path states may be different. For example, when the path state is a fast path, the target processing strategy may be a fast path processing strategy. When the path state is a slow path or a waiting path, the target processing strategy may be a slow path processing strategy.
[0058] In the embodiment of the present disclosure, the computing node can determine a target processing strategy that is adapted to the above-mentioned path state from multiple processing strategies, and use the target processing strategy to process the data access request to obtain a first access request, and based on the target processing strategy, determine a target block service associated with the target RG to be accessed from multiple block services (Blockservers) of the storage node in the distributed block storage system.
[0059] Step S103: Send a first access request to the target block service based on the target sending mode adapted to the path state; wherein the first access request is used to access the target RG to obtain a first access response.
[0060] Among them, the target sending methods adapted to different path states may be different. For example, when the path state is a fast path, the target sending method may be a fast path sending method. When the path state is a slow path or a waiting path, the target sending method may be a slow path sending method.
[0061] In the disclosed embodiment, the computing node can determine a target sending mode that is adapted to the above-mentioned path state from multiple sending modes, and based on the target sending mode, send a first access request to the target block service, so that the target block service accesses the target RG based on the first access request and obtains a first access response.
[0062] Step S104: upon receiving a first access response sent by the target block service, sending a first access response to the client.
[0063] In the disclosed embodiment, when the computing node receives the first access response sent by the target block service, the first access response can be sent to the client so that the user on the client side can be informed of the access result in a timely manner, thereby improving the user's usage experience.
[0064] The data access method of the disclosed embodiment determines a specific processing strategy for a data access request from multiple processing strategies and a specific sending mode for a data access request from multiple sending modes based on the path status of a real-time IO path in a distributed block storage system. This method can take into account the read and write performance, reliability, and availability of the distributed block storage system, reduce data access time, and improve user experience.
[0065] It should be noted that in the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information are all carried out with the user's consent, and are in compliance with relevant laws and regulations and do not violate public order and good morals.
[0066] In order to clearly illustrate how any embodiment of the present disclosure adopts a target processing strategy adapted to the path state to process a data access request, obtain a first access request, and determine a target block service associated with a target RG from multiple block services of a storage node in a distributed block storage system, the present disclosure also proposes a data access method.
[0067] Figure 2 This is a flow chart of the data access method provided in the second embodiment of the present disclosure.
[0068] The data access method of the embodiment of the present disclosure may be executed by a target thread in a computing node in a distributed block storage system, wherein the target thread may be any thread.
[0069] like Figure 2As shown, the data access method may include the following steps S201 to S206:
[0070] Step S201, in response to receiving a data access request sent by a client, determining a target replication group RG to be accessed, and querying a path status of an IO path; wherein the path status is a fast path.
[0071] The fast path is used to indicate that the distributed block storage system is in a normal state, for example, the network environment of the distributed block storage system is in a normal state, and all machines in the distributed block storage system are also in a normal state (or a normal working state).
[0072] The target processing strategy adapted to the fast path may be a fast path processing strategy.
[0073] For the explanation of step S201, reference may be made to the relevant description in any embodiment of the present disclosure, and no further details will be given here.
[0074] Step S202: read the meta information of the target RG from the local of the target thread.
[0075] It should be noted that the related art adopts a method of storing the meta information of RG in the global cache of the computing node. If multiple threads need to access or modify the meta information, since the meta information is a shared resource, they must synchronize access through a global lock to avoid data competition and inconsistency. This lock mechanism will increase the waiting time of the thread and reduce concurrency performance, because when a thread holds the lock, other threads must wait for the lock to be released. In addition, each thread reads the meta information of RG from the global cache, which may cause the thread to switch, and the above methods will cause additional overhead and reduce read and write performance.
[0076] To address the above problems, in the present disclosure, the meta information of the RG can be stored locally in each thread to effectively avoid the extra overhead caused by thread switching and global locks, thereby improving the read and write performance.
[0077] Therefore, in the embodiment of the present disclosure, the meta information of the target RG can be directly read from the local of the target thread.
[0078] Step S203: Determine, according to the meta information, a target block service associated with the target RG from a plurality of block services of storage nodes in the distributed block storage system.
[0079] In the embodiment of the present disclosure, the target thread may determine the target block server associated with the target RG from multiple block servers (Blockservers) of the storage nodes in the distributed block storage system according to the meta information of the target RG.
[0080] Step S204: serialize the data access request based on a first serialization protocol adapted to the fast path processing strategy to obtain a first access request.
[0081] The first serialization protocol refers to a serialization protocol with relatively high serialization performance and deserialization performance. Exemplarily, the first serialization protocol may be the Flatbuffers protocol (an efficient serialization protocol).
[0082] In an embodiment of the present disclosure, the target thread may perform serialization processing on the data access request based on a first serialization protocol adapted to the fast path processing strategy to obtain a first access request.
[0083] Step S205: Send a first access request to the target block service based on the fast path sending mode.
[0084] The first access request is used by the target block service to access the target RG, and obtains a first access response.
[0085] For the explanation of step S205, reference may be made to the relevant description in any embodiment of the present disclosure, and no further details will be given here.
[0086] In any one of the embodiments of the present disclosure, a data access request or a first access request may be stored in a user space (memory space) of a first protocol stack in user state of a computing node, and a fast path sending method, for example, is to send the first access request in the user space to a target block service through a protocol corresponding to the first protocol stack in user state.
[0087] Exemplarily, taking the first protocol stack as a TCP (Transmission Control Protocol) protocol stack, the first access request can be stored in the user space of the user-state TCP protocol stack of the computing node, and the target thread or computing node can send the first access request in the user space to the target block service through the user-state TCP protocol.
[0088] Therefore, when the distributed block storage system is in a normal state (i.e., no abnormality occurs), communication with the target block service is performed directly on the user space side, without writing the request in the user space into the kernel space and communicating with the target block service on the kernel space side. This can reduce communication latency and thus improve data access efficiency.
[0089] Step S206: upon receiving the first access response sent by the target block service, send a first access response to the client.
[0090] For the explanation of step S206, reference may be made to the relevant description in any embodiment of the present disclosure, and no further details will be given here.
[0091] The data access method of the disclosed embodiment, when the path state is fast path, that is, when the distributed block storage system has no abnormality, uses a first serialization protocol (such as Flatbuffers protocol) with relatively high serialization performance and deserialization performance to process data access requests. The first serialization protocol can reuse the previously generated RPC message to send the first access response to the target block service, which can improve RPC performance. In addition, for the fast path processing strategy, the meta information of the target RG is read directly from the thread local, which can avoid the additional overhead caused by thread switching and global locks, thereby improving read and write performance.
[0092] In order to clearly illustrate how the data access request is processed based on the target processing strategy adapted to the path state in the above embodiment, a first access request is obtained, and a target block service associated with the target RG is determined from multiple block services of the storage node in the distributed block storage system, the present disclosure also proposes a data access method.
[0093] Figure 3 This is a flowchart of the data access method provided in the third embodiment of the present disclosure.
[0094] like Figure 3 As shown, the data access method may include the following steps S301 to S306:
[0095] Step S301, in response to receiving a data access request sent by a client, determining a target replication group RG to be accessed, and querying a path status of an IO path; wherein the path status is a slow path or a waiting path.
[0096] The slow path is used to indicate that the distributed block storage system is in an abnormal state, for example, the network environment of the distributed block storage system is in an abnormal state, and / or at least one machine in the distributed block storage system is in an abnormal state.
[0097] The waiting path is used to instruct the distributed block storage system to recover from an abnormal state to a normal state.
[0098] Among them, the target processing strategy adapted to the slow path or the waiting path may be the slow path processing strategy.
[0099] For the explanation of step S301, reference may be made to the relevant description in any embodiment of the present disclosure, and no further details will be given here.
[0100] Step S302: Read the meta information of the target RG from the global cache of the computing node.
[0101] In the embodiment of the present disclosure, for the slow path processing strategy, the meta information of each RG may be stored in the global cache of the computing node, so that in the present disclosure, the meta information of the target RG may be directly read from the global cache of the computing node.
[0102] Step S303: Determine, according to the meta information, a target block service associated with the target RG from a plurality of block services of storage nodes in the distributed block storage system.
[0103] In the implementation of the present disclosure, the computing node may determine the target block server associated with the target RG from multiple block servers (Blockservers) of the storage nodes in the distributed block storage system according to the meta information of the target RG.
[0104] Step S304: serialize the data access request based on a second serialization protocol adapted to the slow path processing strategy to obtain a first access request.
[0105] The serialization performance of the second serialization protocol is lower than the serialization performance of the first serialization protocol, and the deserialization performance of the second serialization protocol is lower than the deserialization performance of the first serialization protocol. That is, the second serialization protocol refers to a serialization protocol with relatively low serialization performance and deserialization performance. For example, the second serialization protocol may be a Protobuf protocol, and the first serialization protocol may be a Flatbuffers protocol.
[0106] In an embodiment of the present disclosure, the computing node may perform serialization processing on the data access request based on a second serialization protocol adapted to the slow path processing strategy to obtain a first access request.
[0107] Step S305: Send a first access request to the target block service based on the slow path sending mode.
[0108] The first access request is used by the target block service to access the target RG, and obtains a first access response.
[0109] For the explanation of step S305, reference may be made to the relevant description in any embodiment of the present disclosure, and no further details will be given here.
[0110] In any embodiment of the present disclosure, a data access request or a first access request can be stored in the user space of a computing node, and a slow path sending method is, for example: first, calling the second protocol stack of the operating system kernel state through the RPC protocol to enter the kernel state and send an interrupt instruction to the processor; wherein the interrupt instruction is used to interrupt the current task of the processor, and then, writing the first access request in the user space into the kernel space (memory space) of the computing node, and sending the first access request in the kernel space to the target block service through the protocol corresponding to the second protocol stack.
[0111] Exemplarily, taking the second protocol stack as the TCP / IP (Internet Protocol) protocol stack, the first access request can be stored in the user space of the computing node. The computing node can call the TCP / IP protocol stack in the kernel state of the operating system through the RPC protocol. The TCP / IP protocol stack in the kernel state initiates a system call, enters the kernel state, and sends an interrupt instruction to the processor (such as CPU (Central Processing Unit)) to interrupt the current task of the processor. After that, the first access request in the user space can be written into the kernel space of the computing node, and the first access request in the kernel space can be sent to the target block service through the TCP protocol.
[0112] Therefore, when the distributed block storage system is not in a normal state, communicating with the target block service on the kernel space side can ensure the effectiveness of communication and the stability and availability of the distributed block storage system.
[0113] Step S306: upon receiving the first access response sent by the target block service, send a first access response to the client.
[0114] For the explanation of step S306, reference may be made to the relevant description in any embodiment of the present disclosure, and no further details will be given here.
[0115] In the data access method of the disclosed embodiment, when the path status is a slow path or a waiting path, that is, when an abnormality occurs in the distributed system, the computing node adopts a slow path processing strategy to process the data access request and determine the target block service, and adopts a slow path sending method to send the processed request to the target block service, thereby ensuring the stability and availability of the distributed storage system.
[0116] In order to clearly illustrate any embodiment of the present disclosure, the present disclosure also proposes a data access method.
[0117] Figure 4 This is a flowchart of the data access method provided in the fourth embodiment of the present disclosure.
[0118] like Figure 4 As shown, the data access method may include the following steps S401 to S409:
[0119] Step S401, in response to receiving a data access request sent by a client, determining a target replication group RG to be accessed, and querying a path state of an IO path; wherein the path state is a fast path.
[0120] The fast path is used to indicate that the distributed block storage system is in a normal state.
[0121] Step S402: adopt a fast path processing strategy to process the data access request to obtain a first access request, and determine a target block service associated with the target RG from multiple block services of storage nodes in the distributed block storage system.
[0122] Step S403: Send a first access request to the target block service based on the fast path sending mode.
[0123] The first access request is used by the target block service to access the target RG, and obtains a first access response.
[0124] For explanations of steps S401 to S403, reference may be made to the relevant descriptions in any embodiment of the present disclosure, and will not be repeated here.
[0125] Step S404, when receiving the access success response sent by the target block service, query whether the path status of the IO path at the current moment is still a fast path, if so, execute step S405, if not, execute step S406 and subsequent steps.
[0126] Step S405: Send an access success response to the client.
[0127] In any embodiment of the present disclosure, when a computing node receives an access success response sent by a target block service and the path state of the IO path at the current moment is still a fast path, the computing node can directly forward the access success response to the client.
[0128] In any embodiment of the present disclosure, when a computing node receives an access success response sent by a target block service, and the path state of the IO path at the current moment changes from a fast path to a slow path or a waiting path, and the data access request is a read request, the computing node can forward the access success response to the client.
[0129] Step S406, determining whether the data access request is a read request, if so, executing step S405, if not, executing steps S407 to S409.
[0130] In an embodiment of the present disclosure, when the path state of the IO path at the current moment changes from a fast path to a slow path or a waiting path, the computing node can further determine whether the data access request is a read request. If so, execute step S405; if not, execute steps S407 to S409.
[0131] It should be noted that step S405 and steps S407 to S409 are two parallel implementation methods. In actual application, only one needs to be executed.
[0132] Step S407: Process the data access request based on the slow path processing strategy to obtain a second access request.
[0133] In an embodiment of the present disclosure, when the path state of the IO path changes from a fast path to a slow path or a waiting path, and the data access request is a write request, in order to avoid the situation where the data is not completely written to the target RG, in the present disclosure, the computing node can process the data access request based on the slow path processing strategy to obtain a second access request.
[0134] Exemplarily, the computing node may use a second serialization protocol adapted to the slow path processing strategy to serialize the data access request to obtain a second access request.
[0135] Step S408: Send a second access request to the target block service based on the slow path sending mode.
[0136] The second access request is used by the target block service to access the target RG, and obtains a second access response.
[0137] It should be noted that the implementation principle of step S408 is similar to that of step S305, and will not be elaborated here.
[0138] Step S409: upon receiving the second access response sent by the target block service, send a second access response to the client.
[0139] In the embodiment of the present disclosure, when the computing node receives the second access response (such as an access success response) sent by the target block service, the second access response may be sent to the client.
[0140] According to the data access method of the disclosed embodiment, when the distributed block storage system is in a normal state, the data read by the target block service from the target RG is the latest, and there is no need to read repeatedly to verify the consistency of the data, which can reduce the system load and response time, thereby improving the system performance.
[0141] When the distributed block storage system is not in a normal state, but successfully receives an access success response (i.e., a read success response) sent by the target block service, there is no need to repeat the reading to verify the consistency of the data, so that the distributed block storage system can efficiently process read requests while maintaining data reliability and consistency.
[0142] When the distributed block storage system is not in a normal state, even if the computing node receives an access success response (i.e., a write success response) sent by the target block service, there may still be potential problems such as data not being completely written to the cloud disk. By sending the write request again, it can be further confirmed that the data is indeed written correctly, thereby improving the consistency and reliability of the data and significantly reducing the risk of data loss due to a single operation failure.
[0143] In order to clearly illustrate any embodiment of the present disclosure, the present disclosure also proposes a data access method.
[0144] Figure 5 This is a flowchart of the data access method provided in Embodiment 5 of the present disclosure.
[0145] like Figure 5 As shown, the data access method may include the following steps S501 to S510:
[0146] Step S501, in response to receiving a data access request sent by a client, determining a target replication group RG to be accessed, and querying a path state of an IO path; wherein the path state is a fast path.
[0147] The fast path is used to indicate that the distributed block storage system is in a normal state.
[0148] Step S502: adopt a fast path processing strategy to process the data access request to obtain a first access request, and determine a target block service associated with the target RG from multiple block services of storage nodes in the distributed block storage system.
[0149] Step S503: Send a first access request to the target block service based on the fast path sending mode.
[0150] The first access request is used by the target block service to access the target RG, and obtains a first access response.
[0151] For explanations of steps S501 to S503, reference may be made to the relevant descriptions in any embodiment of the present disclosure, and will not be repeated here.
[0152] Step S504, when an access failure response is received from the target block service, or when no access success response is received from the target block service within a set period of time after sending the first access request, query whether the path status of the IO path at the current moment is still a fast path. If so, execute steps S505 to S508, if not, execute steps S509 to S510.
[0153] The duration of the set time period is preset. For example, the set time period may be within N seconds after the first access request is sent, where N is a preset duration parameter and is a positive number.
[0154] It should be noted that steps S505 to S508 and steps S509 to S510 are two parallel implementation methods. In actual application, only one needs to be executed.
[0155] Step S505, query whether there is a read or write request processed by the slow path processing strategy, if so, execute step S506, if not, execute steps S507 to S508.
[0156] In the embodiment of the present disclosure, when the path state of the IO path at the current moment is still a fast path, the computing node can further query whether there are read and write requests processed by the slow path processing strategy at the current moment. If so, execute step S506; if not, execute steps S507 to S508.
[0157] It should be noted that step S506 and steps S507 to S508 are two parallel implementation methods. In actual application, only one needs to be executed.
[0158] Step S506: resend the first access request to the target block service based on the fast path sending mode, so that the target block service re-accesses the target RG.
[0159] In an embodiment of the present disclosure, when there are read and write requests processed by the slow path processing strategy at the current moment, the computing node can re-send the first access request to the target block service based on the fast path sending method, so that the target block service re-accesses the target RG based on the first access request, obtains an access response (including an access success response or an access failure response), and sends the access response to the computing node.
[0160] Step S507: switch the path state of the IO path from the fast path to the slow path, and process the data access request based on the slow path processing strategy to obtain a third access request.
[0161] In an embodiment of the present disclosure, when there are no read or write requests processed by the slow path processing strategy at the current moment, the computing node can switch the path state of the IO path from the fast path to the slow path, and process the data access request based on the slow path processing strategy to obtain a third access request.
[0162] Exemplarily, a second serialization protocol adapted to the slow path processing strategy may be used to serialize the data access request to obtain a third access request.
[0163] Step S508: Based on the slow path sending mode, a third access request is sent to the target block service, so that the target block service re-accesses the target RG.
[0164] In the disclosed embodiment, the computing node may send a third access request to the target block service based on a slow path sending method, so that the target block service re-accesses the target RG based on the third access request, obtains an access response (including an access success response or an access failure response), and sends the access response to the computing node.
[0165] Step S509: Process the data access request based on the slow path processing strategy to obtain a fourth access request.
[0166] In the disclosed embodiment, when the path state of the IO path at the current moment changes from a fast path to a slow path or a waiting path, the computing node can process the data access request based on the slow path processing strategy to obtain a fourth access request.
[0167] Exemplarily, the computing node may use a second serialization protocol adapted to the slow path processing strategy to serialize the data access request to obtain a fourth access request.
[0168] Step S510: Based on the slow path sending mode, a fourth access request is sent to the target block service, so that the target block service re-accesses the target RG.
[0169] In an embodiment of the present disclosure, the computing node can send a fourth access request to the target block service based on a slow path sending method, so that the target block service re-accesses the target RG based on the fourth access request, obtains an access response (including an access success response or an access failure response), and sends the access response to the computing node.
[0170] In the data access method of the disclosed embodiment, when no abnormality occurs in the distributed block storage system but data access fails, the computing node can query whether there are read and write requests processed by the slow path processing strategy, and based on the query results, use targeted means to send access requests to the target block service, which can not only improve the effectiveness and success rate of data access, but also ensure the efficiency of data access, reduce the user's waiting time, and improve the user's experience.
[0171] In the event of an abnormality in the distributed block storage system, the computing node sends an access request to the target block service again, which can improve the effectiveness and success rate of data access and ensure the stability and availability of the system.
[0172] In order to clearly illustrate any embodiment of the present disclosure, the present disclosure also proposes a data access method.
[0173] Figure 6 This is a flowchart of the data access method provided in Embodiment 6 of the present disclosure.
[0174] like Figure 6As shown, the data access method may include the following steps S601 to S606:
[0175] Step S601, in response to receiving a data access request sent by a client, determining a target replication group RG to be accessed, and querying a path status of an IO path; wherein the path status is a slow path or a waiting path.
[0176] The slow path is used to indicate that the distributed block storage system is in an abnormal state, and the waiting path is used to indicate that the distributed block storage system recovers from the abnormal state to the normal state.
[0177] Step S602: adopt a slow path processing strategy to process the data access request to obtain a first access request, and determine a target block service associated with the target RG from multiple block services of storage nodes in the distributed block storage system.
[0178] Step S603: Send a first access request to the target block service based on the slow path sending mode.
[0179] The first access request is used by the target block service to access the target RG, and obtains a first access response.
[0180] For explanations of steps S601 to S603, reference may be made to the relevant descriptions in any embodiment of the present disclosure, and will not be repeated here.
[0181] Step S604: upon receiving a first access response sent by the target block service, extract a first Applyindex (application index) from the first access response.
[0182] In an embodiment of the present disclosure, when a computing node receives a first access response sent by a target block service, a first Applyindex can be extracted from the first access response; wherein the first Applyindex is used to indicate the current execution log of the target RG, that is, to indicate which log the target RG is currently executing.
[0183] Step S605, determining whether the second Applyindex stored locally in the computing node is less than or equal to the first Applyindex.
[0184] The second Applyindex is used to indicate the execution log of the last writing to the target RG.
[0185] In the disclosed embodiment, the computing node can determine whether the second Applyindex is less than or equal to the first Applyindex. If so, it indicates that the data accessed this time is the latest data in the target RG. At this time, step S606 can be executed. If not, it indicates that the data accessed this time is not the latest data in the target RG. At this time, an access request can be resent to the target block service to enable the target block service to re-access the target RG.
[0186] Step S606: If the second Applyindex is less than or equal to the first Applyindex, a first access response is sent to the client.
[0187] In the embodiment of the present disclosure, when the second Applyindex is less than or equal to the first Applyindex, it indicates that the data accessed this time is the latest data in the target RG. At this time, the computing node can forward the first access response to the client.
[0188] In any embodiment of the present disclosure, the computing node may also use the following steps A to D to send a first access response to the client:
[0189] Step A: When the second Applyindex is less than or equal to the first Applyindex, the computing node can query whether the path status of the IO path at the current moment is a slow path. If so, execute steps B to C; if not, execute step D.
[0190] It should be noted that steps B to C and step D are two parallel implementation methods. In actual application, only one needs to be executed.
[0191] Step B: When the path state of the IO path at the current moment is still a slow path, the computing node may set the path state of the IO path to a waiting path, and send a first access response to the client.
[0192] Step C: in response to the path state of the IO path staying for a period of time in the waiting path exceeding a set threshold, the path state of the IO path is set to a fast path.
[0193] Step D: When the path state of the IO path at the current moment is a waiting path, the computing node may set the path state of the IO path to a fast path, and send a first access response to the client.
[0194] Therefore, when the distributed block storage system is in an abnormal state, the path state of the IO path can be updated and maintained in a timely manner based on the first access response received by the computing node to improve the stability and availability of the system.
[0195] The data access method of the disclosed embodiment can perform validity verification on the first access response received by the computing node based on Applyindex when the distributed block storage system is in an abnormal state to determine whether the data accessed this time is the latest data in the target RG. If so, the first access response is sent to the client, which can improve the accuracy of data access and further improve the user experience.
[0196] In order to clearly illustrate any embodiment of the present disclosure, the present disclosure also proposes a data access method.
[0197] Figure 7 This is a flow chart of the data access method provided in Embodiment 7 of the present disclosure.
[0198] like Figure 7 As shown, the data access method may include the following steps S701 to S709:
[0199] Step S701, in response to receiving a data access request sent by a client, determining a target replication group RG to be accessed, and querying a path status of an input / output IO path; wherein the path status is a slow path or a waiting path.
[0200] The slow path is used to indicate that the distributed block storage system is in an abnormal state, and the waiting path is used to indicate that the distributed block storage system recovers from the abnormal state to the normal state.
[0201] Step S702: adopt a slow path processing strategy to process the data access request to obtain a first access request, and determine a target block service associated with the target RG from multiple block services of storage nodes in the distributed block storage system.
[0202] Step S703: Send a first access request to the target block service based on the slow path sending mode.
[0203] The first access request is used by the target block service to access the target RG, and obtains a first access response.
[0204] Step S704, determine whether an access success response sent by the target block service is received, if so, execute step S705, if not, execute steps S706 to S709.
[0205] It should be noted that step S705 and steps S706 to S709 are two parallel implementation methods. In actual application, only one needs to be executed.
[0206] Step S705: Send an access success response to the client.
[0207] For explanations of steps S701 to S705, reference may be made to the relevant descriptions in any embodiment of the present disclosure, and will not be repeated here.
[0208] Step S706, query whether the path status of the IO path at the current moment is a fast path, if so, execute steps S708 to S709, if not, execute step S707.
[0209] In an embodiment of the present disclosure, when a computing node receives an access failure response sent by a target block service, or when a computing node does not receive an access success response sent by a target block service within a set period of time after sending a first access request, the computing node may further query whether the path status of the IO path at the current moment is a fast path. If so, steps S708 to S709 are performed; if not, step S707 is performed.
[0210] It should be noted that step S707 and steps S708 to S709 are two parallel implementation methods. In actual application, only one needs to be executed.
[0211] Step S707: resend the first access request to the target block service based on the slow path sending mode, so that the target block service re-accesses the target RG.
[0212] In an embodiment of the present disclosure, when the path state of the IO path at the current moment is a slow path or a waiting path, the computing node can re-send the first access request to the target block service based on the slow path sending mode, so that the target block service re-accesses the target RG according to the first access request, obtains an access response (including an access success response or an access failure response), and sends the access response to the computing node.
[0213] Step S708: Process the data access request based on the fast path processing strategy to obtain a fifth access request.
[0214] In the disclosed embodiment, when the path state of the IO path at the current moment changes from a slow path or a waiting path to a fast path, the computing node can process the data access request based on the fast path processing strategy to obtain a fifth access request.
[0215] Exemplarily, the computing node may use a first serialization protocol adapted to the fast path processing strategy to serialize the data access request to obtain a fifth access request.
[0216] Furthermore, when the path state of the IO path at the current moment changes from a slow path or a waiting path to a fast path, the count value of the first counter corresponding to the slow path can be reduced, and the count value of the second counter corresponding to the fast path can be increased; wherein the count values of the first counter and the second counter are used to control the unloading and mounting of the cloud disk corresponding to the distributed block storage system.
[0217] Step S709: Based on the fast path sending mode, a fifth access request is sent to the target block service, so that the target block service re-accesses the target RG.
[0218] In an embodiment of the present disclosure, the computing node can send a fifth access request to the target block service based on the fast path sending method, so that the target block service re-accesses the target RG based on the fifth access request, obtains an access response (including an access success response or an access failure response), and sends the access response to the computing node.
[0219] The data access method of the disclosed embodiment can improve the effectiveness and success rate of data access and ensure system stability and availability by allowing the computing node to send an access request to the target block service again when an abnormality occurs in the distributed block storage system.
[0220] In any embodiment of the present disclosure, the present disclosure proposes a method for improving the processing performance of read and write requests, which can provide better read and write performance when the network quality is good, and can still maintain the high availability of the distributed block storage system when an abnormality occurs in the network.
[0221] As an example, the first serialization protocol is Flatbuffers protocol and the second serialization protocol is Protobuf protocol. This disclosure designs a new IO path that can improve the read and write performance of cloud disks. Among them, for read and write requests, they need to be processed by the Executor module on the computing node, first obtain the metadata of the corresponding RG from the Master module of the control node, and then send the read and write requests to the Blockserver of the storage node according to the metadata.
[0222] In the new IO path, a record of meta information is saved in each thread to avoid the extra overhead caused by thread switching and global locks, thereby improving read and write performance. This mode can also make better use of the Polling mode for reading and writing, further improving performance. At the same time, the new IO path can adopt the Flatbuffers protocol with better serialization performance, and can reuse previously generated RPC messages to improve RPC performance. In addition, since high-performance scenarios rely on the stability of the network environment, for high-performance products, when the performance is maximized, it can be assumed that the network quality is good, and there is no need to go through logical judgments such as reading from the node and local writing. The optimized IO path is more streamlined than the original IO path, and it only needs to simply forward the read and write requests. In the case of an abnormality in the network environment of the distributed block storage system, it is necessary to switch the IO path to a normal path (that is, the original IO path) to ensure the stability and availability of the system.
[0223] The new IO path is more streamlined than the original IO path and is called the fast path, while the original IO path is called the slow path. When the network environment of the distributed block storage system is normal, the Executor module runs in the fast path mode. When the network environment of the distributed block storage system is abnormal, it needs to be switched to the slow path mode.
[0224] Among them, the IO path has three states: FAST, SLOW, and WAIT. The path switching algorithm is as follows:
[0225] First, the fast path switches to the slow path. The implementation principle is as follows Figure 8 As shown, it mainly includes the following steps:
[0226] Step S801, when a data access request arrives, determine whether the path status of the IO path is a fast path, if not, execute step S802, if yes, execute step S803 and subsequent steps.
[0227] Step S802: Process the data access request using a slow path processing strategy, and send the processed request to the Blockserver based on a slow path sending method.
[0228] Step S803: Process the data access request using a fast path processing strategy, and use a fast path sending method to send the processed request to the Blockserver based on an RPC message.
[0229] Step S804, determine whether the IO return is successful, that is, determine whether the Blockserver returns an access success response. If so, execute step S805, if not, execute step S808.
[0230] Step S805, determining whether the path state of the IO path is still a fast path at the current moment, if so, executing step S806, if not, executing step S807.
[0231] Step S806: Return a successful access response to the user.
[0232] Step S807, determining whether the data access request is a read request, if so, executing step S806, if not, executing step S802.
[0233] Step S808, determining whether the path status of the IO path is still a fast path at the current moment, if so, executing step S809 and subsequent steps, if not, executing step S802.
[0234] Step S809, determine whether there is a read / write request processed by the slow path processing strategy. If so, execute step S803 to resend the processed request to the Blockserver based on the fast path sending method; if not, execute step S810.
[0235] Step S810, clear the read follower information, that is, clear the Applyindex read from the Follower.
[0236] Step S811, setting the path status of the IO path to SLOW, and returning to execute step S802.
[0237] That is to say, for a new data access request initiated by a user, the path status of the current IO path can be checked. If the path status is SLOW / WAIT, the request is processed through the slow path processing strategy, and the processed request is sent through the slow path sending method. If the path status is FAST, the request is processed through the fast path processing strategy, and the processed request is sent through the fast path sending method.
[0238] When Blockserver returns an access response, it can check whether the data access is successful. If the data access is successful, the path status of the current IO path is further queried. If it is FAST, the access response is directly returned to the user. If it is not FAST, if the data access request is a read request, the access response is directly returned to the user. If the data access request is a write request, the request is re-processed through the slow path processing strategy, and the processed request is sent through the slow path sending method.
[0239] If data access fails, the path status of the current IO path is further queried. If it is FAST, it is determined whether all read and write requests on the slow path have been processed. If so, the read slave information is cleared and the path status of the IO path is set to SLOW.
[0240] Second, the slow path switches to the fast path. The implementation principle is as follows Fig. 9 As shown, it mainly includes the following steps:
[0241] Step S901, when a data access request arrives, determine whether the path status of the IO path is a fast path, if not, execute step S902, if yes, execute step S903 and subsequent steps.
[0242] Step S902: Process the data access request using a fast path processing strategy, and send the processed request to the Blockserver using a fast path sending method.
[0243] Step S903: Process the data access request with a slow path processing strategy, and use a slow-fast path sending method to send the processed request to the Blockserver based on the RPC message.
[0244] Step S904, determine whether the IO return is successful, that is, determine whether the Blockserver returns an access success response. If so, execute step S905, if not, execute step S909.
[0245] Step S905 , determining whether the path state of the IO path can be switched to a fast path, if so, executing steps S906 to S907 , if not, executing steps S908 to S907 .
[0246] Step S906: Set the path state of the IO path to FAST.
[0247] Step S907: Return a successful access response to the user.
[0248] Step S908, setting the path state of the IO path to WAIT, and executing step S907.
[0249] When the length of time that the path state of an IO path stays in WAIT exceeds a certain threshold, the path state of the IO path may be set to FAST.
[0250] Step S909, determine whether the path state of the IO path is a fast path at the current moment, if so, execute step S910, if not, execute step S903, and resend the processed request to the Blockserver based on the slow path sending mode.
[0251] Step S910, reducing the count value of the first counter corresponding to the slow path, increasing the count value of the second counter corresponding to the fast path, and returning to step S902.
[0252] That is to say, for a new data access request initiated by a user, the path status of the current IO path can be checked. If the path status is SLOW / WAIT, the request is processed through the slow path processing strategy, and the processed request is sent through the slow path sending method. If the path status is FAST, the request is processed through the fast path processing strategy, and the processed request is sent through the fast path sending method.
[0253] When the Blockserver returns an access response, you can check whether the data access is successful. If the data access is successful, set the path state of the IO path to WAIT, and when the path state of the IO path stays in WAIT for more than a certain threshold, set the path state of the IO path to FAST. If the data access fails, continue to retry on the slow path.
[0254] In summary, in high-performance cloud disk products, in order to provide ultra-high IOPS capabilities, a new IO path (i.e., fast path) can be introduced, and a fast and slow path switching algorithm can be used to ensure the availability of the distributed block storage system under abnormal conditions. The new IO path can provide extreme performance, and in the case of an unstable network environment, the IO path switching can achieve the purpose of ensuring system stability and availability.
[0255] The technical solution provided by the present disclosure can improve the read and write performance of cloud disks, and can be used to support the launch of enhanced cloud disk products with ultra-high performance IOPS. It is suitable for IO-intensive application products with particularly frequent disk access and high IO latency requirements, such as large databases, various enterprise-level applications, etc.
[0256] With the above Figures 1 to 9 Corresponding to the data access method provided in the embodiment, the present disclosure also provides a data access device. Figures 1 to 9 The data access method provided in the embodiment corresponds to the data access method, so the implementation of the data access method is also applicable to the data access device provided in the embodiment of the present disclosure, and will not be described in detail in the embodiment of the present disclosure.
[0257] Fig.10 This is a structural diagram of the data access device provided in the tenth embodiment of the present disclosure.
[0258] like Fig.10 As shown, the data access device 1000 can be applied to a computing node in a distributed block storage system, and includes: a determination module 1010 , a processing module 1020 and a sending module 1030 .
[0259] The determination module 1010 is used to determine the target replication group RG to be accessed in response to receiving a data access request sent by the client, and query the path status of the input / output IO path; wherein the path status is used to indicate whether an abnormality occurs in the distributed block storage system;
[0260] The processing module 1020 is used to process the data access request by adopting a target processing strategy adapted to the path state, obtain a first access request, and determine a target block service associated with the target RG from a plurality of block services of the storage node in the distributed block storage system;
[0261] The sending module 1030 is used to send a first access request to the target block service based on a target sending mode adapted to the path state; wherein the first access request is used to access the target RG to obtain a first access response;
[0262] The sending module 1030 is further configured to send a first access response to the client upon receiving a first access response sent by the target block service.
[0263] In a possible implementation of the embodiment of the present disclosure, the data access device 1000 is applied to a target thread in a computing node, the path state is a fast path, the target processing strategy is a fast path processing strategy, and the fast path is used to indicate that the distributed block storage system is in a normal state; the processing module 1020 is used to: read the metadata of the target RG from the local of the target thread; determine the target block service associated with the target RG from multiple block services based on the metadata; serialize the data access request based on the first serialization protocol adapted to the fast path processing strategy to obtain a first access request.
[0264] In a possible implementation of the embodiment of the present disclosure, the target sending mode is a fast path sending mode, and the first access request is stored in the user space of the first protocol stack in the user state of the computing node; the sending module 1030 is used to: send the first access request in the user space to the target block service through the protocol corresponding to the first protocol stack in the user state.
[0265] In a possible implementation of the embodiment of the present disclosure, the path state is a slow path or a waiting path, the target processing strategy is a slow path processing strategy, the slow path is used to indicate that the distributed block storage system is in an abnormal state, and the waiting path is used to indicate that the distributed block storage system recovers from the abnormal state to a normal state; the processing module 1020 is used to: read the metadata of the target RG from the global cache of the computing node; determine the target block service associated with the target RG from multiple block services based on the metadata; serialize the data access request based on a second serialization protocol adapted to the slow path processing strategy to obtain a first access request; wherein the serialization performance of the second serialization protocol is lower than the serialization performance of the first serialization protocol, and the deserialization performance of the second serialization protocol is lower than the deserialization performance of the first serialization protocol.
[0266] In a possible implementation of the embodiment of the present disclosure, the target sending mode is a slow path sending mode, and the first access request is stored in the user space of the computing node; the sending module 1030 is used to: call the second protocol stack of the operating system kernel state through the remote procedure call RPC protocol to enter the kernel state and send an interrupt instruction to the processor; wherein the interrupt instruction is used to interrupt the current task of the processor; write the first access request in the user space into the kernel space of the computing node; and send the first access request in the kernel space to the target block service through the protocol corresponding to the second protocol stack.
[0267] In a possible implementation of the embodiment of the present disclosure, the path state is a fast path, and the first access response is an access success response; the sending module 1030 is used to: upon receiving an access success response sent by the target block service, query whether the path state of the IO path at the current moment is still a fast path; if it is still a fast path, send an access success response to the client; if it is not a fast path, determine whether the data access request is a read request; if the data access request is a read request, send an access success response to the client.
[0268] In a possible implementation of the embodiment of the present disclosure, the processing module 1020 is further configured to: when the data access request is a write request, process the data access request based on a slow path processing strategy to obtain a second access request;
[0269] The sending module 1030 is further used to: send a second access request to the target block service based on the slow path sending mode; wherein the second access request is used for the target block service to access the target RG to obtain a second access response;
[0270] The sending module 1030 is further configured to: upon receiving a second access response sent by the target block service, send a second access response to the client.
[0271] In a possible implementation of the embodiment of the present disclosure, the path state is a fast path, the first access response is an access success response, and the data access device 1000 further includes:
[0272] A first query module is used to query whether the path state of the IO path at the current moment is still a fast path when an access failure response sent by the target block service is received, or when an access success response sent by the target block service is not received within a set period of time after sending the first access request;
[0273] The second query module is used to query whether there is a read / write request processed by the slow path processing strategy if it is still a fast path;
[0274] The sending module 1030 is further configured to: if it exists, re-send the first access request to the target block service based on the fast path sending mode, so that the target block service re-accesses the target RG;
[0275] The processing module 1020 is further configured to: if the access request does not exist, switch the path state of the IO path from a fast path to a slow path, and process the data access request based on the slow path processing strategy to obtain a third access request;
[0276] The sending module 1030 is further configured to: send a third access request to the target block service based on the slow path sending mode, so that the target block service re-accesses the target RG.
[0277] In a possible implementation of the embodiment of the present disclosure, the processing module 1020 is further configured to: if it is not a fast path, process the data access request based on a slow path processing strategy to obtain a fourth access request;
[0278] The sending module 1030 is further configured to: send a fourth access request to the target block service based on the slow path sending mode, so that the target block service re-accesses the target RG.
[0279] In a possible implementation of the embodiment of the present disclosure, the path state is a slow path or a waiting path, and the sending module 1030 is used to: upon receiving a first access response sent by the target block service, extract a first application index Applyindex from the first access response; wherein the first Applyindex is used to indicate the current execution log of the target RG; determine whether the second Applyindex stored locally in the computing node is less than or equal to the first Applyindex; wherein the second Applyindex is used to indicate the execution log of the target RG when it was last written; if the second Applyindex is less than or equal to the first Applyindex, send a first access response to the client.
[0280] In a possible implementation of the embodiment of the present disclosure, the sending module 1030 is used to: if the second Applyindex is less than or equal to the first Applyindex, query whether the path state of the IO path at the current moment is a slow path; if the path state of the IO path at the current moment is still a slow path, set the path state of the IO path to a waiting path, and send a first access response to the client; in response to the path state of the IO path staying in the waiting path for longer than a set threshold, set the path state of the IO path to a fast path; if the path state of the IO path at the current moment is a waiting path, set the path state of the IO path to a fast path, and send the first access response to the client.
[0281] In a possible implementation of the embodiment of the present disclosure, the first access response is an access success response, the path state is a slow path or a waiting path, and the data access device 1000 further includes:
[0282] A third query module is used to query whether the path state of the IO path at the current moment is a fast path when an access failure response sent by the target block service is received, or when an access success response sent by the target block service is not received within a set period of time after sending the first access request;
[0283] The sending module 1030 is further configured to: if not, re-send the first access request to the target block service based on the slow path sending mode, so that the target block service re-accesses the target RG;
[0284] The processing module 1020 is further configured to: if yes, process the data access request based on the fast path processing strategy to obtain a fifth access request;
[0285] The sending module 1030 is further configured to: send a fifth access request to the target block service based on a fast path sending mode, so that the target block service re-accesses the target RG.
[0286] The data access device of the disclosed embodiment determines a specific processing strategy for a data access request from multiple processing strategies and a specific sending mode for a data access request from multiple sending modes based on the path status of a real-time IO path in a distributed block storage system. This can take into account the read and write performance, reliability, and availability of the distributed block storage system, reduce data access time, and improve user experience.
[0287] In order to implement the above embodiments, the present disclosure also provides an electronic device, which may include at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the data access method proposed in any of the above embodiments of the present disclosure.
[0288] In order to implement the above embodiments, the present disclosure further provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the data access method proposed in any of the above embodiments of the present disclosure.
[0289] In order to implement the above embodiments, the present disclosure further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the data access method proposed in any of the above embodiments of the present disclosure.
[0290] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0291] Fig.11 A schematic block diagram of an example electronic device that can be used to implement embodiments of the present disclosure is shown.
[0292] Among them, the electronic device may include the server and the client in the above-mentioned embodiment. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices and other similar computing devices. The components shown herein, their connections and relationships, and their functions are only examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0293] like Fig.11As shown, the electronic device 1100 includes a computing unit 1101, which can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 1102 or a computer program loaded from a storage unit 1107 to a RAM (Random Access Memory) 1103. In the RAM 1103, various programs and data required for the operation of the device 1100 can also be stored. The computing unit 1101, the ROM 1102, and the RAM 1103 are connected to each other via a bus 1104. An I / O (Input / Output) interface 1105 is also connected to the bus 1104.
[0294] A number of components in the device 1100 are connected to the I / O interface 1105, including: an input unit 1106, such as a keyboard, a mouse, etc.; an output unit 1107, such as various types of displays, speakers, etc.; a storage unit 1108, such as a disk, an optical disk, etc.; and a communication unit 1109, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1109 allows the device 1100 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0295] The computing unit 1101 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1101 include, but are not limited to, CPUs, GPUs (Graphic Processing Units), various dedicated AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, DSPs (Digital Signal Processors), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1101 performs the various methods and processes described above, such as the above-described data access method. For example, in some embodiments, the above-described data access method may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 1108. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 1100 via the ROM 1102 and / or the communication unit 1109. When the computer program is loaded into the RAM 1103 and executed by the computing unit 1101, one or more steps of the data access method described above may be performed. Alternatively, in other embodiments, the computing unit 1101 may be configured to execute the above data access method in any other appropriate manner (for example, by means of firmware).
[0296] Various embodiments of the systems and techniques described above herein may be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application Specific Standard Products), SOCs (System On Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that may be executed and / or interpreted on a programmable system including at least one programmable processor that may be a dedicated or general-purpose programmable processor that may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0297] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0298] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include electrical connections based on one or more lines, portable computer disks, hard disks, RAM, ROM, EPROM (Electrically Programmable Read-Only-Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0299] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0300] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network), WAN (Wide Area Network), the Internet, and blockchain networks.
[0301] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services (Virtual Private Server). The server may also be a server of a distributed system, or a server combined with a blockchain.
[0302] It should be noted that artificial intelligence is a discipline that studies how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), and includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.
[0303] According to the technical solution of the embodiment of the present disclosure, based on the path status of the real-time IO path in the distributed block storage system, a specific processing strategy for data access requests is determined from multiple processing strategies, and a specific sending method for data access requests is determined from multiple sending methods. This can take into account the read and write performance, reliability and availability of the distributed block storage system, reduce data access time, and improve user experience.
[0304] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0305] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A data access method, wherein: The method is performed by a computing node in a distributed block storage system, and includes: In response to receiving a data access request sent by a client, determining a target replication group RG to be accessed, and querying a path status of an input / output IO path; wherein the path status is used to indicate whether an abnormality occurs in the distributed block storage system; Using a target processing strategy adapted to the path state, the data access request is processed to obtain a first access request, and a target block service associated with the target RG is determined from a plurality of block services of a storage node in the distributed block storage system; Based on the target sending mode adapted to the path state, sending the first access request to the target block service; wherein the first access request is used to access the target RG to obtain a first access response; In a case where a first access response sent by the target block service is received, the first access response is sent to the client.
2. The method according to claim 1, wherein: The method is executed by a target thread in the computing node, the path state is a fast path, the target processing strategy is a fast path processing strategy, and the fast path is used to indicate that the distributed block storage system is in a normal state; The adopting a target processing strategy adapted to the path state to process the data access request to obtain a first access request, and determining a target block service associated with the target RG from a plurality of block services of a storage node in the distributed block storage system, includes: Read the meta information of the target RG from the local of the target thread; determining, according to the meta information, from the plurality of block services, the target block service associated with the target RG; The data access request is serialized based on a first serialization protocol adapted to the fast path processing strategy to obtain the first access request.
3. The method according to claim 2, wherein: The target sending mode is a fast path sending mode, and the first access request is stored in a user space of a first protocol stack in a user state of the computing node; The sending the first access request to the target block service based on the target sending mode adapted to the path state includes: The first access request in the user space is sent to the target block service through a protocol corresponding to the first protocol stack in the user state.
4. The method according to claim 1, wherein: The path state is a slow path or a waiting path, the target processing strategy is a slow path processing strategy, the slow path is used to indicate that the distributed block storage system is in an abnormal state, and the waiting path is used to indicate that the distributed block storage system recovers from the abnormal state to a normal state; The adopting a target processing strategy adapted to the path state to process the data access request to obtain a first access request, and determining a target block service associated with the target RG from a plurality of block services of a storage node in the distributed block storage system, includes: Reading meta information of the target RG from the global cache of the computing node; determining, according to the meta information, from the plurality of block services, the target block service associated with the target RG; Serializing the data access request based on a second serialization protocol adapted to the slow path processing strategy to obtain the first access request; Among them, the serialization performance of the second serialization protocol is lower than the serialization performance of the first serialization protocol, and the deserialization performance of the second serialization protocol is lower than the deserialization performance of the first serialization protocol.
5. The method according to claim 4, wherein: The target sending mode is a slow path sending mode, and the first access request is stored in a user space of the computing node; The sending the first access request to the target block service based on the target sending mode adapted to the path state includes: Calling the second protocol stack of the kernel state of the operating system through the remote procedure call RPC protocol to enter the kernel state, and sending an interrupt instruction to the processor; wherein the interrupt instruction is used to interrupt the current task of the processor; Writing the first access request in the user space into the kernel space of the computing node; The first access request in the kernel space is sent to the target block service through a protocol corresponding to the second protocol stack.
6. The method according to any one of claims 1 to 5, wherein: The path state is a fast path, and the first access response is an access success response; The step of sending the first access response to the client upon receiving the first access response sent by the target block service comprises: Upon receiving the access success response sent by the target block service, query whether the path state of the IO path at the current moment is still a fast path; If it is still a fast path, sending the access success response to the client; If it is not a fast path, determining whether the data access request is a read request; In the case where the data access request is a read request, the access success response is sent to the client.
7. The method according to claim 6, wherein: After querying whether the path state of the IO path at the current moment is still a fast path, the method further includes: In the case where the data access request is a write request, processing the data access request based on a slow path processing strategy to obtain a second access request; Based on the slow path sending mode, sending the second access request to the target block service; wherein the second access request is used by the target block service to access the target RG to obtain a second access response; In a case where a second access response sent by the target block service is received, the second access response is sent to the client.
8. The method according to any one of claims 1 to 5, wherein: The path state is a fast path, the first access response is an access success response, and the method further includes: Upon receiving an access failure response sent by the target block service, or upon not receiving the access success response sent by the target block service within a set period of time after sending the first access request, querying whether the path state of the IO path at the current moment is still a fast path; If it is still a fast path, check whether there are read and write requests processed by the slow path processing strategy; If so, resending the first access request to the target block service based on the fast path sending mode, so that the target block service re-accesses the target RG; If not, switching the path state of the IO path from a fast path to a slow path, and processing the data access request based on a slow path processing strategy to obtain a third access request; Based on the slow path sending mode, the third access request is sent to the target block service, so that the target block service re-accesses the target RG.
9. The method according to claim 8, wherein: After querying whether the path state of the IO path at the current moment is still a fast path, the method further includes: If it is not a fast path, processing the data access request based on a slow path processing strategy to obtain a fourth access request; Based on the slow path sending mode, the fourth access request is sent to the target block service, so that the target block service re-accesses the target RG.
10. The method according to any one of claims 1 to 5, wherein: The path status is a slow path or a waiting path, The step of sending the first access response to the client upon receiving the data access response sent by the target block service comprises: Upon receiving a first access response sent by the target block service, extracting a first application index Applyindex from the first access response; wherein the first Applyindex is used to indicate a current execution log of the target RG; Determine whether the second Applyindex stored locally by the computing node is less than or equal to the first Applyindex; wherein the second Applyindex is used to indicate the execution log of the last write of the target RG; If the second Applyindex is less than or equal to the first Applyindex, sending the first access response to the client.
11. The method according to claim 10, wherein: If the second Applyindex is less than or equal to the first Applyindex, sending the first access response to the client includes: If the second Applyindex is less than or equal to the first Applyindex, query whether the path state of the IO path at the current moment is a slow path; If the path state of the IO path at the current moment is still a slow path, setting the path state of the IO path to a waiting path, and sending the first access response to the client; In response to a stay time of the path state of the IO path on the waiting path exceeding a set threshold, setting the path state of the IO path to a fast path; If the path state of the IO path at the current moment is a waiting path, the path state of the IO path is set to a fast path, and the first access response is sent to the client.
12. The method according to any one of claims 1 to 5, wherein: The first access response is an access success response, the path status is a slow path or a waiting path, and the method further includes: Upon receiving an access failure response sent by the target block service, or upon not receiving the access success response sent by the target block service within a set period of time after sending the first access request, querying whether the path state of the IO path at the current moment is a fast path; If not, re-sending the first access request to the target block service based on the slow path sending mode, so that the target block service re-accesses the target RG; If yes, then based on the fast path processing strategy, the data access request is processed to obtain a fifth access request; Based on the fast path sending mode, the fifth access request is sent to the target block service, so that the target block service re-accesses the target RG.
13. A data access device, wherein: The device is applied to a computing node in a distributed block storage system, and includes: A determination module, configured to determine the target replication group RG to be accessed in response to receiving a data access request sent by a client, and query the path status of the input / output IO path; wherein the path status is used to indicate whether an abnormality occurs in the distributed block storage system; a processing module, configured to process the data access request by adopting a target processing strategy adapted to the path state, obtain a first access request, and determine a target block service associated with the target RG from a plurality of block services of a storage node in the distributed block storage system; A sending module, configured to send the first access request to the target block service based on a target sending mode adapted to the path state; wherein the first access request is used to access the target RG to obtain a first access response; The sending module is further configured to send the first access response to the client upon receiving the first access response sent by the target block service.
14. The device according to claim 13, wherein: The device is applied to a target thread in the computing node, the path state is a fast path, the target processing strategy is a fast path processing strategy, and the fast path is used to indicate that the distributed block storage system is in a normal state; The processing module is used to: Read the meta information of the target RG from the local of the target thread; determining, according to the meta information, from the plurality of block services, the target block service associated with the target RG; The data access request is serialized based on a first serialization protocol adapted to the fast path processing strategy to obtain the first access request.
15. The device according to claim 14, wherein: The target sending mode is a fast path sending mode, and the first access request is stored in a user space of a first protocol stack in a user state of the computing node; The sending module is used for: The first access request in the user space is sent to the target block service through a protocol corresponding to the first protocol stack in the user state.
16. The device according to claim 13, wherein: The path state is a slow path or a waiting path, the target processing strategy is a slow path processing strategy, the slow path is used to indicate that the distributed block storage system is in an abnormal state, and the waiting path is used to indicate that the distributed block storage system recovers from the abnormal state to a normal state; The processing module is used to: Reading meta information of the target RG from the global cache of the computing node; determining, according to the meta information, from the plurality of block services, the target block service associated with the target RG; Serializing the data access request based on a second serialization protocol adapted to the slow path processing strategy to obtain the first access request; Among them, the serialization performance of the second serialization protocol is lower than the serialization performance of the first serialization protocol, and the deserialization performance of the second serialization protocol is lower than the deserialization performance of the first serialization protocol.
17. The device according to claim 16, wherein: The target sending mode is a slow path sending mode, and the first access request is stored in a user space of the computing node; The sending module is used for: Calling the second protocol stack of the kernel state of the operating system through the remote procedure call RPC protocol to enter the kernel state, and sending an interrupt instruction to the processor; wherein the interrupt instruction is used to interrupt the current task of the processor; Writing the first access request in the user space into the kernel space of the computing node; The first access request in the kernel space is sent to the target block service through a protocol corresponding to the second protocol stack.
18. The device according to any one of claims 13 to 17, wherein: The path state is a fast path, and the first access response is an access success response; The sending module is used for: Upon receiving the access success response sent by the target block service, query whether the path state of the IO path at the current moment is still a fast path; If it is still a fast path, sending the access success response to the client; If it is not a fast path, determining whether the data access request is a read request; In the case where the data access request is a read request, the access success response is sent to the client.
19. The device according to claim 18, wherein: The processing module is further used to: when the data access request is a write request, process the data access request based on a slow path processing strategy to obtain a second access request; The sending module is further used to: send the second access request to the target block service based on a slow path sending mode; wherein the second access request is used by the target block service to access the target RG to obtain a second access response; The sending module is further configured to: upon receiving a second access response sent by the target block service, send the second access response to the client.
20. The device according to any one of claims 13 to 17, wherein: The path state is a fast path, the first access response is an access success response, and the device further includes: A first query module is used to query whether the path state of the IO path at the current moment is still a fast path when receiving an access failure response sent by the target block service, or when not receiving the access success response sent by the target block service within a set period of time after sending the first access request; The second query module is used to query whether there is a read / write request processed by the slow path processing strategy if it is still a fast path; The sending module is further configured to: if it exists, re-send the first access request to the target block service based on a fast path sending mode, so that the target block service re-accesses the target RG; The processing module is further configured to: if the access request does not exist, switch the path state of the IO path from a fast path to a slow path, and process the data access request based on a slow path processing strategy to obtain a third access request; The sending module is further used to: send the third access request to the target block service based on a slow path sending mode, so that the target block service re-accesses the target RG.
21. The device according to claim 20, wherein: The processing module is further configured to: if it is not a fast path, process the data access request based on a slow path processing strategy to obtain a fourth access request; The sending module is further used to: send the fourth access request to the target block service based on a slow path sending mode, so that the target block service re-accesses the target RG.
22. The device according to any one of claims 13 to 17, wherein: The path status is a slow path or a waiting path, The sending module is used for: Upon receiving a first access response sent by the target block service, extracting a first application index Applyindex from the first access response; wherein the first Applyindex is used to indicate a current execution log of the target RG; Determine whether the second Applyindex stored locally by the computing node is less than or equal to the first Applyindex; wherein the second Applyindex is used to indicate the execution log of the last write of the target RG; If the second Applyindex is less than or equal to the first Applyindex, sending the first access response to the client.
23. The device according to claim 22, wherein: The sending module is used for: If the second Applyindex is less than or equal to the first Applyindex, query whether the path state of the IO path at the current moment is a slow path; If the path state of the IO path at the current moment is still a slow path, setting the path state of the IO path to a waiting path, and sending the first access response to the client; In response to a stay time of the path state of the IO path on the waiting path exceeding a set threshold, setting the path state of the IO path to a fast path; If the path state of the IO path at the current moment is a waiting path, the path state of the IO path is set to a fast path, and the first access response is sent to the client.
24. The device according to any one of claims 13 to 17, wherein: The first access response is an access success response, the path status is a slow path or a waiting path, and the device further includes: a third query module, configured to query whether the path state of the IO path at the current moment is a fast path when an access failure response sent by the target block service is received, or when the access success response sent by the target block service is not received within a set period of time after sending the first access request; The sending module is further configured to: if not, re-send the first access request to the target block service based on a slow path sending mode, so that the target block service re-accesses the target RG; The processing module is further configured to: if yes, process the data access request based on a fast path processing strategy to obtain a fifth access request; The sending module is further configured to: send the fifth access request to the target block service based on a fast path sending mode, so that the target block service re-accesses the target RG.
25. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the data access method according to any one of claims 1 to 12.
26. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to enable the computer to execute the data access method according to any one of claims 1-12.
27. A computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the data access method according to any one of claims 1 to 12.
