JP2024035121A - Block synchronization method, blockchain system, device and storage medium - Google Patents

Block synchronization method, blockchain system, device and storage medium Download PDF

Info

Publication number
JP2024035121A
JP2024035121A JP2023134043A JP2023134043A JP2024035121A JP 2024035121 A JP2024035121 A JP 2024035121A JP 2023134043 A JP2023134043 A JP 2023134043A JP 2023134043 A JP2023134043 A JP 2023134043A JP 2024035121 A JP2024035121 A JP 2024035121A
Authority
JP
Japan
Prior art keywords
nvp
block
message
blockchain
cluster
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.)
Pending
Application number
JP2023134043A
Other languages
Japanese (ja)
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.)
Hangzhou Qulian Technology Co Ltd
Original Assignee
Hangzhou Qulian 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 Hangzhou Qulian Technology Co Ltd filed Critical Hangzhou Qulian Technology Co Ltd
Publication of JP2024035121A publication Critical patent/JP2024035121A/en
Pending legal-status Critical Current

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/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Abstract

【課題】ブロック同期方法、ブロックチェーンシステム、デバイス及び記憶媒体を開示する。【解決手段】ブロックチェーンシステムは、複数のVPおよびm個のNVPクラスタを含み、各NVPクラスタは、第1のNVP及び少なくとも1つの第2のNVPを含み、第1のNVPは、対応するVPと通信するためのNVPであり、複数のVPのうちのm個のVPの夫々によって、対応するNVPクラスタ内の第1のNVPに、ブロックを搬送する第1のメッセージを送信し、第1のメッセージを受信すると、第1のメッセージで搬送されるブロックをブロックチェーンに記憶し、隣接するNVPに第1のメッセージを送信する。VPは、ブロックを搬送する第1のメッセージを第1のNVPに送信するだけで、各NVPによってこのブロックを同期させることができ、それによって、VPの負荷を軽減し、ブロックのコンセンサス効率を改善する。【選択図】図2A block synchronization method, a blockchain system, a device, and a storage medium are disclosed. A blockchain system includes a plurality of VPs and m NVP clusters, each NVP cluster includes a first NVP and at least one second NVP, and the first NVP is connected to a corresponding VP. an NVP for communicating with a first NVP, and transmits a first message conveying a block by each of the m VPs of the plurality of VPs to a first NVP in a corresponding NVP cluster; Upon receiving the message, it stores the block conveyed in the first message in the blockchain and sends the first message to the neighboring NVP. A VP can synchronize this block by each NVP by simply sending a first message carrying the block to the first NVP, thereby reducing the load on the VP and improving block consensus efficiency. do. [Selection diagram] Figure 2

Description

本願は、ブロックチェーン技術分野に関し、特に、ブロック同期方法、ブロックチェーンシステム、デバイス及び記憶媒体に関する。 The present application relates to the field of blockchain technology, and in particular, to a block synchronization method, a blockchain system, a device, and a storage medium.

いくつかのシナリオでは、ブロックチェーンシステムは、複数のコンセンサスノード(Validating Peer、VP)および複数の非コンセンサスノード(None-Validating Peer、NVP)を含む。VPはブロックコンセンサスプロセスに参加する必要があり、NVPはブロックコンセンサスプロセスに参加する必要がなく、ノードにおけるデータの整合性を保持するために、NVPはVPのコンセンサスが得られたブロックを同期する必要がある。 In some scenarios, a blockchain system includes multiple consensus nodes (Validating Peer, VP) and multiple non-consensus nodes (None-Validating Peer, NVP). VPs need to participate in the block consensus process, NVPs do not need to participate in the block consensus process, and NVPs need to synchronize blocks with VP consensus to maintain data integrity at the nodes. There is.

関連技術において、複数のVPのそれぞれは、複数のNVPと直接通信可能に接続されてもよい。複数のVPは、あるブロックに対するコンセンサスを完了した後、ブロックチェーンに該ブロックを追加する。その後、何れか一つのVPは、複数のNVPのそれぞれのこのブロックに対する同期を実現するように、このブロックをこのVPに通信接続された複数のNVPに直接送信することができる。 In related technology, each of a plurality of VPs may be directly communicably connected to a plurality of NVPs. After multiple VPs complete consensus on a block, they add the block to the blockchain. Any one VP can then directly send this block to multiple NVPs communicatively coupled to this VP to achieve synchronization of each of the multiple NVPs to this block.

しかしながら、上記の方式では、VPによるコンセンサスを必要とするブロックの数がますます多くなり、VPに通信接続されるNVPの数が増加し続けると、VPは非常にビジーになる。これにより、VPの負荷が大きくなり、ブロックのコンセンサス効率に影響を与える。 However, in the above scheme, if the number of blocks that require consensus by the VP becomes more and more large and the number of NVPs communicatively connected to the VP continues to increase, the VP becomes very busy. This increases the load on VP and affects the block consensus efficiency.

本願は、ブロックチェーンシステムにおけるコンセンサスノードの負荷を軽減し、ブロックのコンセンサス効率を向上させることができるブロック同期方法、ブロックチェーンシステム、デバイス及び記憶媒体を提供する。前記技術案は以下のとおりである。 The present application provides a block synchronization method, a blockchain system, a device, and a storage medium that can reduce the load on consensus nodes in a blockchain system and improve block consensus efficiency. The technical proposal is as follows.

第1の態様によれば、ブロックチェーンシステムに適用されるブロック同期方法が提供され、前記ブロックチェーンシステムは、複数のコンセンサスノードVPおよびm個の非コンセンサスノードNVPクラスタを含み、前記複数のVPのうちのm個のVPは、前記m個のNVPクラスタと1対1で対応し、前記m個のNVPクラスタのそれぞれは、第1のNVPおよび少なくとも1つの第2のNVPを含み、前記第1のNVPは、対応するVPと通信するNVPであり、前記第1のNVPと前記少なくとも1つの第2のNVPのそれぞれとの間にネットワーク経路を有し、前記mは正の整数であり、前記方法は、 According to a first aspect, there is provided a block synchronization method applied to a blockchain system, the blockchain system including a plurality of consensus nodes VP and m non-consensus node NVP clusters, The m VPs have a one-to-one correspondence with the m NVP clusters, each of the m NVP clusters including a first NVP and at least one second NVP; is an NVP that communicates with a corresponding VP and has a network path between the first NVP and each of the at least one second NVP, where m is a positive integer, and where the The method is

前記複数のVPがブロックに対するコンセンサスを完了し、前記ブロックをブロックチェーンに追加したごとに、前記m個のVPのそれぞれは、前記ブロックを搬送する第1のメッセージを、対応するNVPクラスタ内の前記第1のNVPに送信すること、
前記m個のNVPクラスタのそれぞれにおける各NVPが前記第1のメッセージを受信すると、前記第1のメッセージで搬送される前記ブロックをブロックチェーンに記憶し、前記第1のメッセージを同じNVPクラスタ内の隣接するNVPに送信すること、を含む。
Each time said plurality of VPs complete consensus on a block and add said block to the blockchain, each of said m VPs sends a first message carrying said block to said block in the corresponding NVP cluster. sending to the first NVP;
When each NVP in each of the m NVP clusters receives the first message, it stores the block carried in the first message in the blockchain and transfers the first message to all other NVP clusters in the same NVP cluster. including sending to neighboring NVPs.

第2の態様によれば、ブロックチェーンシステムが提供され、前記ブロックチェーンシステムは、複数のコンセンサスノードVPおよびm個の非コンセンサスノードNVPクラスタを含み、前記複数のVPのうちのm個のVPは、前記m個のNVPクラスタと1対1で対応し、前記m個のNVPクラスタのそれぞれは、第1のNVPおよび少なくとも1つの第2のNVPを含み、前記第1のNVPは、対応するVPと通信するNVPであり、前記第1のNVPと前記少なくとも1つの第2のNVPのそれぞれとの間にネットワーク経路を有し、前記mは正の整数であり、
前記m個のVPのそれぞれは、前記複数のVPが1つのブロックに対するコンセンサスを完了し、前記ブロックをブロックチェーンに追加したごとに、前記ブロックを搬送する第1 のメッセージを、対応するNVPクラスタ内の前記第1のNVPに送信し、
前記m個のNVPクラスタのそれぞれにおける各NVPは、前記第1のメッセージが受信されると、前記第1のメッセージで搬送される前記ブロックをブロックチェーンに記憶し、前記第1のメッセージを同じNVPクラスタ内の隣接するNVPに送信する。
According to a second aspect, a blockchain system is provided, wherein the blockchain system includes a plurality of consensus node VPs and m non-consensus node NVP clusters, and m VPs of the plurality of VPs are , in one-to-one correspondence with the m NVP clusters, each of the m NVP clusters including a first NVP and at least one second NVP, and the first NVP has a corresponding VP an NVP in communication with a NVP, having a network path between each of the first NVP and the at least one second NVP, where m is a positive integer;
Each of the m VPs sends a first message carrying the block into the corresponding NVP cluster each time the plurality of VPs complete consensus for a block and add the block to the blockchain. to said first NVP of;
Each NVP in each of the m NVP clusters stores the block carried in the first message in a blockchain when the first message is received, and stores the block carried in the first message in the same NVP. Send to neighboring NVPs in the cluster.

第3の態様によれば、メモリと、プロセッサと、前記メモリに記憶されて前記プロセッサで実行可能なコンピュータプログラムとを含むコンピュータデバイスが提供され、前記コンピュータプログラムが前記プロセッサによって実行されると、上記のブロック同期方法が実現される。 According to a third aspect, there is provided a computer device including a memory, a processor, and a computer program stored in the memory and executable by the processor, and when the computer program is executed by the processor, the A block synchronization method is realized.

第4の態様によれば、コンピュータプログラムが記憶されているコンピュータ読み取り可能な記憶媒体が提供され、前記コンピュータプログラムがプロセッサによって実行されると、上記のブロック同期方法を実現する。 According to a fourth aspect, there is provided a computer readable storage medium having a computer program stored thereon, which when executed by a processor realizes the block synchronization method described above.

第5の態様によれば、命令を含むコンピュータプログラム製品が提供され、前記コンピュータプログラム製品がコンピュータにて運行するとき、コンピュータは、前記ブロック同期方法のステップを実行する。 According to a fifth aspect, a computer program product is provided that includes instructions, and when the computer program product runs on a computer, the computer performs the steps of the block synchronization method.

本願の実施例によるブロックチェーンシステムの概略構造図である。1 is a schematic structural diagram of a blockchain system according to an embodiment of the present application; FIG. 本願の実施例によるブロック同期方法のフローチャートである。3 is a flowchart of a block synchronization method according to an embodiment of the present application. 本願の実施例によるブロックチェーンの概略図である。1 is a schematic diagram of a blockchain according to an embodiment of the present application; FIG. 本願の実施例による別のブロックチェーンの概略図である。2 is a schematic diagram of another blockchain according to an embodiment of the present application; FIG. 本願の実施例によるコンピュータデバイスの概略構造図である。1 is a schematic structural diagram of a computer device according to an embodiment of the present application; FIG.

本願の目的、技術案及び利点をより明確にするために、以下、図面を参照しながら本願の実施形態をさらに詳細に説明する。本願で言及される「複数」は、2つ以上を指すことを理解されたい。本願の説明において、別途の説明がない限り、「/」は又はを表し、例えば、A/BはA又はBを表すことができ、本文における「及び/又は」は関連対象の関連関係を説明するためのものに過ぎず、3つの関係が存在してもよいことを表し、例えばA及び/又はBは、Aが単独で存在し、AとBが同時に存在し、Bが単独で存在するという3つの場合を表すことができる。また、本願の技術案を明確に説明するために、「第1」、「第2」などの文字を用いて、機能及び作用が基本的に同じである同じ項目又は類似項目を区別する。当業者であれば、「第1」、「第2」などの文字は数量と実行順序を限定するものではなく、「第1」、「第2」などの文字も必ずしも異なることを限定するものではないことを理解できる。 In order to make the objectives, technical solutions, and advantages of the present application more clear, embodiments of the present application will be described in further detail with reference to the drawings. It should be understood that references to "plurality" in this application refer to two or more. In the description of this application, unless otherwise specified, "/" represents or, for example, A/B can represent A or B, and "and/or" in the text describes the related relationship of related objects. For example, A and/or B means that A exists alone, A and B exist simultaneously, and B exists alone. Three cases can be expressed. In addition, in order to clearly explain the technical solution of the present application, characters such as "first" and "second" are used to distinguish the same or similar items that have basically the same function and operation. Those skilled in the art will understand that characters such as "first" and "second" do not limit the quantity and order of execution, and characters such as "first" and "second" do not necessarily limit that they are different. I can understand that this is not the case.

本願の実施例によるブロック同期方法は、ブロックチェーンシステムのVPに記憶されたブロックをNVPクラスタ内の各NVPに同期させる応用シーンに適用され得る。 The block synchronization method according to the embodiments of the present application can be applied to an application scene of synchronizing blocks stored in VPs of a blockchain system to each NVP in an NVP cluster.

例えば、コンソーシアムブロックチェーンのシナリオでは、コンソーシアムブロックチェーンは、複数の県機関のノードと、いくつかの県機関に属する都市単位のノードとを含む。複数の県機関のノード(すなわち、VP)は、ブロックコンセンサスプロセスに参加することができ、1つの県機関に属する都市単位のノード(すなわち、NVP)は、ブロックコンセンサスプロセスに参加する必要がない。 For example, in a consortium blockchain scenario, the consortium blockchain includes nodes of multiple prefecture agencies and city-based nodes belonging to several prefecture agencies. Nodes of multiple prefectural institutions (i.e., VPs) can participate in the block consensus process, and city-level nodes (i.e., NVPs) belonging to one prefectural institution do not need to participate in the block consensus process.

図1は、本願の実施例によるブロックチェーンシステムの概略構造図である。 FIG. 1 is a schematic structural diagram of a blockchain system according to an embodiment of the present application.

図1を参照すると、ブロックチェーンシステム100は、ノードとノードとの間のデータ共有を実行するためのシステムであり、ブロックチェーンシステム100は、複数のVP101およびm個のNVPクラスタ102を含み、m個のNVPクラスタ102のそれぞれは、複数のNVP103を含み、mは正の整数である。 Referring to FIG. 1, the blockchain system 100 is a system for performing data sharing between nodes, and includes a plurality of VPs 101 and m NVP clusters 102, and m Each of the NVP clusters 102 includes a plurality of NVPs 103, and m is a positive integer.

複数のVP101は、ブロックチェーンシステムにおいてブロックコンセンサスプロセスに参加する必要があるノードである。m個のNVPクラスタ102のそれぞれにおけるそれぞれのNVP103は、ブロックコンセンサスプロセスに参加する必要がないノードである。 Multiple VPs 101 are nodes that need to participate in the block consensus process in the blockchain system. Each NVP 103 in each of the m NVP clusters 102 is a node that does not need to participate in the block consensus process.

複数のVP101は、正常動作時に入力情報を受信し、受信した入力情報に基づいてブロックチェーンシステム100内の共有データをメンテナンスすることができる。複数のVP101の間に情報接続が存在してもよく、複数のVP101の間に当該情報接続を介して情報伝送を行ってもよい。例えば、ブロックチェーンシステム100における何れか1つのVP101がクライアントから送信された入力情報を受信した場合、ブロックチェーンシステム100における他のVP101は、コンセンサスアルゴリズムに基づいて当該入力情報を取得し、当該入力情報を共有データにおけるデータとして記憶する。 The plurality of VPs 101 can receive input information during normal operation and maintain shared data within the blockchain system 100 based on the received input information. Information connections may exist between the plurality of VPs 101, and information may be transmitted between the plurality of VPs 101 via the information connections. For example, when any one VP 101 in the blockchain system 100 receives input information sent from a client, the other VP 101 in the blockchain system 100 acquires the input information based on a consensus algorithm, and is stored as data in the shared data.

加えて、複数のVP101のうちのm個のVP101は、m個のNVPクラスタ102と1対1に対応し、m個のVP101のうちの何れか1つのVP101について、このVP101は、m個のNVPクラスタ102のうちの対応するNVPクラスタ102と通信することができる。ブロックチェーンシステム100における複数のVP101は、該入力情報を共有データにおけるデータとして記憶した後、対応するNVPクラスタ102と通信してもよく、即ち、対応するNVPクラスタ102に該入力情報を送信して、対応するNVPクラスタ102における複数のNVP103が該入力情報を共有データにおけるデータとして記憶するようにする。 In addition, m VPs 101 among the plurality of VPs 101 have a one-to-one correspondence with m NVP clusters 102, and for any one VP 101 among the m VPs 101, this VP 101 has a one-to-one correspondence with m NVP clusters 102. A corresponding one of the NVP clusters 102 can be communicated with. The plurality of VPs 101 in the blockchain system 100 may communicate with the corresponding NVP cluster 102 after storing the input information as data in the shared data, i.e., send the input information to the corresponding NVP cluster 102. , a plurality of NVPs 103 in the corresponding NVP cluster 102 store the input information as data in shared data.

ここで、ブロックチェーンシステム100におけるVP101は、対応するNVPクラスタ102における1つのNVP103と通信し、即ち、ブロックチェーンシステム100におけるVP101は、対応するNVPクラスタ102における1つのNVP103のみにメッセージを送信することにより、ブロックチェーンシステム100における複数のVP101の負荷を軽減し、ブロックチェーンシステム100における複数のVP101の性能を向上させることができる。 Here, the VP 101 in the blockchain system 100 communicates with one NVP 103 in the corresponding NVP cluster 102, that is, the VP 101 in the blockchain system 100 sends a message only to one NVP 103 in the corresponding NVP cluster 102. Accordingly, the load on the multiple VPs 101 in the blockchain system 100 can be reduced, and the performance of the multiple VPs 101 in the blockchain system 100 can be improved.

ブロックチェーンシステム100内の各ノードに記憶された共有データの整合性を保証するために、各NVPクラスタ102内の複数のNVP103は、対応するVP101に記憶された該入力データを同期する必要がある。 To ensure the integrity of the shared data stored on each node in the blockchain system 100, the multiple NVPs 103 in each NVP cluster 102 need to synchronize the input data stored in the corresponding VP 101. .

各NVPクラスタ102内の複数のNVP103は、第1のNVP103および少なくとも1つの第2のNVP103を含み、第1のNVP103は、位置するNVPクラスタ102内の対応するVP101と通信するNVP103であり、すなわち、ブロックチェーンシステム100内の1つのVP101は、対応するNVPクラスタ102内の第1のNVP103に該入力情報を送信する。各NVPクラスタ102に新たなNVP103を任意に追加することができ、これは、ブロックチェーンシステム100内のVP101が対応するNVPクラスタ102にメッセージを送信する機能に影響を与えないため、ブロックチェーンシステム100内の各NVPクラスタ102の拡張性は比較的高い。 The plurality of NVPs 103 in each NVP cluster 102 include a first NVP 103 and at least one second NVP 103, where the first NVP 103 is an NVP 103 that communicates with a corresponding VP 101 in the NVP cluster 102 in which it is located, i.e. , one VP 101 in the blockchain system 100 sends the input information to the first NVP 103 in the corresponding NVP cluster 102. A new NVP 103 can be added to each NVP cluster 102 arbitrarily, and this does not affect the ability of a VP 101 within the blockchain system 100 to send messages to the corresponding NVP cluster 102. The scalability of each NVP cluster 102 within is relatively high.

加えて、第1のNVP103と少なくとも1つの第2のNVP103のそれぞれとの間にネットワーク経路が存在する。ネットワーク経路は、複数のNVP103の間のデータ伝送チャネルを示すために使用され、第1のNVP103は、このネットワーク経路を介して少なくとも1つの第2のNVP103にデータを伝送し得る。2つのNVP103の間のネットワーク経路に複数のNVP103が存在する可能性があり、この場合、2つのNVP103は間接通信を行うことができる。2つのNVP103の間のネットワーク経路に他のNVP103が存在しなくてもよく、即ち、2つのNVP103が直接通信を行うことができ、即ち、この2つのNVP103が隣接するNVP103である。 Additionally, a network path exists between each of the first NVP 103 and at least one second NVP 103. A network path is used to indicate a data transmission channel between multiple NVPs 103, through which a first NVP 103 may transmit data to at least one second NVP 103. There is a possibility that multiple NVPs 103 exist on the network path between two NVPs 103, and in this case, the two NVPs 103 can perform indirect communication. There may be no other NVP 103 in the network path between the two NVPs 103, ie, the two NVPs 103 can communicate directly, ie, the two NVPs 103 are adjacent NVPs 103.

複数のNVP103のうちの第1のNVP103が当該入力情報を受信した後、ネットワーク経路を介して当該入力情報に対して情報伝送を行うことにより、複数のNVP103のうちの他の第2のNVP103も当該入力情報を受信する。このようにして、複数のNVP103のそれぞれは、ブロックチェーンシステム100内のすべてのノードに記憶されたデータが一致するように、何れも共有データ内のデータとして当該入力情報を記憶する。すなわち、ブロックチェーンシステム100内の各ノードは、同じブロックチェーンを記憶する。 After the first NVP 103 among the plurality of NVPs 103 receives the input information, the other second NVP 103 among the plurality of NVPs 103 also transmits the input information via the network path. Receive the input information. In this way, each of the plurality of NVPs 103 stores the input information as data in the shared data so that the data stored in all nodes in the blockchain system 100 match. That is, each node within blockchain system 100 stores the same blockchain.

ブロックチェーンシステム100は、分散データ記憶、ポイントツーポイント伝送、コンセンサスメカニズム、暗号化アルゴリズムなどのコンピュータ技術を有する。ブロックチェーンシステム100は、分散型の共有台帳及びデータベースであり、脱中心化、改ざん不可能、全過程の保留、追跡可能、集団維持、公開透明などの特徴を有する。これらの特徴は、ブロックチェーンの共有開放、実際の完全性及び安全信頼性を保証する。 Blockchain system 100 includes computer technologies such as distributed data storage, point-to-point transmission, consensus mechanisms, and encryption algorithms. The blockchain system 100 is a distributed shared ledger and database, and has characteristics such as decentralization, tamperability, suspension of the entire process, traceability, collective maintenance, and public transparency. These features ensure the blockchain's shared openness, real integrity and security reliability.

ブロックチェーンシステム100内の複数のVP101およびm個のNVPクラスタ102は、以下の図2の実施例において説明されるブロック同期方法を実行して、ブロックチェーンシステム100のVP101に記憶されたブロック(すなわち、上記で説明された共有データ)をNVPクラスタ102内の各NVP103に同期させることを実現できる。 The plurality of VPs 101 and m NVP clusters 102 in the blockchain system 100 execute the block synchronization method described in the example of FIG. , shared data described above) to each NVP 103 in the NVP cluster 102.

図2は、本願の実施例によるブロック同期方法のフローチャートである。この方法は、ブロックチェーンシステムに適用され得る。図2を参照すると、この方法は以下のステップを含む。 FIG. 2 is a flowchart of a block synchronization method according to an embodiment of the present application. This method can be applied to blockchain systems. Referring to FIG. 2, the method includes the following steps.

ステップ201:複数のVPが一つのブロックに対するコンセンサスを完了し、このブロックをブロックチェーンに追加した後、この複数のVPのうちのm個のVPのそれぞれは、対応するNVPクラスタ内の第1のNVPに、このブロックを搬送する第1のメッセージを送信する。 Step 201: After the multiple VPs complete the consensus for one block and add this block to the blockchain, each of the m VPs of this multiple VP Send a first message carrying this block to the NVP.

第1のNVPは、同じNVPクラスタ内の対応するVPと通信するNVPであり、第1のNVPは、同じNVPクラスタ内に1つのみ存在し、すなわち、この複数のVPのうちのm個のVPのそれぞれは、対応するNVPクラスタ内の1つのNVPに、このブロックを搬送する第1のメッセージを送信する。 The first NVP is the NVP that communicates with the corresponding VP in the same NVP cluster, and the first NVP exists only once in the same NVP cluster, i.e. Each of the VPs sends a first message carrying this block to one NVP in the corresponding NVP cluster.

第1のメッセージはこのブロックを搬送し、第1のメッセージは、第1のメッセージによって搬送されるブロックを記憶するように、第1のメッセージを受信したNVPに命令するために使用される。好ましくは、第1のメッセージはGOSSIP(感染症プロトコル)メッセージであってもよく、もちろん、第1のメッセージは他のタイプのメッセージであってもよく、本願の実施例はこれを限定しない。 The first message carries this block, and the first message is used to instruct the NVP that received the first message to store the block carried by the first message. Preferably, the first message may be a GOSSIP (Infectious Disease Protocol) message; of course, the first message may be other types of messages, and the embodiments herein do not limit this.

本願の実施例によるブロックチェーンシステム内のm個のNVPクラスタのそれぞれにおける各NVPは、ブロックのコンセンサスプロセスに参加する必要がないので、m個のVPのそれぞれは、対応するNVPクラスタがこのブロックを取得して記憶するように、対応するNVPクラスタにこのブロックを搬送する第1のメッセージを送信することができ、それにより、ブロックチェーンシステム内の各ノードに記憶されたブロックチェーンの整合性が保証される。 Since each NVP in each of the m NVP clusters in the blockchain system according to embodiments of the present application does not need to participate in the consensus process of a block, each of the m VPs does not need to participate in the consensus process of the block. A first message can be sent conveying this block to the corresponding NVP cluster to retrieve and store, thereby ensuring the integrity of the blockchain stored on each node in the blockchain system. be done.

この場合、このm個のVPのそれぞれに対応するNVPクラスタ内の第1のNVPは、このブロックを搬送する第1のメッセージを受信することができ、対応するNVPクラスタ内の第1のNVPは、このブロックを記憶することができる。さらに、m個のVPのそれぞれは、対応するNVPクラスタ内の第1のNVPに第1のメッセージを送信するだけでよく、対応するNVPクラスタ内の各NVPに第1のメッセージを送信する必要はない。これにより、各VPの負荷が軽減される。 In this case, the first NVP in the NVP cluster corresponding to each of this m VPs can receive the first message carrying this block, and the first NVP in the corresponding NVP cluster , this block can be stored. Furthermore, each of the m VPs only needs to send the first message to the first NVP in the corresponding NVP cluster, and does not need to send the first message to each NVP in the corresponding NVP cluster. do not have. This reduces the load on each VP.

なお、このm個のVPのそれぞれが、ブロックを搬送する第1のメッセージを、対応するNVPクラスタ内の第1のNVPに送信する前に、このm個のNVPクラスタ内の何れか1つのNVPクラスタは、プライマリNVPをさらに選択し得る。 Note that before each of these m VPs sends the first message carrying a block to the first NVP in the corresponding NVP cluster, The cluster may further select a primary NVP.

1つのNVPクラスタのプライマリNVPは、対応するVPと通信するために使用され、すなわち、プライマリNVPは第1のNVPであり、1つのNVPクラスタのうちのプライマリNVP以外の他のNVPはセカンダリNVPであり、一つのNVPクラスタのセカンダリNVPは第2のNVPである。すなわち、1つのNVPクラスタは、1つのプライマリNVPおよび少なくとも1つのセカンダリNVPを有する。 The primary NVP of one NVP cluster is used to communicate with the corresponding VP, i.e. the primary NVP is the first NVP, and other NVPs other than the primary NVP of one NVP cluster are the secondary NVPs. Yes, the secondary NVP of one NVP cluster is the second NVP. That is, one NVP cluster has one primary NVP and at least one secondary NVP.

さらに、このm個のNVPクラスタ内の何れか1つのNVPクラスタが1つのプライマリNVP(すなわち、第1のNVP)を選択した後、このNVPクラスタ内の第1のNVPは、対応するVPに第1の通知メッセージを送信し得る。 Further, after any one NVP cluster in the m NVP clusters selects one primary NVP (i.e., the first NVP), the first NVP in this NVP cluster is assigned the first NVP to the corresponding VP. 1 notification message may be sent.

第1の通知メッセージは、第1の通知メッセージを送信するNVPが位置するNVPクラスタのプライマリNVPに選出されたことを示すために使用される。この場合、第1の通知メッセージを送信するNVPは、位置するNVPクラスタ内の、対応するVPと通信するNVPであり、その後、対応するVPは、ブロックをブロックチェーンに追加した後、第1のメッセージを、このNVPクラスタ内の、プライマリNVPに選出されたNVP(すなわち、第1のNVP)に送信することができ、それにより、対応するVPが、第1のメッセージを、このNVPクラスタ内の第1のNVPのみに送信することができることを保証する。 The first notification message is used to indicate that the NVP sending the first notification message has been elected as the primary NVP of the NVP cluster in which it is located. In this case, the NVP that sends the first notification message is the NVP that communicates with the corresponding VP in the NVP cluster in which it is located, and then the corresponding VP, after adding the block to the blockchain, sends the first notification message. The message may be sent to the NVP in this NVP cluster that is elected as the primary NVP (i.e., the first NVP), such that the corresponding VP sends the first message to the Guarantees that it can only send to the first NVP.

好ましくは、このm個のNVPクラスタのうちの何れか1つのNVPクラスタは、動的選択方式で1つのプライマリNVPを選択し得る。 Preferably, any one NVP cluster among the m NVP clusters may select one primary NVP in a dynamic selection manner.

このように、このNVPクラスタで選択されたプライマリNVPがダウンした場合、1つのプライマリNVPが改めて選択されることにより、1つのNVPクラスタに対応するVPと通信する1つの第1のNVPが常に存在することを保証し、このNVPクラスタの活性を向上させる。
具体的には、このm個のNVPクラスタのうちの何れか1つのNVPクラスタが動的選択方式で1つのプライマリNVPを選択する操作は、以下のステップ(1)-ステップ(4)によって実現することができる。
In this way, if the primary NVP selected in this NVP cluster goes down, one primary NVP will be elected anew, so that there is always one first NVP communicating with the corresponding VP in one NVP cluster. This ensures that NVP clusters are more active.
Specifically, the operation in which any one NVP cluster among these m NVP clusters selects one primary NVP using a dynamic selection method is realized by the following steps (1) to (4). be able to.

(1)一つのNVPクラスタが全体的に起動した後、このNVPクラスタ内の少なくとも1つのNVPのそれぞれは、同じNVPクラスタ内の別のNVPに、自身のノード識別子を搬送する第2のメッセージをブロードキャストする。 (1) After one NVP cluster is activated globally, each of the at least one NVP in this NVP cluster sends a second message carrying its node identifier to another NVP in the same NVP cluster. Broadcast.

1つのNVPクラスタが全体的に起動することは、このNVPクラスタにおけるすべてのNVPのうちの各NVPが起動すること、すなわち、各NVPが動作状態に入り始めることを指す。 The entire activation of one NVP cluster refers to the activation of each NVP among all the NVPs in this NVP cluster, that is, each NVP begins to enter an operational state.

この少なくとも1つのNVPは、このNVPクラスタ全体が起動した後に、プライマリNVPとして要求されるこのNVPクラスタ内のNVPである。 The at least one NVP is the NVP within this NVP cluster that is claimed as the primary NVP after this entire NVP cluster is activated.

あるNVPのノード識別子は、このNVPを一意に識別するために使用され、例えば、あるNVPのノード識別子は、このNVPの番号、IP(Internet Protocol、インターネットプロトコル)アドレスなどであり得る。 A node identifier of an NVP is used to uniquely identify this NVP; for example, a node identifier of an NVP can be a number, an IP (Internet Protocol) address, etc. of this NVP.

第2のメッセージは、ノード識別子を搬送し、第2のメッセージは、第2のメッセージに搬送されるノード識別子によって識別されるNVPがプライマリNVPとして要求されることを示すために使用される。好ましくは、第2のメッセージはGOSSIPメッセージであってもよく、もちろん、第2のメッセージは他のタイプのメッセージであってもよく、本願の実施例はこれを限定しない。 The second message carries a node identifier, and the second message is used to indicate that the NVP identified by the node identifier carried in the second message is requested as the primary NVP. Preferably, the second message may be a GOSSIP message; of course, the second message may be other types of messages, and the embodiments herein do not limit this.

1つのNVPクラスタが全体的に起動した後、このNVPクラスタ内に第1のNVPが存在しない可能性があり、すなわち、対応するVPと通信するNVPがこのNVPクラスタ内に存在しない場合、対応するVPは、ブロックをブロックチェーンに追加した後、このブロックを搬送する第1のメッセージをこのNVPクラスタ内のどのNVPに送信するかを知らない。したがって、このNVPクラスタが全体的に起動した後、まず1つのプライマリNVPを選択する必要があり、つまり、このNVPクラスタ内の第1のNVPを取得する。この場合、NVPクラスタ内の各NVPは、プライマリNVPとして申請される権利を有するので、このNVPクラスタ内の何れか1つのNVPは、プライマリNVPとして申請されたい場合、このNVPクラスタ内のプライマリNVPとして申請するように、第2のメッセージをこのNVPクラスタにブロードキャストすることができる。 After one NVP cluster is brought up globally, there may be no first NVP in this NVP cluster, i.e. if there is no NVP in this NVP cluster that communicates with the corresponding VP, then the corresponding After a VP adds a block to the blockchain, it does not know which NVP in this NVP cluster to send the first message carrying this block. Therefore, after this NVP cluster is activated as a whole, one primary NVP needs to be selected first, that is, get the first NVP in this NVP cluster. In this case, each NVP in the NVP cluster has the right to be applied as the primary NVP, so if any one NVP in this NVP cluster wants to be applied as the primary NVP, it can be applied as the primary NVP in this NVP cluster. A second message can be broadcast to this NVP cluster to request.

(2)この少なくとも1つのNVPのうちのいずれか1つは、第2のメッセージがブロードキャストされた後の第1の所定時間に、他のNVPによってブロードキャストされた第2のメッセージを受信する。 (2) Any one of the at least one NVP receives the second message broadcast by the other NVP at a first predetermined time after the second message is broadcast.

第1の所定時間は、事前に設定されてもよく、第1の所定時間は、何れか1つのNVPが、他のNVPのうちのそれぞれによってブロードキャストされた、自身のノード識別子を搬送する第2のメッセージを受信できることを保証するように、大きく設定されてもよい。例えば、第1の所定時間は5分間に設定されてもよい。 The first predetermined time period may be preconfigured, and the first predetermined time period may be such that any one NVP carries a second node identifier broadcast by each of the other NVPs. may be set to a large value to ensure that messages can be received. For example, the first predetermined time may be set to 5 minutes.

この場合、この少なくとも1つのNVPのうちの何れか1つのNVPは、第2のメッセージをブロードキャストした後、別のNVPによってブロードキャストされた第2のメッセージを受信することができ、それによって、NVPクラスタ内のどのNVPがプライマリNVPとして申請されるかを知る。 In this case, any one of the at least one NVP may receive a second message broadcast by another NVP after broadcasting the second message, thereby causing the NVP cluster to Know which of the NVPs will be applied as the primary NVP.

(3)この少なくとも1つのNVPのうちの何れか1つのNVPは、自身のノード識別子を、第1の所定時間に受信された別のNVPによってブロードキャストされた第2のメッセージに搬送されるノード識別子と比較することにより、自身がプライマリNVPとして選択されたかどうかを決定し得る。 (3) any one of the at least one NVPs transmits its node identifier in a second message broadcast by another NVP received at the first predetermined time; can determine whether it has been selected as the primary NVP.

具体的には、この少なくとも1つのNVPのうちの何れか1つは、所定選択条件に従って、自身のノード識別子を、第1の所定時間内に受信された他のNVPにブロードキャストされた第2のメッセージによって搬送されたノード識別子と比較することにより、自身がプライマリNVPに選出されたかどうかを決定し得る。 Specifically, any one of the at least one NVP transmits its node identifier to a second NVP broadcast to other NVPs received within a first predetermined time period according to a predetermined selection condition. By comparing with the node identifier carried by the message, it may determine whether it has been elected as the primary NVP.

所定選択条件は、プライマリNVPに当選できるか否かを判断する条件である。所定選択条件は、予め設定されてもよく、かつ、所定選択条件は、技術者が使用ニーズに応じて設定することができる。例えば、所定選択条件は、NVPクラスタにおけるノード識別子が最小であるNVPによってプライマリNVPに選出されることであってもよい。別の例では、所定選択条件は、NVPクラスタにおけるノード識別子が最大であるNVPによってプライマリNVPに選出されることであってよい。もちろん、所定選択条件は、プライマリNVPに選出できるか否かを判断する他の条件として設定されてもよく、本願の実施例はこれを限定しない。 The predetermined selection condition is a condition for determining whether or not it is possible to win the primary NVP. The predetermined selection conditions may be set in advance, and the predetermined selection conditions can be set by an engineer according to usage needs. For example, the predetermined selection condition may be that the NVP with the smallest node identifier in the NVP cluster is selected as the primary NVP. In another example, the predetermined selection condition may be that the NVP with the highest node identifier in the NVP cluster is elected as the primary NVP. Of course, the predetermined selection condition may be set as another condition for determining whether or not a candidate can be selected as the primary NVP, and the embodiments of the present application are not limited thereto.

例えば、所定選択条件は、NVPクラスタにおけるノード識別子が最小であるNVPによってプライマリNVPに選出されることである。1つのNVPのノード識別子は04であり、このNVPは、第1の所定時間に3つのNVPによってブロードキャストされた第2のメッセージを受信し、この3つのNVPのうちの第1のNVPによってブロードキャストされた第2のメッセージで搬送されるノード識別子は05であり、この3つのNVPのうちの第2のNVPによってブロードキャストされた第2のメッセージで搬送されるノード識別子は06であり、この3つのNVPのうちの第3のNVPによってブロードキャストされた第2のメッセージで搬送されるノード識別子は07である。その後、このNVPは、自身のノード識別子(04)と、受信したこの3つのNVPによってブロードキャストされた第2のメッセージに含まれるノード識別子(05、06、07)とを比較し、自身のノード識別子が所定選択条件を満たすか否かを判断する。自身のノード識別子が、この3つのNVPによってブロードキャストされる第2のメッセージで搬送されるノード識別子の何れかよりも小さいので、このNVPは、自身がプライマリNVPに選出できると決定する。 For example, the predetermined selection condition is that the NVP with the smallest node identifier in the NVP cluster be selected as the primary NVP. The node identifier of one NVP is 04, and this NVP receives the second message broadcast by the three NVPs at the first predetermined time, and the node identifier of one NVP is 04. The node identifier carried in the second message broadcast by the second of these three NVPs is 05, and the node identifier carried in the second message broadcast by the second of these three NVPs is 06, and the node identifier carried in the second message broadcast by the second of these three NVPs is 06. The node identifier carried in the second message broadcast by the third NVP is 07. This NVP then compares its own node identifier (04) with the node identifiers (05, 06, 07) contained in the second message broadcast by this three NVPs that it received and It is determined whether or not satisfies a predetermined selection condition. Since its node identifier is smaller than any of the node identifiers carried in the second message broadcast by the three NVPs, this NVP decides that it can be elected as the primary NVP.

(4)この少なくとも1つのNVPのうちの何れか1つが、自身がプライマリNVPに選出されたと決定した場合、第2の通知メッセージは、第2の所定時間ごとに同じNVPクラスタ内の他のNVPに送信され、自身がプライマリNVPに選出できないと決定した場合、プライマリNVPとして申請する動作が終了する。 (4) If any one of the at least one NVP determines that it has been elected as the primary NVP, the second notification message is sent to other NVPs in the same NVP cluster every second predetermined time. If it is determined that the applicant cannot be selected as the primary NVP, the process of applying as the primary NVP ends.

第2の所定時間は、事前に設定されてもよく、第2の所定時間は、第2の通知メッセージを同じNVPクラスタ内の他のNVPに連続的に送信することができることを保証するように、より小さく設定されてもよく、それにより、同じNVPクラスタ内の他のNVPは、NVPクラスタ内のプライマリNVPがどのNVPであるかを常に知る。 The second predetermined time may be preconfigured, the second predetermined time being such as to ensure that the second notification message can be sent successively to other NVPs in the same NVP cluster. , may be set smaller so that other NVPs in the same NVP cluster always know which NVP is the primary NVP in the NVP cluster.

第2の通知メッセージは、第2の通知メッセージを送信するNVPが、位置するNVPクラスタのプライマリNVPに選出されたことを示すために使用され、第2の通知メッセージを受信するNVPが、位置するNVPクラスタのセカンダリNVPであることを示すために使用される。
この場合、この少なくとも1つのNVPのうちの何れか1つは、自身がプライマリNVPに選出されたと決定した場合、自身がプライマリNVPに選出されたことを同じNVPクラスタ内の別のNVPに通知するように、第2の通知メッセージを同じNVPクラスタ内の別のNVPに送信し、この時、同じNVPクラスタ内の別のNVPはセカンダリNVPである。自身がプライマリNVPに選出できないと決定した場合、プライマリNVPとして申請する操作を終了し、即ち、第2のメッセージをブロードキャストせず、今回のプライマリNVPの選択をログアウトする。このように、1つのNVPクラスタ全体が起動された後、このNVPクラスタのプライマリNVPが初めて選択される。
The second notification message is used to indicate that the NVP sending the second notification message has been elected as the primary NVP of the NVP cluster in which it is located, and the NVP receiving the second notification message is Used to indicate that it is a secondary NVP in an NVP cluster.
In this case, if any one of the at least one NVP determines that it has been elected as the primary NVP, it notifies another NVP in the same NVP cluster that it has been elected as the primary NVP. , a second notification message is sent to another NVP in the same NVP cluster, where the other NVP in the same NVP cluster is a secondary NVP. If it is determined that it cannot be selected as the primary NVP, it ends the operation of applying as the primary NVP, that is, it does not broadcast the second message and logs out of the current selection of the primary NVP. In this way, after one whole NVP cluster is activated, the primary NVP of this NVP cluster is selected for the first time.

好ましくは、第2の通知メッセージは、自身(すなわち、プライマリNVP)のノード識別子を搬送し得る。この場合、このNVPクラスタ内の何れか1つのセカンダリNVPが第2の通知メッセージを受信した場合、自身のノード識別子と第2の通知メッセージによって搬送されるノード識別子とを比較して、第2の通知メッセージによって搬送されるノード識別子によって識別されるNVPがプライマリNVPに選出し続けることができるかどうかを決定し、このセカンダリNVPが第2の通知メッセージによって搬送されるノード識別子によって識別されるNVPがプライマリNVPに選出し続けることができないと決定した場合、現在のプライマリNVP(すなわち、第2の通知メッセージを送信するNVP)に、自身のノード識別子を搬送する要求メッセージを送信し、現在のプライマリNVPがこのセカンダリNVPによって送信される要求メッセージを受信した後、自身のノード識別子と要求メッセージによって搬送されるノード識別子とを比較して、自身がプライマリNVPに選出し続けることができるかどうかを決定し、現在のプライマリNVPは、自身がプライマリNVPに選出し続けることができないと決定した場合、このセカンダリNVPに決定メッセージを送信し、このセカンダリNVPが決定メッセージを受信した後、自身がプライマリNVPに選出されると決定した場合、このNVPクラスタ内の別のNVPに第2の通知メッセージをブロードキャストする。 Preferably, the second notification message may carry its own (ie, primary NVP) node identifier. In this case, if any one secondary NVP in this NVP cluster receives the second notification message, it compares its node identifier with the node identifier carried by the second notification message and Determine whether the NVP identified by the node identifier carried by the notification message can continue to be elected as the primary NVP, and if this secondary NVP is the NVP identified by the node identifier carried by the second notification message. If it determines that it cannot continue to be elected as the primary NVP, it sends a request message carrying its own node identifier to the current primary NVP (i.e., the NVP sending the second notification message) and elects the current primary NVP After receiving the request message sent by this secondary NVP, it compares its node identifier with the node identifier carried by the request message to determine whether it can continue to be elected as the primary NVP. , if the current primary NVP decides that it cannot continue to be elected as the primary NVP, it sends a decision message to this secondary NVP, and after this secondary NVP receives the decision message, it elects itself as the primary NVP. If so, broadcast a second notification message to other NVPs in this NVP cluster.

この要求メッセージは、要求メッセージを送信するセカンダリNVPがプライマリNVPとして申請することを指示するために用いられる。要求メッセージにおいて、要求メッセージを送信するセカンダリNVPのノード識別子が搬送される。 This request message is used to instruct the secondary NVP sending the request message to apply as the primary NVP. In the request message, the node identifier of the secondary NVP sending the request message is carried.

この決定メッセージは、現在のプライマリNVPが、自身がプライマリNVPに選出し続けることができないと決定することを指示し、且つ要求メッセージを送信するセカンダリNVPがプライマリNVPに選出されることができることを指示する。 This decision message indicates that the current primary NVP has decided that it cannot continue to be elected as the primary NVP, and that the secondary NVP sending the request message can be elected as the primary NVP. do.

一つのセカンダリNVPが第2の通知メッセージを受信した後、自身のノード識別子と第2の通知メッセージで搬送されるノード識別子とを比較するとき、第2の通知メッセージで搬送されるノード識別子によって識別されるNVPがプライマリNVPに選出し続けることができるかどうかを決定するように、所定選択条件に従って、自身のノード識別子と第2の通知メッセージで搬送されるノード識別子とを比較することができる。具体的には、このセカンダリNVPが、自身のノード識別子と第2の通知メッセージにおいて搬送されるノード識別子とを比較した後、第2の通知メッセージにおいて搬送されるノード識別子が所定選択条件を満たさないと決定された場合、第2の通知メッセージにおいて搬送されるノード識別子によって識別されるNVPは、プライマリNVPに選出し続けることができないと決定され得り、このセカンダリNVPのノード識別子が所定選択条件を満たさないと決定された場合、第2の通知メッセージにおいて搬送されるノード識別子によって識別されるNVPは、プライマリNVPに選出し続けることができると決定され得る。 After one secondary NVP receives the second notification message, when it compares its own node identifier with the node identifier carried in the second notification message, the node identifier carried in the second notification message identifies may compare its own node identifier with the node identifier conveyed in the second notification message according to predetermined selection conditions to determine whether the NVP to be elected can continue to be elected as the primary NVP. Specifically, after this secondary NVP compares its own node identifier with the node identifier carried in the second notification message, the node identifier carried in the second notification message does not satisfy the predetermined selection condition. If it is determined that the NVP identified by the node identifier carried in the second notification message cannot continue to be elected as the primary NVP, the node identifier of this secondary NVP satisfies the predetermined selection condition. If it is determined not to, it may be determined that the NVP identified by the node identifier carried in the second notification message can continue to be elected as the primary NVP.

同様に、現在のプライマリNVPは、このセカンダリNVPから送信された要求メッセージを受信した後、所定選択条件に基づいて、自身のノード識別子と要求メッセージで搬送されるノード識別子とを比較して、自身がプライマリNVPに選出し続けることができるか否かを決定してもよい。具体的には、現在のプライマリNVPは、自身のノード識別子と要求メッセージに含まれるノード識別子とを比較した後、要求メッセージで搬送されるノード識別子が所定選択条件を満たさないと決定した場合、自身がプライマリNVPに選出し続けることができると決定することができ、自身のノード識別子が所定選択条件を満たさないと決定した場合、自身がプライマリNVPに選出し続けることができないと決定することができる。 Similarly, after receiving the request message sent from this secondary NVP, the current primary NVP compares its own node identifier with the node identifier carried in the request message based on predetermined selection conditions and may continue to be elected as the primary NVP. Specifically, if the current primary NVP compares its own node identifier with the node identifier included in the request message and determines that the node identifier carried in the request message does not satisfy the predetermined selection condition, then can decide that it can continue to be elected as the primary NVP, and if it determines that its own node identifier does not satisfy the predetermined selection conditions, it can decide that it cannot continue to be elected as the primary NVP. .

この場合、このNVPクラスタは、所定選択条件により合致するプライマリNVPを選択することができ、即ち、プライマリNVPに選出する資格をより有するNVPを選択することができる。 In this case, this NVP cluster can select a primary NVP that meets the predetermined selection conditions, that is, can select an NVP that is more qualified to be elected as the primary NVP.

例えば、第2の通知メッセージで搬送されるノード識別子は03であり、一つのセカンダリNVPのノード識別子は02である。NVPクラスタ内の1つのセカンダリNVPが第2の通知メッセージを受信した後、自身のノード識別子(02)と第2の通知メッセージ内で搬送されるノード識別子(03)とを比較し、第2の通知メッセージで搬送されるノード識別子(03)によって識別されるNVP(すなわち、現在のプライマリNVP)がプライマリNVPに選出し続けることができないと決定した場合、このNVPは、自身のノード識別子(02)を搬送する要求メッセージを現在のプライマリNVPに送信する。現在のプライマリNVPは、該要求メッセージを受信した後、自身のノード識別子(03)と該要求メッセージで搬送されるノード識別子(02)とを比較し、自身がプライマリNVPに選出し続けることができないと決定する。その後、現在のプライマリNVPはこのNVPに決定メッセージを送信して、自身がプライマリNVPに選出し続けることができないと決定する。このNVPが当該決定メッセージを受信した後、自身がプライマリNVPに選出したと決定すると、当該NVPクラスタにおける他のNVPに第2の通知メッセージをブロードキャストして、当該NVPクラスタにおける他のNVPに自身がプライマリNVPに選出したことを通知する。 For example, the node identifier carried in the second notification message is 03, and the node identifier of one secondary NVP is 02. After one secondary NVP in the NVP cluster receives the second notification message, it compares its own node identifier (02) with the node identifier (03) carried in the second notification message and If the NVP identified by the node identifier (03) carried in the notification message (i.e., the current primary NVP) determines that it cannot continue to be elected primary NVP, then this NVP Send a request message carrying the current primary NVP. After receiving the request message, the current primary NVP compares its own node identifier (03) with the node identifier (02) carried in the request message and cannot continue to elect itself as the primary NVP. I decide. The current primary NVP then sends a decision message to this NVP to determine that it cannot continue to be elected as the primary NVP. After this NVP receives the decision message and determines that it has been elected as the primary NVP, it broadcasts a second notification message to the other NVPs in the NVP cluster and announces itself to the other NVPs in the NVP cluster. Notify that you have been elected as the primary NVP.

なお、1つのNVPクラスタにおけるプライマリNVPがダウン状態である場合、このNVPクラスタは、新たなプライマリNVPを再選択する必要がある。 Note that if the primary NVP in one NVP cluster is in a down state, this NVP cluster needs to reselect a new primary NVP.

このNVPクラスタのプライマリNVPがダウン状態である場合、プライマリNVPは対応するVPと通信することができず、即ち、位置するNVPクラスタは対応するVPと通信することができず、プライマリNVPは位置するNVPクラスタにおける他のNVPと通信することができない。したがって、このNVPクラスタは、このNVPクラスタと対応するVPとの間の通信接続を維持するように、新たなプライマリNVPを再選択する必要があり、すなわち、このNVPクラスタは、対応するVPによって送信されたメッセージを受信することを保証し、NVPクラスタ内のプライマリNVPとセカンダリNVPとの間の通信接続を保証する。 If the primary NVP of this NVP cluster is down, the primary NVP cannot communicate with the corresponding VP, i.e. the located NVP cluster cannot communicate with the corresponding VP, and the primary NVP is located Unable to communicate with other NVPs in the NVP cluster. Therefore, this NVP cluster needs to reselect a new primary NVP so as to maintain the communication connection between this NVP cluster and the corresponding VP, i.e., this NVP cluster must the communication connection between the primary and secondary NVPs within the NVP cluster.

具体的には、1つのNVPクラスタにおけるメインNVPがダウン状態である場合、このNVPクラスタが新たなメインNVPを再選択する操作は、以下のステップ(1)~(5)によって実現することができる。 Specifically, when the main NVP in one NVP cluster is down, the operation for this NVP cluster to reselect a new main NVP can be achieved by the following steps (1) to (5). .

(1)このNVPクラスタ内の何れか1つのセカンダリNVPは、第3の所定時間に第2の通知メッセージが受信されない場合、第2のメッセージを同じNVPクラスタ内の別のNVPにブロードキャストする。 (1) Any one secondary NVP in this NVP cluster broadcasts a second message to another NVP in the same NVP cluster if the second notification message is not received in a third predetermined time.

第3の所定時間は予め設定されてもよく、第3の所定時間は第2の所定時間以上であり、それにより、このセカンダリNVPが、NVPクラスタのプライマリNVPによって送信された第2の通知メッセージを受信するのに十分な時間を有する。 The third predetermined time period may be preconfigured, and the third predetermined time period is greater than or equal to the second predetermined time period, whereby this secondary NVP receives the second notification message sent by the primary NVP of the NVP cluster. have enough time to receive the item.

この場合、このセカンダリNVPが第3の所定時間に第2の通知メッセージを受信しなかった場合、それは、このNVPクラスタのプライマリNVPが第2の所定時間に第2の通知メッセージを送信しなかったことを示し、これにより、位置するNVPクラスタのプライマリNVPがダウン状態である可能性が高いと決定することができる。このNVPクラスタと対応するVPとの間の通信接続を維持するために、このセカンダリNVPは、このNVPクラスタのプライマリNVPとして申請するように、同じNVPクラスタ内の別のNVPに第2のメッセージをブロードキャストすることができる。 In this case, if this secondary NVP did not receive the second notification message in the third predetermined time, it means that the primary NVP of this NVP cluster did not send the second notification message in the second predetermined time. This indicates that the primary NVP of the NVP cluster in which it is located is likely to be down. In order to maintain communication connectivity between this NVP cluster and its corresponding VP, this secondary NVP sends a second message to another NVP in the same NVP cluster to apply as the primary NVP for this NVP cluster. Can be broadcast.

(2)このNVPクラスタ内の何れか1つのNVPが、このセカンダリNVPによってブロードキャストされた第2のメッセージを受信した場合、自身のノード識別子と、このセカンダリNVPによってブロードキャストされた第2のメッセージで搬送されたノード識別子とを比較した後、このセカンダリNVPがプライマリNVPに選出できないと決定したとき、同じNVPクラスタ内の別のNVPに第2のメッセージをブロードキャストする。 (2) If any one NVP in this NVP cluster receives a second message broadcast by this secondary NVP, it carries its own node identifier and the second message broadcast by this secondary NVP. When it is determined that this secondary NVP cannot be elected as the primary NVP after comparing the node identifiers that have been assigned, it broadcasts a second message to another NVP in the same NVP cluster.

一つのNVPは、このセカンダリNVPによってブロードキャストされた第2のメッセージを受信した後、所定選択条件に従って、自身のノード識別子と第2のメッセージで搬送されたノード識別子とを比較して、自身或いはこのセカンダリNVPがプライマリNVPに選出できないと決定することができる。具体的には、一つのNVPは、自身のノード識別子と第2のメッセージで搬送されたノード識別子とを比較した後、第2のメッセージで搬送されたノード識別子が所定選択条件を満たさないと決定された場合、このセカンダリNVPがプライマリNVPに選出できないと決定することができ、自身のノード識別子が所定選択条件を満たさないと決定された場合、自身がプライマリNVPに選出できないと決定することができる。 After receiving the second message broadcast by this secondary NVP, one NVP compares its own node identifier with the node identifier carried in the second message according to predetermined selection conditions, It may be determined that the secondary NVP cannot be elected as the primary NVP. Specifically, one NVP compares its own node identifier with the node identifier carried in the second message, and then determines that the node identifier carried in the second message does not satisfy the predetermined selection condition. If it is determined that this secondary NVP cannot be elected as the primary NVP, and if it is determined that its own node identifier does not satisfy the predetermined selection conditions, it can be determined that this secondary NVP cannot be elected as the primary NVP. .

このセカンダリNVPが第2のメッセージをブロードキャストした後、このNVPクラスタ内の他のNVPのうちの何れか1つは、このNVPによってブロードキャストされた第2のメッセージを受信する。その後、このNVPは、所定選択条件に従って、自身のノード識別子と、このセカンダリNVPによってブロードキャストされた第2のメッセージに含まれるノード識別子とを比較して、自身或いはこのセカンダリNVPがプライマリNVPに選出できないと決定することができる。このセカンダリNVPがプライマリNVPに選出できないと決定した場合、このNVPは、同じNVPクラスタ内の他のNVPに第2のメッセージをブロードキャストして、自身がプライマリNVPとして申請することができる。自身がプライマリNVPに選出できないと決定した場合、このNVPは第2のメッセージをブロードキャストする操作を終了することができ、即ち、このNVPクラスタにおける新しいプライマリNVPの選択をログアウトする。 After this secondary NVP broadcasts the second message, any one of the other NVPs in this NVP cluster receives the second message broadcasted by this NVP. This NVP then compares its own node identifier with the node identifier included in the second message broadcast by this secondary NVP according to predetermined selection conditions, and determines whether it or this secondary NVP cannot be elected as the primary NVP. can be determined. If this secondary NVP determines that it cannot be elected as the primary NVP, it may broadcast a second message to other NVPs in the same NVP cluster to apply itself as the primary NVP. If it determines that it cannot be elected as the primary NVP, this NVP may terminate the operation of broadcasting the second message, ie log out the election of a new primary NVP in this NVP cluster.

(3)このNVPクラスタ内の何れか1つのNVPは、第2のメッセージが最新にブロードキャストされた後の第1の所定時間に、他のNVPによってブロードキャストされた第2のメッセージを受信する。 (3) Any one NVP in this NVP cluster receives the second message broadcast by another NVP at a first predetermined time after the second message was most recently broadcast.

このNVPクラスタ内の何れか1つのNVPは、第2のメッセージが最新にブロードキャストされた後、他のNVPによってブロードキャストされた第2のメッセージを受信して、このNVPクラスタ内のどのNVPがプライマリNVPとして申請したかを知ることができる。 Any one NVP in this NVP cluster receives the second message broadcast by the other NVP after the second message was most recently broadcast, and determines which NVP in this NVP cluster is the primary NVP. You can find out if you have applied as a.

(4)このNVPクラスタにおける何れか1つのNVPは、自身のノード識別子と、第1の所定時間に受信された他のNVPによってブロードキャストされた第2のメッセージで搬送されたノード識別子とを比較して、自身がプライマリNVPに選出されたか否かを決定する。 (4) Any one NVP in this NVP cluster compares its own node identifier with the node identifier carried in the second message broadcast by the other NVPs received at the first predetermined time. to determine whether or not it has been elected as the primary NVP.

具体的には、ステップ(4)の動作は、上記の少なくとも1つのNVPのうちの何れか1つが、自身のノード識別子と、第1の所定時間に受信された別のNVPによってブロードキャストされた第2のメッセージで搬送されたノード識別子と、を比較して、自身がプライマリNVPに選出されたかどうかを決定する動作と同様であり、ここでは詳細な説明を省略する。 Specifically, the operation of step (4) is such that any one of the at least one NVP has its own node identifier and the second node identifier broadcasted by another NVP received at the first predetermined time. The operation is similar to the operation of comparing the node identifier carried in the message No. 2 and determining whether the node itself has been elected as the primary NVP, and detailed explanation will be omitted here.

(5)このNVPクラスタにおける何れか1つのNVPは、自身がプライマリNVPに選出したと確定した場合、第2の所定時間ごとに、同じNVPクラスタにおける他のNVPに第2の通知メッセージを送信する。 (5) If any one NVP in this NVP cluster determines that it has been elected as the primary NVP, it sends a second notification message to other NVPs in the same NVP cluster at second predetermined intervals. .

この場合、このNVPクラスタ内の何れか1つのNVPは、自身がプライマリNVPに選出したと決定した場合、第2の通知メッセージが同じNVPクラスタ内の他のNVPに送信され、同じNVPクラスタ内の他のNVPに対して自身が新しいプライマリNVPに選出したことを通知し、このとき、同じNVPクラスタ内の他のNVPはセカンダリNVPである。このように、1つのNVPクラスタにおけるプライマリNVPがダウンした場合、新たなプライマリNVPが選択される。 In this case, if any one NVP in this NVP cluster decides that it has been elected as the primary NVP, a second notification message is sent to the other NVPs in the same NVP cluster and It notifies other NVPs that it has been elected as the new primary NVP, and at this time, other NVPs in the same NVP cluster are secondary NVPs. In this way, if the primary NVP in one NVP cluster goes down, a new primary NVP is selected.

ステップ202:m個のNVPクラスタのそれぞれにおける各NVPは、第1のメッセージを受信した場合、第1のメッセージで搬送されるブロックをブロックチェーンに記憶し、第1のメッセージを同じNVPクラスタ内の隣接するNVPに送信する。 Step 202: Each NVP in each of the m NVP clusters, if it receives the first message, stores the block carried in the first message in the blockchain and stores the block carried in the first message in the same NVP cluster. Send to neighboring NVP.

各NVPは、第1のメッセージで搬送されるブロックをブロックチェーンに記憶し得る。 Each NVP may store the block conveyed in the first message on the blockchain.

m個のNVPクラスタのそれぞれにおける第1のNVPは、対応するVPによって送信された第1のメッセージを最初に受信し、第1のNVPは、第1のメッセージで搬送されたブロックを自身のブロックチェーンに記憶し、第1のメッセージを同じNVPクラスタにおける隣接するNVPに送信し得る。その後、同じNVPクラスタ内の第1のNVPに隣接するNVPのうちのいずれか1つは、第1のNVPによって送信された第1のメッセージを受信した後、第1のメッセージで搬送されたブロックを自身のブロックチェーンに記憶し、第1のメッセージを同じNVPクラスタ内の隣接するNVPに送信してもよい。同様にして、同じNVPクラスタ内の各NVPは、第1のメッセージで搬送されるそのブロックを自身のブロックチェーンに記憶し、第1のメッセージを同じNVPクラスタ内の隣接するNVPに送信する。 The first NVP in each of the m NVP clusters first receives the first message sent by the corresponding VP, and the first NVP transfers the block carried in the first message to its own block. The first message may be stored in a chain and sent to neighboring NVPs in the same NVP cluster. Then, any one of the NVPs adjacent to the first NVP in the same NVP cluster, after receiving the first message sent by the first NVP, blocks the block carried in the first message. may be stored on its own blockchain and the first message may be sent to neighboring NVPs in the same NVP cluster. Similarly, each NVP within the same NVP cluster stores the block carried in the first message on its blockchain and sends the first message to neighboring NVPs within the same NVP cluster.

好ましくは、ステップ202はGOSSIPプロトコルによって実現されてもよい。すなわち、各NVPクラスタ内の第1のNVPは、第1のメッセージを受信した後、GOSSIPプロトコルを使用することによって、第1のメッセージを位置するNVPクラスタ内の各NVPにブロードキャストし、その結果、位置するNVPクラスタ内の各NVPは、第1のメッセージで搬送されるブロックを自身のブロックチェーンに記憶する。 Preferably, step 202 may be realized by the GOSSIP protocol. That is, after receiving the first message, the first NVP in each NVP cluster broadcasts the first message to each NVP in the located NVP cluster by using the GOSSIP protocol, so that Each NVP within the located NVP cluster stores the block conveyed in the first message on its own blockchain.

この場合、GOSSIPプロトコルによって第1のメッセージが伝搬され、各NVPクラスタ内の各NVPは、第1のメッセージで搬送されたブロックを自身のブロックチェーンに記憶し、それにより、対応するVPに追加されたブロックを各NVPクラスタ内の各NVPに同期させる。 In this case, the first message is propagated by the GOSSIP protocol, and each NVP in each NVP cluster stores the blocks carried in the first message in its own blockchain, thereby adding them to the corresponding VP. synchronize the created blocks to each NVP in each NVP cluster.

好ましくは、m個のNVPクラスタのそれぞれにおける各NVPはノードリストを有し、ノードリストは、同じNVPクラスタ内の隣接するNVPのノード識別子を含む。
一つのNVP内のノードリストは、このNVPに隣接するNVPを示すために使用され、例えば、一つのNVPのノード識別子は02であり、このNVPに隣接するNVPのノード識別子が01、03、および04であることは、下記の表1に示されるこのNVP内のノードリストから分かる。
Preferably, each NVP in each of the m NVP clusters has a node list that includes node identifiers of neighboring NVPs in the same NVP cluster.
The node list within one NVP is used to indicate the NVPs adjacent to this NVP, for example, the node identifier of one NVP is 02, and the node identifiers of NVPs adjacent to this NVP are 01, 03, and 04 can be seen from the node list within this NVP shown in Table 1 below.

本願の実施例において、1つのNVPのノードリストは、表1を例として例示的に説明され、表1は、本願の実施例を限定するものではない。 In the embodiment of the present application, the node list of one NVP is exemplarily explained using Table 1 as an example, and Table 1 is not intended to limit the embodiment of the present application.

この場合、ステップ202の操作は、以下のステップ(1)-ステップ(3)によって実現できる。 In this case, the operation in step 202 can be realized by the following steps (1) to (3).

(1)m個のNVPクラスタのそれぞれにおける何れか1つのNVPが第1のメッセージを受信した場合、第1のメッセージで搬送されるブロックは、自身のブロックチェーンに記憶される。 (1) If any one NVP in each of the m NVP clusters receives the first message, the block conveyed in the first message is stored in its own blockchain.

この場合、一つのNVPは、第1のメッセージを受信した後、まず、第1のメッセージで搬送されるブロックを自身のブロックチェーンに記憶し、すなわち、対応するVPに追加されたブロックをこのNVPに同期させる。 In this case, after receiving the first message, one NVP first stores the block carried in the first message in its own blockchain, that is, the block added to the corresponding VP is transferred to this NVP. Synchronize with.

好ましくは、VPによって生成された第1のメッセージは、第1のメッセージのメッセージシーケンス番号をさらに搬送し得る。この場合、m個のNVPクラスタのそれぞれにおける何れか1つのNVPが第1のメッセージを受信した場合、最初に、最新に受信された第1のメッセージのメッセージシーケンス番号が、前回受信された履歴第1のメッセージのメッセージシーケンス番号よりも大きいかどうかを決定し、最新に受信された第1のメッセージのメッセージシーケンス番号が、前回受信された履歴第1のメッセージのメッセージシーケンス番号よりも大きい場合、第1のメッセージによって搬送されるブロックをブロックチェーンに記憶し、最新に受信された第1のメッセージのメッセージシーケンス番号が、前回受信された履歴第1のメッセージのメッセージシーケンス番号以下である場合、最新に受信された第1のメッセージを破棄してもよい。 Preferably, the first message generated by the VP may further carry a message sequence number of the first message. In this case, when any one NVP in each of the m NVP clusters receives the first message, the message sequence number of the most recently received first message is set to the previous received history number. If the message sequence number of the most recently received first message is greater than the message sequence number of the last received history first message, then 1 message is stored in the blockchain, and if the message sequence number of the most recently received first message is less than or equal to the message sequence number of the last received history first message, then The first message received may be discarded.

第1のメッセージのメッセージシーケンス番号は、第1のメッセージを一意に識別するために使用され、VPによって生成される第1のメッセージのメッセージシーケンス番号は、インクリメントされる。 The message sequence number of the first message is used to uniquely identify the first message, and the message sequence number of the first message generated by the VP is incremented.

履歴第1のメッセージは、最新に受信された第1のメッセージの前にNVPによって受信された第1のメッセージである。 The historical first message is the first message received by the NVP before the most recently received first message.

1つのNVPによって最新に受信された第1のメッセージのメッセージシーケンス番号が、前回受信された履歴第1のメッセージのメッセージシーケンス番号よりも大きい場合、それは、最新に受信された第1のメッセージが、対応するVPによって最新に生成されたものであることを示し、すなわち、最新に受信された第1のメッセージ内で搬送されるブロックは、対応するVPによってブロックチェーンに最新に追加されたものである。つまり、最新に受信された第1のメッセージで搬送されるブロックはこのNVPのブロックチェーンに記憶されないものである。このようにして、このNVPは、第1のメッセージで搬送されるブロックをブロックチェーンに記憶して、このブロックを同期させることができる。 If the message sequence number of the most recently received first message by one NVP is greater than the message sequence number of the previous received historical first message, it means that the most recently received first message is Indicates that it was most recently generated by the corresponding VP, i.e. the block carried in the most recently received first message is the most recently added to the blockchain by the corresponding VP. . That is, the block conveyed in the most recently received first message is not stored in the blockchain of this NVP. In this way, this NVP can store the block conveyed in the first message on the blockchain and synchronize this block.

1つのNVPによって最新に受信された第1のメッセージのメッセージシーケンス番号が、最後に受信された過去の第1のメッセージのメッセージシーケンス番号以下である場合、それは、最新に受信された第1のメッセージが、対応するVPによって最新に生成された第1のメッセージではないことを示し、すなわち、最新に受信された第1のメッセージ内で搬送されるブロックは、このNVPのブロックチェーンによって記憶された可能性が高く、したがって、ブロックを記憶する必要がなく、したがって、最新に受信された第1のメッセージを破棄してもよい。 If the message sequence number of the most recently received first message by one NVP is less than or equal to the message sequence number of the most recently received past first message, then it is not the first message most recently generated by the corresponding VP, i.e. the blocks carried within the most recently received first message are likely to have been stored by this NVP's blockchain. Therefore, there is no need to store the block and therefore the most recently received first message may be discarded.

この場合、m個のNVPクラスタのそれぞれにおける何れか1つのNVPのブロックチェーンに毎回記憶されるブロックは、対応するVPに新たに追加されるブロックである。このようにして、m個のNVPクラスタのそれぞれにおける何れか1つのNVPのブロックチェーンに記憶されたブロックが重複しないことが保証され得る。 In this case, the block stored in the blockchain of any one NVP in each of the m NVP clusters each time is a block newly added to the corresponding VP. In this way, it can be guaranteed that the blocks stored in the blockchain of any one NVP in each of the m NVP clusters are not duplicated.

(2)m個のNVPクラスタのそれぞれにおける何れか1つのNVPによって受信された第1のメッセージが対応するVPからのものである場合、第1のメッセージを更新するように第1のメッセージに自身のノード識別子が追加され、更新された第1のメッセージは、自身のノードリスト内の各ノード識別子によって識別されるNVPに送信される。 (2) If the first message received by any one NVP in each of the m NVP clusters is from the corresponding VP, the first message is updated to update the first message; The first message with the node identifiers added and updated is sent to the NVP identified by each node identifier in its node list.

第1のメッセージは、第1のメッセージで搬送されるノード識別子によって識別されるNVPが第1のメッセージを受信したことを示し、すなわち、第1のメッセージで搬送されるノード識別子によって識別されるNVPが、第1のメッセージで搬送されるブロックをブロックチェーンに記憶したことを示すために使用される。 The first message indicates that the NVP identified by the node identifier carried in the first message has received the first message, i.e., the NVP identified by the node identifier carried in the first message is used to indicate that the block carried in the first message has been stored on the blockchain.

このNVPは、第1のメッセージを更新するように、自身のノード識別子を第1のメッセージに追加し、これにより、更新された第1のメッセージを受信する次のNVPは、どのNVPが第1のメッセージを受信したことを知ることを保証する。 This NVP adds its node identifier to the first message so that it updates the first message, so that the next NVP that receives the updated first message will know which NVP guarantee that you will know that your message has been received.

1つのNVPによって受信された第1のメッセージが対応するVPからのものである場合、それは、このNVPが第1のNVPであることを示し、この場合、位置するNVPクラスタ内のこのNVP以外の別のNVPは、第1のメッセージを受信していないこと、すなわち、このNVPに隣接するNVPは、第1のメッセージを受信していないことが分かる。これにより、このNVPは、第1のメッセージを更新した後に自身のノードリストにおける各ノード識別子によって識別されるNVPに更新された第1のメッセージが送信される。 If the first message received by one NVP is from the corresponding VP, it indicates that this NVP is the first NVP, and in this case, other than this NVP in the located NVP cluster. It can be seen that another NVP has not received the first message, ie, an NVP adjacent to this NVP has not received the first message. Thereby, this NVP updates the first message and then sends the updated first message to the NVP identified by each node identifier in its own node list.

(3)m個のNVPクラスタのそれぞれにおける何れか1つのNVPによって受信された第1のメッセージが同じNVPクラスタ内のNVPからのものである場合、第1のメッセージによって搬送されるノード識別子は、ターゲットノード識別子として決定され、第1のメッセージを更新するように第1のメッセージに自身のノード識別子が追加され、ターゲットノード識別子を除く自身のノードリスト内の他の各ノード識別子によって識別されるNVPに、更新された第1のメッセージが送信される。 (3) If the first message received by any one NVP in each of m NVP clusters is from an NVP in the same NVP cluster, then the node identifier carried by the first message is NVP determined as the target node identifier, with its own node identifier appended to the first message to update the first message, and identified by each other node identifier in its own node list excluding the target node identifier The updated first message is then sent.

1つのNVPによって受信された第1のメッセージが同じNVPクラスタ内のNVPからのものである場合、それは、このNVPが第2のNVPであることを示す。この時、位置するNVPクラスタ内のこのNVPを除く他のNVPにおける少なくとも一部のNVP(第1のNVPを含む)に第1のメッセージが受信されることがわかる。したがって、このNVPによって受信された第1のメッセージは、ノード識別子(すなわち、ターゲットノード識別子)を搬送し、ターゲットノード識別子によって識別されるNVPは、第1のメッセージを受信したNVPである。したがって、このNVPは、ターゲットノード識別子によって識別されるNVPに更新された第1のメッセージを送信しなくてもよい。すなわち、第1のメッセージが更新された後、このNVPは、自身のノードリスト内のターゲットノード識別子以外の他の各ノード識別子によって識別されるNVPに更新された第1のメッセージを送信してもよい。 If the first message received by one NVP is from an NVP in the same NVP cluster, it indicates that this NVP is the second NVP. At this time, it can be seen that the first message is received by at least some NVPs (including the first NVP) in other NVPs other than this NVP in the located NVP cluster. Accordingly, the first message received by this NVP carries a node identifier (i.e., a target node identifier), and the NVP identified by the target node identifier is the NVP that received the first message. Therefore, this NVP may not send the updated first message to the NVP identified by the target node identifier. That is, after the first message is updated, this NVP may send the updated first message to the NVP identified by each other node identifier other than the target node identifier in its own node list. good.

このようにして、m個のNVPクラスタのそれぞれにおける各NVPが重複する第1のメッセージを受信しないことが保証され、それにより、各NVPのブロックチェーン内に記憶されたブロックが重複しないことが保証される。 In this way, each NVP in each of the m NVP clusters is guaranteed not to receive a duplicate first message, thereby ensuring that the blocks stored within each NVP's blockchain are not duplicated. be done.

好ましくは、一つのNVPのノードリストは、隣接するNVPのノード識別子に対応する出力インターフェースをさらに含み得る。 Preferably, the node list of one NVP may further include output interfaces corresponding to node identifiers of adjacent NVPs.

この出力インターフェースは、一つのNVPがノードリスト内のノード識別子によって識別されるNVPに第1のメッセージを送信するときにこのNVPから第1のメッセージを送信するネットワークインターフェースである。例えば、一つのNVPのノード識別子は02であり、NVPのノードリストにおけるこのNVPを含む3つの隣接するNVPのノード識別子は01、03、および04である。ノードリストに含まれる3つの隣接するNVPのノード識別子に対応する出力インターフェースは、下記の表2に示される。 This output interface is the network interface through which an NVP sends the first message when the NVP sends the first message to the NVP identified by the node identifier in the node list. For example, the node identifier of one NVP is 02, and the node identifiers of three adjacent NVPs including this NVP in the NVP's node list are 01, 03, and 04. The output interfaces corresponding to the node identifiers of three adjacent NVPs included in the node list are shown in Table 2 below.

本願の実施例において、1つのNVPのノードリストは、表2を例として例示的に説明され、表2は、本願の実施例を限定しない。 In the embodiment of the present application, the node list of one NVP is exemplified by taking Table 2 as an example, and Table 2 does not limit the embodiment of the present application.

この場合、一つのNVPによって、NVPのノードリスト内のターゲットノード識別子以外の他の各ノード識別子によって識別されるNVPに更新された第1のメッセージを送信する動作は、このNVPが、NVPのノードリストからターゲットノード識別子以外の他の各ノード識別子に対応する出力インターフェースを取得し、NVPのノードリスト内のターゲットノード識別子以外の他の各ノード識別子内の何れか一つのノード識別子について、このNVPは、このノード識別子に対応する出力インターフェースを使用することによって、このノード識別子によって識別されるNVPに更新された第1のメッセージを送信することであってよい。 In this case, the act of sending an updated first message by one NVP to the NVP identified by each other node identifier other than the target node identifier in the NVP's node list means that this NVP Obtain the output interface corresponding to each other node identifier other than the target node identifier from the list, and for any one node identifier in each other node identifier other than the target node identifier in the node list of the NVP, this NVP , by sending the updated first message to the NVP identified by this node identifier by using the output interface corresponding to this node identifier.

このようにして、ノードリスト内の各ノード識別子は1つの出力インターフェースに対応し、m個のNVPクラスタ内のそれぞれにおける何れか1つのNVPは、隣接するNVPのノード識別子に対応する出力インターフェースから隣接するNVPに更新された第1のメッセージを送信し得る。これにより、ネットワーク輻輳を回避し、メッセージ伝送速度を向上させることができる。 In this way, each node identifier in the node list corresponds to one output interface, and any one NVP in each of the m NVP clusters has an adjacent The updated first message may be sent to the NVP. This makes it possible to avoid network congestion and improve message transmission speed.

好ましくは、m個のNVPクラスタのそれぞれにおける何れか1つのNVPは、第1のモジュールおよび第2のモジュールを含み、第1のモジュールは、同じNVPクラスタ内の隣接するNVPと通信するように構成され、対応するVPと通信するようにさらに構成される。第2モジュールは、第1メッセージで搬送されるブロックを処理するように構成される。 Preferably, any one NVP in each of the m NVP clusters includes a first module and a second module, the first module configured to communicate with an adjacent NVP in the same NVP cluster. and further configured to communicate with the corresponding VP. The second module is configured to process the blocks conveyed in the first message.

この場合、ステップ202の動作は、第1のモジュールが、第1のメッセージを受信した場合、第1のメッセージで搬送されたブロックを第2のモジュールに送信し、第2のモジュールが、第1のモジュールによって送信されたブロックを受信した後、このブロックをブ自身のロックチェーンに記憶し、第1のモジュールによって受信された第1のメッセージが対応するVPからのものである場合、第1のモジュールが、第1のメッセージを更新するように第1のモジュールが属するNVPのノード識別子を第1のメッセージに追加し、更新された第1のメッセージを自身のノードリスト内の各ノード識別子によって識別されたNVPに送信し、第1のモジュールによって受信された第1のメッセージが同じNVPクラスタ内のNVPからのものである場合、第1のモジュールが、第1のメッセージで搬送されたノード識別子をターゲットノード識別子として決定し、第1のメッセージを更新するように第1のモジュールが属するNVPのノード識別子を第1のメッセージに追加し、更新された第1のメッセージを自身のノードリスト内のターゲットノード識別子以外の他のノード識別子によって識別されたNVPに送信することであってもよい。 In this case, the act of step 202 includes, if the first module receives the first message, transmits the block carried in the first message to the second module; After receiving a block sent by a module, it stores this block in its own lockchain, and if the first message received by the first module is from the corresponding VP, then the first message received by the first module is from the corresponding VP. The module updates the first message by adding the node identifier of the NVP to which the first module belongs to the first message, and identifies the updated first message by each node identifier in its node list. If the first message sent to the NVP and received by the first module is from an NVP in the same NVP cluster, the first module returns the node identifier carried in the first message. Add the node identifier of the NVP to which the first module belongs to the first message to determine the target node identifier and update the first message, and add the updated first message to the target in its own node list. It may also be to send to an NVP identified by a node identifier other than the node identifier.

このように、第1のモジュールは、第1のメッセージを受信、更新及び送信し、第2のモジュールは、第1のモジュールによって送信された当該ブロックを受信し、当該ブロックを自身のブロックチェーンに記憶する。つまり、第1のモジュールと第2のモジュールはそれぞれの分業を有し、ブロック同期効率を向上させることができる。 In this way, the first module receives, updates and sends the first message, and the second module receives the block sent by the first module and adds the block to its own blockchain. Remember. In other words, the first module and the second module have their own division of labor, which can improve block synchronization efficiency.

その中で、第1のモジュールおよび第2のモジュールによって実行される動作は、上記の一つのNVPが第1のメッセージを受信し、第1のメッセージで搬送されるブロックをブロックチェーンに記憶し、第1のメッセージを同じNVPクラスタ内の隣接するNVPに送信する動作と同様であり、ここで詳細な説明を省略する。 Therein, the operations performed by the first module and the second module are such that the one NVP receives a first message and stores the block carried in the first message in the blockchain; The operation is similar to the operation of transmitting the first message to an adjacent NVP within the same NVP cluster, and detailed explanation will be omitted here.

好ましくは、m個のNVPクラスタのそれぞれに対応するVPは、ブロックコンセンサスプロセスにおいてチェックメッセージを生成してよく、VPは、対応するNVPクラスタ内の第1のNVPにこのチェックメッセージをさらに送信してよい。 Preferably, the VP corresponding to each of the m NVP clusters may generate a check message in a block consensus process, and the VP further sends this check message to the first NVP in the corresponding NVP cluster. good.

該チェックメッセージは、自身のブロックチェーンに記憶されたブロックが正しいか否かをチェックするようにNVPに指示するために用いられ、該チェックメッセージには、第1のターゲットブロック識別子及び第1のターゲットブロックハッシュ値が搬送される。第1のターゲットブロック識別子は、VPがコンセンサス処理を行うブロックのブロック識別子であり、第1のターゲットブロックハッシュ値は、VPがコンセンサス処理を行うブロックのブロックハッシュ値である。 The check message is used to instruct NVP to check whether the block stored in its own blockchain is correct, and the check message includes a first target block identifier and a first target block identifier. A block hash value is conveyed. The first target block identifier is the block identifier of the block on which the VP performs the consensus process, and the first target block hash value is the block hash value of the block on which the VP performs the consensus process.

好ましくは、VPは、以下の2つの場合にチェックメッセージを生成し、このチェックメッセージを対応するNVPクラスタ内の第1のNVPに送信してもよい。 Preferably, the VP may generate a check message in the following two cases and send this check message to the first NVP in the corresponding NVP cluster.

第1のケースでは、VPは、一つのブロックに対するコンセンサスを完了するたびに、このブロックをブロックチェーンに追加し、このブロックを搬送する第1のメッセージを対応するNVPクラスタ内の第1のNVPに送信した後、チェックメッセージを対応するNVPクラスタ内の第1のNVPに送信してもよく、チェックメッセージに搬送される第1のターゲットブロック識別子は、このブロックのブロック識別子であり、第1のターゲットブロックハッシュ値は、このブロックのブロックハッシュ値である。 In the first case, whenever a VP completes consensus for one block, it adds this block to the blockchain and sends the first message carrying this block to the first NVP in the corresponding NVP cluster. After sending, a check message may be sent to the first NVP in the corresponding NVP cluster, and the first target block identifier carried in the check message is the block identifier of this block, and the first target The block hash value is the block hash value of this block.

この場合、このブロックを搬送する第1のメッセージが、対応するNVPクラスタ内の第1のNVPに送信されるたびに、このブロックについてのチェックメッセージが、対応するNVPクラスタ内の第1のNVPに送信される。これにより、対応するNVPクラスタにおける各NVPが1つのブロックを記憶するたびに、このブロックに対応するチェックメッセージを受信することを保証することができ、各NVPが自身のブロックチェーンに記憶された各ブロックを検査できることを保証し、自身のブロックチェーンに記憶されたブロックの正確性を確保することができる。 In this case, whenever the first message carrying this block is sent to the first NVP in the corresponding NVP cluster, a check message about this block is sent to the first NVP in the corresponding NVP cluster. Sent. This allows us to guarantee that each time each NVP in the corresponding NVP cluster stores one block, it receives a check message corresponding to this block, and each NVP stores each block stored in its own blockchain. It can guarantee that blocks can be inspected and ensure the accuracy of blocks stored on its own blockchain.

第2のケースでは、VPは、1つのブロックに対するコンセンサスを完了し、このブロックをブロックチェーンに追加し、このブロックを搬送する第1のメッセージを対応するNVPクラスタ内の第1のNVPに送信した後、このブロックがブロックロールバック動作を実行した後に生成されたものである場合、VPは、このブロックに対するチェックメッセージを対応するNVPクラスタ内の第1のNVPに送信してもよい。このブロックがブロックロールバック動作が実行された後に最新に生成されていない場合、VPは、ブロックに対するチェックメッセージを対応するNVPクラスタ内の第1のNVPに送信しなくてもよい。 In the second case, the VP completed consensus for one block, added this block to the blockchain, and sent a first message carrying this block to the first NVP in the corresponding NVP cluster. Afterwards, if this block was generated after performing a block rollback operation, the VP may send a check message for this block to the first NVP in the corresponding NVP cluster. If this block has not been most recently generated after the block rollback operation was performed, the VP may not send a check message for the block to the first NVP in the corresponding NVP cluster.

ブロックロールバック動作が実行された後に最新に生成されたブロックのブロック識別子は、ブロックロールバック動作が実行される前に最後に生成されたブロックのブロック識別子と同じであるので、VPがブロックロールバック動作を実行することによって、VPは、2つのブロック識別子が同じであるブロックを対応するNVPクラスタの第1のNVPに送信し、対応するNVPクラスタ内の各NVPは、2つのブロック識別子が同じであるブロックを受信するが、各NVPは、どのブロックが正しいブロックであるかを知らないので、各NVPのブロックチェーンは、一時的に分岐し、すなわち、ブロックチェーン内の1つのブロックの次のブロックは、2つのブロック識別子が同じであるブロックに分けられる。この場合、この2つの同じブロック識別子によって識別されたブロックの次のブロックが来ると、次のブロックをブロックチェーンに記憶するために、次のブロックの親ブロックハッシュ値をこの2つのブロックのブロックハッシュ値と比較して、この2つのブロックのうちどのブロックが次のブロックの親ブロックであるかを決定する必要がある。 The block identifier of the most recently generated block after the block rollback operation is performed is the same as the block identifier of the last generated block before the block rollback operation is performed, so VP By performing the operation, the VP sends the block with the same two block identifiers to the first NVP of the corresponding NVP cluster, and each NVP in the corresponding NVP cluster sends the block with the same two block identifiers to the first NVP of the corresponding NVP cluster. Upon receiving a block, each NVP does not know which block is the correct one, so each NVP's blockchain temporarily forks, i.e., the next block of one block in the blockchain. is divided into blocks where two block identifiers are the same. In this case, when the next block of the block identified by these two same block identifiers comes, in order to store the next block in the blockchain, the parent block hash value of the next block is added to the block hash of these two blocks. We need to compare the values to determine which of these two blocks is the parent block of the next block.

この場合、ブロックロールバック動作が実行された後に最新のブロックが生成された後、VPは、対応するNVPクラスタ内の第1のNVPにこのブロックに対するチェックメッセージを送信し得る。このチェックメッセージを受信した後、対応するNVPクラスタ内の各NVPは、ブロックチェーン内に記憶された2つのブロック識別子が同じであるブロックのどれが正しいであることを検査できる。これにより、ブロックチェーンに記憶されたブロックの正確性を確保することができる。ブロックロールバック動作が実行された後に最新のブロックが生成されるときにのみ、VPは、対応するNVPクラスタ内の第1のNVPにチェックメッセージを送信するので、ブロックチェーンシステムリソースを節約することができる。 In this case, after the latest block is generated after the block rollback operation is performed, the VP may send a check message for this block to the first NVP in the corresponding NVP cluster. After receiving this check message, each NVP in the corresponding NVP cluster can check which of the blocks with the same two block identifiers stored in the blockchain is correct. This ensures the accuracy of blocks stored in the blockchain. Only when the latest block is generated after the block rollback operation is performed, the VP sends a check message to the first NVP in the corresponding NVP cluster, thus saving blockchain system resources. can.

さらに、対応するVPによって生成されたチェックメッセージを受信した後、m個のNVPクラスタのそれぞれにおける何れか1つのNVPは、自身のブロックチェーン内に第1のブロックを検索することができ、自身のブロックチェーン内に第1のブロックが検索された場合、第1のブロックのブロックハッシュ値が第1のターゲットブロックハッシュ値と異なるとき、第1のブロックは、ブロックチェーンから削除される。 Furthermore, after receiving the check message generated by the corresponding VP, any one NVP in each of the m NVP clusters can search for the first block in its own blockchain and its If the first block is found in the blockchain, the first block is removed from the blockchain when the block hash value of the first block is different from the first target block hash value.

第1のブロックは、ブロック識別子が第1のターゲットブロック識別子と同じであるブロックである。 The first block is the block whose block identifier is the same as the first target block identifier.

一つのNVPは、対応するVPによって生成されたチェックメッセージを受信した後、自身のブロックチェーン内に第1のブロックを検索し、すなわち、自身のブロックチェーン内にブロック識別子が第1のターゲットブロック識別子と同じであるブロックを検索する。自身のブロックチェーンにおいて第1のブロックが検索された場合、第1のブロックのブロックハッシュ値を第1のターゲットブロックハッシュ値と比較する。第1のブロックのブロックハッシュ値が第1のターゲットブロックハッシュ値と同じである場合、第1のブロックが正しいことを示し、何ら処理する必要がない。第1のブロックのブロックハッシュ値が第1のターゲットブロックハッシュ値と異なる場合、第1のブロックが第1のターゲットブロックハッシュ値に対応するブロックと異なることを示し、第1のブロックが正しくないと決定することができ、即ち、第1のブロックがロールバックされたブロックである可能性が高いため、自身のブロックチェーンから第1のブロックを削除することができる。 After one NVP receives the check message generated by the corresponding VP, it searches for the first block in its own blockchain, i.e., the block identifier in its own blockchain is the first target block identifier. Find blocks that are the same as . If the first block is retrieved in its own blockchain, compare the block hash value of the first block with the first target block hash value. If the block hash value of the first block is the same as the first target block hash value, it indicates that the first block is correct and no processing is required. If the block hash value of the first block is different from the first target block hash value, it indicates that the first block is different from the block corresponding to the first target block hash value, and the first block is incorrect. It can decide, i.e., it is likely to be a rolled back block, so it can delete the first block from its blockchain.

例えば、一つのVPが、ブロック識別子が50であるブロックに対するコンセンサスを完了した後、ブロック識別子が50であるブロックを搬送する第1のメッセージが、対応するNVPクラスタ内の第1のNVPに送信される。しかし、VPは、このブロックに対するコンセンサスを完了した後、このブロックに対してロールバックを行い、このVPは、ブロックロールバック動作を実行した後、ブロック識別子が50であるブロックを生成し続け、このブロックに対するコンセンサスを完了する。その後、このVPは、対応するNVPクラスタ内の第1のNVPに、ブロック識別子が50である新たに生成されたブロックを搬送する第1のメッセージを送信し、このブロックに対するチェックメッセージを送信する。この場合、対応するNVPクラスタ内の各NVPは、ブロック識別子が50である2つのブロックを受信し、それに応じて、自身のブロックチェーンは、ブロック識別子が50である2つのブロックを対応的に記憶し、この時、このチェックメッセージに応じて先に記憶されたブロック識別子が50であるブロックを削除することができる。 For example, after one VP completes consensus for a block with block identifier 50, a first message carrying a block with block identifier 50 is sent to the first NVP in the corresponding NVP cluster. Ru. However, after completing the consensus on this block, the VP performs a rollback on this block, and after performing the block rollback operation, this VP continues to generate blocks whose block identifier is 50, and this Complete consensus on the block. This VP then sends a first message carrying a newly generated block with block identifier 50 to the first NVP in the corresponding NVP cluster and sends a check message for this block. In this case, each NVP in the corresponding NVP cluster receives two blocks with block identifier 50, and accordingly, its own blockchain correspondingly stores two blocks with block identifier 50. However, at this time, the previously stored block whose block identifier is 50 can be deleted in response to this check message.

例えば、図3は、NVPのブロックチェーンに記憶されるブロックの概略図である。図3を参照すると、図3は、ブロックチェーン300と、ブロックチェーン300に記憶された複数のブロック301とを含む。複数のブロック301は、2つのブロック識別子が50であるブロック301を含み、2つのブロック識別子が50であるブロック301は、ブロックチェーン300に一時的な分岐を引き起こす。1つのNVPは、対応するVPによって送信されたチェックメッセージを受信し、このチェックメッセージで搬送される第1のターゲットブロック識別子は50である。このNVPは、自身のブロックチェーン300からブロック識別子が50であるブロック301を検索すると、2つのブロック識別子が50であるブロック301を検出することができる。その後、このNVPは、この2つのブロック識別子が50であるブロック301のうち、先に記憶されたブロック識別子が50であるブロック301のブロックハッシュ値と、このチェックメッセージに含まれる第1のターゲットブロックハッシュ値とが異なると決定した場合、このNVPは、自身のブロックチェーン300のうち、先に記憶されたブロック識別子が50であるブロック301を削除することができ、このように、このNVPのブロックチェーン300に記憶されたものは、いずれも正しいブロック301であり、この場合、このNVPのブロックチェーン300は、図4に示すように、図4に示すブロックチェーン300に記憶されたものは、いずれも正しいブロック301である。 For example, FIG. 3 is a schematic diagram of blocks stored on NVP's blockchain. Referring to FIG. 3, FIG. 3 includes a blockchain 300 and a plurality of blocks 301 stored on the blockchain 300. The plurality of blocks 301 includes a block 301 with two block identifiers of 50, and the block 301 with two block identifiers of 50 causes a temporary branch in the blockchain 300. One NVP receives the check message sent by the corresponding VP, and the first target block identifier carried in this check message is 50. When this NVP searches for a block 301 whose block identifier is 50 from its own blockchain 300, it can detect two blocks 301 whose block identifiers are 50. Then, this NVP includes the block hash value of the block 301 whose block identifier is 50 that was stored earlier among the block 301 whose block identifier is 50, and the first target block included in this check message. If the hash value is determined to be different, this NVP can delete block 301 of its own blockchain 300 whose previously stored block identifier is 50, and thus this NVP's block Anything stored in the chain 300 is a correct block 301, and in this case, the blockchain 300 of this NVP is as shown in FIG. is also a valid block 301.

m個のNVPクラスタのそれぞれにおける各NVPが第1のメッセージを受信した後に実行される動作について上記で詳細に説明したが、m個のNVPクラスタのそれぞれにおける各NVPが、第1のメッセージ内で搬送されるブロックを自身のブロックチェーンに記憶することにより、m個のNVPクラスタのそれぞれにおける各NVPが、複数のVPに記憶されたブロックを自身のブロックチェーンに同期させることを保証すること、が実現される。 Having described in detail above the actions that each NVP in each of the m NVP clusters performs after receiving the first message, each NVP in each of the m NVP clusters By storing the transported blocks in its own blockchain, each NVP in each of the m NVP clusters ensures that blocks stored in multiple VPs are synchronized to its own blockchain. Realized.

なお、m個のNVPクラスタのそれぞれにおける何れか一つのNVPは、ネットワーク輻輳またはネットワークパーティションなどの理由により、長時間にブロックを受信することができない可能性があり、それにより、このNVPをブロックに同期させることが実現できない。以下、このような場合に実行される必要がある操作を詳細に説明して、ネットワークのためにブロックを同期できない問題を解決する。 Note that any one NVP in each of the m NVP clusters may not be able to receive blocks for a long time due to reasons such as network congestion or network partition. Synchronization is not possible. Below, we will explain in detail the operations that need to be performed in such cases to solve the problem of not being able to synchronize blocks due to the network.

具体的には、該m個のNVPクラスタのそれぞれにおける各NVPは、第4の所定時間ごとに、同じNVPクラスタにおける隣接する他のNVPにブロックチェーン状態を送信し、該ブロックチェーン状態は、自身のノード識別子及びブロックチェーンにおける最新のブロックのブロック識別子を含み、該m個のNVPクラスタのそれぞれにおける何れか1つのNVPは、受信した隣接するNVPから送信された該ブロックチェーン状態をターゲットブロックチェーン状態として決定し、第5の所定時間にブロックを受信しなかった場合、自身のブロックチェーンにおける最新のブロックのブロック識別子がターゲットブロックチェーン状態におけるブロック識別子より小さい場合、ターゲットブロックチェーン状態におけるノード識別子によって識別されるターゲットNVPのブロックチェーンから、ブロック識別子が自身のブロックチェーンにおける最新のブロックのブロック識別子より大きいブロックを取得し、取得したブロックを自身のブロックチェーンに記憶する。 Specifically, each NVP in each of the m NVP clusters transmits its blockchain state to other neighboring NVPs in the same NVP cluster every fourth predetermined time, and the blockchain state is transmitted to its own and the block identifier of the latest block in the blockchain, and any one NVP in each of the m NVP clusters converts the blockchain state sent from the received neighboring NVP into the target blockchain state. and if no block is received in the fifth predetermined time, if the block identifier of the latest block in its own blockchain is smaller than the block identifier in the target blockchain state, then the node identifier in the target blockchain state Obtain a block whose block identifier is larger than the block identifier of the latest block in its own blockchain from the target NVP's blockchain, and store the obtained block in its own blockchain.

第4の所定時間は、予め設定されてもよく、技術者が必要に応じて設定してもよい。例えば、第4の所定時間は1分に設定されてもよい。 The fourth predetermined time may be set in advance, or may be set by an engineer as necessary. For example, the fourth predetermined time period may be set to one minute.

1つのNVPのブロックチェーン状態は、自身のブロックチェーンに記憶されている最新ブロックの状況を示すために用いられる。ターゲットブロックチェーン状態は、1つのNVPが受信した隣接するNVPが送信したブロックチェーン状態であり、このNVPが複数の隣接するNVPを有する場合、このNVPは複数のターゲットブロックチェーン状態を受信することができる。 The blockchain state of one NVP is used to indicate the status of the latest block stored on its own blockchain. The target blockchain state is the blockchain state that one NVP has received and sent by its neighboring NVPs, and if this NVP has multiple neighboring NVPs, then this NVP can receive multiple target blockchain states. can.

第5の所定時間は、予め設定されてもよく、且つ第5所定時間は、十分な時間でブロックを受信することを保証するように、大きく設定されてもよい。例えば、第5の所定時間は2分に設定されてもよい。 The fifth predetermined time may be preset, and the fifth predetermined time may be set large to ensure that blocks are received in sufficient time. For example, the fifth predetermined time period may be set to 2 minutes.

ターゲットNVPは、このNVPが受信した複数のターゲットブロックチェーン状態のうち、ブロック識別子がこのNVPのブロックチェーンにおける最新のブロックのブロック識別子よりも大きいターゲットブロックチェーン状態におけるノード識別子によって識別されるNVPである。 The target NVP is the NVP identified by the node identifier in the target blockchain state, among the multiple target blockchain states received by this NVP, whose block identifier is greater than the block identifier of the most recent block in this NVP's blockchain. .

m個のNVPクラスタのそれぞれにおける各NVPは、第4の所定時間ごとに、同じNVPクラスタ内の隣接する他のNVPにブロックチェーン状態を送信し、各NVPは、隣接するNVPのブロックチェーン内に記憶された最新のブロックの状況を知ることができる。1つのNVPが第5の所定時間にブロックを受信しなかった場合、このNVPが非常に長い期間内にブロックを受信しなかったことを示し、このNVPは、複数のターゲットブロックチェーン状態のうちの何れか1つのターゲットブロックチェーン状態において、自身のブロックチェーンにおける最新のブロックのブロック識別子よりも大きいブロック識別子が存在するか否かをチェックすることができ、複数のターゲットブロックチェーン状態において、1つのターゲットブロックチェーン状態におけるブロック識別子が自身のブロックチェーンにおける最新のブロックのブロック識別子よりも大きい場合、このNVPは、このターゲットブロックチェーン状態におけるノード識別子によって識別されるターゲットNVPのブロックチェーンから、ブロック識別子が自身のブロックチェーンにおける最新のブロックのブロック識別子よりも大きいブロックを取得することができる。その後、取得したブロックを自身のブロックチェーンに記憶して、自身のブロックチェーンに記憶されていないブロックの同期を実現することができる。複数のターゲットブロックチェーン状態のうちの各ターゲットブロックチェーン状態におけるブロック識別子が、何れも自身のブロックチェーンにおける最新のブロックのブロック識別子以下の場合、このNVPは、ブロックの受信を待ち続ける。 Each NVP in each of the m NVP clusters sends its blockchain state to other neighboring NVPs in the same NVP cluster every fourth predetermined time, and each NVP sends its blockchain state to other neighboring NVPs in the neighboring NVP cluster. You can know the status of the latest stored block. If one NVP does not receive a block in the fifth predetermined time, indicating that this NVP has not received a block within a very long period of time, this NVP will In any one target blockchain state, it is possible to check whether there is a block identifier larger than the block identifier of the latest block in its own blockchain, and in multiple target blockchain states, one target If the block identifier in the blockchain state is greater than the block identifier of the most recent block in its own blockchain, then this NVP receives the block identifier from the target NVP's blockchain identified by the node identifier in this target blockchain state. It is possible to obtain a block that is larger than the block identifier of the latest block in the blockchain. After that, it is possible to store the acquired blocks on its own blockchain and achieve synchronization of blocks that are not stored on its own blockchain. If the block identifier in each target blockchain state among the plurality of target blockchain states is less than or equal to the block identifier of the latest block in its own blockchain, this NVP continues to wait to receive a block.

このように、1つのNVPが長時間にブロックを受信しない場合、隣接するターゲットNVPのブロックチェーンから、自身のブロックチェーンにおける最新のブロックのブロック識別子よりも大きいブロックを直接取得することにより、システムリソースを節約し、ブロック同期時間を節約し、ブロック同期効率を向上させることができる。 In this way, if one NVP does not receive a block for a long time, it can save system resources by directly retrieving a block from the adjacent target NVP's blockchain that is larger than the block identifier of the latest block in its own blockchain. can save time, save block synchronization time, and improve block synchronization efficiency.

好ましくは、ブロックチェーン状態は、ブロックチェーンにおける最新のブロックのブロックハッシュ値をさらに含み、この場合、このNVPが、ターゲットブロックチェーン状態におけるノード識別子によって識別されるターゲットNVPのブロックチェーンから、ブロック識別子が自身のブロックチェーンにおける最新のブロックのブロック識別子より大きいブロックを取得する動作は、このNVPが、ターゲットブロックチェーン状態におけるノード識別子によって識別されるターゲットNVPに第3のメッセージを送信し、ターゲットNVPが、第3のメッセージを受信すると、自身のブロックチェーンから第2のブロックを検索し、自身のブロックチェーンから第2のブロックを検索すると、第2のブロックのブロックハッシュ値が第2のターゲットブロックハッシュ値と同じである場合、自身のブロックチェーンにおけるブロック識別子が第3のターゲットブロック識別子より大きく、かつ第2のターゲットブロック識別子以下である全てのブロックをこのNVPに送信することであってもよい。 Preferably, the blockchain state further includes a block hash value of the most recent block in the blockchain, where this NVP has a block identifier from the blockchain of the target NVP identified by the node identifier in the target blockchain state. The act of obtaining a block larger than the block identifier of the most recent block in its own blockchain causes this NVP to send a third message to the target NVP identified by the node identifier in the target blockchain state, and the target NVP When the third message is received, it retrieves the second block from its own blockchain, and when it retrieves the second block from its own blockchain, the block hash value of the second block becomes the second target block hash value. , all blocks whose block identifiers in their own blockchain are greater than the third target block identifier and less than or equal to the second target block identifier may be sent to this NVP.

ここで、このターゲットブロックチェーン状態は、複数のターゲットブロックチェーン状態のうち、ブロック識別子がこのNVPのブロックチェーンにおける最新ブロックのブロック識別子よりも大きいターゲットブロックチェーン状態である。 Here, this target blockchain state is a target blockchain state whose block identifier is larger than the block identifier of the latest block in the blockchain of this NVP among the plurality of target blockchain states.

第3のメッセージは、ターゲットNVPが、自身のブロックチェーン内のこのNVPのブロックチェーン内の最新のブロックのブロック識別子よりも大きいブロックをこのNVPに送信するように指示するために使用される。第3のメッセージは、第2のターゲットブロック識別子、第2のターゲットブロックハッシュ値、および第3のターゲットブロック識別子を搬送する。第2のターゲットブロック識別子は、ターゲットブロックチェーン状態におけるブロック識別子であり、即ち、このNVPのブロックチェーンに記憶されていない1つのブロックのブロック識別子である。第2のターゲットブロックハッシュ値は、ターゲットブロックチェーン状態におけるブロックハッシュ値であり、つまり、このNVPのブロックチェーンに記憶されていない1つのブロックのブロックハッシュ値である。第3のターゲットブロック識別子は、このNVPのブロックチェーンにおける最新のブロックのブロック識別子である。 The third message is used to instruct the target NVP to send this NVP a block that is larger than the block identifier of the most recent block in this NVP's blockchain in its own blockchain. The third message carries a second target block identifier, a second target block hash value, and a third target block identifier. The second target block identifier is the block identifier in the target blockchain state, ie, the block identifier of one block that is not stored in the blockchain of this NVP. The second target block hash value is the block hash value in the target blockchain state, that is, the block hash value of one block that is not stored in the blockchain of this NVP. The third target block identifier is the block identifier of the latest block in this NVP's blockchain.

第2のブロックは、ブロック識別子が第2のターゲットブロック識別子と同じであるブロックである。 The second block is the block whose block identifier is the same as the second target block identifier.

この場合、ターゲットNVPは、第3のメッセージを受信した後、自身のブロックチェーン内にブロック識別子が第2のターゲットブロック識別子と同じであるブロック(すなわち、第2のブロック)が存在するか否かを検索し、自身のブロックチェーン内に第2のブロックが存在することが検索された場合、第2のブロックのブロックハッシュ値を第3のメッセージに含まれる第2のターゲットブロックハッシュ値と比較し、第2のブロックのブロックハッシュ値が第2のターゲットブロックハッシュ値と同じである場合、それは、第2のブロックがこのNVPのブロックチェーン内に記憶されていないブロックの1つであることを示し、この場合、ターゲットNVPのブロックチェーン内のブロック識別子は、このNVPのブロックチェーン内の最新のブロックのブロック識別子(すなわち、第3のターゲットブロック識別子)よりも大きく、かつ、第2のブロックのブロック識別子(すなわち、第2のターゲットブロック識別子)以下のすべてのブロックは、このNVPのブロックチェーン内に記憶されていないブロックである。ターゲットNVPは、自身のブロックチェーン内のブロック識別子が第3ターゲットブロック識別子よりも大きく、第2ターゲットブロック識別子以下である全てのブロックをこのNVPに送信してもよい。ターゲットNVPによって送信されたブロックを受信した後、このNVPは、受信されたブロックを自身のブロックチェーンに記憶して、自身のブロックチェーンに記憶されていないブロックを同期させることができ、それにより、自身のブロックチェーンに記憶されたブロックが他のNVPのブロックチェーンに記憶されたブロックと同じであることを保証する。 In this case, after receiving the third message, the target NVP determines whether there is a block in its blockchain whose block identifier is the same as the second target block identifier (i.e., the second block). and if a second block is found to exist in its own blockchain, it compares the block hash value of the second block with the second target block hash value included in the third message. , if the block hash value of the second block is the same as the second target block hash value, it indicates that the second block is one of the blocks that is not stored within the blockchain of this NVP. , in this case, the block identifier in the target NVP's blockchain is greater than the block identifier of the most recent block in this NVP's blockchain (i.e., the third target block identifier), and the block identifier of the second block All blocks below the identifier (i.e., the second target block identifier) are blocks that are not stored within this NVP's blockchain. The target NVP may send to this NVP all blocks in its blockchain whose block identifier is greater than the third target block identifier and less than or equal to the second target block identifier. After receiving a block sent by a target NVP, this NVP can store the received block in its own blockchain and synchronize blocks that are not stored in its own blockchain, thereby Ensures that blocks stored on its own blockchain are the same as blocks stored on other NVP blockchains.

好ましくは、ブロックチェーンシステムの実行中に、m個のNVPクラスタのうちの何れか1つのNVPクラスタに1つのNVPが追加される可能性があり、追加されたNVPのブロックチェーンにはまだブロックが記憶されていない可能性があるため、追加されたNVPは、位置するNVPクラスタ内の他のNVPのブロックチェーンに記憶されたすべてのブロックを同期させることができる。この場合、新たに追加されたNVPは、ターゲットNVPからすべてのブロックを取得する前述のステップを実行して、位置するNVPクラスタ内の別のNVPのブロックチェーンに記憶されたブロックを同期させることができる。 Preferably, during the execution of the blockchain system, one NVP may be added to any one NVP cluster among the m NVP clusters, and there is still no block in the blockchain of the added NVP. Since it may not be stored, the added NVP can synchronize all blocks stored on the blockchains of other NVPs in the NVP cluster in which it is located. In this case, the newly added NVP can perform the aforementioned steps of retrieving all blocks from the target NVP to synchronize the blocks stored on the blockchain of another NVP in the NVP cluster in which it is located. can.

以上、m個のNVPクラスタのそれぞれにおける何れか1つのNVPが、ターゲットNVPから、自身のブロックチェーンに記憶されていないブロックを能動的に取得する動作について詳細に説明した。本願の実施例において、m個のNVPクラスタのそれぞれにおける何れか1つのNVPが、自身のブロックチェーン内のいくつかのブロックが不足していることを発見したとき、不足しているすべてのブロックの同期を実施するように、ターゲットNVPから不足しているすべてのブロックが能動的に取得される(すなわち、ポイント・ツー・ポイント・プル)。このように、システムリソースを節約し、ブロック同期効率を向上させることができる。 The above describes in detail the operation in which any one NVP in each of m NVP clusters actively acquires a block that is not stored in its own blockchain from a target NVP. In our embodiment, when any one NVP in each of m NVP clusters discovers that some blocks in its own blockchain are missing, all the missing blocks are All missing blocks are actively retrieved from the target NVP to perform synchronization (i.e., point-to-point pull). In this way, system resources can be saved and block synchronization efficiency can be improved.

本願の実施例において、ブロックチェーンシステムは、複数のVPおよびm個のNVPクラスタを含み、複数のVPのうちのm個のVPは、m個のNVPクラスタと1対1で対応し、m個のNVPクラスタのそれぞれは、第1のNVPおよび少なくとも1つの第2のNVPを含む。第1のNVPは、対応するVPと通信するNVPであり、第1のNVPと少なくとも1つの第2のNVPのそれぞれとの間にネットワーク経路を有し、したがって、NVPクラスタ内の第1のNVPは、対応するVPと通信してもよく、または同じNVPクラスタ内の別のNVPと通信してもよい。複数のVPが1つのブロックに対するコンセンサスを完了し、このブロックをブロックチェーンに追加した後、m個のVPのそれぞれは、このブロックを搬送する第1のメッセージを、対応するNVPクラスタ内の第1のNVPに送信する。m個のNVPクラスタのそれぞれにおける各NVPが第1のメッセージを受信した場合、第1のメッセージによって搬送されるブロックがブロックチェーンに記憶され、第1のメッセージが同じNVPクラスタの隣接するNVPに送信され、このようにして、各NVPクラスタにおける各NVPは何れもこのブロックを同期できる。この場合、m個のVPのそれぞれは、対応するNVPクラスタ内の第1のNVPにブロックを搬送する第1のメッセージを送信するだけで、対応するNVPクラスタ内の各NVPによってブロックを同期させることができ、それにより、VPの負荷を軽減し、ブロックのコンセンサス効率を改善することができる。 In the embodiment of the present application, the blockchain system includes a plurality of VPs and m NVP clusters, and m VPs of the plurality of VPs have a one-to-one correspondence with m NVP clusters, and m VPs have a one-to-one correspondence with m NVP clusters. Each of the NVP clusters includes a first NVP and at least one second NVP. The first NVP is an NVP that communicates with its corresponding VP and has a network path between the first NVP and each of the at least one second NVP, and thus is the first NVP in the NVP cluster. may communicate with the corresponding VP or with another NVP within the same NVP cluster. After multiple VPs complete consensus on a block and add this block to the blockchain, each of the m VPs sends the first message carrying this block to the first message in the corresponding NVP cluster. Send to NVP. If each NVP in each of the m NVP clusters receives the first message, the block carried by the first message is stored in the blockchain and the first message is sent to the neighboring NVP in the same NVP cluster. In this way, each NVP in each NVP cluster can synchronize this block. In this case, each of the m VPs can synchronize blocks by each NVP in the corresponding NVP cluster by simply sending a first message carrying the block to the first NVP in the corresponding NVP cluster. , thereby reducing the load on VP and improving block consensus efficiency.

図5は、本願の実施例によるコンピュータデバイスの概略構造図である。図5に示すように、コンピュータデバイス5は、プロセッサ50と、メモリ51と、メモリ51に記憶されてプロセッサ50で実行可能なコンピュータプログラム52とを含み、プロセッサ50がコンピュータプログラム52を実行すると、上記実施例におけるブロック同期方法のステップを実現する。 FIG. 5 is a schematic structural diagram of a computer device according to an embodiment of the present application. As shown in FIG. 5, the computer device 5 includes a processor 50, a memory 51, and a computer program 52 stored in the memory 51 and executable by the processor 50, and when the processor 50 executes the computer program 52, the above-mentioned The steps of the block synchronization method in the embodiment are implemented.

コンピュータデバイス5は、複数のサーバを含むサーバクラスタであってもよく、当該サーバクラスタはブロックチェーンシステムであってもよい。当業者であれば理解できるように、図5はコンピュータデバイス5の例に過ぎず、コンピュータデバイス5を限定するものではなく、図示よりも多い又は少ない部品を含んでもよく、又はいくつかの部品を組み合わせてもよく、又は異なる部品を含んでもよく、例えば入出力デバイス、ネットワークアクセスデバイスなどを含んでもよい。 The computing device 5 may be a server cluster including multiple servers, and the server cluster may be a blockchain system. As will be understood by those skilled in the art, FIG. 5 is only an example of a computer device 5 and is not limiting, and may include more or fewer parts than shown, or may include some parts. They may be combined or include different components, such as input/output devices, network access devices, and the like.

プロセッサ50は、中央処理装置(Central Processing Unit、CPU)であってもよく、他の汎用プロセッサ、デジタル信号プロセッサ(Digital Signal Processor、DSP)、特定用途向け集積回路(Application Specific Integrated Circuit、ASIC)、フィールドプログラマブルゲートアレイ(Field-Programmable Gate Array、FPGA)又は他のプログラマブル論理デバイス、ディスクリートゲート又はトランジスタ論理デバイス、ディスクリートハードウェアコンポーネントなどであってもよい。汎用プロセッサは、マイクロプロセッサであってもよいし、任意の従来のプロセッサであってもよい。 Processor 50 may be a central processing unit (CPU), or may include other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), It may be a Field-Programmable Gate Array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc. A general purpose processor may be a microprocessor or any conventional processor.

メモリ51は、いくつかの実施例において、コンピュータデバイス5のハードディスクまたはメモリなど、コンピュータデバイス5の内部記憶ユニットであり得る。メモリ51は、他のいくつかの実施例において、コンピュータデバイス5の外部記憶装置、例えば、コンピュータデバイス5に搭載されたプラグインハードディスク、スマートメディアカード(Smart Media(登録商標) Card、SMC)、セキュアデジタル(Secure Digital、SD)カード、フラッシュカード(Flash Card)などであってもよい。さらに、メモリ51は、コンピュータデバイス5の内部記憶ユニット及び外部記憶デバイスの両方を含んでもよい。メモリ51は、オペレーティングシステム、アプリケーションプログラム、ブートローダ(Boot Loader)、データ、他のプログラムなどを記憶するように構成される。メモリ51は、出力された又は出力されるデータを一時的に記憶するように構成されてもよい。 Memory 51 may be an internal storage unit of computing device 5, such as a hard disk or memory of computing device 5, in some examples. In some other embodiments, the memory 51 is an external storage device of the computer device 5, such as a plug-in hard disk installed in the computer device 5, a Smart Media Card (SMC), a secure It may be a digital (Secure Digital, SD) card, a flash card, or the like. Furthermore, memory 51 may include both internal storage units of computing device 5 and external storage devices. Memory 51 is configured to store operating systems, application programs, boot loaders, data, other programs, and the like. Memory 51 may be configured to temporarily store data that has been or will be output.

本願の実施例は、コンピュータプログラムが記憶されているコンピュータ読み取り可能な記憶媒体をさらに提供し、当該コンピュータプログラムがプロセッサによって実行されると、上記各方法の実施例におけるステップを実現することができる。 Embodiments of the present application further provide a computer-readable storage medium on which a computer program is stored, which, when executed by a processor, can implement the steps in each of the method embodiments described above.

本願の実施例は、コンピュータプログラム製品を提供し、このコンピュータプログラム製品がコンピュータ上で実行されるとき、コンピュータは、前述の各方法の実施例のステップを実行する。 Embodiments of the present application provide a computer program product that, when executed on a computer, performs the steps of each of the method embodiments described above.

このような理解に基づいて、本願は、上記方法の実施例におけるフローの全部又は一部を実現し、コンピュータプログラムによって関連するハードウェアを命令して完成させることができ、該コンピュータプログラムは、コンピュータ読み取り可能な記憶媒体に記憶されることができ、該コンピュータプログラムがプロセッサによって実行されると、上記各方法の実施例のステップを実現することができる。コンピュータプログラムは、コンピュータプログラムコードを含み、コンピュータプログラムコードは、ソースコード形式、オブジェクトコード形式、実行可能ファイル、又はいくつかの中間形式などであってもよい。該コンピュータ読み取り可能な媒体は、少なくとも、コンピュータプログラムコードを撮影装置/端末デバイスに携帯することができる任意の実体又は装置、記録媒体、コンピュータメモリ、ROM(Read-Only Memory)、RAM(Random Access Memory)、CD-ROM(Compact Disc Read-Only Memory、再生専用光ディスク)、磁気テープ、フロッピーディスク及び光データ記憶デバイスなどを含んでもよい。本願で言及されるコンピュータ読み取り可能な記憶媒体は、不揮発性記憶媒体であってもよく、言い換えれば、非一時的な記憶媒体であってもよい。 Based on this understanding, the present application provides that all or part of the flows in the above method embodiments can be accomplished by instructing the related hardware by a computer program, and the computer program The computer program, which can be stored on a readable storage medium and executed by a processor, can implement the steps of each of the method embodiments described above. A computer program includes computer program code, which may be in source code form, object code form, an executable file, some intermediate form, or the like. The computer readable medium may include at least any entity or device, recording medium, computer memory, ROM (Read-Only Memory), RAM (Random Access Memory) that can carry a computer program code to the imaging device/terminal device. ), CD-ROMs (Compact Disc Read-Only Memory, read-only optical discs), magnetic tapes, floppy disks, optical data storage devices, and the like. Computer-readable storage media referred to in this application may be non-volatile storage media, or in other words, non-transitory storage media.

上記実施例のステップの全部又は一部は、ソフトウェア、ハードウェア、ファームウェア又はそれらの任意の組み合わせによって実現されてもよいことを理解されたい。ソフトウェアを用いて実現する場合、全部又は一部をコンピュータプログラム製品の形態で実現することができる。当該コンピュータプログラム製品は、1つ以上のコンピュータ命令を含む。このコンピュータ命令は、上記コンピュータ読み取り可能な記憶媒体に記憶され得る。 It should be understood that all or part of the steps of the above embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The computer instructions may be stored on the computer readable storage medium.

上記実施例において、各実施例における説明する重点が互いに異なり、ある実施例において詳述又は記載されていない部分は、他の実施例の関連説明を参照することができる。 In the above embodiments, the emphasis of explanation in each embodiment is different from each other, and for parts that are not detailed or described in a certain embodiment, reference can be made to related explanations of other embodiments.

当業者は、本明細書に開示された実施例に関連して説明された各例のユニット及びアルゴリズムステップが、電子ハードウェア、又はコンピュータソフトウェアと電子ハードウェアとの組み合わせによって実現され得ることを認識することができる。これらの機能がハードウェアで実行されるかソフトウェアで実行されるかは、技術案の特定のアプリケーションおよび設計制約条件に依存する。専門技術者は、各特定のアプリケーションに対して異なる方法を使用して説明された機能を実現することができるが、このような実現は本願の範囲を超えないと考えられるべきである。 Those skilled in the art will appreciate that the example units and algorithm steps described in connection with the embodiments disclosed herein can be implemented by electronic hardware or a combination of computer software and electronic hardware. can do. Whether these functions are implemented in hardware or software depends on the particular application and design constraints of the proposed technology. A person skilled in the art may implement the described functionality using different methods for each particular application, and such implementation should be considered without going beyond the scope of the present application.

以上の実施例は、本願の技術案を説明するためのものに過ぎず、それを制限するものではなく、上記の実施例を参照して本願を詳細に説明したが、当業者であれば、依然として上記の各実施例に記載された技術案を修正し、又はその中の一部の技術的特徴に対して同等の置換を行うことができ、これらの修正又は置換は、対応する技術案の本質を本願の各実施例の技術案の精神及び範囲から逸脱させず、いずれも本願の保護範囲に含まれるべきであることを理解すべきである。 The above embodiments are only for explaining the technical solution of the present application, and are not intended to limit it. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art can It is still possible to modify the technical solutions described in each of the above embodiments, or to make equivalent substitutions for some technical features therein, and these modifications or replacements are not equivalent to the corresponding technical solutions. It should be understood that without departing from the spirit and scope of the technical solutions of each embodiment of the present application, all of them should be included in the protection scope of the present application.

Claims (13)

ブロックチェーンシステムに適用されるブロック同期方法であって、
前記ブロックチェーンシステムは、複数のコンセンサスノードVPおよびm個の非コンセンサスノードNVPクラスタを含み、前記複数のVPのうちのm個のVPは、前記m個のNVPクラスタと1対1で対応し、前記m個のNVPクラスタのそれぞれは、第1のNVPおよび少なくとも1つの第2のNVPを含み、前記第1のNVPは、対応するVPと通信するNVPであり、前記第1のNVPと前記少なくとも1つの第2のNVPのそれぞれとの間にネットワーク経路を有し、前記mは正の整数であり、
前記方法は、
前記複数のVPが、1つのブロックに対するコンセンサスを完了し、前記ブロックをブロックチェーンに追加したごとに、前記m個のVPのそれぞれは、前記ブロックを搬送する第1のメッセージを、対応するNVPクラスタ内の前記第1のNVPに送信すること、
前記m個のNVPクラスタのそれぞれにおける各NVPが前記第1のメッセージを受信すると、前記第1のメッセージで搬送される前記ブロックをブロックチェーンに記憶し、前記第1のメッセージを同じNVPクラスタ内の隣接するNVPに送信すること、を含む、
ことを特徴とするブロック同期方法。
A block synchronization method applied to a blockchain system, comprising:
The blockchain system includes a plurality of consensus node VPs and m non-consensus node NVP clusters, and m VPs of the plurality of VPs have a one-to-one correspondence with the m NVP clusters, Each of the m NVP clusters includes a first NVP and at least one second NVP, wherein the first NVP is an NVP that communicates with a corresponding VP, and where the first NVP and the at least has a network path between each of the one second NVP, where m is a positive integer;
The method includes:
Each time said plurality of VPs complete consensus for a block and add said block to the blockchain, each of said m VPs sends a first message carrying said block to the corresponding NVP cluster. transmitting to said first NVP within;
When each NVP in each of the m NVP clusters receives the first message, it stores the block carried in the first message in the blockchain and transfers the first message to all other NVP clusters in the same NVP cluster. including transmitting to an adjacent NVP;
A block synchronization method characterized by:
前記m個のVPのそれぞれが、前記ブロックを搬送する前記第1のメッセージを、対応するNVPクラスタ内の前記第1のNVPに送信する前に、
前記方法は、
前記m個のNVPクラスタのうちの何れか1つのNVPクラスタは、動的選択方式でプライマリNVPを選択し、前記1つのNVPクラスタ内のプライマリNVP以外の別のNVPはセカンダリNVPであり、前記1つのNVPクラスタ内のプライマリNVPは前記第1のNVPであり、前記1つのNVPクラスタ内のセカンダリNVPは前記第2のNVPであること、
前記1つのNVPクラスタ内の前記第1のNVPは、対応するVPに第1の通知メッセージを送信し、前記第1の通知メッセージは、前記第1の通知メッセージを送信するNVPが、位置するNVPクラスタ内のプライマリNVPに選出されたことを示すために使用されること、をさらに含む、
ことを特徴とする請求項1に記載の方法。
before each of the m VPs sends the first message carrying the block to the first NVP in the corresponding NVP cluster;
The method includes:
Any one NVP cluster among the m NVP clusters selects a primary NVP by a dynamic selection method, and another NVP other than the primary NVP in the one NVP cluster is a secondary NVP, and the one a primary NVP within one NVP cluster is the first NVP, and a secondary NVP within the one NVP cluster is the second NVP;
The first NVP in the one NVP cluster sends a first notification message to the corresponding VP, and the first notification message is transmitted to the NVP in which the NVP sending the first notification message is located. further comprising: being used to indicate election as the primary NVP within the cluster;
2. The method according to claim 1, characterized in that:
前記m個のNVPクラスタのうちの何れか1つのNVPクラスタは、動的選択の方式で1つのプライマリNVPを選択することは、
前記1つのNVPクラスタが全体的に起動された後、前記1つのNVPクラスタ内の少なくとも1つのNVPのそれぞれは、1つのNVPクラスタ内の別のNVPに、自身のノード識別子を搬送する第2のメッセージをブロードキャストすること、を含み、前記第2のメッセージは、前記第2のメッセージで搬送されるノード識別子によって識別されるNVPがプライマリNVPとして申請することを示すために使用され、
前記少なくとも1つのNVPのうちの何れか1つは、
前記第2のメッセージがブロードキャストされた後の第1の所定時間に、他のNVPによってブロードキャストされた前記第2のメッセージが受信されること、
自身のノード識別子と、前記第1の所定期間内に受信した他のNVPによってブロードキャストされた前記第2のメッセージで搬送されたノード識別子とを比較して、自身がプライマリNVPに選出されたか否かを決定すること、
自身がプライマリNVPに選出されたと決定されると、第2の通知メッセージは、第2の所定時間ごとに、同じNVPクラスタ内の別のNVPに送信され、前記第2の通知メッセージは、前記第2の通知メッセージを送信するNVPが位置するNVPクラスタのプライマリNVPに選出されたことを示すために使用され、前記第2の通知メッセージを受信するNVPが位置するNVPクラスタのセカンダリNVPであることを示すために使用されること、を実行する、
ことを特徴とする請求項2に記載の方法。
Any one NVP cluster among the m NVP clusters selects one primary NVP using a dynamic selection method.
After the one NVP cluster is activated globally, each of the at least one NVP in the one NVP cluster has a second NVP that carries its node identifier to another NVP in the one NVP cluster. broadcasting a message, the second message being used to indicate that the NVP identified by the node identifier carried in the second message applies as a primary NVP;
Any one of the at least one NVP is
receiving the second message broadcast by another NVP at a first predetermined time after the second message is broadcast;
Compare your own node identifier with the node identifier carried in the second message broadcast by the other NVPs received within the first predetermined period to determine whether you have been elected as the primary NVP. to determine,
Once it is determined that it has been elected as the primary NVP, a second notification message is sent to another NVP in the same NVP cluster every second predetermined time, said second notification message It is used to indicate that the NVP that sends the second notification message is elected as the primary NVP of the located NVP cluster, and that the NVP that receives the second notification message is the secondary NVP of the located NVP cluster. used to indicate, perform,
3. The method according to claim 2, characterized in that:
前記方法は、
前記1つのNVPクラスタにおける何れか1つのセカンダリNVPが、第3の所定時間内に前記第2の通知メッセージを受信しないと、前記第2のメッセージは、同じNVPクラスタの別のNVPにブロードキャストされ、前記第3の所定時間は、前記第2の所定時間以上であること、
前記1つのNVPクラスタにおける何れか1つのNVPが前記1つのセカンダリNVPによってブロードキャストされた前記第2のメッセージを受信すると、自身のノード識別子と前記1つのセカンダリNVPによってブロードキャストされた前記第2のメッセージで搬送されるノード識別子とを比較した後、前記1つのセカンダリNVPがプライマリNVPに選出できないと決定した場合、同じNVPクラスタにおける他のNVPに前記第2のメッセージをブロードキャストすること、をさらに含み、
前記1つのNVPクラスタにおける何れか1つのNVPは、
前記第2のメッセージが最新にブロードキャストされた後の前記第1の所定時間に、他のNVPによってブロードキャストされた前記第2のメッセージが受信されること、
自身のノード識別子と、前記第1の所定時間に受信した他のNVPによってブロードキャストされた前記第2のメッセージで搬送されるノード識別子とを比較して、自身がプライマリNVPに選出されたか否かを決定すること、
自身がプライマリNVPに選出されたと決定されると、前記第2の通知メッセージは、前記第2の所定時間ごとに同じNVPクラスタ内の他のNVPに送信されること、を実行する、
ことを特徴とする請求項3に記載の方法。
The method includes:
If any one secondary NVP in the one NVP cluster does not receive the second notification message within a third predetermined time period, the second message is broadcast to another NVP in the same NVP cluster; the third predetermined time is longer than the second predetermined time;
When any one NVP in the one NVP cluster receives the second message broadcasted by the one secondary NVP, it sends its own node identifier and the second message broadcasted by the one secondary NVP. broadcasting the second message to other NVPs in the same NVP cluster if it is determined that the one secondary NVP cannot be elected as the primary NVP after comparing the carried node identifiers;
Any one NVP in the one NVP cluster is
the second message broadcast by another NVP is received at the first predetermined time after the second message was most recently broadcast;
Compares its own node identifier with the node identifier carried in the second message broadcast by the other NVP received at the first predetermined time to determine whether or not the node has been elected as the primary NVP. to decide,
When it is determined that the NVP is elected as the primary NVP, the second notification message is sent to other NVPs in the same NVP cluster at the second predetermined time intervals;
4. The method according to claim 3, characterized in that:
前記NVPはノードリストを有し、前記ノードリストは、同じNVPクラスタ内の隣接するNVPのノード識別子を含み、
前記m個のNVPクラスタのそれぞれにおける各NVPが前記第1のメッセージを受信すると、前記第1のメッセージで搬送される前記ブロックをブロックチェーンに記憶し、前記第1のメッセージを同じNVPクラスタ内の隣接するNVPに送信することは、
前記m個のNVPクラスタのそれぞれにおける何れか1つのNVPが、
前記第1のメッセージが受信されると、前記第1のメッセージで搬送される前記ブロックを自身のブロックチェーンに記憶すること、
受信した前記第1のメッセージが対応するVPからのものであると、自身のノード識別子を前記第1のメッセージに追加して、前記第1のメッセージを更新し、更新された前記第1のメッセージを前記ノードリスト内の各ノード識別子によって識別されるNVPに送信すること、
受信した前記第1のメッセージが同じNVPクラスタ内のNVPからのものであると、前記第1のメッセージで搬送されるノード識別子がターゲットノード識別子として決定され、前記第1のメッセージに自身のノード識別子が追加されて、前記第1のメッセージを更新し、更新された前記第1のメッセージが、前記ノードリスト内の前記ターゲットノード識別子以外の他の各ノード識別子によって識別されるNVPに送信されること、を実行する、
ことを含む、
ことを特徴とする請求項1に記載の方法。
the NVP has a node list, the node list including node identifiers of neighboring NVPs in the same NVP cluster;
When each NVP in each of the m NVP clusters receives the first message, it stores the block carried in the first message in the blockchain and transfers the first message to all other NVP clusters in the same NVP cluster. Sending to neighboring NVP is
Any one NVP in each of the m NVP clusters is
storing the block carried in the first message in its own blockchain when the first message is received;
if the received first message is from the corresponding VP, updating the first message by adding its own node identifier to the first message; and updating the first message by adding its own node identifier to the first message; to the NVP identified by each node identifier in the node list;
If the first message received is from an NVP within the same NVP cluster, the node identifier carried in the first message is determined as the target node identifier, and the first message is appended with its own node identifier. is added to update the first message, and the updated first message is sent to the NVP identified by each other node identifier other than the target node identifier in the node list. , execute,
including
2. The method according to claim 1, characterized in that:
前記VPによって生成された前記第1のメッセージは、前記第1のメッセージのメッセージシーケンス番号をさらに搬送し、前記VPによって生成された前記第1のメッセージのメッセージシーケンス番号は、インクリメントされ、前記第1のメッセージで搬送された前記ブロックを自身のブロックチェーンに記憶するステップの前に、前記方法は、
前記第1のメッセージが受信されると、最新に受信された前記第1のメッセージのメッセージシーケンス番号が、前回受信された履歴第1のメッセージのメッセージシーケンス番号よりも大きいとき、前記第1のメッセージで搬送される前記ブロックを自身のブロックチェーンに記憶する前記ステップが実行されること、をさらに含む、
ことを特徴とする請求項5に記載の方法。
The first message generated by the VP further carries a message sequence number of the first message, and the message sequence number of the first message generated by the VP is incremented to Before the step of storing the block conveyed in the message on its own blockchain, the method includes:
When the first message is received, when the message sequence number of the most recently received first message is greater than the message sequence number of the previously received history first message, the first message further comprising: storing the block conveyed on its own blockchain;
6. The method according to claim 5, characterized in that:
前記方法は、
前記m個のNVPクラスタのそれぞれにおける何れか1つのNVPが、
対応するVPによって生成されたチェックメッセージを受信し、前記チェックメッセージは、第1のターゲットブロック識別子および第1のターゲットブロックハッシュ値を搬送すること、
自身のブロックチェーンにおいてブロック識別子が前記第1のターゲットブロック識別子と同じであるブロックである第1のブロックを検索すること、
自身のブロックチェーンにおいて前記第1のブロックが検出されると、前記第1のブロックのブロックハッシュ値が前記第1のターゲットブロックハッシュ値と異なる場合、自身のブロックチェーンから前記第1のブロックを削除すること、を実行する、
ことをさらに含む、
ことを特徴とする請求項1に記載の方法。
The method includes:
Any one NVP in each of the m NVP clusters is
receiving a check message generated by a corresponding VP, the check message carrying a first target block identifier and a first target block hash value;
searching for a first block in its blockchain that is a block whose block identifier is the same as said first target block identifier;
When the first block is detected in the own blockchain, if the block hash value of the first block is different from the first target block hash value, delete the first block from the own blockchain. to do, to carry out,
further including,
2. The method according to claim 1, characterized in that:
前記方法は、
前記m個のNVPクラスタのそれぞれにおける各NVPは、第4の所定時間ごとに、同じNVPクラスタ内の隣接する他のNVPにブロックチェーン状態を送信し、前記ブロックチェーン状態は、自身のノード識別子およびブロックチェーン内の最新のブロックのブロック識別子を含むこと、
前記m個のNVPクラスタのそれぞれにおける何れか1つのNVPは、受信した隣接するNVPから送信された前記ブロックチェーン状態をターゲットブロックチェーン状態として決定し、第5の所定時間にブロックを受信しないと、自身のブロックチェーンにおける最新のブロックのブロック識別子が前記ターゲットブロックチェーン状態におけるブロック識別子よりも小さい場合、前記ターゲットブロックチェーン状態におけるノード識別子によって識別されるターゲットNVPのブロックチェーンから、ブロック識別子が自身のブロックチェーンにおける最新のブロックのブロック識別子よりも大きいブロックを取得し、取得したブロックを自身のブロックチェーンに記憶すること、をさらに含む、
ことを特徴とする請求項1に記載の方法。
The method includes:
Each NVP in each of the m NVP clusters sends a blockchain state to other neighboring NVPs in the same NVP cluster every fourth predetermined time, and the blockchain state is transmitted based on its own node identifier and Containing the block identifier of the most recent block in the blockchain;
Any one NVP in each of the m NVP clusters determines the blockchain state transmitted from the received neighboring NVP as a target blockchain state, and if the block is not received in a fifth predetermined time, If the block identifier of the latest block in the own blockchain is smaller than the block identifier in the target blockchain state, then the block identifier of the own block is removed from the target NVP's blockchain identified by the node identifier in the target blockchain state. further comprising: retrieving a block larger than the block identifier of the most recent block in the chain, and storing the retrieved block in the own blockchain;
2. The method according to claim 1, characterized in that:
前記ブロックチェーン状態は、ブロックチェーンにおける最新のブロックのブロックハッシュ値をさらに含み、前記1つのNVPは、前記ターゲットブロックチェーン状態におけるノード識別子によって識別されるターゲットNVPのブロックチェーンから、ブロック識別子が自身のブロックチェーンにおける最新のブロックのブロック識別子よりも大きいブロックを取得することは、
前記1つのNVPが前記ターゲットブロックチェーン状態におけるノード識別子によって識別される前記ターゲットNVPに第3のメッセージを送信し、前記第3のメッセージは、第2のターゲットブロック識別子、第2のターゲットブロックハッシュ値、および第3のターゲットブロック識別子を搬送し、前記第2のターゲットブロック識別子は、前記ターゲットブロックチェーン状態におけるブロック識別子であり、前記第2のターゲットブロックハッシュ値は、前記ターゲットブロックチェーン状態におけるブロックハッシュ値であり、前記第3のターゲットブロック識別子は、前記1つのNVPのブロックチェーンにおける最新のブロックのブロック識別子であること、
前記ターゲットNVPは、前記第3のメッセージを受信すると、自身のブロックチェーンから第2のブロックを検索し、前記第2のブロックは、ブロック識別子が前記第2のターゲットブロック識別子と同じであるブロックであり、自身のブロックチェーンから前記第2のブロックを検出すると、前記第2のブロックのブロックハッシュ値が前記第2のターゲットブロックハッシュ値と同じである場合、自身のブロックチェーンにおけるブロック識別子が前記第3のターゲットブロック識別子より大きく且つ前記第2のターゲットブロック識別子以下である全てのブロックを前記1つのNVPに送信すること、を含む、
ことを特徴とする請求項8に記載の方法。
The blockchain state further includes a block hash value of the latest block in the blockchain, and the one NVP has a block identifier of its own from the blockchain of the target NVP identified by the node identifier in the target blockchain state. Obtaining a block that is larger than the block identifier of the latest block in the blockchain is
the one NVP sends a third message to the target NVP identified by a node identifier in the target blockchain state, the third message including a second target block identifier, a second target block hash value; , and a third target block identifier, wherein the second target block identifier is a block identifier in the target blockchain state, and the second target block hash value is a block hash value in the target blockchain state. and the third target block identifier is a block identifier of the latest block in the blockchain of the one NVP;
Upon receiving the third message, the target NVP retrieves a second block from its blockchain, the second block being a block whose block identifier is the same as the second target block identifier. If the block hash value of the second block is the same as the second target block hash value, then the block identifier in the own blockchain is the same as the second target block hash value. transmitting all blocks greater than three target block identifiers and less than or equal to the second target block identifier to the one NVP;
9. The method according to claim 8, characterized in that:
前記第1のメッセージは、感染症プロトコルGOSSIPメッセージである、
ことを特徴とする請求項1に記載の方法。
the first message is an infectious disease protocol GOSSIP message;
2. The method according to claim 1, characterized in that:
ブロックチェーンシステムであって、
前記ブロックチェーンシステムは、複数のコンセンサスノードVPおよびm個の非コンセンサスノードNVPクラスタを含み、前記複数のVPのうちのm個のVPは、前記m個のNVPクラスタと1対1で対応し、前記m個のNVPクラスタのそれぞれは、第1のNVPおよび少なくとも1つの第2のNVPを含み、前記第1のNVPは、対応するVPと通信するNVPであり、前記第1のNVPと前記少なくとも1つの第2のNVPのそれぞれとの間にネットワーク経路を有し、前記mは正の整数であり、
前記m個のVPのそれぞれは、前記複数のVPが1つのブロックに対するコンセンサスを完了し、前記ブロックをブロックチェーンに追加したごとに、前記ブロックを搬送する第1のメッセージを、対応するNVPクラスタ内の前記第1のNVPに送信し、
前記m個のNVPクラスタのそれぞれにおける各NVPは、前記第1のメッセージが受信された場合、前記第1のメッセージで搬送される前記ブロックをブロックチェーンに記憶し、前記第1のメッセージを同じNVPクラスタ内の隣接するNVPに送信する、
ことを特徴とするブロックチェーンシステム。
A blockchain system,
The blockchain system includes a plurality of consensus node VPs and m non-consensus node NVP clusters, and m VPs of the plurality of VPs have a one-to-one correspondence with the m NVP clusters, Each of the m NVP clusters includes a first NVP and at least one second NVP, wherein the first NVP is an NVP that communicates with a corresponding VP, and where the first NVP and the at least has a network path between each of the one second NVP, where m is a positive integer;
Each of the m VPs sends a first message carrying said block within the corresponding NVP cluster each time said plurality of VPs complete consensus for a block and add said block to the blockchain. to said first NVP of
Each NVP in each of the m NVP clusters stores the block carried in the first message in a blockchain if the first message is received, and stores the block carried in the first message in the same NVP. Send to neighboring NVPs in the cluster,
A blockchain system characterized by:
コンピュータデバイスであって、
メモリと、プロセッサと、前記メモリに記憶されて前記プロセッサで実行可能なコンピュータプログラムとを含み、前記コンピュータプログラムが前記プロセッサによって実行されると、請求項1~10のいずれか1項に記載の方法が実現される、
ことを特徴とするコンピュータデバイス。
A computer device,
A method according to any one of claims 1 to 10, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, when the computer program is executed by the processor. will be realized,
A computer device characterized by:
コンピュータプログラムが記憶されているコンピュータ読み取り可能な記憶媒体であって、
前記コンピュータプログラムがプロセッサによって実行されると、請求項1~10のいずれか1項に記載の方法が実現される、
ことを特徴とするコンピュータ読み取り可能な記憶媒体。
A computer readable storage medium on which a computer program is stored,
When the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented,
A computer-readable storage medium characterized by:
JP2023134043A 2022-09-01 2023-08-21 Block synchronization method, blockchain system, device and storage medium Pending JP2024035121A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211064387.8 2022-09-01
CN202211064387.8A CN115174598B (en) 2022-09-01 2022-09-01 Block synchronization method, block chain system, device and storage medium

Publications (1)

Publication Number Publication Date
JP2024035121A true JP2024035121A (en) 2024-03-13

Family

ID=83482191

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2023134043A Pending JP2024035121A (en) 2022-09-01 2023-08-21 Block synchronization method, blockchain system, device and storage medium

Country Status (2)

Country Link
JP (1) JP2024035121A (en)
CN (1) CN115174598B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104202430A (en) * 2014-09-26 2014-12-10 浪潮电子信息产业股份有限公司 Colony management system and method based on http protocol
CN108881231A (en) * 2018-06-21 2018-11-23 郑州云海信息技术有限公司 The method, apparatus and storage medium of synchronous account information in a kind of group system
JP6617253B1 (en) * 2019-05-21 2019-12-11 株式会社医療情報技術研究所 Document management system
CN113342893B (en) * 2021-06-09 2022-11-15 网易(杭州)网络有限公司 Node synchronization method and device based on block chain, storage medium and server
CN113395363B (en) * 2021-08-18 2021-10-29 腾讯科技(深圳)有限公司 Data processing method, device and equipment based on block chain and storage medium
CN114218331A (en) * 2021-12-30 2022-03-22 杭州趣链科技有限公司 Data synchronization method, alliance block chain system, electronic device and storage medium

Also Published As

Publication number Publication date
CN115174598A (en) 2022-10-11
CN115174598B (en) 2022-12-27

Similar Documents

Publication Publication Date Title
US10979286B2 (en) Method, device and computer program product for managing distributed system
JP5567683B2 (en) Method and apparatus for locating services in a peer-to-peer network
KR101871383B1 (en) Method and system for using a recursive event listener on a node in hierarchical data structure
US20140089619A1 (en) Object replication framework for a distributed computing environment
US9367261B2 (en) Computer system, data management method and data management program
JP2012174081A (en) Information processing system
CN112311596A (en) Data management method, device, equipment and computer storage medium
KR20090098791A (en) Consistency within a federation infrastructure
CN111338806B (en) Service control method and device
CN111163173B (en) Cluster configuration method and device, server and readable storage medium
EP4198861A1 (en) Information processing method and apparatus for blockchain network, and device and storage medium
US11445013B2 (en) Method for changing member in distributed system and distributed system
CN111400112A (en) Writing method and device of storage system of distributed cluster and readable storage medium
WO2022134797A1 (en) Data fragmentation storage method and apparatus, a computer device, and a storage medium
CN111163148A (en) Synchronization method and related equipment for consensus state of block chain system
CN111935000A (en) Message transmission method and device
CN112328685A (en) Full-peer distributed database data synchronization method
US20190387054A1 (en) Method, electronic device and computer program product for searching for node
JP2024035121A (en) Block synchronization method, blockchain system, device and storage medium
CN109992447B (en) Data copying method, device and storage medium
JP2007074490A (en) Information communication system, node device included therein, information communication method, and information processing program
CN112822528B (en) Live list service system, live list management method, server and medium
CN113518126A (en) Cross fault-tolerant method for alliance chain
CN111813795A (en) Method and apparatus for confirming transactions in a blockchain network
KR102628759B1 (en) System and method for changing a working-shard of an account in blockchain network

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230821