CN109005208A - Method and apparatus for pushed information - Google Patents

Method and apparatus for pushed information Download PDF

Info

Publication number
CN109005208A
CN109005208A CN201810593529.7A CN201810593529A CN109005208A CN 109005208 A CN109005208 A CN 109005208A CN 201810593529 A CN201810593529 A CN 201810593529A CN 109005208 A CN109005208 A CN 109005208A
Authority
CN
China
Prior art keywords
block
information
transaction
client
motion
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.)
Granted
Application number
CN201810593529.7A
Other languages
Chinese (zh)
Other versions
CN109005208B (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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201810593529.7A priority Critical patent/CN109005208B/en
Publication of CN109005208A publication Critical patent/CN109005208A/en
Application granted granted Critical
Publication of CN109005208B publication Critical patent/CN109005208B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • H04L12/1859Arrangements for providing special services to substations for broadcast or conference, e.g. multicast adapted to provide push services, e.g. data channels
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/143Termination or inactivation of sessions, e.g. event-controlled end of session
    • H04L67/145Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures

Abstract

The embodiment of the present application discloses the method and apparatus for pushed information.One specific embodiment of this method includes: the Transaction Information for receiving client and sending, wherein Transaction Information includes the identifier for identifying groups of clients belonging to client;Based on Transaction Information, block is generated;Block information based on block generates broadcast message, wherein broadcast message includes identifier;Obtain the link address for the client that groups of clients includes;Broadcast message is pushed to link address.The embodiment realizes the client push broadcast message only into groups of clients belonging to client.

Description

Method and apparatus for pushed information
Technical field
The invention relates to field of computer technology, and in particular to the method and apparatus for pushed information.
Background technique
In current many block chain application systems, when there is particular event (such as block generation) generation, it will usually The relevant information of the event is broadcasted to all clients communicated to connect with block chain application system.Since the application of block chain is The network connection of system is generally more complex, and the client terminal quantity connected is huge, and therefore, the information of block chain application system is passed The research of transmission method or mechanism be one of block chain application system research and continue to develop place to.
Summary of the invention
The embodiment of the present application proposes the method and apparatus for pushed information.
In a first aspect, the embodiment of the present application provides a kind of method for pushed information, this method comprises: receiving client Hold the Transaction Information sent, wherein Transaction Information includes the identifier for identifying groups of clients belonging to client;Based on friendship Easy information generates block;Block information based on block generates broadcast message, wherein broadcast message includes identifier;It obtains The link address for the client that groups of clients includes;Broadcast message is pushed to link address.
In some embodiments, this method further include: for the client in groups of clients, periodically sent to the client Reversed heartbeat message;In response to be not received by within the predetermined time client return correspond to reversed heartbeat message Response message, the client is deleted from groups of clients.
In some embodiments, this method further include: receive the heartbeat message that destination client is sent;In response to determining Destination client is not present in groups of clients, destination client is added in groups of clients.
In some embodiments, before receiving the Transaction Information that client is sent, further includes: receive what client was sent Transaction motion, wherein transaction motion includes identifier, transaction number, chain code information, motion signing messages and motion public key letter Breath;Exist in response to verifying identifier, and verify transaction number and be not present, is based on motion public key information, verifying motion signature Whether information is correct;It is correct in response to verifying, it is based on chain code information, generates chain code operating result;Based on transaction motion and chain code Operating result generates motion result, wherein motion result includes motion result signing messages and motion result public key information;To Client returns to motion result.
In some embodiments, Transaction Information further includes trading signature information and transaction public key information;And based on transaction Information generates block, comprising: based on transaction public key information, whether verifying trading signature information is correct;It is correct in response to verifying, Based on preset agglomeration rule, block is generated.
In some embodiments, block information includes the preposition cryptographic Hash of Transaction Information, the block height of block and block; And be based on Transaction Information, generate block after, further includes: be based on identifier and block height, obtain the last area of block The cryptographic Hash of block;Identical with the cryptographic Hash of last block in response to the preposition cryptographic Hash of determination, memory block is believed in local account book Breath.
In some embodiments, block information further include: the block of block generates time, the cryptographic Hash of block.
Second aspect, the embodiment of the present application provide a kind of device for pushed information, which includes: to receive list Member is configured to receive the Transaction Information of client transmission, wherein Transaction Information includes for identifying client belonging to client The identifier of end group;Block generation unit is configured to generate block based on Transaction Information;Broadcast message generation unit is matched It is set to the block information based on block, generates broadcast message, wherein broadcast message includes identifier;Link address acquiring unit, It is configured to obtain the link address for the client that groups of clients includes;Push unit is configured to push to link address wide Broadcast information.
In some embodiments, device further include: reversed heartbeat message transmission unit is configured to for groups of clients In client, periodically send reversed heartbeat message to the client;Unit is deleted, is configured in response in predetermined time model It is not received by the response message corresponding to reversed heartbeat message of client return in enclosing, the visitor is deleted from groups of clients Family end.
In some embodiments, device further include: heartbeat message receiving unit is configured to receive destination client hair The heartbeat message sent;Adding unit is configured in response to determine that in groups of clients, there is no destination clients, in client Destination client is added in group.
In some embodiments, device further include: transaction motion receiving unit is configured to receive client transmission Transaction motion, wherein transaction motion includes identifier, transaction number, chain code information, motion signing messages and motion public key letter Breath;Authentication unit is configured in response to verifying identifier and exists, and verifies transaction number and be not present, and is based on motion public key Whether information, verifying motion signing messages are correct;Motion result return unit is configured in response to verifying correctly, is based on chain Code information, generates chain code operating result;Based on transaction motion and chain code operating result, motion result is generated, wherein motion result Including motion result signing messages and motion result public key information;Motion result is returned to client.
In some embodiments, Transaction Information further includes trading signature information and transaction public key information;And block generates Unit is further configured to: based on transaction public key information, whether verifying trading signature information is correct;It is correct in response to verifying, Based on preset agglomeration rule, block is generated.
In some embodiments, block information includes the preposition cryptographic Hash of Transaction Information, the block height of block and block; And device further include: cryptographic Hash acquiring unit is configured to obtain the last block of block based on identifier and block height Cryptographic Hash;Storage unit is configured in response to determine that preposition cryptographic Hash is identical with the cryptographic Hash of last block, in local account Memory block information in this.
In some embodiments, block information further include: the block of block generates time, the cryptographic Hash of block.
The third aspect, the embodiment of the present application provide a kind of electronic equipment, which includes: one or more processing Device;Storage device is stored thereon with one or more programs;When one or more programs are executed by one or more processors, So that one or more processors realize the method as described in implementation any in first aspect.
Fourth aspect, the embodiment of the present application provide a kind of computer-readable medium, are stored thereon with computer program, should The method as described in implementation any in first aspect is realized when computer program is executed by processor.
Method and apparatus provided by the embodiments of the present application for pushed information are marked by receiving having for client transmission Know the Transaction Information of the identifier of groups of clients belonging to the client, and be based on the Transaction Information, generates block.Then, base In the block information of the block, the broadcast message for having above-mentioned identifier is generated.Later, the client for including to above-mentioned groups of clients The link address at end pushes above-mentioned broadcast message, to realize targetedly, only to groups of clients belonging to the client In client push broadcast message improve simultaneously because the client in other groups of clients cannot receive broadcast message The safety of information.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the application's is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is that this application can be applied to exemplary system architecture figures therein;
Fig. 2 is the flow chart of one embodiment of the method for pushed information of the application;
Fig. 3 is the schematic diagram according to an application scenarios of the method for pushed information of the application;
Fig. 4 is the flow chart according to another embodiment of the method for pushed information of the application;
Fig. 5 is the timing diagram according to another embodiment of the method for pushed information of the application;
Fig. 6 is the structural schematic diagram according to one embodiment of the device for pushed information of the application;
Fig. 7 is adapted for the structural schematic diagram for the computer system for realizing the server of the embodiment of the present application.
Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to Convenient for description, part relevant to related invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is shown can be using the method for pushed information of the application or the example of the device for pushed information Property framework 100.
As shown in Figure 1, system architecture 100 may include terminal device 101,102,103, network 104 and block catenary system 105.Block catenary system 105 may include one or more nodes, can communicate to connect between node.Network 104 is at end The medium of communication link is provided between end equipment 101,102,103 and block catenary system 105.Network 104 may include various companies Connect type, such as wired, wireless communication link or fiber optic cables etc..
Terminal device 101,102,103 is interacted by network 104 with block catenary system 105, to receive or send message etc.. Various telecommunication customer end applications can be installed, such as the application of Message Processing class, searching class are answered on terminal device 101,102,103 With etc..
Terminal device 101,102,103 can be hardware, be also possible to software.When terminal device 101,102,103 is hard When part, it can be the various electronic equipments for supporting Message Processing, including but not limited to smart phone, tablet computer, e-book is read Read device, pocket computer on knee and desktop computer etc..When terminal device 101,102,103 is software, can install In above-mentioned cited electronic equipment.Multiple softwares or software module may be implemented into (such as providing distributed clothes in it Business), single software or software module also may be implemented into.It is not specifically limited herein.
One or more nodes in block catenary system 105 can provide various services, for example, terminal device 101, 102, the information sent on 103 is handled, and by the service of treated information is sent to terminal device 101,102,103 Device.
It should be noted that the method provided by the embodiment of the present application for pushed information is generally by block catenary system 105 execute, and correspondingly, the device for pushed information is generally positioned in block catenary system 105.It should be pointed out that executing Main body can be a node in block catenary system 105, be also possible to two or more in block catenary system 105 Node.
It should be pointed out that the node in block catenary system 105 can be single server, it can also be by multiple servers Or multiple server clusters are constituted.Wherein, above-mentioned server can be hardware, be also possible to software.When server is hardware, The distributed server cluster that multiple server compositions may be implemented into, also may be implemented into individual server.When server is When software, multiple softwares or software module (such as providing Distributed Services) may be implemented into, also may be implemented into single Software or software module.It is not specifically limited herein.
It should be understood that the number of terminal device, network and block catenary system in Fig. 1 is only schematical.According to reality It now needs, can have any number of terminal device, network and block catenary system.
With continued reference to Fig. 2, the process of one embodiment of the method for pushed information according to the application is shown 200.This for pushed information method the following steps are included:
Step 201, the Transaction Information that client is sent is received.
It in the present embodiment, can for the executing subject of the method for pushed information (block catenary system 105 as shown in Figure 1) To receive the Transaction Information of client transmission.Wherein, Transaction Information may include for identifying client belonging to the client The identifier of group.Transaction can refer to the behavior that some pairs of articles, service or the currency that generate between user are exchanged each other's needs.Its In, user can be connect by client with block catenary system.For example, can to provide a client application soft for block catenary system Part, user can be connect by installing corresponding application software in local client with block catenary system, and with connect The other users for entering block catenary system interact or trade.Transaction Information may include any information relevant to transaction.Example Such as transaction number, exchange hour, transaction content, the user name etc. of both parties.Later, client can use its above-mentioned installation Application software to block catenary system send Transaction Information.
In practice, in different block catenary systems, and in particular to transaction and Transaction Information may be different.Citing For, in bit coin system, transaction can refer to bit coin transaction event.For example, a transaction can refer to user A to user B Pay a bit coin.Corresponding, Transaction Information may include that " user A pays a bit to user B to transaction content Coin ".In the system of ether mill, transaction can refer to ether coin transaction event.For example, a transaction can refer to user C to user's D branch Three ether coin are paid.Corresponding, Transaction Information may include transaction content " user C pays three ether coin to user D ". In the block chain application system of an electric business class, transaction can refer to a common network trading.For example, a transaction can To refer to that user E buys ten books to user F, and 400 RMB are paid to user F.Corresponding, Transaction Information may include transaction Content " user E buys ten books to user F, and pays 400 RMB to user F ".
In practice, multiple client group, and each visitor can be divided into the client of block catenary system communication connection Family end group has the identifier that can be identified for that the groups of clients.Arbitrary symbol, label, title or tool can be used in identifier The digital number etc. of body.Wherein, the division of groups of clients can be by technical staff previously according to actual demand or data point The grouping carried out to multiple client is analysed, is also possible to client during with the interaction of block catenary system, according to visitor The grouping that the interactive information at family end etc. carries out client.
Group basis can be different according to practical application, flexibly set.It for example, can be according to the main of client Application attribute is divided into the same groups of clients to divide, such as by the client for relating generally to food related service, will be main The client for being related to clothes related service is divided into the same groups of clients.Specifically, for being related to the visitor of clothes related service The client for being directed to luxurious category or the high clothes business for determining class further can also be divided into the same visitor by family end The client for being directed to the clothes business of non-luxurious category or Fei Gaoding class is divided into the same client by family end group Group.
Step 202, it is based on Transaction Information, generates block.
In the present embodiment, above-mentioned executing subject can generate block based on the Transaction Information of client-side.Wherein, on A plurality of block chain can be safeguarded by stating in executing subject.Every block chain can correspond to a groups of clients.Block chain is by least One block is sequentially connected composition.Generally, it can be constantly be generated new block in block catenary system, and new block is connected To after the last one block in corresponding block chain, become the last block of new block chain.Block can be to block The record of some transaction data in catenary system.In practice, block can recorde the Transaction Information of the transaction generated in system Some or all contents, such as may include transaction content, exchange hour, transaction number etc..
In practice, above-mentioned executing subject is per second may to receive many Transaction Informations, then can be according to presetting Agglomeration rule generate block.Wherein, agglomeration rule may include the rule for generating block.Agglomeration rule can be by Technical staff is preset according to application demand.For example, agglomeration rule may include such as every 20 minutes generation area blocks. So, every 20 minutes, above-mentioned executing subject will record received Transaction Information within this 20 minutes, with life At block.Specifically, Transaction Information is divided into different clients by the identifier that can be first depending in received Transaction Information The corresponding Transaction Information of end group.Then the corresponding Transaction Information of each groups of clients is recorded, to generate the groups of clients Corresponding new block.Agglomeration rule can also include that each block such as records the Transaction Information of ten transactions.I.e. for each Client organizes corresponding transaction, and when the number of transaction is not more than ten, a block can be generated.When the number of transaction is greater than ten simultaneously And when being not more than 20, two blocks can be generated, record has the Transaction Information of ten transactions in one of block, another The Transaction Information that record has remaining to trade in block.It similarly, can class according to the method described above when the number of transaction is other It pushes away.Agglomeration rule is recorded when can also include such as record Transaction Information according to transaction number.For example, by three transactions Transaction Information recorded, and generate a block.Wherein, the transaction number of three transactions be respectively " 02 ", " 10 " and " 08 ", then the Transaction Information for the transaction that transaction number is " 02 " can be recorded first, then re-recording transaction number is " 08 " Transaction Transaction Information, finally re-record transaction number be " 10 " transaction Transaction Information.It should be appreciated that agglomeration rule Then it can flexibly be set according to actual application demand.After generating block, the block of generation can be connected to the block In the corresponding block chain of corresponding groups of clients.
Step 203, based on the block information of block, broadcast message is generated.
In the present embodiment, above-mentioned executing subject can generate broadcast message based on the block information of block.Wherein, extensively Broadcasting information may include above-mentioned identifier, so as to generate and correspond to the block in the corresponding block chain of each groups of clients In the broadcast message of each groups of clients.Broadcast message can also include some or all contents of block information.The area of block Block message may include the content recorded in block, can also include block some relevant informations, such as block generation when Between etc..
Step 204, the link address for the client that groups of clients includes is obtained.
In the present embodiment, the link address for the client that the available groups of clients of above-mentioned executing subject includes.Wherein, The link address of client may include the internet protocol address of client.It, can be in above-mentioned executing subject in practice The link address for the client that each groups of clients includes is stored.For example, it can store in above-mentioned executing subject There is the one of the corresponding relationship for indicating the corresponding identifier of groups of clients between the link address of client that groups of clients includes A link address table.To which above-mentioned executing subject can directly according to the above-mentioned connection of the corresponding identifier query of groups of clients Location table, and then obtain the link address of corresponding client.
Step 205, broadcast message is pushed to link address.
In the present embodiment, the link address that above-mentioned executing subject can be obtained to above-mentioned steps 204 pushes above-mentioned steps 203 broadcast messages generated.
Further include following steps before above-mentioned steps 201 in some optional implementations of the present embodiment:
1) the transaction motion that client is sent is received, wherein transaction motion includes identifier, transaction number, chain code information, Motion signing messages and motion public key information.
In practice, the transaction that client completes it, the transaction that can be first sent completely to above-mentioned executing subject Transaction motion.I.e. above-mentioned executing subject can also first receive the transaction motion of client transmission.Wherein, transaction motion includes mark Know symbol, transaction number, chain code information, motion signing messages and motion public key information.Transaction number can be by groups of clients pair The number of its relevant transaction setting.
Generally, chain code can refer to realize the application program of certain function.Chain code can be divided into system chain code and User's chain code.System chain code can be used to realize the function of block catenary system level, such as the configuration of system, the portion of user's chain code Administration, the signature of upgrading and transaction related information and verifying etc..User's chain code can be used to implement the application function of user.Chain Code can be write and be disposed by technical staff or corresponding developer.Chain code information can refer to some letters relevant to chain code Chain code in breath, such as transaction motion is the application program of one section of method for storing data.So chain code information Enter ginseng (parameter that method is related to) etc. including such as chain code title (method name), chain code version, method.
In addition, motion signing messages and motion public key information can also be arranged in transaction motion in client.Wherein, motion Signing messages can be used for identifying the client for sending the transaction motion.Specifically, the client for sending transaction motion can be first Motion private key information and motion public key information are first set.Wherein, private key and public key can be one obtained by certain algorithm A key pair.It is relevant using certain algorithm or the generation of existing key that motion private key and motion public key can be client Software and the private key and public key generated.Generally, private key and public key are all character strings, and therefore, motion public key information may include The particular content of the public key of generation.
Specifically, send transaction motion client can with the motion private key of its its setting to the content of motion of trading into One Hash operation of row, and obtain operation result.Generally, operation result can be a cryptographic Hash.The cryptographic Hash As above-mentioned motion signing messages.Then can in transaction motion the cryptographic Hash that enclose and corresponding with motion private key The motion public key information of motion public key.
After above-mentioned executing subject receives transaction motion, can use motion public key information verifying motion signing messages is It is no correct, if verifying is correct, show that the transaction motion is the client that motion private key corresponding with motion public key information is arranged What end was sent.If verifying is incorrect, then show that received transaction motion may be the false letter that other clients are sent Breath.Specifically, above-mentioned executing subject can use motion public key information to transaction motion after receiving the transaction motion Content identical Hash operation when carrying out with generation motion signing messages, obtains a cryptographic Hash.Then, compare the cryptographic Hash with Whether the cryptographic Hash for including in transaction motion is identical.
2) exist in response to verifying identifier, and verify transaction number and be not present, be based on motion public key information, verifying mentions Whether case signing messages is correct;It is correct in response to verifying, it is based on chain code information, generates chain code operating result;Based on transaction motion With chain code operating result, motion result is generated, wherein motion result includes motion result signing messages and motion result public key letter Breath;Motion result is returned to client.
In practice, above-mentioned executing subject can first verify that identifier wherein included after receiving transaction motion It whether there is.For example, it can be previously stored with identifier table in above-mentioned executing subject, wherein record has the client of division The client that the corresponding identifier of group and the corresponding groups of clients of each identifier include.So, above-mentioned executing subject can be with It whether there is by traversing the identifier that identifier table judgement receives.Furthermore it is also possible to verify the transaction in transaction motion Number whether there is.For example, in above-mentioned executing subject can be had been received transaction motion or Transaction Information The transaction number for including is stored, and a transaction coding sheet can be generated.It is then possible to true by traversing the transaction coding sheet Whether the fixed transaction number received now has existed.
Later, if judging, the identifier received exists and transaction number is not present and (may indicate that above-mentioned execution master Receive the relevant information of corresponding to transaction number transaction before body not yet), it can be further using receiving Motion public key information in transaction motion verifies motion signing messages therein.If it is correct to verify motion signing messages, The chain code information for including in the transaction motion received can be so executed, chain code operating result is obtained.For example, if chain The corresponding chain code of code information is the application program of the method for a storing data, then the side of the storing data can be executed Method, and using the implementing result of this method as chain code operating result.
Next, motion result can be obtained based on transaction motion and chain code operating result.Generally, it can will trade Chain code information partial replacement in motion is chain code operating result, and encloses motion result signing messages and motion result public key letter Breath, to generate motion result.Wherein, motion result signing messages can be used for identifying the above-mentioned execution master for generating motion result Body.Motion result public key information may include generating relevant software using certain algorithm or existing key and generating The content of public key.Wherein, it motion result signing messages and motion result public key information and is tested using motion result public key information The verification process of card motion result signing messages can refer to above-mentioned related to motion public key information about motion signing messages Illustrate, details are not described herein.Later, the motion result of generation further can be returned to transmission transaction and mentioned by above-mentioned executing subject The client of case.
In some optional implementations of the present embodiment, Transaction Information further includes trading signature information and transaction public key Information;And above-mentioned steps 202 can also include: based on transaction public key information, whether verifying trading signature information is correct;Response It is correct in verifying, based on preset agglomeration rule, generate block.
In practice, the Transaction Information that client is sent can also include trading signature information and transaction public key information.So, It, can be first with transaction public key information wherein included to trading signature wherein included after aforementioned body receives Transaction Information Information is verified.If it is correct to verify trading signature information, block can be generated based on preset agglomeration rule.Its In, trading signature information can be used for identifying the client for sending Transaction Information.Transaction public key information may include using certain Algorithm or existing key generate relevant software and the content of public key that generates.Wherein, trading signature information and transaction Public key information and the verification process of utilization transaction public key information verifying trading signature information can refer to above-mentioned about motion label The related description of name information and motion public key information, details are not described herein.Specific implementation procedure and utilization transaction public key information Verification process can refer to the above-mentioned related description about motion signing messages and motion public key information, details are not described herein. The specific implementation procedure and agglomeration rule for generating block can refer to the related description in the step 202 in Fig. 2 corresponding embodiment, Details are not described herein.
In some optional implementations of the present embodiment, block information includes the block height of Transaction Information, block With the preposition cryptographic Hash of block;And after above-mentioned steps 202 further include: be based on identifier and block height, obtain block Last block cryptographic Hash;It is identical with the cryptographic Hash of last block in response to the preposition cryptographic Hash of determination, it is deposited in local account book Storage area block message.
In practice, block information can also include the preposition cryptographic Hash of Transaction Information, the block height of block and block.Its In, block height can generally refer to block is which block where it in block chain.Each block can have one it is right The cryptographic Hash answered.Generally, a Hash operation can be carried out to the content of each block, and using obtained cryptographic Hash as this The corresponding cryptographic Hash of block.The preposition cryptographic Hash of block can refer to the corresponding cryptographic Hash of a upper block of the block.
It accordingly, can also include: high based on identifier and block after the step 202 in the corresponding embodiment of Fig. 2 Degree, obtains the cryptographic Hash of the last block of block, and verifies preposition in the cryptographic Hash and block information of obtained last block Whether cryptographic Hash is identical.If verifying is identical, can in the local account book of above-mentioned executing subject memory block information.Tool Body, above-mentioned executing subject can find the corresponding block chain of the corresponding groups of clients of the identifier according to identifier first.So Afterwards, usually subtracting 1 for block height can be obtained by the block height of a upper block in block chain, and based on a upper block Then a block on block altitude location can further obtain the corresponding cryptographic Hash of a block.
In some optional implementations of the present embodiment, block information further include: the block of block generates time, area The cryptographic Hash of block.
With continued reference to the signal that Fig. 3, Fig. 3 are according to the application scenarios of the method for pushed information of the present embodiment Figure.In the application scenarios of Fig. 3, above-mentioned executing subject can receive the Transaction Information 301 of client transmission, wherein transaction letter Include in breath 301 identifier " A ".Identifier " A " is used to identify groups of clients belonging to the client for sending Transaction Information 301. Then, above-mentioned executing subject can be based on Transaction Information 301, generate block.Specifically, above-mentioned executing subject can be by every 20 Received Transaction Information in minute generates the block for corresponding to each identifier according to different identifiers.Therefore, it can be based on The Transaction Information comprising identifier " A " received within 20 minutes generates block.Assuming that the transaction comprising identifier " A " The corresponding transaction of information includes transaction " 01 ", transaction " 02 " and transaction " 03 ".So, it can recorde transaction " 01 " in block, hand over The easily associated transaction data of " 02 " and transaction " 03 " is (for example, the exchange hour of each transaction, transaction content.Transaction number etc.). Later, above-mentioned executing subject can generate broadcast message 303 based on the block information 302 of block.Block information 302 can wrap The relevant transaction data of each transaction of block record is included, can also include the relevant some information of block, such as block height, The (not shown)s such as the cryptographic Hash of block.Broadcast message 303 may include block information and identifier " A ".Later, above-mentioned to hold Row main body can be obtained by inquiring the link address table 304 of its corresponding relationship that identifier and link address is locally stored It include: " AD1 ", " AD2 " and " AD3 " to the corresponding link address of identifier " A ".Then, above-mentioned executing subject can be to " AD1 ", " AD2 " and " AD3 " sends above-mentioned broadcast message 303.
The method provided by the above embodiment of the application is identified belonging to the client by receiving having for client transmission Groups of clients identifier Transaction Information, and be based on the Transaction Information, generate block.Then, based on the block of the block Information generates the broadcast message for having above-mentioned identifier.Later, the link address for the client for including to above-mentioned groups of clients pushes away Serve and state broadcast message, thus realize targetedly, only client push into groups of clients belonging to the client Broadcast message improves the safety of information simultaneously because the client in other groups of clients cannot receive broadcast message. In addition, since the business that client may relate in same groups of clients is same or like, so that client is received all It is relative information, therefore, this mode additionally aids promotion pushing efficiency.
With further reference to Fig. 4, it illustrates the processes 400 of another embodiment of the method for pushed information.The use In the process 400 of pushed information, comprising the following steps:
Step 401, the Transaction Information that client is sent is received.
Step 402, it is based on Transaction Information, generates block.
Step 403, based on the block information of block, broadcast message is generated.
Step 404, the link address for the client that groups of clients includes is obtained.
Step 405, broadcast message is pushed to link address.
The specific implementation procedure of above-mentioned steps 401,401,401,401 and 401 can refer to the step in Fig. 2 corresponding embodiment The related description of rapid 201,202,203,204 and 205, details are not described herein.
Step 406, for the client in groups of clients, reversed heartbeat message periodically is sent to the client;In response to The response message corresponding to reversed heartbeat message of client return is not received by within the predetermined time, from client The client is deleted in group.
In the present embodiment, above-mentioned executing subject can each client into groups of clients regularly send reversed heartbeat Information.If the response message of client return is not received by within the predetermined time, then can be from groups of clients Delete the client.Wherein, reversed heartbeat message can be generally heartbeat message.Heartbeat message can refer to by receiving or sending out The customized structural body of both sides is sent, the sender of heartbeat message passes through timing to recipient's transmission heartbeat message, and according to whether Receive the response message of recipient in preset time range to judge whether it also effectively connect with recipient's maintenance.Usually If being not received by the response message of recipient in preset time range, it is considered that the connection with recipient occurs Trouble or failure.
In practice, above-mentioned executing subject can store client table.Wherein, client has been can store in client table Corresponding relationship between group and client.Generally, above-mentioned executing subject can be marked by the link address of each client Know each client.Therefore, it actually can store in client table corresponding between groups of clients and the link address of client Relationship.To then above-mentioned executing subject can delete the company for not receiving the client of response message by traversing client table It is grounded location.It should be appreciated that right with it if being also stored with client in other data structures in above-mentioned executing subject The corresponding relationship for the link address answered, then can also be deleted simultaneously other when deleting a certain client from groups of clients The corresponding relationship of the corresponding link address of the client stored in data structure.
It should be appreciated that above-mentioned executor's main body can send anti-to the client in each groups of clients in practice To heartbeat message.If being not received by the response message of client return within the predetermined time, then corresponding from client Groups of clients in delete client.
Step 407, the heartbeat message that destination client is sent is received;Target is not present in groups of clients in response to determining Client adds destination client in groups of clients.
In the present embodiment, above-mentioned executing subject can also receive the heartbeat message of destination client transmission.Then it determines Whether destination client is in groups of clients, if not, can so add destination client in groups of clients.Target visitor Family end can refer to any client with the communication connection of above-mentioned executing subject.In practice, above-mentioned executing subject can also be traversed The client table illustrated in above-mentioned steps 406, if not finding the link address of destination client, then can be in above-mentioned client Hold the link address that destination client is added in table.It later, can also be by the data exchange process with destination client Related data analysis, by destination client carry out classification determine, so as to which destination client is divided into corresponding visitor In the group of family end.
It should be appreciated that right with it if being also stored with client in other data structures in above-mentioned executing subject The corresponding relationship for the link address answered, then when adding the link address of destination client in client table, it can also be simultaneously The corresponding relationship of the link address of destination client and destination client is added in other data structures.
Figure 4, it is seen that compared with the corresponding embodiment of Fig. 2, the process of the information-pushing method in the present embodiment 400 while targetedly pushing broadcast message to part client.It can also be by sending reversed heartbeat to client Information, to delete, there may be the clients of connecting fault, and receive the heartbeat message that destination client is sent, to add Add the destination client good, not stored in the presence of connection, so that the update of the information to the groups of clients of storage is realized, into And flexibility when selection pushes object is helped to improve, and help to promote pushing efficiency.
With further reference to Fig. 5, it illustrates the timing diagrams 500 of another embodiment of the method for pushed information.It should Method for pushed information is executed by two nodes of block catenary system as shown in Figure 1.Two nodes are respectively to endorse Node and ordering joint.Specifically includes the following steps:
Step 501, endorsement node can in advance be grouped the client that it is communicated to connect, and be divided into multiple client Group, and can establish identifier-link address and correspond to table.Wherein, identifier-link address, which corresponds to, can store visitor in table The corresponding relationship of the link address for the client that the identifier and groups of clients of family end group include.
Step 502, every group of groups of clients can correspond to a block chain, and therefore, ordering joint can pre-establish mark Symbol-block chain corresponds to table.Wherein, identifier-block chain corresponds to the identifier and block chain that can store groups of clients in table The corresponding relationship of information.In practice, block chain corresponding for every group of groups of clients, ordering joint can also be using the number such as queue Carry out the block information of the block in memory block chain according to structure.
Step 503, endorsement node periodically can send reversed heartbeat message to the client of connection, if in preset time The response message of some client return is not received by range, then the client can be deleted in above-mentioned identifier-company Ground connection location corresponds to corresponding link address in table.
Step 504, client can also send heartbeat message to endorsement node.Endorsement node receive heartbeat message it It afterwards, can if corresponding to the link address for not finding the client for sending heartbeat message in table in identifier-link address It is corresponded in table so that the link address is added to identifier-link address.
Step 505, endorsement node through the above steps 503 and 504, can continuous more new identifier-link address pair Answer table.It should be appreciated that the specific execution sequence of above-mentioned steps 503 and 504 in practice is arbitrary, in no particular order.
Step 506, if producing transaction in client, client can be mentioned for one transaction of the transaction creation Case mainly includes the following steps:
Step 5061, client can firstly generate a transaction number.
Step 5602, client can be by transaction number, chain code information, identifier, motion signing messages and motion public key Information etc. is packaged, and obtains transaction motion.Wherein, motion signing messages by client using motion private key to transaction number, Content in the transaction motion such as chain code information, identifier carries out Hash operation, and using operation result as motion signing messages.
Step 507, endorsement node receives the transaction motion that client is sent.
Step 508, after endorsement node receives transaction motion, following steps can be executed:
Step 5081, whether endorsement node can first verify the identifier in transaction motion in identifier-link address table Middle presence, it is then whether correct using motion public key information therein verifying motion signing messages, it can also further verify it In transaction number whether have existed.It should be appreciated that the specific execution sequence of above-mentioned each verifying in practice may be used To be arbitrary.For example, it is also possible to first verifying transaction number whether there is, then verifying transaction motion in identifier whether Exist in identifier-link address table, it is finally whether correct using motion public key information therein verifying motion signing messages.
Step 5082, if verification result is that identifier exists, motion signing messages is correct and transaction number is not present, that Node of endorsing can be executed chain code part, be obtained chain code operating result based on the chain code information in transaction motion.
Step 509, endorsement node sends motion result to client.Wherein, motion result include motion signing messages and Motion public key information.It can obtain new transaction by the chain code information partial replacement in motion of trading at chain code operating result and mention Case.Then, endorsement node carries out Hash operation to new transaction motion content using endorsement private key, and using operation result as back Bookmark name information.It is then possible to which new transaction motion, endorsement signing messages and endorsement public key information are packaged, mentioned Case result.
Step 510, after client receives motion result, it can use the transaction private key of client to motion result Content carries out Hash operation, and using operation result as trading signature information.Then by motion result, trading signature information and friendship Easy public key information is packaged, and obtains Transaction Information.
Step 511, the Transaction Information that client is sent can be received by ordering joint.Wherein, it can wrap in Transaction Information Containing identifier.
Step 512, ordering joint can verify received Transaction Information, if verifying is correct, then can be based on Transaction Information generates block.It may include steps of:
Step 5121, ordering joint can verify transaction therein first with the transaction public key information in Transaction Information and sign Whether name information is correct, and whether then verify endorsement signing messages therein using endorsement public key information therein correct.It should It is appreciated that the specific execution sequence of above-mentioned each verifying can be arbitrary in practice.
Step 5122, it if the verification result in above-mentioned steps 5121 is correct, can be advised based on certain agglomeration Then generate block.It may include each transaction information received in certain period of time in block, can also include block height, Block generates time, block cryptographic Hash, the preposition cryptographic Hash of block.
Step 5123, ordering joint can also be by information relevant to the block of generation (such as in above-mentioned steps 5122 Each transaction information, block height, block generate time, block cryptographic Hash, preposition cryptographic Hash of block etc.) it is added to above-mentioned mark Symbol-block chain corresponds in table, can also be by above-mentioned relevant information storage into the corresponding queue of corresponding block chain.It needs Bright, according to specific agglomeration rule, the block of generation may be not multiple, then can be based on agglomeration rule to the area of generation Block is ranked up, and is then consecutively connected in corresponding block chain.
Step 513, endorsement node can receive the block information of ordering joint transmission.Wherein, block information may include Block signing messages and block public key information.Ordering joint can be to each transaction information for including in block, block height, area Block generates time, block cryptographic Hash, and the contents such as preposition cryptographic Hash of block carry out Hash operation, and using operation result as block label Name information.
Step 514, after endorsement node receives block information, block information can be verified and is stored.Specifically It may include steps of:
Step 5141, ordering joint can verify block first with the block public key information in the block information received Whether signing messages is correct, and whether verify block cryptographic Hash therein correct, whether just to verify the preposition cryptographic Hash of block therein Really.
Step 5142, ordering joint can also verify the Transaction Information for each transaction for including in block information. For example, can use whether the motion public key information for including in the Transaction Information of each transaction verifies motion signing messages therein Correctly.
It should be appreciated that each verifying for including in above-mentioned steps 5141 and step 5142 and step 5141 and step 5142 specific execution sequences itself can be arbitrary.
Step 5143, if the verification result of above-mentioned steps 5141 and 5142 is correct, then endorsement node can will receive The block information arrived is stored to local account book.
Step 515, endorsement node can be based on the block information received, by content some or all of in block information It is packaged, obtains broadcast message.It for example, can be by the block height for including in block information, the transaction of each transaction Transaction number and exchange hour, the block for including in information generate the time and identifier is packaged, and obtains broadcast message.
Step 516, endorsement node can be based on identifier, and identifier pair is obtained from above-mentioned identifier-link address table The link address answered.
Step 517, endorsement node can be sent raw in above-mentioned steps 515 to link address obtained in above-mentioned steps 516 At broadcast message.
Step 518, after the corresponding client of above-mentioned link address receives broadcast message, following steps can also be performed Shown in operate:
Step 5181, verify broadcast message in include transaction number whether include client generate transaction transaction compile Number.
Step 5182, if above-mentioned steps 5181 determine that the transaction of the transaction generated in broadcast message comprising client is compiled Number, then broadcast message can be shown on the client, carry out the operation such as storing locally by client.
From figure 5 it can be seen that compared with the corresponding embodiment of Fig. 2, the process of the information-pushing method in the present embodiment 500 executing subject includes two nodes: endorsement node and ordering joint.And two nodes can safeguard it is some about difference The corresponding table of groups of clients or the data structures such as queue so that the processing of all information can be just for corresponding client Group improves information processing efficiency and safety.Each groups of clients can also correspond to a block chain simultaneously, to facilitate The network storm that avoids due to Transaction Information is too many storage organization single and may cause, improves agglomeration efficiency.In addition, each Message transmitting procedure in, all signed by sending node, signature verified by receiving node later, to improve Transmit information accuracy and safety.Further, since client only receives information relevant to its same groups of clients, to subtract The light information processing load of client after receiving the information.
With further reference to Fig. 6, as the realization to method shown in above-mentioned each figure, this application provides for pushed information One embodiment of device, the Installation practice is corresponding with embodiment of the method shown in Fig. 2, which specifically can be applied to In various electronic equipments.
As shown in fig. 6, the device 600 provided in this embodiment for pushed information includes receiving unit 601, block generation Unit 602, broadcast message generation unit 603, link address acquiring unit 604 and push unit 605.Wherein, receiving unit 601 It is configured to receive the Transaction Information of client transmission, wherein Transaction Information includes for identifying client belonging to client The identifier of group;Block generation unit 602 is configured to generate block based on Transaction Information;603 quilt of broadcast message generation unit It is configured to the block information based on block, generates broadcast message, wherein broadcast message includes identifier;Link address obtains single Member 604 is configured to obtain the link address for the client that groups of clients includes;Push unit 605 is configured to link address Push broadcast message.
In the present embodiment, in the device of pushed information 600: receiving unit 601, block generation unit 602, broadcast Information generating unit 603, the specific processing of link address acquiring unit 604 and push unit 605 and its brought technology effect Fruit can mutually speak on somebody's behalf with reference to step 201, step 202, step 203, the step 204 in Fig. 2 corresponding embodiment with step 205 respectively Bright, details are not described herein.
In some optional implementations of the present embodiment, the above-mentioned device 600 for pushed information further include: reversed Heartbeat message transmission unit (not shown) is configured to for the client in groups of clients, is periodically sent out to the client Send reversed heartbeat message;Unit (not shown) is deleted, is configured in response to be not received by within the predetermined time The response message corresponding to reversed heartbeat message that the client returns, deletes the client from groups of clients.
In some optional implementations of the present embodiment, the above-mentioned device 600 for pushed information further include: heartbeat Information receiving unit (not shown) is configured to receive the heartbeat message of destination client transmission;Adding unit is (in figure not Show), it is configured in response to determine that in groups of clients, there is no destination clients, add target customer in groups of clients End.
In some optional implementations of the present embodiment, the above-mentioned device 600 for pushed information further include: transaction Motion receiving unit (not shown) is configured to receive the transaction motion of client transmission, wherein transaction motion includes mark Know symbol, transaction number, chain code information, motion signing messages and motion public key information;Authentication unit (not shown), is configured Exist in response to verifying identifier, and verify transaction number and be not present, be based on motion public key information, verifies motion A.L.S. It whether correct ceases;Motion result return unit (not shown) is configured in response to verifying correctly, is based on chain code information, Generate chain code operating result;Based on transaction motion and chain code operating result, motion result is generated, wherein motion result includes mentioning Case result signing messages and motion result public key information;Motion result is returned to client.
In some optional implementations of the present embodiment, Transaction Information further includes trading signature information and transaction public key Information;And block generation unit 602 is further configured to: based on transaction public key information, whether verifying trading signature information Correctly;It is correct in response to verifying, based on preset agglomeration rule, generate block.
In some optional implementations of the present embodiment, block information includes the block height of Transaction Information, block With the preposition cryptographic Hash of block;And the device 600 for pushed information further include: cryptographic Hash acquiring unit (is not shown in figure Out), it is configured to obtain the cryptographic Hash of the last block of block based on identifier and block height;Storage unit (is not shown in figure Out), it is configured in response to determine that preposition cryptographic Hash is identical with the cryptographic Hash of last block, memory block is believed in local account book Breath.
In some optional implementations of the present embodiment, block information further include: the block of block generates time, area The cryptographic Hash of block.
The device provided by the above embodiment of the application receives having for client transmission by receiving unit 601 and identifies The Transaction Information of the identifier of groups of clients belonging to the client, and the Transaction Information is based on by block generation unit 602, it is raw At block.Then, block information of the broadcast message generation unit 603 based on the block generates the broadcast for having above-mentioned identifier Information.Later, the company for the client that push unit 605 includes to the above-mentioned groups of clients that link address acquiring unit 604 obtains Be grounded location and push above-mentioned broadcast message, thus realize targetedly, the only visitor into groups of clients belonging to the client Family end pushes broadcast message.Since the business that client may relate in same groups of clients is same or like, this side Formula additionally aids promotion pushing efficiency.
Below with reference to Fig. 7, it illustrates the computer systems 700 for the server for being suitable for being used to realize the embodiment of the present application Structural schematic diagram.Server shown in Fig. 7 is only an example, should not function and use scope band to the embodiment of the present application Carry out any restrictions.
As shown in fig. 7, computer system 700 includes central processing unit (CPU) 701, it can be read-only according to being stored in Program in memory (ROM) 702 or be loaded into the program in random access storage device (RAM) 703 from storage section 708 and Execute various movements appropriate and processing.In RAM 703, also it is stored with system 700 and operates required various programs and data. CPU 701, ROM 702 and RAM 703 are connected with each other by bus 704.Input/output (I/O) interface 705 is also connected to always Line 704.
I/O interface 705 is connected to lower component: the importation 706 including keyboard, mouse etc.;It is penetrated including such as cathode The output par, c 707 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 708 including hard disk etc.; And the communications portion 709 of the network interface card including LAN card, modem etc..Communications portion 709 via such as because The network of spy's net executes communication process.Driver 710 is also connected to I/O interface 705 as needed.Detachable media 711, such as Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 710, in order to read from thereon Computer program be mounted into storage section 708 as needed.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium On computer program, which includes the program code for method shown in execution flow chart.In such reality It applies in example, which can be downloaded and installed from network by communications portion 709, and/or from detachable media 711 are mounted.When the computer program is executed by central processing unit (CPU) 701, limited in execution the present processes Above-mentioned function.
It should be noted that the computer-readable medium of the application can be computer-readable signal media or computer Readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but it is unlimited In system, device or the device of --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, or any above combination.It calculates The more specific example of machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, portable of one or more conducting wires Formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device or The above-mentioned any appropriate combination of person.In this application, computer readable storage medium can be it is any include or storage program Tangible medium, which can be commanded execution system, device or device use or in connection.And in this Shen Please in, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, In carry computer-readable program code.The data-signal of this propagation can take various forms, including but not limited to Electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer-readable Any computer-readable medium other than storage medium, the computer-readable medium can send, propagate or transmit for by Instruction execution system, device or device use or program in connection.The journey for including on computer-readable medium Sequence code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc. are above-mentioned Any appropriate combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the application, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction Combination realize.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard The mode of part is realized.Described unit also can be set in the processor, for example, can be described as: a kind of processor, packet Include receiving unit, block generation unit, broadcast message generation unit, link address acquiring unit and push unit.Wherein, these The title of unit does not constitute the restriction to the unit itself under certain conditions, for example, receiving unit is also described as " receive the unit for the Transaction Information that client is sent, wherein Transaction Information includes for identifying groups of clients belonging to client Identifier ".
As on the other hand, present invention also provides a kind of computer-readable medium, which be can be Included in device described in above-described embodiment;It is also possible to individualism, and without in the supplying device.Above-mentioned calculating Machine readable medium carries one or more program, when said one or multiple programs are executed by the device, so that should Device: the Transaction Information that client is sent is received, wherein Transaction Information includes for identifying groups of clients belonging to client Identifier;Based on Transaction Information, block is generated;Block information based on block generates broadcast message, wherein broadcast message packet Include identifier;Obtain the link address for the client that groups of clients includes;Broadcast message is pushed to link address.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.Those skilled in the art Member is it should be appreciated that invention scope involved in the application, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic Scheme, while should also cover in the case where not departing from foregoing invention design, it is carried out by above-mentioned technical characteristic or its equivalent feature Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed herein Can technical characteristic replaced mutually and the technical solution that is formed.

Claims (16)

1. a kind of method for pushed information, comprising:
Receive the Transaction Information that client is sent, wherein the Transaction Information includes for identifying visitor belonging to the client The identifier of family end group;
Based on the Transaction Information, block is generated;
Based on the block information of the block, broadcast message is generated, wherein the broadcast message includes the identifier;
Obtain the link address for the client that the groups of clients includes;
The broadcast message is pushed to the link address.
2. according to the method described in claim 1, wherein, the method also includes:
For the client in the groups of clients, reversed heartbeat message periodically is sent to the client;
In response to being not received by the sound corresponding to the reversed heartbeat message of client return within the predetermined time Information is answered, the client is deleted from the groups of clients.
3. according to the method described in claim 1, wherein, the method also includes:
Receive the heartbeat message that destination client is sent;
The destination client is not present in the groups of clients in response to determining, the mesh is added in the groups of clients Mark client.
4. according to the method described in claim 1, wherein, before the Transaction Information that the reception client is sent, further includes:
Receive the transaction motion that the client is sent, wherein the transaction motion includes the identifier, transaction number, chain Code information, motion signing messages and motion public key information;
Exist in response to verifying the identifier, and verify the transaction number and be not present, is based on the motion public key information, Whether correct verify the motion signing messages;
It is correct in response to verifying, it is based on the chain code information, generates chain code operating result;Based on the transaction motion and the chain Code operating result, generates motion result, wherein the motion result includes motion result signing messages and motion result public key letter Breath;The motion result is returned to the client.
5. according to the method described in claim 1, wherein, the Transaction Information further includes trading signature information and transaction public key letter Breath;And
It is described to be based on the Transaction Information, generate block, comprising:
Based on the transaction public key information, whether correct the trading signature information is verified;
It is correct in response to verifying, based on preset agglomeration rule, generate the block.
6. according to the method described in claim 1, wherein, the block information includes the area of the Transaction Information, the block The preposition cryptographic Hash of block height and the block;And
It is described be based on the Transaction Information, generate block after, further includes:
Based on the identifier and the block height, the cryptographic Hash of the last block of the block is obtained;
It is identical with the cryptographic Hash of the last block in response to the determination preposition cryptographic Hash, the area is stored in local account book Block message.
7. method described in one of -6 according to claim 1, wherein the block information further include: the block of the block is raw At the time, the cryptographic Hash of the block.
8. a kind of device for pushed information, wherein described device includes:
Receiving unit is configured to receive the Transaction Information of client transmission, wherein the Transaction Information includes for identifying State the identifier of groups of clients belonging to client;
Block generation unit is configured to generate block based on the Transaction Information;
Broadcast message generation unit is configured to the block information based on the block, generates broadcast message, wherein described wide Broadcasting information includes the identifier;
Link address acquiring unit is configured to obtain the link address for the client that the groups of clients includes;
Push unit is configured to push the broadcast message to the link address.
9. device according to claim 8, wherein described device further include:
Reversed heartbeat message transmission unit, is configured to for the client in the groups of clients, periodically sends out to the client Send reversed heartbeat message;
Unit is deleted, it is described to be configured in response to be not received by corresponding to for client return within the predetermined time The response message of reversed heartbeat message, deletes the client from the groups of clients.
10. device according to claim 8, wherein described device further include:
Heartbeat message receiving unit is configured to receive the heartbeat message of destination client transmission;
Adding unit is configured in response to determine that in the groups of clients, there is no the destination clients, in the visitor The destination client is added in the group of family end.
11. device according to claim 8, wherein described device further include:
Transaction motion receiving unit is configured to receive the transaction motion that the client is sent, wherein the transaction motion packet Include the identifier, transaction number, chain code information, motion signing messages and motion public key information;
Authentication unit is configured in response to verify the identifier presence, and verifies the transaction number and be not present, and is based on Whether correct the motion public key information verifies the motion signing messages;
Motion result return unit is configured in response to verifying correctly, is based on the chain code information, generates chain code operation knot Fruit;Based on the transaction motion and the chain code operating result, motion result is generated, wherein the motion result includes motion As a result signing messages and motion result public key information;The motion result is returned to the client.
12. device according to claim 8, wherein the Transaction Information further includes trading signature information and transaction public key Information;And
The block generation unit is further configured to:
Based on the transaction public key information, whether correct the trading signature information is verified;
It is correct in response to verifying, based on preset agglomeration rule, generate the block.
13. device according to claim 8, wherein the block information includes the area of the Transaction Information, the block The preposition cryptographic Hash of block height and the block;And
Described device further include:
Cryptographic Hash acquiring unit is configured to obtain the last area of the block based on the identifier and the block height The cryptographic Hash of block;
Storage unit is configured in response to determine that the preposition cryptographic Hash is identical with the cryptographic Hash of the last block, at this The block information is stored in ground account book.
14. the device according to one of claim 8-13, wherein the block information further include: the block of the block Generate time, the cryptographic Hash of the block.
15. a kind of electronic equipment, comprising:
One or more processors;
Storage device is stored thereon with one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processors are real The now method as described in any in claim 1-7.
16. a kind of computer-readable medium, is stored thereon with computer program, wherein the realization when program is executed by processor Method as described in any in claim 1-7.
CN201810593529.7A 2018-06-11 2018-06-11 Method and device for pushing information Active CN109005208B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810593529.7A CN109005208B (en) 2018-06-11 2018-06-11 Method and device for pushing information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810593529.7A CN109005208B (en) 2018-06-11 2018-06-11 Method and device for pushing information

Publications (2)

Publication Number Publication Date
CN109005208A true CN109005208A (en) 2018-12-14
CN109005208B CN109005208B (en) 2021-03-30

Family

ID=64600602

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810593529.7A Active CN109005208B (en) 2018-06-11 2018-06-11 Method and device for pushing information

Country Status (1)

Country Link
CN (1) CN109005208B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109741800A (en) * 2018-12-20 2019-05-10 李秦豫 The method for security protection of medical data intranet and extranet interaction based on block chain technology
CN111600790A (en) * 2020-07-20 2020-08-28 百度在线网络技术(北京)有限公司 Block chain based message processing method, device, equipment and storage medium
CN112448817A (en) * 2019-09-05 2021-03-05 陈小虎 Decentralization consensus scheme
CN115022110A (en) * 2022-08-08 2022-09-06 广州市千钧网络科技有限公司 Message distribution method, readable medium and electronic device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170155515A1 (en) * 2015-11-26 2017-06-01 International Business Machines Corporation System, method, and computer program product for privacy-preserving transaction validation mechanisms for smart contracts that are included in a ledger
CN107079059A (en) * 2016-12-21 2017-08-18 深圳前海达闼云端智能科技有限公司 Block chain storage method and device and node equipment
CN107273455A (en) * 2017-05-31 2017-10-20 深圳前海微众银行股份有限公司 Block chain data access method and device
CN107833139A (en) * 2017-11-23 2018-03-23 上海壹账通金融科技有限公司 Transaction data processing method, device, computer equipment and storage medium
CN108134706A (en) * 2018-01-02 2018-06-08 中国工商银行股份有限公司 Block chain high-availability system mostly living, computer equipment and method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170155515A1 (en) * 2015-11-26 2017-06-01 International Business Machines Corporation System, method, and computer program product for privacy-preserving transaction validation mechanisms for smart contracts that are included in a ledger
CN107079059A (en) * 2016-12-21 2017-08-18 深圳前海达闼云端智能科技有限公司 Block chain storage method and device and node equipment
CN107273455A (en) * 2017-05-31 2017-10-20 深圳前海微众银行股份有限公司 Block chain data access method and device
CN107833139A (en) * 2017-11-23 2018-03-23 上海壹账通金融科技有限公司 Transaction data processing method, device, computer equipment and storage medium
CN108134706A (en) * 2018-01-02 2018-06-08 中国工商银行股份有限公司 Block chain high-availability system mostly living, computer equipment and method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
闵新平等: ""许可链多中心动态共识机制"", 《计算机学报》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109741800A (en) * 2018-12-20 2019-05-10 李秦豫 The method for security protection of medical data intranet and extranet interaction based on block chain technology
CN112448817A (en) * 2019-09-05 2021-03-05 陈小虎 Decentralization consensus scheme
CN111600790A (en) * 2020-07-20 2020-08-28 百度在线网络技术(北京)有限公司 Block chain based message processing method, device, equipment and storage medium
CN111600790B (en) * 2020-07-20 2021-08-17 百度在线网络技术(北京)有限公司 Block chain based message processing method, device, equipment and storage medium
CN115022110A (en) * 2022-08-08 2022-09-06 广州市千钧网络科技有限公司 Message distribution method, readable medium and electronic device

Also Published As

Publication number Publication date
CN109005208B (en) 2021-03-30

Similar Documents

Publication Publication Date Title
CN109981750A (en) Business process system, business data processing method and device
CN109005208A (en) Method and apparatus for pushed information
CN109146490A (en) block generation method, device and system
CN109995877A (en) Information-pushing method and device
CN109992732A (en) Information sharing method, device, electronic equipment and storage medium
CN106874471A (en) Information-pushing method and device
CN110427304A (en) O&M method, apparatus, electronic equipment and medium for banking system
CN110516984B (en) Method and apparatus for generating delivery path information
CN108897854A (en) A kind of monitoring method and device of overtime task
CN110263581A (en) Contract signs method, system, terminal device and storage medium
CN109582873A (en) Method and apparatus for pushed information
CN110377440A (en) Information processing method and device
CN108805476A (en) Electronics signs for method and apparatus
CN109905351A (en) Method and apparatus for storing data
CN112561510A (en) Payment system, method, device, equipment and storage medium
CN110365745A (en) Data processing system, method, apparatus, server and computer-readable medium
CN108984197A (en) A kind of code update method and device
CN110046000A (en) Small routine operation method and device
CN108880923A (en) The method and apparatus that policer operation applied to application server is requested
CN108920309B (en) Method and apparatus for handling information
CN111709857A (en) House resource sharing method and device and electronic equipment
CN109614603A (en) Method and apparatus for generating information
CN111626802A (en) Method and apparatus for processing information
CN110381471A (en) The method and apparatus for determining optimum base station for unmanned vehicle
CN110098921A (en) Verification code generation method, device, application service end and system

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