CN115712921A - Data management method and device based on block chain and electronic equipment - Google Patents

Data management method and device based on block chain and electronic equipment Download PDF

Info

Publication number
CN115712921A
CN115712921A CN202211284663.1A CN202211284663A CN115712921A CN 115712921 A CN115712921 A CN 115712921A CN 202211284663 A CN202211284663 A CN 202211284663A CN 115712921 A CN115712921 A CN 115712921A
Authority
CN
China
Prior art keywords
data
node
compliance
storage
block chain
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
CN202211284663.1A
Other languages
Chinese (zh)
Other versions
CN115712921B (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.)
Shenzhen University
Shenzhen Graduate School Harbin Institute of Technology
Original Assignee
Shenzhen University
Shenzhen Graduate School Harbin Institute of Technology
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 Shenzhen University, Shenzhen Graduate School Harbin Institute of Technology filed Critical Shenzhen University
Priority to CN202211284663.1A priority Critical patent/CN115712921B/en
Publication of CN115712921A publication Critical patent/CN115712921A/en
Application granted granted Critical
Publication of CN115712921B publication Critical patent/CN115712921B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a data management method, a device and electronic equipment based on a block chain, wherein the method comprises the following steps: performing compliance check on data stored in the blockchain system in response to the first data compliance evaluation node; if any data stored on the blockchain system is detected not to meet the compliance requirement, the storage information management node finds the position information of the data storage from the management chain; and deleting the data from the corresponding storage node according to the position information. According to the invention, the block chain storage multi-node evaluation scheme is designed to evaluate the data compliance, and the scheme of separating design data from registration and management information reduces the manual workload and cost, and can erase the source data of illegal data when data destruction is carried out.

Description

Data management method and device based on block chain and electronic equipment
Technical Field
The invention relates to the technical field of block chains, in particular to a data management method and device based on a block chain and electronic equipment.
Background
With the rapid development of the internet, a user shares various data storage in a public network space, challenges are brought to data management while information propagation is promoted, bad data is layered endlessly, sources are difficult to trace, a new idea is brought to data management due to the occurrence of a block chain, important data information such as data, author information and timestamps is uploaded to the block chain, and a consensus mechanism of the block chain determines that the data of the block chain is difficult to tamper.
The existing block chain technology sends data to a block chain for registration, and for the data uploaded by a user, a block chain community adopts a professional selection mode to check whether the uploaded data meets the specification, and then determines whether to upload the data to the block chain for storage, but the essential characteristic of block chain decentralization is weakened through manual data check in the prior art, the cost of labor expenditure is increased due to the increase of the uploaded data, and the illegal data stored in the block chain cannot be really cancelled due to a common identification mechanism of the block chain, so that the risk of data reuse is increased, a new block chain-based data management method is urgently needed to be provided, the labor workload and the cost are reduced, and the source data of the illegal data can be erased.
Disclosure of Invention
Therefore, the technical problem to be solved by the present invention is to overcome the defects that the prior art increases the labor workload and the cost and the illegal data cannot be truly cancelled, thereby providing a block chain-based data management method, device and electronic device.
According to a first aspect, an embodiment of the present invention discloses a data management method based on a blockchain, which is applied to a blockchain system, where the blockchain system is connected to a registration chain and a management chain, respectively, where the registration chain is used to store an identity corresponding to a blockchain node that stores data in the blockchain system, a content identifier of uploaded data, and a corresponding timestamp, the management chain is used to store storage location information of data, nodes in the blockchain system include a data storage node, a storage information management node, and a data compliance evaluation node, and the data storage node is used to store data uploaded to the blockchain system; the method comprises the following steps: performing compliance check on data stored in the blockchain system in response to the first data compliance evaluation node; if any data stored on the blockchain system is detected not to meet the compliance requirement, the storage information management node finds the position information of the data storage from the management chain; and deleting the data from the corresponding storage node according to the position information.
Optionally, after the data is deleted from the corresponding storage node, the method further includes: uploading corresponding data invalid identifications to a management chain through the storage information management node; and uploading the record of the invalid identifier to a registration chain through the first data compliance evaluation node.
Optionally, the method further comprises: when a data chaining request of any block chain node is received, performing compliance check on data to be chained through a second data compliance evaluation node; when the compliance check meets the requirement, uploading the identity identifier corresponding to the block link point, the content identifier of the uploaded data and the corresponding timestamp to a registration chain through the first data compliance judgment node, and storing the data to be chained to the storage node; and uploading the storage position information of the corresponding data to a management chain through the storage information management node.
Optionally, before the performing the compliance check on the data stored in the blockchain system in response to the first data compliance evaluation node, the method further comprises: calculating the credit score of each evaluation node in the block chain system according to a preset credit evaluation index; and selecting a preset number of evaluation nodes as the first data compliance evaluation nodes according to the reputation scores.
Optionally, the compliance check is performed by the following formula:
Figure BDA0003898088020000031
wherein score represents voting scores for data compliance; w is a i Voting weight representing a data compliance evaluation node; vote i Expressing the data compliance voting result of the data compliance evaluation node; s represents a data compliance evaluation node set; i S represents the number of data compliance evaluation nodes in the data compliance evaluation node set;
if the calculated voting score is greater than a first preset threshold value, indicating data compliance; if the calculated voting score is less than or equal to the first preset threshold, a data violation is indicated.
Optionally, the storing the data to be uplinked to the storage node includes: acquiring a storage space value required by the data to be uplinked; judging whether a storage space value required by the data to be uplinked reaches a second preset storage threshold value or not; if the storage space value required by the data to be chain-linked reaches a second preset storage threshold value, carrying out fragmentation and recombination on the data to be chain-linked to generate a plurality of groups of data blocks and storing the plurality of groups of data blocks into the storage node; and if the storage space value required by the data to be uplink does not reach a second preset storage threshold value, storing the data to be uplink into a storage node.
Optionally, the performing, by the response to the first data compliance evaluation node, a compliance check on the data stored in the blockchain system includes: responding to the received violation data detection instruction corresponding to the blockchain system; according to the illegal data detection instruction, sending a detection notice to a block chain node corresponding to the illegal data; and if the block chain node does not perform the revocation or modification operation, performing compliance check through the first data compliance judgment node.
Optionally, after the storing the data to be uplinked to the storage node, the method further includes: acquiring a change value of the access frequency of the data contained in the storage node in the current period compared with the access frequency of the previous period; and adjusting the number of storage nodes of corresponding data according to the change value of the frequency in the adjacent period.
According to a second aspect, the embodiment of the present invention further discloses a data management apparatus based on a blockchain, which is applied to a blockchain system, where the blockchain system is connected to a registration chain and a management chain, respectively, where the registration chain is used to store an identity corresponding to a blockchain node that stores data in the blockchain system, a content identifier of uploaded data, and a corresponding timestamp, the management chain is used to store storage location information of data, nodes in the blockchain system include a data storage node, a storage information management node, and a data compliance evaluation node, and the data storage node is used to store data uploaded to the blockchain system; the device comprises: the checking response module is used for responding to the first data compliance evaluation node to perform compliance checking on data stored in the blockchain system; the position information acquisition module is used for finding the position information of the data storage from the management chain through the storage information management node if any data stored on the blockchain system is detected not to meet the compliance requirement; and the data deleting module is used for deleting the data from the corresponding storage node according to the position information.
According to a third aspect, an embodiment of the present invention further discloses an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the steps of the method for blockchain based data management according to the first aspect or any one of the optional embodiments of the first aspect.
The technical scheme of the invention has the following advantages:
according to the data management method based on the block chain, the data are subjected to compliance check through the response data compliance evaluation node, if any data are detected not to meet the compliance requirement, the storage information management node finds the position information of data storage from the management chain, and the data are deleted from the corresponding storage node according to the position information. According to the invention, the block chain storage multi-node evaluation scheme is designed to evaluate the data compliance and design a scheme of separating data from registration and management information, so that the manual workload and cost are reduced, the decentralized characteristic of a block chain system is maintained, and the source data of illegal data can be erased when data destruction is carried out.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a specific example of a block chain-based data management method according to an embodiment of the present invention;
fig. 2 is a schematic block diagram of a specific example of a data management apparatus based on a block chain in the embodiment of the present invention;
fig. 3 is a diagram of a specific example of an electronic device in an embodiment of the invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present invention. 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.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; the two elements may be directly connected or indirectly connected through an intermediate medium, or may be communicated with each other inside the two elements, or may be wirelessly connected or wired connected. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
Furthermore, the technical features involved in the different embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
The embodiment of the invention discloses a data management method based on a block chain, which is applied to a block chain system, wherein the block chain system is respectively connected with a registration chain and a management chain, the registration chain is used for storing an identity corresponding to a block chain node for storing data to the block chain system, a content identifier of uploaded data and a corresponding timestamp, and the management chain is used for storing storage position information of the data; in the embodiment of the present application, the registration chain and the management chain may be used as a side chain or a branch chain of the blockchain system to implement storage operation on corresponding data in the blockchain system. The nodes in the blockchain system comprise data storage nodes, storage information management nodes and data compliance evaluation nodes, and the data storage nodes are used for storing data uploaded to the blockchain system; the storage information management node can be used for storing and counting position information stored in data and historical decision data of data by a data compliance evaluation node, the data compliance evaluation node can be used for making decisions on data storage and destruction, and the data compliance evaluation node can also be a user node and used for uploading data (images, audio, video documents and the like) to the block chain system. For example, the storage information management node may upload information such as a location of the management data to the management chain, and the data compliance evaluation node may upload identification information of the management data to the registration chain.
The embodiment of the invention discloses a data management method based on a block chain, which comprises the following steps as shown in figure 1:
step 101, responding to a first data compliance evaluation node to perform compliance check on data stored in a block chain system;
exemplarily, in the embodiment of the present application, data stored in the block chain system is randomly sent to a preset number of first data compliance evaluation nodes, and a set of nodes participating in voting is set as R, the data compliance evaluation nodes in the block chain system may be preselected, for example, nodes with a higher reputation degree of 50% in the block chain system are used as the data compliance evaluation nodes, 12% of all the data compliance evaluation nodes are selected as the first data compliance evaluation nodes in the embodiment of the present application for performing voting decision, the selection of the data compliance evaluation nodes and the selection mode of the first data compliance evaluation nodes are not limited, and a person skilled in the art may determine according to actual needs; voting is conducted on the stored data by a first data compliance evaluation node in the set R, the voting result can be represented by '0' and '1', and the '0' represents that the data does not meet the compliance requirement and needs to be destroyed; "1" represents that the data should be retained to meet the compliance requirement, and is only used as an example, but not limited thereto, as long as the voting decision on the data can be implemented, and the compliance check is performed on the stored data according to the following formula:
Figure BDA0003898088020000071
wherein score represents voting scores for data compliance; w is a i Voting weight representing a data compliance evaluation node; vote (volume) i Expressing the data compliance voting of the data compliance evaluation node; r represents a data compliance evaluation node set; | R | represents the number of data compliance evaluation nodes in the data compliance evaluation node setCounting; in the embodiment of the application, the voting weight of the data compliance evaluation node may be determined in advance, for example, the corresponding voting weight may be determined according to the reputation level of the data compliance evaluation node.
In the embodiment of the present application, after the score of the data compliance vote is obtained, the score is compared with a preset threshold (the preset threshold in the embodiment of the present application is 0.47, which is only used as an example, and not limited thereto), when score is greater than 0.47, the data meets the compliance requirement, the data is retained in the block chain system, and when score is less than or equal to 0.47, the data does not meet the compliance requirement, and the data destruction operation is performed. And if the voting selection result of any data compliance evaluation node is consistent with the final decision result of data retention or destruction, the data compliance evaluation node obtains corresponding incentive.
In the embodiment of the invention, the voting scores of the stored data compliance voting nodes are different in weight by any data compliance evaluation node, and the voting weight of any data compliance evaluation node is obtained according to the proportion (accept) of the response made by any data compliance evaluation node and the final decision result of the block chain and the proportion (accuse) of the data uploaded by the data compliance evaluation node to be checked, wherein,
Figure BDA0003898088020000072
Figure BDA0003898088020000081
obtaining the weight ratio according to the accept and the accept, which is only used as an example and not limited to this, as follows:
w i =1(0.75<accept is less than or equal to 1 and 0 is less than or equal to accuse<0.15);
w i =0.6(0.45<The accept is less than or equal to 0.75 and less than or equal to 0.15 accuse<0.35);
w i =0.25 (0 ≦ accept ≦ 0.45 and 0.35 ≦ accume ≦ 1).
Step 102, if it is detected that any data stored on the blockchain system does not meet the compliance requirement, finding the position information of the data storage from the management chain through the storage information management node;
illustratively, in this embodiment of the application, when the calculated data compliance voting score is less than or equal to 0.47, it indicates that the data does not meet the compliance requirement, a destroy operation needs to be performed, and according to the content identifier did of the illegal data, the storage information management node searches for the data that does not meet the compliance requirement, that is, the location addr of the data storage node in which the illegal data is stored from the management chain, and sends an operation of deleting the illegal data to the node in which the illegal data is stored.
And 103, deleting the data from the corresponding storage nodes according to the position information.
According to the data management method based on the block chain, the data are subjected to compliance check through the response data compliance evaluation node, if any data are detected not to meet the compliance requirement, the storage information management node finds the position information of data storage from the management chain, and the data are deleted from the corresponding storage node according to the position information. According to the invention, the block chain storage multi-node evaluation scheme is designed to evaluate the data compliance and design a scheme of separating data from registration and management information, so that the manual workload and cost are reduced, the decentralized characteristic of a block chain system is maintained, and the source data of illegal data can be erased when data destruction is carried out.
As an alternative embodiment of the present invention, after step 103, the method further comprises: uploading corresponding data invalid identifications to a management chain through the storage information management node; and uploading the record of the invalid identifier to a registration chain through the first data compliance evaluation node.
For example, after the source data of the illegal data is cleared in the data storage node, the storage information management node will have an invalid identifier (dcash, addr) null ,ts new ) Uploaded to the management chain, the first data compliance evaluation node will record (cid, uid, did, ts) with invalid (invalid) identification new Invalid) to the registration chain, when the user initiates an access to the content identification did of the dataWhen asking, the data management information and the registration information are acquired in a time reverse mode, and if addr is empty or is provided with an invalid identifier invalid, the data access is terminated.
As an optional embodiment of the present invention, the method further comprises: when a data chaining request of any block chain node is received, performing compliance check on data to be chained through a second data compliance evaluation node; when the compliance check meets the requirement, uploading the identity identifier corresponding to the block link point, the content identifier of the uploaded data and the corresponding timestamp to a registration chain through the first data compliance evaluation node, and storing the data to be uplinked to the storage node; and uploading the storage position information of the corresponding data to a management chain through the storage information management node.
For example, the embodiment of the present application randomly transmits data to be uplink to a preset number (the embodiment of the present application randomly transmits the data to 15% of the data compliance evaluation nodes, which is by way of example only and not by way of limitation) of second data compliance evaluation nodes, a set of nodes is denoted as S, the second data compliance evaluation nodes in the set S vote for data compliance, and a voting vote is performed on the data compliance i The results may be characterized by "0" and "1," 0 "representing that the data does not satisfy the compliance requirement, and" 1 "representing the data compliance, by way of example only, and not by way of limitation, the voting weight w of each data compliance evaluation node i And if not, sorting the second data compliance evaluation nodes in the set in a descending order according to the following formula:
Figure BDA0003898088020000091
wherein hg represents the calculation result of the data compliance evaluation node; response represents the proportion of response of the judging node to the identification invitation of the uploading data compliance; the embodiment of the application calculates the response proportion of the evaluation node to the identification invitation of the uploaded data compliance according to the following formula:
Figure BDA0003898088020000092
after descending sorting, the voting weight of the first 30% of the data compliance evaluation nodes is 1; voting weight of 30% to 80% of the data compliance evaluation nodes is 0.75; and (3) the voting weight of 80 to 100 percent of the data compliance evaluation nodes is 0.25, and the voting weight of the set data compliance evaluation nodes is substituted into the following formula to carry out compliance check on the data to be uplinked:
Figure BDA0003898088020000101
wherein score represents voting scores for data compliance; w is a i Voting weight representing a data compliance evaluation node; vote i Expressing the data compliance voting of the data compliance evaluation node; s represents a data compliance evaluation node set; and | S | represents the number of the data compliance evaluation nodes in the data compliance evaluation node set.
For example, in the embodiment of the present application, a preset number of second data compliance evaluation nodes are selected to check data to be uplink, if the data to be uplink meets the compliance requirement, the data to be uplink is stored in a storage node, and an identity uid corresponding to a block link point and a content identity did = SHA256 (B256) of uploaded data are stored in the storage node 0 )~SHA256(B 1 )~…~SHA256(B n-1 ) Where-represents a connection symbol, e.g., 00-01 results in 0001 i Representing a combined data block generated after fragmentation and recombination of data to be uplinked), packing the corresponding time stamps ts into (uid, did, ts), calculating SHA256 (uid-tid-ts) as an identifier of (uid, did, ts), marking as cid, uploading (cid, uid, did, ts) to a registration chain, and storing node position information addr ({ block _ num: n, block [ [ node ] ]) of data storage 1a ,node 1b ,…],…,[node na ,node nb ]]}) to the management chain, and each time data migration occurs, the address of the data storage node which is recorded to be new is updated to addr new Will (did, addr) new ,ts new ) Uploading to a management chain, and taking the latest time stamp record as the standard during query so as to realize the coverage of the original addr.N represents the number of stored nodes; block represents the ith data storage node, such as B 0 Stored in node 1a ,node 1b … node; b is n-1 Stored in node na ,node nb … node.
As an optional embodiment of the present invention, before step 101, the method further includes: calculating the credit score of each evaluation node in the block chain system according to a preset credit evaluation index; and selecting a preset number of evaluation nodes as the first data compliance evaluation nodes according to the reputation scores.
For example, in the embodiment of the present application, the preset reputation evaluation index includes: the method comprises the steps of obtaining a node online time length proportion, a node response proportion to an identification invitation for the compliance of uploaded data, a node response proportion consistent with a block chain final decision, a node uploaded compliance data proportion and a node uploaded data examined proportion.
In the embodiment of the application, the online time length proportion of the nodes is calculated by the following formula:
Figure BDA0003898088020000111
calculating the proportion of the response of the node to the identification invitation of the uploaded data compliance according to the following formula:
Figure BDA0003898088020000112
the proportion of responses made by the nodes that are consistent with the blockchain final decision is calculated by:
Figure BDA0003898088020000113
calculating the proportion of the compliance data uploaded by the nodes by:
Figure BDA0003898088020000114
calculating the ratio of the data uploaded by the nodes to be checked by the following formula:
Figure BDA0003898088020000115
calculating the credit score of each evaluation node in the block chain system by the following formula:
score i =C 1 ×alive_s i +C 2 ×response_s i +C 3 ×accept_s i +C 4 ×compliant_s i +C 5 ×accuse_s i
wherein, score i Representing the credit score of any evaluation node i; when alive _ s i When not less than 0.65, C 1 =0.1,C 2 =0.25,C 3 =0.35,C 4 =0.1,C 5 =0.2; when alive _ s i <0.65 time, C 1 =0.2,C 2 =0.3,C 3 =0.25,C 4 =0,C 5 =0.25;alive_s i The method comprises the steps of calculating the score of any judgment node i according to the online time scale of the node; response _ s i The calculation of the score of any judgment node i is carried out according to the compliance identification ratio of the node invited; accept _ s i The score of any judgment node i is calculated according to the proportion of the response made by the node and the final decision; compliant _ s i The score of any judgment node i is calculated according to the proportion of the compliance data uploaded by the node; accume _ s i The score of any judgment node i is calculated according to the proportion of the data uploaded by the node to be inspected.
Calculating the score of any judgment node according to the online time length proportion by the following formula:
Figure BDA0003898088020000116
wherein, alive i Judging the online time length proportion of the node i; min (alive) represents all the scoresThe minimum value of the judgment node under the online time length proportion; max (alive) represents the maximum value of all the evaluation nodes at the online time scale.
Calculating the score of any evaluation node according to the invited compliance identification ratio by the following formula:
Figure BDA0003898088020000121
wherein, response i Making a compliance identification proportion for the invited judging node i;
min (response) represents the minimum value of all the evaluation nodes in the proportion of the invited compliance identification;
max (response) represents the maximum value of all the panel nodes at the rate of invited compliance insights.
Calculating the score of any judging node according to the proportion of the response made by the node to the final decision by the following formula:
Figure BDA0003898088020000122
wherein, accept i The proportion of the response made by the evaluation node i to the final decision is consistent; min (accept) represents the minimum value of all the evaluation nodes in the proportion of the response made by the node consistent with the final decision; max (accept) represents the maximum value of all the evaluation nodes at the rate at which the responses made by the nodes are consistent with the final decision.
Calculating the score of any judgment node according to the proportion of the compliance data uploaded by the node through the following formula:
Figure BDA0003898088020000123
wherein, the compliant i Judging the proportion of the uploaded compliance data of the node i; min (compliant) represents the minimum value of all judging nodes in the proportion of the nodes for transmitting the compliance data; max (complement) means all judgmentsThe maximum value at the scale at which the node is passing compliance data on the node.
Calculating the score of any judgment node according to the examined proportion of the data uploaded by the node through the following formula:
Figure BDA0003898088020000131
wherein, accuse i Evaluating the ratio of the uploaded data of the node i to be inspected; min (accume) represents the minimum value of all evaluation nodes in the proportion of the data uploaded by the nodes to be inspected; max (accume) represents the maximum value of all the evaluation nodes at the scale at which the data uploaded by the node is reviewed.
In an embodiment of the invention, the reputation score is obtained according to i And (4) descending and sorting, namely selecting 30% nodes of the total network storage node number as data compliance evaluation nodes with good credit, and updating the credit ranking once every 7 days. The embodiment of the invention only takes the number of the selected data compliance evaluation nodes with good reputation and the reputation ranking updating time as examples, and is not limited to the above.
As an alternative embodiment of the present invention, the compliance check may be performed by the first data compliance evaluation node and the second data compliance evaluation node according to the following formula:
Figure BDA0003898088020000132
wherein score represents voting scores for data compliance; w is a i Voting weight representing a data compliance evaluation node; vote i Expressing the data compliance voting of the data compliance evaluation node; s represents a data compliance evaluation node set; i S represents the number of data compliance evaluation nodes in the data compliance evaluation node set; if the calculated voting score is greater than a first preset threshold value, indicating data compliance; if the calculated voting score is less than or equal to the first preset threshold, a data violation is indicated.
For example, after voting on the data by the data compliance evaluation node in the set S in the embodiment of the present application, the voting score of the data is calculated according to the above formula, and if score is greater than 0.55, it indicates data compliance, and if score is less than or equal to 0.55, it indicates a data violation. The preset threshold value of 0.55 is only used as an example, and is not limited thereto. And if the voting selection of any data compliance evaluation node is consistent with the final decision result, the evaluation node obtains corresponding excitation.
As an optional embodiment of the present invention, storing data to be uplinked to a storage node includes: acquiring a storage space value required by the data to be uplinked; judging whether the storage space value required by the data to be uplinked reaches a second preset storage threshold value or not; if the storage space value required by the data to be linked up reaches a second preset storage threshold value, the data to be linked up is fragmented and recombined to generate a plurality of groups of data blocks, and the plurality of groups of data blocks are stored in the storage node; and if the storage space value required by the data to be uplink does not reach a second preset storage threshold value, storing the data to be uplink into a storage node.
For example, in the embodiment of the present application, a storage space value required for obtaining data to be uplink is recorded as size, and a unit is MB, and whether to perform fragmentation and reassembly on the data to be uplink to generate a combined data block is determined according to the following formula:
Figure BDA0003898088020000141
Figure BDA0003898088020000142
wherein, B i The combined data block is generated after the data to be linked up is fragmented and recombined; b i Data representing a range from (i × bs) MB to (min ((i + 1) × bs, size)) MB in the data to be uplink, bs =128,m represents the number of slices, n represents the number of groups after reassembly, i =0,1,2, …, n-1, and the number of slices of the data to be uplink is calculated by the following formula:
Figure BDA0003898088020000143
the number of groups after recombination was obtained by calculating n by the following formula:
Figure BDA0003898088020000144
in a specific embodiment, if the size is less than or equal to a second preset storage threshold (in the embodiment of the present invention, the preset storage threshold is bs =128, which is only by way of example and not by way of limitation), then m =1,n =1, in which case the data to be uplinked is only divided into 1 group, and the data pieces in this group have only 1 block, which indicates that the data to be uplinked is directly stored in the storage node, and if the size is greater than the second preset storage threshold bs, then m is greater than 1,n and greater than 1, which indicates that the data to be uplinked is divided into multiple groups, and the data pieces in each group are greater than 1 block, and the file is fragmented and reassembled.
As an optional embodiment of the present invention, the performing a compliance check on data stored in the blockchain system in response to the first data compliance evaluation node includes: responding to a received violation data detection instruction corresponding to the blockchain system; according to the illegal data detection instruction, a detection notice is sent to a block chain node corresponding to the illegal data in an upward transmission mode; and if the block chain node does not perform the revocation or modification operation, performing compliance check through the first data compliance judgment node.
For example, in the embodiment of the present application, a referral instruction is provided in response to violation data, according to the referral instruction, a referral notification is first sent to a block link point (which may also be denoted as a data author) corresponding to the uploaded violation data, the data author determines whether to cancel the violation data according to the referral suggestion, if the data author cancels the data, the violation data is deleted according to the above method, and if the data author does not perform a cancellation or modification operation, a first data compliance evaluation node performs further compliance check.
As an optional embodiment of the present invention, after the storing the data to be uplinked to the storage node, the method further includes: acquiring a change value of the access frequency of the data contained in the storage node in the current period compared with the access frequency of the previous period; and adjusting the number of storage nodes of corresponding data according to the change value of the frequency in the adjacent period.
For example, in the embodiment of the present application, data to be uplinked is randomly divided into multiple storage nodes for storage, and the storage node is default to be 3% of the number of storage nodes in the entire network in the embodiment of the present application, which is only taken as an example, and not limited to this, a change value of the current access frequency of data contained in the storage node compared to the access frequency of the previous cycle is recorded by the following formula:
Figure BDA0003898088020000151
wherein Δ f represents a variation value of the access frequency of the data contained in the storage node in the current period compared to the access frequency in the previous period (the time period is set to be one day in the embodiment of the present application, which is only used as an example and not limited thereto); f. of n Indicating the access frequency of the current cycle of data, f p Indicating the access frequency of the previous cycle of data.
In a specific embodiment, as the access frequency of a certain data changes, the number of storage nodes corresponding to the data is calculated by the following formula:
Figure BDA0003898088020000152
wherein sl represents that the data correspondingly increases or decreases the number of storage nodes; n represents the number of storage nodes to which the data corresponds.
The data corresponding to the minimum storage nodes is not lower than 3% of the number of the full-network storage nodes, when the number of the storage nodes is lower than 2% of the number of the full-network storage nodes, 1% of idle storage nodes are randomly selected to initiate a replication request to the nodes storing the data until the number of the storage nodes is restored to 3% of the number of the full-network storage nodes, and when the number of the storage nodes is 2% -3% of the number of the full-network storage nodes, additional processing of increasing or reducing is not performed. And the storage node obtains corresponding excitation according to the size of the data stored by the storage node and the online time of the node.
The embodiment of the invention also discloses a data management device based on the block chain, which is applied to a block chain system, wherein the block chain system is respectively connected with a registration chain and a management chain, the registration chain is used for storing the identity corresponding to the block chain node storing data to the block chain system, the content identification of the uploaded data and the corresponding timestamp, the management chain is used for storing the storage position information of the data, the nodes in the block chain system comprise a data storage node, a storage information management node and a data compliance judgment node, and the data storage node is used for storing the data uploaded to the block chain system; as shown in fig. 2, the apparatus includes:
a checking response module 201, configured to perform compliance checking on data stored in the blockchain system in response to the first data compliance evaluation node;
a location information obtaining module 202, configured to find, by the storage information management node, location information of the data storage from the management chain if it is detected that any data stored on the blockchain system does not meet a compliance requirement;
and the data deleting module 203 is configured to delete the data from the corresponding storage node according to the location information.
According to the data management device based on the block chain, the data are subjected to compliance check through the response data compliance evaluation node, if any data are detected not to meet the compliance requirement, the storage information management node finds the position information of data storage from the management chain, and the data are deleted from the corresponding storage node according to the position information. According to the invention, the block chain storage multi-node evaluation scheme is designed to evaluate the data compliance and design a scheme of separating data from registration and management information, so that the manual workload and cost are reduced, the decentralized characteristic of a block chain system is maintained, and the source data of illegal data can be erased when data destruction is carried out.
As an optional embodiment of the present invention, the apparatus further comprises: the invalid identifier uploading module is used for uploading corresponding data invalid identifiers to a management chain through the storage information management node; and the identification record uploading module is used for uploading the record of the invalid identification to a registration chain through the first data compliance evaluation node.
As an optional embodiment of the present invention, the apparatus further comprises: the second data checking module is used for performing compliance check on data to be uplink through a second data compliance evaluation node when a data uplink request of any block chain node is received, wherein the credit degree of the second data compliance evaluation node is lower than that of the first data compliance evaluation node; the data storage module is used for uploading the identity identifier corresponding to the block link point, the content identifier of the uploaded data and the corresponding timestamp to a registration chain through the first data compliance judgment node when compliance check meets the requirement, and storing the data to be chained to the storage node; and the position information uploading module is used for uploading the storage position information of the corresponding data to the management chain through the storage information management node.
As an optional embodiment of the present invention, the apparatus further comprises: the credit score calculation module is used for calculating the credit score of each judgment node in the block chain system according to a preset credit evaluation index; and the node selection module is used for selecting a preset number of evaluation nodes as the first data compliance evaluation nodes according to the reputation scores.
As an alternative embodiment of the invention, the compliance check is performed by the following formula:
Figure BDA0003898088020000171
wherein score represents the voting score for data compliance; w is a i Expressing the voting weight of the data compliance evaluation node; vote i Expressing the data compliance voting of the data compliance evaluation node; s represents a data compliance evaluation node set; i S represents data compliance in data compliance evaluation node setJudging the number of nodes; if the calculated voting score is greater than a first preset threshold value, indicating data compliance; if the calculated voting score is less than or equal to the first preset threshold, a data violation is indicated.
As an optional embodiment of the present invention, the data storage module further comprises: a data space value obtaining submodule, configured to obtain a storage space value required by the data to be uplink; the space value judgment submodule is used for judging whether a storage space value required by the data to be chained reaches a second preset storage threshold value or not; the data processing submodule is used for fragmenting and recombining the data to be uplink to generate a plurality of groups of data blocks and storing the plurality of groups of data blocks into the storage node if the storage space value required by the data to be uplink reaches a second preset storage threshold value; and the data storage submodule is used for storing the data to be uplink into a storage node if the storage space value required by the data to be uplink does not reach a second preset storage threshold value.
As an optional embodiment of the present invention, the inspection response module 201 includes: the instruction response submodule is used for responding to the received violation data detection instruction corresponding to the blockchain system; the notice sending submodule is used for sending a check-up notice to the block chain link point corresponding to the uploaded illegal data according to the illegal data check-up instruction; and the compliance checking submodule is used for carrying out compliance checking through the first data compliance judging node if the block chain node does not carry out revocation or modification operation.
As an optional embodiment of the present invention, the apparatus further comprises: the access frequency acquisition module is used for acquiring a change value of the access frequency of the current period of the data contained in the storage node compared with the access frequency of the previous period; and the node number adjusting module is used for adjusting the number of the storage nodes of the corresponding data according to the change value of the frequency in the adjacent period.
An embodiment of the present invention further provides an electronic device, as shown in fig. 3, the electronic device may include a processor 401 and a memory 402, where the processor 401 and the memory 402 may be connected by a bus or in another manner, and fig. 3 takes the connection by the bus as an example.
Processor 401 may be a Central Processing Unit (CPU). The Processor 401 may also be other general purpose processors, digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or combinations thereof.
The memory 402, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the data management method based on the blockchain in the embodiment of the present invention. The processor 401 executes various functional applications and data processing of the processor by running non-transitory software programs, instructions and modules stored in the memory 402, that is, implements the block chain based data management method in the above method embodiment.
The memory 402 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by the processor 401, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 402 may optionally include memory located remotely from processor 401, which may be connected to processor 401 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more modules are stored in the memory 402 and when executed by the processor 401, perform a blockchain based data management method as in the embodiment shown in fig. 1.
The details of the electronic device may be understood with reference to the corresponding related description and effects in the embodiment shown in fig. 1, and are not described herein again.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk Drive (Hard Disk Drive, abbreviated as HDD), or a Solid State Drive (SSD); the storage medium may also comprise a combination of memories of the kind described above.
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined.

Claims (10)

1. A block chain-based data management method is characterized in that the block chain-based data management method is applied to a block chain system, the block chain system is respectively connected with a registration chain and a management chain, the registration chain is used for storing an identity corresponding to a block chain node for storing data in the block chain system, a content identifier of uploaded data and a corresponding timestamp, the management chain is used for storing storage position information of the data, the nodes in the block chain system comprise a data storage node, a storage information management node and a data compliance judgment node, and the data storage node is used for storing the data uploaded to the block chain system; the method comprises the following steps:
performing compliance check on data stored in the blockchain system in response to the first data compliance evaluation node;
if any data stored on the blockchain system is detected not to meet the compliance requirement, the storage information management node finds the position information of the data storage from the management chain;
and deleting the data from the corresponding storage node according to the position information.
2. The blockchain-based data management method according to claim 1, wherein after the data is deleted from the corresponding storage node, the method further comprises:
uploading corresponding data invalid identifications to a management chain through the storage information management node;
and uploading the record of the invalid identifier to a registration chain through the first data compliance evaluation node.
3. The blockchain-based data management method of claim 1, further comprising:
when a data uplink request of any block chain node is received, performing compliance check on data to be uplink by the second data compliance evaluation node;
when the compliance check meets the requirement, uploading the identity identifier corresponding to the block link point, the content identifier of the uploaded data and the corresponding timestamp to a registration chain through the first data compliance evaluation node, and storing the data to be uplinked to the storage node;
and uploading the storage position information of the corresponding data to a management chain through the storage information management node.
4. The blockchain-based data management method of claim 1, wherein before the compliance check of the data stored in the blockchain system in response to the first data compliance evaluation node, the method further comprises:
calculating the credit score of each evaluation node in the block chain system according to a preset credit evaluation index;
and selecting a preset number of evaluation nodes as the first data compliance evaluation nodes according to the reputation scores.
5. The blockchain-based data management method according to claim 1 or 3, wherein the compliance check is performed by the following formula:
Figure FDA0003898088010000021
wherein score represents voting scores for data compliance; w is a i Expressing the voting weight of the data compliance evaluation node; vote i Expressing the data compliance voting result of the data compliance evaluation node; s represents a data compliance evaluation node set; i S represents the number of data compliance evaluation nodes in the data compliance evaluation node set;
if the calculated voting score is greater than a first preset threshold value, indicating data compliance;
if the calculated voting score is less than or equal to the first preset threshold, a data violation is indicated.
6. The method according to claim 3, wherein the storing the data to be uplinked to the storage node comprises:
acquiring a storage space value required by the data to be uplinked;
judging whether a storage space value required by the data to be uplinked reaches a second preset storage threshold value or not;
if the storage space value required by the data to be linked up reaches a second preset storage threshold value, the data to be linked up is fragmented and recombined to generate a plurality of groups of data blocks, and the plurality of groups of data blocks are stored in the storage node;
and if the storage space value required by the data to be uplink does not reach a second preset storage threshold value, storing the data to be uplink into a storage node.
7. The blockchain-based data management method of claim 1, wherein the performing a compliance check on the data stored in the blockchain system in response to the first data compliance evaluation node comprises:
responding to the received violation data detection instruction corresponding to the blockchain system;
according to the illegal data detection instruction, sending a detection notice to a block chain node corresponding to the illegal data;
and if the block chain node does not perform the revocation or modification operation, performing compliance check through the first data compliance judgment node.
8. The blockchain-based data management method according to claim 6, wherein after storing the data to be uplinked to the storage node, the method further comprises:
acquiring a change value of the access frequency of the data contained in the storage node in the current period compared with the access frequency of the previous period;
and adjusting the number of storage nodes of corresponding data according to the change value of the frequency in the adjacent period.
9. The block chain-based data management device is applied to a block chain system, wherein the block chain system is respectively connected with a registration chain and a management chain, the registration chain is used for storing an identity corresponding to a block chain node for storing data in the block chain system, a content identifier of uploaded data and a corresponding timestamp, the management chain is used for storing storage location information of the data, the nodes in the block chain system comprise a data storage node, a storage information management node and a data compliance judgment node, and the data storage node is used for storing the data uploaded to the block chain system; the device comprises:
the checking response module is used for responding to the first data compliance evaluation node to perform compliance checking on data stored in the blockchain system;
the position information acquisition module is used for finding the position information of the data storage from the management chain through the storage information management node if any data stored on the blockchain system is detected not to meet the compliance requirement;
and the data deleting module is used for deleting the data from the corresponding storage node according to the position information.
10. An electronic device, comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the steps of the blockchain based data management method of any one of claims 1 to 8.
CN202211284663.1A 2022-10-19 2022-10-19 Data management method and device based on blockchain and electronic equipment Active CN115712921B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211284663.1A CN115712921B (en) 2022-10-19 2022-10-19 Data management method and device based on blockchain and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211284663.1A CN115712921B (en) 2022-10-19 2022-10-19 Data management method and device based on blockchain and electronic equipment

Publications (2)

Publication Number Publication Date
CN115712921A true CN115712921A (en) 2023-02-24
CN115712921B CN115712921B (en) 2023-07-04

Family

ID=85230132

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211284663.1A Active CN115712921B (en) 2022-10-19 2022-10-19 Data management method and device based on blockchain and electronic equipment

Country Status (1)

Country Link
CN (1) CN115712921B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111882319A (en) * 2020-07-07 2020-11-03 苏波 Block chain data uplink processing method, device and equipment
CN113239407A (en) * 2021-04-13 2021-08-10 北京邮电大学 Block chain decision point selection method and device, electronic equipment and storage medium
CN113326516A (en) * 2021-04-22 2021-08-31 远光软件股份有限公司 Block chain consensus method, block chain system and computer equipment
US20210312461A1 (en) * 2020-07-31 2021-10-07 Alipay (Hangzhou) Information Technology Co., Ltd. Data sharing methods, apparatuses, and devices

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111882319A (en) * 2020-07-07 2020-11-03 苏波 Block chain data uplink processing method, device and equipment
US20210312461A1 (en) * 2020-07-31 2021-10-07 Alipay (Hangzhou) Information Technology Co., Ltd. Data sharing methods, apparatuses, and devices
CN113239407A (en) * 2021-04-13 2021-08-10 北京邮电大学 Block chain decision point selection method and device, electronic equipment and storage medium
CN113326516A (en) * 2021-04-22 2021-08-31 远光软件股份有限公司 Block chain consensus method, block chain system and computer equipment

Also Published As

Publication number Publication date
CN115712921B (en) 2023-07-04

Similar Documents

Publication Publication Date Title
CN110929880A (en) Method and device for federated learning and computer readable storage medium
US10965466B2 (en) Estimable proof-of-work for blockchain
CN112765677B (en) Federal learning method, device and system based on blockchain
US20220044162A1 (en) Blockchain-based secure federated learning
CN113672937B (en) Block chain link point
JP2018503900A (en) Vulnerability scanning method and apparatus
CN112307331A (en) Block chain-based college graduate intelligent recruitment information pushing method and system and terminal equipment
CN116414815A (en) Data quality detection method, device, computer equipment and storage medium
CN112068854B (en) Intelligent device algorithm updating system, intelligent device and platform server
CN107733898A (en) A kind of data based on chain of evidence save implementation method, system and equipment from damage
CN115712921A (en) Data management method and device based on block chain and electronic equipment
CN112053090A (en) Flexible employment data processing method, device and system based on block chain
CN109034402B (en) Information processing method, device and system
CN112700244B (en) Information storage system, method and server based on block chain
CN115618427A (en) Data chaining method, device and data platform
CN115147236A (en) Processing method, processing device and electronic equipment
CN114911805A (en) Road network data updating method, system, electronic equipment and storage medium
CN108075918A (en) Internet service alteration detection method and system
CN111754103A (en) Enterprise risk image method, device, computer equipment and readable storage medium
CN112153663A (en) Wireless network evaluation method and device
CN118014051B (en) Multi-mode large model increment learning method and device and computer equipment
CN114567855B (en) Long short message processing method and device and electronic equipment
CN116882968B (en) Design and implementation method for fault defect overall process treatment
CN114707606B (en) Data processing method and device based on federal learning, equipment and storage medium
US20240160698A1 (en) Systems and methods for generating synthetic data

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