Data access method and device and related equipment

By using storage lock types on data nodes in the cloud storage system, independent verification of lock permissions for data nodes is achieved, solving the efficiency problem caused by communication latency of access nodes, improving the efficiency of operation request processing, and ensuring data integrity.

CN121728152APending Publication Date: 2026-03-24HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

In cloud storage systems, access nodes need to communicate with the lock owner node to determine data lock permissions, which reduces the efficiency of operation request processing.

Method used

By storing the lock type of the data on the data node, the data node can independently complete the lock permission verification, eliminating the message forwarding latency overhead between the access node and other access nodes.

Benefits of technology

It improves the efficiency of processing operation requests, ensures the integrity, consistency and isolation of data, and switches data management in a timely manner when data nodes fail.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121728152A_ABST
    Figure CN121728152A_ABST
Patent Text Reader

Abstract

The invention provides a data access method and device and related equipment, and the data access device comprises the steps: receiving and forwarding an operation request for target data through an access node; the data node receives a corresponding operation request for the target data forwarded by the access node, and obtains a lock type corresponding to the target data from the lock types corresponding to the stored multiple pieces of data; and the data node verifies the lock type corresponding to the target data, and performs corresponding operation on the target data when the verification result is passed. In the data access device, the data node not only stores the target data, but also stores the lock type corresponding to the target data, so that the data node can independently complete the verification of the lock permission of the target data, and the access node only participates in the forwarding of the message; the processing efficiency of the operation request is improved by eliminating the time delay overhead caused by message forwarding between the access node and the lock affiliation node which is used by other access nodes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of database technology, and in particular to a data access method, apparatus, and related equipment. Background Technology

[0002] A cloud storage system is a service system that stores data on a remote server cluster, allowing users to access and manage their data anytime, anywhere. A cloud storage system typically includes multiple access nodes and multiple data nodes. These access nodes and data nodes are load-balanced to improve the performance and availability of the cloud storage system. For example, each access node corresponds to one or more user terminals, and each data node corresponds to one or more access nodes. Access nodes receive operation requests from user terminals, including reading, writing, and deleting data. Data nodes store and manage the data stored in the cloud storage system; each data node stores and manages different data. When a user needs to access or manage certain data in the cloud storage system, the cloud storage system receives an operation request sent by the user's terminal through an access node. The access node parses the operation request to obtain the target data and operation content, and forwards the operation request to the data node corresponding to the target data. After receiving the operation request forwarded by the access node, the data node performs the corresponding operation on the target data according to the operation content, and after completing the operation, sends the operation result to the access node, which then forwards the operation result to the user's terminal.

[0003] As the number of users increases, it is highly likely that multiple users will access or manage the same data in the cloud storage system within a certain period of time. In order to ensure data integrity, the cloud storage system will use the Server Message Block (SMB) protocol to lock the data. The current cloud storage system uses the SMB protocol to lock data in the following way: One node is selected from multiple access nodes as the lock owner node. This lock owner node stores cached information about all locks for all data in the cloud storage system (also known as the lock type corresponding to the data). When the cloud storage system receives an operation request for a certain data, the access node sends the locking request to the lock owner node. The lock owner node determines whether the data's locking permissions are valid based on the request. If the locking permissions are not valid, the lock owner node sends the information that the data is locked back to the access node, which then forwards it to the user's terminal. If the locking permissions are valid, the lock owner node sends the information that the data is not locked back to the access node, which then sends the operation request to the corresponding data node. The data node locks the data and sends the information that the data is locked back to the lock owner node through the access node. Here, data locking permissions refer to whether the data can be locked and operations can be performed. If the locking permissions are valid, the data can be locked and operations can be performed; if the locking permissions are invalid, the data cannot be locked and operations cannot be performed.

[0004] In the cloud storage system described above, the access node is not only responsible for receiving, parsing and forwarding operation requests, but also for communicating with other access nodes (lock-owning nodes). This process will generate additional latency overhead, thereby reducing the processing efficiency of operation requests. Summary of the Invention

[0005] This application provides a data access method, apparatus, and related equipment that improves the processing efficiency of operation requests by eliminating the latency overhead caused by communication between various access nodes.

[0006] In a first aspect, this application provides a data access method, characterized in that the method includes: a first data node receiving a first request, wherein the first request is a request to perform a first operation on first data; obtaining a first lock type corresponding to the first data from a first lock type group stored in the first data node, wherein the first data is stored in the first data node; and performing the first operation on the first data if the verification result of the first lock type verification is that the verification passes.

[0007] In the above scheme, since the data node not only stores the target data, but also the lock type corresponding to the target data, the data node can independently complete the verification of the lock permission of the target data.

[0008] By implementing the above scheme, the lock type corresponding to a piece of data is stored on the data node to which the data belongs. After receiving an operation request for the data, the data node verifies the lock type of the data. By eliminating the latency overhead caused by message forwarding between the access node and other access nodes that are lock-owning nodes, the processing efficiency of operation requests is improved.

[0009] In one possible implementation of the first aspect, the method further includes: a second data node receiving a second request, wherein the second request is a request to perform a second operation on the second data; obtaining a second lock type corresponding to the second data from a second lock type group stored in the second data node, wherein the second data is stored in the second data node; and performing the second operation on the second data if the verification result of the second lock type verification is that the verification passes.

[0010] In the above scheme, the second data node and the first data node are multiple data nodes in the same system, and the data stored by the second data node and the first data node, as well as the lock types corresponding to the stored data, are different.

[0011] By implementing the above scheme and setting up multiple data nodes, each of which stores different data, the system can handle a larger number of data operation requests within a certain time, thereby improving the efficiency of operation request processing.

[0012] In one possible implementation of the first aspect, the method further includes: in the event of a failure of the first data node, the second data node receives a first lock type group and data corresponding to the first lock type group sent by the first data node, wherein the first data belongs to the data corresponding to the first lock type group.

[0013] In the above scheme, both the second data node and the first data node are multiple nodes in the same system. If the first data node fails, because it cannot manage the first data or store the corresponding lock type, the first data node updates multiple data items, including the first data, and their corresponding lock types to the second data node. This allows the access node to forward operation requests for the target data to the second data node when it receives such requests.

[0014] By implementing the above scheme, if a data node of a certain data fails, all data on the data node and its corresponding lock type will be transferred to other data nodes that have not failed in a timely manner. The other data nodes that have not failed will be used as the new management nodes for the data, thereby ensuring that operation requests can be processed in a timely manner.

[0015] In one possible implementation of the first aspect, if the verification result of the first lock type verification is successful, a first operation is performed on the first data, including: obtaining the first lock type corresponding to the first operation, wherein the first lock type includes any one of shared lock, exclusive lock, row-level lock, page-level lock, table-level lock, and intention lock; and if the comparison result of the priority level of the first lock type and the priority level of the first lock type is not lower than the priority level of the first lock type, the first operation is performed on the first data.

[0016] In the above scheme, the lock type corresponding to the first data refers to the type of lock already acquired on the first data. For example, if the first data is being written and other access is not allowed, then the lock type corresponding to the first data can include an exclusive lock. The lock type corresponding to the first operation is determined based on the identifier of the first operation. Different operations acquire different lock types on the first data. For example, when the first operation is to read the first data, the lock type corresponding to this operation can be a shared lock. Based on the lock type corresponding to the first data and the lock type corresponding to the first operation, it can be determined whether the first operation can be performed on the first data. For example, if the first data is already locked with a shared lock, and the lock type corresponding to the first operation is also a shared lock, then the first operation can be performed on the first data; if the first data is already locked with a shared lock, and the lock type corresponding to the first operation is an exclusive lock, then the first operation cannot be performed on the first data.

[0017] By implementing the above scheme, the lock permission of the first data is determined based on the lock type corresponding to the first data and the lock type corresponding to the first operation. If the lock permission of the first data is approved, the first operation is performed on the first data, thereby ensuring the integrity, consistency and isolation of the data.

[0018] In one possible implementation of the first aspect, the method further includes: if the verification result of the first lock type is that the verification fails, the first data is prohibited from performing the first operation.

[0019] By implementing the above scheme, the lock permission of the first data is determined based on the lock type corresponding to the first data and the lock type corresponding to the first operation. If the lock permission of the first data fails, the first data is prohibited from performing the first operation, thereby ensuring the integrity, consistency and isolation of the data.

[0020] In one possible implementation of the first aspect, if the verification result of the first lock type is that the verification fails, the first data is prohibited from performing the first operation, including: if the first lock type is an exclusive lock, the first data is prohibited from performing the first operation.

[0021] Secondly, this application provides a data access device, comprising: an access node for receiving a first request, wherein the first request is a request to perform a first operation on first data; the access node is further configured to forward the first request to a data node; a data node for receiving the first request forwarded by the access node; the data node is further configured to obtain a first lock type corresponding to the first data from a first lock type group stored in the data node, wherein the first data is stored in the data node; and the data node is further configured to perform the first operation on the first data if the verification result of the first lock type verification is successful.

[0022] Thirdly, this application provides a computing device including a processor and a memory, the memory for storing instructions and the processor for executing instructions, such that the computing device implements the data access method as described in the first aspect and any possible implementation thereof.

[0023] Fourthly, this application provides a computing device cluster, which includes at least one computing device. Each computing device includes a processor and a memory. The processor of the at least one computing device is used to execute instructions stored in the memory of the at least one computing device to enable the computing device cluster to implement the data access method in the first aspect and any possible implementation of the first aspect.

[0024] Fifthly, this application provides a computer-readable storage medium storing instructions that are implemented by a computing device or a cluster of computing devices as a data access method as described in the first aspect and any possible implementation thereof.

[0025] In a sixth aspect, this application provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions that can run on a computing device or be stored in any available medium. When the computer program product is run on at least one computing device, it causes the at least one computing device to perform the data access method in the first aspect and any possible implementation of the first aspect.

[0026] The second, third, fourth, fifth and sixth aspects mentioned above all have various possible designs similar to the first aspect and any possible implementation of the first aspect, and can produce corresponding technical effects, which will not be elaborated here. Attached Figure Description

[0027] Figure 1 This is an architectural diagram of a data access device provided in this application;

[0028] Figure 2 This is an architectural diagram of another data access device provided in this application;

[0029] Figure 3 This is a flowchart illustrating a data access method provided in this application;

[0030] Figure 4 This is a schematic diagram illustrating the steps of a data access method provided in this application;

[0031] Figure 5 This is a schematic diagram of the structure of a computing device provided in this application;

[0032] Figure 6 This is a schematic diagram of the structure of a computing device cluster provided in this application;

[0033] Figure 7 This is a schematic diagram of another structure of a computing device cluster provided in this application. Detailed Implementation

[0034] The technical solutions of the embodiments of this application will be described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0035] To improve the processing efficiency of operation requests, this application provides a data access method, apparatus, and related equipment. The data access apparatus includes: receiving and forwarding operation requests for target data through an access node; receiving the corresponding operation requests for target data forwarded by the access node, and obtaining the lock type corresponding to the target data from a storage of multiple lock types corresponding to data; verifying the lock type corresponding to the target data, and performing corresponding operations on the target data if the verification result is successful. The data node stores not only the target data but also the lock type corresponding to the target data. Compared to the background technology, which uses one of multiple access nodes as the lock owner node, this leads to unnecessary latency overhead because each operation on the target data requires message forwarding between the access node and the lock owner node to determine whether the lock permission of the target data is valid. In this solution, by selecting the data node corresponding to the target data as the lock owner node for that target data, when an operation on the target data is required, the access node only needs to receive and forward the request to operate on the target data. After receiving the forwarded request from the access node, the data node can determine the lock permission of the target data and, if the lock permission is valid, perform the corresponding processing on the target data. By eliminating the latency overhead caused by message forwarding between the access node and other access nodes acting as lock owner nodes, the processing efficiency of operation requests is improved.

[0036] See Figure 1 , Figure 1 This is an architectural diagram of a data access device provided in this application, such as... Figure 1 As shown, the architecture includes a data access device 100, a user system 200, and a storage system 300. The data access device 100 is used to receive operation requests sent by the user system 200 and process the data stored in the storage system 300 according to the operation requests. The user system 200 is used to send corresponding operation requests according to the user's instructions. The storage system 300 is used to store multiple data and to interact with the data access device 100.

[0037] Data access device 100, user system 200, and storage system 300 can be deployed on computing devices, including virtual machines, containers, or servers. A virtual machine is a virtualization technology implemented at the computer software level, enabling a single physical computer to create multiple virtual operating systems and application environments, each running its own operating system and applications independently. A container is a lightweight software packaging method used to package an application and its application environment, allowing the application to run in the same way in different environments. Unlike virtual machines, containers do not contain a complete operating system but share the operating system of the physical computer they reside on, making them more lightweight. A server is a general-purpose physical server, including ARM servers or x86 servers.

[0038] The data access device 100, user system 200, and storage system 300 can also be deployed in a computing device cluster, which includes multiple computing devices as described above.

[0039] The data access device 100, user system 200, and storage system 300 can also be deployed on terminal devices, including computer terminal devices, mobile terminal devices, network terminal devices, point-of-sale (POS) devices, industrial control terminal devices, and virtual terminal devices. Among them, computer terminal devices include personal computers, laptops, and tablet computers; mobile terminal devices include smartphones, smartwatches, and portable music players; network terminal devices include routers, switches, and modems; point-of-sale (POS) terminal devices include cash registers, card readers, and self-service payment terminals; industrial control terminal devices include sensors, industrial robots, and industrial control panels; and virtual terminal devices include virtual reality (VR) devices.

[0040] This document explains that the data access device 100, user system 200, and storage system 300 described above can be deployed on the same computing device or mobile terminal, or they can be deployed on different computing devices or mobile terminals. For example, the data access device 100, user system 200, and storage system 300 can be deployed on different computing devices within a computing device cluster. Whether the data access device 100, user system 200, and storage system 300 are deployed on the same computing device depends on the specific application environment, and this application does not impose specific limitations here.

[0041] The data access device 100 can be further divided into multiple nodes, such as Figure 1 As shown, the data access device 100 also includes an access node 101 and a data node 102. It should be understood here that... Figure 1The number and names of the node modules included in the data access device 100 are merely examples provided in this application. The data access device 100 may include more or fewer node modules, and the names of the node modules are not limited to [specific names not provided in the original text]. Figure 1 The names of the node modules in the data access device 100 can vary. For example, the data access device 100 may also include a log node, which records the operation of data in the data access device 100. The name of the data node 102 in the data access device 100 may be changed to a data processing node. The above examples are for illustrative purposes only and should not be considered as specific limitations.

[0042] The aforementioned access node 101 and data node 102 can be implemented through software or hardware. The following describes the software and hardware implementation methods of access node 101. The software and hardware implementation methods of data node 102 can be referred to the software and hardware implementation methods of access node 101.

[0043] When access node 101 is implemented through software, access node 101 can be code running on the aforementioned computing devices or terminal devices. That is, access node 101 can be code running on a personal computer, smartphone, or server, and the number of computing devices or terminal devices can be one or more. That is, access node 101 can also be code running on a cluster of computing devices.

[0044] When access node 101 is implemented in hardware, it can be implemented using at least one computing device or terminal device. Alternatively, access node 101 can also be implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD), wherein the PLD includes one or more of complex programmable logic devices (CPLD), field-programmable gate arrays (FPGA), and generic array logic (GAL).

[0045] The functions of the access node 101 and data node 102 in the data access device 100 described above will be explained below.

[0046] Access node 101 is used to receive the first request and forward the first request to data node 102.

[0047] The aforementioned first request is an operation request sent by user system 200 to data access device 100 to process target data in storage system 300. This operation request includes an identifier for the target data and an identifier for performing a first operation on the target data. The target data is the data that user system 200 wishes to access and manipulate; this data is stored in storage system 300 and managed by data access device 100. The identifier for the target data can be a primary key or an identifier (ID) used to uniquely identify each piece of data. For example, when the target data is located in a database, the IDs of different users in user system 200 can be used as the data identifier. The identifier for the first operation is an identifier for the operation performed on the target data, indicating the type of operation. For example, when the target data is located in a database, the identifier for the first operation can be the identifier corresponding to a read operation, update operation, or delete operation.

[0048] It should be noted that the content included in the identifier of the first operation is different in different scenarios. For example, when the first operation is to delete the target data, the identifier of the first operation may only include the identifier of the deletion operation; when the first operation is to update the target data, the identifier of the first operation should include not only the identifier of the update operation, but also the specific update content. For example, if the first operation is to update the target data to the value 5, the identifier of the first operation should include not only the identifier of the update operation, but also the updated value of 5.

[0049] Optionally, the target data can also be stored inside the data access device 100, that is, the storage system 300 can be part of the data access device 100. When the storage system 300 is part of the data access device 100, the data node 102 will manage the data in the storage system 300 more quickly and conveniently.

[0050] The specific process of the access node 101 receiving the first request includes: the user system 200 encapsulates the identifier of the target data and the corresponding identifier of the operation performed on the target data into a message information, encrypts the message information using an agreed protocol, and finally sends the message information to the access node 101 in the data access device 100.

[0051] The user system 200 sends message information to the data access device 100 in both wired and wireless ways. Wired methods include Ethernet, Universal Serial Bus (USB) connection, serial communication, etc.; wireless methods include Wireless Fidelity (Wi-Fi), Bluetooth, wireless sensor networks, etc. This application does not limit the specific method by which the user system 200 sends information to the data access device 100.

[0052] The aforementioned protocol is a pre-agreed protocol between the user system 200 and the data access device 100. Both the user system 200 and the data access device 100 can encrypt sent messages and decrypt received messages according to the agreed protocol. For example, the user system 200 can use the SMB protocol to encrypt the aforementioned message information, and after receiving the message information, the access node 101 can decrypt the message information using the key corresponding to the SMB protocol.

[0053] This section explains that in the data access device 100, the number of access nodes 101 is one or more, and the number of senders of the first request in the user system 200 (hereinafter collectively referred to as the user's terminal) is also one or more; each access node 101 corresponds to one or more user terminals; the specific structure of this part can be found in the following... Figure 2 This application will not elaborate further here. By setting multiple access nodes 101, each access node 101 corresponding to a portion of the user terminals, load balancing is achieved between the data access device 100 and the user system 200, thereby improving the processing efficiency of operation requests sent by the user terminals. Furthermore, in the event of a failure of some access nodes 101, the user terminals corresponding to those access nodes 101 can be transferred to other access nodes 101, thereby improving the overall operational stability of the device. In the data access device 100, the number of data nodes 102 can also be one or more; each access node 101 corresponds to all data nodes 102; the specific structure of this part can be seen below. Figure 2 This application will not elaborate further. By setting multiple data nodes 102, each data node 102 manages a portion of the data in the storage system 300, load balancing between the data access device 100 and the storage system 300 is achieved, thereby improving the processing efficiency of operation requests sent by the user's terminal. Furthermore, in the event of a failure of some data nodes 102, the data managed by those data nodes 102 can be transferred to other data nodes 102, thereby improving the overall operational stability of the device.

[0054] The specific process by which access node 101 forwards the first request to data node 102 includes: access node 101 decrypts the first request according to the agreed protocol, obtains the identifier of the target data and the identifier of performing the first operation on the target data; access node 101 queries the data node view according to the identifier of the target data, obtains the identifier of the data node corresponding to the identifier of the target data in the data node view, and forwards the first request to the data node.

[0055] For a description of the aforementioned agreement, please refer to the specific process of access node 101 receiving the first request, which will not be elaborated upon here.

[0056] Optionally, after parsing the first request and obtaining the identifier of the target data and the identifier of the first operation, access node 101 will further determine whether the first request complies with regulations based on the identifier of the target data, the identifier of the first operation, and the identity of user system 200. If it determines that the first request does not comply with regulations, access node 101 will send information containing that user system 200 does not have permission for the first operation to user system 200; if it determines that the first request complies with regulations, access node 101 will forward the first request to data node 102 based on the identifier of the target data. For example, assuming that user system 200's identity is a viewer, and a viewer can only query data stored in storage system 300, when the first operation is to update the target data, access node 101 determines that the operation request does not comply with regulations and sends information containing that user system 200 does not have permission for the update operation to user system 200.

[0057] It is understandable that by verifying the identity of user system 200 and determining whether the operation requests sent by user system 200 comply with regulations, it can be ensured that the data in storage system 300 will not be manipulated arbitrarily, thereby improving the security of all data in storage system 300.

[0058] The aforementioned data node view is a virtual table in the data access device 100. This table records the identifiers of multiple data items and the identifiers of their corresponding data nodes 102. For details, please refer to Table 1 below. Table 1 is a possible form of data node view provided in this application.

[0059] Table 1: Data Node View

[0060] Data identifier (ID) Identifier of data node 102 001 Data Node 1 002 Data Node 1 003 Data Node 2

[0061] In Table 1 above, the data identifier is the ID corresponding to the data. This ID can be assigned by the user system 200 or the storage system 300. The data identifier is the same across the data access device 100, the user system 200, and the storage system 300. The identifier of the data node 102 is the identifier of different data nodes 102 in the data access device 100, which is assigned by the data access device 100. As shown in Table 1, each data identifier corresponds to an identifier of a data node 102, and multiple data identifiers can correspond to the same data node 102 identifier. For example, the data with identifiers 001 and 002 both correspond to data node 1 identifiers. It should be noted that the structure and numbers in Table 1 are merely examples provided for illustration in this application and should not be considered as specific limitations. In actual application scenarios, the above data node view can be expanded according to actual needs. For example, data categories, the most recent operation time of data, etc., can be added to the above Table 1.

[0062] The data access device 100 also includes a data view, which is a virtual table in the data access device 100. The table records the relationship between the identifiers of multiple data and their corresponding addresses in the storage system 300. The nodes in the data access device 100 can obtain the data and perform corresponding operations on the data based on the address of the data in the storage system 300. The specific data view can be found in Table 2 below. Table 2 is a possible form of data view provided in this application.

[0063] Table 2: Data View

[0064] Data identifier (ID) The address of the data in storage system 300 001 0x1000 002 0x1004 003 0x1008

[0065] In Table 2 above, the data is identified by its corresponding ID, and this identifier is the same across the data access device 100, user system 200, and storage system 300. The address of the data in storage system 300 is assigned by the storage system when the data is stored, with one address corresponding to one data item. It should be noted that the structure and numbers in Table 2 are merely examples provided for illustration and should not be considered as specific limitations.

[0066] Optionally, the data access device 100 may further include a metadata node. The metadata node stores and manages all views in the data access device 100, including the aforementioned data node views and data views. By setting up a metadata node to manage all views in the data access device 100, in the event of a failure in any node of the data access device 100 or a change in the storage location of data in the storage system 300, the corresponding parts in each view can be modified in a timely manner, thereby ensuring the normal operation of the entire data access device 100. For example, if data node 1 in Table 1 fails, data node 1 cannot manage the data identified as 001 and 002. After receiving the information that data node 1 has failed, the metadata node modifies the identifier of data node 102 corresponding to data identified as 001 and 002 in the data node view to data node 2.

[0067] Please see Figure 2 , Figure 2 This is an architectural diagram of another data access device provided in this application, such as... Figure 2 As shown, the architecture includes a data access device 100, a user system 200, and a storage system 300. Specifically, the data access device 100 includes multiple access nodes (such as...). Figure 2 Access node 1, access node 2, ..., access node n), and multiple data nodes (such as... Figure 2 The system includes data nodes 1, 2, ..., n, and a metadata node. The metadata node stores data node views and data views. The user system 200 includes multiple user terminals (e.g., ...). Figure 2 The terminal where user 1 is located, the terminal where user 2 is located, the terminal where user 3 is located, ..., the terminal where user n is located.

[0068] exist Figure 2 In this context, the relationship between a user's terminal and an access node is such that one access node corresponds to one or more user terminals, for example... Figure 2 In this diagram, access node 1 corresponds to the terminal where user 1 is located, access node 2 corresponds to the terminal where user 2 and user 3 are located, and access node n corresponds to the terminal where user n is located. The relationship between access nodes and data nodes is that each access node corresponds to all data nodes, such as... Figure 2Access node 1 corresponds to data node 1, data node 2, and data node n; access node 2 corresponds to data node 1, data node 2, and data node n; and access node n corresponds to data node 1, data node 2, and data node n. The relationship between data nodes and storage system 300 is that each data node can access a portion of storage system 300. The relationship between metadata nodes and access nodes and data nodes is that metadata nodes can communicate with all access nodes and all data nodes. Each access node accesses and reads the data node view by communicating with the metadata node, and each data node accesses and reads the data view by communicating with the metadata node.

[0069] Data node 102 is used to receive the first request forwarded by access node 101, and to obtain the first lock type corresponding to the target data from the first lock type group stored in the data node; to verify the first lock type; if the verification result is that the verification passes, to perform the first operation on the target data; if the verification result is that the verification fails, to prohibit the first operation on the target data.

[0070] The identifiers of the first request, the target data, and the first operation can be found in the relevant content of the access node 101 mentioned above, and will not be elaborated further here.

[0071] The first lock type corresponding to the target data is the information of the locks that the target data currently possesses, that is, the cache information of all locks corresponding to the target data. Specifically, it can include whether the target data is currently not locked or the target data has been locked, as well as the type of lock.

[0072] The lock permission for the target data mentioned above refers to whether the target data can be locked and operations can be performed. If the lock permission is granted, it means that the target data can be locked and operations can be performed; if the lock permission is denied, it means that the target data cannot be locked and operations cannot be performed.

[0073] Data node 102 is used to receive a first request forwarded by access node 101 and to obtain the first lock type corresponding to the target data from the first lock type group stored in the data node; to verify the first lock type; and to perform a first operation on the target data if the verification result is successful; and to prohibit the first operation on the target data if the verification result is unsuccessful. The specific steps include: after receiving the first request, data node 102 parses the first request to obtain the identifier of the target data and the identifier of the first operation; obtains the first lock type corresponding to the target data based on the identifier of the target data; determines the locking type corresponding to the first operation based on the identifier of the first operation; determines whether the lock permission of the target data is valid based on the first lock type corresponding to the target data and the locking type corresponding to the first operation; performs the first operation on the target data if the lock permission of the target data is valid; and does not perform the first operation on the target data if the lock permission of the target data is unsuccessful.

[0074] The locking type corresponding to the first operation mentioned above refers to the type of lock that needs to be added to the target data when performing the first operation on the target data. For example, when the first operation is to modify the target data, since the target data cannot be accessed or modified by other requests, an exclusive lock can be added to the target data. The locking type corresponding to the first operation includes any one of the following: shared lock, exclusive lock, row-level lock, page-level lock, table-level lock, and intention lock.

[0075] The lock permission for the target data mentioned above refers to whether the target data can be locked and operations can be performed. If the lock permission is granted, it means that the target data can be locked and operations can be performed; if the lock permission is denied, it means that the target data cannot be locked and operations cannot be performed.

[0076] It's understandable that, due to the variety of lock types, there are multiple scenarios for determining whether the lock permission for the target data can be granted based on the first lock type corresponding to the target data and the lock type corresponding to the first operation. If the priority of the lock type corresponding to the first operation is not lower than the priority of the lock type corresponding to the target data, then the first operation is performed on the target data. The following uses shared locks and exclusive locks as examples to illustrate this. A shared lock allows multiple access requests to read the same target data simultaneously, but does not allow access requests to modify the target data. An exclusive lock does not allow multiple access requests to read the same target data simultaneously; once an access request acquires an exclusive lock on the target data, only that access request can read and modify the target data.

[0077] In the first scenario, the first lock type corresponding to the target data is unlocked, and the lock type corresponding to the first operation is a shared lock or an exclusive lock.

[0078] If data node 102 determines that the target data is not locked, it means that the target data has not been accessed or operated by other requests. It can directly add the lock corresponding to the first operation to the target data and perform the first operation on the target data.

[0079] Scenario 2: The first lock type corresponding to the target data is a shared lock, and the lock type corresponding to the first operation is also a shared lock.

[0080] When data node 102 determines that the target data has been locked with a shared lock, it means that the target data is being read but no write operation has been performed on the target data. Since the lock type corresponding to the first operation is also a shared lock, data node 102 can add the shared lock corresponding to the first operation to the target data and perform a read operation on the target data.

[0081] Scenario 3: The first lock type corresponding to the target data is a shared lock, and the lock type corresponding to the first operation is an exclusive lock.

[0082] If data node 102 determines that the target data has been locked by a shared lock, it means that the target data is being read but no write operation has been performed on the target data. Since the lock type corresponding to the first operation is an exclusive lock, data node 102 determines that it cannot lock the target data with an exclusive lock and will not perform the first operation on the target data.

[0083] Case 4: The first lock type corresponding to the target data is an exclusive lock, and the lock type corresponding to the first operation is a shared lock.

[0084] If data node 102 determines that the target data has been locked with an exclusive lock, it means that the target data is being read and modified. Therefore, data node 102 determines that it cannot lock the target data with an exclusive lock and will not perform the first operation on the target data.

[0085] Case 5: The first lock type corresponding to the target data is a shared lock, and the lock type corresponding to the first operation is an exclusive lock.

[0086] If data node 102 determines that the target data has been locked with an exclusive lock, it means that the target data is being read and modified. Therefore, data node 102 determines that it cannot lock the target data with an exclusive lock and will not perform the first operation on the target data.

[0087] It should be noted that the above-mentioned situations are examples provided in this application to illustrate whether the lock permission of the target data can be obtained by the data node 102 based on the first lock type corresponding to the target data and the lock type corresponding to the first operation. They should not be regarded as specific limitations.

[0088] Optionally, after data node 102 determines whether the lock permission for the target data is valid based on the first lock type corresponding to the target data and the lock type corresponding to the first operation, it sends a prompt message to access node 101 regardless of whether the permission is granted. Upon receiving the prompt message from data node 102, access node 101 forwards the prompt message to the sender of the first request. By sending the processing result of data node 102 to the sender of the first request, the sender can quickly understand the specific situation of the target data and thus execute the corresponding response plan. For example, if the target data is currently locked with an exclusive lock, the prompt message may include that the target data is currently being read and modified, and therefore access is not possible; if the target data is not currently locked, the prompt message may include that the first operation has been performed on the target data.

[0089] In summary, this application provides a data access device 100. This data access device 100 receives and parses operation requests for target data through an access node 101. A data node 102 determines whether the lock permission for the target data is valid based on the identifier of the target data sent by the access node 101 and the specific operation content. If the lock permission is valid, the corresponding operation is performed on the target data. In the aforementioned data access device 100, since the data node 102 is not only the management node for the target data but also can determine whether the target data can be locked, when the data access device receives an operation request for the target data, the data node 102 can quickly determine the lock permission of the target data and, if the lock permission is valid, perform the corresponding processing on the target data. Compared to using the access node as the lock owner node for the target data, using the data node to determine whether the target data can be locked and perform the corresponding processing eliminates the latency overhead caused by forwarding from multiple access nodes, thereby improving the processing efficiency of operation requests.

[0090] The structure and implementation of the data access device provided in this application have been introduced above. The following section will combine... Figures 3 to 4 The data access method provided in this application will be introduced. The data access device 100 described above can implement the following data access method.

[0091] Please see Figure 3 , Figure 3 This is a flowchart illustrating a data access method provided in this application. Figure 3The system includes a user's terminal and a data access device. The user's terminal sends operation requests to the data access device to query or manipulate one or more data managed by the data access device. The data access device stores and manages multiple data sets, and upon receiving an operation request from the user's terminal, processes the corresponding data according to the request. The data access device also includes an access node, data nodes, a data node view, and a data view.

[0092] The aforementioned access node is a type of node in a data access device. This node receives and processes requests sent to the data access device. Specifically, the access node includes a protocol parsing module and a data routing module. The protocol parsing module parses the request sent by the user's terminal according to a protocol agreed upon with the user's terminal. The data routing module forwards the request to the management node corresponding to the target data based on the target data's identifier. It can be understood that, since the access node is a type of node in a data access device, the number of access nodes in the data access device can be one or more. When there are multiple access nodes, each access node is responsible for a portion of the user's terminals, thereby improving the data access device's processing efficiency for the first request through load balancing.

[0093] The aforementioned data node is a type of node in a data access device. This node receives a second request sent by the access node and processes it accordingly. Specifically, the data node includes a data processing module, a data lock management module, and a data persistence module. The data processing module receives the second request from the access node and performs corresponding operations on the target data based on the request. The data lock management module stores the lock types corresponding to the data managed by the data node, determines whether the lock permissions for the target data are valid, and locks the target data. The data persistence module writes the data to a specified location on the disk after the data processing module performs corresponding operations on the template data, thus achieving data persistence. It can be understood that since the data node is a type of node in a data access device, the number of data nodes in the data access device can be one or more. When there are multiple data nodes, each data node is responsible for managing a portion of the data, thereby improving the processing efficiency of the data access device for the first request through load balancing.

[0094] The data node view mentioned above includes the identifiers of the target data and the identifiers of the data nodes. Each identifier of the target data corresponds to an identifier of a data node, and an identifier of a data node can correspond to the identifiers of multiple target data. For the specific structure of the data node view, please refer to the relevant content in Table 1 above. This application will not elaborate further here.

[0095] The aforementioned data view includes the identifier of the target data and the address of the target data. Each identifier of the target data corresponds to a unique address. For the specific structure of the data view, please refer to the relevant content in Table 2 above. This application will not elaborate further here.

[0096] The following is combined Figure 4 Let me introduce in detail Figure 3 The interaction process between the data access device and the user's terminal, i.e. Figure 3 ①-⑩ in the middle.

[0097] See Figure 4 , Figure 4 This is a schematic diagram illustrating the steps of a data access method provided in this application, such as... Figure 4 As shown, the steps of this data access method include:

[0098] S401: The access node receives the first request.

[0099] This step can be described above. Figure 1 This is achieved through the access node 101 in the data access device 100.

[0100] The aforementioned first request includes an identifier for the target data and an identifier for performing a first operation on the target data. For details regarding the identifier for the target data and the identifier for the first operation, please refer to the above. Figure 1 The relevant details regarding the access node 101 are not elaborated upon here.

[0101] The specific process of the access node receiving the first request includes: the user's terminal encapsulates the identifier of the target data and the identifier of the first operation performed on the target data into a message, encrypts the message using a pre-defined protocol, and finally sends the message to the data access device. For example, if the user wants to update the value of data 1 to 10, the user's terminal encapsulates the identifier corresponding to data 1 and the identifier of the update operation into a message, locks the message using the SMB protocol, and finally sends the message to the data access device. Here, it should be noted that the identifier of the update operation includes information about updating the value to 10.

[0102] The user's terminal can send message information to the data access device in wired and wireless ways. Wired methods include Ethernet, USB connection, serial communication, etc.; wireless methods include wireless network, Bluetooth, wireless sensor network, etc. This application does not limit the specific method by which the user's terminal sends information to the data access device.

[0103] The aforementioned agreement is a pre-agreed protocol between the user's terminal and the data access device. Both the user's terminal and the data access device can encrypt and decrypt the sent messages according to the agreed protocol.

[0104] Step S401 corresponds to the above Figure 3 In the first part, ① means that the user's terminal sends a request to the access node to operate on the target data to the agreed protocol parsing module.

[0105] S402: The access node parses the first request to obtain the identifier of the target data and the identifier of the first operation to be performed on the target data.

[0106] This step can be described above. Figure 1 This is achieved through the access node 101 in the data access device 100.

[0107] For information regarding the identifiers of the target data and the first operation, please refer to the above. Figure 1 The relevant details regarding the access node 101 are not elaborated upon here.

[0108] The specific steps for the data access device to parse the first request, obtain the identifier of the target data and the identifier of the first operation to be performed on the target data include: the agreed protocol parsing module in the access node parses the first request according to the agreed protocol, and obtains the identifier of the target data and the identifier of the first operation to be performed on the target data.

[0109] Optionally, after parsing the first request and obtaining the identifier of the target data and the identifier of the first operation, the access node will further determine whether the first request complies with regulations based on the identifier of the target data, the identifier of the first operation, and the identity of the user's terminal. If the first request does not comply with regulations, the access node will send information containing the user's terminal's lack of permission for the first operation to the user's terminal. If the first request complies with regulations, the access node will execute S403. For example, assuming the user's terminal is a viewer, and a viewer can only query data stored in the data access device, when the first operation is to update the target data, the access node determines that the operation request does not comply with regulations and sends information containing the user's terminal's lack of permission for the update operation to the user's terminal.

[0110] It is understandable that by verifying the identity of the user's terminal and determining whether the operation requests sent by the user's terminal comply with regulations, it can be ensured that the data in the data access device will not be manipulated arbitrarily, thereby improving the security of the data in the data access device.

[0111] This step corresponds to the above. Figure 3In step ②, the protocol parsing module in the access node parses the request sent by the user's terminal and sends the parsed content to the data routing module.

[0112] S403: The access node sends a second request to the data node based on the identifier of the target data.

[0113] This step can be described above. Figure 1 This is achieved through the access node 101 in the data access device 100.

[0114] The second request contains the same content as the first request, namely, the second request contains the identifier of the target data and the identifier of the first operation.

[0115] The specific steps for the access node to send a first request to the data node based on the identifier of the target data include: after obtaining the identifier of the target data and the identifier of performing a first operation on the target data, the data routing module in the access node queries the data node view based on the identifier of the target data to obtain the data node corresponding to the target data; encapsulates the identifier of the target data and the identifier of the first operation into a second request; and sends the second request to the data node.

[0116] Optionally, after obtaining the data node corresponding to the target data, the access node can directly send the first request to the data node. That is, the access node only extracts the identifier of the target data in the first request to obtain the data node corresponding to the target data, and then directly forwards the first request to the corresponding data node.

[0117] It is understandable, based on the above Figure 1As can be seen from the description of the first and second requests, the content of the first and second requests is the same. Therefore, the data node can also obtain the identifier of the target data and the identifier of the first operation performed on the target data based on the first request. When the access node directly forwards the first request to the data node, the data node only needs to perform an additional step of parsing the first request. Since the access node corresponds to a large number of user terminals, by omitting the step of the access node specifying the second request, when the number of user terminals corresponding to the access node is large, the access node can process a larger number of operation requests per unit time, thereby improving the processing efficiency of the entire data access device for operation requests. For example, there are existing users 1 and 2, where user 1 will operate on target data 1, target data 1 corresponds to data node 1, and user 2 will operate on target data 2, target data 2 corresponds to data node 2, but both user 1 and user 2 correspond to access node 1. After User 1 and User 2 send their respective operation requests to Access Node 1, if Access Node 1 needs to make a second request, then Access Node 1 needs to make two second requests; if Access Node 1 directly forwards the operation requests, User 1's operation request is parsed and processed by Data Node 1, and User 2's operation request is parsed and processed by Data Node 2.

[0118] Optionally, the data access device may further include a metadata node for storing and managing the data node view. By setting a metadata node, in the event of a failure in the data node corresponding to the target data, the metadata node updates the management node corresponding to the target data to another normal data node. Simultaneously, the metadata node promptly modifies the data node view, changing the data node corresponding to the identifier of the target data in the data node view, thereby ensuring the operational stability of the entire data access device. For example, data node 1 is the management node for target data 1. In the event of a failure in data node 1, the metadata node updates the management node of target data 1 to data node 2. Simultaneously, the metadata node updates the data node view corresponding to target data 1 from data node 1 to data node 2. When the access node receives a request to operate on target data 1, it queries the data node view based on the identifier of target data 1, obtains the data node corresponding to target data 1 as data node 2, and sends the second request to data node 2.

[0119] This step corresponds to the above. Figure 3 In section ③ and ④, the data routing module queries the data node view, obtains the identifier of the data node, and sends the parsed content to the data processing module in the data node corresponding to the identifier.

[0120] S404: The data node retrieves the first lock type corresponding to the target data from the stored first lock type group and verifies the first lock type corresponding to the target data; if the verification result of the first lock type corresponding to the target data is that the verification passes, execute S405; if the verification result of the first lock type corresponding to the target data is that the verification fails, execute S406.

[0121] This step can be described above. Figure 1 This is achieved through data node 102 in the data access device 100.

[0122] For information regarding the locking permissions for the aforementioned target data, please refer to the above. Figure 1 The description of data node 102 is not elaborated upon here.

[0123] The specific steps for a data node to retrieve the first lock type corresponding to the target data from the stored first lock type group and to verify the first lock type corresponding to the target data include: the data node retrieves the cache information of all locks corresponding to the target data based on the identifier of the target data; determines the locking type corresponding to the first operation based on the identifier of the first operation; and determines whether the lock permission of the target data is valid based on the cache information of all locks corresponding to the target data and the locking type corresponding to the first operation. If the lock permission of the target data is valid, the verification result is determined to be valid; if the lock permission of the target data is invalid, the verification result is determined to be invalid.

[0124] The cached information of all locks corresponding to the target data is the information of the locks that the target data currently has, which may include whether the target data is not currently locked or the target data has been locked, as well as the type of lock.

[0125] The locking type corresponding to the first operation mentioned above is the type of lock that needs to be added to the target data when performing the first operation on the target data. For example, when the first operation is to modify the target data, since the target data cannot be accessed or modified by other requests, an exclusive lock can be added to the target data.

[0126] This section explains that, due to the large number of lock types, there are multiple scenarios where a data node determines whether the lock permission for the target data can be granted based on the cached information of all locks corresponding to the target data and the lock type corresponding to the first operation. For details, please refer to the above. Figure 1 The relevant information about data node 102 will not be elaborated upon here.

[0127] This step corresponds to the above. Figure 3In step ⑤, after receiving the identifier of the target data and the identifier of the first operation, the data processing module in the data node sends the identifier of the target data and the identifier of the first operation to the data lock management module. The data lock management module determines whether the lock permission of the target data is approved based on the identifier of the target data and the identifier of the first operation, and returns the result to the data processing module.

[0128] S405: The data node performs the first operation on the target data.

[0129] This step can be described above. Figure 1 This is achieved through data node 102 in the data access device 100.

[0130] The process of a data node performing the first operation on the target data specifically includes: the data node queries the data view to obtain the address of the target data based on the target data's identifier, and then modifies the target data based on that address, i.e., performing the first operation on the target data. In a computer, modifying the target data based on its address enables data persistence.

[0131] Optionally, the data access device described above may further include a metadata node for storing and managing data views. By setting up a metadata node, when the address of the target data changes, the metadata node modifies the address of the target data corresponding to the identifier of the target data in the data view to the changed address, thereby ensuring the operational stability of the entire data access device. For example, the address corresponding to target data 1 was originally 0x1000. Due to data transfer performed by the data access device, the address corresponding to target data 1 is now 0x1004. After the address of the target data changes, the metadata node modifies the address of target data 1 in the data view from 0x1000 to 0x1004. When the data node needs to perform a first operation on the target data, it queries the data view based on the identifier of the target data to obtain the address of the target data as 0x1004, and performs the first operation on the data corresponding to that address.

[0132] This step corresponds to the above. Figure 3 In steps ⑥ and ⑦, the data processing module in the data node queries the data view to obtain the address of the target data based on the identifier of the target data. Then, the data processing module performs the first operation on the target data and writes the target data after the first operation is completed to a specific location on the disk through the data persistence module.

[0133] S406: The data node sends a prompt message to the access node.

[0134] This step can be described above. Figure 1 This is achieved through data node 102 in the data access device 100.

[0135] For more information regarding the above-mentioned prompts, please refer to the above. Figure 1 The description at data node 102 will not be repeated here. The specific steps for the data node to send the prompt information to the access node include: after the data node completes the first operation on the target data, it sends information containing that the first operation has been performed on the target data to the access node; if the data node determines that the lock permission for the target data has not been granted, it sends information containing that the lock permission for the target data has not been granted to the access node. It should be understood here that after receiving the prompt information sent by the data node, the access node will also encrypt the prompt information according to the agreed protocol, and finally send the encrypted information to the user's terminal.

[0136] This means that if the data node fails to verify the first lock type corresponding to the target data, the data node will not perform the first operation on the target data.

[0137] This step corresponds to the above. Figure 3 In section ⑧, ⑨, and ⑩, the data processing module in the data node sends the processing result of the first request to the data routing module in the access node. The data routing module then forwards the processing result of the first request to the protocol parsing module. The protocol parsing module encrypts the processing result of the first request using the protocol and then sends it to the user's terminal.

[0138] In summary, this application provides a data access method. This method involves setting up access nodes and data nodes in a data access device. The access node receives and parses operation requests for target data. The data node determines whether the target data has the required locking permissions based on the identifier of the target data sent by the access node and the specific operation content. If the locking permissions are approved, the data node performs the corresponding operation on the target data. In this method, since the data node is not only the management node for the target data but also determines whether the target data can be locked, upon receiving an operation request for the target data, the data access device can quickly determine the lock permissions of the target data and, if the lock permissions are approved, perform the corresponding processing on the target data. Compared to using the access node as the lock owner node for the target data, using the data node to determine whether the target data can be locked and perform the corresponding processing eliminates the latency overhead caused by forwarding from multiple access nodes, thereby improving the processing efficiency of operation requests.

[0139] The above text combines Figures 3 to 4 The data access method provided in this application is described in detail below, and will be combined with... Figures 5 to 7This application describes the computing device and computing device cluster provided in accordance with this application.

[0140] Figure 5 This is a schematic diagram of the structure of a computing device provided in this application. The computing device 500 may be the data access device 100 mentioned above.

[0141] Furthermore, the computing device 500 includes a processor 501, a storage unit 502, a storage medium 503, and a communication interface 504. The processor 501, the storage unit 502, the storage medium 503, and the communication interface 504 communicate via a bus 505, or via other means such as wireless transmission.

[0142] Processor 501 comprises multiple general-purpose processors, such as CPUs, NPUs, or a combination of CPUs and hardware chips. The aforementioned hardware chips are application-specific integrated circuits (ASICs), programmable logic devices (PLDs), or combinations thereof. The aforementioned PLDs are complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), generic array logic (GALs), data processing units (DPUs), systems-on-chips (SoCs), or any combination thereof. Processor 501 executes various types of digital storage instructions, such as software or firmware programs stored in storage unit 502, enabling computing device 500 to provide a wide range of services.

[0143] In a specific implementation, as one embodiment, the processor 501 includes one or more CPUs, for example... Figure 5 CPU0 and CPU1 are shown in the diagram.

[0144] In a specific implementation, as one example, the computing device 500 also includes multiple processors, for example... Figure 5 The processors 501 and 506 are shown. Each of these processors can be a single-core processor or a multi-core processor. Here, a processor refers to one or more devices, circuits, and / or processing cores used to process data (e.g., computer program instructions).

[0145] Storage unit 502 is used to store program code, and its execution is controlled by processor 501 to perform the above-mentioned tasks. Figures 3 to 4 The processing steps of the data access method in any embodiment. The program code includes one or more software units. The one or more software units mentioned above are... Figure 1 In this embodiment, the access node 101 and data node 102 are specifically configured such that the access node 101 is used to perform... Figure 4 In steps S401 and S403 of the embodiment, data node 102 is used to execute... Figure 4 Steps S404 to S406 in the embodiment will not be repeated here.

[0146] Storage unit 502 includes read-only memory and random access memory, and provides instructions and data to processor 501. Storage unit 502 also includes non-volatile random access memory. Storage unit 502 is volatile memory or non-volatile memory, or a combination of both. The non-volatile memory is read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory is random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are used, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM). It can also refer to hard disks, USB flash drives, flash memory, SD cards, Memory Sticks, etc., where hard disks include hard disk drives (HDDs), solid-state drives (SSDs), and mechanical hard disks (HDDs), etc., and this application does not specifically limit the types used.

[0147] Storage medium 503 is a carrier for storing data, such as hard disk, USB flash drive, flash memory, SD card, memory stick, etc. The hard disk can be a hard disk drive (HDD), solid state disk (SSD), mechanical hard disk (HDD), etc. This application does not make specific limitations.

[0148] The communication interface 504 is a wired interface (e.g., an Ethernet interface), an internal interface (e.g., a Peripheral Component Interconnect express (PCIe) bus interface), a wired interface (e.g., an Ethernet interface), or a wireless interface (e.g., a cellular network interface or a wireless LAN interface), used to communicate with other servers or units.

[0149] The 505 bus is a Peripheral Component Interconnect Express (PCIe) bus, or an Extended Industry Standard Architecture (EISA) bus, a unified bus (Ubus or UB), a Compute Express Link (CXL) bus, a Cache Coherent Interconnect for Accelerators (CCIX) bus, etc. The 505 bus is divided into address bus, data bus, and control bus.

[0150] In addition to the data bus, bus 505 also includes the power bus, control bus, and status signal bus. However, for clarity, all buses are labeled as bus 505 in the diagram.

[0151] It needs to be explained that, Figure 5 This is merely one possible implementation of an embodiment of this application. In practical applications, the computing device 500 may include more or fewer components, and this is not a limitation. For content not shown or described in the embodiments of this application, please refer to the foregoing. Figures 1 to 4 The relevant descriptions in the embodiments will not be repeated here.

[0152] Figure 6This is a schematic diagram of a computing device cluster provided in this application, which includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.

[0153] like Figure 6 As shown, the computing device cluster includes at least one computing device 600. The memory 603 of one or more computing devices 600 in the computing device cluster may store the same instructions for executing data access methods.

[0154] In some possible implementations, the memory 603 of one or more computing devices 600 in the computing device cluster may also store partial instructions for executing data access methods. In other words, a combination of one or more computing devices 600 can jointly execute instructions for executing data access methods.

[0155] It should be noted that the memory 603 in different computing devices 600 within the computing device cluster can store different instructions, each used to execute a portion of the resource migration system's functions. That is, the instructions stored in the memory 603 of different computing devices 600 can implement the access node 101 and the data node 102. Specifically, the access node 101 is used to execute... Figure 4 In steps S401 and S403 of the embodiment, data node 102 is used to execute... Figure 4 Steps S404 to S406 in the embodiment will not be repeated here.

[0156] The computing device 600 includes a processor 601, a communication interface 602, a memory 603, and a bus 604. Further descriptions of the processor 601, communication interface 602, memory 603, and bus 604 can be found in [reference needed]. Figure 5 The descriptions of processor 501, storage unit 502, storage medium 503, communication interface 504, and bus 505 in the embodiments will not be repeated here.

[0157] In some possible implementations, one or more computing devices in a computing device cluster can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN), etc., as described below. Figure 7 One possible implementation method is shown.

[0158] Figure 7 This is another schematic diagram of a computing device cluster provided in this application, such as... Figure 7As shown, two computing devices 600A and 600B are connected via a network. Specifically, they are connected to the network through communication interfaces in each computing device. In this possible implementation, the memory 603 in computing device 600A stores instructions for implementing access node 101 and data node 102. Simultaneously, the memory 603 in computing device 600B stores instructions for implementing access node 101 and data node 102.

[0159] It should be understood that Figure 7 The functions of computing device 600A shown can also be performed by multiple computing devices 600. Similarly, the functions of computing device 600B can also be performed by multiple computing devices 600.

[0160] It needs to be explained that, Figure 7 The implementation shown may be an implementation method when the processing power of the computing device 600A is insufficient, or when the storage space of the computing device 600A is insufficient, or an implementation method under other business scenarios. This application does not make specific limitations.

[0161] This application also provides another type of computing device cluster. The interconnection relationships between the computing devices in this computing device cluster can be similarly referenced. Figure 6 and Figure 7 The connection method of the computing device cluster. The difference is that the memory 603 of one or more computing devices 600 in the computing device cluster can store the same instructions for executing data access methods.

[0162] In some possible implementations, the memory 603 of one or more computing devices 600 in the computing device cluster may also store partial instructions for executing data access methods. In other words, a combination of one or more computing devices 600 can jointly execute instructions for executing data access methods.

[0163] This application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions capable of running on a computing device or stored on any usable medium. When the computer program product is run on at least one computing device, it causes the at least one computing device to perform a data access method.

[0164] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium capable of being stored by a computing device, or a data storage device such as a data center containing one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., high-density digital video discs (DVDs)), or semiconductor media (e.g., solid-state drives). The computer-readable storage medium includes instructions that instruct the computing device to perform a data access method.

[0165] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. A computer program product includes a plurality of computer instructions. When the computer program instructions are loaded or executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another.

[0166] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A data access method, characterized in that, The method includes: The first data node receives a first request, wherein the first request is a request to perform a first operation on the first data; Obtain the first lock type corresponding to the first data from the first lock type group stored in the first data node, wherein the first data is stored in the first data node; If the verification result of the first lock type is successful, the first operation is performed on the first data.

2. The method according to claim 1, characterized in that, The method further includes: The second data node receives a second request, wherein the second request is a request to perform a second operation on the second data; Obtain the second lock type corresponding to the second data from the second lock type group stored in the second data node, wherein the second data is stored in the second data node; If the verification result of the second lock type is successful, the second operation is performed on the second data.

3. The method according to claim 2, characterized in that, The method further includes: In the event of a failure of the first data node, the second data node receives the first lock type group and the data corresponding to the first lock type group sent by the first data node, wherein the first data belongs to the data corresponding to the first lock type group.

4. The method according to any one of claims 1 to 3, characterized in that, If the verification result of the first lock type is that the verification passes, the first operation is performed on the first data, including: obtaining the first lock type corresponding to the first operation, wherein the first lock type includes any one of shared lock, exclusive lock, row-level lock, page-level lock, table-level lock, and intention lock; If the comparison result between the priority level of the first locking type and the priority level of the first lock type is that the priority level of the first locking type is not lower than the priority level of the first lock type, then the first operation is performed on the first data.

5. The method according to any one of claims 1 to 3, characterized in that, The method further includes: If the verification result of the first lock type is that the verification fails, the first data is prohibited from performing the first operation.

6. The method according to claim 5, characterized in that, If the verification result for the first lock type is a failure, the first data is prohibited from performing the first operation, including: If the first lock type is an exclusive lock, the first data is prohibited from performing the first operation.

7. A data access device, characterized in that, The device includes: An access node is configured to receive a first request, wherein the first request is a request to perform a first operation on first data; The access node is also used to forward the first request to the data node; A data node is configured to receive a first request forwarded by the access node; the data node is further configured to obtain a first lock type corresponding to the first data from a first lock type group stored in the data node, wherein the first data is stored in the data node; The data node is further configured to perform a first operation on the first data if the verification result of the first lock type verification is successful.

8. A computing device, characterized in that, The computing device includes a processor and a memory, the memory being used to store instructions and the processor being used to execute the instructions such that the computing device implements the method as claimed in any one of claims 1 to 6.

9. A computing device cluster, characterized in that, The computing device cluster includes at least one computing device, each of the at least one computing device including a processor and a memory, wherein the processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device to cause the computing device cluster to implement the method as claimed in any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed by a computing device or a cluster of computing devices, implement the method as claimed in any one of claims 1 to 6.