Data transmission method, device, equipment, storage medium and product

By establishing communication links during data transmission and using blockchain and encryption technology, the problem of difficulty in ensuring security and integrity during data transmission is solved, and high security and traceability of the data transmission process is achieved.

CN119071088BActive Publication Date: 2025-02-07GUANGDONG SCI & TECH INFRASTRUCTURE CENT
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411538037.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-02-07
Estimated Expiration
2044-10-31

AI Technical Summary

Technical Problem

During data transmission, data is easily tampered with or stolen by malicious people, and the prior art is difficult to effectively ensure the security and integrity of the data.

Method used

By establishing a communication link, data transmission is carried out using the tampering and encryption methods of the blockchain ledger. The specific steps include encrypting and signing the original request information, verifying the validity of the verification information, generating and encrypting the flag data, and finally preprocessing the target data and transmitting it through the target communication link.

Benefits of technology

It improves the security and integrity of the data transmission process, ensures the credibility and authenticity of the sender and receiver of the data, enhances the traceability of the data transmission process, and provides convenient data security audits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119071088B_ABST
    Figure CN119071088B_ABST
Patent Text Reader

Abstract

The present invention discloses a data transmission method, device, equipment, storage medium and product, the method comprising encrypting and signing the original request information for establishing a target communication link, and sending it to a second terminal; when receiving the verification information returned by the second terminal after verifying the request information, after verifying the validity of the verification information, decrypting the verification information to obtain the original verification information; generating original mark data according to the random data of the original verification information; encrypting and signing the original mark data, and sending it to the second terminal; preprocessing the original target data, and when the target communication link is established, transmitting the processed target data to the second terminal through the target communication link. By encrypting, signing and verifying various information to establish a target communication link, the credibility and security of the target communication link are improved, and the credibility and authenticity of the sender and receiver of the data are guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data transmission technology, and in particular to a data transmission method, device, equipment, storage medium and product. Background Art

[0002] Data often faces multiple security issues during network transmission. Some malicious people may obtain important or core data by impersonating the sender or receiver of the data or by other illegal means. At the same time, data may be tampered with (such as deleting, adding or disrupting data) during data transmission, so the security and integrity of the transmitted data must be guaranteed during the data transmission process. Summary of the invention

[0003] The present invention provides a data transmission method, device, equipment, storage medium and product, which establish a communication link and use blockchain account books that are not easy to tamper with and encryption methods to ensure the security and integrity of transmitted data.

[0004] In order to achieve the above object, an embodiment of the present invention provides a data transmission method, which is applied to a first terminal, and the method includes:

[0005] Encrypting and signing the original request information for establishing the target communication link, and sending the signed request information to the second terminal; wherein the original request information includes the establishment identifier of the target communication link and the port number of the first port of the first terminal;

[0006] Upon receiving the verification information returned by the second terminal after verifying the request information, verifying the validity of the verification information, decrypting the verified verification information, and obtaining the original verification information;

[0007] generating original mark data according to the random data of the original verification information; encrypting and signing the original mark data, and sending the signed mark data to the second terminal;

[0008] The original target data is preprocessed, and when the target communication link is established, the processed target data is transmitted to the second terminal through the target communication link.

[0009] As an improvement of the above solution, when receiving the verification information returned by the second terminal after verifying the request information, verifying the validity of the verification information, decrypting the verified verification information, and obtaining the original verification information, including:

[0010] When receiving the verification information returned by the second terminal after verifying the request information, if the ID of the identity certificate of the second terminal is found in the valid certificate list, the verification information is valid;

[0011] The verified verification information is decrypted using the public key of the transaction certificate of the second terminal to obtain the original verification information.

[0012] As an improvement of the above solution, the preprocessing of the original target data and, when the target communication link is established, transmitting the processed target data to the second terminal through the target communication link comprises:

[0013] Obtain the index address and transmission content of the original target data to form a target data set;

[0014] If the byte length of the target data set is greater than or equal to the preset byte threshold, the target data set is grouped, a transmission sequence number is assigned to each group of data, and an end marker is inserted into the last group of data;

[0015] If the byte length of the target data set is less than a preset byte threshold, inserting an end marker into the target data set as a packet data;

[0016] Each packet of data is encrypted using the private key of the transaction certificate, and each encrypted packet of data is signed using the identity certificate to obtain the processed target data;

[0017] When the target communication link is established, the processed target data is transmitted to the second terminal through the target communication link.

[0018] In order to achieve the above object, an embodiment of the present invention further provides a data transmission method, which is applied to a second terminal, and the method includes:

[0019] Upon receiving the request information for establishing the target communication link sent by the first terminal, verifying the validity of the request information, decrypting the verified request information, and obtaining the original request information;

[0020] Determine a second port from all idle ports and generate original verification information; encrypt and sign the original verification information, and send the signed verification information to the first port of the first terminal according to the original request information; wherein the original verification information includes the port number of the second port and random data;

[0021] When receiving the mark data returned by the first terminal after verifying the verification information, verify the validity of the mark data, decrypt the verified mark data, and obtain the original mark data;

[0022] If the original marker data is identical to the marker data generated according to the random data, establishing the target communication link between the first port and the second port;

[0023] When receiving the target data transmitted by the first terminal through the target communication link, the target data is verified, and the target communication link is closed after the verification passes.

[0024] As an improvement of the above solution, when receiving the target data transmitted by the first terminal through the target communication link, verifying the target data, and closing the target communication link after the verification passes, includes:

[0025] When receiving the target data transmitted by the first terminal through the target communication link, if the ID of the identity certificate of the first terminal is found in the valid certificate list, the target data is valid;

[0026] Decrypting the verified target data using the public key of the transaction certificate of the first terminal to obtain each packet of the target data;

[0027] Reassembling each packet of data according to the transmission sequence number of each packet of data to obtain a target data set, and obtaining original target data according to the target data set;

[0028] Submitting a transaction proposal for the data transmission process of the original target data to the blockchain to save a transmission log of the data transmission process;

[0029] A close flag of the target communication link is sent to the first port, and the second port is released to close the target communication link.

[0030] In order to achieve the above object, an embodiment of the present invention provides a data transmission device, including:

[0031] A request information sending module, used to encrypt and sign the original request information for establishing the target communication link, and send the signed request information to the second terminal; wherein the original request information includes the establishment identifier of the target communication link and the port number of the first port of the first terminal;

[0032] A verification information verification module, configured to verify the validity of the verification information when receiving the verification information returned by the second terminal after verifying the request information, and decrypt the verified verification information to obtain the original verification information;

[0033] A mark data sending module, used to generate original mark data according to the random data of the original verification information; encrypt and sign the original mark data, and send the signed mark data to the second terminal;

[0034] The target data transmission module is used to pre-process the original target data and transmit the processed target data to the second terminal through the target communication link when the target communication link is established.

[0035] In order to achieve the above object, an embodiment of the present invention further provides a data transmission device, including:

[0036] A request information verification module, configured to verify the validity of the request information sent by the first terminal to establish a target communication link, and decrypt the verified request information to obtain the original request information;

[0037] A verification information sending module, used to determine the second port from all idle ports and generate original verification information; encrypt and sign the original verification information, and send the signed verification information to the first port of the first terminal according to the original request information; wherein the original verification information includes the port number of the second port and random data;

[0038] a mark data decryption module, configured to, upon receiving the mark data returned by the first terminal after verifying the verification information, verify the validity of the mark data, and decrypt the verified mark data to obtain the original mark data;

[0039] a communication link establishing module, configured to establish the target communication link between the first port and the second port if the original marking data is the same as the marking data generated according to the random data;

[0040] The target data verification module is used to verify the target data when receiving the target data transmitted by the first terminal through the target communication link, and close the target communication link after the verification is passed.

[0041] In order to achieve the above-mentioned purpose, an embodiment of the present invention provides a data transmission device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and the processor implements the above-mentioned data transmission method when executing the computer program.

[0042] In order to achieve the above purpose, an embodiment of the present invention further provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the above data transmission method.

[0043] To achieve the above objective, an embodiment of the present invention further provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the steps of the above data transmission method.

[0044] Compared with the prior art, the embodiments of the present invention disclose a data transmission method, apparatus, device, storage medium and product, which encrypts and signs the original request information for establishing a target communication link, and sends the signed request information to a second terminal; wherein the original request information includes the establishment identifier of the target communication link and the port number of the first port of the first terminal; when receiving the verification information returned by the second terminal after verifying the request information, verify the validity of the verification information, decrypt the verified verification information, and obtain the original verification information; generate original mark data according to the random data of the original verification information; encrypt and sign the original mark data, and send the signed mark data to the second terminal; pre-process the original target data, and when the target communication link is established, transmit the processed target data to the second terminal through the target communication link. By encrypting, signing and verifying various information, a target communication link is established to improve the credibility and security of the target communication link, and ensure the credibility and authenticity of the sender and receiver of the data; the processed target data is transmitted through the target communication link, and encryption is used to ensure confidentiality during data transmission. The blockchain account book is not easy to be tampered with and encryption means are used to ensure the security and integrity of the transmitted data, so as to improve the traceability of data security events and facilitate data security audits. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 is a flowchart of a first data transmission method provided by an embodiment of the present invention;

[0046] Figure 2 is a flow chart of a second data transmission method provided by an embodiment of the present invention;

[0047] Figure 3 is a structural schematic diagram of a first data transmission device provided by an embodiment of the present invention;

[0048] Figure 4 is a structural schematic diagram of a second data transmission device provided by an embodiment of the present invention;

[0049] Figure 5 It is a structural block diagram of a data transmission device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0050] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0051] It should be noted that the terms "comprises" and "specifically" and any variations of the present invention are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or inherent to these processes, methods, products or apparatuses.

[0052] See also Figure 1 , Figure 1 is a flow chart of a first data transmission method provided by an embodiment of the present invention. The data transmission method is applied to a first terminal, and the method includes:

[0053] S11, encrypting and signing the original request information for establishing the target communication link, and sending the signed request information to the second terminal; wherein the original request information includes the establishment identifier of the target communication link and the port number of the first port of the first terminal;

[0054] S12, upon receiving the verification information returned by the second terminal after verifying the request information, verifying the validity of the verification information, decrypting the verified verification information, and obtaining the original verification information;

[0055] S13, generating original mark data according to the random data of the original verification information; encrypting and signing the original mark data, and sending the signed mark data to the second terminal;

[0056] S14, pre-processing the original target data, and when the target communication link is established, transmitting the processed target data to the second terminal through the target communication link.

[0057] It is worth noting that the data transmission method described in the embodiment of the present invention is implemented by the authentication service platform, which is used to uniformly manage the data transmission of users, such as receiving messages such as the verification request of the identity certificate sent by the terminal, and interacting with the blockchain platform according to the received messages to complete the data transmission process. Data transmission is one-to-one transmission and a reliable connection. Since it is an address index sent, the content is not much and will not affect the transmission efficiency.

[0058] Specifically, the step S11 includes:

[0059] S111, using the private key of the transaction certificate to encrypt the original request information for establishing the target communication link;

[0060] S112: Use the identity certificate to sign the encrypted request information, and send the signed request information to the second terminal.

[0061] For example, the target communication link establishment identifier CRF and the port number (Port-s) of the first port of the first terminal are packaged, encrypted using the private key of the transaction certificate (C-st) of the first terminal, and the encrypted information is signed using the identity certificate (Cert ID-s) of the first terminal. After the signature is completed, it is sent to the second terminal through the blockchain network. The first terminal starts the function of establishing the target communication link, prepares to establish the target communication link with the second terminal, encrypts and signs the original request information for establishing the target communication link, and sends the signed request information to the second terminal through the blockchain network; wherein the original request information includes the target communication link establishment identifier (CRF) and the port number (Port-s) of the first port of the first terminal; the data transmission connection is a network transmission connection, a Bluetooth transmission connection or a near field communication (NFC) transmission connection. When the data transmission connection is a network transmission connection, the first terminal can turn on the transmitter of the wireless network and wait for the second terminal to access.

[0062] Specifically, the step S12 includes:

[0063] S121, when receiving verification information returned by the second terminal after verifying the request information, if the ID of the identity certificate of the second terminal is found in the valid certificate list, the verification information is valid;

[0064] S122: Decrypt the verified verification information using the public key of the transaction certificate of the second terminal to obtain original verification information.

[0065] Exemplarily, first check whether the valid certificate list of the first terminal includes the ID of the identity certificate CertID-r of the second terminal. If it is not in the valid certificate list, then send a request to the authentication service platform through the blockchain network to verify whether Cert ID-r is authentic and legal. If the authentication service platform feedback is the ID of an invalid Cert ID-r, the first terminal directly discards the information of the second terminal. If the authentication service platform feedback is the ID of a valid Cert ID-r, the verification information is valid, and the ID of the Cert ID-r of the second terminal is put into the valid certificate list; if the first terminal finds the ID of Cert ID-r in the local valid certificate list, the verification information is valid; the first terminal uses the public key of the transaction certificate C-rt to decrypt the verified verification information to obtain the original verification information.

[0066] It is worth noting that the valid certificate list of the first terminal and the second terminal is not the same. This certificate list is actually a buffer pool of valid certificates, all of which have validity periods. The Cert ID that has been authenticated by the authentication service platform for the first time will be put into the valid certificate list. Different node transmissions will store the valid certificate list of each node, which will be automatically removed after timeout.

[0067] Specifically, the step S13 includes:

[0068] S131, calculating and obtaining original mark data according to the random data of the original verification information;

[0069] S132, using the private key of the transaction certificate to encrypt the original logo data, using the identity certificate to sign the encrypted logo data, and sending the signed logo data to the second terminal.

[0070] Exemplarily, after the first terminal obtains the original verification information, it calculates the RD value according to the random data (random number R and offset D) of the original verification information, RD=R+D; encrypts the RD value using the private key of the transaction certificate C-st, and signs the encrypted information using the identity certificate Cert ID-s. After the signature is completed, it is sent to the second terminal through the blockchain network.

[0071] Specifically, the step S14 includes:

[0072] S141, obtaining the index address and transmission content of the original target data to form a target data set;

[0073] S142, if the byte length of the target data set is greater than or equal to a preset byte threshold, grouping the target data set, assigning a transmission sequence number to each group of data, and inserting an end marker into the last group of data;

[0074] S143, if the byte length of the target data set is less than a preset byte threshold, inserting an end marker into the target data set as a packet data;

[0075] S144, encrypt each packet of data using the private key of the transaction certificate, and sign each encrypted packet of data using the identity certificate to obtain processed target data;

[0076] S145, when the target communication link is established, the processed target data is transmitted to the second terminal through the target communication link.

[0077] Exemplarily, the index address DI of the original target data and the hash value DH of the transmission content D are obtained through a smart contract, and the index address DI and the hash value DH of the transmission content are packaged to form a target data set; if the byte length of the target data set is greater than or equal to the preset byte threshold X (the value of X can be set as needed, for example, X can be 64 bytes), the target data set is grouped in the order of the byte stream, each group is X-1 bytes in size and is assigned a transmission sequence number (initial value is 1), the transmission sequence number occupies one byte and is located at the first byte position of the group, and the transmission sequence number of each group is incremented by 1. If the last group is less than X-1 bytes, an end marker is inserted at the end of the byte stream, and the end marker occupies one byte. If the last group is exactly X-1 bytes, an additional group is created, and the group includes the transmission sequence number and the end marker. If the byte length of the target data set is less than the preset byte threshold X, an end marker is inserted at the end of the target data set byte stream, and the end marker occupies one byte. The first terminal uses the private key of the transaction certificate C-st to encrypt each packet of data, and uses the identity certificate Cert ID-s to sign each encrypted packet of data. After signing, the processed target data is obtained. When the target communication link is established, the processed target data is transmitted to the second terminal through the target communication link.

[0078] Furthermore, after transmitting the processed target data to the second terminal via the target communication link, the method further includes:

[0079] S15, upon receiving the close identifier returned by the second terminal after verifying the target data, releasing the first port to close the target communication link.

[0080] A data transmission method disclosed in an embodiment of the present invention comprises encrypting and signing original request information for establishing a target communication link, and sending the signed request information to a second terminal; wherein the original request information comprises an establishment identifier of the target communication link and a port number of a first port of the first terminal; upon receiving verification information returned by the second terminal after verifying the request information, verifying the validity of the verification information, decrypting the verified verification information, and obtaining the original verification information; generating original mark data according to random data of the original verification information; encrypting and signing the original mark data, and sending the signed mark data to the second terminal; preprocessing the original target data, and when the target communication link is established, transmitting the processed target data to the second terminal via the target communication link. By encrypting, signing and verifying various information, a target communication link is established to improve the credibility and security of the target communication link, and ensure the credibility and authenticity of the sender and receiver of the data; the processed target data is transmitted through the target communication link, and encryption is used to ensure confidentiality during data transmission. The blockchain account book is not easy to be tampered with and encryption means are used to ensure the security and integrity of the transmitted data, so as to improve the traceability of data security events and facilitate data security audits.

[0081] See also Figure 2 , Figure 2 is a flow chart of a second data transmission method provided by an embodiment of the present invention, the data transmission method is applied to a second terminal, and the method includes:

[0082] S21, upon receiving the request information for establishing the target communication link sent by the first terminal, verifying the validity of the request information, decrypting the verified request information, and obtaining the original request information;

[0083] S22, determining a second port from all idle ports and generating original verification information; encrypting and signing the original verification information, and sending the signed verification information to the first port of the first terminal according to the original request information; wherein the original verification information includes the port number of the second port and random data;

[0084] S23, upon receiving the mark data returned by the first terminal after verifying the verification information, verifying the validity of the mark data, decrypting the verified mark data, and obtaining the original mark data;

[0085] S24, if the original mark data is the same as the mark data generated according to the random data, establishing the target communication link between the first port and the second port;

[0086] S25, upon receiving the target data transmitted by the first terminal through the target communication link, verifying the target data, and closing the target communication link after the verification passes.

[0087] Specifically, the step S21 includes:

[0088] S211, when receiving a request message for establishing a target communication link sent by a first terminal, if the ID of the identity certificate of the first terminal is found in a valid certificate list, the request message is valid;

[0089] S212: Decrypt the verified request information using the public key of the transaction certificate of the first terminal to obtain the original request information.

[0090] Exemplarily, when the second terminal receives the request information (such as wireless network ID, Bluetooth ID, near field communication ID, etc.) sent by the first terminal through the blockchain network to establish the target communication link, it verifies the validity of the request information. If the ID of Cert ID-s is found in the valid certificate list, the request information is valid; if the ID of Cert ID-s is not found in the valid certificate list, the verification request of Cert ID-s is sent to the authentication service platform. The authentication service platform returns the verification result of the ID of CertID-s to the second terminal. After the second terminal receives the verification result sent by the authentication service platform, if the verification result feedback is the ID of invalid Cert ID-s, the second terminal directly discards the information of the first terminal; if the verification result feedback is the ID of valid Cert ID-s, the request information is valid, and the ID of Cert ID-s of the first terminal is placed in the valid certificate list, and the public key of the transaction certificate (C-st) of the first terminal is used to decrypt the verified request information to obtain the original request information (CRF and Port-s).

[0091] Specifically, the step S22 includes:

[0092] S221, if an idle port is found and a second port is determined from the idle ports, random data is generated; the random data and the port number of the second port are combined to obtain original verification information;

[0093] S222, encrypt the original verification information using the private key of the transaction certificate, sign the encrypted verification information using the identity certificate, and send the signed verification information to the first port of the first terminal according to the original request information.

[0094] Exemplarily, the second terminal is queried whether there is an available port (e.g., the port number is greater than 1024). If the second terminal does not have an available port, the second terminal sends the closing identifier SHF of the target communication link to the corresponding port Port-s of the first terminal through the authentication service port (port 113), and the target communication link is not established successfully. If the second terminal has an available port, the second port is determined, random data (random number R and offset D) is generated, packaged together with the port number of the second port (Port-r) and encrypted using the private key of the transaction certificate (C-rt) of the second terminal, and then the encrypted information is signed using the identity certificate (Cert ID-r), and the signed verification information is sent to the corresponding port Port-s of the first terminal through the blockchain network.

[0095] Specifically, the step S23 includes:

[0096] S231, when receiving the flag data returned by the first terminal after verifying the verification information, if the ID of the identity certificate of the first terminal is found in the valid certificate list, the flag data is valid;

[0097] S232: Decrypt the verified mark data using the public key of the transaction certificate of the first terminal to obtain the original mark data.

[0098] Exemplarily, when receiving the mark data returned by the first terminal after verifying the verification information, first query whether the local valid certificate list includes the ID of Cert ID-s. If the ID of Cert ID-s is found in the valid certificate list, the mark data is valid; if the ID of Cert ID-s is not found in the valid certificate list, send a verification request of CertID-s to the authentication service platform. The authentication service platform returns the verification result of the ID of Cert ID-s to the second terminal. After the second terminal receives the verification result sent by the authentication service platform, if the verification result feedback is the ID of invalid Cert ID-s, the second terminal directly discards the information of the first terminal; if the verification result feedback is the ID of valid Cert ID-s, the mark data is valid, and the ID of Cert ID-s of the first terminal is put into the valid certificate list, and the public key of the transaction certificate C-st of the first terminal is used to decrypt the verified mark data to obtain the original mark data (RD value).

[0099] Specifically, the step S24 includes:

[0100] S241, generating mark data according to the random data;

[0101] S242: If the original mark data is the same as the mark data, establishing the target communication link between the first port and the second port.

[0102] S243: If the original mark data is different from the mark data, discard the information of the first terminal.

[0103] Exemplarily, verify whether the RD value of the second terminal is consistent with the RD value sent by the first terminal. If they are consistent, the target communication link is successfully established, the blockchain proposal interface is called, the transaction proposal is submitted to the target communication link log blockchain, and the log record of the establishment of the target communication link is saved;

[0104] Specifically, the step S25 includes:

[0105] S251, when receiving target data transmitted by the first terminal through the target communication link, if the ID of the identity certificate of the first terminal is found in the valid certificate list, the target data is valid;

[0106] S252, using the public key of the transaction certificate of the first terminal to decrypt the verified target data to obtain each packet data of the target data;

[0107] S253, reassembling each packet data according to the transmission sequence number of each packet data to obtain a target data set, and obtaining original target data according to the target data set;

[0108] S254, submitting a transaction proposal of the data transmission process of the original target data to the blockchain to save a transmission log of the data transmission process;

[0109] S255, sending a close identifier of the target communication link to the first port, and releasing the second port to close the target communication link.

[0110] When receiving the target data transmitted by the first terminal through the target communication link, first query whether the local valid certificate list includes the ID of Cert ID-s. If the ID of Cert ID-s is found in the valid certificate list, the flag data is valid; if the ID of Cert ID-s is not found in the valid certificate list, send a verification request of Cert ID-s to the authentication service platform. The authentication service platform returns the verification result of the ID of Cert ID-s to the second terminal. After the second terminal receives the verification result sent by the authentication service platform, if the verification result feedback is the ID of invalid Cert ID-s, the second terminal directly discards the information of the first terminal; if the verification result feedback is the ID of valid Cert ID-s, the flag data is valid, and the ID of Cert ID-s of the first terminal is put into the valid certificate list, and the public key of the transaction certificate C-st of the first terminal is used to decrypt the verified target data, obtain each packet data of the target data, and verify whether there is an end marker. If the data has been transmitted, the packet data is reassembled according to the sequence number of each group. The reassembled information includes the index address DI of the original target data and the transmission content hash value DH. The second terminal can access the data through the index address DI of the original target data; call the blockchain proposal interface, submit the transaction proposal of the data transmission process to the transmission log blockchain, and save the transmission log record to the blockchain; after the data transmission is completed, send the closing flag SHF of the target communication link to the corresponding port of the first terminal, and release the second port to close the target communication link.

[0111] It is worth noting that the calling blockchain proposal interface uses the interface service provided by Hyper ledger Fabric. The first terminal and the second terminal both maintain a valid certificate list on the local computer, which contains information such as computer IP, certificate ID, and certificate validity period. The first terminal and the second terminal have been registered on the alliance chain. After registration, the alliance chain authentication service platform issues an identity certificate Cert ID-s and a transaction certificate C-st to the first terminal, and an identity certificate Cert ID-r and a transaction certificate C-rt to the second terminal. The public key used for encryption by the second terminal can be queried in the transaction certificate C-st, and the public key used for encryption by the first terminal can be queried in the transaction certificate C-rt.

[0112] Further, after establishing the target communication link between the first port and the second port, the method further includes:

[0113] S26: If it is detected that the duration of the target communication link exceeds the specified duration and the target data transmitted by the first terminal through the target communication link is not received, the target communication link is closed.

[0114] If it is detected that the duration of the target communication link exceeds the specified duration, and target data transmitted by the first terminal through the target communication link is received, the duration of the target communication link is extended until the target data transmission is completed.

[0115] It is worth noting that the target communication link established between the first terminal and the second terminal includes timestamp information, and the duration of the target communication link can be set to 30 minutes.

[0116] A data transmission method disclosed in an embodiment of the present invention comprises encrypting and signing original request information for establishing a target communication link, and sending the signed request information to a second terminal; wherein the original request information comprises an establishment identifier of the target communication link and a port number of a first port of the first terminal; upon receiving verification information returned by the second terminal after verifying the request information, verifying the validity of the verification information, decrypting the verified verification information, and obtaining the original verification information; generating original mark data according to random data of the original verification information; encrypting and signing the original mark data, and sending the signed mark data to the second terminal; preprocessing the original target data, and when the target communication link is established, transmitting the processed target data to the second terminal via the target communication link. By encrypting, signing and verifying various information, a target communication link is established to improve the credibility and security of the target communication link, and ensure the credibility and authenticity of the sender and receiver of the data; the processed target data is transmitted through the target communication link, and encryption is used to ensure confidentiality during data transmission. The blockchain account book is not easy to be tampered with and encryption means are used to ensure the security and integrity of the transmitted data, so as to improve the traceability of data security events and facilitate data security audits.

[0117] See also Figure 3 , Figure 3 1 is a schematic diagram of the structure of a first data transmission device 10 provided in an embodiment of the present invention. The data transmission device 10 includes:

[0118] The request information sending module 11 is used to encrypt and sign the original request information for establishing the target communication link, and send the signed request information to the second terminal; wherein the original request information includes the establishment identifier of the target communication link and the port number of the first port of the first terminal;

[0119] The verification information verification module 12 is used to verify the validity of the verification information when receiving the verification information returned by the second terminal after verifying the request information, and decrypt the verified verification information to obtain the original verification information;

[0120] The mark data sending module 13 is used to generate original mark data according to the random data of the original verification information; encrypt and sign the original mark data, and send the signed mark data to the second terminal;

[0121] The target data transmission module 14 is used to pre-process the original target data, and when the target communication link is established, transmit the processed target data to the second terminal through the target communication link.

[0122] Specifically, the request information sending module 11 is used to:

[0123] The original request information for establishing the target communication link is encrypted using the private key of the transaction certificate;

[0124] The encrypted request information is signed using the identity certificate, and the signed request information is sent to the second terminal.

[0125] Specifically, the verification information verification module 12 is used to:

[0126] When receiving the verification information returned by the second terminal after verifying the request information, if the ID of the identity certificate of the second terminal is found in the valid certificate list, the verification information is valid;

[0127] The verified verification information is decrypted using the public key of the transaction certificate of the second terminal to obtain the original verification information.

[0128] Specifically, the flag data sending module 13 is used to:

[0129] Calculate the original mark data according to the random data of the original verification information;

[0130] The original logo data is encrypted using the private key of the transaction certificate, the encrypted logo data is signed using the identity certificate, and the signed logo data is sent to the second terminal.

[0131] Specifically, the target data transmission module 14 is used to:

[0132] Obtain the index address and transmission content of the original target data to form a target data set;

[0133] If the byte length of the target data set is greater than or equal to a preset byte threshold, the target data set is grouped, a transmission sequence number is assigned to each group of data, and an end marker is inserted into the last group of data;

[0134] If the byte length of the target data set is less than a preset byte threshold, inserting an end marker into the target data set as a packet data;

[0135] Each packet of data is encrypted using the private key of the transaction certificate, and each encrypted packet of data is signed using the identity certificate to obtain the processed target data;

[0136] When the target communication link is established, the processed target data is transmitted to the second terminal through the target communication link.

[0137] Furthermore, the data transmission device 10 further includes:

[0138] The communication link closing module is used to release the first port to close the target communication link when receiving the closing identifier returned by the second terminal after verifying the target data.

[0139] A data transmission device 10 provided in an embodiment of the present invention can implement all processes of the data transmission method of the above embodiment. The functions of each module in the device and the technical effects achieved are respectively the same as the functions and technical effects achieved by the data transmission method of the above embodiment, and will not be repeated here.

[0140] See also Figure 4 , Figure 4 is a schematic diagram of the structure of a second data transmission device 20 provided in an embodiment of the present invention. The data transmission device 20 includes:

[0141] The request information verification module 21 is used to verify the validity of the request information sent by the first terminal to establish the target communication link, and decrypt the verified request information to obtain the original request information;

[0142] A verification information sending module 22 is used to determine the second port from all idle ports and generate original verification information; encrypt and sign the original verification information, and send the signed verification information to the first port of the first terminal according to the original request information; wherein the original verification information includes the port number of the second port and random data;

[0143] The mark data decryption module 23 is used to verify the validity of the mark data when receiving the mark data returned by the first terminal after verifying the verification information, and decrypt the verified mark data to obtain the original mark data;

[0144] a communication link establishing module 24, configured to establish the target communication link between the first port and the second port if the original marking data is the same as the marking data generated according to the random data;

[0145] The target data verification module 25 is used to verify the target data when receiving the target data transmitted by the first terminal through the target communication link, and close the target communication link after the verification is passed.

[0146] Specifically, the request information verification module 21 is used to:

[0147] When receiving a request message for establishing a target communication link sent by a first terminal, if the ID of the identity certificate of the first terminal is found in the valid certificate list, the request message is valid;

[0148] The verified request information is decrypted using the public key of the transaction certificate of the first terminal to obtain the original request information.

[0149] Specifically, the verification information sending module 22 is used to:

[0150] If an idle port is found and a second port is determined from the idle ports, random data is generated; the random data and the port number of the second port are combined to obtain original verification information;

[0151] The original verification information is encrypted using a private key of the transaction certificate, the encrypted verification information is signed using an identity certificate, and the signed verification information is sent to the first port of the first terminal according to the original request information.

[0152] Specifically, the logo data decryption module 23 is used to:

[0153] When receiving the flag data returned by the first terminal after verifying the verification information, if the ID of the identity certificate of the first terminal is found in the valid certificate list, the flag data is valid;

[0154] The verified mark data is decrypted using the public key of the transaction certificate of the first terminal to obtain the original mark data.

[0155] Specifically, the communication link establishing module 24 is used to:

[0156] Mark data generated according to the random data;

[0157] If the original tag data is the same as the tag data, the target communication link is established between the first port and the second port.

[0158] Specifically, the target data verification module 25 is used to:

[0159] When receiving the target data transmitted by the first terminal through the target communication link, if the ID of the identity certificate of the first terminal is found in the valid certificate list, the target data is valid;

[0160] Decrypting the verified target data using the public key of the transaction certificate of the first terminal to obtain each packet of the target data;

[0161] Reassembling each packet of data according to the transmission sequence number of each packet of data to obtain a target data set, and obtaining original target data according to the target data set;

[0162] Submitting a transaction proposal for the data transmission process of the original target data to the blockchain to save a transmission log of the data transmission process;

[0163] A close flag of the target communication link is sent to the first port, and the second port is released to close the target communication link.

[0164] Furthermore, the data transmission device 20 further includes:

[0165] The communication link detection module is used to close the target communication link if it is detected that the duration of the target communication link exceeds a specified duration and the target data transmitted by the first terminal through the target communication link is not received.

[0166] A data transmission device 20 provided in an embodiment of the present invention can implement all processes of the data transmission method of the above embodiment. The functions of each module in the device and the technical effects achieved are respectively the same as the functions and technical effects achieved by the data transmission method of the above embodiment, and will not be repeated here.

[0167] See also Figure 5 , Figure 52 is a schematic diagram of the structure of a data transmission device 200 provided in an embodiment of the present invention. The data transmission device 200 of this embodiment includes: a processor 201, a memory 202, and a computer program stored in the memory 202 and executable on the processor 201. When the processor 201 executes the computer program, the steps in the above-mentioned data transmission method embodiment are implemented. Alternatively, when the processor 201 executes the computer program, the functions of each module in the above-mentioned data transmission device embodiment are implemented.

[0168] Exemplarily, the computer program may be divided into one or more modules, which are stored in the memory 202 and executed by the processor 201 to implement the present invention. The one or more modules may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program in the data transmission device 200.

[0169] The data transmission device may be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The data transmission device may include, but is not limited to, a processor 201 and a memory 202. Those skilled in the art may understand that the schematic diagram is only an example of the data transmission device 200 and does not constitute a limitation on the data transmission device 200. The data transmission device 200 may include more or fewer components than shown in the figure, or may combine certain components, or different components. For example, the data transmission device 200 may also include input and output devices, network access devices, buses, etc.

[0170] The processor 201 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor 201 is the control center of the data transmission device 200, and uses various interfaces and lines to connect various parts of the entire data transmission device 200.

[0171] The memory 202 can be used to store the computer program and / or module. The processor 201 implements various functions of the data transmission device 200 by running or executing the computer program and / or module stored in the memory 202 and calling the data stored in the memory 202. The memory 202 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 202 can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0172] Wherein, if the module integrated in the data transmission device 200 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor 201, the steps of the above-mentioned various method embodiments can be implemented. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media does not include electrical carrier signals and telecommunication signals.

[0173] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.

[0174] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the data transmission method as described in the above embodiment.

[0175] In addition, an embodiment of the present invention further provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the steps of the data transmission method of the above embodiment.

[0176] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A data transmission method, characterized in that: Applied to a first terminal, the method includes: Encrypting and signing the original request information for establishing the target communication link, and sending the signed request information to the second terminal; wherein the original request information includes the establishment identifier of the target communication link and the port number of the first port of the first terminal; Upon receiving the verification information returned by the second terminal after verifying the request information, verifying the validity of the verification information, decrypting the verified verification information, and obtaining the original verification information; generating original mark data according to the random data of the original verification information; encrypting and signing the original mark data, and sending the signed mark data to the second terminal; preprocessing the original target data, and when the target communication link is established, transmitting the processed target data to the second terminal through the target communication link; Among them, the implementation conditions for completing the establishment of the target communication link include, when the second terminal receives the flag data returned by the first terminal after verifying the verification information, verifying the validity of the flag data, decrypting the verified flag data, and obtaining the original flag data; if the original flag data is the same as the flag data generated according to the random data, establishing the target communication link between the first port and the second port.

2. The data transmission method according to claim 1, characterized in that: The receiving of the verification information returned by the second terminal after verifying the request information, verifying the validity of the verification information, decrypting the verified verification information, and obtaining the original verification information, including: When receiving the verification information returned by the second terminal after verifying the request information, if the ID of the identity certificate of the second terminal is found in the valid certificate list, the verification information is valid; The verified verification information is decrypted using the public key of the transaction certificate of the second terminal to obtain the original verification information.

3. The data transmission method according to claim 1, characterized in that: The preprocessing of the original target data and, when the target communication link is established, transmitting the processed target data to the second terminal through the target communication link comprises: Obtain the index address and transmission content of the original target data to form a target data set; If the byte length of the target data set is greater than or equal to a preset byte threshold, the target data set is grouped, a transmission sequence number is assigned to each group of data, and an end marker is inserted into the last group of data; If the byte length of the target data set is less than a preset byte threshold, inserting an end marker into the target data set as a packet data; Each packet of data is encrypted using the private key of the transaction certificate, and each encrypted packet of data is signed using the identity certificate to obtain the processed target data; When the target communication link is established, the processed target data is transmitted to the second terminal through the target communication link.

4. A data transmission method, characterized in that: Applied to the second terminal, the method includes: Upon receiving the request information for establishing the target communication link sent by the first terminal, verifying the validity of the request information, decrypting the verified request information, and obtaining the original request information; Determine a second port from all idle ports and generate original verification information; encrypt and sign the original verification information, and send the signed verification information to the first port of the first terminal according to the original request information; wherein the original verification information includes the port number of the second port and random data; When receiving the mark data returned by the first terminal after verifying the verification information, verify the validity of the mark data, decrypt the verified mark data, and obtain the original mark data; If the original marker data is identical to the marker data generated according to the random data, establishing the target communication link between the first port and the second port; When receiving the target data transmitted by the first terminal through the target communication link, the target data is verified, and the target communication link is closed after the verification passes.

5. The data transmission method according to claim 4, characterized in that: When receiving the target data transmitted by the first terminal through the target communication link, verifying the target data, and closing the target communication link after the verification passes, comprises: When receiving the target data transmitted by the first terminal through the target communication link, if the ID of the identity certificate of the first terminal is found in the valid certificate list, the target data is valid; Decrypting the verified target data using the public key of the transaction certificate of the first terminal to obtain each packet of the target data; Reassembling each packet of data according to the transmission sequence number of each packet of data to obtain a target data set, and obtaining original target data according to the target data set; Submitting a transaction proposal for the data transmission process of the original target data to the blockchain to save a transmission log of the data transmission process; A close flag of the target communication link is sent to the first port, and the second port is released to close the target communication link.

6. A data transmission device, characterized in that: include: A request information sending module, used to encrypt and sign the original request information for establishing the target communication link, and send the signed request information to the second terminal; wherein the original request information includes the establishment identifier of the target communication link and the port number of the first port of the first terminal; A verification information verification module, configured to verify the validity of the verification information when receiving the verification information returned by the second terminal after verifying the request information, and decrypt the verified verification information to obtain the original verification information; A mark data sending module, used to generate original mark data according to the random data of the original verification information; encrypt and sign the original mark data, and send the signed mark data to the second terminal; A target data transmission module, used for preprocessing the original target data, and when the target communication link is established, transmitting the processed target data to the second terminal through the target communication link; Among them, the implementation conditions for completing the establishment of the target communication link include, when the second terminal receives the flag data returned by the first terminal after verifying the verification information, verifying the validity of the flag data, decrypting the verified flag data, and obtaining the original flag data; if the original flag data is the same as the flag data generated according to the random data, establishing the target communication link between the first port and the second port.

7. A data transmission device, characterized in that: include: A request information verification module, configured to verify the validity of the request information sent by the first terminal to establish a target communication link, and decrypt the verified request information to obtain the original request information; A verification information sending module, used to determine the second port from all idle ports and generate original verification information; encrypt and sign the original verification information, and send the signed verification information to the first port of the first terminal according to the original request information; wherein the original verification information includes the port number of the second port and random data; a mark data decryption module, configured to, upon receiving the mark data returned by the first terminal after verifying the verification information, verify the validity of the mark data, and decrypt the verified mark data to obtain the original mark data; a communication link establishing module, configured to establish the target communication link between the first port and the second port if the original marking data is the same as the marking data generated according to the random data; The target data verification module is used to verify the target data when receiving the target data transmitted by the first terminal through the target communication link, and close the target communication link after the verification is passed.

8. A data transmission device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the data transmission method according to any one of claims 1 to 5 when executing the computer program.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the data transmission method according to any one of claims 1 to 5.

10. A computer program product, characterized in that The computer program product is stored in a storage medium, and the program product is executed by at least one processor to implement the steps of the data transmission method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Controller trusted data transmission system and method

    CN117294776A

  • Method and apparatus used for data transmission, router and internet of things device

    WO2023226478A1