CN111651450B - Block copy method, device, equipment and medium based on block chain - Google Patents

Block copy method, device, equipment and medium based on block chain Download PDF

Info

Publication number
CN111651450B
CN111651450B CN202010313801.9A CN202010313801A CN111651450B CN 111651450 B CN111651450 B CN 111651450B CN 202010313801 A CN202010313801 A CN 202010313801A CN 111651450 B CN111651450 B CN 111651450B
Authority
CN
China
Prior art keywords
block
copied
hash value
region
content
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.)
Active
Application number
CN202010313801.9A
Other languages
Chinese (zh)
Other versions
CN111651450A (en
Inventor
谭强
孙善宝
徐驰
金长新
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Inspur Science Research Institute Co Ltd
Original Assignee
Shandong Inspur Science Research Institute Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shandong Inspur Science Research Institute Co Ltd filed Critical Shandong Inspur Science Research Institute Co Ltd
Priority to CN202010313801.9A priority Critical patent/CN111651450B/en
Publication of CN111651450A publication Critical patent/CN111651450A/en
Application granted granted Critical
Publication of CN111651450B publication Critical patent/CN111651450B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a block copying method, a device, equipment and a medium based on a block chain, wherein the method comprises the following steps: creating a blank block according to the format of the block to be copied; reading the content of a subchain where the block to be copied is located, and determining a region to be copied where the block to be copied is located according to preset information; and copying the content of the block to be copied into the blank block according to the region to be copied where the block to be copied is located. In the embodiment of the application, the block copying system determines the to-be-copied area where the to-be-copied block is located according to the preset information by reading the content of the subchain where the to-be-copied block is located, and finally copies the content of the to-be-copied block into the blank block.

Description

Block copy method, device, equipment and medium based on block chain
Technical Field
The present application relates to the field of computer technologies, and in particular, to a block copy method, apparatus, device, and medium based on a block chain.
Background
The existing blockchain has a lot of inconvenience when copying data, and can not well complete the copying of the blocks, so that great trouble is brought to users. There is a need for a block copy method based on a blockchain that facilitates a user's copy operation of blocks in the blockchain.
Disclosure of Invention
In view of the above, the embodiments of the present application provide a block copy method, apparatus, device and medium based on a block chain, which are used for solving the problems existing in the background art.
The embodiment of the application adopts the following technical scheme:
the embodiment of the application provides a block copying method based on a block chain, which comprises the following steps:
creating a blank block according to the format of the block to be copied;
reading the content of a subchain where the block to be copied is located, and determining a region to be copied where the block to be copied is located according to preset information;
and copying the content of the block to be copied into the blank block according to the region to be copied where the block to be copied is located.
Further, the content of the sub-chain where the block to be copied is located includes the data of the block and the hash value of the block.
Further, the reading the content of the sub-chain where the block to be copied is located, and determining the area to be copied where the block to be copied is located according to preset information specifically includes:
reading the content of a subchain where the block to be copied is located, and detecting a preset first hash value and a preset second hash value to determine a region to be copied where the block to be copied is located;
the first hash value is a hash value of a promoter block in the region to be copied, the second hash value is a hash value of a terminator block in the region to be copied, and the region to be copied where the region to be copied is located is a region from a block corresponding to the first hash value to a block corresponding to the second hash value.
Further, the copying the content of the block to be copied into the blank block according to the region to be copied where the block to be copied is located specifically includes:
and transcribing the block contents between the block corresponding to the first hash value and the block corresponding to the second hash value into the blank block according to the region to be replicated where the block to be replicated is located.
Further, the hash value of the block to be copied includes the hash value of the present block and the hash value of the last block.
Further, the region to be copied includes a plurality of regions;
after the copying of the content of the block to be copied into the blank block, the method further includes:
dividing the copied blank area blocks into sub-chains with the same number according to the number of the areas to be copied, and deleting the hash value of the last block in each sub-block.
Further, the region to be copied includes a plurality of regions;
after the copying of the content of the block to be copied into the blank block, the method further includes:
and determining a promoter block and a terminator block of each region to be copied, and sending the hash value of the terminator block of the region to be copied to the promoter block of the next region to be copied.
The embodiment of the application also provides a block copying device based on the block chain, which comprises the following components:
the creating unit is used for creating blank blocks according to the format of the blocks to be copied;
the determining unit is used for reading the content of the subchain where the block to be copied is located and determining the area to be copied where the block to be copied is located according to preset information;
and the copying unit is used for copying the content of the block to be copied into the blank block according to the region to be copied where the block to be copied is located.
The embodiment of the application also provides a block copying device based on the block chain, which is characterized by comprising the following components:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
creating a blank block according to the format of the block to be copied;
reading the content of a subchain where the block to be copied is located, and determining a region to be copied where the block to be copied is located according to preset information;
and copying the content of the block to be copied into the blank block according to the region to be copied where the block to be copied is located.
The embodiment of the application also provides a block copy medium based on a block chain, which stores computer executable instructions, and is characterized in that the computer executable instructions are configured to:
creating a blank block according to the format of the block to be copied;
reading the content of a subchain where the block to be copied is located, and determining a region to be copied where the block to be copied is located according to preset information;
and copying the content of the block to be copied into the blank block according to the region to be copied where the block to be copied is located.
The above at least one technical scheme adopted by the embodiment of the application can achieve the following beneficial effects: in the embodiment of the application, the block copying system determines the to-be-copied area where the to-be-copied block is located according to the preset information by reading the content of the subchain where the to-be-copied block is located, and finally copies the content of the to-be-copied block into the blank block.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a flowchart of a block copy method based on a block chain according to an embodiment of the present disclosure;
FIG. 2 is a flowchart of a block copy method based on a block chain according to a second embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a block copy apparatus based on a block chain according to a third embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be clearly and completely described below with reference to specific embodiments of the present application and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The following describes in detail the technical solutions provided by the embodiments of the present application with reference to the accompanying drawings.
The examples herein refer to the mode of DNA transcription, and can be implemented to transcribe blockdata of blockchains using a "transcriber" program, in contrast to blockchain structures of similar DNA.
Fig. 1 is a flowchart of a block copy method based on a block chain according to an embodiment of the present disclosure, where the block copy system may perform the following steps, specifically including:
in step S101, the block copy system creates a blank block according to the format of the block to be copied.
Step S102, the block copying system reads the content of the sub-chain where the block to be copied is located, and determines the area to be copied where the block to be copied is located according to preset information.
Step S103, the block copying system copies the content of the block to be copied into the blank block according to the region to be copied where the block to be copied is located.
In the embodiment of the application, the block copying system determines the to-be-copied area where the to-be-copied block is located according to the preset information by reading the content of the subchain where the to-be-copied block is located, and finally copies the content of the to-be-copied block into the blank block.
Corresponding to the first embodiment of the present disclosure, fig. 2 is a schematic flow chart of a block copy method based on a block chain according to the second embodiment of the present disclosure, where the block copy system may execute the following steps, specifically including:
in step S201, the block copy system creates a blank block according to the format of the block to be copied.
Step S202, the block copying system reads the content of the sub-chain where the block to be copied is located, and determines the area to be copied where the block to be copied is located according to preset information.
In step S202 of the embodiment of the present disclosure, the content of the sub-chain where the block to be copied is located includes the data of the block and the hash value of the block. The preset information may be a first hash value and a second hash value, the first hash value may be a hash value corresponding to a promoter block in the region to be copied, and the second hash value may be a hash value corresponding to a terminator block in the region to be copied.
In step S202 of the embodiment of the present disclosure, the block replication system reads the content of the sub-chain where the block to be replicated is located, and determines, according to preset information, a region to be replicated where the block to be replicated is located, including:
the block copying system reads the content of a subchain where the block to be copied is located, and detects a preset first hash value and a preset second hash value to determine a region to be copied where the block to be copied is located;
the first hash value is a hash value of a promoter block in the region to be copied, the second hash value is a hash value of a terminator block in the region to be copied, and the region to be copied where the region to be copied is located is a region from a block corresponding to the first hash value to a block corresponding to the second hash value.
It should be noted that the block copy system may start to detect from a first block of the sub-chain where the block to be copied is located until the first hash value and the second hash value are detected.
In step S203, the block copy system copies the content of the block to be copied to the blank block according to the region to be copied where the block to be copied is located.
Copying the content of the block to be copied into the blank block according to the region to be copied where the block to be copied is located, specifically including:
and copying the block content between the block corresponding to the first hash value and the block corresponding to the second hash value into the blank block according to the region to be copied where the block to be copied is located.
The hash value of the block to be copied includes the hash value of the present block and the hash value of the last block.
The region to be copied may include a plurality of regions;
after the copying of the content of the block to be copied into the blank block, the method further includes:
dividing the copied blank area blocks into sub-chains with the same number according to the number of the areas to be copied, and deleting the hash value of the last block in each sub-block.
At this time, the preset information may be a first hash value and a second hash value of each to-be-copied region, where the first hash value may be a hash value corresponding to a start sub-block of each to-be-copied region, and the second hash value may be a hash value corresponding to a stop sub-block of each to-be-copied region.
It should be noted that there are multiple regions to be replicated, and in this embodiment of the present disclosure, the multiple regions to be replicated may be replicated to different sub-chains respectively.
Further, in the embodiment of the present specification, the area to be copied may include a plurality of areas;
after copying the content of the block to be copied into the blank block, the method further comprises:
and determining a promoter block and a terminator block of each region to be copied, and sending the hash value of the terminator block of the region to be copied to the promoter block of the next region to be copied.
At this time, the preset information may be a first hash value and a second hash value of each to-be-copied region, where the first hash value may be a hash value corresponding to a promoter block in each to-be-copied region, and the second hash value may be a hash value corresponding to a terminator block in each to-be-copied region.
It should be noted that after the contents of the blocks to be copied are copied to the blank block, the first block is the created block, which has a hash value of the block, and each subsequently established block includes two hash values except the created block, one is the hash value of the block itself, and the other is the hash value of the last block. All blocks are connected in sequence to form a block chain through the front-back pointing relation among hash values.
It should be noted that the region to be copied may be all the blocks of the entire sub-chain.
In the embodiment of the application, the block copying system determines the to-be-copied area where the to-be-copied block is located according to the preset information by reading the content of the subchain where the to-be-copied block is located, and finally copies the content of the to-be-copied block into the blank block.
Corresponding to the second embodiment of the present disclosure, fig. 3 is a schematic structural diagram of a block copy apparatus based on a block chain according to the third embodiment of the present disclosure, including: a creation unit 1, a determination unit 2 and a replication unit 3.
The creating unit 1 is used for creating blank blocks according to the format of the blocks to be copied.
The determining unit 2 is configured to read the content of the sub-chain where the block to be copied is located, and determine, according to preset information, a region to be copied where the block to be copied is located.
The copying unit 3 is configured to copy the content of the block to be copied into the blank block according to the region to be copied where the block to be copied is located.
The embodiment of the application also provides a block copying device based on the block chain, which comprises:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
creating a blank block according to the format of the block to be copied, wherein the blank block comprises a blank block with the same format as the block to be copied;
reading the content of a subchain where the block to be copied is located, and determining a region to be copied where the block to be copied is located according to preset information;
and copying the content of the block to be copied into the blank block according to the region to be copied where the block to be copied is located.
The embodiment of the application also provides a block copy medium based on a block chain, which stores computer executable instructions, wherein the computer executable instructions are configured to:
creating a blank block according to the format of the block to be copied, wherein the blank block comprises a blank block with the same format as the block to be copied;
reading the content of a subchain where the block to be copied is located, and determining a region to be copied where the block to be copied is located according to preset information;
and copying the content of the block to be copied into the blank block according to the region to be copied where the block to be copied is located.
In the 90 s of the 20 th century, improvements to one technology could clearly be distinguished as improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software (improvements to the process flow). However, with the development of technology, many improvements of the current method flows can be regarded as direct improvements of hardware circuit structures. Designers almost always obtain corresponding hardware circuit structures by programming improved method flows into hardware circuits. Therefore, an improvement of a method flow cannot be said to be realized by a hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (e.g., field programmable gate array (Field Programmable Gate Array, FPGA)) is an integrated circuit whose logic function is determined by the programming of the device by a user. A designer programs to "integrate" a digital system onto a PLD without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, such programming is mostly implemented by using "logic compiler" software, which is similar to the software compiler used in program development and writing, and the original code before the compiling is also written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), but not just one of the hdds, but a plurality of kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), lava, lola, myHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog are currently most commonly used. It will also be apparent to those skilled in the art that a hardware circuit implementing the logic method flow can be readily obtained by merely slightly programming the method flow into an integrated circuit using several of the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable logic controllers, and embedded microcontrollers, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic of the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller in a pure computer readable program code, it is well possible to implement the same functionality by logically programming the method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Such a controller may thus be regarded as a kind of hardware component, and means for performing various functions included therein may also be regarded as structures within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in the same piece or pieces of software and/or hardware when implementing the present application.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.

Claims (7)

1. A block copy method based on a blockchain, the method comprising:
creating a blank block according to the format of the block to be copied;
reading the content of the sub-chain where the block to be copied is located, determining the region to be copied where the block to be copied is located according to preset information, wherein the content of the sub-chain where the block to be copied is located comprises the data of the block and the hash value of the block, and specifically comprises the following steps:
reading the content of a subchain where the block to be copied is located, and detecting a preset first hash value and a preset second hash value to determine a region to be copied where the block to be copied is located;
the first hash value is a hash value of a promoter block in the region to be copied, the second hash value is a hash value of a terminator block in the region to be copied, and the region to be copied where the region to be copied is a region from a block corresponding to the first hash value to a block corresponding to the second hash value;
copying the content of the block to be copied into the blank block according to the region to be copied where the block to be copied is located, specifically including:
and transcribing the block contents between the block corresponding to the first hash value and the block corresponding to the second hash value into the blank block according to the region to be replicated where the block to be replicated is located.
2. The blockchain-based block copy method of claim 1, wherein the hash value of the block to be copied includes a hash value of a present block and a hash value of a previous block.
3. The blockchain-based blockcopy method of claim 2, wherein the area to be copied includes a plurality of areas;
after the copying of the content of the block to be copied into the blank block, the method further includes:
dividing the copied blank area blocks into sub-chains with the same number according to the number of the areas to be copied, and deleting the hash value of the last block in each sub-block.
4. The blockchain-based blockcopy method of claim 2, wherein the area to be copied includes a plurality of areas;
after the copying of the content of the block to be copied into the blank block, the method further includes:
and determining a promoter block and a terminator block of each region to be copied, and sending the hash value of the terminator block of the region to be copied to the promoter block of the next region to be copied.
5. A blockchain-based block replication device, the device comprising:
the creating unit is used for creating blank blocks according to the format of the blocks to be copied;
the determining unit is configured to read the content of a sub-chain where the block to be copied is located, determine, according to preset information, a region to be copied where the block to be copied is located, where the content of the sub-chain where the block to be copied is located includes data of the block and a hash value of the block, and specifically includes: reading the content of a subchain where the block to be copied is located, and detecting a preset first hash value and a preset second hash value to determine a region to be copied where the block to be copied is located; the first hash value is a hash value of a promoter block in the region to be copied, the second hash value is a hash value of a terminator block in the region to be copied, and the region to be copied where the region to be copied is a region from a block corresponding to the first hash value to a block corresponding to the second hash value;
the copying unit is configured to copy the content of the block to be copied into the blank block according to the region to be copied where the block to be copied is located, and specifically includes: and transcribing the block contents between the block corresponding to the first hash value and the block corresponding to the second hash value into the blank block according to the region to be replicated where the block to be replicated is located.
6. A blockchain-based block replication device, the device comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
creating a blank block according to the format of the block to be copied;
reading the content of the sub-chain where the block to be copied is located, determining the region to be copied where the block to be copied is located according to preset information, wherein the content of the sub-chain where the block to be copied is located comprises the data of the block and the hash value of the block, and specifically comprises the following steps:
reading the content of a subchain where the block to be copied is located, and detecting a preset first hash value and a preset second hash value to determine a region to be copied where the block to be copied is located;
the first hash value is a hash value of a promoter block in the region to be copied, the second hash value is a hash value of a terminator block in the region to be copied, and the region to be copied where the region to be copied is a region from a block corresponding to the first hash value to a block corresponding to the second hash value;
copying the content of the block to be copied into the blank block according to the region to be copied where the block to be copied is located, specifically including:
and transcribing the block contents between the block corresponding to the first hash value and the block corresponding to the second hash value into the blank block according to the region to be replicated where the block to be replicated is located.
7. A blockchain-based blockcopy medium storing computer executable instructions, the computer executable instructions configured to:
creating a blank block according to the format of the block to be copied;
reading the content of the sub-chain where the block to be copied is located, determining the region to be copied where the block to be copied is located according to preset information, wherein the content of the sub-chain where the block to be copied is located comprises the data of the block and the hash value of the block, and specifically comprises the following steps:
reading the content of a subchain where the block to be copied is located, and detecting a preset first hash value and a preset second hash value to determine a region to be copied where the block to be copied is located;
the first hash value is a hash value of a promoter block in the region to be copied, the second hash value is a hash value of a terminator block in the region to be copied, and the region to be copied where the region to be copied is a region from a block corresponding to the first hash value to a block corresponding to the second hash value;
copying the content of the block to be copied into the blank block according to the region to be copied where the block to be copied is located, specifically including:
and transcribing the block contents between the block corresponding to the first hash value and the block corresponding to the second hash value into the blank block according to the region to be replicated where the block to be replicated is located.
CN202010313801.9A 2020-04-20 2020-04-20 Block copy method, device, equipment and medium based on block chain Active CN111651450B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010313801.9A CN111651450B (en) 2020-04-20 2020-04-20 Block copy method, device, equipment and medium based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010313801.9A CN111651450B (en) 2020-04-20 2020-04-20 Block copy method, device, equipment and medium based on block chain

Publications (2)

Publication Number Publication Date
CN111651450A CN111651450A (en) 2020-09-11
CN111651450B true CN111651450B (en) 2023-10-10

Family

ID=72349190

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010313801.9A Active CN111651450B (en) 2020-04-20 2020-04-20 Block copy method, device, equipment and medium based on block chain

Country Status (1)

Country Link
CN (1) CN111651450B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3399458A1 (en) * 2017-05-03 2018-11-07 Cisco Technology, Inc. Method and system for content and service sharing
CN110134668A (en) * 2019-04-28 2019-08-16 阿里巴巴集团控股有限公司 Data migration method, device and equipment applied to block chain
CN110557420A (en) * 2018-06-01 2019-12-10 厦门本能管家科技有限公司 operation method and system of independent sub-chains

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3399458A1 (en) * 2017-05-03 2018-11-07 Cisco Technology, Inc. Method and system for content and service sharing
CN110557420A (en) * 2018-06-01 2019-12-10 厦门本能管家科技有限公司 operation method and system of independent sub-chains
CN110134668A (en) * 2019-04-28 2019-08-16 阿里巴巴集团控股有限公司 Data migration method, device and equipment applied to block chain

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈齐 ; 王正国 ; 李文锋 ; 曹菁菁 ; .区块链技术在新型网络购物平台设计中的应用.武汉理工大学学报(信息与管理工程版).2018,(第02期),全文. *

Also Published As

Publication number Publication date
CN111651450A (en) 2020-09-11

Similar Documents

Publication Publication Date Title
CN107391526B (en) Data processing method and device based on block chain
CN108628688B (en) Message processing method, device and equipment
CN111581230B (en) Method, equipment and medium for generating data analysis report
CN111651450B (en) Block copy method, device, equipment and medium based on block chain
CN112528614A (en) Table editing method and device and electronic equipment
CN115391337A (en) Database partitioning method and device, storage medium and electronic equipment
CN110245115B (en) File processing method, engine and system
CN112434486B (en) Automatic paging method, device, equipment and medium for device in PCB design
CN110046090B (en) Page element positioning method and device
CN107645541B (en) Data storage method and device and server
CN111596946A (en) Recommendation method, device and medium for intelligent contracts of block chains
CN111898615A (en) Feature extraction method, device, equipment and medium of object detection model
CN111539961A (en) Target segmentation method, device and equipment
CN111598219A (en) Quantization method, device, equipment and medium for depth separable convolution
CN116089434B (en) Data storage method and device, storage medium and electronic equipment
CN116880905B (en) Data storage method and device, storage medium and electronic equipment
CN117807961B (en) Training method and device of text generation model, medium and electronic equipment
CN113590490B (en) Automatic test method, device and equipment
CN117152040B (en) Point cloud fusion method and device based on depth map
CN115344410B (en) Method and device for judging event execution sequence, storage medium and electronic equipment
CN113467858B (en) Program starting method, device, equipment and medium
CN116204533B (en) Metadata model-based field index mapping method, device and storage medium
CN117316257A (en) Method, equipment and medium for testing storage capacity of switch
CN116797392A (en) Automatic verification and verification method, device, equipment and medium for financial data
CN112711539A (en) Data processing method and device and data detection system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20230908

Address after: 250101 building S02, 1036 Chaochao Road, high tech Zone, Jinan City, Shandong Province

Applicant after: Shandong Inspur Scientific Research Institute Co.,Ltd.

Address before: Floor 6, Chaochao Road, Shandong Province

Applicant before: JINAN INSPUR HIGH-TECH TECHNOLOGY DEVELOPMENT Co.,Ltd.

GR01 Patent grant
GR01 Patent grant