Summary of the invention
Inventor thinks: relevant data transmission technology data sender and data receiver directly interact, transmission
Data, anonymity is poor, and personal secrets are low.
In view of the above technical problems, the present disclosure proposes a solution, increase anonymity, improve privacy peace
Entirely.
According to the disclosure in a first aspect, providing a kind of data transmission method based on block chain, comprising: obtain number
According to;According to the data, data encoding is generated;Send said data to data capsule;Area is sent by the data encoding
Block chain.
In some embodiments, according to the data, generating data encoding includes: to decompose the data, obtains multiple numbers
According to block;A label is distributed respectively for each data block;According to the label of the multiple data block, data encoding is generated.
In some embodiments, be each data block distribute a label include: for each data block distribute a base
Label, the base label include adenine A, guanine G, cytimidine C or thymidine T.
In some embodiments, according to the label of the multiple data block, generating data encoding includes: according to the base
Label utilizes basepairing rule, generation data encoding.
In some embodiments, the multiple data block is respectively provided with a serial number, and the serial number is for identifying each number
According to the sequence of block.
In some embodiments, sending said data to data capsule includes: the sequence for upsetting the multiple data block,
The data that obtain that treated;Treated that data are sent to data capsule by described.
In some embodiments, the multiple data block and data encoding timestamp having the same.
In some embodiments, the data capsule includes multiple data subregions, and each data subregion respectively corresponds one
Period, sending said data to data capsule includes: according to the timestamp of the corresponding each data block of the data and each
Each data block of the data is sent corresponding data subregion by the corresponding relationship of the period of a data subregion.
In some embodiments, data transmission method further include: according to the data encoding, generate broadcast message;To institute
It states broadcast message and carries out private key signature;Broadcast message after broadcasting from private key signature to block chain.
According to disclosure second aspect, a kind of data transmission method based on block chain is provided, comprising: obtain from block chain
Take data encoding;According to the data encoding, corresponding data are obtained from data capsule.
In some embodiments, according to the data encoding, obtaining corresponding data from data capsule includes: according to
Data encoding obtains the corresponding multiple data blocks of the data from data capsule;According to the multiple data block, reduction is obtained pair
The data answered.
In some embodiments, according to the data encoding, the corresponding multiple data of the data are obtained from data capsule
Block includes: to obtain corresponding data from data capsule according to the data encoding and the corresponding timestamp of the data encoding
Multiple data blocks.
In some embodiments, the data encoding includes the corresponding base label of each data block, according to the data
Timestamp corresponding with the data encoding is encoded, multiple data blocks that corresponding data are obtained from data capsule include: basis
Each corresponding base label of data block and the timestamp, using basepairing rule, obtain corresponding number from data capsule
According to multiple data blocks.
In some embodiments, the data capsule includes multiple data subregions, and each data subregion respectively corresponds one
Period obtains corresponding data from data capsule according to the data encoding and the corresponding timestamp of the data encoding
Multiple data blocks include: according to the corresponding timestamp of the data time corresponding with each data subregion of the data capsule
The corresponding relationship of section obtains multiple data blocks from corresponding data subregion.
In some embodiments, each data block respectively includes a serial number, and according to the multiple data block, reduction is obtained
Corresponding data include: to be ranked up according to the serial number of each data block to each data block, and reduction obtains corresponding data.
In some embodiments, it is obtained after data encoding includes: reception and browse the private key signature of block chain from block chain
Broadcast message;Data encoding is obtained from the broadcast message after the private key signature.
According to the disclosure third aspect, a kind of data transmission device based on block chain is provided, comprising: module is obtained,
It is configured as obtaining data;Generation module is configured as generating data encoding according to the data;First sending module is matched
It is set to and sends said data to data capsule;Second sending module is configured as sending block chain for the data encoding.
According to disclosure fourth aspect, a kind of data transmission device based on block chain is provided, comprising: first obtains mould
Block is configured as obtaining data encoding from block chain;Second obtains module, is configured as according to the data encoding, from data
Container obtains corresponding data.
According to the 5th aspect of the disclosure, the data transmission method based on block chain is provided, comprising: any of the above-described embodiment
The data transmission method;With data transmission method described in any of the above-described embodiment.
According to the 6th aspect of the disclosure, a kind of data transmission device based on block chain is provided, comprising: any of the above-described reality
Apply data transmission device described in example;With data transmission device described in any of the above-described embodiment.
According to the 7th aspect of the disclosure, a kind of data transmission device based on block chain is provided, comprising: memory;With
And it is coupled to the processor of the memory, the processor is configured to being executed based on the instruction for being stored in the memory
Data transmission method described in any of the above-described embodiment.
According to the eighth aspect of the disclosure, a kind of computer can storage medium, be stored thereon with computer program instructions, should
Instruction realizes data transmission method described in any of the above-described embodiment when being executed by processor.
In the above-described embodiments, anonymity is increased, personal secrets are improved.
Specific embodiment
The various exemplary embodiments of the disclosure are described in detail now with reference to attached drawing.It should also be noted that unless in addition having
Body explanation, the unlimited system of component and the positioned opposite of step, numerical expression and the numerical value otherwise illustrated in these embodiments is originally
Scope of disclosure.
Simultaneously, it should be appreciated that for ease of description, the size of various pieces shown in attached drawing is not according to reality
Proportionate relationship draw.
Be to the description only actually of at least one exemplary embodiment below it is illustrative, never as to the disclosure
And its application or any restrictions used.
Technology, method and apparatus known to person of ordinary skill in the relevant may be not discussed in detail, but suitable
In the case of, the technology, method and apparatus should be considered as part of specification.
It is shown here and discuss all examples in, any occurrence should be construed as merely illustratively, without
It is as limitation.Therefore, the other examples of exemplary embodiment can have different values.
It should also be noted that similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi
It is defined in a attached drawing, then in subsequent attached drawing does not need that it is further discussed.
Fig. 1 shows the flow chart of the data transmission method according to some embodiments of the disclosure.
As shown in Figure 1, data transmission method includes step S110- step S140.In some embodiments, transmission side data
Method is executed by terminal.For example, the terminal of data sender or data providing can pass through Dapp (Decentralized
Application, distributed application program) carry out data transmission operating.
In step s 110, data are obtained.For example, data are data packet.In some embodiments, data sender will count
Terminal is passed to according to wrapping.
In the step s 120, according to data, data encoding is generated.Such as data encoding is generated in the following way.
The step of generating data encoding S120 is described in detail below in conjunction with Fig. 2.
Fig. 2 shows the schematic diagrames for generating data encoding according to some embodiments of the disclosure.
Firstly, decomposition data, obtains multiple data blocks.As shown in Fig. 2, data are, for example, 500 data packets (such as size
For 100M).This 500 data packets are decomposed into 100 data blocks, each data block size is 1M.In some embodiments, more
A data block is respectively provided with a serial number.Serial number is used to identify the sequence of each data block.As shown in Fig. 2, for example to 100 numbers
It is ranked up according to block, obtains the serial number 1,2,3,4 ... of each data block.Serial number 1,2,3,4 ... identifies the suitable of each data block
Sequence.It should be noted that the size of each data block may be set according to actual conditions.
Then, a label is distributed for each data block.In some embodiments, a base is distributed for each data block
Label, the base label include adenine A, guanine G, cytimidine C or thymidine T.Adenine A, guanine G, born of the same parents are phonetic
Pyridine C, thymidine T are four kinds of different bases in science of heredity.As shown in Fig. 2, random point respectively of for example, 100 data blocks
With a base label, alkali yl coding-A-T-C-G-A-T-C-G- ... is obtained.
Finally, generating data encoding according to the label of multiple data blocks.In some embodiments, according to base label, benefit
With basepairing rule, data encoding is generated.Basepairing rule corresponds to T, C for A and corresponds to G.As shown in Fig. 2, for example utilizing alkali
Base pair principle obtains the corresponding data encoding-T-A-G-C-T-A-G-C- ... of alkali yl coding.
In step s 130, data capsule is transmitted data to.For example, upsetting the sequence of multiple data blocks first, obtain
Data that treated, then by treated, data are sent to data capsule.As shown in Fig. 2, for example upsetting the sequence of data block
It is 4,3,2,100,56 ....
In some embodiments, data capsule is public cloud or data intermediate storage mean, provides data storage function.
In some embodiments, multiple data blocks and data encoding timestamp having the same.Timestamp is, for example, data
Generate the time.For example, data capsule includes multiple data subregions.Each data subregion respectively corresponds a period.
Such as data capsule can be transmitted data in the following way.According to the corresponding each data block of data when
Between stamp and period of each data subregion corresponding relationship, send corresponding data subregion for each data block of data.
In some embodiments, data capsule breaks the corresponding each data block of data packet, and owning data capsule
The corresponding each data block of data packet is uniformly mixed, and further improves safety.There are a large amount of data blocks for data capsule, increase
Add the difficulty that data are obtained by permutation and combination scheme malice.
In step S140, block chain is sent by data encoding.For example, data sender is uploaded data by terminal
To block chain.
In some embodiments, data transmission method is further comprising the steps of.
Firstly, generating broadcast message according to data encoding.In some embodiments, data sender will be counted by terminal
Block is written according to coding, generates triple<data encoding, the account of data sender, the account of data receiver>.
Then, private key signature is carried out to broadcast message.In some embodiments, data sender also passes through terminal and pays area
Block catenary system usage charges fuel GAS.
Finally, the broadcast message after broadcasting private key signature to block chain.In some embodiments, broadcast message includes data
Coding and eap-message digest are in plain text.Eap-message digest is, for example, the description to data source, data volume, data type in plain text.Some
In embodiment, the abstract of a certain broadcast message is the description of certain data sender's title, 500 data, full dose data in plain text.
Fig. 3 shows the flow chart of the data transmission method of other embodiments according to the disclosure.
As shown in figure 3, data transmission method includes step S310- step S320.For example, data receiver is held by terminal
Row data transmission method.
In step s310, data encoding is obtained from block chain.In some embodiments, it realizes in the following way from area
Block chain obtains data encoding.
Firstly, the broadcast message after receiving and browsing the private key signature of block chain.For example, the abstract of browsing broadcast message is bright
Text, generates browsing record four-tuple<data encoding, browsing record, the account of data sender, and the account of data receiver>.
Then, data encoding is obtained from the broadcast message after private key signature.For example, data receiver is by terminal to browsing
Record carries out private key signature, pays data sender's token TOKEN and block catenary system usage charges GAS, and complete to block chain
Net broadcast.
In some embodiments, after the browsing that miner receives data receiver records, transaction cryptographic Hash is browsed and extracts, it will
Multiple transaction cryptographic Hash are matched two-by-two, are obtained Mei Keer using prior art and are taken root in, and assemble block, and by block chain to main block
On chain.So far, data receiver could browse and obtain the data encoding in broadcast message.It should be appreciated that the disclosure is based on public affairs
There is chain to build, therefore can not be repeated herein using POW or POS as prior arts such as common recognition algorithms.
In step s 320, according to data encoding, corresponding data are obtained from data capsule.In some embodiments, lead to
It crosses and obtains corresponding data from data capsule such as under type.
Firstly, obtaining the corresponding multiple data blocks of data from data capsule according to data encoding.For example, being compiled according to data
Code timestamp corresponding with data encoding, multiple data blocks of corresponding data are obtained from data capsule.In some embodiments,
Data encoding includes the corresponding base label of each data block.According to the corresponding base label of each data block and the time
It stabs, using basepairing rule, multiple data blocks of corresponding data is obtained from data capsule.For example, according to data encoding A-
C-T-G-C and timestamp 1, corresponding data are obtained from data capsule includes having T, G, A, C, G of base label more
A data block.
In some embodiments, data capsule includes multiple data subregions, and each data subregion respectively corresponds a time
Section.According to the corresponding relationship of the corresponding timestamp of data period corresponding with each data subregion of data capsule, from correspondence
Data subregion obtain multiple data blocks.For example, timestamp is 1, it should obtain multiple numbers from the data subregion that the period is 0-3
According to block.
Then, according to multiple data blocks, reduction obtains corresponding data.In some embodiments, each data block difference
Including a serial number.Each data block is ranked up according to the serial number of each data block, reduction obtains corresponding data.Example
Such as, the more a data blocks of T, G, A, C, G with base label include serial number 1,4,3,2.According to each data block of serial number sequence, obtain
To corresponding data 1 (T) -2 (G) -3 (C) -4 (G).It should be noted that due to the randomness during generation data block, timestamp
Unanimously, the existing probability of base label also consistent data block is very low, and the disclosure wouldn't be discussed in detail.
There is uniqueness by the data encoding that the data transmission method of the disclosure generates, and not by data sender's sum number
According to the influence of recipient.Whether data transmission both sides no longer need the corresponding cryptographic Hash of verify data packet consistent, reduce block
Chain verify data recipient obtain the cryptographic Hash of data packet and the cryptographic Hash of the data packet directly acquired from data sender be
No consistent link, reduces operation, to improve the efficiency of block chain.
Fig. 4 shows the flow chart of the data transmission method according to some embodiments of the disclosure.
As shown in figure 4, data transmission method includes the steps that S110- step S140 as shown in Figure 1 and step as shown in Figure 3
Rapid S310- step S320.
Fig. 5 shows the block diagram of the data transmission device according to some embodiments of the disclosure.
As shown in figure 5, data transmission device 5 includes: to obtain module 51, it is configured as obtaining data, such as execute such as Fig. 1
Shown step S110;Generation module 52 is configured as generating data encoding, such as execute step as shown in Figure 1 according to data
Rapid S120;First sending module 53 is configured as transmitting data to data capsule, such as executes step as shown in Figure 1
S130;Second sending module 54 is configured as sending data encoding on block chain, such as executes step as shown in Figure 1
S140。
Fig. 6 shows the block diagram of the data transmission device of some embodiments of the disclosure.
As shown in fig. 6, data transmission device 6 includes the first acquisition module 61, it is configured as obtaining data volume from block chain
Code, such as execute step S310 as shown in Figure 3;Module 62 is obtained with second, is configured as being held according to data encoding from data
Device obtains corresponding data, such as executes step S320 as shown in Figure 3.
Fig. 7 shows the block diagram of the data transmission device according to some embodiments of the disclosure.
As shown in fig. 7, data transmission device 7 includes memory 71;And it is coupled to the processor 72 of the memory 71, it deposits
Reservoir 71 is used for the instruction of storing execution data transmission method corresponding embodiment.For example, memory 71 stores the program of Dapp.Place
The data that reason device 72 is configured as executing based on the instruction being stored in memory 71 in the disclosure in any some embodiments pass
Transmission method.
Fig. 8 shows the block diagram of the computer system for realizing some embodiments of the disclosure.
As shown in figure 8, computer system 80 can be showed in the form of universal computing device.Computer system 80 includes storage
The bus 800 of device 810, processor 820 and the different system components of connection.
Memory 810 is such as may include system storage, non-volatile memory medium.System storage for example stores
There are operating system, application program, Boot loader (Boot Loader) and other programs etc..System storage can wrap
Include volatile storage medium, such as random access memory (RAM) and/or cache memory.Non-volatile memory medium
Such as it is stored with the instruction for executing the corresponding embodiment of at least one of data transmission method.Non-volatile memory medium includes
But be not limited to magnetic disk storage, optical memory, flash memory etc..
Processor 820 can with general processor, digital signal processor (DSP), application specific integrated circuit (ASIC),
The discrete hardware components mode such as field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor is come
It realizes.Correspondingly, each module of such as judgment module and determining module can be run by central processing unit (CPU) and be stored
The instruction of corresponding steps is executed in device to realize, can also be realized by executing the special circuit of corresponding steps.
Any bus structures in a variety of bus structures can be used in bus 800.For example, bus structures include but is not limited to
Industry standard architecture (ISA) bus, microchannel architecture (MCA) bus, peripheral component interconnection (PCI) bus.
Computer system 80 can also include input/output interface 830, network interface 840, memory interface 850 etc..These
It can be connected by bus 800 between interface 830,840,850 and memory 810 and processor 820.Input/output interface
830 can provide connecting interface for input-output equipment such as display, mouse, keyboards.Network interface 840 is various networked devices
Connecting interface is provided.The External memory equipments such as memory interface 850 is floppy disk, USB flash disk, SD card provide connecting interface.
Here, referring to according to the method, apparatus of the embodiment of the present disclosure and the flowchart and or block diagram of computer program product
Describe various aspects of the disclosure.It should be appreciated that the combination of each frame and each frame of flowchart and or block diagram, is ok
It is realized by computer-readable program instructions.
These computer-readable program instructions can provide general purpose computer, special purpose computer or other programmable devices
Processor, to generate a machine so that by processor execute instruction generation realize in flowchart and or block diagram one or
The device for the function of being specified in multiple frames.
These computer-readable program instructions may also be stored in computer-readable memory, these instructions are so that computer
It works in a specific way, to generate a manufacture, including realizes and refer in one or more frames in flowchart and or block diagram
The instruction of fixed function.
Complete hardware embodiment, complete software embodiment or implementation combining software and hardware aspects can be used in the disclosure
The form of example.
Data transmission method and its device, computer in through the foregoing embodiment can storage medium, increase anonymity,
Improve personal secrets.
So far, data transmission method and its device according to the disclosure is described in detail, computer can storage medium.
In order to avoid covering the design of the disclosure, some details known in the field are not described.Those skilled in the art are according to upper
The description in face, completely it can be appreciated how implementing technical solution disclosed herein.