CN109474597A - A kind of distributed message based on block chain sends and receives method and device - Google Patents
A kind of distributed message based on block chain sends and receives method and device Download PDFInfo
- Publication number
- CN109474597A CN109474597A CN201811375869.9A CN201811375869A CN109474597A CN 109474597 A CN109474597 A CN 109474597A CN 201811375869 A CN201811375869 A CN 201811375869A CN 109474597 A CN109474597 A CN 109474597A
- Authority
- CN
- China
- Prior art keywords
- message
- block chain
- symmetric key
- message content
- ciphertext
- 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.)
- Withdrawn
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0816—Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
- H04L9/0819—Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
- H04L9/0825—Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) using asymmetric-key encryption or public key infrastructure [PKI], e.g. key signature or public key certificates
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
- H04L63/045—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply hybrid encryption, i.e. combination of symmetric and asymmetric encryption
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/14—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using a plurality of keys or algorithms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Storage Device Security (AREA)
Abstract
The invention discloses a kind of distributed message sending methods and device and method of reseptance and device based on block chain, wherein message method includes producing message according to message subject, judges whether message content needs to encrypt;It is encrypted if necessary, then combines symmetric key to carry out symmetric cryptography protection to message content, obtain message content ciphertext;It is sent collectively to the block chain node positioned at producer side with message subject, is stored in block chain, and return to message code;Judge whether to need to authorize, if necessary to authorize, then carry out asymmetric encryption for symmetric key, obtain symmetric key ciphertext, forms authorization message with message code and be stored in block chain, and return to authorization code.The present invention realizes distributed message production and consumption, can carry out distribution to message and deposit card, so that message can not be distorted and can be traced in the transmission, prevent information drop-out, so that message transmission is more safe and reliable.
Description
Technical field
The present invention relates to message distribution field more particularly to a kind of distributed message sending methods and dress based on block chain
It sets and method of reseptance and device.
Background technique
In industrial production and Socialized Reading, generally require to be distributed and handle to from the message in different sources, example
As needed to pass to message receiver from message generation side.But the distribution of message and processing are mainly adopted in the prior art
With the message-oriented middleware with centralization, message is managed collectively by centrally located component distributes, in this way, message is easy distributing
It loses in the process, safety is caused to reduce, while it is also possible to being tampered.Although secure data area, can be carried out by SSL
Protection, but this mode is only capable of protection message channel, is difficult to realize good protection to message or data source header, lacks simultaneously
It traces to the source support, can not be traced when a problem occurs.
Summary of the invention
In view of the above problem of the existing technology, the purpose of the present invention is to provide a kind of distributions based on block chain
Message method and device and method of reseptance and device.
Block chain is the novel of the computer technologies such as Distributed Storage, point-to-point transmission, common recognition mechanism, Encryption Algorithm
Application technology set.From the point of view of data Angle, block chain sequentially in time combines data block in such a way that sequence is connected
At a kind of linked data structure, data structure can not distort and can not be forged by its that cryptography mode guarantees.From technology
From the point of view of angle, block chain technology incorporates a variety of different technologies, by constructing block chain network, so that each in network
Node all allows to obtain a complete database copy, and is calculated based on common recognition mechanism and competition to safeguard based on block chain
Database update, the end to end network constituted is linked up by numerous nodes as a result, and is realized in the going of data storage and management
It the heartization and goes to trust.
In block chain network, all operation rules and data information disclose all nodes, therefore, often
One record is visible to all nodes.Simultaneously as going to trust between node and node, therefore without open between node
Identity, the node of each participation are anonymous.Meanwhile block chain technology has splendid safety, individually even more than section
Point can not influence the databases of other nodes on the modification of database, unless can control be more than in whole network 51% node
It modifies simultaneously, is possible to the data that modification block chain is recorded, and this is almost impossible generation.
To achieve the goals above, the present invention combines block chain technology with message distribution and processing, provides a kind of base
In the distributed message sending method of block chain, comprising the following steps:
Message is produced according to message subject, message includes message subject and message content, sends message subject to and is located at
The block chain node of producer side;
Judge whether message content needs to encrypt, if you do not need to encryption, sends message content to positioned at producer side
Block chain node;It is encrypted if necessary, then combines symmetric key to carry out symmetric cryptography protection to message content, acquisition disappears
It ceases content ciphertext and is sent to the block chain node positioned at producer side;
Judge whether to need to authorize, if necessary to authorize, then carry out asymmetric encryption for symmetric key, obtains symmetrical close
Key ciphertext;
The authorization message deposit block chain is formed with message code and returns to authorization code.
In some embodiments, before producing message according to message subject, message subject is pre- by producers and consumers
First negotiate to determine.
In some embodiments, for symmetric key carry out asymmetric encryption be combine consumption terminal public key to symmetric key into
Row asymmetric encryption.
The present invention also provides a kind of distributed message method of reseptances based on block chain, comprising the following steps:
Information query operation is carried out to obtain message content;
According to message content, judge whether to need ciphertext, if you do not need to ciphertext, consumes message, if necessary
Ciphertext determines whether symmetric key;
In the case where not having symmetric key, inquires authorization message and obtain symmetric key ciphertext;
Asymmetric decryption is carried out by consumption terminal private key symmetric key ciphertext, obtains symmetric key;
Symmetrical decryption is carried out according to symmetric key and obtains message content in plain text, and message content is consumed in plain text.
In some embodiments, carrying out information query operation to obtain message content includes by way of message code inquiry
It obtains message content and obtains message content in such a way that message header is inquired.
In some embodiments, obtaining symmetric key ciphertext is obtained by way of combining authorization code and consumption terminal public key
It takes.
The present invention also provides a kind of distributed message sending devices based on block chain, comprising:
Module is produced, is configured to produce message according to message subject, message includes message subject and message content, will be disappeared
Breath theme is sent to the block chain node positioned at producer side;
First judgment module is configured to judge whether message content needs to encrypt, if you do not need to encryption, it will be in message
Hold the block chain node being sent to positioned at producer side;
Encrypting module is configured to be encrypted if necessary, then symmetric key is combined symmetrically add to message content
Privacy protection obtains message content ciphertext and is sent to the block chain node positioned at producer side;
Second judgment module is configured to judge whether to need to authorize, and if necessary to authorize, then carries out for symmetric key
Asymmetric encryption obtains symmetric key ciphertext;
Access module is configured to form the authorization message deposit block chain with message code and returns to authorization code.
The present invention also provides a kind of distributed message reception devices based on block chain, comprising:
First enquiry module is configured to carry out information query operation to obtain message content;
Third judgment module is configured to judge whether to need ciphertext according to message content, if you do not need to ciphertext, right
Message is consumed, and if necessary to ciphertext, determines whether symmetric key;
Second enquiry module is configured in the case where not having symmetric key, is inquired authorization message and is obtained symmetrical
Key ciphertext;
First deciphering module is configured to carry out asymmetric decryption, acquisition pair by consumption terminal private key symmetric key ciphertext
Claim key;
Second deciphering module is configured to carry out symmetrical decryption acquisition message content according to symmetric key in plain text, to message
Content is consumed in plain text.
The present invention also provides a kind of computer equipments comprising memory, processor and storage are in memory and can
The computer program run on a processor, which is characterized in that processor realizes such as any of the above-described when executing computer program
The step of distributed message sending method based on block chain, or realize the dividing based on block chain as described in any of the above-described
The step of cloth message receival method.
The present invention also provides a kind of computer readable storage medium, computer readable storage medium has computer program,
It is characterized in that, processor realizes such as distributed message sending method of any of the above-described based on block chain when executing computer program
The step of, or the step of realizing the distributed message method of reseptance as described in any of the above-described based on block chain.
Distributed message sending method and device and method of reseptance and device energy of the present invention based on block chain
It is enough to blend block chain technology with message distribution and treatment mechanism, thus realize distributed message production and consumption, it can
Distribution is carried out to message and deposits card, so that message can not be distorted and can be traced in the transmission, information drop-out is prevented, so that disappearing
Breath transmission is more safe and reliable.
It should be appreciated that foregoing general description and it is described in detail below be merely exemplary with it is illustrative, rather than use
In the limitation disclosure.
This section provides the various realizations or exemplary general introduction of technology described in the disclosure, is not the complete of disclosed technology
The comprehensive disclosure of portion's range or all features.
Detailed description of the invention
In order to illustrate more clearly of technical solution of the present invention, technical solution of the present invention will be carried out more in conjunction with attached drawing
Detailed introduction, it should be apparent that, the accompanying drawings in the following description merely relates to some embodiments of the present invention, rather than to the disclosure
Limitation.
Fig. 1 is the flow diagram of the general message treatment method based on block chain in the prior art;
Fig. 2 is the step schematic diagram of the general message treatment method based on block chain in the prior art;
Fig. 3 is the process signal of the distributed message sending method of the present invention based on block chain and method of reseptance
Figure;
Fig. 4 is the step schematic diagram of the distributed message sending method of the present invention based on block chain;
Fig. 5 is the step schematic diagram of the distributed message method of reseptance of the present invention based on block chain;
Fig. 6 is the structural schematic diagram of the distributed message sending device of the present invention based on block chain;
Fig. 7 is the structural schematic diagram of the distributed message reception device of the present invention based on block chain;
Fig. 8 is the structural schematic diagram of the distributed message sending device of the present invention based on block chain;
Fig. 9 is the structural schematic diagram of the distributed message reception device of the present invention based on block chain.
Specific embodiment
In order to enable the purposes, technical schemes and advantages of the embodiment of the present disclosure are clearer, below in conjunction with disclosure reality
The technical solution of the embodiment of the present disclosure is clearly and completely described in the attached drawing for applying example.Obviously, described embodiment is
A part of this disclosure embodiment, instead of all the embodiments.Based on described embodiment of the disclosure, this field is common
Technical staff's every other embodiment obtained under the premise of being not necessarily to creative work, belongs to the model of disclosure protection
It encloses.
Unless otherwise defined, the technical term or scientific term that the disclosure uses should be tool in disclosure fields
The ordinary meaning for thering is the personage of general technical ability to be understood." first ", " second " used in the disclosure and similar word are simultaneously
Any sequence, quantity or importance are not indicated, and are used only to distinguish different component parts." comprising " or "comprising" etc.
Similar word means that the element or object before the word occur covers the element or object for appearing in the word presented hereinafter
And its it is equivalent, and it is not excluded for other elements or object.The similar word such as " connection " or " connected " is not limited to physics
Or mechanical connection, but may include electrical connection, it is either direct or indirectly."upper", "lower",
"left", "right" etc. is only used for indicating relative positional relationship, and after the absolute position for being described object changes, then the relative position is closed
System may also correspondingly change.
In order to keep the following explanation of the embodiment of the present disclosure to understand and concise, known function and known portion is omitted in the disclosure
The detailed description of part.
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here
It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure
It is fully disclosed to those skilled in the art.
The process of the distributed message processing based on block chain is as shown in Figure 1 in the prior art, wherein distribution refers to nothing
Different positions is in by the producer or consumer that are message.At the place for carrying out distributed message based on block chain technology
When reason, relate generally to three parts object, first is the producer of message, the producer be located at message queue process flow most before
End, the producer can be multiple producers positioned at different location, be configured mainly to produce various message, for example, enterprise, political affairs
Mansion, individual etc. all can serve as the producer and carry out message production, wherein producer's message produced generally comprises message subject
And message content, the producer or consumer can generally determine the context of a message according to message subject, in message
Appearance is generally correspondingly determined according to message subject.The producer passes through the block chain node positioned at producer side after producing message
Message subject and message content are transmitted to progress block chain broadcast in block chain, this is also known as " message cochain ";Second is
The consumer of message, consumer are located at the rearmost end of message queue process flow, are configured mainly to consume message, this
Kind of consumption include but is not limited to use, the modes such as processing, wherein consumer is also possible to enterprise, individual etc., and quantity can also be with
It is multiple, and multiple consumers are located at different positions, multiple consumers can be based on block chain technology in block chain
Message synchronize reception or update, then carry out other processing further according to different consumer demands;Third is message
Middleware is arranged in block chain, between producers and consumers, is configured between producer side and consumer side
Information is transmitted, when it is with transmitting information, specifically comprising positioned at the block chain node of producer side and positioned at consumption
The block chain node of person side.
It should be noted that the producer or consumer side in block chain are deployed with many block chain nodes, each
Block chain node is both provided with the data storage device and function of itself, and any one block chain node generates data and carries out cochain
After broadcast, every other block chain node can the automatic synchronization data, to realize data on multiple block chain nodes
Storage, to realize distributed storage.Specifically, block chain node, which can be, meets related request and is adapted for carrying out predetermined journey
The communications data processing unit, such as desktop computer, work station, server etc. of sequence instruction.
That is, the message that the arbitrary message producer is issued by the block chain node of producer side is wide by cochain
After broadcasting, by block chain technology, the message can be synchronized by block chain at multiple block chain nodes of consumer side,
Message is realized in the distributed storage of multiple consumer side block chain nodes, carrying out distributed card of depositing in this way can be realized message
Or can not the distorting of data, traceable characteristic, while preventing the unexpected of message from losing.
In the prior art, the distributed message processing method based on block chain specifically include that the producer produce message, lead to
The block chain node for crossing producer side gives out information, and is propagated by block chain and is synchronized to the block chain positioned at consumer side
Node, consumer monitor and receive message, and the method for Message Processing is as shown in Fig. 2, generally comprise following steps:
Step S1, in producer side, any producer produces message according to message subject, wherein message package produced
Include message subject and message content.
Step S2 will include message subject by the block chain node positioned at producer side as message-oriented middleware and disappear
The message of breath content is integrally stored in block chain and is broadcasted;Alternatively, the message subject in the message of producer's production is straight
It connects from producer side and is sent to consumer side, will only be disappeared by the block chain node positioned at producer side as message-oriented middleware
In breath content deposit block chain and broadcasted.
Message content is sent to from the block chain node for being located at producer side in block chain and is located at consumption by step S3
Multiple block chain nodes of person side.
Step S4 is parsed in each block chain node synchronized update block data of consumer side, multiple consumer sides.
Step S5 obtains message content corresponding with message subject according to message subject by way of inquiry, it is contemplated that
The correspondence of message subject and message content, consumer can directly acquire corresponding message content and be carried out according to message subject
It uses, to complete the consumption of message.
However, the message need for confidentiality transmitted among a producer and a consumer, existing message treatment method are difficult to prevent
Only other people obtain message content, and point based on block chain that the present embodiment is related to is discussed in detail by multiple embodiments by the present invention
The technical solution of cloth message method of sending and receiving.As shown in figure 3, showing the distribution of the present invention based on block chain
Formula Message Processing process, more particularly to the method sent and received.Message is sent and received below in conjunction with specific embodiment
Method and relevant apparatus describe in detail.
Embodiment one
The message that the producer produces can be transmitted to consumer by producer side by block chain node by block chain
Side, since different consumers is provided with block chain node in block chain, it is contemplated that message content often likely relates to
Perhaps sensitive information or the producer are unwilling externally to disclose message content extensively secrecy, so it would be desirable to the message of secrecy
Content is sent directly to will lead to the insecurity of message leakage in block chain.
In the present embodiment, symmetrical or/asymmetric encryption is carried out to the message content sent in message in producer side to protect
Shield correspondingly carries out symmetrical or asymmetric decryption to message content in consumer side and consumes, be able to ascend the private of message transmission
Close property and safety, as shown in figure 4, the present embodiment provides a kind of distributed message sending method based on block chain, it is specific to wrap
Include following steps:
Step S11, in producer side, any producer produces message according to message subject, and each message is corresponding unique
Message code, specifically, message code and message subject correspond, wherein message produced includes in message subject and message
Hold, message subject is directly carried out to uplink operation and is sent to the block chain node positioned at producer side;Wherein, for the producer
Message produced does not do any restriction here, needs to be broadcasted or transmitted to consumer side equal with the information for consumption
It can be used as message to be produced, for example, this message can be production report information, message header can be production report,
Message content can be title, date, department, place, trading object, turnover etc., also for example, this message can be soil
Really power information, message header is to can be confirmation of land right, and message content can be really power Item number, really power side's information, soil
Information and date of application etc..
Wherein, before step S11, according to the demand consumed to message, the producer can in advance and consumer is total
Message subject is determined with negotiation, such as can negotiate to determine that production report is message subject between seller and producer,
It can negotiate to determine that confirmation of land right is message subject etc. between land purchase side and landholder.
Step S12 judges whether to need to encrypt, if it is determined that message content for the message content in message produced
It does not need to encrypt, wherein the message content for not needing encryption is referred to as message content in plain text, then will be in the message that not need encryption
Hold the block chain node for carrying out uplink operation and being sent to positioned at producer side.
Step S13, if it is determined that message content be do not allow disclosure to be encrypted, then to message content into
The protection of row symmetric cryptography obtains message content ciphertext and carries out uplink operation and be sent to the block chain link positioned at producer side
Point;Specifically, when encrypting to message content, symmetric cryptography guarantor can be carried out to message content in conjunction with symmetric key
Shield, to obtain message content ciphertext;In this way, greatly improving message by carrying out symmetric cryptography protection to message content
The safety of content.
Step S14 judges whether to need to authorize, and if necessary to authorize, then needs to carry out asymmetric add for symmetric key
It is close, obtain symmetric key ciphertext;Specifically, when carrying out asymmetric encryption to symmetric key, consumption terminal public key pair can be combined
Symmetric key carries out asymmetric encryption, obtains symmetric key ciphertext;By carrying out asymmetric encryption protection to symmetric key, carry out
Authorization control can carry out corresponding decryption oprerations after consumer side only obtains authorization in this way and obtain message content,
Greatly improve the safety of message content.
Step S15 forms the authorization message deposit block chain with message code and returns to authorization code, which is used for
Consumer side carries out use when authorization decryption.
In addition, further, the message method of the present embodiment further includes step S16, the block positioned at producer side
It chain node and is broadcasted positioned at the block chain node of consumer side by peer-to-peer network (P2P, peer to peer) form, together
When message produced transmitted by the lateral consumer side of the producer;Further, pass through the block chain node positioned at consumer side
Receive peer-to-peer network broadcasted content, positioned at consumer side block chain node synchronized update block chain data and parsed,
It is exactly that other block chain nodes positioned at consumer side disappear with the block chain nodes sharing for receiving message for being located at consumer side
Content is ceased, so that message content is pointed out in different blocks chain link realizes that distribution deposits card, greatly strengthens the safety of message content
Property.
Embodiment two
In this way, message is transferred to consumer side from producer side by way of block chain is broadcasted, in consumer side, consumption
Person can consume the message broadcasted and transmitted by block chain, and the present embodiment provides a kind of distributions based on block chain
Message receival method, as shown in figure 5, specifically includes the following steps:
Step S21 carries out information query operation in consumer side to obtain message content;Specifically, including two kinds of message
Inquiry mode, wherein first way is to obtain message content in such a way that message code is inquired;The second way is by disappearing
The mode of breath title inquiry obtains message content.
Step S22 judges whether to need ciphertext according to the message content obtained in the step s 21;Wherein, when judgement obtains
In the case that the message content taken does not need ciphertext, message is consumed;When the message content that judgement obtains needs ciphertext
In the case of, determine whether symmetric key;
Step S23, when there is no in the case where symmetric key, inquire authorization message and obtain symmetric key ciphertext;Specifically
Ground can obtain symmetric key ciphertext by way of combining authorization code and consumption terminal public key.
Step S24 carries out asymmetric decryption by consumption terminal private key symmetric key ciphertext, obtains symmetric key.
Step S25, when the feelings for obtaining symmetric key by step S22 judgement there are symmetric key and by step S24
Under condition, symmetrical decryption is carried out according to above-mentioned symmetric key and obtains message content in plain text, message content is consumed in plain text.
Embodiment three
With reference to Fig. 6, it illustrates the hairs of the distributed message sending method based on block chain provided for embodiment one
The structural schematic diagram for sending device, the distributed message sending device based on block chain include:
Module 100 is produced, is configured in producer side, message is produced according to message subject, each message is corresponding unique
Message code, specifically, message code and message subject correspond, wherein message produced includes message subject and message
Message subject is directly carried out uplink operation and is sent to the block chain node positioned at producer side by content.Further, it produces
Module is also configured as according to the demand consumed to message, and the producer can disappear with the determination of consumer's joint consultation in advance
Cease theme.
First judgment module 110 is configured to judge whether to need to encrypt for the message content in message produced,
If it is determined that message content does not need to encrypt, wherein the message content for not needing encryption is referred to as message content in plain text, then will not
The message content for needing to encrypt carries out uplink operation and is sent to the block chain node positioned at producer side.
Encrypting module 120 is configured to not allow disclosure to be encrypted if it is determined that message content is, then
Symmetric cryptography protection is carried out to message content, obtain message content ciphertext and carries out uplink operation and is sent to positioned at producer side
Block chain node;Specifically, when being encrypted to message content, message content can be carried out in conjunction with symmetric key
Symmetric cryptography protection, to obtain message content ciphertext;In this way, by carrying out symmetric cryptography protection to message content, greatly
Improve the safety of message content.
Second judgment module 130 is configured to judge whether to need to authorize, and if necessary to authorize, then needs for symmetrical
Key carries out asymmetric encryption, obtains symmetric key ciphertext;It specifically, can be with when carrying out asymmetric encryption to symmetric key
Asymmetric encryption is carried out to symmetric key in conjunction with consumption terminal public key, obtains symmetric key ciphertext;It is non-by being carried out to symmetric key
Symmetric cryptography protection, carries out authorization control, can carry out decrypting behaviour accordingly after consumer side only obtains authorization in this way
Make and obtain message content, greatly improves the safety of message content.
Access module 140 is configured to form the authorization message deposit block chain with message code and returns to authorization code, should
Authorization code is used for the use when consumer side carries out authorization decryption.
Further, the message sending device that the present embodiment is related to can also include sending module 150, be configured to pass through
Peer-to-peer network (P2P, peer to peer) form is broadcasted, while message produced is passed by the lateral consumer side of the producer
It passs;Further, peer-to-peer network broadcasted content is received by being located at the block chain node of consumer side, positioned at the area of consumer side
Block chain node synchronized update block chain data are simultaneously parsed, it is, being located at other block chain nodes and the position of consumer side
In the block chain nodes sharing message content for receiving message of consumer side, so that message content is pointed out in different blocks chain link
It realizes that distribution deposits card, greatly strengthens the safety of message content.
Example IV
With reference to Fig. 7, it illustrates connecing for the distributed message method of reseptance based on block chain provided for embodiment two
The structural schematic diagram of receiving apparatus, the distributed message reception device based on block chain include:
First enquiry module 200 is configured to carry out information query operation in consumer side to obtain message content;Specifically
Ground, including two kinds of information query modes, wherein first way is to obtain message content in such a way that message code is inquired;The
Two kinds of modes are to obtain message content in such a way that message header is inquired.
Third judgment module 210 is configured to the message content obtained according to enquiry module, judges whether to need ciphertext;
Wherein, in the case that the message content that judgement obtains does not need ciphertext, message is consumed;When in the message that judgement obtains
In the case that appearance needs ciphertext, symmetric key is determined whether.
Second enquiry module 220 is configured to when there is no in the case where symmetric key, inquire authorization message and acquisition pair
Claim key ciphertext;Specifically, symmetric key ciphertext can be obtained by way of combining authorization code and consumption terminal public key.
Asymmetric deciphering module 230 is configured to carry out asymmetric decryption by consumption terminal private key symmetric key ciphertext, obtain
Take symmetric key.
Symmetrical deciphering module 240, be configured to when by the judgement of third judgment module there are symmetric key and by the
In the case that two enquiry modules obtains symmetric key, symmetrical decryption is carried out according to above-mentioned symmetric key and obtains message content in plain text,
Message content is consumed in plain text.
Embodiment five
With reference to Fig. 8, it illustrates the distributed message sending methods based on block chain for the embodiment of the present invention one
The structural schematic diagram of computer equipment, the computer equipment include: processor 700, memory 710 and are stored in memory
In 710 and the computer program 720 that can be run on processor 700, such as the distributed message sending method based on block chain
Program.The processor 700 realizes the distributed message based on block chain in the various embodiments described above when executing computer program
Each step in sending method, simultaneous processor 700 realize each module in above-mentioned each device when executing the computer program 720
Function.
The computer equipment can be desktop PC, notebook, palm PC and cloud server etc. and calculate equipment.
The computer equipment may include simultaneously, but be not limited only to, processor 700, memory 710.The present embodiment is not constituted to calculating
The restriction of machine equipment may include perhaps combining certain components or different components than illustrating more or fewer components,
Such as the computer equipment can also include input-output equipment, network access equipment, bus etc..
Alleged processor 700 can be central processing unit (Central Processing Unit, CPU), can also be
Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit
(Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor
Deng.
The memory 710 can be the internal storage unit of computer equipment, such as hard disk or memory.The memory
710 are also possible to the plug-in type hard disk being equipped on External memory equipment, such as computer equipment, intelligent memory card (Smart
Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..Further,
The memory 710 can also both including computer equipment internal storage unit and also including External memory equipment.The storage
Device 710 is for storing other programs and data needed for the computer program and computer equipment.The memory 710 is also
It can be used for temporarily storing the data that has exported or will export.
Embodiment six
With reference to Fig. 9, it illustrates the distributed message sending methods based on block chain for the embodiment of the present invention two
The structural schematic diagram of computer equipment, the computer equipment include: processor 800, memory 810 and are stored in memory
In 810 and the computer program 820 that can be run on processor 800, such as the distributed message method of reseptance based on block chain
Program.The processor 800 realizes the distributed message based on block chain in the various embodiments described above when executing computer program
Each step in method of reseptance, simultaneous processor 800 realize each module in above-mentioned each device when executing the computer program 820
Function.
The computer equipment can be desktop PC, notebook, palm PC and cloud server etc. and calculate equipment.
The computer equipment may include simultaneously, but be not limited only to, processor 800, memory 810.The present embodiment is not constituted to the meter
The restriction for calculating machine equipment may include perhaps combining certain components or different portions than illustrating more or fewer components
Part, such as the computer equipment can also include input-output equipment, network access equipment, bus etc..
Alleged processor 800 can be central processing unit (Central Processing Unit, CPU), can also be
Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit
(Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor
Deng.
The memory 810 can be the internal storage unit of the computer equipment, such as hard disk or memory.The storage
Device 810 is also possible to External memory equipment, such as the plug-in type hard disk of outfit, intelligent memory card (Smart Media Card,
SMC), secure digital (Secure Digital, SD) blocks, flash card (Flash Card) etc..Further, the memory
810 can also be both including internal storage unit or including External memory equipment.The memory 810 is for storing the computer
Other programs and data needed for program and the computer equipment.The memory 810 can be also used for temporarily storing
Data through exporting or will export.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function
Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different
Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completing
The all or part of function of description.Each functional unit in embodiment, module can integrate in one processing unit, can also
To be that each unit physically exists alone, can also be integrated in one unit with two or more units, it is above-mentioned integrated
Unit both can take the form of hardware realization, can also realize in the form of software functional units.In addition, each function list
Member, the specific name of module are also only for convenience of distinguishing each other, the protection scope being not intended to limit this application.Above system
The specific work process of middle unit, module, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure
Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually
It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician
Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed
The scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed device/terminal device and method, it can be with
It realizes by another way.For example, device described above/terminal device embodiment is only schematical, for example, institute
The division of module or unit is stated, only a kind of logical function partition, there may be another division manner in actual implementation, such as
Multiple units or components can be combined or can be integrated into another system, or some features can be ignored or not executed.Separately
A bit, shown or discussed mutual coupling or direct-coupling or communication connection can be through some interfaces, device
Or the INDIRECT COUPLING or communication connection of unit, it can be electrical property, mechanical or other forms.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.The integrated module/mono-
If member is realized in the form of SFU software functional unit and when sold or used as an independent product, can store in a calculating
In machine read/write memory medium.Based on this understanding, the present invention realizes all or part of the process in above-described embodiment method,
Relevant hardware can also be instructed to complete by computer program, the computer program can be stored in a computer can
It reads in storage medium, the computer program is when being executed by processor, it can be achieved that the step of above-mentioned each embodiment of the method.Its
In, the computer program includes computer program code, and the computer program code can be source code form, object generation
Code form, executable file or certain intermediate forms etc..The computer-readable medium may include: that can carry the calculating
It is any entity or device of machine program code, recording medium, USB flash disk, mobile hard disk, magnetic disk, CD, computer storage, read-only
Memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier wave
Signal, telecommunication signal and software distribution medium etc..It should be noted that the content that the computer-readable medium includes can be with
According to making laws in jurisdiction and the requirement of patent practice carries out increase and decrease appropriate, such as in certain jurisdictions, according to
Legislation and patent practice, computer-readable medium do not include electric carrier signal and telecommunication signal.
In addition, range includes any and all based on this public affairs although exemplary embodiment has been described herein
That opens has equivalent element, modification, omission, combination (for example, scheme that various embodiments are intersected), reorganization or the implementation changed
Example.Element in claims will be construed broadly as based on the language used in claim, however it is not limited in this explanation
Described example, example are to be interpreted as nonexcludability in book or during the implementation of the application.Therefore, this specification and
Example is intended to be to be considered only as example, and real scope and spirit are by following following claims and the full scope of its equivalent institute
Instruction.
Above description is intended to illustrative rather than restrictive.For example, above-mentioned example (or one or more side
Case) it can be in combination with one another.Such as other embodiments can be used when reading foregoing description in those of ordinary skill in the art.
In addition, various features can be grouped together to simplify the disclosure in above-mentioned specific embodiment.This should not be construed as
A kind of not claimed disclosed feature is necessary intention for any claim.On the contrary, subject of the present invention can be with
Less than whole features of specific disclosed embodiment.To which following claims is incorporated to herein as example or embodiment
In specific embodiment, wherein each claim is independently as individual embodiment, and consider that these embodiments can be with
It is combined with each other with various combinations or arrangement.The scope of the present invention should refer to appended claims and these claims are entitled
The full scope of equivalent form determines.
Above embodiments are only exemplary embodiment of the present invention, are not used in the limitation present invention, protection scope of the present invention
It is defined by the claims.Those skilled in the art can within the spirit and scope of the present invention make respectively the present invention
Kind modification or equivalent replacement, this modification or equivalent replacement also should be regarded as being within the scope of the present invention.
Claims (10)
1. a kind of distributed message sending method based on block chain, which comprises the following steps:
Message is produced according to message subject, the message includes the message subject and message content, and the message subject is sent out
It is sent to the block chain node positioned at producer side;
Judge whether the message content needs to encrypt, if you do not need to encryption, sends described be located at for the message content
The block chain node of producer side;It is encrypted if necessary, then the message content symmetrically add in conjunction with symmetric key
Privacy protection obtains message content ciphertext and is sent to the block chain node for being located at producer side;
Judge whether to need to authorize, if necessary to authorize, then carry out asymmetric encryption for the symmetric key, obtains symmetrical close
Key ciphertext;
The authorization message deposit block chain is formed with message code and returns to authorization code.
2. the distributed message sending method according to claim 1 based on block chain, which is characterized in that in the basis
Before message subject produces message, the message subject is negotiated to determine in advance by producers and consumers.
3. the distributed message sending method according to claim 1 based on block chain, which is characterized in that described to be directed to institute
Stating symmetric key and carrying out asymmetric encryption is to carry out asymmetric encryption to the symmetric key in conjunction with consumption terminal public key.
4. a kind of distributed message method of reseptance based on block chain, which comprises the following steps:
Information query operation is carried out to obtain message content;
According to the message content, ciphertext is judged whether it is, if it is not, directly consuming to the message, if it is close
Text determines whether symmetric key;
In the case where not having the symmetric key, inquires authorization message and obtain symmetric key ciphertext;
Asymmetric decryption is carried out to the title key ciphertext by consumption terminal private key, obtains symmetric key;
Symmetrical decryption is carried out according to the symmetric key and obtains message content in plain text, and the message content is consumed in plain text.
5. the distributed message method of reseptance according to claim 4 based on block chain, which is characterized in that described to disappear
Breath inquiry operation includes the message content being obtained by way of message code inquiry and by message mark to obtain message content
The mode of topic inquiry obtains the message content.
6. the distributed message method of reseptance according to claim 5 based on block chain, which is characterized in that the acquisition pair
Claiming key ciphertext is obtained by way of combining authorization code and consumption terminal public key.
7. a kind of distributed message sending device based on block chain characterized by comprising
Module is produced, is configured to produce message according to message subject, the message includes the message subject and message content,
The block chain node positioned at producer side is sent by the message subject;
First judgment module is configured to judge whether the message content needs to encrypt, if you do not need to encryption, disappears described
Breath content is sent to the block chain node for being located at producer side;
Encrypting module is configured to be encrypted if necessary, then symmetrically add to the message content in conjunction with symmetric key
Privacy protection obtains message content ciphertext and is sent to the block chain node for being located at producer side;
Second judgment module is configured to judge whether to need to authorize, and if necessary to authorize, then carries out for the symmetric key
Asymmetric encryption obtains symmetric key ciphertext;
Access module is configured to form the authorization message deposit block chain with message code and returns to authorization code.
8. a kind of distributed message reception device based on block chain characterized by comprising
First enquiry module is configured to carry out information query operation to obtain message content;
Third judgment module is configured to judge whether to need ciphertext according to the message content, if you do not need to described close
Text consumes the message, if necessary to the ciphertext, determines whether symmetric key;
Second enquiry module is configured in the case where not having the symmetric key, is inquired authorization message and is obtained symmetrical
Key ciphertext;
First deciphering module is configured to carry out asymmetric decryption, acquisition pair to the title key ciphertext by consumption terminal private key
Claim key;
Second deciphering module is configured to carry out symmetrical decryption acquisition message content according to the symmetric key in plain text, to described
Message content is consumed in plain text.
9. a kind of computer equipment comprising memory, processor and storage are in the memory and can be in the processing
The computer program run on device, which is characterized in that the processor realizes such as claim when executing the computer program
The step of distributed message sending method described in any one of 1-3 based on block chain, or realize as in claim 4-6
The step of distributed message method of reseptance described in any one based on block chain.
10. a kind of computer readable storage medium, the computer readable storage medium has computer program, which is characterized in that
The processor realizes the distribution based on block chain as described in any one of claim 1-3 when executing the computer program
The step of message method, or realize the distributed message based on block chain as described in any one of claim 4-6
The step of method of reseptance.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811375869.9A CN109474597A (en) | 2018-11-19 | 2018-11-19 | A kind of distributed message based on block chain sends and receives method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811375869.9A CN109474597A (en) | 2018-11-19 | 2018-11-19 | A kind of distributed message based on block chain sends and receives method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109474597A true CN109474597A (en) | 2019-03-15 |
Family
ID=65672724
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811375869.9A Withdrawn CN109474597A (en) | 2018-11-19 | 2018-11-19 | A kind of distributed message based on block chain sends and receives method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109474597A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109981641A (en) * | 2019-03-26 | 2019-07-05 | 北京邮电大学 | A kind of safe distribution subscription system and distribution subscription method based on block chain technology |
CN111310239A (en) * | 2020-03-23 | 2020-06-19 | 杭州溪塔科技有限公司 | Digital information batch distribution method and device and electronic equipment |
CN111385751A (en) * | 2020-02-28 | 2020-07-07 | 腾讯科技(深圳)有限公司 | Information sending method, device, terminal and readable storage medium |
CN111427958A (en) * | 2020-03-26 | 2020-07-17 | 北京链化未来科技有限公司 | Decentralized data sharing method based on block chain |
CN113347164A (en) * | 2021-05-24 | 2021-09-03 | 湖南大学 | Block chain-based distributed consensus system, method, device and storage medium |
CN113536388A (en) * | 2020-04-16 | 2021-10-22 | 中移物联网有限公司 | Data sharing method and system based on block chain |
CN113783847A (en) * | 2021-08-24 | 2021-12-10 | 上海浦东发展银行股份有限公司 | Message interaction method and device, computer equipment and storage medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170134161A1 (en) * | 2015-11-06 | 2017-05-11 | Cable Television Laboratories, Inc | Blockchaining for media distribution |
CN107294709A (en) * | 2017-06-27 | 2017-10-24 | 阿里巴巴集团控股有限公司 | A kind of block chain data processing method, apparatus and system |
CN107979590A (en) * | 2017-11-02 | 2018-05-01 | 财付通支付科技有限公司 | Data sharing method, client, server, computing device and storage medium |
CN108306887A (en) * | 2018-02-05 | 2018-07-20 | 徐正伟 | Internet of Things safety based on block chain protects system with data-privacy |
CN108566375A (en) * | 2018-03-12 | 2018-09-21 | 深圳壹账通智能科技有限公司 | The method, terminal and storage medium of message communicating between multiterminal based on block chain |
CN108632101A (en) * | 2018-05-31 | 2018-10-09 | 北京百度网讯科技有限公司 | Method and apparatus for updating configuration object |
CN108632284A (en) * | 2018-05-10 | 2018-10-09 | 网易(杭州)网络有限公司 | User data authorization method, medium, device and computing device based on block chain |
CN108702287A (en) * | 2018-04-16 | 2018-10-23 | 深圳前海达闼云端智能科技有限公司 | Information publication based on block chain and acquisition methods, device and block chain node |
-
2018
- 2018-11-19 CN CN201811375869.9A patent/CN109474597A/en not_active Withdrawn
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170134161A1 (en) * | 2015-11-06 | 2017-05-11 | Cable Television Laboratories, Inc | Blockchaining for media distribution |
CN107294709A (en) * | 2017-06-27 | 2017-10-24 | 阿里巴巴集团控股有限公司 | A kind of block chain data processing method, apparatus and system |
CN107979590A (en) * | 2017-11-02 | 2018-05-01 | 财付通支付科技有限公司 | Data sharing method, client, server, computing device and storage medium |
CN108306887A (en) * | 2018-02-05 | 2018-07-20 | 徐正伟 | Internet of Things safety based on block chain protects system with data-privacy |
CN108566375A (en) * | 2018-03-12 | 2018-09-21 | 深圳壹账通智能科技有限公司 | The method, terminal and storage medium of message communicating between multiterminal based on block chain |
CN108702287A (en) * | 2018-04-16 | 2018-10-23 | 深圳前海达闼云端智能科技有限公司 | Information publication based on block chain and acquisition methods, device and block chain node |
CN108632284A (en) * | 2018-05-10 | 2018-10-09 | 网易(杭州)网络有限公司 | User data authorization method, medium, device and computing device based on block chain |
CN108632101A (en) * | 2018-05-31 | 2018-10-09 | 北京百度网讯科技有限公司 | Method and apparatus for updating configuration object |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109981641A (en) * | 2019-03-26 | 2019-07-05 | 北京邮电大学 | A kind of safe distribution subscription system and distribution subscription method based on block chain technology |
CN111385751A (en) * | 2020-02-28 | 2020-07-07 | 腾讯科技(深圳)有限公司 | Information sending method, device, terminal and readable storage medium |
CN111385751B (en) * | 2020-02-28 | 2021-09-14 | 腾讯科技(深圳)有限公司 | Information sending method, device, terminal and readable storage medium |
CN111310239A (en) * | 2020-03-23 | 2020-06-19 | 杭州溪塔科技有限公司 | Digital information batch distribution method and device and electronic equipment |
CN111427958A (en) * | 2020-03-26 | 2020-07-17 | 北京链化未来科技有限公司 | Decentralized data sharing method based on block chain |
CN113536388A (en) * | 2020-04-16 | 2021-10-22 | 中移物联网有限公司 | Data sharing method and system based on block chain |
CN113536388B (en) * | 2020-04-16 | 2023-02-28 | 中移物联网有限公司 | Data sharing method and system based on block chain |
CN113347164A (en) * | 2021-05-24 | 2021-09-03 | 湖南大学 | Block chain-based distributed consensus system, method, device and storage medium |
CN113783847A (en) * | 2021-08-24 | 2021-12-10 | 上海浦东发展银行股份有限公司 | Message interaction method and device, computer equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109474597A (en) | A kind of distributed message based on block chain sends and receives method and device | |
Yue et al. | A survey of decentralizing applications via blockchain: The 5G and beyond perspective | |
CN108765058B (en) | Manufacturing link multi-entity security cooperation method based on block chain | |
CN109067810A (en) | A kind of distributed message guard method and protective device based on block chain | |
EP2774313B1 (en) | Electronic content distribution based on secret sharing | |
CN108667607A (en) | A kind of quantum key synchronous method with electric terminal | |
CN108432205A (en) | Use the system and method for the multi-party communication of the safety of agency | |
CN108566375A (en) | The method, terminal and storage medium of message communicating between multiterminal based on block chain | |
CN108471350A (en) | Trust data computational methods based on block chain | |
CN111324881B (en) | Data security sharing system and method fusing Kerberos authentication server and block chain | |
CN110599163B (en) | Transaction record outsourcing method facing block chain transaction supervision | |
CN110191153A (en) | Social communication method based on block chain | |
CN113660327A (en) | Block chain system, block chain link point adding method and transaction method | |
CN109861992A (en) | A kind of information interacting method and across scene method for tracing of monitor terminal | |
CN113301018B (en) | Data sharing method based on alliance chain | |
CN110349026A (en) | Decentralized Autonomous energy internet power exchange and energy system based on block chain | |
CN114679319B (en) | Distributed data synchronous encryption method based on block chain | |
CN108306853A (en) | A kind of intelligent data acquisition unit that supporting block chain and IOT wireless telecommunications and encryption communication method | |
CN110445840A (en) | A method of file storage and reading based on block chain technology | |
CN104660583A (en) | Encryption service method based on Web encryption service | |
CN106603579A (en) | Remote control system and method of wireless terminal, and wireless terminal | |
CN114244851B (en) | Block chain-based data distribution method | |
CN106712938A (en) | Quantum whiteboard communication method and system | |
CN112100145A (en) | Digital model sharing learning system and method | |
CN102332068A (en) | On-line logistics encryption, authentication and storage system using universal serial bus key (USBKEY) |
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 | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20210118 Address after: 215163 No. 9 Xuesen Road, Science and Technology City, Suzhou High-tech Zone, Jiangsu Province Applicant after: Suzhou Lang run innovation intellectual property operation Co.,Ltd. Address before: 100034 4008, 4 floor, 9 building, 56 half moon street, Xicheng District, Beijing. Applicant before: SINOCHAIN TECHNOLOGY Co.,Ltd. |
|
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20190315 |