WO2018171543A1 - 一种广播消息的方法及装置 - Google Patents

一种广播消息的方法及装置 Download PDF

Info

Publication number
WO2018171543A1
WO2018171543A1 PCT/CN2018/079435 CN2018079435W WO2018171543A1 WO 2018171543 A1 WO2018171543 A1 WO 2018171543A1 CN 2018079435 W CN2018079435 W CN 2018079435W WO 2018171543 A1 WO2018171543 A1 WO 2018171543A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
processing device
consensus node
message processing
thread
Prior art date
Application number
PCT/CN2018/079435
Other languages
English (en)
French (fr)
Inventor
李宁
Original Assignee
阿里巴巴集团控股有限公司
李宁
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
Priority to AU2018240583A priority Critical patent/AU2018240583B2/en
Priority to EP18772238.4A priority patent/EP3531618B1/en
Priority to MX2019005982A priority patent/MX2019005982A/es
Priority to MYPI2019002875A priority patent/MY192565A/en
Priority to CA3044603A priority patent/CA3044603C/en
Priority to RU2019115869A priority patent/RU2730039C1/ru
Priority to JP2019528064A priority patent/JP6859510B2/ja
Priority to BR112019010520-4A priority patent/BR112019010520B1/pt
Application filed by 阿里巴巴集团控股有限公司, 李宁 filed Critical 阿里巴巴集团控股有限公司
Priority to KR1020197014976A priority patent/KR102205750B1/ko
Publication of WO2018171543A1 publication Critical patent/WO2018171543A1/zh
Priority to PH12019501151A priority patent/PH12019501151A1/en
Priority to ZA2019/03267A priority patent/ZA201903267B/en
Priority to US16/516,841 priority patent/US10824485B2/en
Priority to US16/917,393 priority patent/US11003514B2/en

Links

Images

Classifications

    • 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/1854Arrangements for providing special services to substations for broadcast or conference, e.g. multicast with non-centralised forwarding system, e.g. chaincast
    • 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/1863Arrangements for providing special services to substations for broadcast or conference, e.g. multicast comprising mechanisms for improved reliability, e.g. status reports
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • G06F16/1834Distributed file systems implemented based on peer-to-peer networks, e.g. gnutella
    • G06F16/1837Management specially adapted to peer-to-peer storage networks
    • 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
    • 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/1863Arrangements for providing special services to substations for broadcast or conference, e.g. multicast comprising mechanisms for improved reliability, e.g. status reports
    • H04L12/1868Measures taken after transmission, e.g. acknowledgments
    • 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/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • H04L9/0637Modes of operation, e.g. cipher block chaining [CBC], electronic codebook [ECB] or Galois/counter mode [GCM]
    • 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
    • H04L9/3239Cryptographic 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 involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • 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/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Definitions

  • the present application relates to the field of blockchain technology, and in particular, to a method and an apparatus for broadcasting a message.
  • consensus node In the field of blockchain technology, the blockchain node responsible for consensus verification of the service is called a consensus node. Under the trend of blockchain globalization, consensus nodes are often distributed around the world.
  • Each consensus node often needs to broadcast messages (such as service messages, consensus messages, etc.) to other consensus nodes during the acceptance of services and consensus verification. Due to the globalization of heterogeneous networks, the message transmission process is unstable. For example, the Chinese network and the US network are heterogeneous networks. The consensus nodes located in the US network may not receive messages from the consensus nodes in the Chinese network. Therefore, It is guaranteed that the success rate of each other consensus node receiving the message is high, and the consensus node of the broadcast message usually creates a thread for each other consensus node, and performs a task of sending a message to the other consensus node through the thread.
  • the consensus node of the broadcast message sends a message to the other consensus node by the thread, it waits to receive the notification returned by the other consensus node (declaring that the message has been received), and if it is not received through the thread within the specified time, The notification will send a message to the consensus node again through the thread until the notification is received, or if the notification has not been received by the thread, the thread will be revoked. In this case, the success rate of receiving the message by the other consensus nodes can be ensured to be high.
  • a consensus node of a broadcast message performs a task of sending a message to other consensus nodes through a thread created by it, it is often necessary to repeatedly send a message, and a consensus node of the broadcast message consumes a large amount of computing resources, which will give a broadcast message.
  • the consensus node creates an excessive burden.
  • the embodiment of the present invention provides a method and an apparatus for broadcasting a message, so as to solve the problem that an existing method for broadcasting a message causes an excessive burden on a consensus node of a broadcast message.
  • the consensus node obtains the first broadcast message
  • the second thread is revoked.
  • a sending module configured to create a first thread for the message processing device corresponding to the device, and send the first broadcast message to the message processing device by using the first thread, so that the message processing device corresponds to another consensus node Transmitting, by the message processing device, the first broadcast message;
  • the first receiving module receives a first broadcast message sent by the consensus node corresponding to the device
  • a sending module configured to create a second thread for the message processing device corresponding to each other consensus node, and send the first broadcast message to the message processing device corresponding to the other consensus node by using the second thread;
  • the revocation module cancels the second thread when it is determined that the message processing device corresponding to the other consensus node receives the first broadcast message.
  • a message processing device is allocated for each consensus node, and the work of broadcasting messages between the consensus nodes is performed by each message processing device.
  • the corresponding message processing device may create a thread for the message processing device corresponding to the other consensus nodes to perform the task of broadcasting the message until the message processing device corresponding to the other consensus node receives the broadcast message.
  • the thread executing the broadcast message task only consumes the computing resources of the message processing device, but does not consume the resources of the consensus node, thereby not burdening the consensus node, and enabling the consensus node to more effectively verify the service.
  • FIG. 1 is a flowchart of a method for broadcasting a message according to an embodiment of the present application
  • FIG. 2 is a schematic diagram of comparison between a conventional broadcast message method and a broadcast message method provided by the present application;
  • FIG. 3 is a schematic diagram of an apparatus for broadcasting a message according to an embodiment of the present application.
  • FIG. 4 is a schematic diagram of another apparatus for broadcasting a message according to an embodiment of the present application.
  • the embodiment of the present application provides a method and an apparatus for broadcasting a message.
  • FIG. 1 is a flowchart of a method for broadcasting a message according to an embodiment of the present application, including the following steps:
  • S101 The consensus node acquires the first broadcast message.
  • the consensus node is a blockchain node participating in the consensus verification of the service in the blockchain network.
  • each blockchain node can participate in consensus verification as a consensus node.
  • a special blockchain network such as a blockchain network consisting of a coalition chain subnet and a public chain subnetwork
  • not all blockchain nodes can participate in consensus verification as a consensus node.
  • the consensus nodes need to broadcast or send messages to each other. This is the application scenario of the embodiment of the present application.
  • the acceptance service phase means that a certain consensus node receives the service message and broadcasts the service message to other consensus nodes, so that each consensus node receives the service message, so as to facilitate subsequent consensus verification on the service message.
  • the consensus verification phase refers to the stage in which the consensus nodes follow a consensus algorithm and reach a consensus on the verification results. In the consensus verification phase, the consensus nodes need to send verification messages to each other to reach a consensus.
  • the first broadcast message may be the foregoing service message, or may be the foregoing verification message, or may be a message that a consensus node broadcasts or sends to other consensus nodes.
  • the executor of the method may be any one of the consensus nodes.
  • the consensus node may receive the service message sent by the client or the non-consensus node as the obtained first broadcast message.
  • the consensus node may generate a verification message as the obtained first broadcast message after verifying the service message.
  • the consensus node creates a first thread for the message processing device corresponding to the consensus node, and sends the first broadcast message to the message processing device by using the first thread.
  • the consensus node may send the first broadcast message to its corresponding message processing device, and completely process the task of broadcasting or sending the first broadcast message to its corresponding message processing device. And the message processing device ensures that the message processing device of the other consensus node successfully receives the first broadcast message. In this way, the consensus node does not need to consume computing resources to ensure that each other consensus node receives the first broadcast message as much as possible.
  • the message processing device corresponding to the consensus node is a computing device independent of the consensus node.
  • the message interaction between the consensus nodes is performed by the message processing devices corresponding to the respective consensus nodes.
  • the consensus node only needs to create a first thread for its corresponding message processing device, and after the first broadcast message is sent to the corresponding message processing device by the first thread, the first The thread continues to maintain the first thread without consuming computing resources.
  • the first thread is a thread created by the consensus node for its corresponding message processing device
  • the second thread described below is a thread created by the message processing device for the message processing device corresponding to the other consensus node.
  • the consensus node uses an asynchronous calling technology to create a first thread for sending the first broadcast message to its corresponding message processing device, and the first broadcast message is to be sent by the first thread. After the consensus node does not care whether the message processing device receives the first broadcast message, the first thread may be directly revoked.
  • the consensus node and its corresponding message processing device are generally not distributed in a heterogeneous network, that is, the information interaction between the consensus node and its corresponding message processing device is stable, and message processing is performed.
  • a device is generally capable of successfully receiving a message sent by its corresponding consensus node at a time.
  • the regional dedicated line may be used to connect the consensus node and the message processing device corresponding to the consensus node.
  • the consensus node may, in addition to instructing its corresponding message processing device to broadcast a message to the outside, may also use its corresponding message processing device to receive messages broadcast by other consensus nodes.
  • the consensus node may receive the second broadcast message sent by the message processing device corresponding to the consensus node, where the second broadcast message is broadcast by the message processing device corresponding to the other consensus node.
  • the message processing device may receive the second broadcast message broadcast by the message processing device corresponding to the other consensus node, and then send the second broadcast message to the consensus node.
  • first broadcast message and the second broadcast message are broadcast messages broadcast by the consensus node, and the first broadcast message and the second broadcast message may both be the foregoing service message and the verification message. Wait.
  • the message processing device creates a second thread for the message processing device corresponding to each other consensus node, and sends the first broadcast message to the message processing device corresponding to the other consensus node by the second thread.
  • S105 The message processing device cancels the second thread when it is determined that the message processing device corresponding to the other consensus node receives the first broadcast message.
  • the work of the external broadcast message is that the consensus node is responsible for itself, and the consensus node creates a thread that occupies its own computing resources, and through the thread to ensure that each other consensus node receives its broadcasted message as much as possible.
  • the consensus node only needs to send the first broadcast message to its corresponding message processing device.
  • the message processing device as a computing device independent of the consensus node, can independently be responsible for externally broadcasting messages. This frees the consensus node so that the consensus node can focus on limited computing resources to perform consensus verification work more efficiently.
  • the message processing device creates a second thread for the message processing device corresponding to each other consensus node, and consumes the computing resources of the message processing device by the second thread to wait for confirmation of the consensus.
  • the node successfully receives the first broadcast message.
  • the message processing device may send the first broadcast message to a message processing device corresponding to each other consensus node by using a second thread created for each other consensus node; and counting the number of received response signals
  • the response signal is returned by the message processing device corresponding to the other consensus node after receiving the first broadcast message; if the number of statistics is less than the specific value, the first broadcast message is resent by each second thread, Until the counted number of received response signals is not less than the specific value, the specific value is an integer greater than zero.
  • the specific value is configurable. The higher the specific value, the more the number of consensus nodes that can receive the first broadcast message can be ensured, and the success rate of the consensus node broadcast message is higher. This application does not limit the specific value to a specific value.
  • the message processing device may continue to send the first broadcast message to the message processing device that does not return the response signal by using the second thread corresponding to the message processing device that does not return the response signal. Until the total number of received response signals of the previous statistics is not less than the specific value; the first broadcast message may be sent to all other message processing devices again by each second thread until the next time the statistics are received. The number of response signals is not less than the specific value.
  • the message processing device sends the first broadcast message to a certain other message processing device by the second thread for a specified number of times, if the second thread still does not receive the other message processing device returns In response to the signal, the first broadcast message may be suspended from being sent to the message processing device; after the specified time limit, the first broadcast message is continued to be sent to the message processing device.
  • the message processing device may first broadcast the first broadcast message to other message processing devices, and then determine other message processing devices that do not return a response signal (ie, the message that the first broadcast message is not received). Processing the device), and sending the first broadcast message to the message processing device that does not receive the first broadcast message, if it is repeated. After repeatedly transmitting the first broadcast message to the same other message processing device for three times, it indicates that there is a transmission problem that cannot be solved temporarily (may be a failure of the message processing device that failed to receive success or a large failure of the network), so The first broadcast message is first suspended to be sent to the other message processing device, and after waiting for a long time (the transmission problem may have been resolved), the first broadcast message is sent to the other message processing device.
  • the message processing device may cancel the second thread after ensuring that the first broadcast message is received by the message processing device corresponding to each other consensus node. It is worth emphasizing that the message processing device can adopt various message delivery strategies, such as delayed delivery, compensation delivery (by the entity that has not received the message, actively requesting compensation for the message), etc., to ensure that the first broadcast message is The message processing device corresponding to the consensus node is received.
  • the message delivery policy adopted by the message processing device is not specifically limited.
  • the message processing device actually uses a synchronous calling technology to create a second thread for sending the first broadcast message to the message processing device for the message processing device corresponding to each other consensus node.
  • the second thread continues to wait for confirmation that the message processing device receives the first broadcast message, and if the message processing device does not receive, re-passes the second thread.
  • the first broadcast message is sent to the message processing device until the message processing device actually receives the first broadcast message or triggers a condition to stop sending, and the second thread is revoked.
  • the message processing device corresponding to the other consensus node sends the first broadcast message to the corresponding other consensus node.
  • consensus nodes can use their corresponding message processing devices to receive messages broadcast by other consensus nodes.
  • a message processing device is allocated to each consensus node, and the work of broadcasting messages between the consensus nodes is performed by each message processing device.
  • the corresponding message processing device may create a thread for the message processing device corresponding to each other consensus node to perform the task of broadcasting the message until the message processing device corresponding to the other consensus node receives the broadcast message. .
  • the thread executing the broadcast message task only consumes the computing resources of the message processing device, but does not consume the resources of the consensus node, thereby not burdening the consensus node, and enabling the consensus node to more effectively verify the service. .
  • the embodiment of the present application further provides a device for broadcasting a message, as shown in FIG. 3 , including:
  • the obtaining module 301 is configured to obtain a first broadcast message.
  • the sending module 302 is configured to create a first thread for the message processing device corresponding to the device, and send the first broadcast message to the message processing device by using the first thread, so that the message processing device sends the message processing device to other consensus nodes. Corresponding message processing device sends the first broadcast message;
  • the undo module 303 revokes the first thread.
  • the device is connected to the message processing device via a regional line.
  • the device further includes: a receiving module 304, which receives a second broadcast message sent by the message processing device corresponding to the device, where the second broadcast message is broadcast by a message processing device corresponding to another consensus node.
  • the embodiment of the present application further provides another device for broadcasting a message, as shown in FIG. 4 , including:
  • the first receiving module 401 receives a first broadcast message sent by the consensus node corresponding to the device;
  • the sending module 402 is configured to create a second thread for the message processing device corresponding to each other consensus node, and send the first broadcast message to the message processing device corresponding to the other consensus node by using the second thread;
  • the revocation module 403 when it is determined that the message processing device corresponding to the other consensus node receives the first broadcast message, cancels the second thread.
  • the revocation module 403 by using the second thread, the number of the received response signals, wherein the response signal is returned by the message processing device corresponding to the other consensus node after receiving the first broadcast message; If the value is less than the specific value, the first broadcast message is retransmitted by each second thread until the number of the received received response signals is not less than the specific value, and the specific value is an integer greater than 0.
  • the device further includes: a second receiving module 404, receiving a second broadcast message broadcast by the message processing device corresponding to the other consensus node; and sending the second broadcast message to the consensus node.
  • PLD Programmable Logic Device
  • FPGA Field Programmable Gate Array
  • HDL Hardware Description Language
  • the controller can be implemented in any suitable manner, for example, the controller can take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (eg, software or firmware) executable by the (micro)processor.
  • computer readable program code eg, software or firmware
  • examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, The Microchip PIC18F26K20 and the Silicone Labs C8051F320, the memory controller can also be implemented as part of the memory's control logic.
  • the controller can be logically programmed by means of logic gates, switches, ASICs, programmable logic controllers, and embedding.
  • Such a controller can therefore be considered a hardware component, and the means for implementing various functions included therein can also be considered as a structure within the hardware component.
  • a device for implementing various functions can be considered as a software module that can be both a method of implementation and a structure within a hardware component.
  • the system, device, module or unit illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product having a certain function.
  • a typical implementation device is a computer.
  • the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or A combination of any of these devices.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
  • a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory.
  • RAM random access memory
  • ROM read only memory
  • Memory is an example of a computer readable medium.
  • Computer readable media includes both permanent and non-persistent, removable and non-removable media.
  • Information storage can be implemented by any method or technology.
  • the information can be computer readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device.
  • computer readable media does not include temporary storage of computer readable media, such as modulated data signals and carrier waves.
  • embodiments of the present application can be provided as a method, system, or computer program product.
  • the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment in combination of software and hardware.
  • the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • the application can be described in the general context of computer-executable instructions executed by a computer, such as a program module.
  • program modules include routines, programs, objects, components, data structures, and the like that perform particular tasks or implement particular abstract data types.
  • the present application can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are connected through a communication network.
  • program modules can be located in both local and remote computer storage media including storage devices.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Computer And Data Communications (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Multi Processors (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请实施例公开了一种广播消息的方法及装置。为每个共识节点都分配一个消息处理设备,将各共识节点之间广播消息的工作交由各消息处理设备执行。对于某个共识节点而言,可以由其对应的消息处理设备针对其他共识节点对应的消息处理设备创建线程,来执行广播消息的任务,直至其他共识节点对应的消息处理设备接收到广播的消息。如此一来,执行广播消息任务的线程只会耗费消息处理设备的运算资源,却不会耗费共识节点的资源,从而不会给共识节点造成负担,可以使得共识节点更高效地对业务进行共识验证。

Description

一种广播消息的方法及装置 技术领域
本申请涉及区块链技术领域,尤其涉及一种广播消息的方法及装置。
背景技术
在区块链技术领域中,负责对业务进行共识验证的区块链节点称为共识节点。在区块链全球化的趋势下,各共识节点常常分布在世界各地。
每个共识节点在受理业务、共识验证等阶段往往需要向其他共识节点广播消息(如业务消息、共识消息等)。由于全球化的异构网络会导致消息传输过程的不稳定,如中国网络与美国网络是异构网络,位于美国网络的共识节点可能接收不到来自中国网络中的共识节点广播的消息,因此为了保证每个其他共识节点接收到消息的成功率较高,广播消息的共识节点通常会针对每个其他共识节点,创建一个线程,并通过该线程执行向该其他共识节点发送消息的任务。
具体而言,广播消息的共识节点通过该线程向该其他共识节点发送消息后,会等待接收该其他共识节点返回的通知(声明已经接收到消息),若在规定时间内没有通过该线程接收到通知,则会通过该线程再次向该共识节点发送消息,直至接收到通知,或在已经发送过多次消息的前提下,仍未通过该线程接收到通知,该线程才会被撤销。这样的话,可以保证该其他共识节点接收消息的成功率较高。
但是,实际上广播消息的共识节点通过其创建的线程执行向其他共识节点发送消息的任务时,往往需要重复多次发送消息,耗费广播消息的共识节点大量的运算资源,这就会给广播消息的共识节点造成过大的负担。
发明内容
本申请实施例提供一种广播消息的方法及装置,以解决现有的广播消息的方法会给广播消息的共识节点造成过大负担的问题。
为解决上述技术问题,本申请实施例是这样实现的:
本申请实施例提供的一种广播消息的方法,包括:
共识节点获取第一广播消息;
针对所述共识节点对应的消息处理设备创建第一线程,并通过所述第一线程向所述消息处理设备发送所述第一广播消息,以使所述消息处理设备向其他共识节点对应的消息处理设备发送所述第一广播消息;
撤销所述第一线程。
本申请实施例提供的另一种广播消息的方法,包括:
消息处理设备接收所述消息处理设备对应的共识节点发送的第一广播消息;
针对每个其他共识节点对应的消息处理设备创建第二线程,并通过该第二线程向该其他共识节点对应的消息处理设备发送所述第一广播消息;
当确定该其他共识节点对应的消息处理设备接收到所述第一广播消息时,撤销该第二线程。
本申请实施例提供的一种广播消息的装置,包括:
获取模块,获取第一广播消息;
发送模块,针对所述装置对应的消息处理设备创建第一线程,并通过所述第一线程向所述消息处理设备发送所述第一广播消息,以使所述消息处理设备向其他共识节点对应的消息处理设备发送所述第一广播消息;
撤销模块,撤销所述第一线程。
本申请实施例提供的另一种广播消息的装置,包括:
第一接收模块,接收所述装置对应的共识节点发送的第一广播消息;
发送模块,针对每个其他共识节点对应的消息处理设备创建第二线程,并通过该第二线程向该其他共识节点对应的消息处理设备发送所述第一广播消息;
撤销模块,当确定该其他共识节点对应的消息处理设备接收到所述第一广 播消息时,撤销该第二线程。
由以上本申请实施例提供的技术方案可见,在本申请实施例中,为每个共识节点都分配一个消息处理设备,将各共识节点之间广播消息的工作交由各消息处理设备执行。对于某个共识节点而言,可以由其对应的消息处理设备针对其他共识节点对应的消息处理设备创建线程,来执行广播消息的任务,直至其他共识节点对应的消息处理设备接收到广播的消息。如此一来,执行广播消息任务的线程只会耗费消息处理设备的运算资源,却不会耗费共识节点的资源,从而不会给共识节点造成负担,可以使得共识节点更高效地对业务进行共识验证。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请中记载的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的一种广播消息的方法流程图;
图2是现有的广播消息方法与本申请提供的广播消息方法的对比示意图;
图3是本申请实施例提供的一种广播消息的装置示意图;
图4是本申请实施例提供的另一种广播消息的装置示意图。
具体实施方式
本申请实施例提供一种广播消息的方法及装置。
为了使本技术领域的人员更好地理解本申请中的技术方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获 得的所有其他实施例,都应当属于本申请保护的范围。
以下结合附图,详细说明本申请各实施例提供的技术方案。
图1是本申请实施例提供的一种广播消息的方法流程图,包括以下步骤:
S101:共识节点获取第一广播消息。
在本申请实施例中,所述共识节点是区块链网络中参与对业务进行共识验证的区块链节点。在典型的区块链网络中,各区块链节点都可以作为共识节点参与共识验证。而在特殊的区块链网络(如由联盟链子网和公有链子络组成的区块链网络)中,并不是所有区块链节点都可以作为共识节点参与共识验证。
总之,在各共识节点受理业务、共识验证等阶段,共识节点间需要互相广播或发送消息,这就是本申请实施例的应用场景。
其中,受理业务阶段是指某个共识节点接收业务消息,并将业务消息广播给其他共识节点,使得每个共识节点都接收到业务消息,方便后续对业务消息进行共识验证。共识验证阶段是指各共识节点遵循某种共识算法,对验证结果达成共识的阶段,在共识验证阶段,各共识节点间需要互相发送验证消息,以达成共识。
在本申请实施例中,所述第一广播消息可以是上述的业务消息,也可以是上述的验证消息,还可以是某个共识节点向其他共识节点广播或发送的消息。
值得强调的是,本方法的执行主体可以是任一个共识节点,在受理业务阶段,所述共识节点可以接收客户端或非共识节点发送的业务消息,作为获取到的所述第一广播消息;在共识验证阶段,所述共识节点可以在对业务消息进行验证后,生成验证消息,作为获取到的所述第一广播消息。
S102:共识节点针对所述共识节点对应的消息处理设备创建第一线程,并通过所述第一线程向所述消息处理设备发送所述第一广播消息。
S103:共识节点撤销所述第一线程。
在本申请实施例中,所述共识节点可以将所述第一广播消息发送给其对应的消息处理设备,将广播或发送所述第一广播消息的任务完全交由其对应的消 息处理设备处理,由所述消息处理设备确保其他共识节点的消息处理设备成功接收到所述第一广播消息。如此一来,所述共识节点无需再耗费运算资源确保每个其他共识节点尽可能地接收到所述第一广播消息。
图2是现有的广播消息方法与本申请提供的广播消息方法的对比示意图。如图2所示,共识节点对应的消息处理设备是独立于共识节点的计算设备。各共识节点间的消息交互,是由各共识节点分别对应的消息处理设备代为执行的。
也就是说,所述共识节点仅需要针对其对应的消息处理设备创建第一线程,在通过所述第一线程发送第一广播消息给其对应的消息处理设备后,就可以撤销所述第一线程,而无需耗费运算资源继续维持所述第一线程。
其中,所述第一线程是共识节点针对其对应的消息处理设备创建的线程,而下文所述的第二线程则是消息处理设备针对其他共识节点对应的消息处理设备创建的线程。
实际上,所述共识节点是采用异步调用技术,创建一个用于发送所述第一广播消息给其对应的消息处理设备的第一线程,待通过所述第一线程发送所述第一广播消息后,所述共识节点不必关心所述消息处理设备是否接收到所述第一广播消息,就可以直接撤销所述第一线程。
值得强调的是,所述共识节点与其对应的消息处理设备一般并不分布于异构网络中,也就是说,所述共识节点与其对应的消息处理设备之间的信息交互是稳定的,消息处理设备一般是能够一次顺利地接收到其对应的共识节点发送的消息的。
进一步地,为了完全确保所述第一广播消息从所述共识节点传输给对应的消息处理设备的过程中不会丢失,可以采用区域专线连接所述共识节点和所述共识节点对应的消息处理设备,从而尽可能降低所述共识节点和其对应的消息处理设备之间可能存在的网络扰动。
此外,所述共识节点除了可以指令其对应的消息处理设备对外广播消息 外,还可以利用其对应的消息处理设备接收其他共识节点广播的消息。
具体而言,所述共识节点可以接收所述共识节点对应的消息处理设备发送的第二广播消息,其中,所述第二广播消息是其他共识节点对应的消息处理设备广播的。而所述消息处理设备可以接收其他共识节点对应的消息处理设备广播的第二广播消息,再将所述第二广播消息发送给所述共识节点。
值得强调的是,所述第一广播消息和所述第二广播消息都是共识节点广播的广播消息,所述第一广播消息和所述第二广播消息都可以是上述的业务消息、验证消息等。
S104:消息处理设备针对每个其他共识节点对应的消息处理设备创建第二线程,并通过该第二线程向该其他共识节点对应的消息处理设备发送所述第一广播消息。
S105:消息处理设备当确定该其他共识节点对应的消息处理设备接收到所述第一广播消息时,撤销该第二线程。
在现有技术中,对外广播消息的工作是共识节点自己负责的,共识节点会创建占用自身运算资源的线程,并通过线程去尽可能地确保每个其他共识节点接收到其广播的消息。
而在本申请实施例中,所述共识节点仅需要将所述第一广播消息发送给其对应的消息处理设备即可。所述消息处理设备作为一个独立于所述共识节点的计算设备,可以独立负责对外广播消息。这样就解放了所述共识节点,使得所述共识节点可以集中有限的运算资源更高效地执行共识验证工作。
在本申请实施例中,所述消息处理设备会针对每个其他共识节点对应的消息处理设备创建第二线程,通过该第二线程,耗费所述消息处理设备自身的运算资源来等待确认该共识节点成功接收到所述第一广播消息。
具体而言,所述消息处理设备可以通过针对每个其他共识节点创建的第二线程,向各其他共识节点分别对应的消息处理设备发送所述第一广播消息;统计接收到的响应信号的数量,其中,响应信号是其他共识节点对应的消息处理 设备在接收到所述第一广播消息后返回的;若统计的数量小于特定值,则通过各第二线程重新发送所述第一广播消息,直至统计的接收到的响应信号的数量不小于所述特定值为止,所述特定值为大于0的整数。所述特定值是可配置的,特定值越高,能够确保接收到所述第一广播消息的共识节点的数量就越多,所述共识节点广播消息的成功率就越高。本申请对特定值具体是多少不做限制。
进一步地,若统计的数量小于特定值,则所述消息处理设备可以通过未返回响应信号的消息处理设备对应的第二线程,继续向未返回响应信号的消息处理设备发送所述第一广播消息,直至历次统计的接收到的响应信号的总数量不小于所述特定值为止;也可以通过各第二线程再次向所有其他消息处理设备发送所述第一广播消息,直至下一次统计的接收到的响应信号的数量不小于所述特定值为止。
进一步地,当所述消息处理设备通过第二线程向某个其他消息处理设备发送所述第一广播消息达到指定次数后时,若通过该第二线程仍未接收到该其他消息处理设备返回的响应信号,则可以暂停向该消息处理设备发送所述第一广播消息;待规定期限后,继续向该消息处理设备发送所述第一广播消息。
举例来说,所述消息处理设备可以先向其他消息处理设备广播一次所述第一广播消息,然后确定未返回响应信号的其他消息处理设备(也就是未接收到所述第一广播消息的消息处理设备),再向未接收到所述第一广播消息的消息处理设备发送一次所述第一广播消息,如是反复。在重复向同一个其他消息处理设备发送所述第一广播消息达到3次后,说明存在暂时无法解决的传输问题(可能是未接收成功的消息处理设备宕机或者网络出现大的故障),于是先暂停向该其他消息处理设备发送所述第一广播消息,等待较长时间后(传输问题可能已经解决了),再继续向该其他消息处理设备发送所述第一广播消息。
在本申请实施例中,消息处理设备会在确保所述第一广播消息被各其他共识节点对应的消息处理设备接收到之后,才撤销所述第二线程。值得强调的是,消息处理设备可以采用各种消息投递策略,如延时投递、补偿投递(由未接收 到消息的主体主动要求补偿该消息)等,来确保所述第一广播消息被各其他共识节点对应的消息处理设备接收到,本申请对消息处理设备采取的消息投递策略不做具体限制。
由上可知,所述消息处理设备实际上是采用同步调用技术,针对每个其他共识节点对应的消息处理设备,创建一个用于向该消息处理设备发送所述第一广播消息的第二线程,通过该第二线程发送第一广播消息后,仍通过该第二线程继续等待确认该消息处理设备接收到了所述第一广播消息,若该消息处理设备未接收到,则重新通过该第二线程向该消息处理设备发送第一广播消息,直至该消息处理设备确实接收到了所述第一广播消息或触发了停止发送的条件,该第二线程才会被撤销。
S106:其他共识节点对应的消息处理设备,将所述第一广播消息发送给相应的其他共识节点。
如前所述,其他共识节点可以利用其对应的消息处理设备接收其他共识节点广播的消息。
通过图1所示的广播消息的方法,为每个共识节点都分配一个消息处理设备,将各共识节点之间广播消息的工作交由各消息处理设备执行。对于某个共识节点而言,可以由其对应的消息处理设备针对各其他共识节点对应的消息处理设备创建线程,来执行广播消息的任务,直至其他共识节点对应的消息处理设备接收到广播的消息。如此一来,执行广播消息任务的线程只会耗费消息处理设备的运算资源,却不会耗费共识节点的资源,从而不会给共识节点造成负担,可以使得共识节点更高效地对业务进行共识验证。
基于图1所示的广播消息的方法,本申请实施例还对应提供了一种广播消息的装置,如图3所示,包括:
获取模块301,获取第一广播消息;
发送模块302,针对所述装置对应的消息处理设备创建第一线程,并通过所述第一线程向所述消息处理设备发送所述第一广播消息,以使所述消息处理 设备向其他共识节点对应的消息处理设备发送所述第一广播消息;
撤销模块303,撤销所述第一线程。
所述装置与所述消息处理设备通过区域专线连接。
所述装置还包括:接收模块304,接收所述装置对应的消息处理设备发送的第二广播消息,所述第二广播消息是其他共识节点对应的消息处理设备广播的。
基于图1所示的广播消息的方法,本申请实施例还对应提供了另一种广播消息的装置,如图4所示,包括:
第一接收模块401,接收所述装置对应的共识节点发送的第一广播消息;
发送模块402,针对每个其他共识节点对应的消息处理设备创建第二线程,并通过该第二线程向该其他共识节点对应的消息处理设备发送所述第一广播消息;
撤销模块403,当确定该其他共识节点对应的消息处理设备接收到所述第一广播消息时,撤销该第二线程。
所述撤销模块403,通过各第二线程统计接收到的响应信号的数量,其中,响应信号是其他共识节点对应的消息处理设备在接收到所述第一广播消息后返回的;若统计的数量小于特定值,则通过各第二线程重新发送所述第一广播消息,直至统计的接收到的响应信号的数量不小于所述特定值为止,所述特定值为大于0的整数。
所述装置还包括:第二接收模块404,接收其他共识节点对应的消息处理设备广播的第二广播消息;将所述第二广播消息发送给所述共识节点。
在20世纪90年代,对于一个技术的改进可以很明显地区分是硬件上的改进(例如,对二极管、晶体管、开关等电路结构的改进)还是软件上的改进(对于方法流程的改进)。然而,随着技术的发展,当今的很多方法流程的改进已经可以视为硬件电路结构的直接改进。设计人员几乎都通过将改进的方法流程编程到硬件电路中来得到相应的硬件电路结构。因此,不能说一个方法流程的 改进就不能用硬件实体模块来实现。例如,可编程逻辑器件(Programmable Logic Device,PLD)(例如现场可编程门阵列(Field Programmable Gate Array,FPGA))就是这样一种集成电路,其逻辑功能由用户对器件编程来确定。由设计人员自行编程来把一个数字系统“集成”在一片PLD上,而不需要请芯片制造厂商来设计和制作专用的集成电路芯片。而且,如今,取代手工地制作集成电路芯片,这种编程也多半改用“逻辑编译器(logic compiler)”软件来实现,它与程序开发撰写时所用的软件编译器相类似,而要编译之前的原始代码也得用特定的编程语言来撰写,此称之为硬件描述语言(Hardware Description Language,HDL),而HDL也并非仅有一种,而是有许多种,如ABEL(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language)等,目前最普遍使用的是VHDL(Very-High-Speed Integrated Circuit Hardware Description Language)与Verilog。本领域技术人员也应该清楚,只需要将方法流程用上述几种硬件描述语言稍作逻辑编程并编程到集成电路中,就可以很容易得到实现该逻辑方法流程的硬件电路。
控制器可以按任何适当的方式实现,例如,控制器可以采取例如微处理器或处理器以及存储可由该(微)处理器执行的计算机可读程序代码(例如软件或固件)的计算机可读介质、逻辑门、开关、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑控制器和嵌入微控制器的形式,控制器的例子包括但不限于以下微控制器:ARC 625D、Atmel AT91SAM、Microchip PIC18F26K20以及Silicone Labs C8051F320,存储器控制器还可以被实现为存储器的控制逻辑的一部分。本领域技术人员也知道,除了以纯计算机可读程序代码方式实现控制器以外,完全可以通过将方法步骤进行逻辑编程来使得控制器以逻辑门、开关、专用集成电路、可编程逻辑控制器和嵌入微控制器等的形 式来实现相同功能。因此这种控制器可以被认为是一种硬件部件,而对其内包括的用于实现各种功能的装置也可以视为硬件部件内的结构。或者甚至,可以将用于实现各种功能的装置视为既可以是实现方法的软件模块又可以是硬件部件内的结构。
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机。具体的,计算机例如可以为个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任何设备的组合。
为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本申请时可以把各单元的功能在同一个或多个软件和/或硬件中实现。
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个 流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。
本领域技术人员应明白,本申请的实施例可提供为方法、系统或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本申请,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
以上所述仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。

Claims (12)

  1. 一种广播消息的方法,其特征在于,包括:
    共识节点获取第一广播消息;
    针对所述共识节点对应的消息处理设备创建第一线程,并通过所述第一线程向所述消息处理设备发送所述第一广播消息,以使所述消息处理设备向其他共识节点对应的消息处理设备发送所述第一广播消息;
    撤销所述第一线程。
  2. 根据权利要求1所述的方法,其特征在于,所述共识节点与所述消息处理设备通过区域专线连接。
  3. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    接收所述共识节点对应的消息处理设备发送的第二广播消息,所述第二广播消息是其他共识节点对应的消息处理设备广播的。
  4. 一种广播消息的方法,其特征在于,包括:
    消息处理设备接收所述消息处理设备对应的共识节点发送的第一广播消息;
    针对每个其他共识节点对应的消息处理设备创建第二线程,并通过该第二线程向该其他共识节点对应的消息处理设备发送所述第一广播消息;
    当确定该其他共识节点对应的消息处理设备接收到所述第一广播消息时,撤销该第二线程。
  5. 根据权利要求4所述的方法,其特征在于,确定该其他共识节点对应的消息处理设备接收到所述第一广播消息,具体包括:
    通过各第二线程统计接收到的响应信号的数量,其中,响应信号是其他共识节点对应的消息处理设备在接收到所述第一广播消息后返回的;
    若统计的数量小于特定值,则通过各第二线程重新发送所述第一广播消息,直至统计的接收到的响应信号的数量不小于所述特定值为止,所述特定值为大于0的整数。
  6. 根据权利要求4所述的方法,其特征在于,所述方法还包括:
    接收其他共识节点对应的消息处理设备广播的第二广播消息;
    将所述第二广播消息发送给所述共识节点。
  7. 一种广播消息的装置,其特征在于,包括:
    获取模块,获取第一广播消息;
    发送模块,针对所述装置对应的消息处理设备创建第一线程,并通过所述第一线程向所述消息处理设备发送所述第一广播消息,以使所述消息处理设备向其他共识节点对应的消息处理设备发送所述第一广播消息;
    撤销模块,撤销所述第一线程。
  8. 根据权利要求7所述的装置,其特征在于,所述装置与所述消息处理设备通过区域专线连接。
  9. 根据权利要求7所述的装置,其特征在于,所述装置还包括:
    接收模块,接收所述装置对应的消息处理设备发送的第二广播消息,所述第二广播消息是其他共识节点对应的消息处理设备广播的。
  10. 一种广播消息的装置,其特征在于,包括:
    第一接收模块,接收所述装置对应的共识节点发送的第一广播消息;
    发送模块,针对每个其他共识节点对应的消息处理设备创建第二线程,并通过该第二线程向该其他共识节点对应的消息处理设备发送所述第一广播消息;
    撤销模块,当确定该其他共识节点对应的消息处理设备接收到所述第一广播消息时,撤销该第二线程。
  11. 根据权利要求10所述的装置,其特征在于,所述撤销模块,通过各第二线程统计接收到的响应信号的数量,其中,响应信号是其他共识节点对应的消息处理设备在接收到所述第一广播消息后返回的;若统计的数量小于特定值,则通过各第二线程重新发送所述第一广播消息,直至统计的接收到的响应信号的数量不小于所述特定值为止,所述特定值为大于0的整数。
  12. 根据权利要求10所述的装置,其特征在于,所述装置还包括:
    第二接收模块,接收其他共识节点对应的消息处理设备广播的第二广播消息;将所述第二广播消息发送给所述共识节点。
PCT/CN2018/079435 2017-03-24 2018-03-19 一种广播消息的方法及装置 WO2018171543A1 (zh)

Priority Applications (13)

Application Number Priority Date Filing Date Title
JP2019528064A JP6859510B2 (ja) 2017-03-24 2018-03-19 メッセージをブロードキャストするための方法およびデバイス
MX2019005982A MX2019005982A (es) 2017-03-24 2018-03-19 Metodo y dispositivo para mensajes de difusion.
MYPI2019002875A MY192565A (en) 2017-03-24 2018-03-19 Method and device for broadcasting messages
CA3044603A CA3044603C (en) 2017-03-24 2018-03-19 Method and device for broadcasting messages
RU2019115869A RU2730039C1 (ru) 2017-03-24 2018-03-19 Способ и устройство для широковещательной передачи сообщений
AU2018240583A AU2018240583B2 (en) 2017-03-24 2018-03-19 Method and device for broadcasting messages
BR112019010520-4A BR112019010520B1 (pt) 2017-03-24 2018-03-19 Método implementado por computador para transmitir mensagens e sistema para transmitir mensagens
EP18772238.4A EP3531618B1 (en) 2017-03-24 2018-03-19 Method and device for broadcasting messages
KR1020197014976A KR102205750B1 (ko) 2017-03-24 2018-03-19 메시지 브로드캐스트를 위한 방법 및 디바이스
PH12019501151A PH12019501151A1 (en) 2017-03-24 2019-05-23 Method and device for broadcasting messages
ZA2019/03267A ZA201903267B (en) 2017-03-24 2019-05-23 Method and device for broadcasting messages
US16/516,841 US10824485B2 (en) 2017-03-24 2019-07-19 Methods and devices for broadcasting messages
US16/917,393 US11003514B2 (en) 2017-03-24 2020-06-30 Methods and devices for broadcasting messages

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710182459.1A CN107196772B (zh) 2017-03-24 2017-03-24 一种广播消息的方法及装置
CN201710182459.1 2017-03-24

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/516,841 Continuation US10824485B2 (en) 2017-03-24 2019-07-19 Methods and devices for broadcasting messages

Publications (1)

Publication Number Publication Date
WO2018171543A1 true WO2018171543A1 (zh) 2018-09-27

Family

ID=59870952

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/079435 WO2018171543A1 (zh) 2017-03-24 2018-03-19 一种广播消息的方法及装置

Country Status (16)

Country Link
US (2) US10824485B2 (zh)
EP (1) EP3531618B1 (zh)
JP (1) JP6859510B2 (zh)
KR (1) KR102205750B1 (zh)
CN (1) CN107196772B (zh)
AU (1) AU2018240583B2 (zh)
BR (1) BR112019010520B1 (zh)
CA (1) CA3044603C (zh)
MX (1) MX2019005982A (zh)
MY (1) MY192565A (zh)
PH (1) PH12019501151A1 (zh)
RU (1) RU2730039C1 (zh)
SG (1) SG10202100605QA (zh)
TW (1) TW201836372A (zh)
WO (1) WO2018171543A1 (zh)
ZA (1) ZA201903267B (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110602249A (zh) * 2019-09-29 2019-12-20 腾讯科技(深圳)有限公司 一种资源分配的方法以及相关装置
CN113012466A (zh) * 2021-02-23 2021-06-22 中国联合网络通信集团有限公司 基于区块链的车位共享方法、用户节点、设备及存储介质

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107196772B (zh) * 2017-03-24 2020-03-13 创新先进技术有限公司 一种广播消息的方法及装置
CN108052392B (zh) * 2017-12-26 2020-12-25 成都质数斯达克科技有限公司 一种基于区块链的业务处理方法及装置
WO2020033048A1 (en) * 2018-08-09 2020-02-13 Hrl Laboratories, Llc System and method for consensus ordering of broadcast messages
US11277260B2 (en) * 2019-09-17 2022-03-15 International Business Machines Corporation Off-chain notification of updates from a private blockchain
US12099997B1 (en) 2020-01-31 2024-09-24 Steven Mark Hoffberg Tokenized fungible liabilities
CN112019599A (zh) * 2020-03-16 2020-12-01 支付宝(杭州)信息技术有限公司 在区块链共识处理时进行处理消息同步的方法及装置
CN114358938A (zh) * 2021-12-31 2022-04-15 杭州复杂美科技有限公司 交易、区块的广播方法、设备和存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1980411A (zh) * 2006-10-27 2007-06-13 华为技术有限公司 业务消息传输方法和系统
CN104579905A (zh) * 2013-10-15 2015-04-29 阿里巴巴集团控股有限公司 消息传递方法和系统及mom服务器、接收端
CN104580253A (zh) * 2015-01-30 2015-04-29 网易(杭州)网络有限公司 一种处理用户数据的方法及装置
US20160261685A1 (en) * 2015-03-02 2016-09-08 Dell Products L.P. Deferred configuration or instruction execution using a secure distributed transaction ledger
CN106446067A (zh) * 2016-09-06 2017-02-22 联动优势科技有限公司 一种获取交易数据的方法和装置
CN107196772A (zh) * 2017-03-24 2017-09-22 阿里巴巴集团控股有限公司 一种广播消息的方法及装置

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8799402B2 (en) 2007-06-29 2014-08-05 Qualcomm Incorporated Content sharing via mobile broadcast system and method
US8199688B2 (en) 2008-03-22 2012-06-12 Qualcomm Incorporated Signaling and management of broadcast-multicast waveform embedded in a unicast waveform
CN101801113B (zh) * 2009-02-05 2012-07-11 华为技术有限公司 网络拓扑分簇处理方法和处理系统
WO2012141677A1 (en) * 2011-04-11 2012-10-18 Hewlett-Packard Development Company, L.P. Performing a task in a system having different types of hardware resources
US20150223028A1 (en) 2012-10-03 2015-08-06 Qualcomm Incorporated Broadcast/Multicast Used for M2M/MTC
CN104079389A (zh) * 2013-03-25 2014-10-01 株式会社Ntt都科摩 移动广播业务的重传方法
JP6326736B2 (ja) * 2013-08-26 2018-05-23 富士通株式会社 中継装置、中継方法、及び中継プログラム
US9397917B2 (en) 2014-01-10 2016-07-19 Huawei Technologies Co., Ltd. System and method for zoning in software defined networks
US10275772B2 (en) * 2014-06-16 2019-04-30 Bank Of America Corporation Cryptocurrency risk detection system
US9967334B2 (en) * 2015-03-02 2018-05-08 Dell Products Lp Computing device configuration and management using a secure decentralized transaction ledger
US10095558B2 (en) * 2015-05-26 2018-10-09 Cavium, Inc. Systems and methods for offloading inline SSL processing to an embedded networking device
JP6452156B2 (ja) * 2015-09-03 2019-01-16 日本電信電話株式会社 許諾情報管理システム、利用者端末、権利者端末、許諾情報管理方法、および、許諾情報管理プログラム
KR101701131B1 (ko) * 2016-04-28 2017-02-13 주식회사 라피 이종간 블록체인 연결을 이용한 데이터 기록/검증 방법 및 시스템

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1980411A (zh) * 2006-10-27 2007-06-13 华为技术有限公司 业务消息传输方法和系统
CN104579905A (zh) * 2013-10-15 2015-04-29 阿里巴巴集团控股有限公司 消息传递方法和系统及mom服务器、接收端
CN104580253A (zh) * 2015-01-30 2015-04-29 网易(杭州)网络有限公司 一种处理用户数据的方法及装置
US20160261685A1 (en) * 2015-03-02 2016-09-08 Dell Products L.P. Deferred configuration or instruction execution using a secure distributed transaction ledger
CN106446067A (zh) * 2016-09-06 2017-02-22 联动优势科技有限公司 一种获取交易数据的方法和装置
CN107196772A (zh) * 2017-03-24 2017-09-22 阿里巴巴集团控股有限公司 一种广播消息的方法及装置

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110602249A (zh) * 2019-09-29 2019-12-20 腾讯科技(深圳)有限公司 一种资源分配的方法以及相关装置
CN110602249B (zh) * 2019-09-29 2021-10-22 腾讯科技(深圳)有限公司 一种资源分配的方法以及相关装置
CN113012466A (zh) * 2021-02-23 2021-06-22 中国联合网络通信集团有限公司 基于区块链的车位共享方法、用户节点、设备及存储介质

Also Published As

Publication number Publication date
CA3044603C (en) 2021-01-19
CA3044603A1 (en) 2018-09-27
EP3531618A4 (en) 2019-10-02
CN107196772B (zh) 2020-03-13
TW201836372A (zh) 2018-10-01
MY192565A (en) 2022-08-29
BR112019010520A2 (pt) 2019-09-17
JP6859510B2 (ja) 2021-04-14
EP3531618B1 (en) 2022-01-12
US20190340042A1 (en) 2019-11-07
ZA201903267B (en) 2021-09-29
JP2020504928A (ja) 2020-02-13
US10824485B2 (en) 2020-11-03
BR112019010520B1 (pt) 2022-04-26
SG10202100605QA (en) 2021-02-25
RU2730039C1 (ru) 2020-08-14
AU2018240583A1 (en) 2019-06-06
US20200334090A1 (en) 2020-10-22
KR20190069554A (ko) 2019-06-19
MX2019005982A (es) 2019-08-12
US11003514B2 (en) 2021-05-11
AU2018240583B2 (en) 2020-09-03
CN107196772A (zh) 2017-09-22
EP3531618A1 (en) 2019-08-28
PH12019501151A1 (en) 2019-12-16
KR102205750B1 (ko) 2021-01-22

Similar Documents

Publication Publication Date Title
WO2018171543A1 (zh) 一种广播消息的方法及装置
TWI727120B (zh) 一種發送交易資訊和共識驗證的方法及裝置
JP6675518B1 (ja) サービス要求を処理するための方法およびデバイス
KR102152556B1 (ko) 서비스 프로세싱 및 합의 방법 및 디바이스
WO2018219283A1 (zh) 一种区块链共识方法及设备
WO2018161901A1 (zh) 一种共识方法及装置
WO2018177235A1 (zh) 一种区块链共识方法及装置
WO2018177250A1 (zh) 一种基于区块链的数据处理方法及设备
KR20190118630A (ko) 합의 검증을 위한 방법 및 장치
TW201837748A (zh) 一種基於區塊鏈的共識方法及裝置
WO2019144809A1 (zh) 一种服务更新方法及装置、系统
CN116939006A (zh) 一种消息传输方法、装置及设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18772238

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 3044603

Country of ref document: CA

ENP Entry into the national phase

Ref document number: 2019528064

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 20197014976

Country of ref document: KR

Kind code of ref document: A

REG Reference to national code

Ref country code: BR

Ref legal event code: B01A

Ref document number: 112019010520

Country of ref document: BR

ENP Entry into the national phase

Ref document number: 2018240583

Country of ref document: AU

Date of ref document: 20180319

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2018772238

Country of ref document: EP

Effective date: 20190523

ENP Entry into the national phase

Ref document number: 112019010520

Country of ref document: BR

Kind code of ref document: A2

Effective date: 20190523

NENP Non-entry into the national phase

Ref country code: DE