WO2021189905A1 - 分布式数据调取方法、装置、电子设备及存储介质 - Google Patents
分布式数据调取方法、装置、电子设备及存储介质 Download PDFInfo
- Publication number
- WO2021189905A1 WO2021189905A1 PCT/CN2020/131985 CN2020131985W WO2021189905A1 WO 2021189905 A1 WO2021189905 A1 WO 2021189905A1 CN 2020131985 W CN2020131985 W CN 2020131985W WO 2021189905 A1 WO2021189905 A1 WO 2021189905A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- data
- blocks
- built
- block
- check
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/08—Error detection or correction by redundancy in data representation, e.g. by using checking codes
- G06F11/10—Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
- G06F11/1004—Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2228—Indexing structures
- G06F16/2255—Hash tables
Definitions
- This application relates to the field of data processing, and in particular to a distributed data retrieval method, device, electronic equipment, and computer-readable storage medium.
- the distributed storage method is divided into two forms: multiple copies and erasure codes.
- the erasure codes cut the initial data into X data blocks and construct Y check blocks.
- call out X data blocks for use When a data block is lost, extract the corresponding check block to complete the data restoration.
- a distributed data retrieval method provided by this application includes:
- all the element blocks are retrieved at the same time, and the element blocks are sequentially stored in a pre-built list according to the response time of each element block, until the elements are stored in the list
- the number of blocks is equal to the preset value
- matrix processing is performed on the element blocks stored in the pre-built list to obtain original data, and the original data is returned to the user.
- This application also provides a distributed data retrieval device, which includes:
- the retrieval module is used to obtain the position information set of the element block related to the retrieval instruction according to the data retrieval instruction input by the user;
- the retrieval module is used to retrieve all the element blocks at the same time according to the position information set, and according to the response time of each element block, sequentially store the element blocks into a pre-built list until it is stored
- the number of element blocks to the list is equal to a preset value
- the data processing module is configured to use the pre-built erasure code to perform matrix processing on the element blocks stored in the pre-built list to obtain original data, and return the original data to the user.
- the present application also provides an electronic device, which includes: at least one processor; and,
- a memory communicatively connected with the at least one processor; wherein,
- the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the following steps:
- all the element blocks are retrieved at the same time, and the element blocks are sequentially stored in a pre-built list according to the response time of each element block, until the elements are stored in the list
- the number of blocks is equal to the preset value
- matrix processing is performed on the element blocks stored in the pre-built list to obtain original data, and the original data is returned to the user.
- the present application also provides a computer-readable storage medium, including a storage data area and a storage program area, wherein the storage data area stores created data, and the storage program area stores a computer program; wherein, the computer program is When the processor executes, the following steps are implemented:
- all the element blocks are retrieved at the same time, and the element blocks are sequentially stored in a pre-built list according to the response time of each element block, until the elements are stored in the list
- the number of blocks is equal to the preset value
- matrix processing is performed on the element blocks stored in the pre-built list to obtain original data, and the original data is returned to the user.
- FIG. 1 is a schematic flowchart of a distributed data retrieval method provided by an embodiment of this application
- Fig. 2 is a schematic diagram of a detailed implementation process of one of the steps in the distributed data retrieval method provided in Fig. 1;
- FIG. 3 is a schematic diagram of the principle of generating a check block of an erasure code according to an embodiment of the application
- FIG. 4 is a schematic diagram of modules of a distributed data retrieval device provided by an embodiment of this application.
- FIG. 5 is a schematic diagram of the internal structure of an electronic device for implementing a distributed data retrieval method provided by an embodiment of the application;
- the execution subject of the distributed data retrieval method provided in the embodiments of the present application includes, but is not limited to, at least one of the electronic devices that can be configured to execute the method provided in the embodiments of the present application, such as a server and a terminal.
- the distributed data retrieval method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform.
- the server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.
- the distributed data retrieval method includes:
- the element block includes a data block and a check block, wherein the data block and the check block are both generated from original data.
- the query information is input, the retrieval instruction corresponding to the query information is generated through the pre-built database management system, and the data block is obtained according to the retrieval instruction And the location information set of the check block.
- the location information may be physical information.
- the block node is constructed in each hard disk as the final place to store the data block or check block, and the metadata server node has an erasure code inside and serves as the data block and the check block Transit place.
- the erasure code creates a mathematical function to describe the original data to check the accuracy of the original data, and once there is data loss in the original data, the original data can also be restored.
- the method further includes:
- the erasure code uses Reed-Solomon (hereinafter abbreviated as RS) code.
- RS code is an erasure code commonly used in storage systems. It has two parameters X and Y, Is RS(X,Y). X represents the number of original data blocks, and Y represents the number of check blocks.
- the S11 further includes:
- the dividing the compiled data includes:
- the front end of the data node is used as a dividing line to obtain X data blocks, so that each data block has a little data information related to other data.
- the data distribution algorithm uses a consistent hash (consistent hash) algorithm, and the consistent hash introduces the idea of virtual nodes. That is, virtual nodes representing a certain block node are scattered among the block nodes, the output value range of the hash function is a closed loop, and the maximum value of the hash function output is the preorder of the minimum value.
- consistent hash consistent hash
- the metadata server node is used to allocate the data block and the check block to different chunk nodes, where the chunk nodes are in different hard disks, and the hard disks are distributed in In every computer in every corner of the company, the purpose of data safe storage is thus achieved. Returning the location information set of the X data blocks and the Y check blocks to ensure that the X data blocks and the Y check blocks can be inquired by the database management system.
- the block node can be divided into a hot zone and a cold zone.
- the data in the hot zone (about 70%) has a higher access frequency. Therefore, in order to ensure performance, the node in the hot zone is The data in the cold zone (about 30%) has a very low usage rate, so the nodes in the cold zone will enter the power saving mode. Therefore, in the embodiment of the present application, X element blocks can be stored in the hot zone, and the remaining Y element blocks can be stored in the cold zone. When element blocks in the hot zone are damaged or lost, the cold zone can be stored The element block with the fastest response is added to the hot zone to further increase the data reading speed.
- the embodiment of the present application first constructs a list, obtains the physical addresses of the data block and the check block, and extracts the data block and the check block at the same time. Because the response speed of the hard disk where the data block is stored is different from that of the block node where the check block is stored, the embodiment of the present application stores the data block and the check block one by one in the response speed according to the response speed. List.
- the preset value may be set to X.
- RS erasure codes are used for distributed storage.
- the erasure code rules there are X copies of the data block and Y copies of the check block. Among these X+Y copies, only X copies are obtained. Then, the original data can be generated through the reverse process of the erasure code generation principle of the check block in FIG. 3.
- the S3 includes:
- the embodiment of the present application acquires the location information set of all the element blocks related to the retrieval instruction, and retrieves all the element blocks at the same time according to the location information set, and according to each location information set.
- the element blocks are sequentially stored in the pre-built list until the number of element blocks stored in the list is equal to the preset value, without waiting for data retrieval in the slow disk.
- the embodiment of the present application uses a pre-built erasure code to perform matrix processing on the element blocks stored in the pre-built list to obtain original data, which can realize the transformation from the data block form to the original data form. Therefore, the embodiment of the present application solves the problem that the distributed storage and retrieval process will affect the data retrieval process due to the slow storage response of a certain data block.
- FIG. 4 it is a schematic diagram of the modules of the distributed data retrieval device of the present application.
- the distributed data retrieval apparatus 100 described in this application can be installed in an electronic device.
- the distributed data retrieval device 100 may include a retrieval module 101, a retrieval module 102, and a data processing module 103.
- the module described in the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by the processor of an electronic device and can complete fixed functions, and are stored in the memory of the electronic device.
- each module/unit is as follows:
- the retrieval module 101 is configured to obtain the location information set of all element blocks related to the retrieval instruction according to the data retrieval instruction input by the user.
- the element block includes a data block and a check block, wherein the data block and the check block are both generated from original data.
- the query information is input, the retrieval instruction corresponding to the query information is generated through the pre-built database management system, and the data block is obtained according to the retrieval instruction And the location information set of the check block.
- the location information may be physical information.
- the retrieval module 101 is also used for:
- the block node is constructed in each hard disk as the final place to store the data block or check block, and the metadata server node has an erasure code inside and serves as the data block and the check block Transit place.
- the erasure code creates a mathematical function to describe the original data to check the accuracy of the original data, and once there is data loss in the original data, the original data can also be restored.
- the retrieval module 101 is further configured to: obtain the original data, generate X data blocks, generate Y check blocks using a pre-built erasure code, and use a data distribution algorithm , Storing the X data blocks and the Y check blocks in each pre-built block node, and return the location information set of the X data blocks and the Y check blocks.
- the erasure code uses Reed-Solomon (hereinafter abbreviated as RS) code.
- RS code is an erasure code commonly used in storage systems. It has two parameters X and Y, Is RS(X,Y). X represents the number of original data blocks, and Y represents the number of check blocks.
- the retrieval module 101 when acquiring the original data, generating X data blocks, and generating Y check blocks using a pre-built erasure code, the retrieval module 101 is specifically configured to:
- the dividing the compiled data includes:
- the front end of the data node is used as a dividing line to obtain X data blocks, so that each data block has a little data information related to other data.
- the data distribution algorithm uses a consistent hash (consistent hash) algorithm, and the consistent hash introduces the idea of virtual nodes. That is, virtual nodes representing a certain block node are scattered among the block nodes, the output value range of the hash function is a closed loop, and the maximum value of the hash function output is the preorder of the minimum value.
- consistent hash consistent hash
- the embodiment of the application uses the metadata server node to allocate the data block and the check block to different block nodes, where the block nodes are in different hard disks, and the hard disks exist in the company’s In every computer in every corner, so as to achieve the purpose of data safe storage. Returning the location information set of the X data blocks and the Y check blocks to ensure that the X data blocks and the Y check blocks can be inquired by the database management system.
- the block node can be divided into a hot zone and a cold zone.
- the data in the hot zone (about 70%) has a higher access frequency, so in order to ensure performance, the hot zone
- the nodes in the cold zone are always active; the data in the cold zone (about 30%) has a very low usage rate, so the nodes in the cold zone will enter the power saving mode.
- the retrieval module 101 described in the embodiment of the present application can store X of the element blocks in the hot zone, and store the remaining Y element blocks in the cold zone. When any element block in the hot zone is damaged or lost, it can store The element block with the fastest response in the cold zone is supplemented to the hot zone to further increase the data reading speed.
- the retrieval module 102 is configured to retrieve all the element blocks according to the position information set, and according to the response time of each element block, sequentially store the element blocks into a pre-built list until The number of element blocks stored in the list is equal to the preset value.
- the retrieval module 102 is used to construct a list, and the physical addresses of the data block and the check block are obtained, and the data block and the check block are extracted at the same time. Because the response speed of the hard disk where the data block is stored is different from that of the block node where the check block is stored, the embodiment of the present application stores the data block and the check block one by one in the response speed according to the response speed. List.
- the retrieval module 102 when the number stored in the list is equal to a preset value, the retrieval module 102 stops storing the element block in the list.
- the preset value may be set to X.
- RS erasure codes are used for distributed storage.
- the erasure code rules there are X copies of the data block and Y copies of the check block. Among these X+Y copies, only X copies are obtained. Then, the original data can be generated through the reverse process of the erasure code generation principle of the check block in FIG. 3.
- the data processing module 103 is configured to use a pre-built erasure code to perform matrix processing on the element blocks stored in the pre-built list to obtain original data, and return the original data to the user.
- the data processing module 103 performs matrix processing on the element blocks stored in the pre-built list through the following operations to obtain original data, and returns the original data to the user:
- FIG. 5 it is a schematic structural diagram of an electronic device implementing a distributed data retrieval method according to the present application.
- the electronic device 1 may include a processor 10, a memory 11, and a bus, and may also include a computer program stored in the memory 11 and running on the processor 10, such as a distributed data retrieval program 12.
- the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, magnetic disk, CD etc.
- the memory 11 may be an internal storage unit of the electronic device 1 in some embodiments, for example, a mobile hard disk of the electronic device 1.
- the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), and a secure digital (Secure Digital) equipped on the electronic device 1.
- the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device.
- the memory 11 can be used not only to store application software and various data installed in the electronic device 1, such as the code of the distributed data retrieval program 12, etc., but also to temporarily store data that has been output or will be output.
- the processor 10 may be composed of integrated circuits in some embodiments, for example, may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits with the same function or different functions, including one or more Combinations of central processing unit (CPU), microprocessor, digital processing chip, graphics processor, and various control chips, etc.
- the processor 10 is the control core of the electronic device (Control Unit), using various interfaces and lines to connect the various components of the entire electronic device, by running or executing programs or modules stored in the memory 11 (for example, executing distributed data retrieval programs, etc.), and calling
- the data in the memory 11 is used to perform various functions of the electronic device 1 and process data.
- the bus may be a peripheral component interconnect (PCI) bus or an extended industry standard structure (extended industry standard structure). industry standard architecture, EISA for short) bus, etc.
- PCI peripheral component interconnect
- extended industry standard structure extended industry standard structure
- EISA industry standard architecture
- the bus can be divided into address bus, data bus, control bus and so on.
- the bus is configured to implement connection and communication between the memory 11 and at least one processor 10 and the like.
- FIG. 5 only shows an electronic device with components. Those skilled in the art can understand that the structure shown in FIG. 5 does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure. Components, or a combination of certain components, or different component arrangements.
- the electronic device 1 may also include a power source (such as a battery) for supplying power to various components.
- the power source may be logically connected to the at least one processor 10 through a power management device, thereby controlling power
- the device implements functions such as charge management, discharge management, and power consumption management.
- the power supply may also include any components such as one or more DC or AC power supplies, recharging devices, power failure detection circuits, power converters or inverters, and power status indicators.
- the electronic device 1 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
- the electronic device 1 may also include a network interface.
- the network interface may include a wired interface and/or a wireless interface (such as a Wi-Fi interface, a Bluetooth interface, etc.), which is usually used in the electronic device 1 Establish a communication connection with other electronic devices.
- the electronic device 1 may also include a user interface.
- the user interface may be a display (Display) and an input unit (such as a keyboard (Keyboard)).
- the user interface may also be a standard wired interface or a wireless interface.
- the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc.
- the display can also be appropriately called a display screen or a display unit, which is used to display the information processed in the electronic device 1 and to display a visualized user interface.
- the distributed data retrieval program 12 stored in the memory 11 in the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can realize:
- all the element blocks are retrieved at the same time, and the element blocks are sequentially stored in a pre-built list according to the response time of each element block, until the elements are stored in the list
- the number of blocks is equal to the preset value
- matrix processing is performed on the element blocks stored in the pre-built list to obtain original data, and the original data is returned to the user.
- the integrated module/unit of the electronic device 1 can be stored in a computer-readable storage medium. It can be volatile or non-volatile.
- the computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) .
- the computer-readable storage medium may mainly include a storage program area and a storage data area, where the storage program area may store an operating system, an application program required by at least one function, etc.; the storage data area may store Data created by the use of nodes, etc.
- the storage program area of the computer-readable storage medium stores a computer program; wherein the computer program is executed by a processor to implement the following steps:
- the position information set retrieve the element blocks, and according to the response time of each element block, sequentially store the element blocks into a pre-built list until the element blocks are stored in the list.
- the quantity is equal to the preset value
- matrix processing is performed on the element blocks stored in the pre-built list to obtain original data, and the original data is returned to the user.
- modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
- the functional modules in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
- the above-mentioned integrated unit may be implemented in the form of hardware, or may be implemented in the form of hardware plus software functional modules.
- the blockchain referred to in this application is a new application mode of computer technology such as distributed data retrieval, point-to-point transmission, consensus mechanism, and encryption algorithm.
- Blockchain essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information for verification. The validity of the information (anti-counterfeiting) and the generation of the next block.
- the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Computer Security & Cryptography (AREA)
- Quality & Reliability (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
一种分布式数据调取方法、装置、电子设备及计算机可读存储介质,涉及数据处理领域、区块链技术,该方法包括:根据用户输入的数据调取指令,获取与所述调取指令相关的元素块的位置信息集(S1);根据所述位置信息集,调取所述元素块,根据各个所述元素块的响应时间,依次将所述元素块存入至预构建的列表中,直到存入至所述列表的元素块的数量等于预设数值为止(S2);利用预构建的纠删码,对存入至预构建的列表中的所述元素块进行矩阵处理,得到原始数据,并将所述原始数据返回至用户(S3)。其中,所述元素块可以存储在区块链节点中。该方法在于解决调取分布式存储数据时,因为个别数据块调用过慢导致整体调取速度减慢的问题。
Description
本申请要求于2020年10月20日提交中国专利局、申请号为CN202011127804.X、名称为“分布式数据调取方法、装置、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及数据处理领域,尤其涉及一种分布式数据调取方法、装置、电子设备及计算机可读存储介质。
随着计算机的发展,具有更高空间使用率的分布式存储方式成为当今存储产品的技术主流。所述布式存储方式分为多副本与纠删码两种形式,其中纠删码将初始数据切割成X份数据块,又构造出Y份校验块。提取数据时,将X份数据块调用出来使用,当某个数据块丢失时,提取出对应的校验块,即可完成数据的还原。
发明人意识到,用纠删码调用时,当其中某个数据块存储在一个慢盘中,则计算机一直调取这个慢盘中的数据块而不调取校验块,使得调取速度会随着某个数据块调取速度的下降而下降。
本申请提供的一种分布式数据调取方法,包括:
根据用户输入的数据调取指令,获取与所述调取指令相关的元素块的位置信息集;
根据所述位置信息集,同时调取所有所述元素块,根据各个所述元素块的响应时间,依次将所述元素块存入至预构建的列表中,直到存入至所述列表的元素块的数量等于预设数值;
利用预构建的纠删码,对存入至预构建的列表中的所述元素块进行矩阵处理,得到原始数据,并将所述原始数据返回至用户。
本申请还提供一种分布式数据调取装置,所述装置包括:
检索模块,用于根据用户输入的数据调取指令,获取与所述调取指令相关的元素块的位置信息集;
调取模块,用于根据所述位置信息集,同时调取所有所述元素块,根据各个所述元素块的响应时间,依次将所述元素块存入至预构建的列表中,直到存入至所述列表的元素块的数量等于预设数值;
数据处理模块,用于利用预构建的纠删码,对存入至预构建的列表中的所述元素块进行矩阵处理,得到原始数据,并将所述原始数据返回至用户。
本申请还提供一种电子设备,所述电子设备包括:至少一个处理器;以及,
与所述至少一个处理器通信连接的存储器;其中,
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如下步骤:
根据用户输入的数据调取指令,获取与所述调取指令相关的元素块的位置信息集;
根据所述位置信息集,同时调取所有所述元素块,根据各个所述元素块的响应时间,依次将所述元素块存入至预构建的列表中,直到存入至所述列表的元素块的数量等于预设数值;
利用预构建的纠删码,对存入至预构建的列表中的所述元素块进行矩阵处理,得到原始数据,并将所述原始数据返回至用户。
本申请还提供一种计算机可读存储介质,包括存储数据区和存储程序区,其中,所述存储数据区存储创建的数据,所述存储程序区存储有计算机程序;其中,所述计算机程序被处理器执行时实现如下步骤:
根据用户输入的数据调取指令,获取与所述调取指令相关的元素块的位置信息集;
根据所述位置信息集,同时调取所有所述元素块,根据各个所述元素块的响应时间,依次将所述元素块存入至预构建的列表中,直到存入至所述列表的元素块的数量等于预设数值;
利用预构建的纠删码,对存入至预构建的列表中的所述元素块进行矩阵处理,得到原始数据,并将所述原始数据返回至用户。
图1为本申请一实施例提供的分布式数据调取方法的流程示意图;
图2为图1提供的分布式数据调取方法中其中一个步骤的详细实施流程示意图;
图3为本申请一实施例提供的纠删码生成校验块的原理示意图;
图4为本申请一实施例提供的分布式数据调取装置的模块示意图;
图5为本申请一实施例提供的实现分布式数据调取方法的电子设备的内部结构示意图;
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请提供一种分布式数据调取方法。本申请实施例提供的分布式数据调取方法的执行主体包括但不限于服务端、终端等能够被配置为执行本申请实施例提供的该方法的电子设备中的至少一种。换言之,所述分布式数据调取方法可以由安装在终端设备或服务端设备的软件或硬件来执行,所述软件可以是区块链平台。所述服务端包括但不限于:单台服务器、服务器集群、云端服务器或云端服务器集群等。
参照图1所示,本申请一实施例提供的分布式数据调取方法包括:
S1、根据用户输入的数据调取指令,获取与所述调取指令相关的元素块的位置信息集。
本申请实施例中,所述元素块包括数据块与校验块,其中,所述数据块与校验块都是由原始数据产生。
本申请实施例中,当用户需要调取原始数据时,输入查询信息,通过预构建的数据库管理系统,生成与所述查询信息对应的调取指令,根据所述调取指令获得所述数据块与所述校验块的位置信息集。本申请实施例中,所述位置信息可以是物理信息。
本申请其中一个实施例中,所述S1之前,包括:
构建元数据服务器节点及组块节点,并将所述元数据服务器节点及所述组块节点进行连接;进一步连接所述元数据服务器节点与所述预构建的数据库管理系统。
所述组块节点是构建在各个硬盘中,作为存储所述数据块或校验块的最终场所,所述元数据服务器节点内部具有纠删码,并作为所述数据块与所述校验块的中转场所。
其中,所述纠删码会创建一个数学函数来描述所述原始数据,以检查所述原始数据的准确性,而且一旦所述原始数据中有数据丢失,还可以对所述原始数据执行恢复。
详细地,如图2所示,本申请其中一个实施例中,所述S1之前,还包括:
S11、获取原始数据,生成X份数据块,通过预构建的纠删码,生成Y份校验块。
本申请一实施例中,所述纠删码使用Reed-Solomon(下文简写为RS)码,所述RS码是存储系统较为常用的一种纠删码,它有两个参数X和Y,记为RS(X,Y)。X代表原始数据块个数,Y代表校验块个数。
参照图3所示,以X=5,Y=3,即5个原始数据块,3个校验块为例,将所述5个所述数据块(即D所表示部分)乘上一个(n+m)*n(即B所表示部分)的矩阵,得到一个(n+m)*1的结果矩阵,根据所述结果矩阵特点,可知所述结果矩阵中前面5个值与原来的5个数据块的值相等,而最后3个则是计算出来的校验块。
详细地,本申请实施例中,所述S11进一步包括:
获取所述原始数据,利用编码器将所述原始数据进行编码,得到编译数据;分割所述编译数据,得到X份数据块,利用所述纠删码对所述X份数据块与预设编码矩阵进行矩阵乘积运算,得到Y份校验块。
进一步的,本申请实施例中,所述分割所述编译数据,包括:
在所述编译数据中插入预设数量的空白的数据节点,复制所述数据节点前端的预设字节的数据,并将所述预设字节的数据存储至所述空白的数据节点中;以所述数据节点前端为分割线,分割得到X份的所述数据块。
本申请实施例中,以所述数据节点前端为分割线,得到X份的所述数据块,使得每一份所述数据块会有少许数据信息与其他所述数据相关。
S12、将所述X份数据块与所述Y份校验块存储至各个预构建的组块节点中,并返回所述X份数据块与所述Y份校验块的位置信息集。
利用预设数据分布算法及所述元素块的特征,计算哈希值,并将所述哈希值与所述数据库管理系统建立映射关系;利用所述映射关系,将不同所述哈希值对应的所述元素块存储至各个所述组块节点中。
本申请实施例中,所述数据分布算法使用的是一致性哈希(一致性hash)算法,一致性hash引入了虚拟节点的思想。即在所述组块节点之间散布代表某个组块节点的虚拟节点,该哈希函数输出值域为一个封闭的环,哈希函数输出的最大值是最小值的前序。
本申请实施例中,利用所述元数据服务器节点分配所述数据块与所述校验块至不同的组块节点,其中,所述组块节点在不同的硬盘中,而硬盘存在于分布在公司的各个角落中的各个计算机中,从而达到了数据安全存储的目的。返回所述X份数据块与所述Y份校验块的位置信息集,保证所述数据库管理系统时能够查询到所述X份数据块与所述Y份校验块。
本申请另一实施例中,可以将所述组块节点划分为热区与冷区,处于热区的数据(约70% )有着更高的访问频率,所以为保证性能,热区的节点是一直处于活跃状态的;而冷区的数据(约30%)使用率非常低,所以冷区的节点将会进入省电模式。因此,本申请实施例可以将其中X份元素块存储至热区,而将剩下的Y份元素块存储至冷区,当热区中有元素块损坏或丢失时,则可以将冷区中响应最快的元素块补充至所述热区,以进一步提高数据读取速度。
S2、根据所述位置信息集,调取所有所述元素块,根据各个所述元素块的响应时间,依次将所述元素块存入至预构建的列表中,直到存入至所述列表的元素块的数量等于预设数值。
本申请实施例首先构建一个列表,并获取到所述数据块与所述校验块的物理地址,同时对所述数据块与所述校验块进行提取。因为所述数据块与所述校验块存储的组块节点所在的硬盘响应速度快慢不同,本申请实施例按照所述响应速度,将所述数据块与所述校验块逐个存入所述列表。
本申请实施例中,当存入至所述列表的数量等于预设数值,停止将所述元素块存入至所述列表。
本申请实施例中,所述预设数值可以设置为X。
本申请一实施例中,分布式存储运用了RS纠删码,在纠删码规则中,有X份所述数据块及Y份校验块,在这X+Y份中只要获取X份任意的数据块或校验块就可以通过所述图3的纠删码生成校验块原理的逆向过程生成所述原始数据。
S3、利用预构建的纠删码,对存入至预构建的列表中的所述元素块进行矩阵处理,得到原始数据,并将所述原始数据返回至用户。
详细地,本申请实施例中,所述S3,包括:
利用所述纠删码对所述数据块与校验块进行矩阵乘积,除去所述编码矩阵,得到初始数据矩阵;解码所述初始数据矩阵,得到初始数据,通过预构建的数据库管理系统,将初始数据输送给用户。
本申请实施例根据用户输入的数据调取指令,获取所有与所述调取指令相关的元素块的位置信息集,根据所述位置信息集,同时调取所有所述元素块,并根据各个所述元素块的响应时间,依次将所述元素块存入至预构建的列表中,直到存入至所述列表的元素块的数量等于预设数值,而不必等待慢盘中的数据调取,此外,本申请实施例利用预构建的纠删码,对存入至预构建的列表中的所述元素块进行矩阵处理,得到原始数据,可以实现从数据块形式向原始数据形式的转变。因此,本申请实施例解决了分布式存储提取过程会因为某个数据块存储响应慢而影响数据调取过程的问题。
如图4所示,是本申请分布式数据调取装置的模块示意图。
本申请所述分布式数据调取装置100可以安装于电子设备中。根据实现的功能,所述分布式数据调取装置100可以包括检索模块101、调取模块102、数据处理模块103。本发所述模块也可以称之为单元,是指一种能够被电子设备处理器所执行,并且能够完成固定功能的一系列计算机程序段,其存储在电子设备的存储器中。
在本实施例中,关于各模块/单元的功能如下:
所述检索模块101,用于根据用户输入的数据调取指令,获取所有与所述调取指令相关的元素块的位置信息集。
本申请实施例中,所述元素块包括数据块与校验块,其中,所述数据块与校验块都是由原始数据产生。
本申请实施例中,当用户需要调取原始数据时,输入查询信息,通过预构建的数据库管理系统,生成与所述查询信息对应的调取指令,根据所述调取指令获得所述数据块与所述校验块的位置信息集。本申请实施例中,所述位置信息可以是物理信息。
本申请其中一个实施例中,所述检索模块101还用于:
构建元数据服务器节点及组块节点,并将所述元数据服务器节点及所述组块节点进行连接;进一步连接所述元数据服务器节点与所述预构建的数据库管理系统。
所述组块节点是构建在各个硬盘中,作为存储所述数据块或校验块的最终场所,所述元数据服务器节点内部具有纠删码,并作为所述数据块与所述校验块的中转场所。
其中,所述纠删码会创建一个数学函数来描述所述原始数据,以检查所述原始数据的准确性,而且一旦所述原始数据中有数据丢失,还可以对所述原始数据执行恢复。
详细地,本申请其中一个实施例中,所述检索模块101还用于:获取所述原始数据,生成X份数据块,利用预构建的纠删码生成Y份校验块;利用数据分布算法,将所述X份数据块与所述Y份校验块存储至各个预构建的组块节点中,并返回所述X份数据块与所述Y份校验块的位置信息集。
本申请一实施例中,所述纠删码使用Reed-Solomon(下文简写为RS)码,所述RS码是存储系统较为常用的一种纠删码,它有两个参数X和Y,记为RS(X,Y)。X代表原始数据块个数,Y代表校验块个数。
参照图3所示,以X=5,Y=3,即5个原始数据块,3个校验块为例,将所述5个所述数据块(即D所表示部分)乘上一个(n+m)*n(即B所表示部分)的矩阵,得到一个(n+m)*1的结果矩阵,根据所述结果矩阵特点,可知所述结果矩阵中前面5个值与原来的5个数据块的值相等,而最后3个则是计算出来的校验块。
详细地,本申请实施例中,在获取所述原始数据,生成X份数据块,利用预构建的纠删码生成Y份校验块时,所述检索模块101具体用于:
获取所述原始数据,利用编码器将所述原始数据进行编码,得到编译数据;分割所述编译数据,得到X份数据块,利用所述纠删码对所述X份数据块与预设编码矩阵进行矩阵乘积运算,得到Y份校验块。
进一步的,本申请实施例中,所述分割所述编译数据,包括:
在所述编译数据中插入预设数量的空白的数据节点,复制所述数据节点前端的预设字节的数据,并将所述预设字节的数据存储至所述空白的数据节点中;以所述数据节点前端为分割线,分割得到X份的所述数据块。
本申请实施例中,以所述数据节点前端为分割线,得到X份的所述数据块,使得每一份所述数据块会有少许数据信息与其他所述数据相关。
利用预设数据分布算法及所述元素块的特征,计算哈希值,并将所述哈希值与所述数据库管理系统建立映射关系;利用所述映射关系,将不同所述哈希值对应的所述元素块存储至各个所述组块节点中。
本申请实施例中,所述数据分布算法使用的是一致性哈希(一致性hash)算法,一致性hash引入了虚拟节点的思想。即在所述组块节点之间散布代表某个组块节点的虚拟节点,该哈希函数输出值域为一个封闭的环,哈希函数输出的最大值是最小值的前序。
本申请实施例利用所述元数据服务器节点分配所述数据块与所述校验块至不同的组块节点,其中,所述组块节点在不同的硬盘中,而硬盘存在于分布在公司的各个角落中的各个计算机中,从而达到了数据安全存储的目的。返回所述X份数据块与所述Y份校验块的位置信息集,保证所述数据库管理系统时能够查询到所述X份数据块与所述Y份校验块。
进一步的,本申请另一实施例中,可以将所述组块节点划分为热区与冷区,处于热区的数据(约70% )有着更高的访问频率,所以为保证性能,热区的节点是一直处于活跃状态的;而冷区的数据(约30%)使用率非常低,所以冷区的节点将会进入省电模式。
本申请实施例所述检索模块101可以将其中X份元素块存储至热区,而将剩下的Y份元素块存储至冷区,当热区中有元素块损坏或丢失时,则可以将冷区中响应最快的元素块补充至所述热区,以进一步提高数据读取速度。
所述调取模块102,用于根据所述位置信息集,调取所有所述元素块,根据各个所述元素块的响应时间,依次将所述元素块存入至预构建的列表中,直到存入至所述列表的元素块的数量等于预设数值。
本申请实施例利用所述调取模块102构建一个列表,并获取到所述数据块与所述校验块的物理地址,同时对所述数据块与所述校验块进行提取。因为所述数据块与所述校验块存储的组块节点所在的硬盘响应速度快慢不同,本申请实施例按照所述响应速度,将所述数据块与所述校验块逐个存入所述列表。
本申请实施例中,当存入至所述列表的数量等于预设数值,所述调取模块102停止将所述元素块存入至所述列表。
本申请实施例中,所述预设数值可以设置为X。
本申请一实施例中,分布式存储运用了RS纠删码,在纠删码规则中,有X份所述数据块及Y份校验块,在这X+Y份中只要获取X份任意的数据块或校验块就可以通过所述图3的纠删码生成校验块原理的逆向过程生成所述原始数据。
所述数据处理模块103,用于利用预构建的纠删码,对存入至预构建的列表中的所述元素块进行矩阵处理,得到原始数据,并将所述原始数据返回至用户。
详细地,本申请实施例,所述数据处理模块103通过下述操作对存入至预构建的列表中的所述元素块进行矩阵处理,得到原始数据,并将所述原始数据返回至用户:
利用所述纠删码对所述数据块与校验块进行矩阵乘积,除去所述编码矩阵,得到初始数据矩阵;解码所述初始数据矩阵,得到初始数据,通过预构建的数据库管理系统,将初始数据输送给用户。
如图5所示,是本申请实现分布式数据调取方法的电子设备的结构示意图。
所述电子设备1可以包括处理器10、存储器11和总线,还可以包括存储在所述存储器11中并可在所述处理器10上运行的计算机程序,如分布式数据调取程序12。
其中,所述存储器11至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、移动硬盘、多媒体卡、卡型存储器(例如:SD或DX存储器等)、磁性存储器、磁盘、光盘等。所述存储器11在一些实施例中可以是电子设备1的内部存储单元,例如该电子设备1的移动硬盘。所述存储器11在另一些实施例中也可以是电子设备1的外部存储设备,例如电子设备1上配备的插接式移动硬盘、智能存储卡(Smart Media Card, SMC)、安全数字(Secure
Digital, SD)卡、闪存卡(Flash
Card)等。进一步地,所述存储器11还可以既包括电子设备1的内部存储单元也包括外部存储设备。所述存储器11不仅可以用于存储安装于电子设备1的应用软件及各类数据,例如分布式数据调取程序12的代码等,还可以用于暂时地存储已经输出或者将要输出的数据。
所述处理器10在一些实施例中可以由集成电路组成,例如可以由单个封装的集成电路所组成,也可以是由多个相同功能或不同功能封装的集成电路所组成,包括一个或者多个中央处理器(Central Processing unit,CPU)、微处理器、数字处理芯片、图形处理器及各种控制芯片的组合等。所述处理器10是所述电子设备的控制核心(Control
Unit),利用各种接口和线路连接整个电子设备的各个部件,通过运行或执行存储在所述存储器11内的程序或者模块(例如执行分布式数据调取程序等),以及调用存储在所述存储器11内的数据,以执行电子设备1的各种功能和处理数据。
所述总线可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended
industry standard architecture,简称EISA)总线等。该总线可以分为地址总线、数据总线、控制总线等。所述总线被设置为实现所述存储器11以及至少一个处理器10等之间的连接通信。
图5仅示出了具有部件的电子设备,本领域技术人员可以理解的是,图5示出的结构并不构成对所述电子设备1的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。
例如,尽管未示出,所述电子设备1还可以包括给各个部件供电的电源(比如电池),优选地,电源可以通过电源管理装置与所述至少一个处理器10逻辑相连,从而通过电源管理装置实现充电管理、放电管理、以及功耗管理等功能。电源还可以包括一个或一个以上的直流或交流电源、再充电装置、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。所述电子设备1还可以包括多种传感器、蓝牙模块、Wi-Fi模块等,在此不再赘述。
进一步地,所述电子设备1还可以包括网络接口,可选地,所述网络接口可以包括有线接口和/或无线接口(如WI-FI接口、蓝牙接口等),通常用于在该电子设备1与其他电子设备之间建立通信连接。
可选地,该电子设备1还可以包括用户接口,用户接口可以是显示器(Display)、输入单元(比如键盘(Keyboard)),可选地,用户接口还可以是标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic
Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在电子设备1中处理的信息以及用于显示可视化的用户界面。
应该了解,所述实施例仅为说明之用,在专利申请范围上并不受此结构的限制。
所述电子设备1中的所述存储器11存储的分布式数据调取程序12是多个指令的组合,在所述处理器10中运行时,可以实现:
根据用户输入的数据调取指令,获取与所述调取指令相关的元素块的位置信息集;
根据所述位置信息集,同时调取所有所述元素块,根据各个所述元素块的响应时间,依次将所述元素块存入至预构建的列表中,直到存入至所述列表的元素块的数量等于预设数值;
利用预构建的纠删码,对存入至预构建的列表中的所述元素块进行矩阵处理,得到原始数据,并将所述原始数据返回至用户。
进一步地,所述电子设备1集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中,所述计算机可读存储介质可以是易失性,也可以是非易失性。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)。进一步地,所述计算机可读存储介质可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序等;存储数据区可存储根据区块链节点的使用所创建的数据等。
所述计算机可读存储介质的存储程序区存储有计算机程序;其中,所述计算机程序被处理器执行时实现如下步骤:
根据用户输入的数据调取指令,获取与所述调取指令相关的元素块的位置信息集;
根据所述位置信息集,调取所述元素块,根据各个所述元素块的响应时间,依次将所述元素块存入至预构建的列表中,直到存入至所述列表的元素块的数量等于预设数值时为止;
利用预构建的纠删码,对存入至预构建的列表中的所述元素块进行矩阵处理,得到原始数据,并将所述原始数据返回至用户。
在本申请所提供的几个实施例中,应该理解到,所揭露的设备,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其他的具体形式实现本申请。
因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附关联图表记视为限制所涉及的权利要求。
本申请所指区块链是分布式数据调取、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。
此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。系统权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第二等词语用来表示名称,而并不表示任何特定的顺序。
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。
Claims (20)
- 一种分布式数据的调取方法,其中,包括:根据用户输入的数据调取指令,获取与所述调取指令相关的元素块的位置信息集;根据所述位置信息集,调取所述元素块,根据各个所述元素块的响应时间,依次将所述元素块存入至预构建的列表中,直到存入至所述列表的元素块的数量等于预设数值时为止;利用预构建的纠删码,对存入至预构建的列表中的所述元素块进行矩阵处理,得到原始数据,并将所述原始数据返回至用户。
- 如权利要求1所述的分布式数据的调取方法,其中,所述根据用户输入的数据调取指令,获取与所述调取指令相关的元素块的位置信息集之前,包括:获取原始数据,生成X份数据块,通过预构建的纠删码,生成Y份校验块;将所述X份数据块与所述Y份校验块存储至各个预构建的组块节点中,并返回所述X份数据块与所述Y份校验块的位置信息集;由所述X份数据块及所述Y份校验块构成所述元素块。
- 如权利要求2所述的分布式数据的调取方法,其中,所述获取原始数据,生成X份数据块,通过预构建的纠删码,生成Y份校验块,包括:利用编码器将所述原始数据进行编码,得到编译数据;分割所述编译数据,得到X份数据块,利用所述纠删码对所述X份数据块与预设编码矩阵进行矩阵乘积运算,得到Y份校验块。
- 如权利要求3所述的分布式数据的调取方法,其中,所述分割所述编译数据,得到X份数据块,包括:在所述编译数据中插入预设数量的空白的数据节点,复制所述数据节点前端的预设字节的数据,并将所述预设字节的数据存储至所述空白的数据节点中;以所述数据节点前端为分割线,分割得到X份的所述数据块。
- 如权利要求3所述的分布式数据的调取方法,其中,所述获取原始数据,生成X份数据块,通过预构建的纠删码,生成Y份校验块之前,包括:构建元数据服务器节点及组块节点,并将所述元数据服务器节点及所述组块节点进行连接;连接所述元数据服务器节点与所述预构建的数据库管理系统。
- 如权利要求2所述的分布式数据的调取方法,其中,所述将所述X份数据块与所述Y份校验块存储至各个预构建的组块节点中,包括:利用预设数据分布算法及所述元素块的特征,计算哈希值,并将所述哈希值与所述数据库管理系统建立映射关系;利用所述映射关系,将不同所述哈希值对应的所述元素块存储至各个所述组块节点中。
- 如权利要求1至6中任意一项所述的分布式数据的调取方法,其中,所述利用预构建的纠删码,对存入至预构建的列表中的所述元素块进行矩阵处理,得到原始数据,并将所述原始数据返回至用户,包括:利用所述纠删码对所述数据块与校验块进行矩阵乘积,除去所述编码矩阵,得到初始数据矩阵;解码所述初始数据矩阵,得到初始数据,通过预构建的数据库管理系统,将初始数据输送给用户。
- 一种分布式数据调取装置,其中,所述装置包括:检索模块,用于根据用户输入的数据调取指令,获取与所述调取指令相关的元素块的位置信息集;调取模块,用于根据所述位置信息集,同时调取所有所述元素块,根据各个所述元素块的响应时间,依次将所述元素块存入至预构建的列表中,直到存入至所述列表的元素块的数量等于预设数值;数据处理模块,用于利用预构建的纠删码,对存入至预构建的列表中的所述元素块进行矩阵处理,得到原始数据,并将所述原始数据返回至用户。
- 一种电子设备,其中,所述电子设备包括:至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的计算机程序指令,所述计算机程序指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如下步骤:根据用户输入的数据调取指令,获取与所述调取指令相关的元素块的位置信息集;根据所述位置信息集,调取所述元素块,根据各个所述元素块的响应时间,依次将所述元素块存入至预构建的列表中,直到存入至所述列表的元素块的数量等于预设数值时为止;利用预构建的纠删码,对存入至预构建的列表中的所述元素块进行矩阵处理,得到原始数据,并将所述原始数据返回至用户。
- 如权利要求9所述的电子设备,其中,所述根据用户输入的数据调取指令,获取与所述调取指令相关的元素块的位置信息集之前,所述计算机程序指令被所述至少一个处理器执行时还实现如下步骤:获取原始数据,生成X份数据块,通过预构建的纠删码,生成Y份校验块;将所述X份数据块与所述Y份校验块存储至各个预构建的组块节点中,并返回所述X份数据块与所述Y份校验块的位置信息集;由所述X份数据块及所述Y份校验块构成所述元素块。
- 如权利要求10所述的电子设备,其中,所述获取原始数据,生成X份数据块,通过预构建的纠删码,生成Y份校验块,包括:利用编码器将所述原始数据进行编码,得到编译数据;分割所述编译数据,得到X份数据块,利用所述纠删码对所述X份数据块与预设编码矩阵进行矩阵乘积运算,得到Y份校验块。
- 如权利要求11所述的电子设备,其中,所述分割所述编译数据,得到X份数据块,包括:在所述编译数据中插入预设数量的空白的数据节点,复制所述数据节点前端的预设字节的数据,并将所述预设字节的数据存储至所述空白的数据节点中;以所述数据节点前端为分割线,分割得到X份的所述数据块。
- 如权利要求11所述的电子设备,其中,所述获取原始数据,生成X份数据块,通过预构建的纠删码,生成Y份校验块之前,所述计算机程序指令被所述至少一个处理器执行时还实现如下步骤:构建元数据服务器节点及组块节点,并将所述元数据服务器节点及所述组块节点进行连接;连接所述元数据服务器节点与所述预构建的数据库管理系统。
- 如权利要求10所述的电子设备,其中,所述将所述X份数据块与所述Y份校验块存储至各个预构建的组块节点中,包括:利用预设数据分布算法及所述元素块的特征,计算哈希值,并将所述哈希值与所述数据库管理系统建立映射关系;利用所述映射关系,将不同所述哈希值对应的所述元素块存储至各个所述组块节点中。
- 如权利要求9至14中任意一项所述的电子设备,其中,所述利用预构建的纠删码,对存入至预构建的列表中的所述元素块进行矩阵处理,得到原始数据,并将所述原始数据返回至用户,包括:利用所述纠删码对所述数据块与校验块进行矩阵乘积,除去所述编码矩阵,得到初始数据矩阵;解码所述初始数据矩阵,得到初始数据,通过预构建的数据库管理系统,将初始数据输送给用户。
- 一种计算机可读存储介质,包括存储数据区和存储程序区,其中,所述存储数据区存储创建的数据,所述存储程序区存储有计算机程序;其中,所述计算机程序被处理器执行时实现如下步骤:根据用户输入的数据调取指令,获取与所述调取指令相关的元素块的位置信息集;根据所述位置信息集,调取所述元素块,根据各个所述元素块的响应时间,依次将所述元素块存入至预构建的列表中,直到存入至所述列表的元素块的数量等于预设数值时为止;利用预构建的纠删码,对存入至预构建的列表中的所述元素块进行矩阵处理,得到原始数据,并将所述原始数据返回至用户。
- 如权利要求16所述的计算机可读存储介质,其中,所述根据用户输入的数据调取指令,获取与所述调取指令相关的元素块的位置信息集之前,所述计算机程序被处理器执行时还实现如下步骤:获取原始数据,生成X份数据块,通过预构建的纠删码,生成Y份校验块;将所述X份数据块与所述Y份校验块存储至各个预构建的组块节点中,并返回所述X份数据块与所述Y份校验块的位置信息集;由所述X份数据块及所述Y份校验块构成所述元素块。
- 如权利要求17所述的计算机可读存储介质,其中,所述获取原始数据,生成X份数据块,通过预构建的纠删码,生成Y份校验块,包括:利用编码器将所述原始数据进行编码,得到编译数据;分割所述编译数据,得到X份数据块,利用所述纠删码对所述X份数据块与预设编码矩阵进行矩阵乘积运算,得到Y份校验块。
- 如权利要求18所述的计算机可读存储介质,其中,所述分割所述编译数据,得到X份数据块,包括:在所述编译数据中插入预设数量的空白的数据节点,复制所述数据节点前端的预设字节的数据,并将所述预设字节的数据存储至所述空白的数据节点中;以所述数据节点前端为分割线,分割得到X份的所述数据块。
- 如权利要求18所述的计算机可读存储介质,其中,所述获取原始数据,生成X份数据块,通过预构建的纠删码,生成Y份校验块之前,所述计算机程序被处理器执行时还实现如下步骤:构建元数据服务器节点及组块节点,并将所述元数据服务器节点及所述组块节点进行连接;连接所述元数据服务器节点与所述预构建的数据库管理系统。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202011127804.XA CN112256472B (zh) | 2020-10-20 | 2020-10-20 | 分布式数据调取方法、装置、电子设备及存储介质 |
| CN202011127804.X | 2020-10-20 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2021189905A1 true WO2021189905A1 (zh) | 2021-09-30 |
Family
ID=74245227
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2020/131985 Ceased WO2021189905A1 (zh) | 2020-10-20 | 2020-11-27 | 分布式数据调取方法、装置、电子设备及存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN112256472B (zh) |
| WO (1) | WO2021189905A1 (zh) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114594911A (zh) * | 2022-03-13 | 2022-06-07 | 西安电子科技大学 | 基于链下纠删码分布式存储的区块链数据存储系统及方法 |
| CN115344214A (zh) * | 2022-08-26 | 2022-11-15 | 重庆紫光华山智安科技有限公司 | 数据读写方法、装置、服务器和计算机可读存储介质 |
| CN117010025A (zh) * | 2022-04-28 | 2023-11-07 | 中国电信股份有限公司 | 数据维护方法、装置、电子设备和可读介质 |
| WO2024001863A1 (zh) * | 2022-06-27 | 2024-01-04 | 华为技术有限公司 | 一种数据处理方法及相关设备 |
| CN118820005A (zh) * | 2024-06-14 | 2024-10-22 | 深圳华泓智能有限公司 | 一种基于pc端的bmc数据ipmi远程管理方法及系统 |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118245215B (zh) * | 2024-03-22 | 2025-02-14 | 深圳大学 | 资源分配方法、装置、计算机设备及存储介质 |
| CN119128431B (zh) * | 2024-08-23 | 2025-04-25 | 广州云创软件有限公司 | 一种基于云环境的客户信息管理方法及相关装置 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP3327571A1 (en) * | 2015-08-17 | 2018-05-30 | Huawei Technologies Co., Ltd. | Data recovery method, data storage method, and corresponding apparatus and system |
| CN109491968A (zh) * | 2018-11-13 | 2019-03-19 | 浙江鲸腾网络科技有限公司 | 一种文件处理方法、装置、设备及计算机可读存储介质 |
| CN110175212A (zh) * | 2019-05-22 | 2019-08-27 | 杭州复杂美科技有限公司 | 区块链分布式存储方法、数据读取方法、设备和存储介质 |
| CN110990189A (zh) * | 2019-11-29 | 2020-04-10 | 北京金山云网络技术有限公司 | 数据存储方法、装置、电子设备及计算机可读存储介质 |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105095352B (zh) * | 2015-06-19 | 2019-03-05 | 曙光信息产业股份有限公司 | 应用于分布式系统的数据处理方法及装置 |
| CN110278222B (zh) * | 2018-03-15 | 2021-09-14 | 华为技术有限公司 | 分布式文件存储系统中数据管理的方法、系统以及相关设备 |
| CN110674175A (zh) * | 2019-09-26 | 2020-01-10 | 浪潮商用机器有限公司 | 一种对象存储方法、装置、设备及可读存储介质 |
| CN111046014A (zh) * | 2019-12-24 | 2020-04-21 | 广州众鑫达科技有限公司 | 文件分布式存储系统、方法、装置及电子设备 |
| CN111541753B (zh) * | 2020-04-16 | 2024-02-27 | 深圳市迅雷网络技术有限公司 | 区块链数据的分布式存储系统、方法、计算机设备及介质 |
| CN111682874B (zh) * | 2020-06-11 | 2022-06-17 | 山东云海国创云计算装备产业创新中心有限公司 | 一种数据恢复的方法、系统、设备及可读存储介质 |
-
2020
- 2020-10-20 CN CN202011127804.XA patent/CN112256472B/zh active Active
- 2020-11-27 WO PCT/CN2020/131985 patent/WO2021189905A1/zh not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP3327571A1 (en) * | 2015-08-17 | 2018-05-30 | Huawei Technologies Co., Ltd. | Data recovery method, data storage method, and corresponding apparatus and system |
| CN109491968A (zh) * | 2018-11-13 | 2019-03-19 | 浙江鲸腾网络科技有限公司 | 一种文件处理方法、装置、设备及计算机可读存储介质 |
| CN110175212A (zh) * | 2019-05-22 | 2019-08-27 | 杭州复杂美科技有限公司 | 区块链分布式存储方法、数据读取方法、设备和存储介质 |
| CN110990189A (zh) * | 2019-11-29 | 2020-04-10 | 北京金山云网络技术有限公司 | 数据存储方法、装置、电子设备及计算机可读存储介质 |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114594911A (zh) * | 2022-03-13 | 2022-06-07 | 西安电子科技大学 | 基于链下纠删码分布式存储的区块链数据存储系统及方法 |
| CN114594911B (zh) * | 2022-03-13 | 2024-03-29 | 西安电子科技大学 | 基于链下纠删码分布式存储的区块链数据存储系统及方法 |
| CN117010025A (zh) * | 2022-04-28 | 2023-11-07 | 中国电信股份有限公司 | 数据维护方法、装置、电子设备和可读介质 |
| WO2024001863A1 (zh) * | 2022-06-27 | 2024-01-04 | 华为技术有限公司 | 一种数据处理方法及相关设备 |
| CN115344214A (zh) * | 2022-08-26 | 2022-11-15 | 重庆紫光华山智安科技有限公司 | 数据读写方法、装置、服务器和计算机可读存储介质 |
| CN118820005A (zh) * | 2024-06-14 | 2024-10-22 | 深圳华泓智能有限公司 | 一种基于pc端的bmc数据ipmi远程管理方法及系统 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN112256472B (zh) | 2024-06-25 |
| CN112256472A (zh) | 2021-01-22 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2021189905A1 (zh) | 分布式数据调取方法、装置、电子设备及存储介质 | |
| WO2021189826A1 (zh) | 报文生成方法、装置、电子设备及计算机可读存储介质 | |
| WO2019114128A1 (zh) | 区块链事务区块处理方法、电子装置及可读存储介质 | |
| CN114398346A (zh) | 数据迁移方法、装置、设备及存储介质 | |
| CN112699142A (zh) | 冷热数据处理方法、装置、电子设备及存储介质 | |
| CN113672483B (zh) | 一种设备日志存储方法、装置、电子设备及介质 | |
| CN112506486A (zh) | 搜索系统建立方法、装置、电子设备及可读存储介质 | |
| CN114185895A (zh) | 数据导入导出方法、装置、电子设备及存储介质 | |
| CN113590703B (zh) | Es数据导入方法、装置、电子设备及可读存储介质 | |
| CN111651439A (zh) | 数据稽核方法、装置及计算机可读存储介质 | |
| CN114969043A (zh) | 标签存储方法、装置、设备及存储介质 | |
| CN115269523A (zh) | 基于人工智能的文件存储与查询方法及相关设备 | |
| CN112685384A (zh) | 数据迁移方法、装置、电子设备及存储介质 | |
| CN115543198A (zh) | 非结构化数据入湖方法、装置、电子设备及存储介质 | |
| CN113468175A (zh) | 数据压缩方法、装置、电子设备及存储介质 | |
| CN115002062B (zh) | 消息处理方法、装置、设备及可读存储介质 | |
| CN113885874B (zh) | Java类文件冲突管理方法、装置、电子设备及介质 | |
| WO2022179122A1 (zh) | 基于大数据的数据存储方法、装置、电子设备及存储介质 | |
| WO2022134345A1 (zh) | 文件访问方法、装置、设备及可读存储介质 | |
| CN116610731B (zh) | 一种大数据分布式存储方法、装置、电子设备及存储介质 | |
| CN113434359B (zh) | 数据溯源系统构建方法、装置、电子设备及可读存储介质 | |
| CN114492342A (zh) | 表格图标填充方法、装置、设备及存储介质 | |
| CN114238278A (zh) | 数据分区方法、装置、电子设备及存储介质 | |
| CN114564479A (zh) | 一种数据存储方法及装置 | |
| CN114185588A (zh) | 增量包生成方法、装置、设备及存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20927769 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 20927769 Country of ref document: EP Kind code of ref document: A1 |