Method, apparatus, device and storage medium for data transmission

By deploying communication nodes in the blockchain network and using public-key encryption and private-key decryption, combined with data segmentation and hash value verification, the problem of slow encryption speed in existing technologies is solved, and efficient and secure cross-blockchain data transmission is achieved.

CN119299079BActive Publication Date: 2026-06-02CHINA MOBILE INTERNET CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA MOBILE INTERNET CO LTD
Filing Date
2024-11-21
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

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

Method used

By deploying a communication node in the blockchain network, the hash value of the data is calculated and encrypted using a public key and a preset encryption algorithm. The encryption speed is improved by combining adjustment coefficients and modulo parameters. At the receiving end, the data is decrypted using a private key and a preset decryption algorithm. Data integrity is ensured by data block division and hash value verification.

Benefits of technology

It improves data encryption speed, ensures data transmission speed and processing efficiency between blockchain networks, and enhances the security and reliability of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119299079B_ABST
    Figure CN119299079B_ABST
Patent Text Reader

Abstract

The application discloses a data transmission method, device, equipment and storage medium, and is applied to a first communication node. The specific technical scheme comprises the following steps: obtaining to-be-transmitted data from a blockchain node of a blockchain network to which the first communication node belongs; calculating a hash value of the to-be-transmitted data; encrypting the hash value by using a 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 data plaintext. The second communication node and the first communication node are deployed in different blockchain networks. In this way, the to-be-transmitted data is encrypted and transmitted by using the first communication node, so that the data encryption speed is improved, and the data transmission efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of data transmission technology, and in particular relates to a data transmission method, apparatus, device and storage medium. Background Technology

[0002] With the development of IoT technology, data from different application areas needs to be frequently transmitted and circulated. Currently, secure data transmission and storage can be achieved based on blockchain technology. Specifically, each blockchain network corresponds to an application area. By establishing secure communication channels between blockchain networks and using encryption algorithms to encrypt the original data, the security of data transmission is guaranteed.

[0003] However, existing encryption algorithms require significant computing resources. Therefore, in devices with limited computing resources, the time required to encrypt the original data is long and the processing speed is slow. Summary of the Invention

[0004] This application provides a method, apparatus, device, and storage medium for data transmission. These improvements can increase data encryption speed, thereby enhancing data transmission efficiency.

[0005] In a first aspect, embodiments of this application provide a data transmission method applied to a first communication node, the method comprising:

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

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

[0008] The hash value is encrypted 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 can decrypt the encrypted data using a locally stored private key and a preset decryption algorithm to obtain plaintext data. The second communication node and the first communication node are deployed on different blockchain networks.

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

[0011] The data to be transmitted is divided into multiple data blocks using a preset data block division algorithm.

[0012] The hash value of each data block is calculated using a preset hash algorithm.

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

[0014] Obtain the adjustment coefficient, modulo parameter, and public key corresponding to the first communication node, wherein the adjustment coefficient is used to represent the degree of influence of the hash value on the encrypted data;

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

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

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

[0018]

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

[0020] Secondly, embodiments of this application provide a data transmission method applied to a second communication node, the method comprising:

[0021] The first communication node receives encrypted data sent by the first communication node. The encrypted data is obtained by the first communication node using a public key and a preset encryption algorithm to encrypt the hash value of the data to be transmitted. The data to be transmitted is data obtained by the first communication node from a blockchain node in 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.

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

[0023] In one possible implementation, the decrypted data includes the hash value of the data block corresponding to the data to be transmitted and the plaintext of the data; 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] The plaintext data is divided into multiple data blocks according to a preset data block division algorithm.

[0025] The target hash value of each data block is calculated using a preset hash algorithm;

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

[0027] If the verification score of the decrypted data is within a preset security range, the verification of the decrypted data is deemed successful.

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

[0029] Obtain the second adjustment coefficient, the 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 one possible implementation, calculating the verification score using the second adjustment coefficient, the second modulo parameter, the target hash value, and the private key includes:

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

[0033]

[0034] Where 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 modulo parameter.

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

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

[0037] Obtain 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;

[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 nodes verify the decrypted data, a preset evaluation algorithm is used to calculate the evaluation score of cross-chain communication. The evaluation score is used to measure the reliability of the encrypted data.

[0039] Based on the correspondence between the grade range and the evaluation score, determine the target grade range in which the evaluation score falls;

[0040] The reliability of the encrypted data is determined based on the target level range.

[0041] In one possible implementation, the evaluation score for cross-chain communication is calculated using a preset evaluation algorithm based on the encryption time, the verification time, the total number of communication nodes, the third adjustment parameter, the weighting coefficient, and the number of times the communication nodes verify the decrypted data. This includes:

[0042] The assessment score is calculated using the following formula:

[0043]

[0044] Where 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, and σ i V represents the signal strength of the i-th communication node, ω represents the weighting coefficient, and V i This indicates the number of times the i-th base point verifies the decrypted data.

[0045] Thirdly, embodiments of this application provide a data transmission apparatus applied to a first communication node, the apparatus comprising:

[0046] The acquisition module is used to acquire the data to be transmitted from the blockchain nodes of the blockchain network to which the first communication node belongs;

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

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

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

[0050] Fourthly, embodiments of this application provide a data transmission apparatus applied to a second communication node, the apparatus comprising:

[0051] The receiving module is used to receive encrypted data sent by the first communication node. The encrypted data is obtained by the first communication node using a public key and a preset encryption algorithm to encrypt the hash value of the data to be transmitted. The data to be transmitted is data obtained by the first communication node from a blockchain node in 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.

[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] Fifthly, embodiments of this application provide an electronic device, the device comprising: a processor and a memory storing computer program instructions;

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

[0055] In a sixth aspect, embodiments of this application provide a computer-readable storage medium storing computer program instructions that, when executed by a processor, implement the component selection method as described in any one of the first aspects.

[0056] In a seventh aspect, embodiments of this application provide a computer program product in which instructions, when executed by a processor of an electronic device, cause the electronic device to perform a component selection method as described in any one of the first aspects.

[0057] This application discloses a data transmission method, apparatus, device, and storage medium. After receiving data to be transmitted from a blockchain node in a blockchain network, a first communication node calculates a hash value and then encrypts the hash value using a public key and a preset encryption algorithm to obtain encrypted data. Thus, one communication node, the first communication node, is deployed in each blockchain network. IoT devices connected to the blockchain node can send data to be transmitted to the first communication node, which then performs the encryption process. Because the first communication node has sufficient computing resources, it can effectively complete the encryption process, thereby ensuring data transmission speed between blockchain networks and guaranteeing data processing efficiency. Attached Figure Description

[0058] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0059] Figure 1 This is a flowchart illustrating a data transmission method provided in an embodiment of this application;

[0060] Figure 2 This is a flowchart illustrating a data encryption method provided in an embodiment of this application;

[0061] Figure 3This is a flowchart illustrating a data transmission method provided in an embodiment of this application;

[0062] Figure 4 This is a flowchart illustrating a data verification method provided in an embodiment of this application;

[0063] Figure 5 This is a flowchart illustrating a method for evaluating encryption effectiveness provided in an embodiment of this application;

[0064] Figure 6 This is an exemplary schematic diagram of a cross-chain communication system construction method provided in an embodiment of this application;

[0065] Figure 7 This is a schematic diagram of the structure of a data transmission device provided in an embodiment of this application;

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

[0067] Figure 9 This is a schematic diagram of the structure of an electronic device provided in another embodiment of this application. Detailed Implementation

[0068] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.

[0069] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.

[0070] Currently, during data transmission within a blockchain network, the downstream devices of a blockchain node can encrypt the data to be transmitted locally using encryption algorithms. However, due to differences in programming languages, consensus mechanisms, and data structures between different blockchain networks, when a downstream device sends data to another blockchain network, 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 while blockchain technology provides security for 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] Furthermore, blockchain networks typically employ high-strength encryption algorithms to encrypt data. While this provides a high level of security, it can lead to slower processing speeds and reduced data transmission efficiency for devices with limited computing resources.

[0073] To address the problems existing in the prior art, embodiments of this application provide a method, apparatus, device, and storage medium for data transmission, firstly based on... Figure 1 This application introduces a method for selecting components, such as... Figure 1 As shown, the method includes:

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

[0075] In this system, blockchain nodes are connected to downstream devices, which can be IoT devices. When a downstream device needs to send data across blockchains, it sends the data to the corresponding blockchain node. The blockchain node then forwards the data to a communication node within the blockchain network—the first communication node. This first communication node facilitates communication with other communication nodes in the blockchain network, specifically by encrypting data to be transmitted within that blockchain network and decrypting encrypted data received from other blockchain networks.

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

[0077] S103. Use the public key and a preset encryption algorithm to encrypt the hash value to obtain encrypted data.

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

[0079] Understandably, the second communication node pre-generates a key pair for data encryption and decryption, sends the public key of the key pair to other communication nodes in the blockchain network, and stores the private key for decryption locally.

[0080] Specifically, the second communication node can broadcast its public key to other blockchain networks. Communication nodes in other blockchain networks store the mapping between public keys and communication node identifiers. When the first communication node needs to send data, it obtains the identifier of the destination communication node and the corresponding public key based on the destination node of the data.

[0081] Using the above method, after receiving data to be transmitted from blockchain nodes in the blockchain network, the first communication node can calculate a hash value and then encrypt the hash value using a public key and a preset encryption algorithm to obtain encrypted data. Thus, one communication node, the first communication node, is deployed in each blockchain network. IoT devices connected to the blockchain nodes can send data to be transmitted to the first communication node, which then completes the encryption process. Because the first communication node has sufficient computing resources, it can effectively complete the encryption process, thereby ensuring the data transmission speed between blockchain networks and guaranteeing data processing efficiency.

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

[0083] The data to be transmitted is divided into multiple data blocks using a preset data block division algorithm; the hash value of each data block is calculated using a preset hash algorithm.

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

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

[0086] The method provided in this application's embodiments allows for the division of data into blocks, resulting in multiple data blocks. The first communication node can process multiple data blocks in parallel, thereby improving data processing efficiency. Furthermore, it facilitates subsequent checks by the second communication node using the hash values ​​corresponding to the data blocks to determine whether the encrypted data has been tampered with.

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

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

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

[0090] S1032. Based on the hash value, the first adjustment coefficient, the first modulo parameter, and the public key, the encrypted data is calculated according to the preset encryption algorithm.

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

[0092]

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

[0094] Specifically, the first modulus parameter and the first adjustment coefficient can be preset based on experience. By adjusting the first modulus parameter, the first communication node uses the first modulus parameter to perform modulo operation on the encrypted data, thereby ensuring the data range of the encrypted data and avoiding the data range from being too large.

[0095] The method provided in this application calculates encrypted data using the hash value of each data block, a first adjustment coefficient, a first modulo parameter, and the public key, reducing the complexity of the encryption process. Furthermore, the introduction of an adjustment coefficient and a modulo parameter into the encryption algorithm increases the difficulty of predicting the encrypted data, thereby improving its security.

[0096] Based on the same concept, embodiments of this application provide a data transmission method applied to a second communication node, such as... Figure 3 As shown, the method includes:

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

[0098] The encrypted data is obtained by the first communication node using a public key and a preset encryption algorithm to encrypt the hash value of the data to be transmitted. The data to be transmitted is data obtained by the first communication node from a blockchain node in 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 by which the first communication node encrypts the data to be transmitted is described in the relevant embodiments above.

[0100] S302. Use the locally stored private key and the preset decryption algorithm to decrypt the encrypted data to obtain the 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 this application, after receiving data to be transmitted from a blockchain node in the blockchain network, the first communication node can calculate a hash value and then encrypt the hash value using a public key and a preset encryption algorithm to obtain encrypted data. Thus, one communication node, the first communication node, is deployed in each blockchain network. IoT devices connected to the blockchain node can send data to be transmitted to the first communication node, which then completes the encryption process. Because the first communication node has sufficient computing resources, it can effectively complete the encryption process. Furthermore, after receiving the encrypted data, the second communication node can decrypt the encrypted data using a locally stored private key and a preset decryption algorithm. Therefore, 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 blockchain networks and guaranteeing 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 plaintext of the data to be transmitted. Based on this, after receiving the decrypted data, the second communication node can verify the decrypted data to determine its integrity and origin. Specifically, such as... Figure 4 As shown, after decrypting the encrypted data using the locally stored private key and a preset decryption algorithm in step S302 to obtain the decrypted data, the method further includes:

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

[0105] In one implementation, the second communication node can store a preset data segmentation algorithm corresponding to the node identifier of each communication node. Thus, the second communication node can determine the preset data segmentation algorithm corresponding to the received encrypted data based on the node identifier of the encrypted data.

[0106] In another implementation, each communication node in the blockchain network uses the same preset data segmentation algorithm. Thus, after the second communication node obtains the plaintext data, it directly uses the preset data segmentation algorithm to segment the plaintext data into blocks.

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

[0108] In one implementation, the second communication node can store a preset hash algorithm corresponding to the node identifier of each communication node. Thus, the second communication node can determine the preset hash algorithm corresponding to the received encrypted data based on the node identifier of the encrypted data.

[0109] In another implementation, each communication node in the blockchain network uses the same preset hash algorithm. Thus, after the second communication node obtains the data block of 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 the preset verification algorithm.

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

[0112] S404. If the verification score of the decrypted data is within the preset security range, the verification of the decrypted data is deemed successful.

[0113] The preset safety range can be pre-set based on experience.

[0114] Using the method provided in this application embodiment, the first and second communication nodes are pre-configured with a preset data segmentation algorithm and a preset hash algorithm. Therefore, the plaintext data in the decrypted data is segmented into blocks using the preset data segmentation algorithm, and then the hash value of each data block is calculated using the preset hash algorithm. Based on the calculated target hash value, and provided the calculated verification score is within a preset security range, it can be determined that the plaintext data has not been tampered with during data transmission. This further ensures data security.

[0115] Specifically, for S403 mentioned above, 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 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 modulo parameter, the target hash value, and the private key.

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

[0119]

[0120] Where V represents the validation 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 modulo parameter.

[0121] Specifically, the second modulus parameter and the second adjustment coefficient can be preset based on experience. By adjusting the second modulus parameter, the user can perform modulo operations 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 this application calculates a verification score using the hash value of each data block, a second adjustment coefficient, a second modulo parameter, and a private key. The second adjustment coefficient determines the impact of the hash value on the verification score, and the second modulo parameter performs a modulo operation on the decrypted data to ensure the data range of the decrypted data and prevent it from becoming too large. This ensures the accuracy of the calculated verification score. The second communication node can then use the verification score to determine whether the encrypted data has been tampered with during data transmission, thereby ensuring data security and integrity.

[0123] To ensure the security of cross-blockchain data transmission, the security of data transmission between communication nodes can be assessed. Based on the assessment score, the reliability of encrypted data can be determined, thus deciding whether to adjust the encryption and decryption algorithms. Based on this, such as... 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 S403 above, 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, obtain 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 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, a preset evaluation algorithm is used to calculate the evaluation score of cross-chain communication.

[0127] 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 and verification, H(M) represents the hash value of the data block, λ is the third adjustment parameter, N represents the total number of communication nodes, and σi V represents the signal strength of the i-th communication node, ω represents the weighting coefficient, and V i This indicates the number of times the i-th base point verifies the decrypted data.

[0131] Specifically, R represents the reliability score of the encrypted data, with a value range of [0, ∞), where higher values ​​indicate higher data security and transmission efficiency. T represents the total time window for encryption and verification processes, 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 obtained by applying the hash function to the plaintext data. λH(M) Representing the security of encrypted data, the influence of the hash value is enhanced through an exponential function to improve the expressive power of security. τ is the integral variable, representing any moment within the time window T. N is the total number of participating nodes in the cross-chain network, and σ... i ω represents the signal strength of the i-th communication node, used to evaluate the stability of cross-chain transmission; ω is a weighting coefficient used to balance signal strength and the number of verifications V. i The effect of R, V i This represents the number of times the i-th communication node verifies the data, used to measure the rigor and security of the data verification process.

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

[0133] Specifically, in the embodiments of this application, the grades can be divided into three categories: high grade, qualified grade, and unqualified grade.

[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 number of verifications of the encrypted data after cross-blockchain transmission have reached a high standard.

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

[0136] If R < 100, it indicates 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 encrypted data based on the target level range.

[0138] Using the method provided in this application, an evaluation score for cross-chain communication can be calculated by acquiring the encryption time, verification time, total number of communication nodes, third adjustment parameter, weighting coefficient, and the number of times the communication nodes verify the decrypted data. The weighting coefficient balances the impact of signal strength and verification count on the evaluation score, while the verification count measures the rigor and security of the data verification process. Thus, the evaluation score can accurately assess the data encryption and decryption processes, thereby improving the assessment of the security of the current cross-chain communication system.

[0139] The following combination Figure 6 This application describes the process of the cross-chain communication system provided in its embodiments, taking cross-chain data interaction between Subscriber Identity Module (SIM) cards from different operators as an example. Figure 6 As shown, the method includes:

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

[0141] Specifically, by evaluating existing cross-blockchain communication technology frameworks, the cross-chain technology framework corresponding to the embodiments of this application is determined.

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

[0143] In one example, existing cross-chain technology frameworks include Cosmos, Polkadot, and Hyperledger. Cosmos's Inter-Blockchain Transfer Protocol (IBC) supports cross-chain interoperability, providing high-performance transaction processing capabilities to meet the needs of large-scale data exchange. Furthermore, Cosmos's robust security mechanisms protect data security, and its active development community and tools help accelerate the development process and reduce development costs.

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

[0145] Based on the data transmission requirements, a communication protocol was designed in advance based on the IBC protocol in the Cosmos technology framework to ensure secure and efficient data transmission between SIM card systems of different operators.

[0146] In one example, data transmission requirements include a communication protocol that supports encrypted data transmission between different blockchain platforms, ensuring data transmission security and privacy protection, enabling efficient and low-latency data transmission, and providing data consistency and integrity verification mechanisms. Users can pre-define the encryption algorithm, key management mechanism, data packet format, transmission protocol, and data verification mechanism according to the above data transmission requirements. Specific encryption / decryption and data verification processes can be found in the descriptions in the above embodiments and will not be repeated here.

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

[0148] In this process, users deploy a communication node in each blockchain network and configure the hardware and software of the communication node based on its performance, security, and cost-effectiveness.

[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 in the event that 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 of the communication nodes as described above, you can also configure network settings 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 aforementioned 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 aforementioned communication nodes were deployed, network transmission tests were conducted to assess the connection stability between the communication nodes, data encryption capabilities, data decryption capabilities, and data transmission efficiency. The data transmission performance of the cross-chain communication network was evaluated by monitoring latency, throughput, and packet loss rate.

[0153] S604. Evaluate the data encryption results.

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

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

[0156] Based on the same concept, embodiments of this application provide a data transmission apparatus applied to a first communication node, such as... Figure 7 As shown, the device includes:

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

[0158] Calculation module 702 is used to calculate the hash value of the data to be transmitted;

[0159] 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 can decrypt the encrypted data using a locally stored private key and a preset decryption algorithm to obtain plaintext data. The second communication node and the first communication node are deployed on different blockchain networks.

[0161] In one possible implementation, the computing module 702 is specifically used for:

[0162] The data to be transmitted is divided into multiple data blocks using a preset data block division algorithm.

[0163] The hash value of each data block is calculated using a preset hash algorithm.

[0164] In one possible implementation, encryption module 703 is specifically used for:

[0165] Obtain the adjustment coefficient, modulo parameter, and public key corresponding to the first communication node, wherein the adjustment coefficient is used to represent the degree of influence of the hash value on the encrypted data;

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

[0167] In one possible implementation, encryption module 703 is specifically used for:

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

[0169]

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

[0171] Based on the same concept, embodiments of this application provide a data transmission apparatus applied to a second communication node, such as... Figure 8 As shown, the device includes:

[0172] The receiving module 801 is used to receive encrypted data sent by the first communication node. The encrypted data is obtained by the first communication node using a public key and a preset encryption algorithm to encrypt the hash value of the data to be transmitted. The data to be transmitted is data obtained by the first communication node from a 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.

[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 one possible implementation, the decrypted data includes the hash value and plaintext of the data block corresponding to the data to be transmitted; the device further includes:

[0175] The data segmentation module is used to segment the plaintext data into multiple data blocks according to a preset data segmentation algorithm.

[0176] The calculation module is used to calculate the target hash value of each data block using a preset hash algorithm;

[0177] The calculation module is also used to calculate the verification score of the decrypted data based on the target hash value of each data block 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 if the verification score of the decrypted data is within a preset security range.

[0179] In one possible implementation, the computation module is specifically used for:

[0180] Obtain the second adjustment coefficient, the 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 one possible implementation, the computation module is specifically used for:

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

[0184]

[0185] Where 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 modulo parameter.

[0186] In one 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] The acquisition module is used to acquire 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;

[0188] The calculation module is used to calculate the evaluation score of cross-chain communication 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 nodes verify the decrypted data, using a preset evaluation algorithm. The evaluation score is used to measure the reliability of the encrypted data.

[0189] The determination module is used to determine the target grade range in which the evaluation score belongs based on the correspondence between the grade range and the evaluation score;

[0190] The determination module is also used to determine the reliability of encrypted data based on the target level range.

[0191] In one possible implementation, the computation module is specifically used for:

[0192] The assessment score is calculated using the following formula:

[0193]

[0194] Where 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, and σ i V represents the signal strength of the i-th communication node, ω represents the weighting coefficient, and V i This 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 the same as the device used in the above-described file access method. All implementation methods in the above-described method embodiments are applicable to the embodiments of this device and can achieve the same technical effect.

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

[0197] An 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), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.

[0199] Memory 902 may include mass storage for data or instructions. For example, and not limitingly, memory 902 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 902 may include removable or non-removable (or fixed) media. Where appropriate, memory 902 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 902 is non-volatile solid-state memory.

[0200] Memory may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, and electrical, optical, or other physical / tangible memory storage devices. Therefore, typically, 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 methods according to one aspect of this disclosure.

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

[0202] In one example, the electronic device may also include a communication interface 903 and a bus 904. For example, Figure 9 As shown, the processor 901, memory 902, and communication interface 903 are connected through bus 904 and complete communication with each other.

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

[0204] Bus 904 includes hardware, software, or both, that couples components of an electronic device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 904 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, any suitable bus or interconnect is contemplated herein.

[0205] Furthermore, in conjunction with the data transmission methods described in the above embodiments, this application embodiment can provide a computer storage medium for implementation. This computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the data transmission methods described in the above embodiments.

[0206] In conjunction with the data transmission methods in the above embodiments, this application embodiment can provide a computer program product, in which instructions in the computer program product, when executed by the processor of an electronic device, cause the electronic device to perform any of the data transmission methods in the above embodiments.

[0207] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this 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, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on 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, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.

[0209] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. 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 embodiments, or in a different order, or several steps can be performed simultaneously.

[0210] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, 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 apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. 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 is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.

[0211] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.

Claims

1. A method for data transmission, characterized in that, Applied to a first communication node, the method includes: Obtain the data to be transmitted from the blockchain nodes of the blockchain network to which the first communication node belongs; The data to be transmitted is divided into multiple data blocks using a preset data block division algorithm. The hash value of each data block is calculated using a preset hash algorithm; Obtain the first adjustment coefficient, the first modulo parameter, and the public key corresponding to the first communication node, wherein the adjustment coefficient is used to represent the degree of influence of the hash value on the encrypted data; Based on the hash value, the first adjustment coefficient, the first modulo parameter, and the public key, encrypted data is calculated according to a preset encryption algorithm. The encrypted data is sent to the second communication node so that the second communication node can decrypt the encrypted data using a locally stored private key and a preset decryption algorithm to obtain plaintext data. The second communication node and the first communication node are deployed on different blockchain networks. The blockchain node is connected to a downstream device, which is an Internet of Things (IoT) device. When the downstream device needs to send data across blockchains, it sends the data to be transmitted to the corresponding blockchain node, and the blockchain node then sends the data to be transmitted to the first communication node in the blockchain network.

2. The method according to claim 1, characterized in that, The process of calculating encrypted data based on the hash value, the first adjustment coefficient, the first modulo parameter, and the public key according to a preset encryption algorithm includes: The encrypted data is calculated using the following formula: in, This indicates the encrypted data. This represents the hash value of the i-th data block. This refers to the public key. This represents the first modulus parameter. This represents the first adjustment coefficient.

3. A method for data transmission, characterized in that, Applied to a second communication node, the method includes: The system receives encrypted data sent by a first communication node. The encrypted data is obtained by the first communication node using a public key and a preset encryption algorithm to encrypt the hash value of the data to be transmitted. The data to be transmitted is data obtained by the first communication node from a blockchain node in 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. The blockchain node is connected to a downstream device, which is an Internet of Things (IoT) device. When the downstream device needs to send data across blockchains, the downstream device sends the data to be transmitted to the corresponding blockchain node, and the blockchain node sends the data to be transmitted to the first communication node in the blockchain network. The encrypted data is decrypted using a locally stored private key and a preset decryption algorithm to obtain decrypted data, which includes the hash value and plaintext of the data block corresponding to the data to be transmitted. The plaintext data is divided into multiple data blocks according to a preset data block division algorithm. The target hash value of each data block is calculated using a preset hash algorithm; Obtain the second adjustment coefficient, the second modulus parameter, and the private key; Using the second adjustment coefficient, the second modulo parameter, the target hash value, and the private key, the verification score of the decrypted data is calculated, and the verification score is used to determine whether the decrypted data has passed verification. If the verification score of the decrypted data is within a preset security range, the verification of the decrypted data is deemed successful.

4. The method according to claim 3, characterized in that, The step of calculating the verification score of the decrypted data using the second adjustment coefficient, the second modulo parameter, the target hash value, and the private key includes: The verification score is calculated using the following formula: in, This represents the verification score. This represents the hash value of the i-th data block. This represents the second adjustment coefficient. The private key, The second parameter is used for modulo calculation.

5. The method according to any one of claims 3-4, characterized in that, After calculating the verification score of the decrypted data using the second adjustment coefficient, the second modulo parameter, the target hash value, and the private key, the method further includes: Obtain the encryption time of the first communication node and the verification time of the second communication node; Obtain 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; 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 nodes verify the decrypted data, a preset evaluation algorithm is used to calculate the evaluation score of cross-chain communication. The evaluation score is used to measure the reliability of the encrypted data. Based on the correspondence between the grade range and the evaluation score, determine the target grade range in which the evaluation score falls; The reliability of the encrypted data is determined based on the target level range.

6. The method according to claim 5, characterized in that, The evaluation score for cross-chain communication is calculated using a preset evaluation algorithm based on the encryption time, the verification time, the total number of communication nodes, the third adjustment parameter, the weighting coefficient, and the number of times the communication nodes verify the decrypted data. This includes: The assessment score is calculated using the following formula: in, This indicates the evaluation score. This represents the total duration of the encryption time and the verification time. The hash value representing the data block. The third adjustment parameter, This represents the total number of communication nodes. This represents the signal strength of the i-th communication node. This represents the weighting coefficient. This indicates the number of times the i-th base point verifies the decrypted data.

7. A data transmission apparatus, characterized in that, The device, applied to a first communication node, comprises: The acquisition module is used to acquire the data to be transmitted from the blockchain nodes of the blockchain network to which the first communication node belongs; The calculation module is used to divide the data to be transmitted into blocks using a preset data block division algorithm to obtain multiple data blocks; and to calculate the hash value of each data block using a preset hash algorithm. An encryption module is used to obtain a first adjustment coefficient, a first modulo parameter, and a public key corresponding to the first communication node, wherein the adjustment coefficient is used to represent the degree of influence of the hash value on the encrypted data; and to calculate the encrypted data according to a preset encryption algorithm based on the hash value, the first adjustment coefficient, the first modulo parameter, and the public key. The sending module is used to send the encrypted data to the second communication node, so that the second communication node can decrypt the encrypted data using a locally stored private key and a preset decryption algorithm to obtain the plaintext data. The second communication node and the first communication node are deployed on different blockchain networks. The blockchain node is connected to a downstream device, which is an Internet of Things (IoT) device. When the downstream device needs to send data across blockchains, it sends the data to be transmitted to the corresponding blockchain node, and the blockchain node then sends the data to be transmitted to the first communication node in the blockchain network.

8. A data transmission apparatus, characterized in that, The device, applied to a second communication node, includes: A receiving module is used to receive encrypted data sent by a first communication node. The encrypted data is obtained by the first communication node encrypting the hash value of the data to be transmitted using a public key and a preset encryption algorithm. The data to be transmitted is data obtained by the first communication node from a blockchain node in 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. The blockchain node is connected to a downstream device, which is an Internet of Things (IoT) device. When the downstream device needs to send data across blockchains, the downstream device sends the data to be transmitted to the corresponding blockchain node, and the blockchain node sends the data to be transmitted to the first communication node in the blockchain network. 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, which includes the hash value and plaintext of the data block corresponding to the data to be transmitted. The data segmentation module is used to segment the plaintext data into multiple data blocks according to a preset data segmentation algorithm. The calculation module is used to calculate the target hash value of each data block using a preset hash algorithm; obtain a second adjustment coefficient, a second modulo parameter and the private key; and use the second adjustment coefficient, the second modulo parameter, the target hash value and the private key to calculate the verification score of the decrypted data, wherein the verification score is used to determine whether the decrypted data has passed verification. The determination module is used to determine that the verification of the decrypted data has passed if the verification score of the decrypted data is within a preset security range.

9. An electronic device, characterized in that, The device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the data transmission method as described in any one of claims 1-2 or 3-6.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions that, when executed by a processor, implement the data transmission method as described in any one of claims 1-2 or 3-6.