Data access method, device, equipment and computer storage medium
The dynamic weight load algorithm determines the racks and nodes in the data distributed environment to ensure copy storage of data blocks, solves the problems of data storage security risks and increased network traffic, and achieves data access security and system performance improvement. promote.
Patent Information
- Application Number
- CN202011629123.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-30
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2040-12-30
AI Technical Summary
In the existing data distribution environment, when multiple copies are stored in the rack, the data becomes inaccessible or damaged, causing storage security risks. Network traffic increases and system performance is affected.
The dynamic weight load algorithm is used to determine the racks and computing nodes from the data center, dynamically adjust the node load, ensure that the data blocks are evenly distributed among different racks and nodes, provide copy storage of the data blocks, and ensure that the data is stored even when the rack is powered off or A copy is available when the network is disconnected, reducing cross-rack transmission and improving data access security.
Through the dynamic weight load algorithm, the security and reliability of data access are achieved, the problems of data loss and increase in network traffic are avoided, and the system's processing power and data recovery capabilities are improved.
Smart Images

Figure CN112632621B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of system implementation, and in particular relates to a data access method, device, equipment and computer storage medium. Background Art
[0002] In order to improve the storage rate and reduce network overhead, the existing data distributed environment multi-copy storage will store copies of the data in different nodes of the same rack. However, if an abnormality occurs in the rack, this storage method will cause all stored data to be inaccessible, and even cause data damage or loss, posing a security risk to data access. Summary of the invention
[0003] The embodiments of the present invention provide a data access method, device, equipment and computer storage medium, which can improve the security of data access.
[0004] In a first aspect, an embodiment of the present invention provides a data access method, the method comprising:
[0005] determining a first rack from at least one rack of a first data center according to a specified algorithm;
[0006] Determine a first computing node from at least one computing node of the first rack according to a specified algorithm;
[0007] Storing the data block to be stored in the first computing node;
[0008] determining at least one second rack from at least one rack of the first data center according to a specified algorithm;
[0009] A second computing node is determined from at least one rack of at least one second rack according to a specified algorithm, and the second computing node is used to store the replica data of the data block.
[0010] In an optional implementation, determining the first computing node from at least one computing node of the first rack according to a specified algorithm includes:
[0011] Determining a first identifier from a first rack according to a specified algorithm;
[0012] A first computing node is randomly determined from at least one computing node corresponding to the first identifier.
[0013] In an optional implementation, the specified algorithm includes a dynamic weight load algorithm; determining the first rack from at least one rack of the first data center according to the specified algorithm includes:
[0014] A dynamic weighted load algorithm is adopted to determine the first rack according to the weight of at least one rack in the first data center.
[0015] In an optional implementation, determining the first computing node from at least one computing node of the first rack according to a specified algorithm includes:
[0016] A dynamic weighted load algorithm is adopted to determine the first computing node according to the weight of at least one computing node of the first rack.
[0017] In an optional embodiment, the method further includes:
[0018] Determine whether the index statement is damaged based on the length of the index statement;
[0019] If the index statement is not damaged, query the first data according to the index statement, and determine whether the first data corresponding to the index statement can be queried;
[0020] If the first data corresponding to the index statement is found, determining whether the first data is damaged according to the index statement;
[0021] If the first data is not damaged, determining whether the size of the first data is changed according to the index statement;
[0022] If the size of the first data has not changed, the second data is verified.
[0023] In a second aspect, an embodiment of the present invention provides a data access device, the device comprising:
[0024] a determination module, configured to determine a first rack from at least one rack of a first data center according to a specified algorithm;
[0025] The determination module is further used to determine the first computing node from at least one computing node of the first rack according to a specified algorithm;
[0026] A storage module, used for storing the data block to be stored in the first computing node;
[0027] The determination module is further configured to determine at least one second rack from at least one rack of the first data center according to a specified algorithm;
[0028] The determination module is further used to determine a second computing node from at least one rack of at least one second rack according to a specified algorithm, and the second computing node is used to store the copy data of the data block.
[0029] In an optional implementation, the determination module is specifically configured to:
[0030] Determining a first identifier from a first rack according to a specified algorithm;
[0031] A first computing node is randomly determined from at least one computing node corresponding to the first identifier.
[0032] In an optional implementation, the determination module is specifically configured to:
[0033] A dynamic weighted load algorithm is adopted to determine the first rack according to the weight of at least one rack in the first data center.
[0034] In a third aspect, a data access device is provided, the device comprising: a memory for storing programs; a processor for running the programs stored in the memory to execute the data access method provided in the first aspect or any optional implementation of the first aspect.
[0035] In a fourth aspect, a computer storage medium is provided, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the data access method provided by the first aspect or any optional implementation of the first aspect is implemented.
[0036] The data access method, device, equipment and computer storage medium of the embodiment of the present invention can determine a first rack from at least one rack of a first data center according to a specified algorithm, determine a first computing node from at least one computing node of the first rack according to the specified algorithm, store the data block to be stored in the first computing node, determine at least one second rack from at least one rack of the first data center according to the specified algorithm, and determine a second computing node from at least one rack of at least one second rack according to the specified algorithm, and the second computing node is used to store the copy data of the data block. The security of data access can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solution of the embodiment of the present invention, the following is a brief introduction to the drawings required for use in the embodiment of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0038] Figure 1 is a schematic diagram of the overall structure of a storage system provided by an embodiment of the present invention;
[0039] Figure 2 is a flow chart of a data access method provided by an embodiment of the present invention;
[0040] Figure 3 is a flow chart of a data access method provided by another embodiment of the present invention;
[0041] Figure 4 is a schematic diagram of the index statement format provided by an embodiment of the present invention;
[0042] Figure 5 is a structural schematic diagram of a data access device provided by another embodiment of the present invention;
[0043] Figure 6 4 is a structural diagram of an exemplary hardware architecture of a web page content marking device in an embodiment of the present invention. DETAILED DESCRIPTION
[0044] The features and exemplary embodiments of various aspects of the present invention will be described in detail below. In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present invention, rather than to limit the present invention. For those skilled in the art, the present invention can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present invention by illustrating examples of the present invention.
[0045] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0046] First, for ease of understanding, the following part of the embodiment of the present invention first specifically describes the application scenarios involved.
[0047] Block is the smallest storage and processing unit in the database.
[0048] The rack, full name of which is rack-mounted server, is used to fix the patch panels, housings and equipment in the telecommunications cabinet.
[0049] DataNode is responsible for storing data blocks and performing read and write operations on data blocks. A rack includes multiple DataNodes.
[0050] The existing multi-copy storage selection servers are randomly selected, and usually only a simple IP mutually exclusive multi-copy storage implementation is implemented. There are the following technical problems that need to be solved:
[0051] 1. Rack power outage: When multiple copies of the same block are written to the same rack, if one rack fails, all copies of the current block will be lost and cannot be recovered.
[0052] 2. Random storage in multiple racks: When multiple storage nodes involve multiple racks, if there is no excellent writing algorithm, the network traffic will increase exponentially. For example, a block has three copies. The first block of data, block 1, is written to the first rack, and then block 2 is randomly written to the second rack. At this time, network traffic for data transmission is generated between the two racks. Next, block 3 is randomly written back to the first rack. At this time, data traffic is generated between the two racks again.
[0053] 3. Data cannot be repaired when the disk fails: The distributed cache system has very strict requirements on data. Disk damage can rely on the copy strategy to allow the business system to run smoothly, but in the production environment, cold data cannot be predicted. Hot data can rely on access retries to determine whether the disk is faulty, but cold data is basically undetectable. The inability to repair data leaves a huge production risk.
[0054] 4. When the host fails, data loss occurs: The replica storage strategy of the production cluster is rack-aware. Generally, rack-aware storage is for primary and backup data to be stored on different racks. The production environment is a high-concurrency, large-data-volume, continuous read-write scenario. It is a common problem when a node stops due to a failure. If a low-probability problem occurs, node failure and disk damage occur at the same time, which will cause all cached primary and backup data to be inaccessible, resulting in production data loss, greatly affecting the accuracy of the business, and posing a very large production risk.
[0055] Figure 1 FIG. 1 shows a schematic diagram of the overall structure of a storage system provided by an embodiment of the present invention. Figure 1 As shown in FIG, a data center includes multiple racks, and a rack includes multiple data nodes (DataNode). Figure 1 As shown, data center 1 (D1) includes rack 1 (R1) and rack 2 (R2), and rack 1 includes three data nodes N1, N2 and N3.
[0056] In order to solve the problems in the prior art, embodiments of the present invention provide a data access method, device, equipment and computer storage medium.
[0057] The following first introduces the data access method provided by the embodiment of the present invention.
[0058] Figure 2 FIG. 1 is a flow chart of a data access method provided by an embodiment of the present invention. Figure 2 As shown, the method may include the following steps:
[0059] S201. Determine a first rack from at least one rack in a first data center according to a specified algorithm.
[0060] In some embodiments, the specified algorithm comprises a dynamic weight loading algorithm.
[0061] In some embodiments, a dynamic weighted load algorithm is used to determine the first rack according to a weight of at least one rack in the first data center.
[0062] In some embodiments, the data block in the dynamic weight load algorithm selects an optional resource pool, and the resource pool includes a rack pool and a storage node pool. When selecting a result, a node is selected through a random algorithm, which will lead to a tilt in resource utilization due to the processing capacity of each processing node, that is, the load of the processing node is unbalanced. Some nodes are already overloaded, while other nodes are basically idle. Therefore, a load mechanism must be adopted to understand the load and processing capacity of each processing node in real time, and make adjustments in real time. Nodes with low load increase weight to process more data storage requests, and nodes with high load reduce the processing capacity of the nodes, so as to achieve the processing capacity of the entire cluster.
[0063] In some embodiments, the calculation formula of the dynamic weight includes:
[0064] Load(N i )=P cpu *L cpu (N i )+P mem *L mem (N i )+P io *L io (N i )+P res *L res (N i )
[0065] Among them, the parameter sets a proportional constant coefficient P i , used to indicate the importance of each load parameter, where ∑p i =1, where Lx(Ni) represents the load value of a parameter of the node Ni. When deploying different applications, the value of the coefficient constant Px can be continuously adjusted according to the importance of each indicator.
[0066] Each storage node regularly reports various indicators of the current server to the algorithm, including: CPU utilization, memory utilization, disk I / O access rate, and average response time. The algorithm calculates a new node weight based on each current indicator, and then adjusts the node's processing request reception based on the current weight.
[0067] S202: Determine a first computing node from at least one computing node of a first rack according to a specified algorithm.
[0068] In some embodiments, the compute nodes include DataNode nodes.
[0069] In some embodiments, the first identifier is determined from the first rack according to a specified algorithm, and the first computing node is randomly determined from at least one computing node corresponding to the first identifier.
[0070] In some embodiments, a dynamic weighted load algorithm is used to determine the first computing node according to the weight of at least one computing node of the first rack.
[0071] S203: Store the data block to be stored in the first computing node.
[0072] S204: Determine at least one second rack from at least one rack of the first data center according to a specified algorithm.
[0073] In some embodiments, if the local machine is a DataNode node, the first Block copy is stored on the local machine. Otherwise, a DataNode machine will be selected in the same rack of the machine through a dynamic weight load algorithm for storage, and the second Block copy will be stored on a DataNode node in another rack.
[0074] S205 . Determine a second computing node from at least one rack of at least one second rack according to a specified algorithm, where the second computing node is used to store replica data of the data block.
[0075] In some embodiments, if the local machine is a DataNode node, then the first Block copy is stored on the local machine, otherwise a DataNode machine will be selected in the same rack of the machine through a dynamic weight load algorithm for storage, the second Block copy will be stored on a DataNode node in another rack, and the third Block copy will be stored on another DataNode node in the Rack2 rack.
[0076] If the number of Block replicas set exceeds 3, the remaining replicas will be evenly distributed in the cluster while ensuring that the number of replicas on each rack does not exceed the upper limit ((number of replicas - 1) / number of racks + 2).
[0077] In some embodiments, the second Block copy is stored in a different rack to solve the hidden danger of power outage or network disconnection of the entire rack. When any rack has an abnormality, there will be a copy working; and the third copy is stored on the node of the same rack as the second copy to reduce the time cost brought by the cross-rack transmission again and save a lot of network resources.
[0078] In the data access method of the embodiment of the present invention, a first rack can be determined from at least one rack of a first data center according to a specified algorithm, a first computing node can be determined from at least one computing node of the first rack according to the specified algorithm, a data block to be stored is stored in the first computing node, at least one second rack is determined from at least one rack of the first data center according to the specified algorithm, and a second computing node is determined from at least one rack of at least one second rack according to the specified algorithm, and the second computing node is used to store the copy data of the data block. The security of data access can be improved.
[0079] Figure 3 FIG. 2 is a flow chart of a data access method provided by another embodiment of the present invention. Figure 3 As shown, the method may include the following steps:
[0080] S301. Determine a first rack from at least one rack in a first data center according to a specified algorithm.
[0081] S302: Determine a first computing node from at least one computing node of a first rack according to a specified algorithm.
[0082] S303: Store the data block to be stored in the first computing node.
[0083] S304: Determine at least one second rack from at least one rack of the first data center according to a specified algorithm.
[0084] S305 . Determine a second computing node from at least one rack of at least one second rack according to a specified algorithm, where the second computing node is used to store replica data of the data block.
[0085] S306. Determine whether the index statement is damaged according to the length of the index statement; if not, proceed to step S307; if yes, proceed to step S312.
[0086] Figure 4 FIG. 4 shows a schematic diagram of an index statement format provided by an embodiment of the present invention. Figure 4 As shown, start: the starting position of the current data block index, provides the offset position for searching data, and its fixed length is 4 bytes.
[0087] Commit Offset: The disk offset address of the data block in the current storage node. This value is used to find the specific data block location. Its fixed length is 8 bytes.
[0088] Size: The size of the data block. If a data modification operation occurs, this value will be modified at the same time. Its fixed length is 4 bytes.
[0089] CRC32Code: Data block integrity check code, used to detect whether the data is complete. If the data is modified, this value is also modified at the same time. Its fixed length is 4 bytes.
[0090] End: The end position of the current data block index, with a fixed length of 2 bytes.
[0091] In some embodiments, the partition index file has the characteristic that each index has a fixed length, and during verification, verification can be performed based on the leading and trailing identification bits of each index + index size.
[0092] Read 2*8bit data a from the first bit, identify the start mark, move back 16*8bit and read 2*bit data b, and identify the end mark.
[0093] If the read data b is the end mark, it means that the size and mark of the current index are correct.
[0094] If the data b read is not the end mark, it means that the current index is damaged and the repair of the single index is started.
[0095] S307, query the first data according to the index statement, and determine whether the first data corresponding to the index statement can be found; if so, proceed to step S308; if not, proceed to step S311.
[0096] In some embodiments, the node disk detection thread sequentially detects all index files on each node. The Commit Offset is the offset pointing to the location of the data block on the disk. The location of the corresponding data on the disk is found through the Commit Offset of each data block.
[0097] S308. Determine whether the first data is damaged according to the index statement; if so, proceed to step S311; if not, proceed to step S309.
[0098] In some embodiments, if the disk is damaged, the data may be unreadable or the corresponding data block cannot be found at the Commit Offset corresponding position. At this time, we will directly determine that the copy is lost and perform a quick data repair directly without performing the following data integrity check operation. If it can be read normally, proceed to the next step.
[0099] S309, determining whether the size of the first data has changed according to the index statement; if so, proceeding to step S311; if not, proceeding to step S310.
[0100] In some embodiments, the size of the current data block is calculated: dataSize = size(data), and the dataSize returned by the data block is compared with the data block size recorded in the index. If they are inconsistent, this indicates that the data block is damaged (the latest data block size will be modified at the same time when it is manually modified), and the data is quickly repaired. If the size is the same, it indicates that the current data is fine, and the next data block is checked.
[0101] S310: Select second data and verify the second data.
[0102] In some embodiments, the method for verifying the second data is the same as the method for verifying the first data, and will not be repeated here.
[0103] S311. Repair the first data.
[0104] S312: Repair the index statement according to the copy of the index statement.
[0105] In some embodiments, the node where the current partition index replica is located is searched, and the location of the current index in the replica index is searched through the start identifier.
[0106] In some embodiments, each partition index has its own two backup copies in other nodes, and when the primary index is damaged, a single index level repair can be performed through the secondary index.
[0107] In the data access method of the embodiment of the present invention, a first rack can be determined from at least one rack of a first data center according to a specified algorithm, a first computing node can be determined from at least one computing node of the first rack according to the specified algorithm, a data block to be stored is stored in the first computing node, at least one second rack is determined from at least one rack of the first data center according to the specified algorithm, and a second computing node is determined from at least one rack of at least one second rack according to the specified algorithm, and the second computing node is used to store the copy data of the data block. The security of data access can be improved.
[0108] Based on the same inventive concept, an embodiment of the present invention provides a data access device. Figure 5 FIG. 2 shows a schematic diagram of the structure of a data access device provided by another embodiment of the present invention. Figure 5 As shown, the device comprises:
[0109] The determination module 501 is used to determine a first rack from at least one rack of a first data center according to a specified algorithm.
[0110] The determination module 501 is further configured to determine a first computing node from at least one computing node of the first rack according to a specified algorithm;
[0111] The storage module 502 is used to store the data block to be stored in the first computing node;
[0112] The determination module 501 is further configured to determine at least one second rack from at least one rack of the first data center according to a specified algorithm;
[0113] The determination module 501 is further configured to determine a second computing node from at least one rack of the at least one second rack according to a specified algorithm, wherein the second computing node is configured to store the replica data of the data block.
[0114] The determination module 501 is specifically used to: determine a first identifier from a first rack according to a specified algorithm, and randomly determine a first computing node from at least one computing node corresponding to the first identifier.
[0115] The determination module 501 is specifically used to: adopt a dynamic weight load algorithm to determine the first rack according to the weight of at least one rack in the first data center.
[0116] The determination module 501 is specifically used to: adopt a dynamic weight load algorithm to determine the first computing node according to the weight of at least one computing node of the first rack.
[0117] The determination module 501 is also used to determine whether the index statement is damaged according to the length of the index statement. If the index statement is not damaged, the first data is queried according to the index statement, and it is determined whether the first data corresponding to the index statement can be queried. If the first data corresponding to the index statement is queried, it is determined whether the first data is damaged according to the index statement. If the first data is not damaged, it is determined whether the size of the first data has changed according to the index statement. If the size of the first data has not changed, the second data is verified.
[0118] The data access device of the embodiment of the present invention can determine a first rack from at least one rack of a first data center according to a specified algorithm, determine a first computing node from at least one computing node of the first rack according to the specified algorithm, store the data block to be stored in the first computing node, determine at least one second rack from at least one rack of the first data center according to the specified algorithm, and determine a second computing node from at least one rack of at least one second rack according to the specified algorithm, and the second computing node is used to store the copy data of the data block. The security of data access can be improved.
[0119] Figure 64 is a structural diagram of an exemplary hardware architecture of a web page content marking device in an embodiment of the present invention.
[0120] like Figure 6 As shown, the webpage content marking device 600 includes an input device 601, an input interface 602, a central processing unit 603, a memory 604, an output interface 605, and an output device 604. The input interface 602, the central processing unit 603, the memory 604, and the output interface 605 are connected to each other through a bus 610, and the input device 601 and the output device 604 are connected to the bus 610 through the input interface 602 and the output interface 605, respectively, and then connected to other components of the webpage content marking device 600.
[0121] Specifically, the input device 601 receives input information from the outside and transmits the input information to the central processing unit 603 through the input interface 602; the central processing unit 603 processes the input information based on the computer executable instructions stored in the memory 604 to generate output information, temporarily or permanently stores the output information in the memory 604, and then transmits the output information to the output device 604 through the output interface 605; the output device 604 outputs the output information to the outside of the web page content marking device 600 for user use.
[0122] That is to say, Figure 6 The web page content marking device shown can also be implemented as comprising: a memory storing computer executable instructions; and a processor, which can implement the combination of Figures 2 to 3 A method for a web page content tagging device is described.
[0123] In one embodiment, Figure 6 The web page content marking device 600 shown may be implemented as a device, which may include: a memory for storing programs; and a processor for running the programs stored in the memory to execute the web page marking method of the embodiment of the present invention.
[0124] The embodiment of the present invention further provides a computer storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the webpage content marking method of the embodiment of the present invention is implemented.
[0125] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.
[0126] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments that are used to perform the required tasks. Programs or code segments can be stored in machine-readable media, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable media" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0127] It should also be noted that the exemplary embodiments mentioned in the present invention describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiments, or in a different order from the embodiments, or several steps can be performed simultaneously.
[0128] The above is only a specific implementation of the present invention. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present invention is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be covered within the protection scope of the present invention.
Claims
1. A method for data access, characterized in that: include: determining a first rack from at least one rack of a first data center according to a specified algorithm; Determine a first computing node from at least one computing node of the first rack according to the specified algorithm; Storing the data block to be stored in the first computing node; determining at least one second rack from the at least one rack of the first data center according to the specified algorithm; Determine a second computing node from the at least one rack of the at least one second rack according to the specified algorithm, respectively, the second computing node being used to store the replica data of the data block; According to the length of the index statement, determine whether the index statement is damaged by checking the leading and trailing identification bits + index size of the index statement. The index statement consists of the starting position of the data block index, the disk offset address of the data block in the current storage node, the size of the data block, the data block integrity check code and the end position of the data block index; If the index statement is not damaged, querying the first data according to the index statement, and determining whether the first data corresponding to the index statement can be queried; If the first data corresponding to the index statement is found, determining whether the first data is damaged according to the index statement and whether the data can be read or whether the corresponding data block can be found at the corresponding position of the disk offset address of the current storage node; If the first data is not damaged, determining whether the size of the first data has changed by comparing the dataSize returned by the data block with the data block size recorded in the index statement to see whether they are consistent; If the size of the first data does not change, it indicates that the first data is not damaged.
2. The method according to claim 1, characterized in that The determining the first computing node from at least one computing node of the first rack according to the specified algorithm comprises: determining a first identifier from the first rack according to the specified algorithm; A first computing node is randomly determined from at least one computing node corresponding to the first identifier.
3. The method according to claim 1 or 2, characterized in that: The specified algorithm includes a dynamic weight load algorithm; The step of determining the first rack from at least one rack of the first data center according to a specified algorithm comprises: A dynamic weighted load algorithm is adopted to determine the first rack according to the weight of at least one rack in the first data center.
4. The method according to claim 1, characterized in that: The determining the first computing node from at least one computing node of the first rack according to the specified algorithm comprises: A dynamic weighted load algorithm is adopted to determine the first computing node according to the weight of at least one computing node of the first rack.
5. A data access device, characterized in that: The device comprises: a determination module, configured to determine a first rack from at least one rack of a first data center according to a specified algorithm; The determination module is further used to determine a first computing node from at least one computing node of the first rack according to the specified algorithm; A storage module, used for storing the data block to be stored in the first computing node; The determination module is further configured to determine at least one second rack from the at least one rack of the first data center according to the specified algorithm; The determination module is further used to determine a second computing node from the at least one rack of the at least one second rack according to the specified algorithm, the second computing node being used to store the copy data of the data block; according to the length of the index statement, determine whether the index statement is damaged by checking the front and back identification bits of the index statement + the index size, the index statement is composed of the starting position of the data block index, the disk offset address of the data block in the current storage node, the size of the data block, the data block integrity check code and the end position of the data block index; If the index statement is not damaged, querying the first data according to the index statement, and determining whether the first data corresponding to the index statement can be queried; If the first data corresponding to the index statement is found, determining whether the first data is damaged according to the index statement and whether the data can be read or whether the corresponding data block can be found at the corresponding position of the disk offset address of the current storage node; If the first data is not damaged, determining whether the size of the first data has changed by comparing the dataSize returned by the data block with the data block size recorded in the index statement to see whether they are consistent; If the size of the first data does not change, it indicates that the first data is not damaged.
6. The device according to claim 5, characterized in that The determination module is specifically used for: determining a first identifier from the first rack according to the specified algorithm; A first computing node is randomly determined from at least one computing node corresponding to the first identifier.
7. The device according to claim 5 or 6, characterized in that The determination module is specifically used for: A dynamic weighted load algorithm is adopted to determine the first rack according to a weight of at least one rack in the first data center.
8. A data access device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; the processor reads and executes the computer program instructions to implement the data access method according to any one of claims 1 to 4.
9. A computer storage medium, characterized in that The computer storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the method for accessing data according to any one of claims 1 to 4 is implemented.
