CN112231765A - Data transmission method and device, electronic equipment and storage medium - Google Patents

Data transmission method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112231765A
CN112231765A CN202011024843.7A CN202011024843A CN112231765A CN 112231765 A CN112231765 A CN 112231765A CN 202011024843 A CN202011024843 A CN 202011024843A CN 112231765 A CN112231765 A CN 112231765A
Authority
CN
China
Prior art keywords
information
target file
file
transmission data
transmission
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011024843.7A
Other languages
Chinese (zh)
Inventor
匡海健
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202011024843.7A priority Critical patent/CN112231765A/en
Publication of CN112231765A publication Critical patent/CN112231765A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services

Abstract

The invention discloses a data transmission method, a data transmission device, electronic equipment and a storage medium, and relates to the technical field of computers. One embodiment of the method comprises: determining file information of a target file, and transmitting the file information to a block chain, wherein the file information comprises the target file; receiving encryption information returned by the block chain, wherein the encryption information comprises information obtained by encrypting the file information by the block chain; encrypting transmission data of the target file according to a preset secret key to obtain transmission information, wherein the transmission data comprises the encrypted information; and transmitting the transmission information to a receiving end. The implementation method can solve the problems that the received data is inaccurate and the processing of the received data by the receiving end is inconvenient because the encrypted data can be tampered in the transmission process.

Description

Data transmission method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for data transmission, an electronic device, and a storage medium.
Background
In the data transmission process, in order to avoid the transmission data from being tampered with and ensure the accuracy of the transmission data, the transmission data is usually encrypted. For example, the sending end may encrypt the transmitted data by using a preset encryption algorithm, and then send the encrypted data to the receiving end, and the receiving end decrypts the data after receiving the encrypted data, and then obtains the transmitted data.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
in some scenarios, encrypted data can still be tampered in the transmission process, resulting in inaccuracy of received data, and further inconvenience is brought to the processing of the received data by the receiving end.
Disclosure of Invention
In view of this, embodiments of the present invention provide a tamper-resistant method, apparatus, system and storage medium, which can solve the problem that encrypted data is tampered during transmission, so that the received data is inaccurate, and processing of the received data by a receiving end is inconvenient.
To achieve the above object, according to an aspect of an embodiment of the present invention, a method of data transmission is provided.
The data transmission method of the embodiment of the invention is used for a sending end and comprises the following steps: determining file information of a target file, and transmitting the file information to a block chain, wherein the file information comprises the target file; receiving encryption information returned by the block chain, wherein the encryption information comprises information obtained by encrypting the file information by the block chain; encrypting transmission data of the target file according to a preset secret key to obtain transmission information, wherein the transmission data comprises the encryption information; and sending the transmission information to a receiving end.
In one embodiment, the file information includes an identification of the target file and time information of the target file.
In another embodiment, the encryption information includes an identifier of the target file and a hash value corresponding to the target file, where the hash value is a hash value of the blockchain after encrypting the file information.
In yet another embodiment, the preset key comprises a first key and a second key;
the encrypting the transmission data of the target file according to the preset secret key to obtain the transmission information comprises the following steps:
encrypting the transmission data through the first secret key to obtain first transmission information;
encrypting the first transmission information through the second secret key to obtain second transmission information;
the sending the transmission information to a receiving end includes:
and sending the second transmission information to the receiving end.
In another embodiment, the first key is a key corresponding to the receiving end, and the second key is a key corresponding to the sending end.
In another embodiment, after the sending the data to be transmitted to the receiving end, the method further includes:
receiving request information sent by the block chain, wherein the request information comprises an identifier of the target file;
inquiring file information of the target file according to the identification of the target file;
and sending the file information of the target file to the block chain.
In yet another embodiment, the transmission data further includes time information of the target file.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a method of data transmission.
The data transmission method of the embodiment of the invention is used for a receiving end and comprises the following steps: receiving transmission information sent by a sending end; decrypting the transmission information according to a preset secret key to obtain transmission data, wherein the transmission data comprise encrypted information corresponding to the target file; transmitting the transmission data to a block chain; and receiving a target file returned by the block chain.
In one embodiment, the encryption information includes an identification of the target file and a hash value corresponding to the target file.
In yet another embodiment, the preset key comprises a first key and a second key;
the decrypting the transmission information according to the preset secret key to obtain the transmission data comprises the following steps:
decrypting the transmission information through the second secret key to obtain first transmission information;
and decrypting the first transmission data through the first secret key to obtain the transmission data.
In another embodiment, the second key is a key corresponding to the sending end, and the first key is a key corresponding to the receiving end.
In yet another embodiment, the transmission data further includes time information corresponding to the target file.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a method of data transmission.
The data transmission method of the embodiment of the invention is used for a block chain and comprises the following steps: receiving file information of a target file sent by a sending end, wherein the file information comprises the target file; encrypting the file information to obtain encrypted information, and storing the file information and the encrypted information; sending the encryption information to the sending end; receiving transmission data sent by a receiving end, and determining a target file corresponding to the transmission data according to the transmission data, the encryption information and the file information; and sending the target file corresponding to the transmission data to the receiving end.
In one embodiment, the encryption information includes an identifier of the target file and a hash value corresponding to the target file, and the transmission data includes the identifier of the target file and the hash value corresponding to the target file;
the determining a target file corresponding to the transmission data according to the transmission data, the encryption information and the file information includes:
inquiring a hash value corresponding to the target file in the encrypted information according to the identifier of the target file in the transmission data and the identifier of the target file in the encrypted information;
judging whether the hash value corresponding to the target file in the transmission data is consistent with the hash value corresponding to the target file in the encrypted information;
and if so, determining a target file corresponding to the transmission data from the file information according to the identification of the target file in the transmission data.
In yet another embodiment, further comprising:
if not, sending request information to the sending end, wherein the request information comprises the identification of the target file in the transmission data;
receiving return information sent by the sending end, wherein the return information comprises a target file;
and determining a target file corresponding to the transmission data according to the return information.
In yet another embodiment, the file information further includes time information of the target file, and the transmission data further includes time information of the target file;
the determining, according to the identifier of the target file in the transmission data, the target file corresponding to the transmission data from the file information includes:
inquiring file information corresponding to the transmission data according to the identification of the target file in the transmission data;
judging whether the time information of the target file in the transmission data is consistent with the time information of the target file in the file information corresponding to the transmission data;
and if so, determining the target file in the file information corresponding to the transmission data as the target file corresponding to the transmission data.
In yet another embodiment, the file information further includes time information of the target file;
after the storing the file information, further comprising:
and for each target file, determining the storage time of the target file according to the time information of the target file, and deleting the target file when the storage time is greater than a preset threshold value.
To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided an apparatus for data transmission.
The data transmission device of the embodiment of the invention is arranged at a sending end and comprises: the device comprises a sending unit, a receiving unit and a sending unit, wherein the sending unit is used for determining file information of a target file and transmitting the file information to a block chain, and the file information comprises the target file; a receiving unit, configured to receive encrypted information returned by the block chain, where the encrypted information includes information obtained by encrypting the file information by the block chain; the encryption unit is used for encrypting the transmission data of the target file according to a preset secret key to obtain transmission information, and the transmission data comprises the encryption information; and the comparison unit is used for sending the transmission information to a receiving end.
In one embodiment, the file information includes an identification of the target file and time information of the target file.
In another embodiment, the encryption information includes an identifier of the target file and a hash value corresponding to the target file, where the hash value is a hash value of the blockchain after encrypting the file information.
In yet another embodiment, the preset key comprises a first key and a second key;
the encryption unit is specifically configured to encrypt the transmission data by using the first secret key to obtain first transmission information; encrypting the first transmission information through the second secret key to obtain second transmission information;
the sending unit is specifically configured to send the second transmission information to the receiving end
In another embodiment, the first key is a key corresponding to the receiving end, and the second key is a key corresponding to the sending end.
In another embodiment, the receiving unit is further configured to send request information to the blockchain, where the request information includes an identifier of the target file;
the device further comprises:
the query unit is used for querying the file information of the target file according to the identifier of the target file;
the sending unit is further configured to send the file information of the target file to the block chain.
In yet another embodiment, the transmission data further includes time information of the target file.
To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided an apparatus for data transmission.
The data transmission device of the embodiment of the invention is arranged at a receiving end and comprises: the receiving unit is used for receiving the transmission information sent by the sending end; the decryption unit is used for decrypting the transmission information according to a preset secret key to obtain transmission data, and the transmission data comprises encrypted information corresponding to the target file; a sending unit, configured to transmit the transmission data to a block chain; the receiving unit is further configured to receive a target file returned by the blockchain.
In one embodiment, the encryption information includes an identification of the target file and a hash value corresponding to the target file.
In yet another embodiment, the preset key comprises a first key and a second key;
the decryption unit is specifically configured to:
decrypting the transmission information through the second secret key to obtain first transmission information;
and decrypting the first transmission data through the first secret key to obtain the transmission data.
In another embodiment, the second key is a key corresponding to the sending end, and the first key is a key corresponding to the receiving end.
In yet another embodiment, the transmission data further includes time information corresponding to the target file.
To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided an apparatus for data transmission.
The data transmission device of the embodiment of the invention is arranged in a block chain and comprises: the receiving unit is used for receiving file information of a target file sent by a sending end, wherein the file information comprises the target file; the encryption unit is used for encrypting the file information to obtain encryption information and storing the file information and the encryption information; a sending unit, configured to send the encryption information to the sending end; the determining unit is used for receiving transmission data sent by a receiving end and determining a target file corresponding to the transmission data according to the transmission data, the encryption information and the file information; the sending unit is further configured to send the target file corresponding to the transmission data to the receiving end.
In one embodiment, the encryption information includes an identifier of the target file and a hash value corresponding to the target file, and the transmission data includes the identifier of the target file and the hash value corresponding to the target file;
the determining unit is specifically configured to:
inquiring a hash value corresponding to the target file in the encrypted information according to the identifier of the target file in the transmission data and the identifier of the target file in the encrypted information;
judging whether the hash value corresponding to the target file in the transmission data is consistent with the hash value corresponding to the target file in the encrypted information;
and if so, determining a target file corresponding to the transmission data from the file information according to the identification of the target file in the transmission data.
In another embodiment, the determining unit is specifically configured to:
if not, sending request information to the sending end, wherein the request information comprises the identification of the target file in the transmission data;
receiving return information sent by the sending end, wherein the return information comprises a target file;
and determining a target file corresponding to the transmission data according to the return information.
In yet another embodiment, the file information further includes time information of the target file, and the transmission data further includes time information of the target file;
the determining unit is specifically configured to:
inquiring file information corresponding to the transmission data according to the identification of the target file in the transmission data;
judging whether the time information of the target file in the transmission data is consistent with the time information of the target file in the file information corresponding to the transmission data;
and if so, determining the target file in the file information corresponding to the transmission data as the target file corresponding to the transmission data.
In yet another embodiment, the file information further includes time information of the target file;
the device further comprises:
and the deleting unit is used for determining the storage time of each target file according to the time information of the target file and deleting the target file when the storage time is greater than a preset threshold value.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided an electronic apparatus.
An electronic device of an embodiment of the present invention includes: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the data transmission method provided by the embodiment of the invention.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a computer-readable medium.
A computer-readable medium of an embodiment of the present invention stores thereon a computer program, which when executed by a processor implements the method for data transmission provided by an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: in the embodiment of the invention, a sending end transmits file information of a target file to a block chain, the block chain encrypts the file information and then returns encrypted information, the sending end encrypts transmission data comprising the encrypted information through a preset secret key and then sends the encrypted transmission data to a receiving end, and after the receiving end decrypts the transmission data, the target file can be obtained from the block chain through the transmission data. Therefore, data stored in the block chain is difficult to tamper, and the sending end and the receiving end do not transmit the target file in the embodiment of the invention, so that the target file to be transmitted can be prevented from being tampered, and the accuracy of the target file acquired by the receiving end is ensured.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic diagram of a main flow of a method of data transmission according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of another main flow of a method of data transmission according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of another main flow of a method of data transmission according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of the main elements of an apparatus for data transmission according to an embodiment of the present invention;
FIG. 5 is yet another schematic diagram of the main elements of an apparatus for data transmission according to an embodiment of the present invention;
FIG. 6 is another schematic diagram of the main elements of an apparatus for data transmission according to an embodiment of the present invention;
FIG. 7 is a diagram of yet another exemplary system architecture to which embodiments of the present invention may be applied;
FIG. 8 is a schematic block diagram of a computer system suitable for use in implementing embodiments of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict.
The embodiment of the invention provides a data transmission system which can be used for data transmission between a sending end and a receiving end. Specifically, the system may include a transmitting end, a receiving end, and a block chain. The sending end and the receiving end may be terminals, servers, and the like, and the block chain may be a device, equipment, a server, and the like, in which the block chain is set. The sending end is a sending end for transmitting data, the receiving end is a receiving end for transmitting data, and the sending end, the receiving end and the block chain can all communicate. In the embodiment of the present invention, the blockchain may also be set at the transmitting end or the receiving end.
An embodiment of the present invention provides a method for data transmission, where the method may be performed by a sending end, as shown in fig. 1, and the method includes the following steps.
S101: and determining the file information of the target file and transmitting the file information to the block chain.
Wherein the file information comprises a target file.
The target file is a file to be transmitted to the receiving end, that is, transmission data. The target file may be generated by the sender, or may be received by the sender from another device or server. In the embodiment of the invention, the target file is taken as the clearing file generated by the sending end as an example, and after the sending end generates the clearing file, the clearing file to be transmitted, namely the target file, can be determined.
After determining the target file, the sending end may transmit the target file to the block chain, so that the block chain stores the target file.
It should be noted that the file information may further include an identifier of the target file, so as to identify the file information of each target file in the blockchain. For some target files, it may have timeliness, for example, a clearing file, so in this embodiment of the present invention, the file information may further include time information corresponding to the target file, specifically, a timestamp corresponding to the target file, such as a timestamp when the target file is generated.
S102: and receiving the encryption information returned by the block chain.
The encryption information comprises information obtained by encrypting the file information by the block chain.
After receiving the file information of the target file sent by the sending end, the block chain encrypts and stores the file information, namely encrypts the file information, so that encrypted information of the encrypted file information of the target file can be obtained, and then the encrypted information is sent to the sending end, so that the sending end can transmit the encrypted information to the receiving end.
The encryption mode of the file information in the block chain may be an algorithm such as SHA256, and the hash value of the file information may be calculated through encryption, so that the hash value obtained after encrypting the file information is the hash value, that is, the hash value corresponding to the file information.
After the sending end receives the encrypted information, the hash value of the target file can be determined according to the identification of the target file, and the hash value is stored.
S103: and encrypting the transmission data of the target file according to a preset secret key to obtain transmission information.
Wherein the transmission data includes encryption information.
In the embodiment of the invention, the sending end encrypts the transmission data corresponding to the target file by a preset secret key to obtain the transmission information after encryption. Specifically, the transmission data may include encryption information, so that the transmission data of the target file is the encryption information of the target file. Also, the transmission data may further include time information, so the transmission data of the target file may further include time information of the target file.
In this embodiment of the present invention, the preset key may include a first key and a second key, where the first key is a key corresponding to the receiving end, and the second key is a key corresponding to the sending end. Therefore, the step of obtaining the transmission information in this step can be specifically performed as: encrypting the transmission data through a first secret key to obtain first transmission information; and encrypting the first transmission information through the second secret key to obtain second transmission information.
In the above step, the key corresponding to the receiving end is the key provided by the receiving end, and is used as the public key of the sending end to encrypt the transmission data first, so as to obtain the first transmission information. The second target is a secret key corresponding to the sending end, namely a private key of the sending end, and after the sending end obtains the first transmission information, the first transmission information can be encrypted through the second secret key to obtain second transmission information. Specifically, the manner of encrypting the first transmission information by the second key may be to perform signature encryption on the first transmission information by the second key to obtain the second transmission information.
S104: and transmitting the transmission information to a receiving end.
After the sending end obtains the transmission information, the sending end can send the transmission information to the receiving end, so that the receiving end can conveniently obtain the target file from the block chain through the transmission information. Specifically, in step S103, when the transmission data is encrypted by the first secret key and the second secret key, the sending end may send the obtained second transmission information to the receiving end in this step.
In an implementation manner of the embodiment of the present invention, after the step, the method may further include: receiving request information sent by a block chain, wherein the request information comprises an identifier of a target file; inquiring file information of the target file according to the identification of the target file; and sending the file information of the target file to the block chain.
The block chain may send request information to the sending end to reacquire file information of the target file when it is determined that the target file is tampered, and the request information may include an identifier of the target file. The sending end inquires out the target file and the file information of the target file according to the identifier in the request information, and then sends the file information of the target file to the block chain.
In the embodiment of the invention, a sending end transmits file information of a target file to a block chain, the block chain encrypts the file information and then returns encrypted information, the sending end encrypts transmission data comprising the encrypted information through a preset secret key and then sends the encrypted transmission data to a receiving end, and after the receiving end decrypts the transmission data, the target file can be obtained from the block chain through the transmission data. Therefore, data stored in the block chain is difficult to tamper, and the sending end and the receiving end do not transmit the target file in the embodiment of the invention, so that the target file to be transmitted can be prevented from being tampered, and the accuracy of the target file acquired by the receiving end is ensured.
In conjunction with the embodiment shown in fig. 1, the embodiment of the present invention provides a method for data transmission, which may be performed by a receiving end, as shown in fig. 2, and includes the following steps.
S201: and receiving the transmission information sent by the sending end.
The receiving end can receive transmission information sent by the sending end, and the transmission information is information obtained by encrypting transmission data by the sending end. The transmission data may include encryption information corresponding to the target file.
S202: and decrypting the transmission information according to the preset secret key to obtain the transmission data.
The transmission data may include encrypted information corresponding to a target file, where the target file is a file that needs to be transmitted from the sending end to the receiving end. Specifically, the encryption information may include an identifier of the target file and a hash value corresponding to the target file, where the hash value is obtained by encrypting file information of the target file by using the block chain.
In this embodiment of the present invention, the preset secret key may include a first secret key and a second secret key, the second secret key may be a secret key corresponding to the sending end, and the first secret key may be a secret key corresponding to the receiving end. When encrypting transmission data, the sending end firstly encrypts the transmission data through the first secret key to obtain first transmission information, and then encrypts the first transmission information through the second secret key to obtain second transmission information, namely, the transmission information received by the receiving end, so that the steps can be specifically executed as follows: decrypting the transmission information through a second secret key to obtain first transmission information; and decrypting the first transmission data through the first secret key to obtain the transmission data. The decrypting of the transmission information by the second key may specifically be verifying whether signature information of the transmission information is tampered with by the second key, and if the signature information of the transmission information is not tampered with, the decrypting may be continuously performed; if the data is tampered, which indicates that the transmission data may have been tampered, the transmission data received by the receiving end is inaccurate, and at this time, the receiving end may send a request to the sending end again to retrieve the transmission data.
It should be noted that the transmission data may further include time information corresponding to the target file, so that the receiving end can more accurately obtain the target file.
S203: the transmission data is transmitted to the block chain.
After the receiving end decrypts the transmission data, the transmission data can be transmitted to the block chain, so that the block chain determines the target file corresponding to the receiving end according to the transmission data, and the target file corresponding to the receiving end is the target file which needs to be transmitted to the receiving end by the sending end.
S204: and receiving the target file returned by the block chain.
After determining the target file corresponding to the receiving end according to the transmission data, the block chain can return the target file to the receiving end, so that the receiving end can receive the target file returned by the block chain, and the target file is transmitted from the transmitting end to the receiving end.
In the embodiment of the invention, a sending end transmits file information of a target file to a block chain, the block chain encrypts the file information and then returns encrypted information, the sending end encrypts transmission data comprising the encrypted information through a preset secret key and then sends the encrypted transmission data to a receiving end, and after the receiving end decrypts the transmission data, the target file can be obtained from the block chain through the transmission data. Therefore, data stored in the block chain is difficult to tamper, and the sending end and the receiving end do not transmit the target file in the embodiment of the invention, so that the target file to be transmitted can be prevented from being tampered, and the accuracy of the target file acquired by the receiving end is ensured.
An embodiment of the present invention provides a method for data transmission, which may be performed by a block chain, as shown in fig. 3, and includes the following information.
S301: and receiving the file information of the target file sent by the sending end.
Wherein the file information comprises a target file.
The sending end may send file information of a target file to be transmitted to the receiving end to the block chain for storage, where the file information may include the target file and may also include an identifier of the target file.
If the target file is a time-sensitive file, such as a clearing file, the file information may further include time information of the target file.
S302: and encrypting the file information to obtain encrypted information, and storing the file information and the encrypted information.
After the block chain receives the file information of the target file, the block chain can be encrypted to obtain encrypted information. The blockchain includes a preset encryption algorithm, such as SHA256, and the hash value of the file information can be calculated through the encryption algorithm, so as to ensure the integrity of the file information. In addition, the collision resistance of the SHA56 algorithm can ensure that the hash value of the tampered file information is not consistent with the original hash value, so that whether the file information is tampered or not is judged by comparing the hash values of the file information.
And storing the file information and the encryption information in the block chain. The file information and encryption information for each target file may be stored by one block. Each block typically includes a block header in which encrypted information may be stored and a block body in which file information may be stored.
S303: and sending the encrypted information to the sending end.
After the block chain encrypts the file information to obtain the encrypted information, the encrypted information can be sent to the sending end, so that the sending end can send the encrypted information to the receiving end conveniently.
S304: and receiving transmission data sent by the receiving end, and determining a target file corresponding to the transmission data according to the transmission data, the encryption information and the file information.
After the receiving end receives the transmission data sent by the sending end, the transmission data can be sent to the block chain to request to acquire the target file. The transmission data includes the encryption information sent by the sending end, and after the block link receives the transmission data, the block link can query the stored encryption information and file information according to the transmission data, so as to determine a target file corresponding to the transmission data, namely the target file requested by the receiving end.
Specifically, the encryption information in the transmission data may include an identifier of the target file and a hash value corresponding to the target file, and the identifier of the target file and the hash value corresponding to the target file in the transmission data are sent to the receiving end by the sending end. The encrypted information obtained in step S302 may include an identifier of the target file and a hash value corresponding to the target file, where the identifier of the target file in the encrypted information is sent by the sending end, and the hash value corresponding to the target file in the encrypted information is obtained after the file information of the target file is encrypted in the block chain.
Therefore, in this step, the determining the target file corresponding to the transmission data may be specifically performed as: inquiring a hash value corresponding to the target file in the encrypted information according to the identifier of the target file in the transmission data and the identifier of the target file in the encrypted information; judging whether the hash value corresponding to the target file in the transmission data is consistent with the hash value corresponding to the target file in the encryption information; and if so, determining the target file corresponding to the transmission data from the file information according to the identification of the target file in the transmission data.
The block chain can inquire the stored encrypted information according to the identification of the target file in the transmission data, determine the encrypted information with the identification of the target file in the transmission data consistent with the identification of the target file in the transmission data, further inquire out the hash value of the target file in the encrypted information, then compare the hash value of the target file in the encrypted information with the hash value of the target file in the transmission data, and judge whether the two are consistent. If the two are consistent, it is stated that the target file stored in the block chain is not tampered, file information including an identifier identified as the target file in the transmission data, that is, file information corresponding to the transmission data, can be found from the stored file information, and then the target file corresponding to the transmission data is determined from the file information corresponding to the transmission data; if the two are not consistent, it is stated that the target file stored in the blockchain is tampered, the blockchain can send a request to the sending end, the request information includes an identifier of the target file in the transmission data, so that the sending end can transmit the file information corresponding to the identifier of the target file in the transmission data to the blockchain again, then the blockchain can receive the return information sent by the sending end and including the target file corresponding to the transmission data, and thus the blockchain can determine the target file corresponding to the transmission data according to the return information.
It should be noted that the file information may further include time information of the target file, which is transmitted from the sending end to the block chain, and the transmission data further includes time information of the target file, which is sent from the sending end to the receiving end. In the above process, after the blockchain finds out the file information including the identifier identified as the target file in the transmission data from the stored file information, it may also compare whether the time information in the transmission data is consistent with the time information in the file information. If the file information is consistent with the target file, the file information is not tampered, and the target file corresponding to the transmission data can be determined from the file information; if the data transmission information is inconsistent with the data transmission information, the file information is falsified, and the blockchain needs to obtain the file information corresponding to the transmission data from the sending end again by sending request information to the sending end.
S305: and sending the target file corresponding to the transmission data to a receiving end.
After determining the target file corresponding to the transmission data, the block chain can send the target file to the receiving end, so that the target file is transmitted to the receiving end by the transmitting end.
In the embodiment of the invention, some target files have timeliness, so after the block chain stores the file information, the storage time of the file information can be periodically determined or determined at the preset time according to the time information of the target files in the file information, and the file information is deleted when the storage time is greater than the preset threshold value. The preset threshold value can be set according to the aging of the target file, or can be set according to specific requirements.
In the embodiment of the invention, the hash value is calculated for each file information in the block chain, and the hash value is stored, in order to prevent the file information in the block chain from being tampered, the block chain can calculate the new hash value of each file information periodically or at regular time, and then for each file information, the corresponding new hash value is compared with the stored hash value, and whether the two hash values are consistent or not is judged. If the file information is consistent with the file information, the file information is not tampered; if the file information is inconsistent with the hash value, the file information is falsified, and at the moment, for the falsified file information, the blockchain needs to obtain correct file information from the sending end again and recalculate the hash value for storage, so as to ensure the accuracy of the stored file information.
In the embodiment of the invention, a sending end transmits file information of a target file to a block chain, the block chain encrypts the file information and then returns encrypted information, the sending end encrypts transmission data comprising the encrypted information through a preset secret key and then sends the encrypted transmission data to a receiving end, and after the receiving end decrypts the transmission data, the target file can be obtained from the block chain through the transmission data. Therefore, data stored in the block chain is difficult to tamper, and the sending end and the receiving end do not transmit the target file in the embodiment of the invention, so that the target file to be transmitted can be prevented from being tampered, and the accuracy of the target file acquired by the receiving end is ensured.
In order to solve the problems in the prior art, an embodiment of the present invention provides a data transmission apparatus 400, which is disposed at a sending end, and as shown in fig. 4, the apparatus 400 includes:
a sending unit 401, configured to determine file information of a target file, and transmit the file information to a block chain, where the file information includes the target file;
a receiving unit 402, configured to receive encrypted information returned by the block chain, where the encrypted information includes information obtained by encrypting the file information by the block chain;
an encrypting unit 403, configured to encrypt transmission data of the target file according to a preset key to obtain transmission information, where the transmission data includes the encrypted information;
a comparing unit 404, configured to send the transmission information to a receiving end.
It should be understood that the manner of implementing the embodiment of the present invention is the same as the manner of implementing the embodiment shown in fig. 2, and the description thereof is omitted.
In an implementation manner of the embodiment of the present invention, the file information includes an identifier of the target file and time information of the target file.
In another implementation manner of the embodiment of the present invention, the encryption information includes an identifier of the target file and a hash value corresponding to the target file, where the hash value is a hash value of the block chain after encrypting the file information.
In another implementation manner of the embodiment of the present invention, the preset key includes a first key and a second key;
the encrypting unit 403 is specifically configured to encrypt the transmission data by using the first key to obtain first transmission information; encrypting the first transmission information through the second secret key to obtain second transmission information;
the sending unit 401 is specifically configured to send the second transmission information to the receiving end.
In another implementation manner of the embodiment of the present invention, the first key is a key corresponding to the receiving end, and the second key is a key corresponding to the sending end.
In another implementation manner of the embodiment of the present invention, the receiving unit 402 is further configured to send request information to the blockchain, where the request information includes an identifier of the target file;
the apparatus 400 further comprises:
the query unit is used for querying the file information of the target file according to the identifier of the target file;
the sending unit 401 is further configured to send the file information of the target file to the block chain.
In another implementation manner of the embodiment of the present invention, the transmission data further includes time information of the target file.
It should be understood that the manner of implementing the embodiment of the present invention is the same as the manner of implementing the embodiment shown in fig. 1, and the description thereof is omitted.
In the embodiment of the invention, a sending end transmits file information of a target file to a block chain, the block chain encrypts the file information and then returns encrypted information, the sending end encrypts transmission data comprising the encrypted information through a preset secret key and then sends the encrypted transmission data to a receiving end, and after the receiving end decrypts the transmission data, the target file can be obtained from the block chain through the transmission data. Therefore, data stored in the block chain is difficult to tamper, and the sending end and the receiving end do not transmit the target file in the embodiment of the invention, so that the target file to be transmitted can be prevented from being tampered, and the accuracy of the target file acquired by the receiving end is ensured.
In order to solve the problems in the prior art, an embodiment of the present invention provides another apparatus 500 for data transmission, which is disposed at a receiving end, and as shown in fig. 5, the apparatus 500 includes:
a receiving unit 501, configured to receive transmission information sent by a sending end;
a decryption unit 502, configured to decrypt the transmission information according to a preset key to obtain transmission data, where the transmission data includes encrypted information corresponding to the target file;
a sending unit 503, configured to transmit the transmission data to a block chain;
the receiving unit 501 is further configured to receive a target file returned by the blockchain.
It should be understood that the manner of implementing the embodiment of the present invention is the same as the manner of implementing the embodiment shown in fig. 3, and the description thereof is omitted.
In an implementation manner of the embodiment of the present invention, the encryption information includes an identifier of the target file and a hash value corresponding to the target file.
In an implementation manner of the embodiment of the present invention, the preset key includes a first key and a second key;
the decryption unit 502 is specifically configured to:
decrypting the transmission information through the second secret key to obtain first transmission information;
and decrypting the first transmission data through the first secret key to obtain the transmission data.
In an implementation manner of the embodiment of the present invention, the second key is a key corresponding to the sending end, and the first key is a key corresponding to the receiving end.
In an implementation manner of the embodiment of the present invention, the transmission data further includes time information corresponding to the target file.
It should be understood that the manner of implementing the embodiment of the present invention is the same as the manner of implementing the embodiment shown in fig. 2, and the description thereof is omitted.
In the embodiment of the invention, a sending end transmits file information of a target file to a block chain, the block chain encrypts the file information and then returns encrypted information, the sending end encrypts transmission data comprising the encrypted information through a preset secret key and then sends the encrypted transmission data to a receiving end, and after the receiving end decrypts the transmission data, the target file can be obtained from the block chain through the transmission data. Therefore, data stored in the block chain is difficult to tamper, and the sending end and the receiving end do not transmit the target file in the embodiment of the invention, so that the target file to be transmitted can be prevented from being tampered, and the accuracy of the target file acquired by the receiving end is ensured.
In order to solve the problems in the prior art, an embodiment of the present invention provides an apparatus 600 for data transmission, which is disposed in a block chain, and as shown in fig. 6, the apparatus 600 includes:
a receiving unit 601, configured to receive file information of a target file sent by a sending end, where the file information includes the target file;
an encrypting unit 602, configured to encrypt the file information to obtain encrypted information, and store the file information and the encrypted information;
a sending unit 603, configured to send the encryption information to the sending end;
a determining unit 604, configured to receive transmission data sent by a receiving end, and determine a target file corresponding to the transmission data according to the transmission data, the encryption information, and the file information;
the sending unit 603 is further configured to send a target file corresponding to the transmission data to the receiving end.
It should be understood that the manner of implementing the embodiment of the present invention is the same as the manner of implementing the embodiment shown in fig. 3, and the description thereof is omitted.
In an implementation manner of the embodiment of the present invention, the encryption information includes an identifier of the target file and a hash value corresponding to the target file, and the transmission data includes the identifier of the target file and the hash value corresponding to the target file;
the determining unit 604 is specifically configured to:
inquiring a hash value corresponding to the target file in the encrypted information according to the identifier of the target file in the transmission data and the identifier of the target file in the encrypted information;
judging whether the hash value corresponding to the target file in the transmission data is consistent with the hash value corresponding to the target file in the encrypted information;
and if so, determining a target file corresponding to the transmission data from the file information according to the identification of the target file in the transmission data.
In another implementation manner of the embodiment of the present invention, the determining unit 604 is specifically configured to:
if not, sending request information to the sending end, wherein the request information comprises the identification of the target file in the transmission data;
receiving return information sent by the sending end, wherein the return information comprises a target file;
and determining a target file corresponding to the transmission data according to the return information.
In another implementation manner of the embodiment of the present invention, the file information further includes time information of the target file, and the transmission data further includes time information of the target file;
the determining unit 604 is specifically configured to:
inquiring file information corresponding to the transmission data according to the identification of the target file in the transmission data;
judging whether the time information of the target file in the transmission data is consistent with the time information of the target file in the file information corresponding to the transmission data;
and if so, determining the target file in the file information corresponding to the transmission data as the target file corresponding to the transmission data.
In an implementation manner of the embodiment of the present invention, the file information further includes time information of the target file;
the apparatus 600 further comprises:
and the deleting unit is used for determining the storage time of each target file according to the time information of the target file and deleting the target file when the storage time is greater than a preset threshold value.
It should be understood that the manner of implementing the embodiment of the present invention is the same as the manner of implementing the embodiment shown in fig. 3, and the description thereof is omitted.
In the embodiment of the invention, a sending end transmits file information of a target file to a block chain, the block chain encrypts the file information and then returns encrypted information, the sending end encrypts transmission data comprising the encrypted information through a preset secret key and then sends the encrypted transmission data to a receiving end, and after the receiving end decrypts the transmission data, the target file can be obtained from the block chain through the transmission data. Therefore, data stored in the block chain is difficult to tamper, and the sending end and the receiving end do not transmit the target file in the embodiment of the invention, so that the target file to be transmitted can be prevented from being tampered, and the accuracy of the target file acquired by the receiving end is ensured.
The invention also provides an electronic device and a readable storage medium according to the embodiment of the invention.
The electronic device of the present invention includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the processor, and the instructions are executed by the at least one processor to cause the at least one processor to execute the method for data transmission provided by the embodiment of the invention.
Fig. 7 shows an exemplary system architecture 700 of a data transfer method or apparatus to which embodiments of the invention may be applied.
As shown in fig. 7, the system architecture 700 may include terminal devices 701, 702, 703, a network 704, and a server 705. The network 704 serves to provide a medium for communication links between the terminal devices 701, 702, 703 and the server 705. Network 704 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 701, 702, 703 to interact with a server 705 over a network 704, to receive or send messages or the like. Various client applications may be installed on the terminal devices 701, 702, 703.
The terminal devices 701, 702, 703 may be smart phones, tablet computers, laptop portable computers, desktop computers, and the like. May act as a sending end and set a block chain to send transmission information to the server 705 acting as a receiving end.
The server 705 may be a server that provides various services, and may be configured to receive transmission information sent and sent by a receiving end and acquire a target file according to the transmission information.
It should be noted that the method for data transmission provided by the embodiment of the present invention is generally executed by the server 705, and accordingly, the apparatus for data transmission is generally disposed in the server 705.
It should be understood that the number of terminal devices, networks, and servers in fig. 7 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 8, a block diagram of a computer system 800 suitable for use in implementing embodiments of the present invention is shown. The computer system illustrated in FIG. 8 is only one example and should not impose any limitations on the scope of use or functionality of embodiments of the invention.
As shown in fig. 8, the computer system 800 includes a Central Processing Unit (CPU)801 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data necessary for the operation of the system 800 are also stored. The CPU 801, ROM 802, and RAM 803 are connected to each other via a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
The following components are connected to the I/O interface 805: an input portion 806 including a keyboard, a mouse, and the like; an output section 807 including a signal such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 808 including a hard disk and the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. A drive 810 is also connected to the I/O interface 805 as necessary. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as necessary, so that a computer program read out therefrom is mounted on the storage section 808 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 809 and/or installed from the removable medium 811. The computer program executes the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 801.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a unit, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present invention may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a transmitting unit, a receiving unit, and an encrypting unit. Where the names of these elements do not in some cases constitute a limitation of the element itself, for example, a receiving element may also be described as "an element of the function of the receiving element".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to perform the method of data transmission provided by the present invention.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (25)

1. A method for data transmission, configured for a transmitting end, includes:
determining file information of a target file, and transmitting the file information to a block chain, wherein the file information comprises the target file;
receiving encryption information returned by the block chain, wherein the encryption information comprises information obtained by encrypting the file information by the block chain;
encrypting transmission data of the target file according to a preset secret key to obtain transmission information, wherein the transmission data comprises the encryption information;
and sending the transmission information to a receiving end.
2. The method of claim 1, wherein the file information comprises an identification of the target file and time information of the target file.
3. The method according to claim 1, wherein the encryption information includes an identifier of the target file and a hash value corresponding to the target file, and the hash value is a hash value of the blockchain after encrypting the file information.
4. The method of claim 1, wherein the preset key comprises a first key and a second key;
the encrypting the transmission data of the target file according to the preset secret key to obtain the transmission information comprises the following steps:
encrypting the transmission data through the first secret key to obtain first transmission information;
encrypting the first transmission information through the second secret key to obtain second transmission information;
the sending the transmission information to a receiving end includes:
and sending the second transmission information to the receiving end.
5. The method of claim 4, wherein the first key is a key corresponding to the receiving end, and the second key is a key corresponding to the sending end.
6. The method according to claim 1, further comprising, after the sending the data to be transmitted to a receiving end:
receiving request information sent by the block chain, wherein the request information comprises an identifier of the target file;
inquiring file information of the target file according to the identification of the target file;
and sending the file information of the target file to the block chain.
7. The method of claim 1, wherein the transmission data further comprises time information of the target file.
8. A method for data transmission, for a receiving end, comprising:
receiving transmission information sent by a sending end;
decrypting the transmission information according to a preset secret key to obtain transmission data, wherein the transmission data comprise encrypted information corresponding to the target file;
transmitting the transmission data to a block chain;
and receiving a target file returned by the block chain.
9. The method of claim 8, wherein the encryption information comprises an identification of the target file and a hash value corresponding to the target file.
10. The method of claim 8, wherein the predetermined key comprises a first key and a second key;
the decrypting the transmission information according to the preset secret key to obtain the transmission data comprises the following steps:
decrypting the transmission information through the second secret key to obtain first transmission information;
and decrypting the first transmission data through the first secret key to obtain the transmission data.
11. The method of claim 10, wherein the second key is a key corresponding to the sender, and wherein the first key is a key corresponding to the receiver.
12. The method of claim 8, wherein the transmission data further comprises time information corresponding to the target file.
13. A method for data transmission, wherein the method is used for a block chain, and comprises:
receiving file information of a target file sent by a sending end, wherein the file information comprises the target file;
encrypting the file information to obtain encrypted information, and storing the file information and the encrypted information;
sending the encryption information to the sending end;
receiving transmission data sent by a receiving end, and determining a target file corresponding to the transmission data according to the transmission data, the encryption information and the file information;
and sending the target file corresponding to the transmission data to the receiving end.
14. The method of claim 13, wherein the encryption information comprises an identifier of the target file and a hash value corresponding to the target file, and the transmission data comprises an identifier of the target file and a hash value corresponding to the target file;
the determining a target file corresponding to the transmission data according to the transmission data, the encryption information and the file information includes:
inquiring a hash value corresponding to the target file in the encrypted information according to the identifier of the target file in the transmission data and the identifier of the target file in the encrypted information;
judging whether the hash value corresponding to the target file in the transmission data is consistent with the hash value corresponding to the target file in the encrypted information;
and if so, determining a target file corresponding to the transmission data from the file information according to the identification of the target file in the transmission data.
15. The method of claim 14, further comprising:
if not, sending request information to the sending end, wherein the request information comprises the identification of the target file in the transmission data;
receiving return information sent by the sending end, wherein the return information comprises a target file;
and determining a target file corresponding to the transmission data according to the return information.
16. The method of claim 14, wherein the file information further includes time information of the target file, and the transmission data further includes time information of the target file;
the determining, according to the identifier of the target file in the transmission data, the target file corresponding to the transmission data from the file information includes:
inquiring file information corresponding to the transmission data according to the identification of the target file in the transmission data;
judging whether the time information of the target file in the transmission data is consistent with the time information of the target file in the file information corresponding to the transmission data;
and if so, determining the target file in the file information corresponding to the transmission data as the target file corresponding to the transmission data.
17. The method of claim 13, wherein the file information further includes time information of the target file;
after the storing the file information, further comprising:
and for each target file, determining the storage time of the target file according to the time information of the target file, and deleting the target file when the storage time is greater than a preset threshold value.
18. The device for data transmission is characterized by being arranged at a sending end and comprising:
the device comprises a sending unit, a receiving unit and a sending unit, wherein the sending unit is used for determining file information of a target file and transmitting the file information to a block chain, and the file information comprises the target file;
a receiving unit, configured to receive encrypted information returned by the block chain, where the encrypted information includes information obtained by encrypting the file information by the block chain;
the encryption unit is used for encrypting the transmission data of the target file according to a preset secret key to obtain transmission information, and the transmission data comprises the encryption information;
the sending unit is further configured to send the transmission information to a receiving end.
19. The apparatus of claim 18, wherein the file information comprises an identification of the target file and time information of the target file.
20. An apparatus for data transmission, which is disposed at a receiving end, comprising:
the receiving unit is used for receiving the transmission information sent by the sending end;
the decryption unit is used for decrypting the transmission information according to a preset secret key to obtain transmission data, and the transmission data comprises encrypted information corresponding to the target file;
a sending unit, configured to transmit the transmission data to a block chain;
the receiving unit is further configured to receive a target file returned by the blockchain.
21. The apparatus of claim 20, wherein the encryption information comprises an identification of the target file and a hash value corresponding to the target file.
22. An apparatus for data transmission, configured in a block chain, comprising:
the receiving unit is used for receiving file information of a target file sent by a sending end, wherein the file information comprises the target file;
the encryption unit is used for encrypting the file information to obtain encryption information and storing the file information and the encryption information;
a sending unit, configured to send the encryption information to the sending end;
the determining unit is used for receiving transmission data sent by a receiving end and determining a target file corresponding to the transmission data according to the transmission data, the encryption information and the file information;
the sending unit is further configured to send the target file corresponding to the transmission data to the receiving end.
23. The apparatus according to claim 22, wherein the encryption information includes an identifier of the target file and a hash value corresponding to the target file, and the transmission data includes an identifier of the target file and a hash value corresponding to the target file;
the determining unit is specifically configured to:
inquiring a hash value corresponding to the target file in the encrypted information according to the identifier of the target file in the transmission data and the identifier of the target file in the encrypted information;
judging whether the hash value corresponding to the target file in the transmission data is consistent with the hash value corresponding to the target file in the encrypted information;
and if so, determining a target file corresponding to the transmission data from the file information according to the identification of the target file in the transmission data.
24. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-17.
25. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-17.
CN202011024843.7A 2020-09-25 2020-09-25 Data transmission method and device, electronic equipment and storage medium Pending CN112231765A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011024843.7A CN112231765A (en) 2020-09-25 2020-09-25 Data transmission method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011024843.7A CN112231765A (en) 2020-09-25 2020-09-25 Data transmission method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112231765A true CN112231765A (en) 2021-01-15

Family

ID=74108679

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011024843.7A Pending CN112231765A (en) 2020-09-25 2020-09-25 Data transmission method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112231765A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112887295A (en) * 2021-01-22 2021-06-01 湖北宸威玺链信息技术有限公司 Block chain-based data transmission safety detection method, system, device and medium
CN113645283A (en) * 2021-07-29 2021-11-12 北京三快在线科技有限公司 Multilink communication method, device, storage medium and electronic equipment
CN117579392A (en) * 2024-01-16 2024-02-20 北京富通亚讯网络信息技术有限公司 Reliable data transmission method, device, equipment and medium based on encryption processing

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109583219A (en) * 2018-11-30 2019-04-05 国家电网有限公司 A kind of data signature, encryption and preservation method, apparatus and equipment
US20200293515A1 (en) * 2019-06-03 2020-09-17 Alibaba Group Holding Limited Service processing system and method based on blockchain

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109583219A (en) * 2018-11-30 2019-04-05 国家电网有限公司 A kind of data signature, encryption and preservation method, apparatus and equipment
US20200293515A1 (en) * 2019-06-03 2020-09-17 Alibaba Group Holding Limited Service processing system and method based on blockchain

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112887295A (en) * 2021-01-22 2021-06-01 湖北宸威玺链信息技术有限公司 Block chain-based data transmission safety detection method, system, device and medium
CN112887295B (en) * 2021-01-22 2022-08-05 湖北宸威玺链信息技术有限公司 Block chain-based data transmission safety detection method, system, device and medium
CN113645283A (en) * 2021-07-29 2021-11-12 北京三快在线科技有限公司 Multilink communication method, device, storage medium and electronic equipment
CN113645283B (en) * 2021-07-29 2023-04-07 北京三快在线科技有限公司 Multilink communication method, device, storage medium and electronic equipment
CN117579392A (en) * 2024-01-16 2024-02-20 北京富通亚讯网络信息技术有限公司 Reliable data transmission method, device, equipment and medium based on encryption processing
CN117579392B (en) * 2024-01-16 2024-04-16 北京富通亚讯网络信息技术有限公司 Reliable data transmission method, device, equipment and medium based on encryption processing

Similar Documents

Publication Publication Date Title
CN112231765A (en) Data transmission method and device, electronic equipment and storage medium
CN107888656B (en) Calling method and calling device of server-side interface
CN108923925B (en) Data storage method and device applied to block chain
CN111258602B (en) Information updating method and device
CN110557255A (en) certificate management method and device
CN110377440B (en) Information processing method and device
CN112823503B (en) Data access method, data access device and mobile terminal
CN112311769B (en) Method, system, electronic device and medium for security authentication
CN108881122B (en) APP information verification method and device
CN110705985B (en) Method and apparatus for storing information
CN111416788A (en) Method and device for preventing transmitted data from being tampered
CN113282951A (en) Security verification method, device and equipment for application program
CN112329044A (en) Information acquisition method and device, electronic equipment and computer readable medium
CN111984615A (en) Method, device and system for sharing files
CN108848094B (en) Data security verification method, device, system, computer equipment and storage medium
CN114499893B (en) Bidding file encryption and evidence storage method and system based on block chain
CN110602075A (en) File stream processing method, device and system for encryption access control
CN115567263A (en) Data transmission management method, data processing method and device
CN112966286B (en) Method, system, device and computer readable medium for user login
CN114422123A (en) Communication method, communication device, electronic equipment and computer readable medium
CN110166226B (en) Method and device for generating secret key
CN115378743B (en) Information encryption transmission method, device, equipment and medium
CN116028979B (en) Key security management method, device, electronic equipment and computer readable medium
CN113132320A (en) Encryption transmission method and device and electronic equipment
CN113381853A (en) Method and device for generating random password and authenticating client

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination