CN114595279A - Block chain data processing method and device - Google Patents

Block chain data processing method and device Download PDF

Info

Publication number
CN114595279A
CN114595279A CN202210483139.0A CN202210483139A CN114595279A CN 114595279 A CN114595279 A CN 114595279A CN 202210483139 A CN202210483139 A CN 202210483139A CN 114595279 A CN114595279 A CN 114595279A
Authority
CN
China
Prior art keywords
archive
blocks
recommendation
block
values
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.)
Granted
Application number
CN202210483139.0A
Other languages
Chinese (zh)
Other versions
CN114595279B (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.)
China Academy of Information and Communications Technology CAICT
Original Assignee
China Academy of Information and Communications Technology CAICT
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 China Academy of Information and Communications Technology CAICT filed Critical China Academy of Information and Communications Technology CAICT
Priority to CN202210483139.0A priority Critical patent/CN114595279B/en
Publication of CN114595279A publication Critical patent/CN114595279A/en
Application granted granted Critical
Publication of CN114595279B publication Critical patent/CN114595279B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2471Distributed queries
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • 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

Abstract

The embodiment of the disclosure discloses a method and a device for processing block chain data, wherein the method comprises the following steps: determining archive recommendation parameter values of a plurality of blocks based on storage time and heat of the plurality of blocks in a block chain node; determining archive adjustment parameter values for a plurality of blocks based on archive recommendation values for associated blocks of the plurality of blocks; determining archive recommendation values for the plurality of blocks based on the archive recommendation parameter values and the archive adjustment parameter values; providing the archiving recommendation values of the plurality of blocks to a user so that the user determines an archiving block according to the archiving recommendation values of the plurality of blocks; in response to receiving an archive instruction for an archive block, the archive block is migrated to an archive storage device. According to the embodiment of the invention, a part of storage space of the blockchain node can be vacated through reasonable data filing, the storage efficiency and the storage capacity of the blockchain node are improved, the probability of inquiring data reserved on the blockchain node is higher, and the inquiry feedback efficiency is improved.

Description

Block chain data processing method and device
Technical Field
The present disclosure relates to the field of block chain technologies, and in particular, to a method and an apparatus for processing block chain data.
Background
The narrow block chain is a chain data structure formed by combining data blocks in a sequential connection mode according to a time sequence, and is a distributed account book which is guaranteed in a cryptographic mode and cannot be tampered and forged. The generalized block chain technology is a brand new distributed infrastructure and computing paradigm that utilizes a block chain type data structure to verify and store data, utilizes a distributed node consensus algorithm to generate and update data, utilizes cryptography to ensure the security of data transmission and access, and utilizes an intelligent contract composed of automated script codes to program and operate data.
In the blockchain system, data takes a block as a basic unit, and account book credibility is realized by means of multi-node storage, however, as the running time of the blockchain increases, the storage capacity of the blockchain also tends to increase linearly, and the increase speed of the data even exceeds the increase speed of the storage medium capacity. Therefore, the current blockchain data storage will become one of the important factors limiting the development of blockchain technology.
Disclosure of Invention
The embodiment of the disclosure provides a processing method and device of block chain data, so as to improve the storage capacity of the block chain data.
In a first aspect of the embodiments of the present disclosure, a method for processing block chain data is provided, including:
determining archive recommendation parameter values for a plurality of blocks within a blockchain node based on storage times and heat of the plurality of blocks;
determining archive adjustment parameter values for the plurality of blocks based on archive recommendation values for associated blocks of the plurality of blocks;
determining archive recommendation values for the plurality of chunks based on the archive recommendation parameter values and the archive adjustment parameter values;
providing the archiving recommendation values of the plurality of blocks to a user so that the user can determine an archiving block according to the archiving recommendation values of the plurality of blocks;
in response to receiving an archive instruction for the archive block, migrating the archive block to an archive storage device.
In a second aspect of the embodiments of the present disclosure, there is provided an apparatus for processing block chain data, including:
the archive recommendation parameter value determination module is used for determining archive recommendation parameter values of a plurality of blocks in a block chain node based on the storage time and the heat of the blocks;
an archive adjustment parameter value determination module to determine archive adjustment parameter values for the plurality of blocks based on archive recommendation values for associated blocks of the plurality of blocks;
an archive recommendation value determination module to determine archive recommendation values for the plurality of blocks based on the archive recommendation parameter values and the archive adjustment parameter values;
a providing module, configured to provide the archive recommendation values of the multiple blocks to a user, so that the user determines an archive block according to the archive recommendation values of the multiple blocks;
an archive module to migrate the archive blocks to an archive storage device in response to receiving an archive instruction for the archive blocks.
In a third aspect of the embodiments of the present disclosure, there is provided an electronic device, including:
a memory for storing a computer program;
a processor, configured to execute the computer program stored in the memory, and when the computer program is executed, implement the method for processing blockchain data according to the first aspect.
In a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, where the computer program is executed by a processor to implement the method for processing blockchain data according to the first aspect.
According to the processing method and device for the block chain data, based on the storage time and the heat of a plurality of blocks in a block chain node, the archiving recommendation parameter values of the plurality of blocks can be determined, and the size of the archiving recommendation parameter values can represent the probability of the plurality of blocks being queried; since the query of the blocks may be caused when the associated block is queried, thereby affecting the probability of the blocks being queried, the archive adjustment parameter values of the blocks can be determined based on the archive recommendation values of the associated blocks; based on the archive recommendation parameter values and the archive adjustment parameter values of the plurality of blocks, archive recommendation values of the plurality of blocks can be determined, and the archive recommendation values can accurately represent the queried probability of the plurality of blocks; providing the archive recommendation values for the plurality of chunks to a user so that the user may determine an archive chunk from the plurality of chunks based on the archive recommendation values for the plurality of chunks; when a filing instruction aiming at the filing block sent by a user is received, the filing block is transferred to the filing storage device, partial storage space of the block chain node can be vacated, the storage efficiency and the storage capacity of the block chain node are improved, the probability of inquiring data reserved on the block chain node is high, and the inquiry feedback efficiency is improved.
The technical solution of the present disclosure is further described in detail by the accompanying drawings and examples.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description, serve to explain the principles of the disclosure.
The present disclosure may be more clearly understood from the following detailed description, taken with reference to the accompanying drawings, in which:
fig. 1 is a flowchart illustrating a method for processing blockchain data according to an embodiment of the present disclosure;
fig. 2 is a block diagram of a device for processing blockchain data according to an embodiment of the present disclosure;
fig. 3 is a block diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
It will be understood by those of skill in the art that the terms "first," "second," and the like in the embodiments of the present disclosure are used merely to distinguish one element from another, and are not intended to imply any particular technical meaning, nor is the necessary logical order between them.
It is also understood that in embodiments of the present disclosure, "a plurality" may refer to two or more and "at least one" may refer to one, two or more.
It is also to be understood that any reference to any component, data, or structure in the embodiments of the present disclosure may be generally understood as one or more, unless explicitly defined otherwise or indicated to the contrary hereinafter.
In addition, the term "and/or" in the present disclosure is only one kind of association relationship describing an associated object, and means that three kinds of relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" in the present disclosure generally indicates that the former and latter associated objects are in an "or" relationship.
It should also be understood that the description of the various embodiments of the present disclosure emphasizes the differences between the various embodiments, and the same or similar parts may be referred to each other, so that the descriptions thereof are omitted for brevity.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
The disclosed embodiments may be applied to electronic devices such as terminal devices, computer systems, servers, etc., which are operational with numerous other general purpose or special purpose computing system environments or configurations. Examples of well known terminal devices, computing systems, environments, and/or configurations that may be suitable for use with electronic devices, such as terminal devices, computer systems, servers, and the like, include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, hand-held or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, networked personal computers, minicomputer systems, mainframe computer systems, distributed cloud computing environments that include any of the above, and the like.
Electronic devices such as terminal devices, computer systems, servers, etc. may be described in the general context of computer system-executable instructions, such as program modules, being executed by a computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, etc. that perform particular tasks or implement particular abstract data types. The computer system/server may be practiced in distributed cloud computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules may be located in both local and remote computer system storage media including memory storage devices.
Fig. 1 is a flowchart illustrating a processing method of blockchain data according to an embodiment of the disclosure. As shown in fig. 1, a method for processing blockchain data according to an embodiment of the present disclosure includes:
s1: and determining the archiving recommendation parameter values of the plurality of blocks based on the storage time and the heat of the plurality of blocks in the block chain node. Wherein the plurality of blocks may include at least two blocks designated in the block link point.
The storage time and the heat of the block can effectively represent the probability of the block data being inquired. The formula for the archived recommendation parameter values for a block may be set as follows:
Ri=sti*hi (1)
wherein R isiRepresents an archive recommendation parameter, st, for block iiRepresents the storage time parameter, h, of block iiRepresents the heat parameter of block i, and Ri、stiAnd hiAre all taken as values of [0,1 ]]Within the range of (1).
The relationship between the storage time and the storage time parameter value can be set, and the relationship between the heat and the heat parameter value can be set, so as to determine the archiving recommendation parameter values of the plurality of blocks.
S2: an archive adjustment parameter value for the plurality of blocks is determined based on an archive recommendation value for an associated block of the plurality of blocks.
Since the query of the blocks may be caused when the associated block is queried, thereby affecting the probability of the blocks being queried, the formula of the archive recommendation value of the block may be set as follows:
Ai=cdij*Kj (2)
wherein A isiArchive Conditioning parameter, cd, representing Block iijRepresents the degree of association between block i and associated block j, KjRepresents a block archive recommendation value, and Ai、cdijAnd KjAre all taken as values of [0,1 ]]Within the range of (1).
The determination of the archive adjustment parameter values for the plurality of blocks may be performed by determining the relationship between the association relationship and the association value between the blocks and determining the archive recommendation value for the associated block.
Wherein the archive recommendation value of the associated block of the plurality of blocks can be determined by the following formula:
Kj = stj*hj (3)
wherein, KjRepresents an archive recommendation value, st, for block jjRepresents the storage time parameter, h, of block jjRepresents a heat parameter of block j, and Kj、stjAnd hjAre all taken as values of [0,1 ]]In the presence of a surfactant. The associated block j may be a block within the blockchain node, which does not belong to the plurality of blocks and is associated with the block iBlocks, at which point the archive recommendation value K for block j is associatedjDetermined by equation (3).
The relationship between the storage time and the storage time parameter value can be set, and the relationship between the heat and the heat parameter value can be set, so as to determine the archiving recommendation parameter values of the plurality of blocks.
S3: an archive recommendation value for the plurality of blocks is determined based on the archive recommendation parameter value and the archive adjustment parameter value. The more the archive recommendation value is, the more the probability of representing the block data to be queried is, and the higher the recommendation degree is.
The archive recommendation values for the plurality of chunks may be determined by the following formula:
Ki = Ri * Ai。 (4)
wherein, KiRepresenting the archive recommendation value for tile i. For any block K in the multiple blocksiDetermination of the Block K by equation (4)iThe archived recommendation value.
S4: the archive recommendation values for the plurality of blocks are provided to the user so that the user determines the archive blocks according to the archive recommendation values for the plurality of blocks.
The archived recommendation values of the multiple blocks can be sent to the client provided by other users, and can also be published at the specified formula position of the blockchain node. The archived recommendation values of the blocks can be provided to the user after being sorted in descending order.
After obtaining the archive recommendation values of the plurality of blocks, the user may select an archive block that is desired to be archived.
S5: in response to receiving an archive instruction for an archive block, the archive block is migrated to an archive storage device.
The block chain node provides an archiving service port, and a user sends an archiving instruction through the archiving service port to migrate an archiving block from an online Solid State Disk (SSD) to an offline Hard Disk Drive (Hard Disk Drive). When data is migrated, information such as a block header, transaction data, consensus information and the like of the archive block is stored in the hard disk drive, so that data recovery can be performed when needed, and the data is migrated back to the blockchain node.
In this embodiment, based on the storage time and the heat of the plurality of blocks in the blockchain node, an archive recommendation parameter value of the plurality of blocks may be determined, and the size of the archive recommendation parameter value may represent the probability of the plurality of blocks being queried; since the query of the blocks may be caused when the associated block is queried, thereby affecting the probability of the blocks being queried, the archive adjustment parameter values of the blocks can be determined based on the archive recommendation values of the associated blocks; based on the archive recommendation parameter values and the archive adjustment parameter values of the plurality of blocks, archive recommendation values of the plurality of blocks can be determined, and the archive recommendation values can accurately represent the queried probability of the plurality of blocks; providing the archive recommendation values for the plurality of chunks to a user so that the user may determine an archive chunk from the plurality of chunks based on the archive recommendation values for the plurality of chunks; when a filing instruction aiming at the filing block sent by a user is received, the filing block is transferred to the filing storage device, partial storage space of the block chain node can be vacated, the storage efficiency and the storage capacity of the block chain node are improved, the probability of inquiring data reserved on the block chain node is high, and the inquiry feedback efficiency is improved.
In one embodiment of the present disclosure, step S1 includes:
s1-1: a first archival parameter value for the plurality of blocks is determined based on storage times of the plurality of blocks.
The relationship between the storage time and the storage time parameter may be set, for example, the first archival parameter value for block i (i.e., st in equation (1)) may be determined byi):
St when the interval between the block i storage time and the current system time is less than 1 monthiTake 0.
St when the interval between the block i storage time and the current system time is 1 to 3 monthsiTake 0.2.
St when the interval between the block i storage time and the current system time is 4 to 6 monthsiTake 0.4.
St when the interval between the block i storage time and the current system time is 7 to 9 monthsiTake 0.6.
St when the interval between the block i storage time and the current system time is 10 to 12 monthsi0.8 is taken.
St when the interval between the block i storage time and the current system time is greater than 12 monthsi1 is taken.
S1-2: a second archive parameter value for the plurality of blocks is determined based on the heat of the plurality of blocks.
The relationship between heat and the heat parameter may be set, for example, the second archive parameter value for block i (i.e., h in equation (1)) may be determinedi):
When the heat of the block i is a first heat level (e.g. the number of inquired times in the last 1 month is greater than or equal to 2), hi0 is taken.
When the heat of the block i is a second heat level (e.g., the number of inquired times in the last 1 month = 1), hi0.2 was taken.
When the heat of the block i is a third heat level (for example, the number of inquired times in the last 3 months is ≧ 1, and the number of inquired times in the last 1 month = 0), hiTake 0.4.
When the popularity of the block i is a fourth popularity level (e.g. the inquired times in the last 6 months is ≧ 1, and the inquired times in the last 3 months is = 0), hiTake 0.6.
When the popularity of the block i is a fifth popularity level (e.g. the inquired times in the last 12 months is ≧ 1, and the inquired times in the last 6 months is = 0), hi0.8 is taken.
When the heat of the block i is a sixth heat level (e.g., the number of inquired times in the last 12 months = 0), hi1 is taken.
S1-3: and determining the archiving recommendation parameter value based on the first archiving parameter value and the second archiving parameter value. I.e., determining the archive recommended parameter values of all the blocks in the plurality of blocks in the manner of steps S1-1 to S1-2.
In this embodiment, according to the storage time and the heat degree of the block, a first filing parameter value in the storage time dimension and a second filing parameter value in the heat degree dimension may be respectively determined, and further, a reasonable filing recommendation parameter value for the block may be obtained in the storage time dimension and the heat degree dimension.
In one embodiment of the present disclosure, step S2 includes:
s2-1: one block is selected from the plurality of blocks, and the associated block of the currently selected block is obtained. And determining the associated block of the currently selected block according to the transaction object and the transaction time in the transaction data of the currently selected block.
S2-2: and determining an archiving adjustment parameter value of the currently selected block based on the association degree between the associated block of the currently selected block and the archiving recommendation value of the associated block of the currently selected block. Wherein, the archive recommendation value of the currently selected block can be obtained based on formula (2) and formula (3).
S2-3: archive adjustment parameter values for remaining blocks of the plurality of blocks other than the currently selected block are obtained. Wherein the counterpart recommendation values of the remaining tiles may be determined in the manner of S2-1 to S2-2.
In this embodiment, the archive adjustment parameter values of the plurality of blocks can be reasonably determined based on the association degree between the blocks and the archive recommendation value of the associated block.
In one embodiment of the present disclosure, in step S5, the blockchain node and the archival storage device may be data synchronized prior to migrating the archival blocks to the archival storage device.
In this embodiment, the consistency of the data stored in the blockchain node and the archival storage device can be improved through data synchronization.
In an embodiment of the present disclosure, after step S5, the method may further include:
s6: in response to receiving the data query request, a query object is extracted from the data query request. The query object may include transactional data in the blockchain data.
S7: and feeding back a query result based on the query object. Specifically, step S7 may include:
S7-A: and if the query object is found on the block chain link point, feeding back the query object. When the object is fed back to the user, the current storage location (e.g., block number) of the query object may also be fed back to each other.
S7-B: and if the query object is not found on the block link point and is found on the filing storage equipment, feeding back the query object. When the object is fed back to the user, the current storage location (for example, the storage address of the HDD hard disk) of the query object may be fed back to each other.
S7-C: and if the query object is not found on the blockchain node and the archiving storage device, feeding back query failure information.
In this embodiment, after the data is archived, the query can be performed in the block link point and the archive storage device, respectively, so that the data stored in the archive storage device can also be queried to meet the query requirement.
In an embodiment of the present disclosure, after step S5, the method may include:
s8: in response to receiving the data recovery request, a data recovery object is obtained from the data recovery request.
S9: the data recovery object is migrated from the archival storage device to the blockchain node.
Before data recovery, firstly, validity check is carried out on a data recovery object. The validity checking method may include: and performing hash check on the data on the chain based on the hash value of the data recovery object, and if the hash check passes, determining that the data recovery object is not modified after being migrated to the archiving storage device, and at this time, performing data recovery based on the block information stored during data archiving.
In this embodiment, after the data is archived, data recovery may be performed on the archive block, and after the archive block is recovered to the blockchain node, the data query feedback efficiency of the block may be provided.
In one embodiment of the present disclosure, before step S8, the method may include: and if the number of times of the data recovery object being queried reaches a preset query number threshold value within a preset time, performing data recovery prompting on the user based on the data recovery object. For example, when a certain transaction data is queried 2 times in 3 months, data recovery can be provided for the user.
In this embodiment, when the number of times of querying the data archived in the archive storage device in a preset time reaches a preset query number threshold, which indicates that the probability of querying the data is high, data recovery prompts may be performed mutually at this time, so as to select whether to perform data recovery according to personal needs.
Fig. 2 is a block diagram of a device for processing blockchain data according to an embodiment of the present disclosure. As shown in fig. 2, the apparatus for processing blockchain data according to the embodiment of the present disclosure includes:
an archive recommendation parameter value determination module 100, configured to determine archive recommendation parameter values of a plurality of blocks in a blockchain node based on storage time and heat of the plurality of blocks;
an archive adjustment parameter value determination module 200 for determining archive adjustment parameter values for the plurality of blocks based on the archive recommendation values for the associated blocks of the plurality of blocks;
an archive recommendation determination module 300 for determining archive recommendation values for the plurality of blocks based on the archive recommendation parameter value and the archive adjustment parameter value;
a providing module 400, configured to provide the archive recommendation values of the multiple blocks to a user, so that the user determines an archive block according to the archive recommendation values of the multiple blocks;
an archive module 500 for, in response to receiving an archive instruction for the archive block, migrating the archive block to an archive storage device.
In one embodiment of the present disclosure, the archive adjustment parameter value determination module 200 is configured to select one block from the plurality of blocks, obtain an associated block of the currently selected block; the archive adjustment parameter value determination module 200 is further configured to determine an archive adjustment parameter value for the currently selected block based on the association degree between the associated block of the currently selected block and the currently selected block, and the archive recommendation value for the associated block of the currently selected block; the archive adjustment parameter value determination module 200 is further configured to obtain archive adjustment parameter values for remaining blocks of the plurality of blocks other than the currently selected block.
In an embodiment of the present disclosure, the apparatus for processing blockchain data further includes a query module, configured to, in response to receiving a data query request, extract a query object from the data query request; the query module is further configured to feed back the query object if the query object is found on the blockchain node; the query module is further configured to feed back the query object if the query object is not found on the blockchain node and the query object is found on the archive storage device; the query module is further configured to feed back query failure information if the query object is not found on both the blockchain node and the archival storage device.
In an embodiment of the present disclosure, the apparatus for processing blockchain data further includes a recovery module, configured to, in response to receiving a data recovery request, obtain a data recovery object from the data recovery request; the restore module is further to migrate the data restore object from the archival storage device to the blockchain node.
In an embodiment of the present disclosure, the providing module 400 is further configured to perform a data recovery prompt to the user based on the data recovery object if the number of times that the data recovery object is queried reaches a preset query number threshold value within a preset time.
In one embodiment of the present disclosure, the archive recommendation parameter value determination module 100 is configured to determine a first archive coefficient for the plurality of blocks based on storage times of the plurality of blocks; the archive recommendation parameter value determination module 100 is further configured to determine a second archive coefficient for the plurality of blocks based on the heat of the plurality of blocks; the filing recommendation parameter value determination module 100 is further configured to determine the filing recommendation parameter value based on a preset basic filing recommendation value, the first filing coefficient, and the second filing coefficient.
In an embodiment of the present disclosure, the apparatus for processing blockchain data further includes a synchronization module, where the synchronization module is configured to synchronize data between the blockchain node and the archival storage device.
It should be noted that, the specific implementation of the processing apparatus for blockchain data in the embodiment of the present disclosure is similar to the specific implementation of the processing method for blockchain data in the embodiment of the present disclosure, and specific reference is specifically made to the description of the processing method portion for blockchain data, and details are not repeated for reducing redundancy.
In addition, an embodiment of the present disclosure also provides an electronic device, including:
a memory for storing a computer program;
a processor, configured to execute the computer program stored in the memory, and when the computer program is executed, implement the processing method of the blockchain data according to any of the above embodiments of the present disclosure.
Fig. 3 is a block diagram of an electronic device according to an embodiment of the present disclosure. An electronic device according to an embodiment of the present disclosure is described with reference to fig. 3. The electronic device may be either or both of the first device and the second device, or a stand-alone device separate from them, which stand-alone device may communicate with the first device and the second device to receive the acquired input signals therefrom.
As shown in fig. 3, the electronic device includes one or more processors and memory.
The processor may be a Central Processing Unit (CPU) or other form of processing unit having data processing capabilities and/or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.
The memory may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, Random Access Memory (RAM), cache memory (cache), and/or the like. The non-volatile memory may include, for example, Read Only Memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium and executed by a processor to implement the processing methods of blockchain data of the various embodiments of the present disclosure described above and/or other desired functions.
In one example, the electronic device may further include: an input device and an output device, which are interconnected by a bus system and/or other form of connection mechanism (not shown).
The input device may also include, for example, a keyboard, mouse, and the like.
The output device may output various information including the determined distance information, direction information, and the like to the outside. The output devices may include, for example, a display, speakers, a printer, and a communication network and remote output devices connected thereto, among others.
Of course, for simplicity, only some of the components of the electronic device relevant to the present disclosure are shown in fig. 3, omitting components such as buses, input/output interfaces, and the like. In addition, the electronic device may include any other suitable components, depending on the particular application.
In addition to the above methods and apparatus, embodiments of the present disclosure may also be a computer program product comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps in the method of processing blockchain data according to the various embodiments of the present disclosure described in the above section of this specification.
The computer program product may write program code for carrying out operations for embodiments of the present disclosure in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server.
Furthermore, embodiments of the present disclosure may also be a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, cause the processor to perform the steps in the method of processing blockchain data according to the various embodiments of the present disclosure described in the above section of the present specification.
The computer-readable storage medium may take any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may include, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
The foregoing describes the general principles of the present disclosure in conjunction with specific embodiments, however, it is noted that the advantages, effects, etc. mentioned in the present disclosure are merely examples and are not limiting, and they should not be considered essential to the various embodiments of the present disclosure. Furthermore, the foregoing disclosure of specific details is for the purpose of illustration and description and is not intended to be limiting, since the disclosure is not intended to be limited to the specific details so described.
In the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts in the embodiments are referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The block diagrams of devices, apparatuses, devices, systems involved in the present disclosure are only given as illustrative examples and are not intended to require or imply that the connections, arrangements, configurations must be made in the manner shown in the block diagrams. These devices, apparatuses, devices, systems may be connected, arranged, configured in any manner, as will be appreciated by those skilled in the art. Words such as "including," "comprising," "having," and the like are open-ended words that mean "including, but not limited to," and are used interchangeably therewith. The words "or" and "as used herein mean, and are used interchangeably with, the word" and/or, "unless the context clearly dictates otherwise. The word "such as" is used herein to mean, and is used interchangeably with, the phrase "such as but not limited to".
The method and apparatus of the present disclosure may be implemented in a number of ways. For example, the methods and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order for the steps of the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above unless specifically stated otherwise. Further, in some embodiments, the present disclosure may also be embodied as programs recorded in a recording medium, the programs including machine-readable instructions for implementing the methods according to the present disclosure. Thus, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
It is also noted that in the devices, apparatuses, and methods of the present disclosure, each component or step can be decomposed and/or recombined. These decompositions and/or recombinations are to be considered equivalents of the present disclosure.
The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the disclosure. Thus, the present disclosure is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit embodiments of the disclosure to the form disclosed herein. While a number of example aspects and embodiments have been discussed above, those of skill in the art will recognize certain variations, modifications, alterations, additions and sub-combinations thereof.

Claims (10)

1. A method for processing block chain data, comprising:
determining archive recommendation parameter values for a plurality of blocks within a blockchain node based on storage times and heat of the plurality of blocks;
determining archive adjustment parameter values for the plurality of blocks based on archive recommendation values for associated blocks of the plurality of blocks;
determining archive recommendation values for the plurality of chunks based on the archive recommendation parameter values and the archive adjustment parameter values;
providing the archiving recommendation values of the plurality of blocks to a user so that the user can determine an archiving block according to the archiving recommendation values of the plurality of blocks;
in response to receiving an archive instruction for the archive block, migrating the archive block to an archive storage device.
2. The method of claim 1, wherein determining the archived adjustment parameter values for the plurality of blocks based on the archived recommendation values for the associated blocks of the plurality of blocks comprises:
selecting one block from the plurality of blocks, and acquiring an associated block of the currently selected block;
determining an archive adjustment parameter value for the currently selected block based on a degree of association between the currently selected block and the associated block of the currently selected block and an archive recommendation value for the associated block of the currently selected block;
obtaining archive adjustment parameter values for remaining blocks of the plurality of blocks other than the currently selected block.
3. The method of claim 1, further comprising:
in response to receiving a data query request, extracting a query object from the data query request;
if the query object is found on the blockchain node, feeding back the query object;
if the query object is not found on the blockchain node and the query object is found on the filing storage device, feeding back the query object;
and if the query object is not found on the blockchain node and the archiving and storing equipment, feeding back query failure information.
4. The method of claim 3, further comprising:
in response to receiving a data recovery request, obtaining a data recovery object from the data recovery request;
migrating the data recovery object from the archival storage device to the blockchain node.
5. The method for processing blockchain data according to claim 4, wherein before said obtaining a data recovery object from the data recovery request in response to receiving the data recovery request, further comprising:
and if the number of times of the data recovery object being queried reaches a preset query number threshold value within a preset time, performing data recovery prompting on the user based on the data recovery object.
6. The method of claim 1, wherein determining the archive recommendation parameter values for the plurality of blocks based on the storage time and the heat of the plurality of blocks within the blockchain node comprises:
determining a first archival parameter value for the plurality of blocks based on storage times of the plurality of blocks;
determining a second archive parameter value for the plurality of blocks based on the heat of the plurality of blocks;
determining the archive recommendation parameter value based on the first archive parameter value and the second archive parameter value.
7. The method of claim 1, wherein prior to migrating the archive block to an archive storage device, further comprising:
and carrying out data synchronization on the blockchain node and the archiving storage device.
8. An apparatus for processing blockchain data, comprising:
the archive recommendation parameter value determination module is used for determining archive recommendation parameter values of a plurality of blocks in a block chain node based on the storage time and the heat of the blocks;
an archive adjustment parameter value determination module to determine archive adjustment parameter values for the plurality of blocks based on archive recommendation values for associated blocks of the plurality of blocks;
an archive recommendation value determination module to determine archive recommendation values for the plurality of blocks based on the archive recommendation parameter values and the archive adjustment parameter values;
a providing module, configured to provide the archive recommendation values of the multiple blocks to a user, so that the user determines an archive block according to the archive recommendation values of the multiple blocks;
an archive module to migrate the archive blocks to an archive storage device in response to receiving an archive instruction for the archive blocks.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program stored in the memory, wherein the computer program when executed implements the method for processing blockchain data according to any of the claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, the computer program, when being executed by a processor, implementing the method for processing blockchain data according to any one of claims 1 to 7.
CN202210483139.0A 2022-05-06 2022-05-06 Block chain data processing method and device Active CN114595279B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210483139.0A CN114595279B (en) 2022-05-06 2022-05-06 Block chain data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210483139.0A CN114595279B (en) 2022-05-06 2022-05-06 Block chain data processing method and device

Publications (2)

Publication Number Publication Date
CN114595279A true CN114595279A (en) 2022-06-07
CN114595279B CN114595279B (en) 2022-08-12

Family

ID=81821436

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210483139.0A Active CN114595279B (en) 2022-05-06 2022-05-06 Block chain data processing method and device

Country Status (1)

Country Link
CN (1) CN114595279B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105447062A (en) * 2014-09-30 2016-03-30 中国电信股份有限公司 Hot spot data identification method and device
WO2019024673A1 (en) * 2017-08-02 2019-02-07 众安信息技术服务有限公司 Blockchain block data archiving method and apparatus, and query method and apparatus
CN110442644A (en) * 2019-07-08 2019-11-12 深圳壹账通智能科技有限公司 Block chain data filing storage method, device, computer equipment and storage medium
CN112558872A (en) * 2020-12-10 2021-03-26 东软集团股份有限公司 Data processing method and device, storage medium and electronic equipment
CN113238996A (en) * 2021-05-18 2021-08-10 中国信息通信研究院 Block chain data archiving method based on DHT, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105447062A (en) * 2014-09-30 2016-03-30 中国电信股份有限公司 Hot spot data identification method and device
WO2019024673A1 (en) * 2017-08-02 2019-02-07 众安信息技术服务有限公司 Blockchain block data archiving method and apparatus, and query method and apparatus
CN110442644A (en) * 2019-07-08 2019-11-12 深圳壹账通智能科技有限公司 Block chain data filing storage method, device, computer equipment and storage medium
CN112558872A (en) * 2020-12-10 2021-03-26 东软集团股份有限公司 Data processing method and device, storage medium and electronic equipment
CN113238996A (en) * 2021-05-18 2021-08-10 中国信息通信研究院 Block chain data archiving method based on DHT, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN114595279B (en) 2022-08-12

Similar Documents

Publication Publication Date Title
CN110263035B (en) Block chain-based data storage and query method and device and electronic equipment
CN108805570B (en) Data processing method, device and storage medium
EP3832578A1 (en) Electronic invoice identifier allocation method, and electronic ticket generating method, device and system
WO2020063820A1 (en) Asset transaction method, storage medium and computer device
US11657171B2 (en) Large network attached storage encryption
CN111630507A (en) Distributed blockchain data storage under account model
CN111630830A (en) Distributed blockchain data storage under account model
US20140108338A1 (en) Method and System for Data Synchronization, and Apparatus thereof
US10078687B2 (en) Deletion of elements from a probabilistic data structure
US10965732B2 (en) Streaming zip
KR20210045353A (en) Indexing and recovery of encoded blockchain data
US10263784B2 (en) Signature verification for data set components using probabilistic data structures
CN111095210A (en) Storing shared blockchain data based on error correction coding
CN112101942A (en) Transaction request processing method, system, device and equipment based on block chain
CN109672752A (en) The synchronous method of data and node
CN111339551B (en) Data verification method and related device and equipment
CN109451069B (en) Network data file library storage and query method based on distributed storage
CN110769055B (en) Method, device, medium and electronic equipment for realizing service discovery
CN114595279B (en) Block chain data processing method and device
EP3349416B1 (en) Relationship chain processing method and system, and storage medium
CN110772785B (en) Game archive sharing method and device and electronic equipment
CN116756152A (en) Block chain-based data processing method and device, electronic equipment and storage medium
US10348705B1 (en) Autonomous communication protocol for large network attached storage
US11137980B1 (en) Monotonic time-based data storage
CN115589298A (en) Method, device, system, equipment and medium for verifying information of block chain

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
GR01 Patent grant
GR01 Patent grant