Data integrity verification method and system based on block chain
Technical Field
The present invention relates to the field of blockchain technologies, and in particular, to a blockchain-based data integrity verification method and system.
Background
The blockchain is a chain structure formed by combining data blocks in a sequential connection mode according to time sequence, and is a distributed account book which is not tamperable and not counterfeitable and ensured in a cryptographic mode. The node information of the blockchain is commonly maintained by participants of all blockchains, so all information on the blockchain is publicly transparent, and once issued, the information is permanently reserved and cannot be tampered with. The public verification and non-tampering characteristics of the blockchain can be used as a trusted third party to solve the user concern in the cloud computing environment, and all results can be issued into the blockchain and authenticated and maintained by all users of the blockchain. Therefore, the blockchain is combined to the cloud computing field, the defects of the cloud computing environment are overcome by utilizing the advantages of the blockchain, and the guarantee can be provided for the data security of the user more effectively.
Chinese patent publication No. CN113553627a. The method comprises the steps of receiving real-time integrity information sent by a user side, generating the real-time integrity information by cloud storage data based on preset data processing rules, and searching whether original integrity information consistent with the real-time integrity information exists in a blockchain network or not to obtain a searching result. The integrity information of the original data is stored in the block chain network, and the data integrity verification is carried out in the block chain network, so that the integrity information of the original data is not tampered and deleted, and the reliability of the data integrity verification is improved. It can be seen that the blockchain-based data integrity verification method, system, device and medium have the following problems that the accuracy and verification efficiency of data integrity verification are low.
Disclosure of Invention
Therefore, the invention provides a data integrity verification method and system based on a blockchain, which are used for solving the problems of low accuracy and low verification efficiency of data integrity verification in the prior art.
In order to achieve the above object, the present invention provides a data integrity verification method based on blockchain, including:
the method comprises the steps of S1, before the integrity verification of data starts, controlling a user terminal to carry out blocking operation on the data by a central control module and transmitting all data blocks which are completed by the data blocking to an encryption module, S2, when the encryption module completes receiving all the data blocks, controlling the encryption module to encrypt each data block respectively and transmitting the encrypted data blocks to a server by the central control module, S3, when the server receives the data blocks transmitted by the encryption module, controlling the server to carry out decryption operation on all the data blocks, searching whether data information which is the same as data information transmitted by the user terminal exists in a block chain according to the decrypted data, transmitting the data information to the data integrity verification module, and detecting the transmission rate of the data in the process of transmitting the data to the data integrity verification module by the user terminal, S4, when the uploading time of the data information reaches the preset transmission time, carrying out primary judgment on the transmission condition of the system according to the data integrity of the data integrity verification module, carrying out secondary judgment on the data integrity of the system according to the data integrity of the data integrity verification module, carrying out primary judgment on the data integrity of the system according to the data integrity of the data transmission condition, carrying out secondary judgment on the data integrity judgment of the data integrity verification after the data transmission condition is further carrying out delay control and further judging on the data integrity judgment on the data transmission condition.
Further, in the step S4, when the data integrity verification module receives the data transmitted from the user terminal, the central control module determines the data transmission condition of the system according to the actual integrity S of the data received by the data integrity verification module, where the central control module is provided with a preset first preset integrity S1, a second preset integrity S2 and a third preset integrity S3, where S1< S2< S3,
If S is less than or equal to S1, the central control module preliminarily judges that the system is intercepted and carries out reverse tracking on equipment for intercepting data;
If S1 is less than or equal to S2, the central control module preliminarily judges that the data transmission is bad and controls the data transmission rate detection device to detect the data transmission rate;
If S2 is less than or equal to S3, the central control module preliminarily judges that data transmission is incomplete and delay detection is needed, and calculates a difference delta S between the actual integrity and the preset integrity and determines the delay detection duration according to delta S;
if S > S3, the central control module judges that the data integrity is qualified and the data transmission is normal.
Further, when S is less than or equal to S1, the central control module determines the intercepted address of the system according to whether the data transmission rate in the period generates abrupt change, the central control module is provided with a preset first data transmission rate abrupt change value P1 and a preset second data transmission rate abrupt change value P2, wherein P1 is less than P2,
If P is less than or equal to P1, the central control module judges that the actual data transmission rate mutation value is in the allowable range and does not determine the address corresponding to the transmission rate mutation value;
if P1< P is less than or equal to P2, the central control module determines that the actual data transmission rate mutation value exceeds the allowable range, calculates a difference Δp between the actual data transmission rate mutation value and a preset first data transmission rate mutation value, further determines whether interception exists according to Δp, and sets Δp=p-P1;
If P > P2, the central control module judges that the actual data transmission rate mutation value exceeds the allowable range, determines the address corresponding to the mutation value as the intercepted address of the system and sends the address to the server for storage.
Further, the central control module further judges whether interception exists according to a difference value delta P between an actual data transmission rate mutation value and a preset data transmission rate mutation value when P1< P is less than or equal to P2, the central control module is provided with a preset first data transmission rate mutation value difference value delta P1 and a preset second data transmission rate mutation value delta P2, wherein delta P1< [ delta ] P2,
If delta P is less than or equal to delta P1, the central control module judges that the difference value between the actual data transmission rate mutation value and the preset data transmission rate mutation value is within the allowable range and judges that the address corresponding to the transmission rate mutation value is not determined;
If delta P1 is less than or equal to delta P2, the central control module judges that the difference value between the actual data transmission rate mutation value and the preset data transmission rate mutation value is in an allowable range and sends an address corresponding to the transmission rate mutation value to a server as a storage address;
If delta P > -delta P2, the central control module judges that the difference value between the actual data transmission rate mutation value and the preset data transmission rate mutation value exceeds the allowable range, determines the address corresponding to the mutation value as the intercepted address of the system, and sends the address to the server for storage.
Further, the central control module further judges the data transmission condition according to the actual data transmission rate detected by the actual transmission rate detection device when S1< S2, wherein the central control module is provided with a preset first transmission rate Q1 and a preset second transmission rate Q2, Q1< Q2,
If Q is less than or equal to Q1, the central control module judges that the network environment is congested and sends out a poor transmission alarm;
If Q1 is less than or equal to Q2, the central control module judges that the data transmission is bad, detects the server load and judges whether to delay the task simultaneously carried out in the server load according to the load;
and if Q is more than Q2, the central control module judges that the data transmission rate is qualified and the data is intercepted.
Further, when Q1< Q2 is determined, the central control module controls the load detection device to detect whether the load quantity simultaneously transmitted by the server delays the data transmission task which is simultaneously performed or not to determine, the central control module is provided with a preset first transmission load quantity D1 and a preset second transmission load quantity D2, wherein D1< D2,
If D is less than or equal to D1, the central control module judges that the actual transmission load is lower than the allowable range and increases the number of the transmitted data blocks;
if D1 is less than or equal to D2, the central control module judges that the actual transmission load is within the allowable range and does not delay the data transmission task which is transmitted simultaneously;
And if D > D2, the central control module judges that the actual transmission load exceeds the allowable range and defers the data transmission task transmitted simultaneously.
Further, when S2< S3 > is determined, the central control module determines the delay time according to the difference DeltaS between the actual integrity of the data received by the data integrity verification module and the preset integrity, deltaS=S3-S is set, the central control module is provided with a preset first preset integrity difference DeltaS 1 and a second preset integrity difference DeltaS 2, the first preset delay time t1 and the second preset delay time t2, deltaS 1< DeltaS2, t1< t2,
If 0< [ delta ] S is less than or equal to [ delta ] S1, the central control module judges that the data receiving delay t1 duration detection is performed by the verification module;
If delta S1 is less than or equal to delta S2, the central control module judges that the data receiving delay time t2 is long and then detects the data;
And if the data transmission rate is delta S > -delta S2, the central control module judges that the data transmission is bad and carries out secondary detection on the data transmission rate.
Further, after the delay t1, the central control module controls the data integrity detection program to re-detect the data integrity S',
If S' > S3, the central control module judges that the data is not intercepted and does not carry out inverse tracking on the data;
and if S' is less than or equal to S3, the central control module judges that the data is intercepted and carries out reverse tracking.
Further, after the delay t2, the central control module controls the data integrity detection program to re-detect the data integrity S 'and further determine whether the data is intercepted according to the difference between S' and S3,
If S' > S3, the central control module judges that the data has poor transmission and sends out a data transmission problem alarm;
if S '. Ltoreq.s3, calculating Δs', setting Δs '=s3-S';
if 0< [ delta ] S is less than or equal to [ delta ] S1, the central control module judges the time length of the re-delay t1 and detects the data transmission rate Q to judge whether the situation of poor data transmission exists;
If delta S1 is less than or equal to delta S2, the central control module judges that the data is intercepted and sends out a data intercepted alarm;
and if the data transmission is blocked, the central control module judges the data transmission is blocked and sends out a data transmission problem alarm.
A blockchain-based data integrity verification system, comprising:
The user terminal is used for performing blocking operation and data encryption operation on the data and sending the data after the data blocking and encryption to the server;
The encryption module is connected with the user terminal and is used for encrypting the data block transmitted by the user terminal;
The server is connected with the encryption module and is used for receiving the data encryption information transmitted by the encryption module and decrypting the data encryption confidence, searching whether the data information which is the same as the data information transmitted by the user terminal exists in the blockchain according to the decrypted data after the decryption of the information is completed and transmitting the data information to the data integrity verification module;
And the data integrity verification module is connected with the server and is used for verifying the integrity of the data transmitted by the user terminal according to the data information received by the server.
Compared with the prior art, the method has the advantages that the preset data integrity, the preset data transmission rate mutation value and the preset integrity difference value are set, the transmission condition of the system can be primarily judged according to the actual data integrity, the data transmission condition of the system can be further judged according to the data transmission rate detected by the data transmission rate detection device, the time length of delay transmission detection can be adjusted according to the difference value of the actual data integrity and the preset data integrity, the accuracy of data integrity verification, the accurate monitoring of the data transmission rate of the data integrity verification and the efficiency of the data integrity verification are improved, and the accuracy and the verification efficiency of the data integrity verification are improved.
Furthermore, the method can judge the data transmission condition of the system according to the actual integrity by setting the preset first preset integrity, the second preset integrity and the third preset integrity, thereby improving the accurate judgment of the data integrity verification and further realizing the improvement of the accuracy and the verification efficiency of the data integrity verification.
Furthermore, the method can determine the intercepted address suffered by the system according to whether the data transmission rate in the period is suddenly changed by setting the preset first data transmission rate suddenly changed value and the preset second data transmission rate suddenly changed value, thereby improving the supervision capability of the data transmission process and further realizing the improvement of the accuracy and the verification efficiency of the data integrity verification.
Further, by setting the preset first data transmission rate mutation value difference value and the preset second data transmission rate mutation value difference value, the method can further judge whether interception exists according to the difference delta P between the actual data transmission rate mutation value and the preset data transmission rate mutation value, improves the accurate identification capability of whether interception exists in the data transmission process, and further improves the accuracy and the verification efficiency of data integrity verification.
Further, according to the method, the data transmission condition can be further judged according to the actual data transmission rate detected by the actual transmission rate detection device by setting the preset first transmission rate and the preset second transmission rate, so that the accurate judgment capability for data transmission is improved, and the accuracy and the verification efficiency of data integrity verification are further improved.
Further, by setting the preset first transmission load amount and the preset second transmission load amount, the method can judge whether the detected load amounts transmitted simultaneously delay the data transmission tasks which are simultaneously carried out or not, improves the accurate adjustment capability of the data transmission tasks, and further realizes the improvement of the accuracy and the verification efficiency of the data integrity verification.
Further, according to the method, the delay time length can be determined according to the difference value of the actual integrity and the preset integrity by setting the preset first preset integrity difference value, the second preset integrity difference value, the first preset delay time length t1 and the second preset delay time length, so that the accurate determination of the delay time length is realized, and the accuracy and the verification efficiency of the data integrity verification are further improved.
Further, the method can further judge the data integrity by re-detecting the data integrity after the delay time, thereby improving the deep confirmation capability of the transmission process affecting the data integrity and further realizing the improvement of the accuracy and the verification efficiency of the data integrity verification.
Further, the method of the invention realizes further accurate determination of the data transmission process condition related to the data integrity by controlling the data integrity detection program to re-detect the data integrity and further judging whether the data is intercepted or not, and further realizes improvement of accuracy and verification efficiency of data integrity verification.
The system can verify the data integrity by arranging the user terminal, the server and the data integrity verification module, improves the accuracy of data integrity verification, and further improves the accuracy and the verification efficiency of data integrity verification.
Drawings
FIG. 1 is a flow chart of a blockchain-based data integrity verification method in accordance with an embodiment of the present invention;
FIG. 2 is a system block diagram of a blockchain-based data integrity verification system in accordance with an embodiment of the invention.
Detailed Description
The invention will be further described with reference to examples for the purpose of making the objects and advantages of the invention more apparent, it being understood that the specific examples described herein are given by way of illustration only and are not intended to be limiting.
Preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are merely for explaining the technical principles of the present invention, and are not intended to limit the scope of the present invention.
Referring to fig. 1, a data integrity verification method based on a blockchain includes:
Step S1, before the integrity verification of the data starts, a central control module controls a user terminal to perform partitioning operation on the data and transmits each data block which is subjected to data partitioning to an encryption module;
Step S2, when the encryption module finishes receiving each data block, the central control module controls the encryption module to encrypt each data block respectively, and sends the encrypted data blocks to a server;
Step S3, when the server receives the data blocks transmitted by the encryption module, the central control module controls the server to decrypt each data block, searches whether data information which is the same as the data information transmitted by the user terminal exists in the blockchain according to the decrypted data, transmits the data information to the data integrity verification module, and detects the transmission rate of the data in the process of transmitting the data to the data integrity verification module through the user terminal;
And S4, when the central control module judges that the uploading time of the data information reaches the preset transmission time, the central control module primarily judges the transmission condition of the system according to the integrity of the data actually transmitted to the data integrity verification module, further judges the data transmission condition of the system according to the data transmission rate detected by the data transmission rate detection device, adjusts the time length of delay transmission detection according to the difference value between the actual data integrity and the preset number integrity when the central control module finishes judging the data transmission condition, and controls the verification module to secondarily detect the data integrity and further judges the data transmission condition after the delay time.
The invention can carry out preliminary judgment on the transmission condition of the system according to the actual data integrity by setting the preset data integrity, the preset data transmission rate mutation value and the preset integrity difference value, and further judge the data transmission condition of the system according to the data transmission rate detected by the data transmission rate detection device, and can regulate the time length of delay transmission detection according to the difference value of the actual data integrity and the preset data integrity, thereby improving the accuracy of data integrity verification, the accurate monitoring of the data transmission rate of the data integrity verification and the efficiency of the data integrity verification, and realizing the improvement of the accuracy and the verification efficiency of the data integrity verification.
Specifically, in the step S4, when the data integrity verification module receives the data transmitted from the user terminal, the central control module determines the data transmission condition of the system according to the actual integrity S of the data received by the data integrity verification module, where the central control module is provided with a preset first preset integrity S1, a second preset integrity S2 and a third preset integrity S3, where S1< S2< S3,
If S is less than or equal to S1, the central control module preliminarily judges that the system is intercepted and carries out reverse tracking on equipment for intercepting data;
If S1 is less than or equal to S2, the central control module preliminarily judges that the data transmission is bad and controls the data transmission rate detection device to detect the data transmission rate;
If S2 is less than or equal to S3, the central control module preliminarily judges that data transmission is incomplete and delay detection is needed, and calculates a difference delta S between the actual integrity and the preset integrity and determines the delay detection duration according to delta S;
if S > S3, the central control module judges that the data integrity is qualified and the data transmission is normal.
According to the method, the data transmission condition of the system can be judged according to the actual integrity by setting the preset first preset integrity, the second preset integrity and the third preset integrity, so that the accurate judgment of data integrity verification is improved, and the accuracy and the verification efficiency of data integrity verification are further improved.
Specifically, when S is less than or equal to S1, the central control module determines the intercepted address of the system according to whether the data transmission rate in the period is suddenly changed, the central control module is provided with a preset first data transmission rate suddenly changed value P1 and a preset second data transmission rate suddenly changed value P2, wherein P1 is less than P2,
If P is less than or equal to P1, the central control module judges that the actual data transmission rate mutation value is in the allowable range and does not determine the address corresponding to the transmission rate mutation value;
if P1< P is less than or equal to P2, the central control module determines that the actual data transmission rate mutation value exceeds the allowable range, calculates a difference Δp between the actual data transmission rate mutation value and a preset first data transmission rate mutation value, further determines whether interception exists according to Δp, and sets Δp=p-P1;
If P > P2, the central control module judges that the actual data transmission rate mutation value exceeds the allowable range, determines the address corresponding to the mutation value as the intercepted address of the system and sends the address to the server for storage.
According to the method, the interception address suffered by the system can be determined according to whether the data transmission rate is suddenly changed in a period or not by setting the preset first data transmission rate suddenly changed value and the preset second data transmission rate suddenly changed value, so that the supervision capability of the data transmission process is improved, and the accuracy and the verification efficiency of the data integrity verification are further improved.
Specifically, the central control module further judges whether interception exists according to a difference value delta P between an actual data transmission rate mutation value and a preset data transmission rate mutation value when P1< P is less than or equal to P2, the central control module is provided with a preset first data transmission rate mutation value difference value delta P1 and a preset second data transmission rate mutation value delta P2, wherein delta P1< [ delta ] P2,
If delta P is less than or equal to delta P1, the central control module judges that the difference value between the actual data transmission rate mutation value and the preset data transmission rate mutation value is within the allowable range and judges that the address corresponding to the transmission rate mutation value is not determined;
If delta P1 is less than or equal to delta P2, the central control module judges that the difference value between the actual data transmission rate mutation value and the preset data transmission rate mutation value is in an allowable range and sends an address corresponding to the transmission rate mutation value to a server as a storage address;
If delta P > -delta P2, the central control module judges that the difference value between the actual data transmission rate mutation value and the preset data transmission rate mutation value exceeds the allowable range, determines the address corresponding to the mutation value as the intercepted address of the system, and sends the address to the server for storage.
According to the method, whether interception exists or not can be further judged according to the difference delta P between the actual data transmission rate mutation value and the preset data transmission rate mutation value by setting the preset first data transmission rate mutation value difference and the preset second data transmission rate mutation value difference, so that the accurate recognition capability of whether interception exists in the data transmission process is improved, and the accuracy and the verification efficiency of data integrity verification are further improved.
Specifically, the central control module further judges the data transmission condition according to the actual data transmission rate detected by the actual transmission rate detection device when S1< S2, wherein the central control module is provided with a preset first transmission rate Q1 and a preset second transmission rate Q2, Q1< Q2,
If Q is less than or equal to Q1, the central control module judges that the network environment is congested and sends out a poor transmission alarm;
If Q1 is less than or equal to Q2, the central control module judges that the data transmission is bad, detects the server load and judges whether to delay the task simultaneously carried out in the server load according to the load;
and if Q is more than Q2, the central control module judges that the data transmission rate is qualified and the data is intercepted.
According to the method, the preset first transmission rate and the preset second transmission rate are set, so that the data transmission condition can be further judged according to the actual data transmission rate detected by the actual transmission rate detection device, the accurate judgment capability for data transmission is improved, and the accuracy and the verification efficiency of data integrity verification are further improved.
Specifically, when Q1< Q2 is determined, the central control module controls the load detection device to detect whether the load quantity simultaneously transmitted by the server is delayed to determine the data transmission task simultaneously, the central control module is provided with a preset first transmission load quantity D1 and a preset second transmission load quantity D2, wherein D1< D2,
If D is less than or equal to D1, the central control module judges that the actual transmission load is lower than the allowable range and increases the number of the transmitted data blocks;
if D1 is less than or equal to D2, the central control module judges that the actual transmission load is within the allowable range and does not delay the data transmission task which is transmitted simultaneously;
And if D > D2, the central control module judges that the actual transmission load exceeds the allowable range and defers the data transmission task transmitted simultaneously.
According to the method, the preset first transmission load capacity and the preset second transmission load capacity are set, so that whether the detected load capacity of simultaneous transmission delays the simultaneous data transmission task or not can be judged, the accurate adjustment capacity of the data transmission task is improved, and the accuracy and the verification efficiency of data integrity verification are further improved.
Specifically, when S2< S is less than or equal to S3, the central control module determines the delay time according to the difference DeltaS between the actual integrity of the data received by the data integrity verification module and the preset integrity, and sets DeltaS=S3-S, the central control module is provided with a preset first preset integrity difference DeltaS 1 and a preset second integrity difference DeltaS 2, a first preset delay time t1 and a second preset delay time t2, deltaS 1< DeltaS2, t1< t2,
If 0< [ delta ] S is less than or equal to [ delta ] S1, the central control module judges that the data receiving delay t1 duration detection is performed by the verification module;
If delta S1 is less than or equal to delta S2, the central control module judges that the data receiving delay time t2 is long and then detects the data;
And if the data transmission rate is delta S > -delta S2, the central control module judges that the data transmission is bad and carries out secondary detection on the data transmission rate.
According to the method, the delay time length can be determined according to the difference value between the actual integrity and the preset integrity by setting the preset first preset integrity difference value, the second preset integrity difference value, the first preset delay time length t1 and the second preset delay time length, so that the accurate determination of the delay time length is realized, and the accuracy and the verification efficiency of the data integrity verification are further improved.
Specifically, after the delay t1, the central control module controls the data integrity detection program to re-detect the data integrity S',
If S' > S3, the central control module judges that the data is not intercepted and does not carry out inverse tracking on the data;
and if S' is less than or equal to S3, the central control module judges that the data is intercepted and carries out reverse tracking.
The method can further judge the data integrity by re-detecting the data integrity after the delay time, improves the deep confirmation capability of the transmission process affecting the data integrity, and further realizes the improvement of the accuracy and the verification efficiency of the data integrity verification.
Specifically, after the delay t2, the central control module controls the data integrity detection program to re-detect the data integrity S 'and further determine whether the data is intercepted according to the difference between S' and S3,
If S' > S3, the central control module judges that the data has poor transmission and sends out a data transmission problem alarm;
if S '. Ltoreq.s3, calculating Δs', setting Δs '=s3-S';
if 0< [ delta ] S is less than or equal to [ delta ] S1, the central control module judges the time length of the re-delay t1 and detects the data transmission rate Q to judge whether the situation of poor data transmission exists;
If delta S1 is less than or equal to delta S2, the central control module judges that the data is intercepted and sends out a data intercepted alarm;
and if the data transmission is blocked, the central control module judges the data transmission is blocked and sends out a data transmission problem alarm.
According to the method, the data integrity is re-detected and whether the data is intercepted or not is further judged by controlling the data integrity detection program, so that further accurate determination of the data transmission process condition related to the data integrity is realized, and further improvement of accuracy and verification efficiency of data integrity verification is realized.
Referring to fig. 2, a blockchain-based data integrity verification system includes:
The user terminal is used for performing blocking operation and data encryption operation on the data and sending the data after the data blocking and encryption to the server;
The encryption module is connected with the user terminal and is used for encrypting the data block transmitted by the user terminal;
The server is connected with the encryption module and is used for receiving the data encryption information transmitted by the encryption module and decrypting the data encryption confidence, searching whether the data information which is the same as the data information transmitted by the user terminal exists in the blockchain according to the decrypted data after the decryption of the information is completed and transmitting the data information to the data integrity verification module;
And the data integrity verification module is connected with the server and is used for verifying the integrity of the data transmitted by the user terminal according to the data information received by the server.
The system can verify the data integrity by arranging the user terminal, the server and the data integrity verification module, improves the accuracy of data integrity verification, and further improves the accuracy and the verification efficiency of data integrity verification.
Thus far, the technical solution of the present invention has been described in connection with the preferred embodiments shown in the drawings, but it is easily understood by those skilled in the art that the scope of protection of the present invention is not limited to these specific embodiments. Equivalent modifications and substitutions for related technical features may be made by those skilled in the art without departing from the principles of the present invention, and such modifications and substitutions will be within the scope of the present invention.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, and various modifications and variations of the present invention will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.