CN112650715A - Method, device and related product for storing data in block chain system - Google Patents

Method, device and related product for storing data in block chain system Download PDF

Info

Publication number
CN112650715A
CN112650715A CN202011643324.9A CN202011643324A CN112650715A CN 112650715 A CN112650715 A CN 112650715A CN 202011643324 A CN202011643324 A CN 202011643324A CN 112650715 A CN112650715 A CN 112650715A
Authority
CN
China
Prior art keywords
data
blockchain
node
target data
target
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.)
Pending
Application number
CN202011643324.9A
Other languages
Chinese (zh)
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.)
Beijing Octa Innovations Information Technology Co Ltd
Original Assignee
Beijing Octa Innovations Information Technology 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 Beijing Octa Innovations Information Technology Co Ltd filed Critical Beijing Octa Innovations Information Technology Co Ltd
Priority to CN202011643324.9A priority Critical patent/CN112650715A/en
Publication of CN112650715A publication Critical patent/CN112650715A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Abstract

The invention relates to a method and a device for storing data in a block chain system and a related product. In the technical scheme of the embodiment of the application, target data to be stored in any blockchain node in a blockchain system is determined; classifying the target data to obtain first data and second data; the first data is stored locally in any blockchain node, and the second data is stored in a storage node of a file storage system configured for any blockchain node in the blockchain system, so that the data storage efficiency is improved when the data storage is realized on the blockchain node.

Description

Method, device and related product for storing data in block chain system
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to a method and an apparatus for storing data in a blockchain system, and a related product.
Background
The blockchain system is essentially an integrated application mode of technologies such as a distributed data storage system, point-to-point transmission, a consensus mechanism and an encryption algorithm, and can realize trust and value transfer which cannot be realized by the traditional internet on the internet. It is based on cryptographic principles rather than credit features, enabling any agreed party to trade directly without the involvement of third party intermediaries.
In the prior art, since the storage space of each blockchain node in a blockchain system is limited, the data storage efficiency is low, and therefore how to efficiently implement storage of data on the blockchain nodes becomes an urgent technical problem to be solved.
Disclosure of Invention
Based on the foregoing problems, embodiments of the present application provide a method and an apparatus for storing data in a blockchain system, and a related product.
The embodiment of the application discloses the following technical scheme:
in a first aspect, an embodiment of the present application provides a method for storing data in a blockchain system, including:
determining target data to be stored to any blockchain node in the blockchain system;
classifying the target data to obtain first data and second data;
the first data is stored locally to any blockchain node, and the second data is stored on a storage node of a file storage system configured for any blockchain node in the blockchain system.
Optionally, in a specific embodiment, classifying the target data to obtain the first data and the second data includes: and classifying the target data according to a set data volume threshold to obtain first data and second data, wherein the target data with the data volume smaller than the data volume threshold is used as the first data, and the target data with the data volume larger than or equal to the data volume threshold is used as the second data.
Optionally, in a specific embodiment, classifying the target data to obtain the first data and the second data includes: and classifying the target data according to a set sensitivity threshold to obtain first data and second data, wherein the target data with the sensitivity smaller than the sensitivity threshold is used as the first data, and the target data with the sensitivity greater than or equal to the sensitivity threshold is used as the second data.
Optionally, in a specific embodiment, classifying the target data to obtain the first data and the second data includes: and classifying the target data according to the data category of the target data to obtain first data and second data, wherein the data category comprises a document category and a multimedia category, the target data of which the data category is the document category is used as the first data, and the target data of which the data category is the multimedia category is used as the second data.
In a second aspect, an embodiment of the present application provides an apparatus for storing data in a blockchain system, including:
a data determination unit for determining target data to be stored to any blockchain node in the blockchain system;
the classification unit is used for classifying the target data to obtain first data and second data;
the storage unit is used for storing the first data locally to any blockchain node and storing the second data on a storage node of a file storage system configured for any blockchain node in the blockchain system.
Optionally, in a specific embodiment, the classifying unit is further configured to classify the target data according to a set data amount threshold to obtain first data and second data, where the target data with a data amount smaller than the data amount threshold is used as the first data, and the target data with a data amount greater than or equal to the data amount threshold is used as the second data.
Optionally, in a specific embodiment, the classifying unit is further configured to classify the target data according to a set sensitivity threshold to obtain first data and second data, where the target data with a sensitivity smaller than the sensitivity threshold is used as the first data, and the target data with a sensitivity greater than or equal to the sensitivity threshold is used as the second data.
In a third aspect, an embodiment of the present application provides a blockchain system, including a plurality of blockchain nodes, where each blockchain node is provided with a device for storing data in the blockchain system, and the blockchain system includes:
a data determination unit for determining target data to be stored to any blockchain node in the blockchain system; the classification unit is used for classifying the target data to obtain first data and second data;
the storage unit is used for storing the first data locally to any blockchain node and storing the second data on a storage node of a file storage system configured for any blockchain node in the blockchain system.
In a fourth aspect, an embodiment of the present application provides an electronic device, which is used as a blockchain node, where the electronic device includes a memory and a processor, where the memory stores a computer-executable program, and the processor runs the computer-executable program to perform the following steps:
determining target data to be stored to any blockchain node in the blockchain system;
classifying the target data to obtain first data and second data;
the first data is stored locally to any blockchain node, and the second data is stored on a storage node of a file storage system configured for any blockchain node in the blockchain system.
In a fifth aspect, an embodiment of the present application provides a computer storage medium having computer-executable instructions stored thereon, where the computer-executable instructions, when executed, implement the following steps:
determining target data to be stored to any blockchain node in the blockchain system;
classifying the target data to obtain first data and second data;
the first data is stored locally to any blockchain node, and the second data is stored on a storage node of a file storage system configured for any blockchain node in the blockchain system.
In the technical scheme of the embodiment of the application, target data to be stored in any blockchain node in a blockchain system is determined; classifying the target data to obtain first data and second data; the first data is stored locally in any blockchain node, and the second data is stored in a storage node of a file storage system configured for any blockchain node in the blockchain system, so that the data storage efficiency is improved when the data storage is realized on the blockchain node.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a flowchart illustrating a method for storing data in a blockchain system according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of an apparatus for storing data in a blockchain system according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of a blockchain system according to an embodiment of the present disclosure;
fig. 4 is a schematic diagram of an electronic device according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 6 is a schematic diagram of a computer storage medium according to an embodiment of the present application.
Detailed Description
It is not necessary for any particular embodiment of the invention to achieve all of the above advantages at the same time.
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
Referring to fig. 1, an embodiment of the present application provides a method for storing data in a blockchain system, including:
s101: determining target data to be stored to any blockchain node in the blockchain system;
optionally, in this embodiment, the blockchain system may be a federation chain, a private chain, or a public chain;
alternatively, in this embodiment, the block link points may be a block chain light node and a block chain full node. The block chain whole node is a node which possesses all transaction data of the whole network, and the block chain light node is a node which only possesses the transaction data related to the light node.
Optionally, in this embodiment, a monitoring module is arranged on each blockchain node, and the monitoring module is configured to monitor whether there is target data to be stored in the blockchain node.
S102: classifying the target data to obtain first data and second data;
optionally, in a specific embodiment, classifying the target data to obtain the first data and the second data includes: and classifying the target data according to a set data volume threshold to obtain first data and second data, wherein the target data with the data volume smaller than the data volume threshold is used as the first data, and the target data with the data volume larger than or equal to the data volume threshold is used as the second data.
Optionally, in this embodiment, the data amount threshold specifically refers to the whole data of one file, such as one document file or one video file.
Optionally, in this embodiment, by setting the data amount threshold, the target data may be roughly divided into big data and small data, the small data is equivalent to the first data, and the big data is equivalent to the second data, so that it is ensured that the small data can be circulated in the block chain system, and the data output efficiency of the block chain system is improved.
Optionally, in this embodiment, the data amount threshold may be flexibly configured according to requirements of an application scenario, for example, if the blockchain system is a public chain, the data amount threshold is larger, if the blockchain system is a private chain, the data amount threshold is medium, and if the blockchain system is a federation chain, the data amount threshold is smaller.
Optionally, in a specific embodiment, classifying the target data to obtain the first data and the second data includes: and classifying the target data according to a set sensitivity threshold to obtain first data and second data, wherein the target data with the sensitivity smaller than the sensitivity threshold is used as the first data, and the target data with the sensitivity greater than or equal to the sensitivity threshold is used as the second data.
Optionally, in this embodiment, the sensitivity threshold may be divided according to the protection strength of the data in the application scenario.
Optionally, in this embodiment, the data related to finance, the identification number and the like are first data, and the consumption data habit of the user and the like are second data. By the data sensitivity-based mode, the target data are classified, data storage is realized with emphasis, the operation efficiency of the system is improved, and the load of the system is reduced.
Optionally, in this embodiment, the sensitivity threshold may be flexibly set according to an application scenario, so as to improve flexibility and applicability of the scheme.
Optionally, in this embodiment, a sensitive data white list may be set, and different sensitive data are classified in the sensitive data white list, that is, different sensitivity thresholds are set, so that when the target data is classified, the keyword in the target data is extracted, and the keyword is matched with the sensitive data white list, so that the target data is divided into first data and second data, thereby effectively improving the efficiency of data processing and rapidly achieving data storage.
Optionally, in a specific embodiment, classifying the target data to obtain the first data and the second data includes: and classifying the target data according to the data category of the target data to obtain first data and second data, wherein the data category comprises a document category and a multimedia category, the target data of which the data category is the document category is used as the first data, and the target data of which the data category is the multimedia category is used as the second data.
Optionally, in this embodiment, the data category is a classification of a file, for example, a document category or a multimedia category, the document category includes word, excel, txt, and the like, the multimedia includes video, audio, and movie, and a format of the multimedia category is not particularly limited.
Optionally, in this embodiment, the target data may be roughly divided into document type data and multimedia type data by setting a data type of the target data, where the document type data is equivalent to the first data and the multimedia type data is equivalent to the second data, so that the document type data can be guaranteed to be circulated in the blockchain system, and the data output efficiency of the blockchain system is improved.
Optionally, in this embodiment, the data category may be flexibly configured according to the requirement of the application scenario, and is not limited to the document category and the multimedia category.
S103: the first data is stored locally to any blockchain node, and the second data is stored on a storage node of a file storage system configured for any blockchain node in the blockchain system.
Optionally, in this embodiment, the monitoring module is provided with a monitoring policy, such as timing or monitoring only target data in a fixed format, where it is to be noted that the monitoring modules at all block link points in the block chain system have different monitoring mechanisms, such as different monitoring times, different monitoring step lengths, and the like, so as to ensure cooperative work of all block chain nodes and reduce communication conflicts inside the block chain system caused by storing the second data in the storage node.
Optionally, during storage, one block link point may correspond to one storage node, multiple block link points may share one storage node, or all block link nodes share one storage node. If the blockchain system is a public chain, preferably selecting one blockchain node to correspond to one storage node, and if the blockchain system is an alliance chain, preselecting a plurality of blockchain nodes to share one storage node, namely dividing all blockchain nodes into a plurality of groups, wherein each group comprises a plurality of blockchain nodes, namely one group shares one storage node; in the case of a private chain, it is preferred that all blockchain nodes share a storage node.
Optionally, in a specific embodiment, using the storage node as a common database, and correspondingly, storing the second data on a storage node of a file storage system configured for any blockchain node in the blockchain system, includes: the second data is stored on a common database configured for all blockchain nodes in the blockchain system.
Optionally, in this embodiment, since the second data is stored in the public database, in order to ensure security of data storage, the second data stored in the public database is encrypted and then stored in the public database.
Furthermore, since the second data of all the block link nodes are stored in the same public database, in order to avoid crosstalk during storage, a dedicated communication channel is established between each block link node and the public database, and the communication channel can be a short-connection communication channel, so that the short-connection communication channel is ensured to exist only when data is transmitted.
Optionally, in a specific embodiment, storing the second data on a common database configured for all blockchain nodes in the blockchain system comprises: the second data is stored on a common database configured for all blockchain link points in the blockchain system, indexed by the identity of all blockchain nodes.
By storing the second data in this way, the blockchain node can be accessed from the public database quickly when needing to be accessed again later.
Optionally, in a specific embodiment, storing the second data on a common database configured for all blockchain nodes in the blockchain system comprises: and storing the second data of all the block chain nodes to a common database configured for all the block chain nodes in the block chain system by using a tree structure, wherein one node of the tree structure corresponds to one block chain node.
By storing the second data in this way, the blockchain node can conveniently and quickly inquire the data to be accessed from the public database when needing to access again in the subsequent process.
Optionally, in a specific embodiment, storing the second data on a common database configured for all blockchain nodes in the blockchain system comprises: and storing the second data of all the block chain nodes to a common database configured for all the block chain nodes in the block chain system in a key value pair mode, wherein one node of the tree structure corresponds to one block chain node.
By storing the second data in this way, the blockchain node can conveniently and quickly inquire the data to be accessed from the public database when needing to access again in the subsequent process.
In the key value pair, the key stores the identifier of the block chain node, and the value stores the storage position of the second data on the public database, so that the writing and reading speed is higher in a simple data format.
Example two
Referring to fig. 2, an embodiment of the present invention provides an apparatus 20 for storing data in a blockchain system, including:
a data determining unit 201, configured to determine target data to be stored to any blockchain node in the blockchain system;
a classifying unit 202, configured to classify target data to obtain first data and second data;
the storage unit 203 is configured to store the first data locally at any blockchain node, and store the second data on a storage node of the file storage system configured for any blockchain node in the blockchain system.
The following is a detailed description:
a data determining unit 201, configured to determine target data to be stored to any blockchain node in the blockchain system;
optionally, in this embodiment, the blockchain system may be a federation chain, a private chain, or a public chain;
alternatively, in this embodiment, the block link points may be a block chain light node and a block chain full node. The block chain whole node is a node which possesses all transaction data of the whole network, and the block chain light node is a node which only possesses the transaction data related to the light node.
Optionally, in this embodiment, the data determining unit 201 further includes a plurality of monitoring modules, where a monitoring module is disposed on each blockchain node, and the monitoring module is configured to monitor whether there is target data to be stored in the blockchain node.
A classifying unit 202, configured to classify target data to obtain first data and second data;
optionally, in a specific embodiment, the classifying unit 202 is further configured to classify the target data according to a set data amount threshold to obtain first data and second data, where the target data with the data amount smaller than the data amount threshold is used as the first data, and the target data with the data amount greater than or equal to the data amount threshold is used as the second data.
Optionally, in this embodiment, the data amount threshold specifically refers to the whole data of one file, such as one document file or one video file.
Optionally, in this embodiment, the classification unit 202 includes a threshold setting subunit, where the threshold setting subunit is configured to set a data amount threshold, and by setting the data amount threshold, the target data can be roughly classified into big data and small data, where the small data is equivalent to the first data and the big data is equivalent to the second data, so as to ensure that the small data can flow in the block chain system, and improve the data output efficiency of the block chain system, and if the big data is stored in the storage node, so as to reduce the storage pressure of the block chain node and save the storage space.
Optionally, in this embodiment, the data amount threshold may be flexibly configured according to requirements of an application scenario, for example, if the blockchain system is a public chain, the data amount threshold is larger, if the blockchain system is a private chain, the data amount threshold is medium, and if the blockchain system is a federation chain, the data amount threshold is smaller.
Optionally, in a specific embodiment, the classifying unit 202 is further configured to classify the target data according to a set sensitivity threshold to obtain first data and second data, where the target data with a sensitivity smaller than the sensitivity threshold is used as the first data, and the target data with a sensitivity greater than or equal to the sensitivity threshold is used as the second data.
Optionally, in this embodiment, the sensitivity threshold may be divided according to the protection strength of the data in the application scenario.
Optionally, in this embodiment, the classifying unit 202 is further configured to classify the data related to finance, such as an identification number, as the first data, classify the consumption data habit of the user, and the like, as the second data. The classification unit 202 classifies the target data in such a manner based on the data sensitivity, and realizes data storage with emphasis, thereby improving the operating efficiency of the system and reducing the load of the system.
Optionally, in this embodiment, the sensitivity threshold may be flexibly set according to an application scenario, so as to improve flexibility and applicability of the scheme.
Optionally, in this embodiment, the classifying unit 202 includes a white list subunit, where the white list subunit is configured to set a white list of sensitive data, and different sensitive data are classified in the white list of sensitive data, that is, different sensitivity thresholds are set, so that when the target data is classified, a keyword in the target data is extracted, and the keyword is matched with the white list of sensitive data, so as to divide the target data into the first data and the second data, thereby effectively improving data processing efficiency and quickly storing the data.
Optionally, in a specific embodiment, the classifying unit 202 is further configured to classify the target data according to a data category of the target data to obtain first data and second data, where the data category includes a document category and a multimedia category, where the target data with the data category being the document category is used as the first data, and the target data with the data category being the multimedia category is used as the second data.
Optionally, in this embodiment, the data category is a classification of a file, for example, a document category or a multimedia category, the document category includes word, excel, txt, and the like, the multimedia includes video, audio, and movie, and a format of the multimedia category is not particularly limited.
Optionally, in this embodiment, the classifying unit 202 is further configured to roughly classify the target data into document type data and multimedia type data by setting a data category of the target data, where the document type data is equivalent to the first data and the multimedia type data is equivalent to the second data, so that the document type data can be circulated in the blockchain system, and the data output efficiency of the blockchain system is improved.
Optionally, in this embodiment, the data category may be flexibly configured according to the requirement of the application scenario, and is not limited to the document category and the multimedia category.
The storage unit 203 is configured to store the first data locally at any blockchain node, and store the second data on a storage node of the file storage system configured for any blockchain node in the blockchain system.
Optionally, in this embodiment, the monitoring module is provided with a monitoring policy, for example, timing or only monitoring target data in a fixed format, and here, it should be noted that the monitoring modules on all block link points in the block chain system have different monitoring mechanisms, for example, different monitoring times, different monitoring step lengths, and the like, so that cooperative work of all block chain nodes is ensured, and communication conflicts inside the block chain system caused by the storage unit 203 storing the second data to the storage node are reduced.
Optionally, when the storage unit 203 stores, one block link point may correspond to one storage node, multiple block link points may share one storage node, or all block link nodes share one storage node. If the blockchain system is a public chain, preferably selecting one blockchain node to correspond to one storage node, and if the blockchain system is an alliance chain, preselecting a plurality of blockchain nodes to share one storage node, namely dividing all blockchain nodes into a plurality of groups, wherein each group comprises a plurality of blockchain nodes, namely one group shares one storage node; in the case of a private chain, it is preferred that all blockchain nodes share a storage node.
Optionally, in a specific embodiment, the storage node is used as a common database, and correspondingly, the storage unit 203 is further used for storing the second data on the common database configured for all the blockchain nodes in the blockchain system.
Optionally, in this embodiment, the apparatus 20 for storing data in the blockchain system further includes an encrypting unit, where the encrypting unit is configured to encrypt the second data stored in the public database;
and because the second data is stored in the public database, in order to ensure the safety of data storage, the second data stored in the public database is encrypted and then stored in the public database.
Optionally, in this embodiment, the apparatus 20 for storing data in the blockchain system further includes a communication channel establishing unit, where the communication channel establishing unit is configured to establish a dedicated communication channel between each blockchain node and the public database;
furthermore, since the second data of all the block link nodes are stored in the same public database, in order to avoid crosstalk during storage, a dedicated communication channel is established between each block link node and the public database, and the communication channel can be a short-connection communication channel, so that the short-connection communication channel is ensured to exist only when data is transmitted.
Optionally, in a specific embodiment, the storage unit 203 is further configured to store the second data on a common database configured for all blockchain nodes in the blockchain system, with the identification of all blockchain nodes as an index.
In the embodiment of the present application, the storage unit 203 stores the second data in this way, so that the blockchain node can be accessed from the public database quickly when needing to be accessed again in the future.
Optionally, in a specific embodiment, the storage unit 203 is further configured to store the second data of all blockchain nodes on a common database configured for all blockchain nodes in the blockchain system in a tree structure, where one node of the tree structure corresponds to one blockchain node.
In the embodiment of the present application, the storage unit 203 stores the second data in this way, so that the blockchain node can quickly query the data to be accessed from the public database when needing to re-access in the subsequent period.
Optionally, in a specific embodiment, the storage unit 203 is further configured to store the second data of all blockchain nodes on a common database configured for all blockchain nodes in the blockchain system in a manner of key-value pairs, where one node of the tree structure corresponds to one blockchain node.
In the embodiment of the present application, the storage unit 203 stores the second data in this way, so that the blockchain node can quickly query the data to be accessed from the public database when needing to re-access in the subsequent period.
In the key value pair, the key stores the identifier of the block chain node, and the value stores the storage position of the second data on the public database, so that the writing and reading speed is higher in a simple data format.
EXAMPLE III
Referring to fig. 3, an embodiment of the present application provides a blockchain system, which includes a plurality of blockchain nodes 301, and each blockchain node is provided with a device 20 for storing data in the blockchain system, including:
a data determining unit 201, configured to determine target data to be stored to any blockchain node in the blockchain system;
a classifying unit 202, configured to classify target data to obtain first data and second data;
the storage unit 203 is configured to store the first data locally at any blockchain node, and store the second data on a storage node of the file storage system configured for any blockchain node in the blockchain system.
The following is a detailed description:
a data determining unit 201, configured to determine target data to be stored to any blockchain node in the blockchain system;
optionally, in this embodiment, the blockchain system may be a federation chain, a private chain, or a public chain;
alternatively, in this embodiment, the block link points may be a block chain light node and a block chain full node. The block chain whole node is a node which possesses all transaction data of the whole network, and the block chain light node is a node which only possesses the transaction data related to the light node.
Optionally, in this embodiment, the data determining unit 201 further includes a plurality of monitoring modules, where a monitoring module is disposed on each blockchain node, and the monitoring module is configured to monitor whether there is target data to be stored in the blockchain node.
A classifying unit 202, configured to classify target data to obtain first data and second data;
optionally, in a specific embodiment, the classifying unit 202 is further configured to classify the target data according to a set data amount threshold to obtain first data and second data, where the target data with the data amount smaller than the data amount threshold is used as the first data, and the target data with the data amount greater than or equal to the data amount threshold is used as the second data.
Optionally, in this embodiment, the data amount threshold specifically refers to the whole data of one file, such as one document file or one video file.
Optionally, in this embodiment, the classification unit 202 includes a threshold setting subunit, where the threshold setting subunit is configured to set a data amount threshold, and by setting the data amount threshold, the target data can be roughly classified into big data and small data, where the small data is equivalent to the first data and the big data is equivalent to the second data, so as to ensure that the small data can flow in the block chain system, and improve the data output efficiency of the block chain system, and if the big data is stored in the storage node, so as to reduce the storage pressure of the block chain node and save the storage space.
Optionally, in this embodiment, the data amount threshold may be flexibly configured according to requirements of an application scenario, for example, if the blockchain system is a public chain, the data amount threshold is larger, if the blockchain system is a private chain, the data amount threshold is medium, and if the blockchain system is a federation chain, the data amount threshold is smaller.
Optionally, in a specific embodiment, the classifying unit 202 is further configured to classify the target data according to a set sensitivity threshold to obtain first data and second data, where the target data with a sensitivity smaller than the sensitivity threshold is used as the first data, and the target data with a sensitivity greater than or equal to the sensitivity threshold is used as the second data.
Optionally, in this embodiment, the sensitivity threshold may be divided according to the protection strength of the data in the application scenario.
Optionally, in this embodiment, the classifying unit 202 is further configured to classify the data related to finance, such as an identification number, as the first data, classify the consumption data habit of the user, and the like, as the second data. The classification unit 202 classifies the target data in such a manner based on the data sensitivity, and realizes data storage with emphasis, thereby improving the operating efficiency of the system and reducing the load of the system.
Optionally, in this embodiment, the sensitivity threshold may be flexibly set according to an application scenario, so as to improve flexibility and applicability of the scheme.
Optionally, in this embodiment, the classifying unit 202 includes a white list subunit, where the white list subunit is configured to set a white list of sensitive data, and different sensitive data are classified in the white list of sensitive data, that is, different sensitivity thresholds are set, so that when the target data is classified, a keyword in the target data is extracted, and the keyword is matched with the white list of sensitive data, so as to divide the target data into the first data and the second data, thereby effectively improving data processing efficiency and quickly storing the data.
Optionally, in a specific embodiment, the classifying unit 202 is further configured to classify the target data according to a data category of the target data to obtain first data and second data, where the data category includes a document category and a multimedia category, where the target data with the data category being the document category is used as the first data, and the target data with the data category being the multimedia category is used as the second data.
Optionally, in this embodiment, the data category is a classification of a file, for example, a document category or a multimedia category, the document category includes word, excel, txt, and the like, the multimedia includes video, audio, and movie, and a format of the multimedia category is not particularly limited.
Optionally, in this embodiment, the classifying unit 202 is further configured to roughly classify the target data into document type data and multimedia type data by setting a data category of the target data, where the document type data is equivalent to the first data and the multimedia type data is equivalent to the second data, so that the document type data can be circulated in the blockchain system, and the data output efficiency of the blockchain system is improved.
Optionally, in this embodiment, the data category may be flexibly configured according to the requirement of the application scenario, and is not limited to the document category and the multimedia category.
The storage unit 203 is configured to store the first data locally at any blockchain node, and store the second data on a storage node of the file storage system configured for any blockchain node in the blockchain system.
Optionally, in this embodiment, the monitoring module is provided with a monitoring policy, for example, timing or only monitoring target data in a fixed format, and here, it should be noted that the monitoring modules on all block link points in the block chain system have different monitoring mechanisms, for example, different monitoring times, different monitoring step lengths, and the like, so that cooperative work of all block chain nodes is ensured, and communication conflicts inside the block chain system caused by the storage unit 203 storing the second data to the storage node are reduced.
Optionally, when the storage unit 203 stores, one block link point may correspond to one storage node, multiple block link points may share one storage node, or all block link nodes share one storage node. If the blockchain system is a public chain, preferably selecting one blockchain node to correspond to one storage node, and if the blockchain system is an alliance chain, preselecting a plurality of blockchain nodes to share one storage node, namely dividing all blockchain nodes into a plurality of groups, wherein each group comprises a plurality of blockchain nodes, namely one group shares one storage node; in the case of a private chain, it is preferred that all blockchain nodes share a storage node.
Optionally, in a specific embodiment, the storage node is used as a common database, and correspondingly, the storage unit 203 is further used for storing the second data on the common database configured for all the blockchain nodes in the blockchain system.
Optionally, in this embodiment, the apparatus 20 for storing data in the blockchain system further includes an encrypting unit, where the encrypting unit is configured to encrypt the second data stored in the public database;
and because the second data is stored in the public database, in order to ensure the safety of data storage, the second data stored in the public database is encrypted and then stored in the public database.
Optionally, in this embodiment, the apparatus 20 for storing data in the blockchain system further includes a communication channel establishing unit, where the communication channel establishing unit is configured to establish a dedicated communication channel between each blockchain node and the public database;
furthermore, since the second data of all the block link nodes are stored in the same public database, in order to avoid crosstalk during storage, a dedicated communication channel is established between each block link node and the public database, and the communication channel can be a short-connection communication channel, so that the short-connection communication channel is ensured to exist only when data is transmitted.
Optionally, in a specific embodiment, the storage unit 203 is further configured to store the second data on a common database configured for all blockchain nodes in the blockchain system, with the identification of all blockchain nodes as an index.
In the embodiment of the present application, the storage unit 203 stores the second data in this way, so that the blockchain node can be accessed from the public database quickly when needing to be accessed again in the future.
Optionally, in a specific embodiment, the storage unit 203 is further configured to store the second data of all blockchain nodes on a common database configured for all blockchain nodes in the blockchain system in a tree structure, where one node of the tree structure corresponds to one blockchain node.
In the embodiment of the present application, the storage unit 203 stores the second data in this way, so that the blockchain node can quickly query the data to be accessed from the public database when needing to re-access in the subsequent period.
Optionally, in a specific embodiment, the storage unit 203 is further configured to store the second data of all blockchain nodes on a common database configured for all blockchain nodes in the blockchain system in a manner of key-value pairs, where one node of the tree structure corresponds to one blockchain node.
In the embodiment of the present application, the storage unit 203 stores the second data in this way, so that the blockchain node can quickly query the data to be accessed from the public database when needing to re-access in the subsequent period.
In the key value pair, the key stores the identifier of the block chain node, and the value stores the storage position of the second data on the public database, so that the writing and reading speed is higher in a simple data format.
Example four
Referring to fig. 4, an electronic device 40 is provided as a blockchain node, and includes a memory 401 and a processor 402, where the memory stores a computer executable program, and the processor runs the computer executable program to perform the following steps:
determining target data to be stored to any blockchain node in the blockchain system;
classifying the target data to obtain first data and second data;
the first data is stored locally to any blockchain node, and the second data is stored on a storage node of a file storage system configured for any blockchain node in the blockchain system.
The following is a detailed description:
determining target data to be stored to any blockchain node in the blockchain system;
optionally, in this embodiment, the blockchain system may be a federation chain, a private chain, or a public chain;
alternatively, in this embodiment, the block link points may be a block chain light node and a block chain full node. The block chain whole node is a node which possesses all transaction data of the whole network, and the block chain light node is a node which only possesses the transaction data related to the light node.
Optionally, in this embodiment, a monitoring module is arranged on each blockchain node, and the monitoring module is configured to monitor whether there is target data to be stored in the blockchain node.
Classifying the target data to obtain first data and second data;
optionally, in a specific embodiment, classifying the target data to obtain the first data and the second data includes: and classifying the target data according to a set data volume threshold to obtain first data and second data, wherein the target data with the data volume smaller than the data volume threshold is used as the first data, and the target data with the data volume larger than or equal to the data volume threshold is used as the second data.
Optionally, in this embodiment, the data amount threshold specifically refers to the whole data of one file, such as one document file or one video file.
Optionally, in this embodiment, by setting the data amount threshold, the target data may be roughly divided into big data and small data, the small data is equivalent to the first data, and the big data is equivalent to the second data, so that it is ensured that the small data can be circulated in the block chain system, and the data output efficiency of the block chain system is improved.
Optionally, in this embodiment, the data amount threshold may be flexibly configured according to requirements of an application scenario, for example, if the blockchain system is a public chain, the data amount threshold is larger, if the blockchain system is a private chain, the data amount threshold is medium, and if the blockchain system is a federation chain, the data amount threshold is smaller.
Optionally, in a specific embodiment, classifying the target data to obtain the first data and the second data includes: and classifying the target data according to a set sensitivity threshold to obtain first data and second data, wherein the target data with the sensitivity smaller than the sensitivity threshold is used as the first data, and the target data with the sensitivity greater than or equal to the sensitivity threshold is used as the second data.
Optionally, in this embodiment, the sensitivity threshold may be divided according to the protection strength of the data in the application scenario.
Optionally, in this embodiment, the data related to finance, the identification number and the like are first data, and the consumption data habit of the user and the like are second data. By the data sensitivity-based mode, the target data are classified, data storage is realized with emphasis, the operation efficiency of the system is improved, and the load of the system is reduced.
Optionally, in this embodiment, the sensitivity threshold may be flexibly set according to an application scenario, so as to improve flexibility and applicability of the scheme.
Optionally, in this embodiment, a sensitive data white list may be set, and different sensitive data are classified in the sensitive data white list, that is, different sensitivity thresholds are set, so that when the target data is classified, the keyword in the target data is extracted, and the keyword is matched with the sensitive data white list, so that the target data is divided into first data and second data, thereby effectively improving the efficiency of data processing and rapidly achieving data storage.
Optionally, in a specific embodiment, classifying the target data to obtain the first data and the second data includes: and classifying the target data according to the data category of the target data to obtain first data and second data, wherein the data category comprises a document category and a multimedia category, the target data of which the data category is the document category is used as the first data, and the target data of which the data category is the multimedia category is used as the second data.
Optionally, in this embodiment, the data category is a classification of a file, for example, a document category or a multimedia category, the document category includes word, excel, txt, and the like, the multimedia includes video, audio, and movie, and a format of the multimedia category is not particularly limited.
Optionally, in this embodiment, the target data may be roughly divided into document type data and multimedia type data by setting a data type of the target data, where the document type data is equivalent to the first data and the multimedia type data is equivalent to the second data, so that the document type data can be guaranteed to be circulated in the blockchain system, and the data output efficiency of the blockchain system is improved.
Optionally, in this embodiment, the data category may be flexibly configured according to the requirement of the application scenario, and is not limited to the document category and the multimedia category.
The first data is stored locally to any blockchain node, and the second data is stored on a storage node of a file storage system configured for any blockchain node in the blockchain system.
Optionally, in this embodiment, the monitoring module is provided with a monitoring policy, such as timing or monitoring only target data in a fixed format, where it is to be noted that the monitoring modules at all block link points in the block chain system have different monitoring mechanisms, such as different monitoring times, different monitoring step lengths, and the like, so as to ensure cooperative work of all block chain nodes and reduce communication conflicts inside the block chain system caused by storing the second data in the storage node.
Optionally, during storage, one block link point may correspond to one storage node, multiple block link points may share one storage node, or all block link nodes share one storage node. If the blockchain system is a public chain, preferably selecting one blockchain node to correspond to one storage node, and if the blockchain system is an alliance chain, preselecting a plurality of blockchain nodes to share one storage node, namely dividing all blockchain nodes into a plurality of groups, wherein each group comprises a plurality of blockchain nodes, namely one group shares one storage node; in the case of a private chain, it is preferred that all blockchain nodes share a storage node.
Optionally, in a specific embodiment, using the storage node as a common database, and correspondingly, storing the second data on a storage node of a file storage system configured for any blockchain node in the blockchain system, includes: the second data is stored on a common database configured for all blockchain nodes in the blockchain system.
Optionally, in this embodiment, since the second data is stored in the public database, in order to ensure security of data storage, the second data stored in the public database is encrypted and then stored in the public database.
Furthermore, since the second data of all the block link nodes are stored in the same public database, in order to avoid crosstalk during storage, a dedicated communication channel is established between each block link node and the public database, and the communication channel can be a short-connection communication channel, so that the short-connection communication channel is ensured to exist only when data is transmitted.
Optionally, in a specific embodiment, storing the second data on a common database configured for all blockchain nodes in the blockchain system comprises: the second data is stored on a common database configured for all blockchain link points in the blockchain system, indexed by the identity of all blockchain nodes.
By storing the second data in this way, the blockchain node can be accessed from the public database quickly when needing to be accessed again later.
Optionally, in a specific embodiment, storing the second data on a common database configured for all blockchain nodes in the blockchain system comprises: and storing the second data of all the block chain nodes to a common database configured for all the block chain nodes in the block chain system by using a tree structure, wherein one node of the tree structure corresponds to one block chain node.
By storing the second data in this way, the blockchain node can conveniently and quickly inquire the data to be accessed from the public database when needing to access again in the subsequent process.
Optionally, in a specific embodiment, storing the second data on a common database configured for all blockchain nodes in the blockchain system comprises: and storing the second data of all the block chain nodes to a common database configured for all the block chain nodes in the block chain system in a key value pair mode, wherein one node of the tree structure corresponds to one block chain node.
By storing the second data in this way, the blockchain node can conveniently and quickly inquire the data to be accessed from the public database when needing to access again in the subsequent process.
In the key value pair, the key stores the identifier of the block chain node, and the value stores the storage position of the second data on the public database, so that the writing and reading speed is higher in a simple data format.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure; as shown in fig. 5, the hardware structure of the electronic device may include: a processor 501, a communication interface 502, a memory 503, and a communication bus 504;
the processor 501, the communication interface 502 and the memory 503 complete mutual communication through the communication bus 504;
optionally, the communication interface 502 may be an interface of a communication module, such as an interface of a GSM module;
the processor 501 may be specifically configured to run the executable program stored in the memory 503, so as to perform all or part of the processing steps of any of the above method embodiments.
The Processor 501 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The electronic device of the embodiments of the present application exists in various forms, including but not limited to:
(1) mobile communication devices, which are characterized by mobile communication capabilities and are primarily targeted at providing voice and data communications. Such terminals include smart phones (e.g., iphones), multimedia phones, functional phones, and low-end phones, among others.
(2) The ultra-mobile personal computer equipment belongs to the category of personal computers, has calculation and processing functions and generally has the characteristic of mobile internet access. Such terminals include PDA, MID, and UMPC devices, such as ipads.
(3) Portable entertainment devices such devices may display and play multimedia content. Such devices include audio and video players (e.g., ipods), handheld game consoles, electronic books, as well as smart toys and portable car navigation devices.
(4) The server is similar to a general computer architecture, but has higher requirements on processing capability, stability, reliability, safety, expandability, manageability and the like because of the need of providing highly reliable services.
(5) And other electronic devices with data interaction functions.
In embodiments of the present Application, the processor 501 may take the form of, for example, a microprocessor or a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic processor, and an embedded microprocessor, examples of which include, but are not limited to, the following microprocessors: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory processor may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing a processor as pure computer readable program code, the same functions may be implemented entirely by logically programming method steps such that the processor is in the form of logic gates, switches, application specific integrated circuits, programmable logic processors, embedded microprocessors, etc. Such a processor may thus be regarded as a hardware component and the means for performing the various functions included therein may also be regarded as structures within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
EXAMPLE five
Referring to fig. 6, an embodiment of the present application provides a computer storage medium having computer-executable instructions stored thereon, where the computer-executable instructions, when executed, implement the following steps:
determining target data to be stored to any blockchain node in the blockchain system;
classifying the target data to obtain first data and second data;
the first data is stored locally to any blockchain node, and the second data is stored on a storage node of a file storage system configured for any blockchain node in the blockchain system.
The following is a detailed description:
determining target data to be stored to any blockchain node in the blockchain system;
optionally, in this embodiment, the blockchain system may be a federation chain, a private chain, or a public chain;
alternatively, in this embodiment, the block link points may be a block chain light node and a block chain full node. The block chain whole node is a node which possesses all transaction data of the whole network, and the block chain light node is a node which only possesses the transaction data related to the light node.
Optionally, in this embodiment, a monitoring module is arranged on each blockchain node, and the monitoring module is configured to monitor whether there is target data to be stored in the blockchain node.
Classifying the target data to obtain first data and second data;
optionally, in a specific embodiment, classifying the target data to obtain the first data and the second data includes: and classifying the target data according to a set data volume threshold to obtain first data and second data, wherein the target data with the data volume smaller than the data volume threshold is used as the first data, and the target data with the data volume larger than or equal to the data volume threshold is used as the second data.
Optionally, in this embodiment, the data amount threshold specifically refers to the whole data of one file, such as one document file or one video file.
Optionally, in this embodiment, by setting the data amount threshold, the target data may be roughly divided into big data and small data, the small data is equivalent to the first data, and the big data is equivalent to the second data, so that it is ensured that the small data can be circulated in the block chain system, and the data output efficiency of the block chain system is improved.
Optionally, in this embodiment, the data amount threshold may be flexibly configured according to requirements of an application scenario, for example, if the blockchain system is a public chain, the data amount threshold is larger, if the blockchain system is a private chain, the data amount threshold is medium, and if the blockchain system is a federation chain, the data amount threshold is smaller.
Optionally, in a specific embodiment, classifying the target data to obtain the first data and the second data includes: and classifying the target data according to a set sensitivity threshold to obtain first data and second data, wherein the target data with the sensitivity smaller than the sensitivity threshold is used as the first data, and the target data with the sensitivity greater than or equal to the sensitivity threshold is used as the second data.
Optionally, in this embodiment, the sensitivity threshold may be divided according to the protection strength of the data in the application scenario.
Optionally, in this embodiment, the data related to finance, the identification number and the like are first data, and the consumption data habit of the user and the like are second data. By the data sensitivity-based mode, the target data are classified, data storage is realized with emphasis, the operation efficiency of the system is improved, and the load of the system is reduced.
Optionally, in this embodiment, the sensitivity threshold may be flexibly set according to an application scenario, so as to improve flexibility and applicability of the scheme.
Optionally, in this embodiment, a sensitive data white list may be set, and different sensitive data are classified in the sensitive data white list, that is, different sensitivity thresholds are set, so that when the target data is classified, the keyword in the target data is extracted, and the keyword is matched with the sensitive data white list, so that the target data is divided into first data and second data, thereby effectively improving the efficiency of data processing and rapidly achieving data storage.
Optionally, in a specific embodiment, classifying the target data to obtain the first data and the second data includes: and classifying the target data according to the data category of the target data to obtain first data and second data, wherein the data category comprises a document category and a multimedia category, the target data of which the data category is the document category is used as the first data, and the target data of which the data category is the multimedia category is used as the second data.
Optionally, in this embodiment, the data category is a classification of a file, for example, a document category or a multimedia category, the document category includes word, excel, txt, and the like, the multimedia includes video, audio, and movie, and a format of the multimedia category is not particularly limited.
Optionally, in this embodiment, the target data may be roughly divided into document type data and multimedia type data by setting a data type of the target data, where the document type data is equivalent to the first data and the multimedia type data is equivalent to the second data, so that the document type data can be guaranteed to be circulated in the blockchain system, and the data output efficiency of the blockchain system is improved.
Optionally, in this embodiment, the data category may be flexibly configured according to the requirement of the application scenario, and is not limited to the document category and the multimedia category.
The first data is stored locally to any blockchain node, and the second data is stored on a storage node of a file storage system configured for any blockchain node in the blockchain system.
Optionally, in this embodiment, the monitoring module is provided with a monitoring policy, such as timing or monitoring only target data in a fixed format, where it is to be noted that the monitoring modules at all block link points in the block chain system have different monitoring mechanisms, such as different monitoring times, different monitoring step lengths, and the like, so as to ensure cooperative work of all block chain nodes and reduce communication conflicts inside the block chain system caused by storing the second data in the storage node.
Optionally, during storage, one block link point may correspond to one storage node, multiple block link points may share one storage node, or all block link nodes share one storage node. If the blockchain system is a public chain, preferably selecting one blockchain node to correspond to one storage node, and if the blockchain system is an alliance chain, preselecting a plurality of blockchain nodes to share one storage node, namely dividing all blockchain nodes into a plurality of groups, wherein each group comprises a plurality of blockchain nodes, namely one group shares one storage node; in the case of a private chain, it is preferred that all blockchain nodes share a storage node.
Optionally, in a specific embodiment, using the storage node as a common database, and correspondingly, storing the second data on a storage node of a file storage system configured for any blockchain node in the blockchain system, includes: the second data is stored on a common database configured for all blockchain nodes in the blockchain system.
Optionally, in this embodiment, since the second data is stored in the public database, in order to ensure security of data storage, the second data stored in the public database is encrypted and then stored in the public database.
Furthermore, since the second data of all the block link nodes are stored in the same public database, in order to avoid crosstalk during storage, a dedicated communication channel is established between each block link node and the public database, and the communication channel can be a short-connection communication channel, so that the short-connection communication channel is ensured to exist only when data is transmitted.
Optionally, in a specific embodiment, storing the second data on a common database configured for all blockchain nodes in the blockchain system comprises: the second data is stored on a common database configured for all blockchain link points in the blockchain system, indexed by the identity of all blockchain nodes.
By storing the second data in this way, the blockchain node can be accessed from the public database quickly when needing to be accessed again later.
Optionally, in a specific embodiment, storing the second data on a common database configured for all blockchain nodes in the blockchain system comprises: and storing the second data of all the block chain nodes to a common database configured for all the block chain nodes in the block chain system by using a tree structure, wherein one node of the tree structure corresponds to one block chain node.
By storing the second data in this way, the blockchain node can conveniently and quickly inquire the data to be accessed from the public database when needing to access again in the subsequent process.
Optionally, in a specific embodiment, storing the second data on a common database configured for all blockchain nodes in the blockchain system comprises: and storing the second data of all the block chain nodes to a common database configured for all the block chain nodes in the block chain system in a key value pair mode, wherein one node of the tree structure corresponds to one block chain node.
By storing the second data in this way, the blockchain node can conveniently and quickly inquire the data to be accessed from the public database when needing to access again in the subsequent process.
In the key value pair, the key stores the identifier of the block chain node, and the value stores the storage position of the second data on the public database, so that the writing and reading speed is higher in a simple data format.
In addition, computer storage media, including both permanent and non-permanent, removable and non-removable media, may implement the 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 computer storage media 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 Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer storage media does not include transitory computer readable media (transient 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 an … …" 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 transactions or implement particular abstract data types. The application may also be practiced in distributed computing environments where transactions 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.
It should be noted that, in the present specification, all the embodiments are described in a progressive manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus and system embodiments, since they are substantially similar to the method embodiments, they are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for related points. The above-described embodiments of the apparatus and system are merely illustrative, and the modules illustrated as separate components may or may not be physically separate, and the components suggested as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only one specific embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present application should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method for storing data in a blockchain system, comprising:
determining target data to be stored to any blockchain node in the blockchain system;
classifying the target data to obtain first data and second data;
storing the first data locally to the any blockchain node, and storing the second data on a storage node of a file storage system configured for the any blockchain node in the blockchain system.
2. The method of claim 1, wherein the classifying the target data into the first data and the second data comprises: and classifying the target data according to a set data volume threshold to obtain first data and second data, wherein the target data with the data volume smaller than the data volume threshold is used as the first data, and the target data with the data volume larger than or equal to the data volume threshold is used as the second data.
3. The method of claim 1, wherein the classifying the target data into the first data and the second data comprises: and classifying the target data according to a set sensitivity threshold to obtain first data and second data, wherein the target data with the sensitivity smaller than the sensitivity threshold is used as the first data, and the target data with the sensitivity greater than or equal to the sensitivity threshold is used as the second data.
4. The method of claim 1, wherein the classifying the target data into the first data and the second data comprises: and classifying the target data according to the data category of the target data to obtain first data and second data, wherein the data category comprises a document category and a multimedia category, the target data with the data category being the document category is used as the first data, and the target data with the data category being the multimedia category is used as the second data.
5. An apparatus for storing data in a blockchain system, comprising:
a data determination unit for determining target data to be stored to any blockchain node in the blockchain system;
the classification unit is used for classifying the target data to obtain first data and second data;
the storage unit is used for storing the first data locally to any block chain link point and storing the second data on a storage node of a file storage system configured for any block chain node in the block chain system.
6. The apparatus for storing data in a blockchain system according to claim 5, wherein the classifying unit is further configured to classify the target data into a first data and a second data according to a set data amount threshold, wherein the target data with a data amount smaller than the data amount threshold is used as the first data, and the target data with a data amount greater than or equal to the data amount threshold is used as the second data.
7. The apparatus for storing data in a blockchain system according to claim 5, wherein the classifying unit is further configured to classify the target data into a first data and a second data according to a set sensitivity threshold, wherein the target data with a sensitivity smaller than the sensitivity threshold is used as the first data, and the target data with a sensitivity greater than or equal to the sensitivity threshold is used as the second data.
8. A block chain system is characterized by comprising a plurality of block chain nodes, wherein each block chain node is provided with a device for storing data in the block chain system, and the block chain system comprises:
a data determination unit for determining target data to be stored to any blockchain node in the blockchain system;
the classification unit is used for classifying the target data to obtain first data and second data;
the storage unit is used for storing the first data locally to any block chain link point and storing the second data on a storage node of a file storage system configured for any block chain node in the block chain system.
9. An electronic device as a blockchain node, comprising a memory having a computer-executable program stored thereon and a processor running the computer-executable program to perform the steps of:
determining target data to be stored to any blockchain node in the blockchain system;
classifying the target data to obtain first data and second data;
storing the first data locally to the any blockchain node, and storing the second data on a storage node of a file storage system configured for the any blockchain node in the blockchain system.
10. A computer storage medium having computer-executable instructions stored thereon that, when executed, perform the steps of:
determining target data to be stored to any blockchain node in the blockchain system;
classifying the target data to obtain first data and second data;
storing the first data locally to the any blockchain node, and storing the second data on a storage node of a file storage system configured for the any blockchain node in the blockchain system.
CN202011643324.9A 2020-12-30 2020-12-30 Method, device and related product for storing data in block chain system Pending CN112650715A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011643324.9A CN112650715A (en) 2020-12-30 2020-12-30 Method, device and related product for storing data in block chain system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011643324.9A CN112650715A (en) 2020-12-30 2020-12-30 Method, device and related product for storing data in block chain system

Publications (1)

Publication Number Publication Date
CN112650715A true CN112650715A (en) 2021-04-13

Family

ID=75367110

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011643324.9A Pending CN112650715A (en) 2020-12-30 2020-12-30 Method, device and related product for storing data in block chain system

Country Status (1)

Country Link
CN (1) CN112650715A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115208896A (en) * 2022-07-19 2022-10-18 中软航科数据科技(珠海横琴)有限公司 Workflow management tracing method and system based on block chain technology

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107426170A (en) * 2017-05-24 2017-12-01 阿里巴巴集团控股有限公司 A kind of data processing method and equipment based on block chain
CN109597822A (en) * 2018-11-28 2019-04-09 中国联合网络通信集团有限公司 A kind of storage of user data and querying method and user data processing unit
CN109753815A (en) * 2018-11-26 2019-05-14 远光软件股份有限公司 Data processing method, data processing network and electronic equipment based on block chain
CN110109929A (en) * 2019-04-30 2019-08-09 翟红鹰 Date storage method, device and computer readable storage medium
CN111639938A (en) * 2020-05-29 2020-09-08 深圳壹账通智能科技有限公司 Data processing method, device, equipment and medium
CN111966657A (en) * 2020-08-17 2020-11-20 南京邮电大学 Distributed file classified storage system and storage method based on block chain

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107426170A (en) * 2017-05-24 2017-12-01 阿里巴巴集团控股有限公司 A kind of data processing method and equipment based on block chain
US20190279750A1 (en) * 2017-05-24 2019-09-12 Alibaba Group Holding Limited Blockchain-based data processing method and device
CN109753815A (en) * 2018-11-26 2019-05-14 远光软件股份有限公司 Data processing method, data processing network and electronic equipment based on block chain
CN109597822A (en) * 2018-11-28 2019-04-09 中国联合网络通信集团有限公司 A kind of storage of user data and querying method and user data processing unit
CN110109929A (en) * 2019-04-30 2019-08-09 翟红鹰 Date storage method, device and computer readable storage medium
CN111639938A (en) * 2020-05-29 2020-09-08 深圳壹账通智能科技有限公司 Data processing method, device, equipment and medium
CN111966657A (en) * 2020-08-17 2020-11-20 南京邮电大学 Distributed file classified storage system and storage method based on block chain

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115208896A (en) * 2022-07-19 2022-10-18 中软航科数据科技(珠海横琴)有限公司 Workflow management tracing method and system based on block chain technology

Similar Documents

Publication Publication Date Title
KR102151384B1 (en) Blockchain-based music originality analysis method and device
CN109949157B (en) Business data uplink method, device and system
US10929198B2 (en) Blockchain-based resource allocation method and apparatus
CN107368259B (en) Method and device for writing service data into block chain system
EP3780541A1 (en) Identity information identification method and device
WO2020038105A1 (en) Blockchain-based data storage method and apparatus
CN109391480A (en) A kind of date storage method, device and electronic equipment
CN112215601A (en) Service processing method, device and equipment based on block chain
WO2020238248A1 (en) Data storage method, apparatus and device
CN112434326B (en) Trusted computing method and device based on data flow
CN112134883A (en) Method and device for quickly authenticating trust relationship between nodes based on trusted computing and related products
CN110235141B (en) Biometric feature recognition method and electronic device
CN112650715A (en) Method, device and related product for storing data in block chain system
CN107528822B (en) Service execution method and device
CN111310137B (en) Block chain associated data evidence storing method and device and electronic equipment
CN110209347B (en) Traceable data storage method
CN111899104B (en) Service execution method and device
CN110992039A (en) Transaction processing method, device and equipment
CN112418857B (en) Hidden transaction method and device based on UTXO model and related products
CN110995447B (en) Data storage method, device, equipment and medium
CN112131602A (en) Method and device for quickly expanding trust relationship between nodes based on trusted computing and related products
CN111461728A (en) Risk identification method, device and system
CN112365264A (en) UTXO model-based hidden transaction method and device and related product
CN112565303B (en) Method and device for performing authentication connection between block chain nodes and related product
US9600508B1 (en) Data layer service availability

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