Data transmission method and device, equipment and storage medium

By deploying communication nodes in a blockchain network, calculating hash values ​​and encrypting, the problem of slow processing speed of existing encryption algorithms in devices with limited computing resources is solved, and the efficiency of data transmission is achieved.

CN119299079AActive Publication Date: 2025-01-10CHINA MOBILE INTERNET CO LTD +1

Patent Information

Application Number
CN202411675757.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-01-10
Estimated Expiration
2044-11-21

AI Technical Summary

Technical Problem

Existing encryption algorithms are slow to process in devices with limited computing resources, resulting in inefficient data transmission.

Method used

By deploying communication nodes in the blockchain network, calculating the hash value of the data to be transmitted, and encrypting the hash value using public keys and preset encryption algorithms, sending it to communication nodes in different blockchain networks for decryption. Decryption is performed using locally stored private keys and preset decryption algorithms to improve encryption speed and data transmission efficiency.

Benefits of technology

It effectively improves the data encryption speed, improves the data transmission efficiency between blockchain networks, and ensures the rapid completion of data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119299079A_ABST
    Figure CN119299079A_ABST
Patent Text Reader

Abstract

The invention discloses a data transmission method and device, equipment and a storage medium, which are applied to a first communication node, and the specific technical scheme comprises the following steps: obtaining to-be-transmitted data from a block chain node of a block chain network to which the first communication node belongs; calculating a hash value of the data to be transmitted; encrypting the hash value by using the public key and a preset encryption algorithm to obtain encrypted data; and sending the encrypted data to a second communication node, so that the second communication node decrypts the encrypted data by using a locally stored private key and a preset decryption algorithm to obtain a data plaintext, and deploying the second communication node and the first communication node in different block chain networks. Thus, the first communication node is utilized to carry out encryption transmission on the to-be-transmitted data, the data encryption speed can be improved, and the data transmission efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of data transmission, and in particular, relates to a method, device, equipment and storage medium for data transmission. Background Art

[0002] With the development of Internet of Things technology, data in different application fields need to be frequently transmitted and circulated. At present, the secure transmission and storage of data can be achieved based on blockchain technology. Specifically, each blockchain network corresponds to an application field. By establishing a secure communication channel between blockchain networks and encrypting the original data using encryption algorithms, the security of data transmission is guaranteed.

[0003] However, existing encryption algorithms require high computing resources. Therefore, in devices with limited computing resources, it takes a long time for the device to encrypt the original data and the processing speed is slow. Summary of the invention

[0004] The embodiments of the present application provide a method, device, equipment and storage medium for data transmission, which can improve the data encryption speed and thus improve the data transmission efficiency.

[0005] In a first aspect, an embodiment of the present application provides a method for data transmission, which is applied to a first communication node, and the method includes:

[0006] Acquire data to be transmitted from a blockchain node of the blockchain network to which the first communication node belongs;

[0007] Calculating a hash value of the data to be transmitted;

[0008] Encrypting the hash value using a public key and a preset encryption algorithm to obtain encrypted data;

[0009] The encrypted data is sent to a second communication node, so that the second communication node uses a locally stored private key and a preset decryption algorithm to decrypt the encrypted data to obtain plaintext data, and the second communication node and the first communication node are deployed in different blockchain networks.

[0010] In a possible implementation, calculating the hash value of the data to be transmitted includes:

[0011] Using a preset data block algorithm to block the data to be transmitted to obtain multiple data blocks;

[0012] A preset hash algorithm is used to calculate the hash value of each data block.

[0013] In a possible implementation, encrypting the Hash value using a public key and a preset encryption algorithm to obtain encrypted data includes:

[0014] Obtaining an adjustment coefficient, a modulus parameter, and the public key corresponding to the first communication node, wherein the adjustment coefficient is used to indicate the degree of influence of the hash value on the encrypted data;

[0015] The encrypted data is obtained by calculation according to the preset encryption algorithm based on the hash value, the first adjustment coefficient, the first modulus parameter and the public key.

[0016] In a possible implementation, the step of calculating the encrypted data according to the preset encryption algorithm based on the hash value, the adjustment coefficient, the modulus parameter, and the public key includes:

[0017] The encrypted data is calculated according to the following formula:

[0018]

[0019] Wherein, C represents the encrypted data, H(M i ) represents the hash value of the i-th data block, K pub represents the public key, p represents the first modulus parameter, and α represents the first adjustment coefficient.

[0020] In a second aspect, an embodiment of the present application provides a method for data transmission, which is applied to a second communication node, and the method includes:

[0021] Receive encrypted data sent by a first communication node, where the encrypted data is obtained by the first communication node by encrypting a hash value of data to be transmitted using a public key and a preset encryption algorithm, where the data to be transmitted is data obtained by the first communication node from a blockchain node of a blockchain network to which the first communication node belongs, and the first communication node and the second communication node are deployed in different blockchain networks;

[0022] The encrypted data is decrypted using a locally stored private key and a preset decryption algorithm to obtain decrypted data.

[0023] In a possible implementation, the decrypted data includes a hash value and a data plaintext of a data block corresponding to the data to be transmitted; after decrypting the encrypted data using a locally stored private key and a preset decryption algorithm to obtain the decrypted data, the method further includes:

[0024] Divide the data plaintext into blocks according to a preset data block algorithm to obtain multiple data blocks;

[0025] Calculate the target hash value of each data block using a preset hash algorithm;

[0026] Based on the target hash value of each of the data blocks and a preset verification algorithm, a verification score of the decrypted data is calculated, and the verification result is used to verify the decrypted data;

[0027] When the verification score of the decrypted data is within a preset safety range, it is determined that the decrypted data has passed the verification.

[0028] In a possible implementation, the step of calculating the verification score of the decrypted data based on the target hash value of each of the data blocks and a preset verification algorithm includes:

[0029] Obtaining a second adjustment coefficient, a second modulus parameter and the private key;

[0030] The verification score is calculated using the second adjustment coefficient, the second modulo parameter, the target hash value and the private key.

[0031] In a possible implementation, the calculating the verification score by using the second adjustment coefficient, the second modulo parameter, the target hash value, and the private key includes:

[0032] The verification score is calculated according to the following formula:

[0033]

[0034] Wherein, V represents the verification score, H(M i ) represents the hash value of the i-th data block, β represents the second adjustment coefficient, d is the private key, and q is the second modulus parameter.

[0035] In a possible implementation, after calculating the verification score of the decrypted data based on the target hash value of each of the data blocks and a preset verification algorithm, the method further includes:

[0036] Obtaining the encryption time of the first communication node and the verification time of the second communication node;

[0037] Obtaining the total number of communication nodes, the third adjustment parameter, the weight coefficient, and the number of times the communication node verifies the decrypted data;

[0038] Based on the encryption time, the verification time, the total number of communication nodes, the third adjustment parameter, the weight coefficient, and the number of times the communication node verifies the decrypted data, a preset evaluation algorithm is used to calculate an evaluation score for cross-chain communication, and the evaluation score is used to measure the reliability of the encrypted data;

[0039] Determine the target grade range of the evaluation score according to the corresponding relationship between the grade range and the evaluation score;

[0040] The reliability of the encrypted data is determined according to the target level range.

[0041] In a possible implementation, the calculation of the evaluation score of the cross-chain communication using a preset evaluation algorithm based on the encryption time, the verification time, the total number of communication nodes, the third adjustment parameter, the weight coefficient, and the number of times the communication node verifies the decrypted data includes:

[0042] The evaluation score is calculated according to the following formula:

[0043]

[0044] Wherein, R represents the evaluation score, T represents the total duration of the encryption time and the verification time, H(M) represents the hash value of the data block, σ is the third adjustment parameter, N represents the total number of communication nodes, σ i represents the signal strength of the i-th communication node, ω represents the weight coefficient, V i Indicates the number of times the i-th base point verifies the decrypted data.

[0045] In a third aspect, an embodiment of the present application provides a data transmission device, applied to a first communication node, the device comprising:

[0046] An acquisition module, used to acquire data to be transmitted from a blockchain node of the blockchain network to which the first communication node belongs;

[0047] A calculation module, used to calculate the hash value of the data to be transmitted;

[0048] An encryption module, used to encrypt the hash value using a public key and a preset encryption algorithm to obtain encrypted data;

[0049] A sending module is used to send the encrypted data to a second communication node, so that the second communication node uses a locally stored private key and a preset decryption algorithm to decrypt the encrypted data to obtain plaintext data. The second communication node and the first communication node are deployed in different blockchain networks.

[0050] In a fourth aspect, an embodiment of the present application provides a data transmission device, applied to a second communication node, the device comprising:

[0051] A receiving module, configured to receive encrypted data sent by a first communication node, wherein the encrypted data is obtained by the first communication node by encrypting a hash value of data to be transmitted using a public key and a preset encryption algorithm, and the data to be transmitted is data obtained by the first communication node from a blockchain node of a blockchain network to which the first communication node belongs, and the first communication node and the second communication node are deployed in different blockchain networks;

[0052] The decryption module is used to decrypt the encrypted data using a locally stored private key and a preset decryption algorithm to obtain decrypted data.

[0053] In a fifth aspect, an embodiment of the present application provides an electronic device, the device comprising: a processor and a memory storing computer program instructions;

[0054] When the processor executes the computer program instructions, the method for component selection as described in any one of the first aspects is implemented.

[0055] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method for component selection as described in any one of the first aspects is implemented.

[0056] In a seventh aspect, an embodiment of the present application provides a computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the component selection method as described in any one of the first aspects.

[0057] A method, device, equipment and storage medium for data transmission in an embodiment of the present application, after receiving the data to be transmitted sent by the blockchain node in the blockchain network, the first communication node can calculate the hash value, and then encrypt the hash value using the public key and the preset encryption algorithm to obtain the encrypted data. In this way, a communication node, namely the first communication node, is deployed in each blockchain network. The Internet of Things device connected to the blockchain node can send the data to be transmitted to the first communication node, and the first communication node completes the encryption process of the data to be transmitted. Since the computing resources of the first communication node are sufficient, the encryption process of the data to be transmitted can be effectively completed, thereby ensuring the data transmission speed between the blockchain networks and ensuring the data processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0059] Figure 1 It is a flowchart of a data transmission method provided by an embodiment of the present application;

[0060] Figure 2 It is a flowchart of a data encryption method provided in an embodiment of the present application;

[0061] Figure 3It is a flowchart of a data transmission method provided by an embodiment of the present application;

[0062] Figure 4 It is a flowchart of a data verification method provided in an embodiment of the present application;

[0063] Figure 5 It is a flowchart of a method for evaluating encryption effect provided in an embodiment of the present application;

[0064] Figure 6 is an exemplary schematic diagram of a method for constructing a cross-chain communication system provided in an embodiment of the present application;

[0065] Figure 7 It is a structural schematic diagram of a data transmission device provided in an embodiment of the present application;

[0066] Figure 8 is a schematic diagram of the structure of another data transmission device provided in an embodiment of the present application;

[0067] Fig. 9 It is a structural diagram of an electronic device provided by yet another embodiment of the present application. DETAILED DESCRIPTION

[0068] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.

[0069] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0070] At present, in the process of data transmission in the blockchain network, the devices under the blockchain node can encrypt the data to be transmitted locally using encryption algorithms. However, due to the differences in programming languages, consensus mechanisms, and data structures between different blockchain networks, when the devices under the blockchain send data to other blockchain networks, the data exchange process needs to be processed so that the receiving blockchain network can process the received data.

[0071] It should be noted that although blockchain technology provides a guarantee for the security of data transmission, interoperability between different blockchain networks remains a challenge, and there are certain limitations on the flexibility and efficiency of data encryption and exchange.

[0072] In addition, in blockchain networks, high-strength encryption algorithms are usually used to encrypt data. Although this can provide higher security, it will lead to slower device processing speeds and lower data transmission efficiency for devices with limited computing resources.

[0073] In order to solve the problems existing in the prior art, the embodiments of the present application provide a method, apparatus, device and storage medium for data transmission. Figure 1 A method for selecting a component provided in an embodiment of the present application is introduced, such as Figure 1 As shown, the method includes:

[0074] S101. Obtain data to be transmitted from a blockchain node of a blockchain network to which the first communication node belongs.

[0075] Among them, the blockchain node is connected to the hanging device, and the hanging device can be an Internet of Things device. When the hanging device needs to send data across the blockchain, the hanging device can send the data to be transmitted to the corresponding blockchain node, and then the blockchain node sends the data to be transmitted to the communication node in the blockchain network, that is, the first communication node. The first communication node is used to realize communication with communication nodes in other blockchain networks, specifically to realize encryption of data to be transmitted in the blockchain network, and decryption of encrypted data received from other blockchain networks.

[0076] S102: Calculate the hash value of the data to be transmitted.

[0077] S103: Encrypt the hash value using the public key and a preset encryption algorithm to obtain encrypted data.

[0078] S104. Send the encrypted data to the second communication node, so that the second communication node uses the locally stored private key and a preset decryption algorithm to decrypt the encrypted data to obtain plaintext data. The second communication node and the first communication node are deployed in different blockchain networks.

[0079] It can be understood that the second communication node pre-generates a key pair for data encryption and decryption, sends the public key in the key pair to communication nodes in other blockchain networks, and stores the private key for decryption locally.

[0080] Specifically, the second communication node can send the public key to other blockchain networks in the form of broadcasting. The communication nodes in other blockchain networks store the correspondence between the public key and the communication node identifier. When the first communication node needs to send data to be transmitted, it obtains the identifier of the destination communication node according to the destination communication node of the data to be transmitted, and obtains the corresponding public key.

[0081] By adopting the above method, after receiving the data to be transmitted sent by the blockchain node in the blockchain network, the first communication node can calculate the hash value, and then encrypt the hash value using the public key and the preset encryption algorithm to obtain the encrypted data. In this way, a communication node, namely the first communication node, is deployed in each blockchain network. The IoT device connected to the blockchain node can send the data to be transmitted to the first communication node, and the first communication node completes the encryption process of the data to be transmitted. Since the computing resources of the first communication node are sufficient, the encryption process of the data to be transmitted can be effectively completed, thereby ensuring the data transmission speed between the blockchain networks and ensuring the data processing efficiency.

[0082] Regarding the above S102, calculating the hash value of the data to be transmitted can be specifically implemented as follows:

[0083] A preset data block algorithm is used to block the data to be transmitted to obtain multiple data blocks; a preset hash algorithm is used to calculate the hash value of each data block.

[0084] Specifically, the first communication node may divide the data to be transmitted into blocks according to a fixed byte size, or divide the data to be transmitted into blocks randomly.

[0085] It should be noted that the embodiments of the present application do not impose specific restrictions on the preset data block algorithm and the preset hash algorithm.

[0086] By adopting the method provided in the embodiment of the present application, multiple data blocks can be obtained by dividing the data to be processed into blocks. Among them, the first communication node can process multiple data blocks in parallel, thereby improving data processing efficiency. And it is convenient for the subsequent second communication node to use the hash value corresponding to the data block to determine whether the encrypted data has been tampered with.

[0087] Furthermore, based on the hash value of each data block obtained above, the encrypted data of the data to be processed can be calculated using the hash value of each data block. Specifically, Figure 2As shown, for the above S103, the hash value is encrypted using the public key and the preset encryption algorithm to obtain encrypted data, which can be specifically implemented as follows:

[0088] S1031. Obtain a first adjustment coefficient, a first modulus parameter, and a public key corresponding to a first communication node.

[0089] The first adjustment coefficient is used to indicate the influence of the hash value on the encrypted data. The first modulus parameter is used to perform a modulus operation on the encrypted data to ensure the data range of the encrypted data and avoid the data range being too large.

[0090] S1032. Based on the hash value, the first adjustment coefficient, the first modulus parameter and the public key, encrypted data is obtained by calculation according to a preset encryption algorithm.

[0091] Specifically, the encrypted data can be calculated according to the following formula 1:

[0092]

[0093] Among them, C represents encrypted data, H(M i ) represents the hash value of the i-th data block, K pub represents the public key, p represents the first modulus parameter, and α represents the first adjustment coefficient.

[0094] Specifically, the first modulo parameter and the first adjustment coefficient can be preset based on experience. The user adjusts the first modulo parameter, and the first communication node uses the first modulo parameter to perform a modulo operation on the encrypted data, thereby ensuring the data range of the encrypted data and avoiding an excessively large data range.

[0095] By adopting the method provided in the embodiment of the present application, the hash value of each data block, the first adjustment coefficient, the first modulus parameter and the public key are used to calculate the encrypted data, thereby reducing the complexity of the encryption process. In addition, the adjustment coefficient and the modulus parameter are introduced into the encryption algorithm, which can increase the difficulty of predicting the encrypted data, thereby improving the security of the encrypted data.

[0096] Based on the same concept, an embodiment of the present application provides a method for data transmission, which is applied to a second communication node, such as Figure 3 As shown, the method includes:

[0097] S301. Receive encrypted data sent by a first communication node.

[0098] Among them, the encrypted data is obtained by the first communication node encrypting the hash value of the data to be transmitted using the public key and a preset encryption algorithm. The data to be transmitted is data obtained by the first communication node from the blockchain node of the blockchain network to which the first communication node belongs. The first communication node and the second communication node are deployed in different blockchain networks.

[0099] Specifically, the method for the first communication node to encrypt the data to be transmitted refers to the relevant description in the above embodiment.

[0100] S302: Decrypt the encrypted data using the locally stored private key and a preset decryption algorithm to obtain decrypted data.

[0101] The preset decryption algorithm corresponds to the preset encryption algorithm used by the first communication node to encrypt the data to be transmitted.

[0102] Using the method provided in the embodiment of the present application, after receiving the data to be transmitted sent by the blockchain node in the blockchain network, the first communication node can calculate the hash value, and then use the public key and the preset encryption algorithm to encrypt the hash value to obtain the encrypted data. In this way, a communication node, namely the first communication node, is deployed in each blockchain network. The Internet of Things device connected to the blockchain node can send the data to be transmitted to the first communication node, and the first communication node completes the encryption process of the data to be transmitted. Since the computing resources of the first communication node are sufficient, the encryption process of the data to be transmitted can be effectively completed. In addition, after receiving the encrypted data, the second communication node can use the locally stored private key and the preset decryption algorithm to decrypt the encrypted data, thereby ensuring that the second communication node can decrypt the encrypted data and receive the data sent by the first communication node, ensuring the data transmission speed between the blockchain network and ensuring data processing efficiency.

[0103] It should be noted that the decrypted data includes the hash value of the data block corresponding to the data to be transmitted and the data plaintext corresponding to the data to be transmitted. Based on this, after obtaining the decrypted data, the second communication node can verify the decrypted data to determine the integrity and source of the decrypted data. Specifically, Figure 4 As shown, in the above S302, after decrypting the encrypted data using the locally stored private key and the preset decryption algorithm to obtain the decrypted data, the method further includes:

[0104] S401. Divide the data plaintext into blocks according to a preset data block algorithm to obtain multiple data blocks.

[0105] In one implementation, the second communication node may store a preset data block algorithm corresponding to the node identifier of each communication node. In this way, the second communication node may determine the preset data block algorithm corresponding to the received encrypted data according to the node identifier of the encrypted data.

[0106] In another implementation, each communication node in the blockchain network uses the same preset data blocking algorithm. In this way, after obtaining the data plaintext, the second communication node directly uses the preset data blocking algorithm to block the data plaintext.

[0107] S402: Calculate the target hash value of each data block using a preset hash algorithm.

[0108] In one implementation, the second communication node may store a preset hash algorithm corresponding to the node identifier of each communication node. In this way, the second communication node may determine the preset hash algorithm corresponding to the received encrypted data according to the node identifier of the encrypted data.

[0109] In another implementation, each communication node in the blockchain network uses the same preset hash algorithm. In this way, after the second communication node obtains the data block of the data plaintext, it directly uses the preset hash algorithm to calculate the hash value of the data block.

[0110] S403: Calculate the verification score of the decrypted data based on the target hash value of each data block and a preset verification algorithm.

[0111] The verification result is used to verify the decrypted data.

[0112] S404: When the verification score of the decrypted data is within a preset safety range, determine that the decrypted data has passed the verification.

[0113] Among them, the preset safety range can be preset based on experience.

[0114] Using the method provided in the embodiment of the present application, the first communication node and the second communication node are preset with a preset data block algorithm and a preset hash algorithm. Therefore, the data plaintext in the decrypted data is divided into blocks using the preset data block algorithm, and then the hash value of each data block is calculated using the preset hash algorithm. On the basis of calculating the target hash value, if the calculated verification score is within the preset security range, it can be determined that the encrypted data has not been tampered with during the data transmission process. Thereby further ensuring the security of the data.

[0115] Specifically, for the above S403, based on the target hash value of each data block and the preset verification algorithm, the verification score of the decrypted data is calculated, which can be specifically implemented as follows:

[0116] Step 1: Obtain the second adjustment coefficient, the second modulus parameter and the private key.

[0117] Step 2: Calculate the verification score using the second adjustment coefficient, the second modulus parameter, the target hash value, and the private key.

[0118] Specifically, the verification score can be calculated according to Formula 2:

[0119]

[0120] Where V represents the verification score, H(Mi ) represents the hash value of the i-th data block, β represents the second adjustment coefficient, d is the private key, and q is the second modulus parameter.

[0121] Specifically, the second modulo parameter and the second adjustment coefficient may be preset based on experience, and the user adjusts the second modulo parameter to perform a modulo operation on the decrypted data, thereby ensuring the data range of the decrypted data and avoiding an excessively large data range.

[0122] The method provided in the embodiment of the present application is adopted, and the verification score is calculated using the hash value of each data block, the second adjustment coefficient, the second modulo parameter and the private key. Among them, the second adjustment coefficient is used to determine the influence of the hash value on the verification score, and the second modulo parameter is used to perform a modulo operation on the decrypted data, so as to ensure the data range of the decrypted data and avoid the data range being too large. In this way, the accuracy of the calculated verification score can be guaranteed. The second communication node can determine whether the above-mentioned encrypted data has been tampered with during the data transmission process based on the verification score, thereby ensuring the security and integrity of the data.

[0123] In order to ensure the security of cross-blockchain data transmission, the security of data transmission between communication nodes can be evaluated, and the reliability of encrypted data can be judged according to the evaluation score, so as to determine whether to adjust the encryption and decryption algorithms. Figure 5 As shown, after calculating the verification score of the decrypted data based on the target hash value of each data block and the preset verification algorithm in the above S403, the method further includes:

[0124] S501. Obtain the encryption time of the first communication node and the verification time of the second communication node.

[0125] S502, obtaining the total number of communication nodes, the third adjustment parameter, the weight coefficient, and the number of times the communication nodes verify the decrypted data.

[0126] S503. Based on the encryption time, verification time, total number of communication nodes, third adjustment parameter, weight coefficient and number of times the communication node verifies the decrypted data, a preset evaluation algorithm is used to calculate the evaluation score of the cross-chain communication.

[0127] Among them, the evaluation score is used to measure the reliability of encrypted data.

[0128] Specifically, the evaluation score is calculated according to the following formula 3:

[0129]

[0130] Where R represents the evaluation score, T represents the total duration of encryption time and verification time, H(M) represents the hash value of the data block, λ is the third adjustment parameter, N represents the total number of communication nodes, σi represents the signal strength of the i-th communication node, ω represents the weight coefficient, V i Indicates the number of times the i-th base point verifies the decrypted data.

[0131] Specifically, R represents the reliability score of encrypted data, and its value range is [0,∞), where a higher value indicates higher data security and transmission efficiency. T represents the total time window of the encryption operation and verification process, which is used to measure the efficiency of the entire process. λ is a positive adjustment coefficient used to adjust the influence of the hash function H(M) on the evaluation result, where H(M) is the result of applying the hash function to the data plaintext, e λH(M) Represents the security of encrypted data. The influence of hash value is enhanced by exponential function to improve the expression ability of security. τ is the integral variable, representing any time in the time window T. N is the total number of participating nodes in the cross-chain network. σ i Represents the signal strength of the i-th communication node, which is used to evaluate the stability of cross-chain transmission. ω is the weight coefficient, which is used to balance the signal strength and the number of verifications V i Impact on R, V i Represents the number of times the i-th communication node verifies the data, which is used to measure the strictness and security of the data verification process.

[0132] S504. Determine the target grade range of the evaluation score based on the correspondence between the grade range and the evaluation score.

[0133] Specifically, in the embodiment of the present application, the levels can be divided into three categories, namely, a high level, a qualified level, and an unqualified level.

[0134] In one example, if R>1000, it means that the encryption process is rigorous, the verification process is strict, and the signal strength and verification times of the encrypted data after transmission across blockchains meet high standards;

[0135] If 100≤R≤1000, it means that the encryption process and decryption process meet the basic security requirements;

[0136] If R<100, it means there is a security risk and the data transmission process needs to be improved. It should be noted that the above preset level range is only an example. In actual implementation, the preset level range and the correspondence between the preset level range and the evaluation score are not limited to this.

[0137] S505. Determine the reliability of the encrypted data according to the target level range.

[0138] By adopting the method provided in the embodiment of the present application, the evaluation score of the cross-chain communication can be calculated by obtaining the encryption time, verification time, total number of communication nodes, third adjustment parameter, weight coefficient and the number of times the communication node verifies the decrypted data. Among them, the weight coefficient can balance the influence of signal strength and verification times on the evaluation score, and the verification times can be used to measure the strictness and security of the data verification process. In this way, the evaluation score can be used to accurately evaluate the above-mentioned data encryption process and data decryption process, thereby improving the security of judging the current cross-chain communication system.

[0139] The following combination Figure 6 The process of the cross-chain communication system provided by the embodiment of the present application is introduced, taking the cross-chain data interaction between the subscriber identity modules (SIM) cards of different operators as an example. Figure 6 As shown, the method includes:

[0140] S601. Select a cross-chain technology framework.

[0141] Among them, by evaluating the existing cross-blockchain communication technology framework, the cross-chain technology framework corresponding to the embodiment of the present application is determined.

[0142] Specifically, the existing cross-chain technology framework is evaluated through multiple dimensions such as interoperability, performance, security, development friendliness and cost-effectiveness. Among them, interoperability refers to whether the technology framework supports seamless data exchange between different blockchain networks; performance refers to the transaction throughput and processing speed of the technology framework; security refers to the security features of the technology framework and its ability to resist attacks; development friendliness refers to the framework's documentation completeness, community support and the availability of development tools; cost-effectiveness refers to the development and maintenance costs of the technology framework.

[0143] In one example, existing cross-chain technology frameworks include Cosmos, Polkadot, Hyperledger, etc. Since the Inter Block Chain Transfer Protocol (IBC) of the Cosmos technology framework supports cross-chain interoperability, it provides high-performance transaction processing capabilities and meets the needs of large-scale data exchange. In addition, the Cosmos technology framework has a powerful security mechanism that can protect the security of data, and has an active development community and development tools, which helps to speed up the development process and reduce development costs.

[0144] S602. Design cross-chain communication protocol.

[0145] Among them, based on the needs of data transmission, a communication protocol is designed in advance based on the IBC protocol in the above-mentioned Cosmos technology framework to ensure safe and efficient transmission of data between SIM card systems of different operators.

[0146] In one example, data transmission requirements include communication protocols that support data encryption transmission between different blockchain platforms, ensure the security and privacy protection of data transmission, achieve efficient data transmission and low-latency data transmission, and provide data consistency and data integrity verification mechanisms. Users can pre-define the encryption algorithm, key management mechanism, data packet format, transmission protocol, and data verification mechanism used according to the above data transmission requirements. The specific encryption and decryption process and data verification process can refer to the relevant description in the above embodiments, which will not be repeated here.

[0147] S603. Deploy cross-chain network nodes.

[0148] Among them, users deploy a communication node in each blockchain network and configure the hardware configuration and software configuration for the communication node based on the performance, security and cost-effectiveness of the communication node.

[0149] In addition, to ensure the performance and fault tolerance requirements of the blockchain network, auxiliary nodes can be set up in each blockchain network to process the data to be transmitted when the communication node fails or the data to be processed exceeds the processing capacity of the communication node.

[0150] After configuring the hardware and software configurations of the communication nodes as described above, network settings may also be configured for each communication node, such as IP address, port number, routing rules, firewall rules, encryption protocols, and access control lists, so that the communication nodes can be protected from unauthorized access and network attacks.

[0151] Then, the user installs the software of the above technical framework on each communication node and initializes the settings, so that each communication node is configured with a matching encryption algorithm and verification mechanism.

[0152] Finally, after the deployment of the above communication nodes is completed, the network transmission test is carried out to test the connection stability, data encryption function, data decryption function and data transmission efficiency between the communication nodes. The data transmission performance of the cross-chain communication network is evaluated by monitoring the delay, throughput and data packet loss rate.

[0153] S604: Evaluate data encryption results.

[0154] Specifically, the method for evaluating the encryption effect of encrypted data is described in the above embodiment and will not be described again here.

[0155] By adopting the method provided in the embodiment of the present application, after selecting the technical framework and designing the communication protocol, the data transmission effect of the current technical framework can be evaluated according to the preset evaluation algorithm to determine whether the current encryption effect and verification mechanism meet the data transmission requirements.

[0156] Based on the same concept, an embodiment of the present application provides a data transmission device, which is applied to a first communication node, such as Figure 7 As shown, the device comprises:

[0157] An acquisition module 701 is used to acquire data to be transmitted from a blockchain node of the blockchain network to which the first communication node belongs;

[0158] A calculation module 702, used to calculate the hash value of the data to be transmitted;

[0159] The encryption module 703 is used to encrypt the hash value using a public key and a preset encryption algorithm to obtain encrypted data;

[0160] The sending module 704 is used to send the encrypted data to the second communication node, so that the second communication node uses a locally stored private key and a preset decryption algorithm to decrypt the encrypted data to obtain plaintext data. The second communication node and the first communication node are deployed in different blockchain networks.

[0161] In a possible implementation, the calculation module 702 is specifically configured to:

[0162] Using a preset data block algorithm to block the data to be transmitted to obtain multiple data blocks;

[0163] A preset hash algorithm is used to calculate the hash value of each data block.

[0164] In a possible implementation, the encryption module 703 is specifically configured to:

[0165] Obtaining an adjustment coefficient, a modulus parameter, and the public key corresponding to the first communication node, wherein the adjustment coefficient is used to indicate the degree of influence of the hash value on the encrypted data;

[0166] The encrypted data is obtained by calculation according to a preset encryption algorithm based on the hash value, the first adjustment coefficient, the first modulus parameter and the public key.

[0167] In a possible implementation, the encryption module 703 is specifically configured to:

[0168] The encrypted data is calculated according to the following formula:

[0169]

[0170] Wherein, C represents the encrypted data, H(M i ) represents the hash value of the i-th data block, K pub represents the public key, p represents the first modulus parameter, and α represents the first adjustment coefficient.

[0171] Based on the same concept, an embodiment of the present application provides a data transmission device, which is applied to a second communication node, such as Figure 8 As shown, the device comprises:

[0172] A receiving module 801 is used to receive encrypted data sent by a first communication node, where the encrypted data is obtained by the first communication node by encrypting a hash value of data to be transmitted using a public key and a preset encryption algorithm, and the data to be transmitted is data obtained by the first communication node from a blockchain node of a blockchain network to which the first communication node belongs, and the first communication node and the second communication node are deployed in different blockchain networks;

[0173] The decryption module 802 is used to decrypt the encrypted data using a locally stored private key and a preset decryption algorithm to obtain decrypted data.

[0174] In a possible implementation, the decrypted data includes a hash value and a data plaintext of a data block corresponding to the data to be transmitted; the device further includes:

[0175] A block division module, used for dividing the data plaintext into blocks according to a preset data block division algorithm to obtain multiple data blocks;

[0176] A calculation module, used for calculating a target hash value of each data block by using a preset hash algorithm;

[0177] The calculation module is further used to calculate the verification score of the decrypted data based on the target hash value of each of the data blocks and a preset verification algorithm, and the verification result is used to verify the decrypted data;

[0178] The determination module is used to determine that the verification of the decrypted data has passed when the verification score of the decrypted data is within a preset safety range.

[0179] In a possible implementation, the computing module is specifically configured to:

[0180] Obtaining a second adjustment coefficient, a second modulus parameter and the private key;

[0181] The verification score is calculated using the second adjustment coefficient, the second modulo parameter, the target hash value and the private key.

[0182] In a possible implementation, the computing module is specifically configured to:

[0183] The verification score is calculated according to the following formula:

[0184]

[0185] Wherein, V represents the verification score, H(M i ) represents the hash value of the i-th data block, β represents the second adjustment coefficient, d is the private key, and q is the second modulus parameter.

[0186] In a possible implementation, the acquisition module is used to acquire the encryption time of the first communication node and the verification time of the second communication node;

[0187] An acquisition module, used to acquire the total number of communication nodes, the third adjustment parameter, the weight coefficient, and the number of times the communication node verifies the decrypted data;

[0188] A calculation module, configured to calculate an evaluation score of cross-chain communication using a preset evaluation algorithm based on the encryption time, the verification time, the total number of communication nodes, the third adjustment parameter, the weight coefficient, and the number of times the communication node verifies the decrypted data, wherein the evaluation score is used to measure the reliability of the encrypted data;

[0189] A determination module, used to determine the target grade range of the evaluation score according to the corresponding relationship between the grade range and the evaluation score;

[0190] The determination module is further used to determine the reliability of the encrypted data according to the target level range.

[0191] In a possible implementation, the computing module is specifically configured to:

[0192] The evaluation score is calculated according to the following formula:

[0193]

[0194] Wherein, R represents the evaluation score, T represents the total duration of the encryption time and the verification time, H(M) represents the hash value of the data block, λ is the third adjustment parameter, N represents the total number of communication nodes, σ i represents the signal strength of the i-th communication node, ω represents the weight coefficient, V i Indicates the number of times the i-th base point verifies the decrypted data.

[0195] It should be noted that the data transmission device is a device corresponding to the above-mentioned method applied to file access, and all implementation methods in the above-mentioned method embodiment are applicable to the embodiment of the device and can achieve the same technical effect.

[0196] Fig. 9 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.

[0197] The electronic device may include a processor 901 and a memory 902 storing computer program instructions.

[0198] Specifically, the processor 901 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0199] The memory 902 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 902 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 902 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 902 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 902 is a non-volatile solid-state memory.

[0200] The memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical / tangible memory storage devices. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.

[0201] The processor 901 implements any one of the file access methods in the above embodiments by reading and executing computer program instructions stored in the memory 902 .

[0202] In one example, the electronic device may further include a communication interface 903 and a bus 904. Fig. 9 As shown, the processor 901, the memory 902, and the communication interface 903 are connected via a bus 904 and communicate with each other.

[0203] The communication interface 903 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0204] Bus 904 includes hardware, software or both, and the parts of electronic equipment are coupled to each other.For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In suitable cases, bus 904 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.

[0205] In addition, in combination with the data transmission method in the above embodiment, the embodiment of the present application can provide a computer storage medium to implement. The computer storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any one of the data transmission methods in the above embodiment is implemented.

[0206] In combination with the data transmission method in the above embodiments, an embodiment of the present application may provide a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes any data transmission method in the above embodiments.

[0207] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.

[0208] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0209] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.

[0210] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0211] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.

Claims

1. A method for data transmission, characterized in that: Applied to a first communication node, the method comprises: Acquire data to be transmitted from a blockchain node of the blockchain network to which the first communication node belongs; Calculating a hash value of the data to be transmitted; Encrypting the hash value using a public key and a preset encryption algorithm to obtain encrypted data; The encrypted data is sent to a second communication node, so that the second communication node uses a locally stored private key and a preset decryption algorithm to decrypt the encrypted data to obtain plaintext data, and the second communication node and the first communication node are deployed in different blockchain networks.

2. The method according to claim 1, characterized in that The calculating the hash value of the data to be transmitted includes: Using a preset data block algorithm to block the data to be transmitted to obtain multiple data blocks; A preset hash algorithm is used to calculate the hash value of each data block.

3. The method according to claim 2, characterized in that The method of encrypting the hash value using a public key and a preset encryption algorithm to obtain encrypted data includes: Obtaining a first adjustment coefficient, a first modulus parameter, and a public key corresponding to the first communication node, wherein the adjustment coefficient is used to indicate the degree of influence of the hash value on the encrypted data; The encrypted data is obtained by calculation according to the preset encryption algorithm based on the hash value, the first adjustment coefficient, the first modulus parameter and the public key.

4. The method according to claim 3, characterized in that The step of calculating the encrypted data based on the hash value, the first adjustment coefficient, the first modulus parameter, and the public key according to the preset encryption algorithm includes: The encrypted data is calculated according to the following formula: Wherein, C represents the encrypted data, H(M i ) represents the hash value of the i-th data block, K pub represents the public key, p represents the first modulus parameter, and α represents the first adjustment coefficient.

5. A method for data transmission, characterized in that: Applied to a second communication node, the method comprises: Receive encrypted data sent by a first communication node, where the encrypted data is obtained by the first communication node by encrypting a hash value of data to be transmitted using a public key and a preset encryption algorithm, where the data to be transmitted is data obtained by the first communication node from a blockchain node of a blockchain network to which the first communication node belongs, and the first communication node and the second communication node are deployed in different blockchain networks; The encrypted data is decrypted using a locally stored private key and a preset decryption algorithm to obtain decrypted data.

6. The method according to claim 5, characterized in that The decrypted data includes a hash value and a data plaintext of a data block corresponding to the data to be transmitted; after decrypting the encrypted data using a locally stored private key and a preset decryption algorithm to obtain the decrypted data, the method further includes: Divide the data plaintext into blocks according to a preset data block algorithm to obtain multiple data blocks; Calculate the target hash value of each data block using a preset hash algorithm; Calculate the verification score of the decrypted data based on the target hash value of each data block and a preset verification algorithm, wherein the verification score is used to determine whether the decrypted data has passed the verification; When the verification score of the decrypted data is within a preset safety range, it is determined that the decrypted data has passed the verification.

7. The method according to claim 6, characterized in that The step of calculating the verification score of the decrypted data based on the target hash value of each of the data blocks and a preset verification algorithm comprises: Obtaining a second adjustment coefficient, a second modulus parameter and the private key; The verification score is calculated using the second adjustment coefficient, the second modulo parameter, the target hash value and the private key.

8. The method according to claim 7, characterized in that The calculating the verification score by using the second adjustment coefficient, the second modulo parameter, the target hash value and the private key includes: The verification score is calculated according to the following formula: Wherein, V represents the verification score, H(M i ) represents the hash value of the i-th data block, β represents the second adjustment coefficient, d is the private key, and q is the second modulus parameter.

9. The method according to any one of claims 6 to 8, characterized in that: After calculating the verification score of the decrypted data based on the target hash value of each of the data blocks and a preset verification algorithm, the method further includes: Obtaining the encryption time of the first communication node and the verification time of the second communication node; Obtaining the total number of communication nodes, the third adjustment parameter, the weight coefficient, and the number of times the communication node verifies the decrypted data; Based on the encryption time, the verification time, the total number of communication nodes, the third adjustment parameter, the weight coefficient, and the number of times the communication node verifies the decrypted data, a preset evaluation algorithm is used to calculate an evaluation score for cross-chain communication, and the evaluation score is used to measure the reliability of the encrypted data; Determine the target grade range of the evaluation score according to the corresponding relationship between the grade range and the evaluation score; The reliability of the encrypted data is determined according to the target level range.

10. The method according to claim 9, characterized in that The method of calculating the evaluation score of cross-chain communication using a preset evaluation algorithm based on the encryption time, the verification time, the total number of communication nodes, the third adjustment parameter, the weight coefficient, and the number of times the communication node verifies the decrypted data includes: The evaluation score is calculated according to the following formula: Wherein, R represents the evaluation score, T represents the total duration of the encryption time and the verification time, H(M) represents the hash value of the data block, λ is the third adjustment parameter, N represents the total number of communication nodes, σ i represents the signal strength of the i-th communication node, ω represents the weight coefficient, V i Indicates the number of times the i-th base point verifies the decrypted data.

11. A data transmission device, characterized in that: Applied to a first communication node, the device comprises: An acquisition module, used to acquire data to be transmitted from a blockchain node of the blockchain network to which the first communication node belongs; A calculation module, used to calculate the hash value of the data to be transmitted; An encryption module, used to encrypt the hash value using a public key and a preset encryption algorithm to obtain encrypted data; A sending module is used to send the encrypted data to a second communication node, so that the second communication node uses a locally stored private key and a preset decryption algorithm to decrypt the encrypted data to obtain plaintext data. The second communication node and the first communication node are deployed in different blockchain networks.

12. A data transmission device, characterized in that: Applied to a second communication node, the device comprises: A receiving module, configured to receive encrypted data sent by a first communication node, wherein the encrypted data is obtained by the first communication node by encrypting a hash value of data to be transmitted using a public key and a preset encryption algorithm, and the data to be transmitted is data obtained by the first communication node from a blockchain node of a blockchain network to which the first communication node belongs, and the first communication node and the second communication node are deployed in different blockchain networks; The decryption module is used to decrypt the encrypted data using a locally stored private key and a preset decryption algorithm to obtain decrypted data.

13. An electronic device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the method for data transmission according to any one of claims 1-4 or 5-10 is implemented.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the method for data transmission according to any one of claims 1 to 4 or 5 to 10 is implemented.

Citation Information

Patent Citations

  • Cross-block-chain data migration method, device and equipment and storage medium

    CN111309711A

  • Security distributed aggregation and access system and method based on fog alliance chain

    CN111372243A

  • Method for protecting data privacy in alliance chain cross-chain and device and system

    CN113591104A

  • Internet of Things equipment mutual authentication method and device based on block chain technology

    CN114465730A

  • Cross-chain data encryption method and device, equipment and storage medium

    CN114465830A

Cited By

  • Data transmission method, data sending device and data receiving device

    CN119854053A