Disclosure of Invention
Therefore, the invention provides a data transmission method based on a block chain, which is used for overcoming the problem that the safety and the reliability of data transmission in the block chain in the prior art are insufficient.
In order to achieve the above object, the present invention provides a data transmission method based on a block chain, including: s1, a data acquisition module acquires data and sends the acquired data to a block chain platform after the data acquisition is finished; s2, the block chain platform encrypts data according to the received data to generate a first encryption key and sends the generated first encryption key to the user side; s3, the user side encrypts data according to the received first encryption key to obtain first encrypted data and sends the first encrypted data to a plurality of corresponding block chain data target nodes; s4, when the block chain transmits data, the central control module identifies the actual data capacity according to the data acquired by the data acquisition module and adjusts the data monitoring frequency to a corresponding value according to the actual data capacity, and the central control module preliminarily determines whether to adjust the actual risk value of data leakage according to the actual data transmission speed reaching the target node and the actual data block capacity and adjusts the actual risk value of data leakage to the corresponding value according to the difference value between the actual data transmission speed and the preset data transmission speed when the determination is finished; and S5, when the first target node receives the data, the central control module judges whether second encrypted data is added to the first target node or not according to the regulated data leakage actual risk value, adjusts the encryption range of the second encrypted data to a corresponding value according to the difference value between the regulated data leakage actual risk value and a preset data leakage risk value when the judgment is finished, and secondarily adjusts the data monitoring frequency to the corresponding value according to the difference value between the actual distance between the first target node and the second target node and the preset node distance when the central control module finishes the adjustment of the encryption range of the second encrypted data.
Further, the central control module adjusts the data monitoring frequency according to the actual capacity E of the data block acquired by the data acquisition module, the central control module is provided with a preset first data block capacity E1 and a preset second data block capacity E2, wherein E1 is less than E2,
if E is less than or equal to E1, the central control module judges that the actual capacity of the data block is within an allowable range;
if E1 is larger than E and is smaller than or equal to E2, the actual capacity of the central control module data block exceeds an allowable range, the difference value delta E between the actual capacity of the data block and the capacity of a preset first data block is calculated, the data monitoring frequency is adjusted according to delta E, and delta E = E-E1 is set;
and if E is larger than E2, the central control module judges that the actual capacity of the data block exceeds the allowable range, monitors the waiting time of the receiving end and judges whether to suspend data transmission according to the waiting time.
Further, when the central control module finishes the judgment of whether the data monitoring frequency is adjusted and the actual capacity E of the data block acquired by the data acquisition module meets the condition that E1 is more than E and less than or equal to E2, the central control module adjusts the data monitoring frequency according to the difference Delta E between the actual capacity of the data block and the capacity of the preset data block, the central control module is provided with a preset first data block capacity difference Delta E1, a preset second data block capacity Delta E2, a preset first data monitoring frequency adjusting coefficient alpha 1, a preset second data monitoring frequency adjusting coefficient alpha 2 and a preset data monitoring frequency F0, wherein Delta E1 is less than Delta E2, and 1 is more than alpha 1 and less than alpha 2,
if the delta E is less than or equal to the delta E1, the central control module judges that the data monitoring frequency is not adjusted;
if the delta E1 is less than the delta E and less than or equal to the delta E2, the central control module judges that the data monitoring frequency is adjusted by using alpha 1;
if delta E > -delta E2, the central control module judges that alpha 2 is used for adjusting the data monitoring frequency;
when the central control module uses α i to adjust the data monitoring frequency, i =1,2 is set, and the adjusted data monitoring frequency is recorded as F ', and F' = F0 × α i is set.
Further, when the central control module completes the adjustment of the data monitoring frequency and the data reaches the first target node, the central control module preliminarily determines whether to adjust the actual risk value of data leakage according to the actual data transmission speed reaching the target node and the actual data block capacity, the central control module is provided with a preset data transmission speed V0,
if V is less than or equal to V0 and E is more than E1, the central control module judges that the actual data transmission speed exceeds the allowable range, calculates the difference value delta V between the actual data transmission speed and the preset data transmission speed, adjusts the actual data leakage risk value to a corresponding value according to the delta V, and sets delta V = V0-V;
and if V is greater than V0 and E is less than or equal to E1, the central control module judges that the actual data transmission speed is within the allowable range and does not adjust the actual data leakage risk value.
Further, when the central control module finishes the determination of whether the data leakage risk exists, the actual transmission speed V of the data meets V not more than V0 and the actual capacity E of the data block meets E & gt E1, the central control module adjusts the preset data leakage risk value to a corresponding value according to the difference between the actual data transmission speed and the preset data transmission speed, the central control module is provided with a preset first data transmission speed difference value delta V1, a preset second data transmission speed difference value delta V2, a preset first data leakage risk value adjusting coefficient beta 1, a preset second data leakage risk value adjusting coefficient beta 2 and a preset data leakage risk value S0, wherein delta V1 is less than delta V2, and beta 1 is less than beta 1 and less than beta 2,
if the delta V is less than or equal to the delta V1, the central control module judges that the actual risk value of data leakage is not adjusted;
if delta V1 is less than delta V and less than or equal to delta V2, the central control module judges that the data leakage actual risk value is adjusted by using beta 1;
if delta V is > -delta V2, the central control module judges that the data leakage actual risk value is adjusted by using beta 2;
when the central control module uses β j to adjust the data leakage actual risk value, j =1,2 is set, and the adjusted data leakage actual risk value is recorded as S ', and S' = S0 × (2 + β j)/3 is set.
Further, when the first target node receives the data, the central control module determines whether to add second encrypted data to the first target node according to the adjusted data leakage actual risk value, where the second encrypted data includes: the actual transmission speed from the user side to the first target node, the transmission speed of the preset data, the actual capacity of the data block, the adjusted actual risk value of data leakage and the distance from the first target node to the second target node, the central control module is provided with a preset first risk value S1 of data leakage and a preset second risk value S2 of data leakage, wherein S1 is less than S2,
if S' is less than or equal to S1, the central control module judges that second encrypted data are not added to the first target node;
if S1 is larger than S ' and smaller than or equal to S2, the central control module judges that second encrypted data are added to the first target node, calculates a difference value deltaS ' between the adjusted data leakage actual risk value and a preset data leakage risk value, and adjusts the encryption range of the second encrypted data to a corresponding value according to deltaS ';
if S' is greater than S2, the central control module judges whether second encrypted data is added to the first target node and judges whether to carry out secondary adjustment on the data monitoring frequency according to the actual distance between the first target node and the second target node.
Further, when the central control module finishes the determination of whether to add the second encrypted data to the first target node, the central control module adjusts the encryption range of the second encrypted data to a corresponding value according to the difference between the adjusted data leakage actual risk value and the preset data leakage risk value, the central control module is provided with a first data leakage actual risk value difference Δ S1', a preset second data leakage risk value difference Δ S2', a preset first encryption range adjustment coefficient γ 1, a preset encryption range adjustment coefficient γ 2 and a preset second encrypted data encryption range R0, wherein Δ S1 '<Δs2',1 < γ 2,
if the delta S 'is less than or equal to the delta S1', the central control module judges that the encryption range of the second encrypted data is not adjusted;
if the delta S1' is less than the delta S ' and less than or equal to the delta S2', the central control module judges that the second encryption data encryption range is adjusted by using gamma 1;
if delta S '> [ delta S2', the central control module judges that gamma 2 is used for adjusting the encryption range of the second encrypted data;
when the central control module adjusts the second encrypted data encryption range by using γ k, setting k =1,2, and setting R '= R0 × (1 + γ k)/2, where the adjusted second encrypted data encryption range is denoted as R'.
Further, when the central control module finishes adjusting the encryption range of the second encrypted data, the central control module judges whether the block chain server fails according to the difference value between the adjusted actual risk value of data leakage and the preset risk value of data leakage, the central control module is provided with a preset maximum risk value difference value delta Smax',
if the delta S 'is less than or equal to the delta Smax', the central control module judges that the block chain server has no fault;
and if the delta S '> [ delta ] Smax', the central control module judges that the block chain server has a fault and sends out a maintenance notice.
Further, when the central control module completes the adjustment of the encryption range of the second encrypted data, the central control module judges whether to perform secondary adjustment on the data monitoring frequency according to the actual distance D between the first target node and the second target node of the data, the central control module is provided with a preset node distance D0,
if D is less than or equal to D0, the central control module judges that the data monitoring frequency is not adjusted for the second time;
if D is larger than D0, the central control module judges that the actual distance between the first target node and the second target node exceeds an allowable range, calculates the difference value delta D between the actual distance and the distance of the preset node, adjusts the data monitoring frequency to a corresponding value according to delta D, and sets delta D = D-D1.
Further, when the central control module finishes the determination of whether to perform the secondary adjustment on the data monitoring frequency, the central control module performs the secondary adjustment on the data monitoring frequency according to the difference between the actual distance between the first target node and the second target node and the distance between the preset nodes, and the central control module is provided with a preset first node distance difference delta D1, a preset second node distance difference delta D2, a preset third data monitoring frequency adjustment coefficient alpha 3 and a preset fourth data monitoring frequency adjustment coefficient alpha 4, wherein delta D1 is smaller than delta D2,1 is larger than alpha 3 and smaller than alpha 4 and is smaller than alpha 1 and smaller than alpha 2,
if the delta D is less than or equal to the delta D1, the central control module judges that the data monitoring frequency after the first adjustment is not adjusted;
if delta D1 is less than delta D and less than or equal to delta D2, the central control module uses alpha 3 to carry out secondary adjustment on the data monitoring frequency;
if DeltaD > DeltaD2, the central control module judges that alpha 4 is used for carrying out secondary adjustment on the data monitoring frequency;
when the central control module adjusts the data monitoring frequency by using α i, i =3,4, the adjusted data monitoring frequency is recorded as F ", and F" = F' × α i is set.
Compared with the prior art, the method has the advantages that by setting the preset data block capacity, the preset data monitoring frequency, the preset data transmission speed, the preset data leakage risk value and the preset node distance, the monitoring frequency of the data can be adjusted through the preset data block capacity set by the central control module before the data are transmitted in the block chain, the monitoring capability of stealing the data in the data transmission process is improved by adjusting the data monitoring frequency, the data transmission safety is improved, when the data are transmitted in the block chain, the leakage risk value of the data is correspondingly adjusted through the preset data transmission speed set by the central control module and the actual transmission speed of the data, when the first target node receives the data, the central control module secondarily adjusts the data monitoring frequency according to the distance between the first target node and the second target node, the transmission safety of the data in the block chain is improved, and the safety and the reliability of the data transmission in the block chain are improved.
Furthermore, the method of the invention can adjust the data monitoring frequency according to the size of the data block acquired by the data acquisition module by setting the capacity of the preset first data block and the capacity of the preset second data block, thereby improving the safety monitoring capability of data in the data transmission process and further realizing the improvement of the safety and reliability of data transmission in the block chain.
Furthermore, the method of the invention can adjust the data monitoring frequency according to the difference between the actual capacity of the data block and the capacity of the preset data block by setting the preset first data block capacity difference, the preset second data block capacity, the preset first data monitoring frequency adjustment coefficient, the preset second data monitoring frequency and the preset data monitoring frequency, thereby realizing the improvement of the data monitoring range, the monitoring capability of the stolen risk of the large-capacity data in the transmission process, and further realizing the improvement of the safety and the reliability of the data transmission in the block chain.
Furthermore, by setting the preset data transmission speed, the method of the invention can preliminarily judge whether to adjust the risk value of data leakage according to the actual data transmission speed reaching the target node and the actual data block capacity, thereby improving the accurate adjustment capability of the data leakage risk and further improving the safety and reliability of data transmission in the block chain.
Furthermore, the method of the invention can adjust the actual risk value of data leakage to the corresponding value according to the difference between the actual data transmission speed and the preset data transmission speed by setting the preset first data transmission speed difference, the preset second data transmission speed difference, the preset first data leakage risk value adjustment coefficient, the preset second data leakage risk value adjustment coefficient and the preset data leakage risk, thereby improving the accurate adjustment capability of the data leakage risk, realizing the accurate safety monitoring of the data transmission process and further realizing the improvement of the safety and the reliability of the data transmission in the block chain.
Furthermore, the method of the invention can judge whether to add the second encrypted data to the first target node according to the adjusted actual risk value of data leakage by setting the preset first data leakage risk value and the preset second data leakage risk value, thereby realizing the judgment of whether to add the second encrypted data in the process of receiving data by the first target node and further realizing the improvement of the safety and reliability of data transmission in the block chain.
Furthermore, the method of the present invention sets a preset first data leakage risk value difference value, a preset second data leakage risk value difference value, a preset first encryption range adjustment coefficient, a preset encryption range adjustment coefficient, and a preset second encryption data encryption range, and can adjust the encryption range of the second encryption data to a corresponding value according to the difference between the adjusted actual data leakage risk value and the preset data leakage risk value, thereby improving the precise adjustment capability of the encryption range of the second encryption data, improving the transmission security from the first target node to the second target node, and further improving the security and reliability of data transmission in the block chain.
Furthermore, the method of the invention can judge whether the block chain server fails according to the difference between the adjusted actual risk value of data leakage and the preset actual risk value of data leakage by setting the difference between the preset maximum actual risk value of data leakage, thereby improving the identification capability of the failure and further realizing the improvement of the safety and reliability of data transmission in the block chain.
Furthermore, the method of the invention can judge whether to adjust the data monitoring frequency for the second time according to the actual distance between the first target node and the second target node of the data by setting the preset node distance, thereby realizing the improvement of the safety of data transmission from the first target node to the second target node and further realizing the improvement of the safety and reliability of data transmission in the block chain.
Furthermore, the method of the invention can carry out secondary adjustment on the data monitoring frequency according to the difference between the actual distance between the first target node and the second target node and the distance between the preset nodes by setting the preset first node distance difference, the preset second node distance difference, the preset three-data monitoring frequency adjustment coefficient and the preset fourth data monitoring frequency adjustment coefficient, thereby further improving the data transmission safety and further realizing the improvement on the safety and the reliability of data transmission in the block chain.
Detailed Description
In order that the objects and advantages of the invention will be more clearly understood, the invention is further described in conjunction with the following examples; it should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
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 only for explaining the technical principle of the present invention, and do not limit the scope of the present invention.
Referring to fig. 1, fig. 2, fig. 3 and fig. 4, which are a flowchart of a data transmission method based on a block chain, a specific flowchart of step S4, a specific flowchart of step S5 and a specific flowchart of step S3 according to an embodiment of the present invention, respectively, the data transmission method based on a block chain according to the present invention includes:
s1, a data acquisition module acquires data and sends the acquired data to a block chain platform after the data acquisition is finished;
s2, the block chain platform encrypts data according to the received data to generate a first encryption key and sends the generated first encryption key to the user side;
s3, the user side encrypts data according to the received first encryption key to obtain first encrypted data and sends the first encrypted data to a plurality of corresponding block chain data target nodes;
s4, when the block chain transmits data, the central control module identifies the actual capacity of the data according to the data acquired by the data acquisition module and adjusts the data monitoring frequency to a corresponding value according to the actual capacity of the data, and the central control module preliminarily judges whether to adjust the actual risk value of data leakage according to the actual transmission speed of the data reaching the target node and the actual capacity of the data block and adjusts the actual risk value of data leakage to the corresponding value according to the difference value of the actual transmission speed of the data and the preset data transmission speed when the judgment is finished;
and S5, when the first target node receives the data, the central control module judges whether second encrypted data is added to the first target node or not according to the regulated data leakage actual risk value, adjusts the encryption range of the second encrypted data to a corresponding value according to the difference value between the regulated data leakage actual risk value and a preset data leakage risk value when the judgment is finished, and secondarily adjusts the data monitoring frequency to the corresponding value according to the difference value between the actual distance between the first target node and the second target node and the preset node distance when the central control module finishes the adjustment of the encryption range of the second encrypted data.
The method can adjust the monitoring frequency of the data through the preset data block capacity set by the central control module before the data are transmitted in the block chain by setting the preset data block capacity, the preset data monitoring frequency, the preset data transmission speed, the preset data leakage risk value and the preset node distance, improves the monitoring capability of stealing the data in the data transmission process by adjusting the data monitoring frequency, improves the safety of data transmission, correspondingly adjusts the leakage risk value of the data through the preset data transmission speed set by the central control module and the actual transmission speed of the data when the data are transmitted in the block chain, and improves the safety of the data transmission in the block chain by adjusting the data monitoring frequency secondarily by the central control module according to the distance between the first target node and the second target node when the first target node receives the data, thereby improving the safety and the reliability of the data transmission in the block chain.
Referring to fig. 1, the central control module adjusts the data monitoring frequency according to the actual capacity E of the data block acquired by the data acquisition module, and the central control module has a preset first data block capacity E1 and a preset second data block capacity E2, where E1 is less than E2,
if E is less than or equal to E1, the central control module judges that the actual capacity of the data block is within an allowable range;
if E1 is larger than E and is smaller than or equal to E2, the actual capacity of the central control module data block exceeds an allowable range, the difference value delta E between the actual capacity of the data block and the capacity of a preset first data block is calculated, the data monitoring frequency is adjusted according to delta E, and delta E = E-E1 is set;
and if E is larger than E2, the central control module judges that the actual capacity of the data block exceeds the allowable range, monitors the waiting time of the receiving end and judges whether to suspend data transmission according to the waiting time.
According to the method, the preset first data block capacity and the preset second data block capacity are set, so that the data monitoring frequency can be adjusted according to the size of the data block acquired by the data acquisition module, the safety monitoring capability of data in the data transmission process is improved, and the safety and the reliability of data transmission in a block chain are further improved.
As shown in fig. 1, when the central control module finishes the determination of whether to adjust the data monitoring frequency and the actual capacity E of the data block acquired by the data acquisition module satisfies E1 < E ≦ E2, the central control module adjusts the data monitoring frequency according to the difference Δ E between the actual capacity of the data block and the capacity of the preset data block, and the central control module is provided with a preset first data block capacity difference Δ E1, a preset second data block capacity Δ E2, a preset first data monitoring frequency adjustment coefficient α 1, a preset second data monitoring frequency adjustment coefficient α 2, and a preset data monitoring frequency F0, where Δ E1 is less than Δ E2,1 < α 2,
if the delta E is less than or equal to the delta E1, the central control module judges that the data monitoring frequency is not adjusted;
if the delta E1 is less than the delta E and less than or equal to the delta E2, the central control module judges that the data monitoring frequency is adjusted by using alpha 1;
if delta E is > -delta E2, the central control module judges that alpha 2 is used for adjusting the data monitoring frequency;
when the central control module uses α i to adjust the data monitoring frequency, i =1,2 is set, and the adjusted data monitoring frequency is recorded as F ', and F' = F0 × α i is set.
According to the method, the difference value of the capacity of the preset first data block, the capacity of the preset second data block, the regulation coefficient of the preset first data monitoring frequency, the preset second data monitoring frequency and the preset data monitoring frequency are set, so that the data monitoring frequency can be regulated according to the difference value of the actual capacity of the data block and the capacity of the preset data block, the improvement of the data monitoring range is realized, the monitoring capability of the stolen risk of the large-capacity data in the transmission process is realized, and the safety and the reliability of data transmission in a block chain are further improved.
Referring to fig. 1 and fig. 2, when the central control module completes the adjustment of the data monitoring frequency and the data reaches the first target node, the central control module preliminarily determines whether to adjust the risk value of data leakage according to the actual data transmission speed reaching the target node and the actual data block capacity, the central control module is provided with a preset data transmission speed V0,
if V is less than or equal to V0 and E is more than E1, the central control module judges that the actual data transmission speed exceeds the allowable range, calculates the difference value delta V between the actual data transmission speed and the preset data transmission speed, adjusts the actual data leakage risk value to a corresponding value according to the delta V, and sets delta V = V0-V;
and if V is greater than V0 and E is less than or equal to E1, the central control module judges that the actual data transmission speed is within the allowable range and does not adjust the actual data leakage risk value.
According to the method, whether the risk value of data leakage exists can be preliminarily judged according to the actual data transmission speed of the target node and the actual data block capacity by setting the preset data transmission speed, so that the accurate regulation capability of the data leakage risk is improved, and the safety and the reliability of data transmission in a block chain are further improved.
As shown in fig. 2, when the central control module completes the determination of whether there is a data leakage risk, and the actual transmission speed V of the data satisfies V ≦ V0 and the actual capacity E of the data block satisfies E > E1, the central control module adjusts the actual data leakage risk value to a corresponding value according to the difference between the actual data transmission speed and the preset data transmission speed, and the central control module is provided with a preset first data transmission speed difference Δ V1, a preset second data transmission speed difference Δ V2, a preset first data leakage risk value adjustment coefficient β 1, a preset second data leakage risk value adjustment coefficient β 2, and a preset data leakage risk S0, where Δ V1 is less than Δ V2, and 1 is less than β 1 and less than β 2,
if the delta V is less than or equal to the delta V1, the central control module judges that the actual risk value of data leakage is not adjusted;
if delta V1 is less than delta V and less than or equal to delta V2, the central control module judges that the data leakage actual risk value is adjusted by using beta 1;
if delta V is > -delta V2, the central control module judges that the data leakage actual risk value is adjusted by using beta 2;
when the central control module uses β j to adjust the data leakage actual risk value, j =1,2 is set, and the adjusted data leakage actual risk value is recorded as S ', and S' = S0 × (2 + β j)/3 is set.
According to the method, the difference value of the data transmission speed is preset, the difference value of the second data transmission speed is preset, the adjustment coefficient of the first data leakage risk value is preset, the adjustment coefficient of the second data leakage risk value is preset, and the preset data leakage risk is set, so that the actual data leakage risk value can be adjusted to the corresponding value according to the difference value of the actual data transmission speed and the preset data transmission speed, the accurate adjustment capability of the data leakage risk is improved, the accurate safety monitoring of the data transmission process is realized, and the safety and the reliability of data transmission in a block chain are further improved.
As shown in fig. 3, when the first target node receives the data, the central control module determines whether to add second encrypted data to the first target node according to the adjusted actual risk value of data leakage, where the second encrypted data includes: the actual transmission speed from the user side to the first target node, the transmission speed of the preset data, the actual capacity of the data block, the adjusted actual risk value of data leakage and the distance from the first target node to the second target node, the central control module is provided with a preset first risk value S1 of data leakage and a preset second risk value S2 of data leakage, wherein S1 is less than S2,
if S' is less than or equal to S1, the central control module judges that second encrypted data are not added to the first target node;
if S1 is larger than S ' and smaller than or equal to S2, the central control module judges that second encrypted data are added to the first target node, calculates a difference value deltaS ' between the adjusted data leakage actual risk value and a preset data leakage risk value, and adjusts the encryption range of the second encrypted data to a corresponding value according to deltaS ';
if S' is greater than S2, the central control module judges whether second encrypted data is added to the first target node and judges whether to carry out secondary adjustment on the data monitoring frequency according to the actual distance between the first target node and the second target node.
According to the method, the preset first data leakage risk value and the preset second data leakage risk value are set, whether the second encrypted data is added to the first target node or not can be judged according to the adjusted data leakage actual risk value, the judgment of whether the second encrypted data is added or not in the data receiving process of the first target node is achieved, and the safety and the reliability of data transmission in the block chain are further improved.
As shown in fig. 3, when the central control module determines whether to add the second encrypted data to the first target node, the central control module adjusts the encryption range of the second encrypted data to a corresponding value according to the difference between the adjusted actual risk value of the data leakage and the preset data leakage risk value, and the central control module is provided with a first actual risk value difference Δ S1', a preset second data leakage risk value difference Δ S2', a preset first encryption range adjustment coefficient γ 1, a preset encryption range adjustment coefficient γ 2, and a preset second encryption data encryption range R0, where Δ S1 '<Δs2',1 < γ 2,
if the delta S 'is less than or equal to the delta S1', the central control module judges that the encryption range of the second encrypted data is not adjusted;
if the delta S1' is less than the delta S ' and less than or equal to the delta S2', the central control module judges that the second encryption data encryption range is adjusted by using gamma 1;
if delta S '> [ delta S2', the central control module judges that gamma 2 is used for adjusting the encryption range of the second encrypted data;
when the central control module adjusts the second encryption data encryption range by using γ k, setting k =1,2, and setting R '= R0 × (1 + γ k)/2, where the adjusted second encryption data encryption range is denoted as R'.
According to the method, the preset first data leakage risk value difference value, the preset second data leakage risk value difference value, the preset first encryption range adjusting coefficient, the preset encryption range adjusting coefficient and the preset second encryption data encryption range are set, the encryption range of the second encryption data can be adjusted to a corresponding value according to the difference value between the adjusted data leakage actual risk value and the preset data leakage risk value, the accurate adjustment capacity of the encryption range of the second encryption data is improved, the transmission safety of the first target node to the second target node is improved, and the safety and the reliability of data transmission in a block chain are further improved.
Referring to fig. 1, when the central control module completes the adjustment of the encryption range of the second encrypted data, the central control module determines whether the blockchain server fails according to the difference between the adjusted actual risk value of data leakage and the preset risk value of data leakage, the central control module has a preset maximum risk value difference Δ Smax',
if the delta S 'is less than or equal to the delta Smax', the central control module judges that the block chain server does not have a fault;
and if the delta S '> [ delta ] Smax', the central control module judges that the block chain server has a fault and sends out a maintenance notice.
According to the method, whether the block chain server fails or not can be judged according to the difference value between the adjusted actual risk value of data leakage and the preset risk value of data leakage by setting the preset maximum risk value difference value, so that the fault identification capability is improved, and the safety and reliability of data transmission in the block chain are further improved.
Referring to fig. 1, when the central control module completes the adjustment of the encryption range of the second encrypted data, the central control module determines whether to perform the secondary adjustment on the data monitoring frequency according to the actual distance D between the first target node and the second target node, the central control module is provided with a preset node distance D0,
if D is less than or equal to D0, the central control module judges that the data monitoring frequency is not subjected to secondary adjustment;
if D is larger than D0, the central control module judges that the actual distance between the first target node and the second target node exceeds an allowable range, calculates the difference value delta D between the actual distance and the distance of the preset node, adjusts the data monitoring frequency to a corresponding value according to delta D, and sets delta D = D-D1.
According to the method, whether the data monitoring frequency is adjusted for the second time or not can be judged according to the actual distance between the first target node and the second target node of the data by setting the preset node distance, so that the safety of data transmission from the first target node to the second target node is improved, and the safety and the reliability of data transmission in a block chain are further improved.
Referring to fig. 3, when the central control module completes the determination of whether to perform the secondary adjustment on the data monitoring frequency, the central control module performs the secondary adjustment on the data monitoring frequency according to the difference between the actual distance between the first target node and the second target node and the preset node distance, and the central control module is provided with a preset first node distance difference Δ D1, a preset second node distance difference Δ D2, a preset third data monitoring frequency adjustment coefficient α 3, and a preset fourth data monitoring frequency adjustment coefficient α 4, wherein Δ D1 is smaller than Δ D2,1 < α 3 < α 4 < α 1 < α 2,
if the delta D is less than or equal to the delta D1, the central control module judges that the data monitoring frequency after the first adjustment is not adjusted;
if delta D1 is less than delta D and less than or equal to delta D2, the central control module uses alpha 3 to carry out secondary adjustment on the data monitoring frequency;
if DeltaD > DeltaD2, the central control module judges that alpha 4 is used for carrying out secondary adjustment on the data monitoring frequency;
when the central control module adjusts the data monitoring frequency by using α i, i =3,4 is set, the adjusted data monitoring frequency is recorded as F ", and F" = F' × α i is set.
According to the method, the data monitoring frequency can be secondarily adjusted according to the difference between the actual distance between the first target node and the second target node and the distance between the preset nodes by setting the preset first node distance difference, the preset second node distance difference, the preset third data monitoring frequency adjusting coefficient and the preset fourth data monitoring frequency adjusting coefficient, so that the further improvement of the data transmission safety is improved, and the improvement of the safety and the reliability of data transmission in a block chain is further realized.
Example 1
In the data transmission method based on the block chain according to the embodiment of the present invention, when the central control module completes the determination of whether to adjust the data monitoring frequency, the central control module adjusts the monitoring frequency of data transmission according to the difference Δ E between the capacity of the actual data block and the capacity of the preset data block, and the central control module is provided with a preset first data block capacity difference Δ E1, a preset second data block capacity difference Δ E2, a preset first data monitoring frequency adjustment coefficient α 1, a preset second data monitoring frequency α 2, and a preset data monitoring frequency F0, where Δ E1=15G, Δ E2=20G, α 1=1.1, α 2=1.2, and F0=2Hz,
in this embodiment, the central control module determines Δ E =18G, and at this time, the central control module determines Δ E1 to be smaller than Δ E and equal to Δ E2, and adjusts the data monitoring frequency by using α 1, and the adjusted data monitoring frequency is recorded as F ', and F' =2Hz × 1.1=2.2Hz is set.
According to the method provided by the embodiment of the invention, the monitoring frequency of data transmission can be adjusted by setting the preset first data block capacity difference value, the preset second data block capacity, the preset first data monitoring frequency adjustment coefficient, the preset second data monitoring frequency and the preset data monitoring frequency, so that the improvement of the data monitoring range is realized, the monitoring capability of the stolen risk of large-capacity data in the transmission process is realized, and the safety and the reliability of data transmission in a block chain are further improved.
So far, the technical solutions of the present invention have 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 the present invention is obviously not limited to these specific embodiments. Equivalent changes or substitutions of related technical features can be made by those skilled in the art without departing from the principle of the invention, and the technical scheme after the changes or substitutions can fall into the protection scope of the invention.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention; various modifications and alterations to this invention will become apparent to those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.