CN116881980B - Data tamper-proof method and device under reinforced block chain system node - Google Patents

Data tamper-proof method and device under reinforced block chain system node Download PDF

Info

Publication number
CN116881980B
CN116881980B CN202311141973.2A CN202311141973A CN116881980B CN 116881980 B CN116881980 B CN 116881980B CN 202311141973 A CN202311141973 A CN 202311141973A CN 116881980 B CN116881980 B CN 116881980B
Authority
CN
China
Prior art keywords
storage
frequency
data
chain
node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311141973.2A
Other languages
Chinese (zh)
Other versions
CN116881980A (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.)
Beijing Xunjing Technology Co ltd
Original Assignee
Beijing Xunjing 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 Xunjing Technology Co ltd filed Critical Beijing Xunjing Technology Co ltd
Priority to CN202311141973.2A priority Critical patent/CN116881980B/en
Publication of CN116881980A publication Critical patent/CN116881980A/en
Application granted granted Critical
Publication of CN116881980B publication Critical patent/CN116881980B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioethics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Storage Device Security (AREA)

Abstract

The invention relates to the technical field of data storage, and discloses a method and a device for preventing data from being tampered under a reinforced block chain system node, wherein the method comprises the following steps: the method comprises the steps of receiving low-frequency change data, medium-frequency change data and high-frequency change data, constructing a global storage chain, a strip-type storage chain and a split storage chain, confirming split center nodes and a total center node, storing the low-frequency change data into the global storage chain, storing the medium-frequency change data into the strip-type storage chain, controlling the split storage chain by the split center nodes to receive the high-frequency change data, storing the high-frequency change data into the split storage chain, encrypting the low-frequency change data, the medium-frequency change data and the high-frequency change data after storage is completed, generating a public key and a private key, transmitting the public key to the split center nodes, and transmitting the private key to the total center node. The invention can select the proper blockchain node to store the data, thereby shortening the storage time and further reducing the possibility of tampering the data in the storage process.

Description

Data tamper-proof method and device under reinforced block chain system node
Technical Field
The present invention relates to the field of data storage technologies, and in particular, to a method and apparatus for enhancing tamper resistance of data under a blockchain system node, an electronic device, and a computer readable storage medium.
Background
Blockchain-based data storage is a new way of decentralized distributed storage, where data is actually stored in blockchain nodes that participate in a consensus mechanism, and stored data is managed in coordination through all blockchain nodes.
After the data to be stored is obtained by the traditional method, one or more blockchain nodes for storage are confirmed firstly, then the data to be stored is stored in the blockchain nodes, and as the blockchain nodes comprise the information such as the hash value of the previous block, the transaction information of the block, the timestamp and the like, the possibility of tampering the data is greatly reduced.
In summary, the encryption storage of data based on blockchain can improve the security of the data storage, reduce the possibility of tampering of the data, but there is still room for improvement, because most of the current methods do not select suitable blockchain nodes according to the data characteristics, but traverse the storable blockchain nodes in a general way, thereby causing the reduction of the storage efficiency and the increase of the storage time, and because the data is most easy to tamper in the storage process, after the storage time is increased, the risk of tampering of the data is also improved, and therefore, how to select suitable blockchain nodes, thereby reducing the storage time of the data storage, avoiding the possibility of tampering of the data, and being a technical problem which needs to be solved urgently.
Disclosure of Invention
The invention provides a method and a device for enhancing data tamper resistance under a blockchain system node and a computer readable storage medium, and mainly aims to select a proper blockchain node to store data, thereby shortening storage time and further reducing possibility of tampering of the data in a storage process.
In order to achieve the above object, the present invention provides a method for enhancing data tamper resistance under a blockchain system node, including:
starting a block chain storage system, receiving time series data input by a user, and calculating a time fluctuation threshold set of the time series data;
dividing the time sequence data according to the time fluctuation threshold set to obtain low-frequency change data, medium-frequency change data and high-frequency change data;
constructing a global storage chain, a strip storage chain and a split storage chain in a block chain storage system, and confirming a split center node and a total center node;
storing low-frequency change data into a global storage chain, storing intermediate-frequency change data into a stripe storage chain, controlling a split storage chain to receive high-frequency change data by using a split center node, and storing high-frequency change data into the split storage chain, wherein three storage chains are performed in parallel, and when one storage chain has a storage error, responding to the storage error by using a total center node, and replacing the storage chain with the error by using the other two storage chains;
And after the storage is completed, encrypting the low-frequency change data, the medium-frequency change data and the high-frequency change data stored in the global storage chain, the strip storage chain and the split storage chain, generating a public key and a private key, transmitting the public key to the split center node, and transmitting the private key to the total center node.
Optionally, the calculating the time fluctuation threshold set of time series data includes:
sequencing the time sequence data according to the sequence of time variation to obtain time sequence data;
sequentially extracting time adjacent data from the time sequence data to obtain adjacent time data;
receiving a time-varying window value, and acquiring one or more groups of adjacent time data according to the time-varying window value;
calculating a time fluctuation threshold value according to one or more groups of adjacent time data under each window value;
and summarizing the time fluctuation threshold value under each window value to obtain a time fluctuation threshold value set.
Optionally, the calculating, under each window value, a time fluctuation threshold according to one or more sets of adjacent time data includes:
the time fluctuation threshold is calculated according to the following formula:
wherein,indicate->Time fluctuation threshold under window value, +. >Indicate->Total number of adjacent time data included under window value, +.>Indicate->First->Adjacent time data>Indicate->Window value in the firstThe data generation time of the adjacent time data.
Optionally, the building a global storage chain, a stripe storage chain and a split storage chain in the blockchain storage system, and identifying a split center node and a total center node includes:
selecting all currently available blockchain nodes from a blockchain storage system to obtain an available node set;
calculating the storage efficiency value of each available node according to the storage records;
dividing all the storage efficiency values according to the proportions of the low-frequency change data, the medium-frequency change data and the high-frequency change data to obtain a low-frequency efficiency value, a medium-frequency efficiency value and a high-frequency efficiency value;
confirming all available nodes belonging to the low-frequency efficiency value as a low-frequency node set, confirming available nodes belonging to the medium-frequency efficiency value as a medium-frequency node set and confirming available nodes belonging to the high-frequency efficiency value as a high-frequency node set;
setting the minimum number of low-frequency nodes, constructing a global storage chain from a low-frequency node set according to the minimum number of the low-frequency nodes, constructing a strip storage chain by using an intermediate-frequency node set, and constructing the global storage chain from the low-frequency node set according to the minimum number of the low-frequency nodes, wherein the method comprises the following steps:
Receiving the total number of the set global storage chains, sequentially selecting low-frequency nodes from a low-frequency node set according to the total number, and constructing to obtain the global storage chains according to a rule of being greater than or equal to the minimum number of the low-frequency nodes, wherein the low-frequency nodes in each global storage chain have the functions of storage and recording at the same time, do not interfere with each other, and have the function of non-tampering of the block chains at the same time;
and selecting a branch center node and a total center node from the high-frequency node set, and constructing and obtaining a split storage chain based on the rest high-frequency nodes, wherein the branch center node is responsible for managing the split storage chain, and the total center node is responsible for coordinating the global storage chain, the strip storage chain and the split storage chain.
Optionally, the selecting all currently available blockchain nodes from the blockchain storage system to obtain an available node set includes:
acquiring all block chain nodes which are normally operated in a block chain storage system at present, and acquiring a normal node set;
calculating the ratio of the used storage space to the total storage space in each normal node to obtain a storage ratio;
after eliminating normal nodes with the storage duty ratio being greater than or equal to the storage duty ratio threshold, calculating the safety coefficient of the rest normal nodes;
And eliminating normal nodes with the safety coefficient smaller than or equal to the safety threshold value to obtain an available node set.
Optionally, the calculating the security coefficient of the remaining normal node includes:
acquiring a storage record of a normal node in history for executing each storage, and extracting the number of storage failures from the storage record;
and calculating a safety coefficient according to the storage failure times, wherein the safety coefficient calculating method comprises the following steps:
wherein,indicate->Security factor of the individual normal node,/>Indicate->Number of storage failures of normal node, +.>Indicate->Sum of number of storage failures and number of storage successes of each normal node, +.>Indicate->The normal node completes the->Storage data amount at the time of secondary storage, +.>Indicate->The normal node completes the->Storage time at the time of secondary storage, if +.>If the storage fails in the secondary storage, the storage time is set to store the specified valueAnd store the storage time when the specified value is greater than the storage success of all normal nodes, ++>Is a weight factor of the safety coefficient.
Optionally, the selecting the split center node and the total center node from the high-frequency node set, and constructing a split storage chain based on the remaining high-frequency nodes includes:
Calculating a storage weight value of each high-frequency node in the high-frequency node set, and selecting the high-frequency node with the highest storage weight value as a total center node;
selecting a high-frequency node with a next highest storage weight value as a branch center node;
and taking the branch center node as a control node of the split storage chain, and taking the control node as a core to construct one or more global storage chains and strip-type storage chains, wherein the branch center node, the one or more global storage chains and the strip-type storage chains form the split storage chain.
Optionally, the constructing the strip memory chain by using the intermediate frequency node set includes:
calculating a stored weight value for each intermediate frequency node in the set of intermediate frequency nodes, wherein the calculating of the stored weight value comprises:
obtaining a storage efficiency value and a safety coefficient of an intermediate frequency node;
normalizing the storage efficiency value and the safety coefficient to obtain a normalization efficiency value and a normalization coefficient;
adding the normalization efficiency value and the normalization coefficient and dividing by 2 to obtain the storage weighting value;
sorting the intermediate frequency node sets according to the stored weighted values to obtain intermediate frequency sorting sets, wherein the intermediate frequency sorting sets are positioned at the leftmost or rightmost side with the highest stored weighted values;
confirming the number of intermediate frequency nodes contained in the strip memory chain, wherein the number of intermediate frequency nodes is greater than or equal to 3, and sequentially selecting intermediate frequency nodes for constructing the strip memory chain from the intermediate frequency node sets according to the number of the contained intermediate frequency nodes, wherein the number of the selected intermediate frequency nodes is the number of the intermediate frequency nodes;
And constructing and obtaining a strip storage chain according to the selected intermediate frequency node, wherein the intermediate frequency node with the highest storage weight value is used as a storage head node of the strip storage chain.
Optionally, the storing the low-frequency variation data in the global storage chain, the medium-frequency variation data in the stripe storage chain, and controlling the split storage chain by using the split center node to receive the high-frequency variation data and store the high-frequency variation data in the split storage chain includes:
dividing the low-frequency change data into a plurality of parts simultaneously to obtain low-frequency data sets, wherein the number of the low-frequency data sets is the same as the number of low-frequency nodes included in the global storage chain;
sequentially storing each low-frequency data to a corresponding low-frequency node in a global storage chain;
storing the intermediate frequency change data to a storage head node of a strip storage chain, and recording the storage process of the intermediate frequency change data by utilizing an intermediate frequency node adjacent to the storage head node;
when the storage head node successfully stores the intermediate frequency change data, copying the stored intermediate frequency change data by utilizing other intermediate frequency nodes which are not adjacent to the storage head node in the strip storage chain;
and confirming the data quantity of the high-frequency change data by using the split center node, and storing the high-frequency change data into the split storage chain by using a storage mode after confirming the storage mode of storing the high-frequency change data into the split storage chain according to the structure of the split storage chain and the data quantity of the high-frequency change data.
In order to solve the above-mentioned problems, the present invention further provides a data tamper-proof device under a node of a reinforced blockchain system, the device comprising:
the time sequence calculating module is used for starting the block chain storage system, receiving time sequence data input by a user and calculating a time fluctuation threshold set of the time sequence data;
the time sequence data segmentation module is used for segmenting the time sequence data according to the time fluctuation threshold set to obtain low-frequency change data, medium-frequency change data and high-frequency change data;
the storage chain construction module is used for constructing a global storage chain, a strip storage chain and a split storage chain in the block chain storage system and confirming a split center node and a total center node;
the storage execution module is used for storing low-frequency change data into the global storage chain, medium-frequency change data into the strip-type storage chain, controlling the split storage chain to receive high-frequency change data by utilizing the split center node, and storing the high-frequency change data into the split storage chain, wherein three storage chains are all performed in parallel, and when one storage chain has a storage error, the storage error is responded through the total center node, and the other two storage chains are utilized to replace the storage chain with the error;
And the encryption module is used for encrypting the low-frequency change data, the medium-frequency change data and the high-frequency change data stored in the global storage chain, the strip storage chain and the split storage chain after the storage is completed, generating a public key and a private key, transmitting the public key to the sub-center node, and transmitting the private key to the total center node.
In order to solve the above-mentioned problems, the present invention also provides an electronic apparatus including:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to implement the method of tamper resistance of data under the enhanced blockchain system node described above.
In order to solve the above-mentioned problems, the present invention further provides a computer readable storage medium having at least one instruction stored therein, the at least one instruction being executed by a processor in an electronic device to implement the above-mentioned data tamper-proof method under an enhanced blockchain system node.
Compared with the background art, the method comprises the following steps: firstly, the invention starts the block chain storage system firstly, receives the time sequence data input by a user, calculates a time fluctuation threshold set of the time sequence data, segments the time sequence data according to the time fluctuation threshold set to obtain low-frequency change data, medium-frequency change data and high-frequency change data, and needs to explain the fluctuation condition of the time sequence data which is most concerned with the accompanying time change, namely, compared with the time sequence data with low smooth fluctuation, the time sequence data with high fluctuation tends to have higher importance, so after the invention acquires the time sequence data, the block chain node is not directly selected for storing the time sequence data, but the time fluctuation threshold is divided into the low-frequency change data, the medium-frequency change data and the high-frequency change data according to the time fluctuation threshold of the time sequence data, thereby being convenient for constructing a storage chain with corresponding relation. Then, a global storage chain, a stripe storage chain and a split storage chain are constructed in the blockchain storage system, and a split center node and a total center node are confirmed, obviously, the global storage chain is used for storing low-frequency change data, the stripe storage chain is used for storing medium-frequency change data, and the split storage chain is used for storing high-frequency change data, in detail, the low-frequency change data is stored in the global storage chain, the medium-frequency change data is stored in the stripe storage chain, and the split storage chain is controlled by the split center node to receive the high-frequency change data and store the high-frequency change data in the split storage chain, wherein three storage chains are all performed in parallel, when one storage chain has a storage error, the total center node responds to the storage error, and the other two storage chains are utilized to replace the storage chain with the error, different storage chains can store different time sequence data, and because of different internal structures of the different storage chains are different, the storage time sequence data is more specific, and furthermore, the storage time of the data storage is shortened, and in addition, the storage time of the data storage is further shortened by the three storage chains, when one storage chain has a storage error and the other storage chains have a plurality of storage error, and the storage chains are coordinated, and the storage chains have a storage error. Therefore, the method and the device for enhancing the data tamper resistance under the blockchain system node can select the proper blockchain node to store the data, thereby shortening the storage time and further reducing the possibility of tampering the data in the storage process.
Drawings
FIG. 1 is a flow chart of a method for enhancing data tamper resistance under a blockchain system node according to an embodiment of the application;
FIG. 2 is a schematic diagram of a global storage chain of a method for enhancing data tamper resistance under a blockchain system node according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a stripe memory chain of a method for enhancing data tamper resistance under a blockchain system node according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a partitioned storage chain of a method for enhancing data tamper resistance under a blockchain system node according to an embodiment of the present application;
FIG. 5 is a functional block diagram of a data tamper resistant device under a reinforced blockchain system node according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device for implementing the data tamper-proof method under the node of the enhanced blockchain system according to an embodiment of the present application.
The achievement of the objects, functional features and advantages of the present application will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The embodiment of the application provides a data tamper-proof method under a reinforced block chain system node. The execution body of the data tamper-proof method under the reinforced blockchain system node includes, but is not limited to, at least one of a server, a terminal and the like capable of being configured to execute the method provided by the embodiment of the application. In other words, the method for preventing data tampering under the enhanced blockchain system node may be performed by software or hardware installed in a terminal device or a server device. The service end includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
Example 1:
referring to fig. 1, a flow chart of a method for enhancing data tamper resistance under a blockchain system node according to an embodiment of the invention is shown. In this embodiment, the method for tamper resistance of data under the enhanced blockchain system node includes:
s1, starting a block chain storage system, receiving time series data input by a user, and calculating a time fluctuation threshold set of the time series data.
It should be explained that the blockchain storage system is a storage system that implements distributed storage based on the blockchain technology, and may store data on a plurality of nodes in a decentralized manner, so as to ensure the security and reliability of the data. The basic principle of a blockchain storage system is to divide a whole block of data into a plurality of blocks, and then store the blocks in a distributed manner on a plurality of nodes of the blockchain storage system. However, the conventional blockchain storage system does not set different encryption modes and storage modes in combination with the nodes, so that the storage security and the storage efficiency are required to be improved.
Further, the time-series data is a data sequence recorded in time series, and each data in the same data sequence is required to have the same caliber and to have comparability, and the time-series data may be a time number or a time point number. For example, the sheetlet is a manager responsible for managing business data of a marketing enterprise, and when business data of different time periods of each day of the marketing enterprise is acquired, the business data of different time periods form time series data.
It should be understood that the time series data is data which presents a certain rule along with time variation, so that the rule of the time series data can be effectively observed by calculating the time fluctuation threshold value of the time series data, thereby providing a certain reference basis for how to store the time series data. In detail, the calculating the time fluctuation threshold set of the time series data includes:
sequencing the time sequence data according to the sequence of time variation to obtain time sequence data;
sequentially extracting time adjacent data from the time sequence data to obtain adjacent time data;
receiving a time-varying window value, and acquiring one or more groups of adjacent time data according to the time-varying window value;
calculating a time fluctuation threshold value according to one or more groups of adjacent time data under each window value;
and summarizing the time fluctuation threshold value under each window value to obtain a time fluctuation threshold value set.
For example, the sheetlet is a financial manager of a company, and business data of different time periods of the company are acquired (wherein, the business data may refer to revenue data of the company under a specific time period), so that sorting is performed on the business data of different time periods according to the sequence of generating the business data, and time sequence data is obtained. For example, the time sequence data is composed of 8 am whole business data, 8 am 5 minute business data, 8 am 7 minute business data, 8 am 9 minute business data, 8 am 11 minute business data and the like. Setting the window value of the time change to 10 minutes indicates that 8 whole business data, 8 point 5 business data, 8 point 7 business data and 8 point 9 business data are acquired from 8 points in the morning to 8 points in the morning, and the 8 point whole business data and the 8 point 5 business data form a group of adjacent time data, the 8 point 5 business data and the 8 point 7 business data form a group of adjacent time data, and the 8 point 7 business data and the 8 point 9 business data form a group of adjacent time data.
Further, the calculating, under each window value, a time fluctuation threshold according to one or more sets of adjacent time data includes:
the time fluctuation threshold is calculated according to the following formula:
wherein,indicate->Time fluctuation threshold under window value, +.>Indicate->Total number of adjacent time data included under window value, +.>Indicate->First->Adjacent time data>Indicate->Window value in the firstThe data generation time of the adjacent time data.
It can be understood that different time fluctuation thresholds can be obtained through calculation under different window values, the magnitude of the time fluctuation threshold can be used for feeding back the data fluctuation condition under the window value, the larger the time fluctuation threshold is, the larger the data fluctuation under the window value is, the smaller the time fluctuation threshold is, the smaller the data fluctuation under the window value is, and because time sequence data is always most sensitive to the data fluctuation, the more severe the data fluctuation is, the data importance is relatively higher.
S2, segmenting the time sequence data according to the time fluctuation threshold set to obtain low-frequency change data, medium-frequency change data and high-frequency change data.
In an exemplary embodiment, a low frequency change threshold, an intermediate frequency change threshold, and a high frequency change threshold are set, when the time fluctuation threshold is smaller than or equal to the low frequency change threshold, corresponding time series data is confirmed as low frequency change data, when the time fluctuation threshold is between the low frequency change threshold and the intermediate frequency change threshold, the time series data is confirmed as intermediate frequency change data, and similarly, when the time fluctuation threshold is higher than the high frequency change threshold, the time series data is confirmed as high frequency change data.
And S3, constructing a global storage chain, a strip storage chain and a split storage chain in the block chain storage system, and confirming the split center node and the total center node.
It should be explained that, when receiving data to be stored, the conventional method directly selects an available blockchain node from the blockchain storage system, then encrypts the data to be stored to obtain a public and private key, and stores both the private key and the encrypted data in the blockchain node. Although the method can realize data storage, the data characteristics of the data to be stored (such as time series data have timeliness) are not considered, and meanwhile, the adopted storage and encryption modes are relatively simple, so that the risk of tampering the data is easily increased. In detail, the building a global storage chain, a stripe storage chain and a split storage chain in the blockchain storage system, and identifying a split center node and a total center node includes:
Selecting all currently available blockchain nodes from a blockchain storage system to obtain an available node set;
dividing the available node sets according to the proportions of the low-frequency change data, the intermediate-frequency change data and the high-frequency change data to obtain a low-frequency node set, an intermediate-frequency node set and a high-frequency node set;
setting the minimum number of low-frequency nodes, constructing a global storage chain from the low-frequency node set according to the minimum number of the low-frequency nodes, and constructing a strip storage chain by utilizing the intermediate-frequency node set;
and selecting a branch center node and a total center node from the high-frequency node set, and constructing and obtaining a split storage chain based on the rest high-frequency nodes, wherein the branch center node is responsible for managing the split storage chain, and the total center node is responsible for coordinating the global storage chain, the strip storage chain and the split storage chain.
In detail, the selecting all currently available blockchain nodes from the blockchain storage system to obtain an available node set includes:
acquiring all block chain nodes which are normally operated in a block chain storage system at present, and acquiring a normal node set;
calculating the ratio of the used storage space to the total storage space in each normal node to obtain a storage ratio;
After eliminating normal nodes with the storage duty ratio being greater than or equal to the storage duty ratio threshold, calculating the safety coefficient of the rest normal nodes;
and eliminating normal nodes with the safety coefficient smaller than or equal to the safety threshold value to obtain an available node set.
In detail, the calculating the security coefficients of the remaining normal nodes includes:
acquiring a storage record of a normal node in history for executing each storage, and extracting the number of storage failures from the storage record;
and calculating a safety coefficient according to the storage failure times, wherein the safety coefficient calculating method comprises the following steps:
wherein,indicate->Security factor of the individual normal node,/>Indicate->Number of storage failures of normal node, +.>Indicate->Sum of number of storage failures and number of storage successes of each normal node, +.>Indicate->The normal node completes the->Storage data amount at the time of secondary storage, +.>Indicate->The normal node completes the->Storage time at the time of secondary storage, if +.>The storage time is set to be the storage time when the storage is successful when the storage fails at the time of the storage, and the storage designated value is larger than the storage time when the storage of all normal nodes is successful,>is a weight factor of the safety coefficient.
For example, assuming that there are 500 blockchain nodes in the blockchain storage system, the 500 blockchain nodes are normal node sets, and since the safety coefficient value of some normal nodes is low or the storage occupancy value is high, and the subsequent storage requirement is not satisfied, the normal nodes are confirmed to be unavailable blockchain nodes, and assuming that the unavailable blockchain nodes are 200, 300 blockchain nodes are left to be available nodes.
Further, assuming that the data amounts of the low frequency change data, the intermediate frequency change data, and the high frequency change data are 8000 parts, 1000 parts, and 600 parts, respectively, respective ratio values are calculated according to 8000 parts, 1000 parts, and 600 parts, and then the division is performed on the available node sets according to the ratio values, and in general, the division may be performed on the low frequency node sets, the intermediate frequency node sets, and the high frequency node sets with the same ratio values as the low frequency change data, the intermediate frequency change data, and the high frequency change data. In addition, the embodiment of the present invention may further adopt an intelligent partitioning method, specifically, the partitioning is performed on the available node set according to the ratio of the low frequency change data, the intermediate frequency change data and the high frequency change data, to obtain a low frequency node set, an intermediate frequency node set and a high frequency node set, which includes:
calculating the storage efficiency value of each available node according to the storage records;
dividing all the storage efficiency values according to the proportions of the low-frequency change data, the medium-frequency change data and the high-frequency change data to obtain a low-frequency efficiency value, a medium-frequency efficiency value and a high-frequency efficiency value;
and confirming all available nodes belonging to the low-frequency efficiency value as a low-frequency node set, confirming available nodes belonging to the medium-frequency efficiency value as a medium-frequency node set and confirming available nodes belonging to the high-frequency efficiency value as a high-frequency node set.
It can be understood that the calculation method of the storage efficiency value is various and will not be described herein, but the essence of the calculation method of the storage efficiency value is to embody the storage efficiency of the node. And in the time series data, the importance of the high-frequency change data is higher, so that the available nodes with higher storage efficiency are required to be used for storing the high-frequency change data, and therefore, the nodes are confirmed to be high-frequency nodes, and by the pushing, the low-frequency change data is relatively low in importance, and the available nodes with lower storage efficiency values can be used for storing the low-frequency change data.
In addition, after all the available node sets are divided into a low-frequency node set, a medium-frequency node set and a high-frequency node set, a global storage chain, a strip storage chain and a split storage chain are required to be constructed according to the low-frequency node set, the medium-frequency node set and the high-frequency node set in sequence. It should be explained that the global memory chain is a chain memory with memory and record functions constructed by low-frequency nodes, and the low-frequency nodes directly and completely follow the memory rules of the blockchain, and share the memory records while not interfering with each other. Illustratively, assuming that the minimum number of low frequency nodes is set to 2 blockchain nodes, it means that at least 2 low frequency nodes are included in each global storage chain. In detail, the constructing the global storage chain from the low-frequency node set according to the minimum number of the low-frequency nodes includes:
Receiving the total number of the set global storage chains, sequentially selecting low-frequency nodes from the low-frequency node set according to the total number, and constructing to obtain the global storage chains according to a rule larger than or equal to the minimum number of the low-frequency nodes, wherein the low-frequency nodes in each global storage chain have the functions of storage and recording at the same time, do not interfere with each other, and have the function of non-tampering of the block chains at the same time.
For example, the total number of the global storage chains received and set is 7, namely, 7 global storage chains are constructed, the low-frequency nodes included in each global storage chain are all greater than or equal to 2, as shown in fig. 2, assuming that the first global storage chain is 3 low-frequency nodes a, b and c, the storage positions among the low-frequency nodes a, b and c are the same, and the low-frequency storage chains have the qualification of storing and recording low-frequency change data; the second global memory chain is 2 low-frequency nodes d and e, and the second global memory chain indicates that the low-frequency nodes d and e have the same memory status. However, it should be emphasized that different global storage chains may have different storage priorities, that is, there may be a first global storage chain with a higher storage priority than a second global storage chain, where the determining of the storage priority may be based on storage efficiency, that is, the storage efficiency of the low-frequency nodes of each global storage chain is accumulated and summed, so as to obtain the total storage efficiency, and the higher the total storage efficiency, the higher the corresponding storage priority of the global storage chain.
In addition, it should be explained that the stripe memory chain is a memory structure presenting a memory chain type for storing intermediate frequency variation data, and referring to fig. 3, the stripe memory chain is constructed by an intermediate frequency node set, and when intermediate frequency nodes in the stripe memory chain store the intermediate frequency variation data, a sequential memory rule, that is, intermediate frequency nodes coordinate with each other, is adopted, so that the storage of the intermediate frequency variation data is completed.
Further, the constructing the strip memory chain by using the intermediate frequency node set includes:
calculating a stored weight value for each intermediate frequency node in the set of intermediate frequency nodes, wherein the calculating of the stored weight value comprises:
obtaining a storage efficiency value and a safety coefficient of an intermediate frequency node;
normalizing the storage efficiency value and the safety coefficient to obtain a normalization efficiency value and a normalization coefficient;
adding the normalization efficiency value and the normalization coefficient and dividing by 2 to obtain the storage weighting value;
sorting the intermediate frequency node sets according to the stored weighted values to obtain intermediate frequency sorting sets, wherein the intermediate frequency sorting sets are positioned at the leftmost or rightmost side with the highest stored weighted values;
confirming the number of intermediate frequency nodes contained in the strip memory chain, wherein the number of intermediate frequency nodes is greater than or equal to 3, and sequentially selecting intermediate frequency nodes for constructing the strip memory chain from the intermediate frequency node sets according to the number of the contained intermediate frequency nodes, wherein the number of the selected intermediate frequency nodes is the number of the intermediate frequency nodes;
And constructing and obtaining a strip storage chain according to the selected intermediate frequency node, wherein the intermediate frequency node with the highest storage weight value is used as a storage head node of the strip storage chain.
Referring to fig. 3, it is assumed that the number of intermediate frequency nodes included in the stripe memory chain is 4, which means that the intermediate frequency node with the highest memory weight value is selected from the intermediate frequency node set, and the intermediate frequency node with the highest memory weight value is used as the memory head node, that is, the intermediate frequency node with the number 1 in fig. 3 is the memory head node.
It can be understood that each intermediate frequency node in the strip storage chain directly has the sequence of storage, namely the storage head node stores intermediate frequency change data at present, and other intermediate frequency nodes are responsible for functions of auxiliary storage or record storage and the like, so that the efficiency of storing intermediate frequency change data can be improved through labor division cooperation.
In addition, the next step in the embodiment of the present invention is to construct a split storage chain, specifically, the steps of selecting a split center node and a total center node from the high frequency node set, and constructing the split storage chain based on the remaining high frequency nodes include:
calculating a storage weight value of each high-frequency node in the high-frequency node set, and selecting the high-frequency node with the highest storage weight value as a total center node;
Selecting a high-frequency node with a next highest storage weight value as a branch center node;
and taking the branch center node as a control node of the split storage chain, and taking the control node as a core to construct one or more global storage chains and strip-type storage chains, wherein the branch center node, the one or more global storage chains and the strip-type storage chains form the split storage chain.
It should be noted that, the split storage chain is composed of a split center node, one or more global storage chains, and a stripe storage chain, and by way of example, referring to fig. 4, one type of split storage chain is shown in fig. 4, where the split storage chain is composed of 1 split center node, 3 stripe storage chains, and 1 global storage chain. Further, the branch center node is responsible for managing one or more global storage chains and stripe storage chains in the split storage chains, and the total center node is responsible for coordinating the global storage chains, stripe storage chains and the split storage chains, namely when errors occur in storage time series data, storage errors can be rapidly solved through the total center node, for example, when the global storage chains are used for storing low-frequency change data, the global storage chains are suddenly subjected to system upgrading or network speed influence and the like, and other available global storage chains are called through the total center node or the global storage chains are extracted from the split storage chains so as to continuously finish storage of the low-frequency change data.
S4, storing low-frequency change data into a global storage chain, storing intermediate-frequency change data into a stripe storage chain, controlling a split storage chain to receive high-frequency change data by using a split center node, and storing the high-frequency change data into the split storage chain, wherein three storage chains are performed in parallel, and when one storage chain has a storage error, responding to the storage error through a total center node, and replacing the storage chain with the other two storage chains.
It should be explained that, in the embodiment of the present invention, the time series data is divided into low frequency change data, intermediate frequency change data and high frequency change data according to the fluctuation situation with time, and the attention of the time series data to the high frequency change data is higher, that is, according to the importance degree, the high frequency change data is greater than the intermediate frequency change data and greater than the low frequency change data, so the embodiment of the present invention correspondingly constructs a global storage chain, a stripe storage chain and a split storage chain, where the split storage chain is used for storing the high frequency change data, the stripe storage chain is used for storing the intermediate frequency change data, the global storage chain is used for storing the low frequency change data, in detail, the low frequency change data is stored in the global storage chain, the intermediate frequency change data is stored in the stripe storage chain, and the split storage chain is controlled by using a split center node to receive the high frequency change data, and the high frequency change data is stored in the split storage chain, including:
Dividing the low-frequency change data into a plurality of parts simultaneously to obtain low-frequency data sets, wherein the number of the low-frequency data sets is the same as the number of low-frequency nodes included in the global storage chain;
sequentially storing each low-frequency data to a corresponding low-frequency node in a global storage chain;
storing the intermediate frequency change data to a storage head node of a strip storage chain, and recording the storage process of the intermediate frequency change data by utilizing an intermediate frequency node adjacent to the storage head node;
when the storage head node successfully stores the intermediate frequency change data, copying the stored intermediate frequency change data by utilizing other intermediate frequency nodes which are not adjacent to the storage head node in the strip storage chain;
and confirming the data quantity of the high-frequency change data by using the split center node, and storing the high-frequency change data into the split storage chain by using a storage mode after confirming the storage mode of storing the high-frequency change data into the split storage chain according to the structure of the split storage chain and the data quantity of the high-frequency change data.
For example, if the number of low-frequency nodes included in the global storage chain is 20, correspondingly, the low-frequency change data is divided into 20 parts at the same time, and a halving mode can be adopted, or the low-frequency change data can be split according to the corresponding relation of the security systems and the storage efficiency values of the 20 low-frequency nodes.
In addition, because the importance of the intermediate frequency change data is relatively high, when the intermediate frequency change data is stored by using the storage head node, the embodiment of the invention can simultaneously record the storage process by using other intermediate frequency nodes and copy the stored intermediate frequency change data, thereby preventing the intermediate frequency change data from being lost or tampered.
The split storage chain comprises a global storage chain and a strip storage chain, and the global storage chain and the strip storage chain can be coordinated through the split center node, so that the storage of the high-frequency change data is completed. It should be explained that the storage modes of the split storage chains are various, for example, a plurality of global storage chains and stripe storage chains exist in the split storage chains, but because the data size of the high-frequency change data is smaller, only 2 groups of global storage chains can be started, the high-frequency change data is repeatedly stored in the global storage chains, 1 group of stripe storage chains are started, and the intermediate frequency nodes in the 1 group of stripe storage chains are utilized to record the storage process of the high-frequency change data stored in the 2 groups of global storage chains and copy the high-frequency change data which is successfully stored.
In addition, it should be explained that all three storage chains are performed in parallel, and when one storage chain has a storage error, the storage error is responded through the total central node, and other two storage chains are utilized to replace the storage chain with the error, so that the storage efficiency is improved, and meanwhile, the risk of data leakage or tampering caused by data storage is reduced.
And S5, after the storage is completed, encrypting the low-frequency change data, the medium-frequency change data and the high-frequency change data stored in the global storage chain, the strip storage chain and the split storage chain, generating a public key and a private key, transmitting the public key to the sub-center node, and transmitting the private key to the total center node.
It should be understood that, in the embodiment of the present invention, different encryption manners are adopted to encrypt the low-frequency change data, the intermediate-frequency change data and the high-frequency change data stored in the global storage chain, the stripe storage chain and the split storage chain, where the encryption algorithm adopted by the low-frequency change data has a low encryption complexity, the encryption complexity of the intermediate-frequency change data is relatively high, the encryption complexity of the high-frequency change data is highest, different public keys and different private keys are generated by different change data, and in order to facilitate management, the embodiment of the present invention sends the public keys to the split center node, and the private keys are sent to the total center node, so that the security of the data in the storage process is ensured.
Compared with the background art, the method comprises the following steps: firstly, the invention starts the block chain storage system firstly, receives the time sequence data input by a user, calculates a time fluctuation threshold set of the time sequence data, segments the time sequence data according to the time fluctuation threshold set to obtain low-frequency change data, medium-frequency change data and high-frequency change data, and needs to explain the fluctuation condition of the time sequence data with the most attention along with time change, namely, compared with the time sequence data which is stable and does not have volatility, the higher the data value and the importance of the time sequence data with great volatility are, therefore, after the invention acquires the time sequence data, the block chain node is not directly selected for storing the time sequence data, but the time fluctuation threshold is divided into the low-frequency change data, the medium-frequency change data and the high-frequency change data according to the time fluctuation threshold of the time sequence data, thereby being convenient for constructing a storage chain with a corresponding relation. Then, a global storage chain, a stripe storage chain and a split storage chain are constructed in the blockchain storage system, and a split center node and a total center node are confirmed, obviously, the global storage chain is used for storing low-frequency change data, the stripe storage chain is used for storing medium-frequency change data, and the split storage chain is used for storing high-frequency change data, in detail, the low-frequency change data is stored in the global storage chain, the medium-frequency change data is stored in the stripe storage chain, and the split storage chain is controlled by the split center node to receive the high-frequency change data and store the high-frequency change data in the split storage chain, wherein three storage chains are all performed in parallel, when one storage chain has a storage error, the total center node responds to the storage error, and the other two storage chains are utilized to replace the storage chain with the error, different storage chains can store different time sequence data, and because of different internal structures of the different storage chains are different, the storage time sequence data is more specific, and furthermore, the storage time of the data storage is shortened, and in addition, the storage time of the data storage is further shortened by the three storage chains, when one storage chain has a storage error and the other storage chains have a plurality of storage error, and the storage chains are coordinated, and the storage chains have a storage error. Therefore, the method and the device for enhancing the data tamper resistance under the blockchain system node can select the proper blockchain node to store the data, thereby shortening the storage time and further reducing the possibility of tampering the data in the storage process.
Example 2:
FIG. 5 is a functional block diagram of a data tamper resistant device under a reinforced blockchain system node according to an embodiment of the invention.
The data tamper resistant device 100 under the reinforced blockchain system node of the present invention can be installed in an electronic device. The data tamper resistant device 100 under the enhanced blockchain system node may include a time series calculation module 101, a time series data segmentation module 102, a storage chain construction module 103, a storage execution module 104, and an encryption module 105 according to the implemented functions. The module of the invention, which may also be referred to as a unit, refers to a series of computer program segments, which are stored in the memory of the electronic device, capable of being executed by the processor of the electronic device and of performing a fixed function.
The time sequence calculating module 101 is configured to start the blockchain storage system, receive time sequence data input by a user, and calculate a time fluctuation threshold set of the time sequence data;
the time series data segmentation module 102 is configured to segment the time series data according to the time fluctuation threshold set, and obtain low-frequency change data, medium-frequency change data, and high-frequency change data;
The storage chain construction module 103 is configured to construct a global storage chain, a stripe storage chain and a split storage chain in the blockchain storage system, and confirm a split center node and a total center node;
the storage execution module 104 is configured to store low-frequency change data into a global storage chain, intermediate-frequency change data into a stripe storage chain, control the split storage chain to receive high-frequency change data by using a split center node, and store the high-frequency change data into the split storage chain, where three storage chains are all performed in parallel, and when one storage chain has a storage error, respond to the storage error through the total center node, and replace the storage chain with the other two storage chains;
the encryption module 105 is configured to encrypt the low-frequency change data, the intermediate-frequency change data, and the high-frequency change data stored in the global storage chain, the stripe storage chain, and the split storage chain after the storage is completed, generate a public key and a private key, send the public key to the split center node, and send the private key to the total center node.
In detail, the modules in the data tamper resistant device 100 under the enhanced blockchain system node in the embodiment of the present invention use the same technical means as the data tamper resistant method under the enhanced blockchain system node described in fig. 1, and can produce the same technical effects, which are not described herein.
Example 3:
fig. 6 is a schematic structural diagram of an electronic device for implementing a method for enhancing data tamper resistance under a blockchain system node according to an embodiment of the present invention.
The electronic device 1 may comprise a processor 10, a memory 11, a bus 12 and a communication interface 13, and may further comprise a computer program stored in the memory 11 and executable on the processor 10, such as a data tamper resistant program under an enhanced blockchain system node.
The memory 11 includes at least one type of readable storage medium, including flash memory, a mobile hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device 1, such as a removable hard disk of the electronic device 1. The memory 11 may in other embodiments also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the electronic device 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device 1. The memory 11 may be used not only for storing application software installed in the electronic device 1 and various types of data, such as codes of a data tamper-proof program under the enhanced blockchain system node, but also for temporarily storing data that has been output or is to be output.
The processor 10 may be comprised of integrated circuits in some embodiments, for example, a single packaged integrated circuit, or may be comprised of multiple integrated circuits packaged with the same or different functions, including one or more central processing units (Central Processing unit, CPU), microprocessors, digital processing chips, graphics processors, combinations of various control chips, and the like. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the entire electronic device using various interfaces and lines, executes or executes programs or modules (e.g., a data tamper-proof program under an enhanced blockchain system node, etc.) stored in the memory 11, and invokes data stored in the memory 11 to perform various functions of the electronic device 1 and process data.
The bus may be a peripheral component interconnect standard (peripheral component interconnect, PCI) bus or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. The bus is arranged to enable a connection communication between the memory 11 and at least one processor 10 etc.
Fig. 6 shows only an electronic device with components, it being understood by a person skilled in the art that the structure shown in fig. 6 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than shown, or may combine certain components, or may be arranged in different components.
For example, although not shown, the electronic device 1 may further include a power source (such as a battery) for supplying power to each component, and preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management, and the like are implemented through the power management device. The power supply may also include one or more of any of a direct current or alternating current power supply, recharging device, power failure detection circuit, power converter or inverter, power status indicator, etc. The electronic device 1 may further include various sensors, bluetooth modules, wi-Fi modules, etc., which will not be described herein.
Further, the electronic device 1 may also comprise a network interface, optionally the network interface may comprise a wired interface and/or a wireless interface (e.g. WI-FI interface, bluetooth interface, etc.), typically used for establishing a communication connection between the electronic device 1 and other electronic devices.
The electronic device 1 may optionally further comprise a user interface, which may be a Display, an input unit, such as a Keyboard (Keyboard), or a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like. The display may also be referred to as a display screen or display unit, as appropriate, for displaying information processed in the electronic device 1 and for displaying a visual user interface.
It should be understood that the embodiments described are for illustrative purposes only and are not limited to this configuration in the scope of the patent application.
The data tamper resistant program under the enhanced blockchain system node stored by the memory 11 in the electronic device 1 is a combination of a plurality of instructions, which when executed in the processor 10, can implement:
starting a block chain storage system, receiving time series data input by a user, and calculating a time fluctuation threshold set of the time series data;
dividing the time sequence data according to the time fluctuation threshold set to obtain low-frequency change data, medium-frequency change data and high-frequency change data;
Constructing a global storage chain, a strip storage chain and a split storage chain in a block chain storage system, and confirming a split center node and a total center node;
storing low-frequency change data into a global storage chain, storing intermediate-frequency change data into a stripe storage chain, controlling a split storage chain to receive high-frequency change data by using a split center node, and storing high-frequency change data into the split storage chain, wherein three storage chains are performed in parallel, and when one storage chain has a storage error, responding to the storage error by using a total center node, and replacing the storage chain with the error by using the other two storage chains;
and after the storage is completed, encrypting the low-frequency change data, the medium-frequency change data and the high-frequency change data stored in the global storage chain, the strip storage chain and the split storage chain, generating a public key and a private key, transmitting the public key to the split center node, and transmitting the private key to the total center node.
Specifically, the specific implementation method of the above instruction by the processor 10 may refer to descriptions of related steps in the corresponding embodiments of fig. 1 to 2, which are not repeated herein.
Further, the modules/units integrated in the electronic device 1 may be stored in a computer readable storage medium if implemented in the form of software functional units and sold or used as separate products. The computer readable storage medium may be volatile or nonvolatile. For example, the computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM).
The present invention also provides a computer readable storage medium storing a computer program which, when executed by a processor of an electronic device, can implement:
starting a block chain storage system, receiving time series data input by a user, and calculating a time fluctuation threshold set of the time series data;
dividing the time sequence data according to the time fluctuation threshold set to obtain low-frequency change data, medium-frequency change data and high-frequency change data;
constructing a global storage chain, a strip storage chain and a split storage chain in a block chain storage system, and confirming a split center node and a total center node;
storing low-frequency change data into a global storage chain, storing intermediate-frequency change data into a stripe storage chain, controlling a split storage chain to receive high-frequency change data by using a split center node, and storing high-frequency change data into the split storage chain, wherein three storage chains are performed in parallel, and when one storage chain has a storage error, responding to the storage error by using a total center node, and replacing the storage chain with the error by using the other two storage chains;
and after the storage is completed, encrypting the low-frequency change data, the medium-frequency change data and the high-frequency change data stored in the global storage chain, the strip storage chain and the split storage chain, generating a public key and a private key, transmitting the public key to the split center node, and transmitting the private key to the total center node.
In the several embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be other manners of division when actually implemented.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention.

Claims (9)

1. A method of enhancing tamper resistance of data under a blockchain system node, the method comprising:
starting a block chain storage system, receiving time series data input by a user, and calculating a time fluctuation threshold set of the time series data;
dividing the time sequence data according to the time fluctuation threshold set to obtain low-frequency change data, medium-frequency change data and high-frequency change data;
constructing a global storage chain, a strip storage chain and a split storage chain in a block chain storage system, and confirming a split center node and a total center node;
storing low-frequency change data into a global storage chain, storing intermediate-frequency change data into a stripe storage chain, controlling a split storage chain to receive high-frequency change data by using a split center node, and storing high-frequency change data into the split storage chain, wherein three storage chains are performed in parallel, and when one storage chain has a storage error, responding to the storage error by using a total center node, and replacing the storage chain with the error by using the other two storage chains;
After the storage is completed, encrypting the low-frequency change data, the medium-frequency change data and the high-frequency change data stored in the global storage chain, the strip storage chain and the split storage chain to generate a public key and a private key, transmitting the public key to the split center node, and transmitting the private key to the total center node;
the calculating a time fluctuation threshold set of time series data includes:
sequencing the time sequence data according to the sequence of time variation to obtain time sequence data;
sequentially extracting time adjacent data from the time sequence data to obtain adjacent time data;
receiving a time-varying window value, and acquiring one or more groups of adjacent time data according to the time-varying window value;
calculating a time fluctuation threshold value according to one or more groups of adjacent time data under each window value;
summarizing the time fluctuation threshold value under each window value to obtain a time fluctuation threshold value set;
the obtaining the low-frequency change data, the medium-frequency change data and the high-frequency change data includes:
setting a low-frequency change threshold, an intermediate-frequency change threshold and a high-frequency change threshold, when the time fluctuation threshold is smaller than or equal to the low-frequency change threshold, confirming the corresponding time series data as low-frequency change data, when the time fluctuation threshold is between the low-frequency change threshold and the intermediate-frequency change threshold, confirming the time series data as intermediate-frequency change data, and the like, and when the time fluctuation threshold is higher than the high-frequency change threshold, confirming the time series data as high-frequency change data;
The construction of the global storage chain, the strip storage chain and the partition storage chain in the block chain storage system comprises the following steps:
selecting all currently available blockchain nodes from a blockchain storage system to obtain an available node set;
dividing all the storage efficiency values according to the proportions of the low-frequency change data, the medium-frequency change data and the high-frequency change data to obtain a low-frequency efficiency value, a medium-frequency efficiency value and a high-frequency efficiency value;
confirming all available nodes belonging to the low-frequency efficiency value as a low-frequency node set, confirming available nodes belonging to the medium-frequency efficiency value as a medium-frequency node set and confirming available nodes belonging to the high-frequency efficiency value as a high-frequency node set;
after all the available node sets are divided into a low-frequency node set, a medium-frequency node set and a high-frequency node set, a global storage chain, a strip storage chain and a split storage chain are sequentially constructed according to the low-frequency node set, the medium-frequency node set and the high-frequency node set;
the global storage chain is chain storage with storage and recording functions and is constructed by low-frequency nodes, the low-frequency nodes directly and completely observe the storage rule of the block chain, and the low-frequency nodes do not interfere with each other but share the storage records at the same time;
the strip-type storage chain is a storage structure presenting a storage chain and is used for storing intermediate frequency change data, the strip-type storage chain is constructed by an intermediate frequency node set, and when the intermediate frequency nodes in the strip-type storage chain store the intermediate frequency change data, a sequential storage rule, namely that the intermediate frequency nodes are coordinated and matched with each other, is adopted, so that the storage of the intermediate frequency change data is completed;
The split storage chain is composed of a split center node, one or more global storage chains and a strip storage chain.
2. The method of claim 1, wherein calculating a time fluctuation threshold based on one or more sets of adjacent time data for each window value comprises:
the time fluctuation threshold is calculated according to the following formula:
wherein,indicate->Time fluctuation threshold under window value, +.>Indicate->Total number of adjacent time data included under window value, +.>Indicate->First->Adjacent time data>Indicate->Within window value->The data generation time of the adjacent time data.
3. The method for enhancing data tamper resistance under blockchain system nodes of claim 1, wherein constructing global storage chains, striped storage chains, and split storage chains in a blockchain storage system and identifying split center nodes and total center nodes comprises:
selecting all currently available blockchain nodes from a blockchain storage system to obtain an available node set;
calculating the storage efficiency value of each available node according to the storage records;
Dividing all the storage efficiency values according to the proportions of the low-frequency change data, the medium-frequency change data and the high-frequency change data to obtain a low-frequency efficiency value, a medium-frequency efficiency value and a high-frequency efficiency value;
confirming all available nodes belonging to the low-frequency efficiency value as a low-frequency node set, confirming available nodes belonging to the medium-frequency efficiency value as a medium-frequency node set and confirming available nodes belonging to the high-frequency efficiency value as a high-frequency node set;
setting the minimum number of low-frequency nodes, constructing a global storage chain from a low-frequency node set according to the minimum number of the low-frequency nodes, constructing a strip storage chain by using an intermediate-frequency node set, and constructing the global storage chain from the low-frequency node set according to the minimum number of the low-frequency nodes, wherein the method comprises the following steps:
receiving the total number of the set global storage chains, sequentially selecting low-frequency nodes from the low-frequency node sets according to the total number of the global storage chains, and constructing and obtaining the global storage chains according to a rule that the total number of the global storage chains is larger than or equal to the minimum number of the low-frequency nodes, wherein the low-frequency nodes in each global storage chain have the functions of storage and recording at the same time, do not interfere with each other, and have the function of non-tampering of the block chains at the same time;
and selecting a branch center node and a total center node from the high-frequency node set, and constructing and obtaining a split storage chain based on the rest high-frequency nodes, wherein the branch center node is responsible for managing the split storage chain, and the total center node is responsible for coordinating the global storage chain, the strip storage chain and the split storage chain.
4. The method of claim 3, wherein selecting all currently available blockchain nodes from the blockchain storage system to obtain the set of available nodes comprises:
acquiring all block chain nodes which are normally operated in a block chain storage system at present, and acquiring a normal node set;
calculating the ratio of the used storage space to the total storage space in each normal node to obtain a storage ratio;
after eliminating normal nodes with the storage duty ratio being greater than or equal to the storage duty ratio threshold, calculating the safety coefficient of the rest normal nodes;
and eliminating normal nodes with the safety coefficient smaller than or equal to the safety threshold value to obtain an available node set.
5. The method of claim 4, wherein the calculating the security coefficients of the remaining normal nodes comprises:
acquiring a storage record of a normal node in history for executing each storage, and extracting the number of storage failures from the storage record;
and calculating a safety coefficient according to the storage failure times, wherein the safety coefficient calculating method comprises the following steps:
wherein,indicate->Security factor of the individual normal node,/ >Indicate->Number of storage failures of normal node, +.>Indicate->Sum of number of storage failures and number of storage successes of each normal node, +.>Indicate->The normal node completes the firstStorage data amount at the time of secondary storage, +.>Indicate->The normal node completes the->Storage time at the time of secondary storage, if +.>The storage time is set to be the storage time when the storage is successful when the storage fails at the time of the storage, and the storage designated value is larger than the storage time when the storage of all normal nodes is successful,>is a weight factor of the safety coefficient.
6. The method for tamper-proofing data under an enhanced blockchain system node of claim 5, wherein selecting split center nodes and total center nodes from the set of high frequency nodes and constructing a split storage chain based on the remaining high frequency nodes comprises:
calculating a storage weight value of each high-frequency node in the high-frequency node set, and selecting the high-frequency node with the highest storage weight value as a total center node;
selecting a high-frequency node with a next highest storage weight value as a branch center node;
and taking the branch center node as a control node of the split storage chain, and taking the control node as a core to construct one or more global storage chains and strip-type storage chains, wherein the branch center node, the one or more global storage chains and the strip-type storage chains form the split storage chain.
7. The method for tamper-proofing data under nodes of an enhanced blockchain system of claim 6, wherein constructing a striped storage chain using a set of intermediate frequency nodes comprises:
calculating a stored weight value for each intermediate frequency node in the set of intermediate frequency nodes, wherein the calculating of the stored weight value comprises:
obtaining a storage efficiency value and a safety coefficient of an intermediate frequency node;
normalizing the storage efficiency value and the safety coefficient to obtain a normalization efficiency value and a normalization coefficient;
adding the normalization efficiency value and the normalization coefficient and dividing by 2 to obtain the storage weighting value;
sorting the intermediate frequency node sets according to the stored weighted values to obtain intermediate frequency sorting sets, wherein the intermediate frequency sorting sets are positioned at the leftmost or rightmost side with the highest stored weighted values;
confirming the number of intermediate frequency nodes contained in the strip memory chain, wherein the number of intermediate frequency nodes is greater than or equal to 3, and sequentially selecting intermediate frequency nodes for constructing the strip memory chain from the intermediate frequency node sets according to the number of the contained intermediate frequency nodes, wherein the number of the selected intermediate frequency nodes is the number of the intermediate frequency nodes;
and constructing and obtaining a strip storage chain according to the selected intermediate frequency node, wherein the intermediate frequency node with the highest storage weight value is used as a storage head node of the strip storage chain.
8. The method for tamper-proofing data under an enhanced blockchain system node of claim 7, wherein storing the low frequency variation data into a global storage chain, the intermediate frequency variation data into a stripe storage chain, and controlling the split storage chain to receive the high frequency variation data and store the high frequency variation data into the split storage chain with the split center node comprises:
dividing the low-frequency change data into a plurality of parts simultaneously to obtain low-frequency data sets, wherein the number of the low-frequency data sets is the same as the number of low-frequency nodes included in the global storage chain;
sequentially storing each low-frequency data to a corresponding low-frequency node in a global storage chain;
storing the intermediate frequency change data to a storage head node of a strip storage chain, and recording the storage process of the intermediate frequency change data by utilizing an intermediate frequency node adjacent to the storage head node;
when the storage head node successfully stores the intermediate frequency change data, copying the stored intermediate frequency change data by utilizing other intermediate frequency nodes which are not adjacent to the storage head node in the strip storage chain;
and confirming the data quantity of the high-frequency change data by using the split center node, and storing the high-frequency change data into the split storage chain by using a storage mode after confirming the storage mode of storing the high-frequency change data into the split storage chain according to the structure of the split storage chain and the data quantity of the high-frequency change data.
9. A data tamper resistant apparatus under a reinforced blockchain system node, the apparatus comprising:
the time sequence calculating module is used for starting the block chain storage system, receiving time sequence data input by a user and calculating a time fluctuation threshold set of the time sequence data;
the time sequence data segmentation module is used for segmenting the time sequence data according to the time fluctuation threshold set to obtain low-frequency change data, medium-frequency change data and high-frequency change data;
the storage chain construction module is used for constructing a global storage chain, a strip storage chain and a split storage chain in the block chain storage system and confirming a split center node and a total center node;
the storage execution module is used for storing low-frequency change data into the global storage chain, medium-frequency change data into the strip-type storage chain, controlling the split storage chain to receive high-frequency change data by utilizing the split center node, and storing the high-frequency change data into the split storage chain, wherein three storage chains are all performed in parallel, and when one storage chain has a storage error, the storage error is responded through the total center node, and the other two storage chains are utilized to replace the storage chain with the error;
The encryption module is used for encrypting the low-frequency change data, the medium-frequency change data and the high-frequency change data stored in the global storage chain, the strip storage chain and the split storage chain after the storage is completed, generating a public key and a private key, transmitting the public key to the sub-center node, and transmitting the private key to the total center node;
the calculating a time fluctuation threshold set of time series data includes:
sequencing the time sequence data according to the sequence of time variation to obtain time sequence data;
sequentially extracting time adjacent data from the time sequence data to obtain adjacent time data;
receiving a time-varying window value, and acquiring one or more groups of adjacent time data according to the time-varying window value;
calculating a time fluctuation threshold value according to one or more groups of adjacent time data under each window value;
summarizing the time fluctuation threshold value under each window value to obtain a time fluctuation threshold value set;
the obtaining the low-frequency change data, the medium-frequency change data and the high-frequency change data includes:
setting a low-frequency change threshold, an intermediate-frequency change threshold and a high-frequency change threshold, when the time fluctuation threshold is smaller than or equal to the low-frequency change threshold, confirming the corresponding time series data as low-frequency change data, when the time fluctuation threshold is between the low-frequency change threshold and the intermediate-frequency change threshold, confirming the time series data as intermediate-frequency change data, and the like, and when the time fluctuation threshold is higher than the high-frequency change threshold, confirming the time series data as high-frequency change data;
The construction of the global storage chain, the strip storage chain and the partition storage chain in the block chain storage system comprises the following steps:
selecting all currently available blockchain nodes from a blockchain storage system to obtain an available node set;
dividing all the storage efficiency values according to the proportions of the low-frequency change data, the medium-frequency change data and the high-frequency change data to obtain a low-frequency efficiency value, a medium-frequency efficiency value and a high-frequency efficiency value;
confirming all available nodes belonging to the low-frequency efficiency value as a low-frequency node set, confirming available nodes belonging to the medium-frequency efficiency value as a medium-frequency node set and confirming available nodes belonging to the high-frequency efficiency value as a high-frequency node set;
after all the available node sets are divided into a low-frequency node set, a medium-frequency node set and a high-frequency node set, a global storage chain, a strip storage chain and a split storage chain are sequentially constructed according to the low-frequency node set, the medium-frequency node set and the high-frequency node set;
the global storage chain is chain storage with storage and recording functions and is constructed by low-frequency nodes, the low-frequency nodes directly and completely observe the storage rule of the block chain, and the low-frequency nodes do not interfere with each other but share the storage records at the same time;
the strip-type storage chain is a storage structure presenting a storage chain and is used for storing intermediate frequency change data, the strip-type storage chain is constructed by an intermediate frequency node set, and when the intermediate frequency nodes in the strip-type storage chain store the intermediate frequency change data, a sequential storage rule, namely that the intermediate frequency nodes are coordinated and matched with each other, is adopted, so that the storage of the intermediate frequency change data is completed;
The split storage chain is composed of a split center node, one or more global storage chains and a strip storage chain.
CN202311141973.2A 2023-09-06 2023-09-06 Data tamper-proof method and device under reinforced block chain system node Active CN116881980B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311141973.2A CN116881980B (en) 2023-09-06 2023-09-06 Data tamper-proof method and device under reinforced block chain system node

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311141973.2A CN116881980B (en) 2023-09-06 2023-09-06 Data tamper-proof method and device under reinforced block chain system node

Publications (2)

Publication Number Publication Date
CN116881980A CN116881980A (en) 2023-10-13
CN116881980B true CN116881980B (en) 2023-11-21

Family

ID=88271964

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311141973.2A Active CN116881980B (en) 2023-09-06 2023-09-06 Data tamper-proof method and device under reinforced block chain system node

Country Status (1)

Country Link
CN (1) CN116881980B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107623569A (en) * 2017-09-30 2018-01-23 矩阵元技术(深圳)有限公司 Block chain key escrow and restoration methods, device based on Secret sharing techniques
CN110300155A (en) * 2019-05-31 2019-10-01 中国人民解放军国防科技大学 Cognitive Internet of Things spectrum data sharing method based on block chain
CN111047316A (en) * 2019-12-02 2020-04-21 上海金桥信息股份有限公司 Tamper-resistant intelligent block chain system and implementation method
US11301462B1 (en) * 2020-03-31 2022-04-12 Amazon Technologies, Inc. Real-time data validation using lagging replica databases
CN114676444A (en) * 2022-03-24 2022-06-28 广州大师明信息服务有限公司 Block chain-based storage system
CN114741447A (en) * 2022-03-28 2022-07-12 国网北京市电力公司 Distributed energy station data processing method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107623569A (en) * 2017-09-30 2018-01-23 矩阵元技术(深圳)有限公司 Block chain key escrow and restoration methods, device based on Secret sharing techniques
CN110300155A (en) * 2019-05-31 2019-10-01 中国人民解放军国防科技大学 Cognitive Internet of Things spectrum data sharing method based on block chain
CN111047316A (en) * 2019-12-02 2020-04-21 上海金桥信息股份有限公司 Tamper-resistant intelligent block chain system and implementation method
US11301462B1 (en) * 2020-03-31 2022-04-12 Amazon Technologies, Inc. Real-time data validation using lagging replica databases
CN114676444A (en) * 2022-03-24 2022-06-28 广州大师明信息服务有限公司 Block chain-based storage system
CN114741447A (en) * 2022-03-28 2022-07-12 国网北京市电力公司 Distributed energy station data processing method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
区块链模型、技术与典型应用探究;刘硕;胡泽文;李玉平;;情报工程(06);全文 *

Also Published As

Publication number Publication date
CN116881980A (en) 2023-10-13

Similar Documents

Publication Publication Date Title
CN110084377B (en) Method and device for constructing decision tree
CN110852374B (en) Data detection method, device, electronic equipment and storage medium
CN111950621B (en) Target data detection method, device, equipment and medium based on artificial intelligence
CN111343212B (en) Message processing method, device, equipment and storage medium
CN114826553A (en) Cloud storage data security protection method and device based on group signature and homomorphic encryption
CN114881616A (en) Business process execution method and device, electronic equipment and storage medium
CN117193975A (en) Task scheduling method, device, equipment and storage medium
CN112116275A (en) Automatic matching method and device for home service
CN115409439A (en) Multi-vehicle type supply chain scheduling method based on improved ant colony algorithm and electronic equipment
CN111985545B (en) Target data detection method, device, equipment and medium based on artificial intelligence
CN111694844A (en) Enterprise operation data analysis method and device based on configuration algorithm and electronic equipment
CN112948275A (en) Test data generation method, device, equipment and storage medium
CN114547696A (en) File desensitization method and device, electronic equipment and storage medium
CN112330332B (en) Methods, computing devices, and media for identifying fraud risk with respect to node tasks
CN113360321A (en) Micro-service retry calling method and device, electronic equipment and storage medium
CN116881980B (en) Data tamper-proof method and device under reinforced block chain system node
CN112217639A (en) Data encryption sharing method and device, electronic equipment and computer storage medium
CN114817408B (en) Scheduling resource identification method and device, electronic equipment and storage medium
CN116975884A (en) Data security storage method and device
CN115687384A (en) UUID (user identifier) identification generation method, device, equipment and storage medium
CN112257078B (en) Block chain encryption and decryption service security trusted system based on TEE technology
CN115048458A (en) Block chain-based data processing method, apparatus, device, medium, and program product
CN114490137A (en) Service data real-time statistical method and device, electronic equipment and readable storage medium
CN112819625A (en) Parallel chain arbitration consensus method, computer device and storage medium
CN115511486A (en) Transaction processing method, device, medium and electronic equipment

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