CN109886692B - Data transmission method, device, medium and electronic equipment based on block chain - Google Patents

Data transmission method, device, medium and electronic equipment based on block chain Download PDF

Info

Publication number
CN109886692B
CN109886692B CN201910176355.9A CN201910176355A CN109886692B CN 109886692 B CN109886692 B CN 109886692B CN 201910176355 A CN201910176355 A CN 201910176355A CN 109886692 B CN109886692 B CN 109886692B
Authority
CN
China
Prior art keywords
file
interface file
interface
data
data information
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.)
Active
Application number
CN201910176355.9A
Other languages
Chinese (zh)
Other versions
CN109886692A (en
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.)
Taikang Insurance Group Co Ltd
Taikang Pension Insurance Co Ltd
Original Assignee
Taikang Insurance Group Co Ltd
Taikang Pension Insurance Co Ltd
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 Taikang Insurance Group Co Ltd, Taikang Pension Insurance Co Ltd filed Critical Taikang Insurance Group Co Ltd
Priority to CN201910176355.9A priority Critical patent/CN109886692B/en
Publication of CN109886692A publication Critical patent/CN109886692A/en
Application granted granted Critical
Publication of CN109886692B publication Critical patent/CN109886692B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)
  • Storage Device Security (AREA)

Abstract

The embodiment of the invention provides a data transmission method based on a block chain, a data transmission device based on the block chain, a computer readable medium and electronic equipment, and relates to the technical field of block chains. The method comprises the following steps: acquiring a first interface file from a file system according to first data information in a block chain; generating a second interface file according to the first interface file and uploading the second interface file to a file system; and uploading second data information corresponding to the second interface file to the block chain. The technical scheme of the embodiment of the invention can overcome the problem that the data interaction information between two managers is difficult to be synchronized to other managers in time to a certain extent, thereby improving the business handling efficiency.

Description

Data transmission method, device, medium and electronic equipment based on block chain
Technical Field
The present invention relates to the field of blockchain technologies, and in particular, to a data transmission method based on a blockchain, a data transmission device based on a blockchain, a computer-readable medium, and an electronic device.
Background
At present, for enterprise annuities/personal annuities, people mostly manage the annuities/personal annuities through a trust-type management mode; the management parties such as the trustee, the agent party, the account management party, the trustee, the delivery management party and the like related to the trust type management mode can cooperate together to further realize the management of the annuity.
Generally, data interfaces are also different between different management parties, but this causes different data interaction modes between the management parties, and further causes a problem that data interaction information between two management parties is difficult to be synchronized to other management parties in time, which may cause low efficiency of business transaction.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present invention and therefore may include information that does not constitute prior art known to a person of ordinary skill in the art.
Disclosure of Invention
Embodiments of the present invention provide a block chain-based data transmission method, a block chain-based data transmission device, a computer-readable medium, and an electronic device, so as to overcome a problem that data interaction information between two management parties is difficult to be synchronized to other management parties in time to at least a certain extent, thereby improving service handling efficiency.
A first aspect of an embodiment of the present invention provides a data transmission method based on a block chain, including: acquiring a first interface file from a file system according to first data information in a block chain; generating a second interface file according to the first interface file and uploading the second interface file to a file system; and uploading second data information corresponding to the second interface file to the block chain.
In an exemplary embodiment of the present invention, generating the second interface file from the first interface file includes: executing data processing operation on the first interface file; the data processing operation comprises at least one of data analysis, data verification and data feedback; and generating a second interface file according to the first interface file subjected to the data processing operation.
In an exemplary embodiment of the present invention, uploading the second interface file to the file system includes: encrypting the second interface file; and uploading the encrypted second interface file to a file system.
In an exemplary embodiment of the present invention, encrypting the second interface file includes: randomly generating key information; wherein, the key information comprises an encryption key; the second interface file is encrypted by the encryption key.
In an exemplary embodiment of the present invention, the key information further includes a decryption key, and after the encrypted second interface file is uploaded to the file system, the method further includes: acquiring a file address which is returned by the file system and corresponds to the second interface file; and generating second data information according to at least one of the file address, the decryption key and the second interface file.
In an exemplary embodiment of the present invention, uploading the second data information corresponding to the second interface file to the block chain includes: encrypting the second data information; and uploading the encrypted second data information to the block chain.
In an exemplary embodiment of the present invention, before acquiring the first interface file from the file system according to the first data information in the block chain, the method further includes: reading first data information from a block chain; and decrypting the target information in the first data information.
In an exemplary embodiment of the present invention, obtaining the first interface file from the file system according to the first data information in the blockchain includes: determining a file address corresponding to the first interface file from the decrypted first data information; and acquiring the first interface file from the file system according to the file address corresponding to the first interface file.
In an exemplary embodiment of the present invention, performing a data processing operation on a first interface file includes: decrypting the first interface file according to the key information corresponding to the first interface file; and executing data processing operation on the decrypted first interface file.
According to a second aspect of the embodiments of the present invention, there is provided a data transmission apparatus based on a block chain, including: the file acquisition unit is used for acquiring a first interface file from a file system according to first data information in the block chain; the file generation unit is used for generating a second interface file according to the first interface file and uploading the second interface file to the file system; and the file uploading unit is used for uploading second data information corresponding to the second interface file to the block chain.
In an exemplary embodiment of the present invention, a manner of generating, by the file generating unit, the second interface file according to the first interface file may specifically be: executing data processing operation on the first interface file; the data processing operation comprises at least one of data analysis, data verification and data feedback; and generating a second interface file according to the first interface file subjected to the data processing operation.
In an exemplary embodiment of the present invention, a manner of uploading the second interface file to the file system by the file generating unit may specifically be: encrypting the second interface file; and uploading the encrypted second interface file to a file system.
In an exemplary embodiment of the present invention, the way that the file generating unit encrypts the second interface file may specifically be: randomly generating key information; wherein, the key information comprises an encryption key; the second interface file is encrypted by the encryption key.
In an exemplary embodiment of the present invention, the key information further includes a decryption key, and the data transmission apparatus further includes a file address acquisition unit and a data generation unit, wherein:
the file address acquisition unit is used for acquiring a file address which is returned by the file system and corresponds to the second interface file after the file generation unit encrypts the second interface file through the encryption key; and the data generating unit is used for generating second data information according to at least one of the file address, the decryption key and the second interface file.
In an exemplary embodiment of the present invention, a manner that the file uploading unit uploads the second data information corresponding to the second interface file to the block chain may specifically be: encrypting the second data information; and uploading the encrypted second data information to the block chain.
In one exemplary embodiment of the present invention, the data transmission apparatus further includes a data reading unit and an information decryption unit, wherein:
the data reading unit is used for reading first data information from the block chain; the information decryption unit is used for decrypting the target information in the first data information; a file obtaining unit, configured to, after the information decryption unit decrypts the target information in the first data information, obtain a first interface file from the file system according to the first data information in the block chain
In an exemplary embodiment of the present invention, a manner of acquiring, by the file acquiring unit, the first interface file from the file system according to the first data information in the block chain may specifically be: determining a file address corresponding to the first interface file from the decrypted first data information; and acquiring the first interface file from the file system according to the file address corresponding to the first interface file.
In an exemplary embodiment of the present invention, a manner of executing the data processing operation on the first interface file by the file generating unit may specifically be: decrypting the first interface file according to the key information corresponding to the first interface file; and executing data processing operation on the decrypted first interface file.
According to a third aspect of embodiments of the present invention, there is provided a computer-readable medium, on which a computer program is stored, which when executed by a processor, implements the method for blockchain-based data transmission as described in the first aspect of the embodiments above.
According to a fourth aspect of embodiments of the present invention, there is provided an electronic apparatus, including: one or more processors; a storage device for storing one or more programs which, when executed by one or more processors, cause the one or more processors to implement the method for blockchain based data transmission as described in the first aspect of the embodiments above.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
in the technical solutions provided in some embodiments of the present invention, for example, the administrator may obtain the first interface file uploaded by the trustee from the file system according to the first data information uploaded by the trustee; furthermore, the account management party can generate a second interface file according to the first interface file, upload the second interface file to the file system, and upload second data information corresponding to the second interface file to the block chain, so that other management parties can obtain the latest data in the database of the node where the other management parties are located in time. According to the scheme, on one hand, the data interaction information between two management parties can be timely synchronized to other management parties, the problem that data storage of the management parties is inconsistent due to the fact that data synchronization is not timely is avoided to a certain extent, and therefore the service handling efficiency is improved. On the other hand, data consistency among a plurality of managers can be realized by applying a block chain technology, compared with the traditional method of interacting in a mesh interaction mode (namely, each manager needs to establish interaction relation with other managers respectively), the embodiment of the invention can reduce the operation cost for annuity management by a chain interaction mode.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention. It is obvious that the drawings in the following description are only some embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
fig. 1 schematically shows a flow chart of a block chain based data transmission method according to an embodiment of the present invention;
FIG. 2 schematically illustrates a flow diagram for a data transfer by a trustee and an account based on a blockchain in accordance with an embodiment of the present invention;
FIG. 3 schematically illustrates a flow diagram for annuity data transfer between block link points, in accordance with an embodiment of the invention;
fig. 4 is a block diagram schematically illustrating a structure of a block chain based data transmission apparatus according to an embodiment of the present invention;
FIG. 5 illustrates a schematic structural diagram of a computer system suitable for use with the electronic device to implement an embodiment of the invention.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to provide a thorough understanding of embodiments of the invention. One skilled in the relevant art will recognize, however, that the invention may be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations or operations have not been shown or described in detail to avoid obscuring aspects of the invention.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
Referring to fig. 1, fig. 1 schematically shows a flowchart of a data transmission method based on a block chain according to an embodiment of the present invention, where the data transmission method may be implemented by a server or a terminal device.
As shown in fig. 1, the data transmission method according to the first embodiment of the present invention includes the following steps S101, S102, and S103, which are described in detail below:
in step S101, a first interface file is acquired from the file system according to the first data information in the block chain.
In this embodiment of the present invention, the first data information may include at least one of a sending mechanism code, a receiving mechanism code, a service serial number, a service state, an AES (advanced Encryption standard) key corresponding to the first data information, and an interface file address, where the AES key includes an Encryption key and a decryption key; the service state may be any one of a state to be fed back, a state to be assembled, a state to be returned, and the like, and the embodiment of the present invention is not limited; AES is an advanced encryption standard, which may also be referred to as Rijndael encryption method, and the encryption process is to convert plaintext (e.g., my is mingmen) sent by a sender into ciphertext (e.g., tnyrrx + SNjZwEK + ZXFEcDw ═) according to a key (e.g., 123) of the sender, and further send the ciphertext to a receiver, so that the receiver can convert the ciphertext into plaintext through the key (e.g., 123). In addition, the AES algorithm can also be understood as a symmetric encryption algorithm, which is reversible, and compared with the conventional irreversible digest algorithm for checking the consistency and integrity of information, the AES algorithm can ensure that private information is not leaked, and improve the security of data transmission.
In an embodiment of the present invention, the File System may be a distributed File System (IPFS); the IPFS may also be referred to as an interplanetary file system or a point-to-point hypermedia protocol, and the use of the IPFS can improve the speed, security and openness of the internet. In the embodiment of the present invention, the IPFS serves as a file system for storing files.
In the embodiment of the present invention, the first interface file may be an interface file generated by the management party and corresponding to a service (e.g., an annuity service).
As an optional implementation manner, in the data transmission method based on the block chain. Before the first interface file is acquired from the file system according to the first data information in the blockchain, the method may further include the following steps: reading first data information from a block chain; and decrypting the target information in the first data information.
Further, the decryption method of the target information in the first data information may specifically be: determining a private key corresponding to a local node; and decrypting the target information in the first data information by using the private key.
In the embodiment of the invention, a manager can read first data information from the local blockchain node through a server/terminal device; the first data information may further include at least one of sender information, receiver information, intermediate data (i.e., matadata), and sending time.
In this embodiment of the present invention, if the first data information includes a sending mechanism code, a receiving mechanism code, a service serial number, a service status, an AES key, and an interface file address, the target information may include at least one of the service serial number, the service status, the AES key, and the interface file address. Since the target information is important information in the first data information, before the first data information is uploaded by the manager a (e.g., the hosting party), the target information in the first data information is encrypted by the public key of the manager B (e.g., the billing party), for example, the target information is encrypted by the RSA algorithm; the RSA algorithm is an asymmetric encryption algorithm, a pair of RSA secret keys can be generated through the RSA algorithm, and a private key stored by a manager and a public key which can be disclosed to the outside are included; further, the administrator B may decrypt the target information through the private key corresponding to the public key (i.e., the private key corresponding to the local node), and finally obtain the unencrypted information and the decrypted target information in the first data information, i.e., the complete first data information.
Therefore, by implementing the optional implementation manner, important information (e.g., an AES key) in the first data information can be encrypted by the public key of the receiving party (i.e., the above-mentioned administrator B), so that the receiving party decrypts the first data information by the private key corresponding to the public key, which not only can realize confidentiality of the important information, but also can synchronize data to other blockchain nodes in time by using a blockchain technology, thereby improving the transaction efficiency of a service (e.g., an annuity service).
As an optional implementation manner, in the data transmission method based on the blockchain, the target information includes a file address corresponding to the first interface file. The obtaining of the first interface file from the file system according to the first data information in the block chain may specifically include the following steps: determining a file address corresponding to the first interface file from the decrypted first data information; and acquiring the first interface file from the file system according to the file address corresponding to the first interface file.
In the embodiment of the present invention, according to the foregoing embodiment, the decrypted first data information may also be understood as decrypted target information, and a file address in the target information is used to indicate a storage location of the first interface file in the file system. After the management party acquires the file address through the server/terminal device, the management party can request the file system through the file address to obtain the first interface file corresponding to the file address.
Therefore, by implementing the optional implementation manner, the file address included in the target information can be obtained by decrypting the first data information, and then the first interface file is obtained by the file address request, so that the operation related to the current service is executed according to the first interface file.
In step S102, a second interface file is generated according to the first interface file and uploaded to the file system.
In the embodiment of the invention, after the manager obtains the first interface file through the server/terminal device, the manager can execute the payment related operation according to the first interface file (such as payment notification) and generate the feedback file (such as payment completion notification) after the payment related operation is executed, namely the second interface file, and then upload the second interface file to the file system so that other managers can obtain the second interface file from the file system.
As an optional implementation manner, in the data transmission method based on the blockchain, generating the second interface file according to the first interface file may specifically include the following steps:
executing data processing operation on the first interface file; the data processing operation comprises at least one of data analysis, data verification and data feedback; and generating a second interface file according to the first interface file subjected to the data processing operation.
In the embodiment of the present invention, optionally, the manner of generating the second interface file according to the first interface file after the data processing operation may specifically be: and taking the first interface file subjected to the data processing operation as a second interface file.
Further, uploading the second interface file to the file system may include the steps of: encrypting the second interface file; and uploading the encrypted second interface file to a file system.
Still further, encrypting the second interface file may include the steps of: randomly generating key information; wherein, the key information comprises an encryption key; the second interface file is encrypted by the encryption key.
In the embodiment of the invention, the key information can be an AES key; the AES key comprises an encryption key and a decryption key.
Still further, performing the data processing operation on the first interface file may include the steps of: decrypting the first interface file according to the key information corresponding to the first interface file; and executing data processing operation on the decrypted first interface file.
Therefore, by implementing the embodiment of the invention, the security of data transmission can be improved by adopting the AES encryption method and the RSA encryption method.
As an optional implementation manner, in the data transmission method based on the blockchain, the key information further includes a decryption key, and after the encrypted second interface file is uploaded to the file system, the method may further include the following steps: acquiring a file address which is returned by the file system and corresponds to the second interface file; and generating second data information according to at least one of the file address, the decryption key and the second interface file.
In this embodiment of the present invention, the second data information may include at least one of a sending mechanism code, a receiving mechanism code, a service serial number, a service status, an AES key corresponding to the second data information, and an interface file address. In addition, the file address corresponding to the second interface file is used to indicate the storage location of the second interface file in the file system.
In step S103, second data information corresponding to the second interface file is uploaded to the block chain.
In this embodiment of the present invention, optionally, the manner of uploading the second data information corresponding to the second interface file to the block chain may specifically be: and uploading second data information corresponding to the second interface file to the current blockchain node (namely, the local blockchain node).
As an optional implementation manner, in the data transmission method based on the blockchain, uploading the second data information corresponding to the second interface file to the blockchain may include the following steps: encrypting the second data information; and uploading the encrypted second data information to the block chain.
Therefore, by implementing the optional implementation mode, the encrypted second data information can be uploaded to the block chain, so that the receiver can timely acquire the second data information at the block chain link point where the receiver is located, and the service handling efficiency is further improved.
It can be seen that, when the block chain-based data transmission method shown in fig. 1 is implemented, each manager only needs to interact with the block chain link point where each manager is located, and the data interfaces of each manager are unified, so that the operation efficiency is improved to a certain extent compared with the conventional mesh-type data transmission method; in addition, because the file system adopted by the invention is a distributed file system, the file data can not be lost by individual management parties to cause great loss, and each management party can acquire the latest and most complete file information after the file is uploaded to the file system, the problem of data backup is not required to be considered, and the operation cost is reduced; in addition, due to the application of the block chain technology, the data uploaded by each management party can be synchronized to other block chain nodes in time, so that other management parties can acquire the data in time, and the service handling efficiency is improved; in addition, the invention also improves the safety of data transmission by adopting an AES encryption method and an RSA encryption method.
Referring to fig. 2, fig. 2 schematically illustrates a flow chart of data transmission by a trustee and an account based on a blockchain according to an embodiment of the present invention. As shown in fig. 2, the data transmission by the trustee and the account based on the blockchain includes a data file sending phase and a data file responding phase.
Wherein, the data file sending stage comprises the following steps:
step S201: and generating a data interface file.
Step S202: an AES encryption key is randomly generated.
Step S203: the data interface file is encrypted by an AES encryption key.
Step S204: and acquiring a file address corresponding to the data interface file.
Step S205: and assembling the sending mechanism code, the receiving mechanism code, the encrypted service serial number, the encrypted service state, the encrypted AES key and the encrypted interface file address to obtain first data information.
In the embodiment of the present invention, when a manager a (e.g., a trusted party) accepts a service (e.g., annuity service) through a server/terminal device, the manager a generates a data interface file (i.e., a first interface file) by notifying a payment corresponding to the annuity service through the server/terminal device; furthermore, the manager a may randomly generate an AES key through the server/terminal device, encrypt the first interface file through an encryption key in the AES key, and upload the first interface file to a file block of the IPFS, so as to obtain a file address corresponding to the first interface file returned by the IPFS, where the file address is used to indicate a storage location of the first interface file in the IPFS, and the file address may be represented by a hash value; further, the manager a may encrypt the service serial number (i.e., serial number corresponding to the annuity service), the service status (i.e., status of the annuity service, such as the status of payment), the AES key, and the interface file address (i.e., file address corresponding to the first interface file) through the server/terminal device via the public key of the receiving mechanism (e.g., the manager B); furthermore, the manager a can assemble the sending mechanism code (i.e., the mechanism code of the manager a), the receiving mechanism code (e.g., the mechanism code of the manager B), the encrypted service serial number, the service state, the AES key, and the interface file address into the first data information through the server/terminal device, and upload the blockchain through the current node (i.e., the node where the manager a is located); the assembling into the first data information may also be understood as packaging a sending mechanism code, a receiving mechanism code, a service serial number, a service state, an AES key, and an interface file address to obtain a file packet, that is, the first data information.
The data file response phase comprises the following steps:
step S206: first data information is acquired.
Step S207: and decrypting the service serial number, the service state, the AES encryption key and the interface file address in the first data information.
Step S208: and acquiring the decrypted service serial number, the service state, the AES encryption key and the interface file address.
Step S209: the first interface file is decrypted by the AES decryption key.
Step S210: and performing read verification on the decrypted data in the first interface file, and generating a feedback file (namely, a second interface file).
Step S211: and randomly generating a new AES key, and encrypting the second interface file through an encryption key in the new AES key.
Step S212: and acquiring a file address corresponding to the second interface file.
Step S213: and assembling the sending mechanism code, the receiving mechanism code, the encrypted service serial number, the encrypted service state, the encrypted new AES key and the encrypted interface file address to obtain second data information.
In the embodiment of the present invention, a management party B (e.g., an account management party) may periodically obtain first data information (e.g., once every two hours) from a block link point where the management party B is located through a server/terminal device, and obtain a first interface file from a file system according to the first data information in a block chain; furthermore, the manager B can decrypt the encrypted service serial number, the encrypted service state, the encrypted AES key and the encrypted interface file address in the first data information through the server/terminal equipment through the private key of the manager B; furthermore, the management party B can request data downloading from the IPFS through the decrypted interface file address through the server/terminal equipment so as to download the first interface file from the file block of the IPFS; further, the first interface file is decrypted by using a decryption key in the AES key, data in the first interface file is read and checked, a feedback file (i.e., a second interface file) corresponding to the first interface file is generated, a new AES key is randomly generated, the second interface file is encrypted by using an encryption key in the new AES key, and the second interface file is uploaded to a file block of the IPFS, so as to obtain a file address corresponding to the second interface file returned by the IPFS, wherein the file address is used for indicating a storage location of the second interface file in the IPFS and can be represented by a hash value; further, the manager B may encrypt the service serial number (i.e., serial number corresponding to the annuity service), the service status (i.e., status of the annuity service, such as paid-up completion status), the new AES key, and the interface file address (i.e., file address corresponding to the second interface file) through the server/terminal device through the public key of the receiving mechanism (e.g., manager C); further, the manager B may assemble the sending organization code (i.e., the organization code of the manager B), the receiving organization code (e.g., the organization code of the manager C), and the encrypted service serial number, the service status, the new AES key, and the interface file address into the second data information through the terminal device/server and upload the blockchain through the node where the manager B is currently located (i.e., the node where the manager B is located).
It can be seen that, by implementing the data transmission flow shown in fig. 2, each management party only needs to interact with the block link point where each management party is located, and the data interfaces of each management party are unified, so that the operation efficiency is improved to a certain extent compared with the conventional mesh-type data transmission mode; in addition, because the file system adopted by the invention is a distributed file system, the file data can not be lost by individual management parties to cause great loss, and each management party can acquire the latest and most complete file information after the file is uploaded to the file system, the problem of data backup is not required to be considered, and the operation cost is reduced; in addition, due to the application of the block chain technology, the data uploaded by each management party can be synchronized to other block chain nodes in time, so that other management parties can acquire the data in time, and the service handling efficiency is improved; in addition, the invention also improves the safety of data transmission by adopting an AES encryption method and an RSA encryption method.
Referring to fig. 3, fig. 3 schematically illustrates a flow chart of annuity data transmission between link points of blocks according to an embodiment of the invention. The data transmission method shown in fig. 1 can be applied to each node in fig. 3 to realize annuity data transmission between each node. As shown in fig. 3, each of the trusted party (node), the account managing party (node), the hosting party (node), and the agent party (node) includes a local annuity system module, a mechanism pre-service module, a block chain service module, a network connection node module, and a block accounting module; the local annuity system module and the mechanism preposed service module belong to a local interface layer, and the block chain service module, the network connection node module and the block accounting module belong to a block chain service layer. Specifically, each node can handle the annuity service generated by the local annuity system module by using the mechanism front-end service module, and can transmit data related to the annuity service to the block chain service module in an encrypted manner, namely, encrypt and upload a block chain, so that the data related to the annuity service can be broadcast to other nodes and uploaded to an annuity block chain platform in time, and the block accounting module is triggered to record the data related to the annuity service; wherein, each node can also inquire the data related to the annuity service on the block chain through the network connection node module. In addition, the connection intercommunication mode between each node is the P2P network intercommunication mode.
Therefore, by implementing the annuity data transmission flow shown in fig. 3, the operation efficiency can be improved to a certain extent, the operation cost can be reduced, the service handling efficiency can be improved, and the security of data transmission can be improved.
Referring to fig. 4, fig. 4 is a block diagram schematically illustrating a block chain-based data transmission apparatus according to an embodiment of the present invention. The block chain-based data transmission device comprises: a file acquisition unit 401, a file generation unit 402, and a file upload unit 403.
The file obtaining unit 401 is configured to obtain a first interface file from a file system according to first data information in a block chain; a file generating unit 402, configured to generate a second interface file according to the first interface file and upload the second interface file to a file system; a file uploading unit 403, configured to upload second data information corresponding to the second interface file to the block chain.
Therefore, the data transmission device disclosed by the embodiment of the invention can improve the operation efficiency, reduce the operation cost, improve the service handling efficiency and improve the safety of data transmission to a certain extent.
As an optional implementation manner, the manner in which the file generating unit 402 generates the second interface file according to the first interface file may specifically be: the file generating unit 402 performs a data processing operation on the first interface file; the data processing operation comprises at least one of data analysis, data verification and data feedback; the file generating unit 402 generates a second interface file from the first interface file subjected to the data processing operation.
Therefore, the data transmission device disclosed by the embodiment of the invention can execute data processing operation on the first interface file obtained in time to generate the second interface file, so that the service processing efficiency is improved.
As an optional implementation manner, the manner in which the file generating unit 402 uploads the second interface file to the file system may specifically be: the file generating unit 402 encrypts the second interface file; the file generating unit 402 uploads the encrypted second interface file to the file system.
Therefore, the data transmission device disclosed by the embodiment of the invention can realize the confidentiality of important information, and can synchronize data to other block chain nodes in time by using the block chain technology, so that the transaction efficiency of services (such as annuity services) is improved.
As an optional implementation manner, the way for the file generating unit 402 to encrypt the second interface file may specifically be: the file generating unit 402 randomly generates key information; wherein, the key information comprises an encryption key; the file generating unit 402 encrypts the second interface file by the encryption key.
Therefore, the data transmission device disclosed by the embodiment of the invention can improve the safety of data.
As an optional implementation manner, the key information further includes a decryption key, and the data transmission apparatus may further include a file address obtaining unit (not shown) and a data generating unit (not shown), where:
a file address acquisition unit configured to acquire a file address corresponding to the second interface file returned by the file system after the file generation unit 402 encrypts the second interface file by the encryption key; and the data generating unit is used for generating second data information according to at least one of the file address, the decryption key and the second interface file.
Therefore, the data transmission device disclosed by the embodiment of the invention can reduce the operation cost by applying the file system.
As an optional implementation manner, the manner in which the file uploading unit 403 uploads the second data information corresponding to the second interface file to the block chain may specifically be: the file uploading unit 403 encrypts the second data information; the file uploading unit 403 uploads the encrypted second data information to the block chain.
Therefore, by implementing the data transmission device shown in the embodiment of the invention, the encrypted second data information can be uploaded to the block chain, so that the receiver can timely acquire the second data information at the block chain point where the receiver is located, and the service handling efficiency is further improved.
As an optional implementation manner, the data transmission apparatus may further include a data reading unit (not shown) and an information decryption unit (not shown), wherein:
the data reading unit is used for reading first data information from the block chain; the information decryption unit is used for decrypting the target information in the first data information; the file obtaining unit 401 is specifically configured to, after the information decryption unit decrypts the target information in the first data information, obtain the first interface file from the file system according to the first data information in the block chain.
Therefore, by applying the block chain technology, the data transmission device disclosed by the embodiment of the invention can synchronize the data uploaded by each management party to other block chain nodes in time, so that other management parties can acquire the data in time, and the service handling efficiency is improved.
As an optional implementation manner, the manner in which the file obtaining unit 401 obtains the first interface file from the file system according to the first data information in the block chain may specifically be: the file obtaining unit 401 determines a file address corresponding to the first interface file from the decrypted first data information; the file acquiring unit 401 acquires the first interface file from the file system according to the file address corresponding to the first interface file.
Therefore, the data transmission device shown in the embodiment of the invention can decrypt the first data information to obtain the file address included in the target information, and further obtain the first interface file through the file address request, so as to execute the operation related to the current service according to the first interface file.
As an optional implementation manner, the manner in which the file generating unit 402 performs the data processing operation on the first interface file may specifically be: the file generating unit 402 decrypts the first interface file according to the key information corresponding to the first interface file; the file generating unit 402 performs a data processing operation on the decrypted first interface file.
Therefore, the data transmission device disclosed by the embodiment of the invention can improve the safety of data transmission.
It can be seen that, with the block chain-based data transmission device shown in fig. 4, each manager only needs to interact with the block chain link point where each manager is located, and the data interfaces of each manager are unified, so that the operation efficiency is improved to a certain extent compared with the conventional mesh-type data transmission mode; in addition, because the file system adopted by the invention is a distributed file system, the file data can not be lost by individual management parties to cause great loss, and each management party can acquire the latest and most complete file information after the file is uploaded to the file system, the problem of data backup is not required to be considered, and the operation cost is reduced; in addition, due to the application of the block chain technology, the data uploaded by each management party can be synchronized to other block chain nodes in time, so that other management parties can acquire the data in time, and the service handling efficiency is improved; in addition, the invention also improves the safety of data transmission by adopting an AES encryption method and an RSA encryption method.
For details that are not disclosed in the embodiments of the apparatus of the present invention, reference is made to the above-described embodiments of the data transmission method of the present invention for the functional modules of the data transmission apparatus of the exemplary embodiment of the present invention correspond to the steps of the above-described exemplary embodiment of the data transmission method.
Referring to FIG. 5, a block diagram of a computer system 500 suitable for use in implementing an electronic device according to an embodiment of the invention is shown. The computer system 500 of the electronic device shown in fig. 5 is only an example, and should not bring any limitation to the function and the scope of the use of the embodiments of the present invention.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU)501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for system operation are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to an embodiment of the present invention, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the invention 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 may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The above-described functions defined in the system of the present application are executed when the computer program is executed by the Central Processing Unit (CPU) 501.
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 module, 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 may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The above-mentioned computer readable medium carries one or more programs which, when executed by one of the electronic devices, cause the electronic device to implement the data transmission method based on the blockchain as described in the above-mentioned embodiments.
For example, the electronic device may implement the following as shown in fig. 1: step S101, acquiring a first interface file from a file system according to first data information in a block chain; step S102, generating a second interface file according to the first interface file and uploading the second interface file to a file system; step S103, uploading second data information corresponding to the second interface file to the block chain.
As another example, the electronic device may implement the steps shown in FIG. 2.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the invention. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiment of the present invention.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (10)

1. A data transmission method based on a block chain is characterized by comprising the following steps:
acquiring a first interface file from a file system according to first data information in a block chain; the first data information comprises a sending mechanism code, a receiving mechanism code, a service serial number, a service state, an AES key corresponding to the first data information and an interface file address corresponding to the first interface file; the service state is a state to be fed back, a state to be assembled or a state to be returned;
generating a second interface file according to the first interface file and uploading the second interface file to the file system;
uploading second data information corresponding to the second interface file to the block chain; the second data information comprises a sending mechanism code, a receiving mechanism code, a service serial number, a service state, an AES key corresponding to the second data information and an interface file address corresponding to the second interface file;
generating a second interface file according to the first interface file, wherein the generating of the second interface file comprises: and executing related operations according to the first interface file and generating the second interface file after the related operations are executed, wherein the related operations comprise payment operations.
2. The method of claim 1, wherein generating a second interface file from the first interface file comprises:
executing data processing operation on the first interface file; the data processing operation comprises at least one of data analysis, data verification and data feedback;
and generating a second interface file according to the first interface file subjected to the data processing operation.
3. The method of claim 2, wherein uploading the second interface file to the file system comprises:
encrypting the second interface file;
and uploading the encrypted second interface file to the file system.
4. The method of claim 3, wherein encrypting the second interface file comprises:
randomly generating key information; wherein, the key information comprises an encryption key;
and encrypting the second interface file through the encryption key.
5. The method according to claim 4, wherein the key information further includes a decryption key, and after the uploading the encrypted second interface file to the file system, the method further includes:
acquiring a file address which is returned by the file system and corresponds to the second interface file;
and generating second data information according to at least one of the file address, the decryption key and the second interface file.
6. The method of claim 1, wherein before the obtaining the first interface file from the file system according to the first data information in the block chain, the method further comprises:
reading first data information from the block chain;
and decrypting the target information in the first data information.
7. The method of claim 6, wherein obtaining the first interface file from the file system according to the first data information in the block chain comprises:
determining a file address corresponding to the first interface file from the decrypted first data information;
and acquiring the first interface file from the file system according to the file address corresponding to the first interface file.
8. A block chain-based data transmission apparatus, comprising:
the file acquisition unit is used for acquiring a first interface file from a file system according to first data information in the block chain; the first data information comprises a sending mechanism code, a receiving mechanism code, a service serial number, a service state, an AES key corresponding to the first data information and an interface file address corresponding to the first interface file; the service state is a state to be fed back, a state to be assembled or a state to be returned;
the file generating unit is used for generating a second interface file according to the first interface file and uploading the second interface file to the file system;
the file uploading unit is used for uploading second data information corresponding to the second interface file to the block chain; the second data information comprises a sending mechanism code, a receiving mechanism code, a service serial number, a service state, an AES key corresponding to the second data information and an interface file address corresponding to the second interface file;
the file generating unit generates a second interface file according to the first interface file, and the file generating unit includes: and executing related operations according to the first interface file and generating the second interface file after the related operations are executed, wherein the related operations comprise payment operations.
9. A computer-readable medium, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out a method for blockchain based data transmission according to any one of claims 1 to 7.
10. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement a blockchain based data transmission method according to any one of claims 1 to 7.
CN201910176355.9A 2019-03-08 2019-03-08 Data transmission method, device, medium and electronic equipment based on block chain Active CN109886692B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910176355.9A CN109886692B (en) 2019-03-08 2019-03-08 Data transmission method, device, medium and electronic equipment based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910176355.9A CN109886692B (en) 2019-03-08 2019-03-08 Data transmission method, device, medium and electronic equipment based on block chain

Publications (2)

Publication Number Publication Date
CN109886692A CN109886692A (en) 2019-06-14
CN109886692B true CN109886692B (en) 2021-05-07

Family

ID=66931377

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910176355.9A Active CN109886692B (en) 2019-03-08 2019-03-08 Data transmission method, device, medium and electronic equipment based on block chain

Country Status (1)

Country Link
CN (1) CN109886692B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110519227B (en) * 2019-07-22 2022-04-05 福建智恒优水科技有限公司 Intelligent household data tamper-proofing method and device based on block chain
CN110505210B (en) * 2019-07-22 2021-12-14 福建智恒优水科技有限公司 Intelligent household data asset safe transaction method and device based on block chain
CN110753105B (en) * 2019-10-17 2022-09-06 中国建设银行股份有限公司 Data transmission method, device, system, electronic equipment and storage medium
CN111104386B (en) * 2019-11-04 2023-09-01 京东科技信息技术有限公司 File storage method, terminal and storage medium
CN114244820A (en) * 2020-09-07 2022-03-25 宝能汽车集团有限公司 Embedded distribution system and data communication method thereof
CN111833190A (en) * 2020-09-16 2020-10-27 泰康保险集团股份有限公司 Annuity data processing method, device, medium and electronic equipment
CN112152789A (en) * 2020-09-27 2020-12-29 泰康保险集团股份有限公司 Annuity data processing method, device, medium and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105095785A (en) * 2014-05-22 2015-11-25 中兴通讯股份有限公司 File access processing method, and file access method and device of distributed file system
CN108510397A (en) * 2017-07-25 2018-09-07 平安科技(深圳)有限公司 Annuity manages system, method, server and storage medium
CN108573737A (en) * 2017-12-25 2018-09-25 北京金山云网络技术有限公司 A kind of storage method of electronic health record, device, equipment and storage medium
CN109243583A (en) * 2018-07-09 2019-01-18 研靖信息科技(上海)有限公司 The method and apparatus of medical imaging data decentralization management based on block chain

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018145024A1 (en) * 2017-02-03 2018-08-09 Terry Aronson System and method for asset backed crypto-currency
CN108734029A (en) * 2018-05-23 2018-11-02 陈萍 A kind of approaches to IM and platform based on block chain and interspace file system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105095785A (en) * 2014-05-22 2015-11-25 中兴通讯股份有限公司 File access processing method, and file access method and device of distributed file system
CN108510397A (en) * 2017-07-25 2018-09-07 平安科技(深圳)有限公司 Annuity manages system, method, server and storage medium
CN108573737A (en) * 2017-12-25 2018-09-25 北京金山云网络技术有限公司 A kind of storage method of electronic health record, device, equipment and storage medium
CN109243583A (en) * 2018-07-09 2019-01-18 研靖信息科技(上海)有限公司 The method and apparatus of medical imaging data decentralization management based on block chain

Also Published As

Publication number Publication date
CN109886692A (en) 2019-06-14

Similar Documents

Publication Publication Date Title
CN109886692B (en) Data transmission method, device, medium and electronic equipment based on block chain
CN102546607B (en) Providing security services on the cloud
EP4191430A1 (en) Data processing method and apparatus applied to blockchain system
US11716206B2 (en) Certificate based security using post quantum cryptography
CN113228011A (en) Data sharing
US8958548B2 (en) Generation of relative prime numbers for use in cryptography
EP3264671A1 (en) Key replacement direction control system, and key replacement direction control method
CN112400299B (en) Data interaction method and related equipment
CN110177099B (en) Data exchange method, transmitting terminal and medium based on asymmetric encryption technology
WO2016132547A1 (en) Data storage device, data update system, data processing method, and data processing program
CN116601914A (en) Hybrid key derivation to protect data
CN111984615B (en) File sharing method, device and system
CN111010283B (en) Method and apparatus for generating information
CN114037447A (en) Method and device for off-line transaction
CN112329044A (en) Information acquisition method and device, electronic equipment and computer readable medium
CN111915302A (en) Associated data processing method and device, electronic equipment and computer readable medium
CN114422123A (en) Communication method, communication device, electronic equipment and computer readable medium
CN115378743B (en) Information encryption transmission method, device, equipment and medium
CN116627664B (en) Service verification method, device, electronic equipment and computer readable medium
US20220385453A1 (en) Secure file transfer
CN111526128B (en) Encryption management method and device
EP4009212A1 (en) Consent management
CN111314320B (en) Communication method, terminal, server and system based on HTTP
US20230421540A1 (en) Systems and methods for generating secure, encrypted communications using multi-party computations in order to perform blockchain operations in decentralized applications
US20230421397A1 (en) Systems and methods for performing blockchain operations using multi-party computation cohort management groupings

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
GR01 Patent grant
GR01 Patent grant