WO2020034866A1 - 一种故障节点检测方法及系统、设备和可存储介质 - Google Patents

一种故障节点检测方法及系统、设备和可存储介质 Download PDF

Info

Publication number
WO2020034866A1
WO2020034866A1 PCT/CN2019/099333 CN2019099333W WO2020034866A1 WO 2020034866 A1 WO2020034866 A1 WO 2020034866A1 CN 2019099333 W CN2019099333 W CN 2019099333W WO 2020034866 A1 WO2020034866 A1 WO 2020034866A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
node
faulty
failed
hash
Prior art date
Application number
PCT/CN2019/099333
Other languages
English (en)
French (fr)
Inventor
何玉斌
王志文
吴思进
Original Assignee
杭州复杂美科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 杭州复杂美科技有限公司 filed Critical 杭州复杂美科技有限公司
Publication of WO2020034866A1 publication Critical patent/WO2020034866A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors

Definitions

  • the present application relates to the technical field of blockchain games, and in particular, to a method and system for detecting a failed node, a device, and a storable medium.
  • the current common block synchronization scheme is for this node to request a block from a connected node and then execute it. If a block requested from a fork node may fail to execute at this node, then request this height from other nodes. Block execution continues. However, when a block request is made next, it will also send a request to the faulty node, and then it still does not pass, and then requests to other nodes, so the efficiency of synchronizing blocks without filtering the faulty nodes is very low.
  • the present invention provides a method for detecting a faulty node, including:
  • the first node When the execution of the first block fails, the first node is marked as a failed node; wherein the first block is obtained synchronously from the first node;
  • the failed node list is used to no longer perform synchronization to the recorded failed nodes when performing block synchronization.
  • marking the first node as the failed node further includes: recording the height of the failed block, the hash of the failed block, and the address of the failed node;
  • Recording the faulty node in the faulty node list further includes: recording the faulty block height, the faulty block hash, and the faulty node address in the faulty node list, where the faulty node address is used to find the faulty node.
  • the method further includes:
  • the first block Before executing the first block, verify that the hash value of the first block is the same as the hash of the failed block recorded in the failed node list at the same block height: if yes, mark the first node as the failed node, and The first block is no longer executed.
  • the first block hash of the height of the failed block is periodically obtained from the first node; it is checked whether the hash of the first block and the hash of the failed block are the same: No, the first node is removed from the list of failed nodes except.
  • the present invention provides a synchronization method, including:
  • Block synchronization is performed according to the filtered list of synchronized nodes.
  • the present invention provides a faulty node detection system, including:
  • a marking unit configured to mark the first node as a failed node when the execution of the first block fails; wherein the first block is obtained synchronously from the first node;
  • the recording unit is configured to record the failed node into a list of failed nodes; wherein the list of failed nodes is used to no longer synchronize to the recorded failed node when performing block synchronization.
  • the marking unit further includes a first recording subunit configured to record a fault block height, a fault block hash, and a fault node address of the first block; the recording unit further includes a second recording subunit configured to The fault block height, fault block hash, and fault node address are recorded in the fault node list.
  • a verification unit is further configured to verify whether the hash value of the first block is the same as the fault block hash recorded in the fault node list under the same block height before executing the first block: yes, The first node is marked as a failed node, and the first block is no longer executed.
  • An information acquisition unit configured to periodically acquire a first block hash of the height of the failed block from the first node
  • the first verification unit is configured to verify whether the hash of the first block is the same as the hash of the failed block: if no, remove the first node from the list of failed nodes.
  • the second verification unit is configured to periodically check whether the second block hash of the current node at the height of the failed block is the same as the hash of the failed block:
  • the present invention further provides an apparatus, including one or more processors and a memory, where the memory contains instructions executable by the one or more processors to cause the one or more processors to perform operations according to the present invention.
  • the method for detecting a failed node provided in the embodiment.
  • the present invention also provides a storage medium storing a computer program, which causes the computer to execute the method for detecting a failed node according to the embodiments of the present invention.
  • the present invention speeds up the block synchronization speed by putting failed nodes in the list of failed nodes to filter out the failed nodes in the synchronized nodes when the blocks are synchronized, and further, by periodically detecting whether the failed nodes are recovered, The failed node is removed from the list of failed nodes.
  • FIG. 1 is a flowchart of a method for detecting a failed node according to an embodiment of the present invention.
  • FIG. 2 is a flowchart of a preferred embodiment of the method shown in FIG. 1. .
  • FIG. 3 is a flowchart of a preferred embodiment of the method shown in FIG. 2.
  • FIG. 4 is a flowchart of a preferred embodiment of the method shown in FIG. 3.
  • FIG. 5 is a flowchart of a block synchronization method according to the present invention.
  • FIG. 6 is a structural diagram of a faulty node detection system provided by the present invention.
  • FIG. 7 is a structural diagram of a preferred embodiment of the system shown in FIG. 6.
  • FIG. 8 is a structural diagram of a preferred embodiment of the system shown in FIG. 7.
  • FIG. 9 is a structural diagram of a preferred embodiment of the system shown in FIG. 8.
  • FIG. 10 is a schematic structural diagram of a device according to an embodiment of the present invention.
  • FIG. 1 is a flowchart of a method for detecting a failed node according to an embodiment of the present invention.
  • the present invention provides a method for detecting a faulty node, including:
  • the failed node list is used to no longer perform synchronization to the recorded failed nodes when performing block synchronization.
  • marking the first node as the failed node further includes: recording the height of the failed block, the hash of the failed block, and the address of the failed node, and the failure The node address is used to query the failed node;
  • Recording a failed node in the list of failed nodes also includes: recording the height of the failed block, the hash of the failed block, and the address of the failed node into the list of failed nodes.
  • the current node wants to synchronize the first block to this node, it sends the first block request information to the first node. After receiving the first block information, the current node performs calculation and execution on the related information of the first block. In step S11, if the execution fails, the first node is marked as a failed node, and the first node is recorded in the failed node list, wherein the content recorded in the failed node list includes the failure area of the first block. The block height, the hash value of the faulty block, and the address of the faulty node. The faulty node address can be used by the current node to quickly query the faulty node. During the block synchronization process, the faulty nodes recorded in the fault list will be filtered out, so that Improved block synchronization efficiency.
  • FIG. 2 is a flowchart of a preferred embodiment of the method shown in FIG. 1. As shown in FIG. 2, in a preferred embodiment, the foregoing method further includes:
  • the first block of the received first block will be first processed.
  • the Greek value is consistent with the hash value of the faulty block recorded in the fault list at the same height as the first block. If they are the same, the first node is marked as a faulty node, and the first One block, the next step is directly executed, that is, the failed node is recorded in the failed node list.
  • FIG. 3 is a flowchart of a preferred embodiment of the method shown in FIG. 2. As shown in FIG. 3, in a preferred embodiment, the above method further includes:
  • the first block hash value of the block with the height of the fault block of the first node is obtained regularly, and the first block hash value is compared with the fault block hash value recorded in the fault list, If they are not consistent, it means that the faulty node is also the first node, and then the faulty block height, faulty block hash, and faulty node address of the first node recorded in the faulty node list are deleted, that is, the first node is removed from the fault. Node list removed. If they are the same, it means that the faulty node (that is, the first node) has not recovered yet, waiting for detection in the next cycle.
  • FIG. 4 is a flowchart of a preferred embodiment of the method shown in FIG. 3. As shown in FIG. 4, in a preferred embodiment, the foregoing method further includes:
  • the hash value of the second block of the current node at the height of the fault block is periodically obtained and compared with the hash value of the fault block. If they are consistent, it indicates that the fault node has recovered, and then the first node is removed from the fault list. Remove, if not consistent, continue to execute the method steps shown in FIG. 3.
  • This embodiment can be applied not only to the current node on the main chain, but also to the case where the current node is on a fork, that is, if the current node is on a fork, at this time, if the same height of the main chain node is synchronized Blocks are always failed to execute, so all nodes on the main chain are placed in the list of failed nodes. However, under the mechanism for processing forks, it will be detected that the current node is on a fork. At this time, The current node's block on the fork will be deleted, and the block of the same height on the main chain will be synchronized. At this time, the current node is on the main chain. At this time, the current node is faulty during the timing detection. The comparison of the hash value of the second block of the block height and the fault hash value is consistent. Then, at this time, each main chain node put into the list of faulty nodes is removed.
  • This embodiment is directed to a case where the current node may be a faulty node, and the faulty node may still be detected and whether the current node is restored to a normal node.
  • FIG. 5 is a block synchronization method provided by the present invention. As shown in FIG. 5, in a preferred embodiment, a block synchronization method includes:
  • FIG. 6 is a structural diagram of a faulty node detection system provided by the present invention. As shown in FIG. 6, in a preferred embodiment, a faulty node detection system includes:
  • a marking unit 61 configured to mark the first node as a failed node when the execution of the first block fails; wherein the first block is obtained synchronously from the first node;
  • a recording unit 62 configured to record a failed node into a list of failed nodes
  • the failed node list is used to no longer perform synchronization to the recorded failed nodes when performing block synchronization.
  • the marking unit 61 further includes a first recording subunit configured to record the fault block height, the fault block hash, and the fault node address of the first block; the recording unit 62 further includes a second record Sub-unit configured to record the height of the failed block, the hash of the failed block, and the address of the failed node into the list of failed nodes.
  • FIG. 7 is a structural diagram of a preferred embodiment of the system shown in FIG. 6.
  • the faulty node detection system further includes a verification unit 63 configured to verify the hash value of the first block at the same block height before executing the first block. Whether the hash of the failed block recorded in the failed node list is the same: If yes, the first node is marked as the failed node, and the first block is no longer executed.
  • FIG. 8 is a structural diagram of a preferred embodiment of the system shown in FIG. 7. As shown in FIG. 8, in a preferred embodiment, the faulty node detection system further includes:
  • the information obtaining unit 64 is configured to periodically obtain a first block hash of the height of the failed block from the first node;
  • the first verification unit 65 is configured to verify whether the hash of the first block and the hash of the failed block are the same: if not, remove the first node from the list of failed nodes.
  • FIG. 9 is a structural diagram of a preferred embodiment of the system shown in FIG. 8. As shown in FIG. 9, in a preferred embodiment, the foregoing system further includes:
  • the second verification unit 66 is configured to periodically check whether the second block hash of the current node at the height of the failed block is the same as the hash of the failed block:
  • FIG. 10 is a schematic structural diagram of a device according to an embodiment of the present invention.
  • the present application further provides a device 100 including one or more central processing units (CPU) 101, which may be based on a program stored in a read-only memory (ROM) 102 or The program loaded from the storage section 108 into the random access memory (RAM) 103 performs various appropriate actions and processes.
  • ROM read-only memory
  • RAM random access memory
  • various programs and data necessary for the operation of the device 100 are also stored.
  • the CPU 101, the ROM 102, and the RAM 103 are connected to each other through a bus 104.
  • An input / output (I / O) interface 105 is also connected to the bus 104.
  • the following components are connected to the I / O interface 105: an input portion 106 including a keyboard, a mouse, and the like; an output portion 107 including a cathode ray tube (CRT), a liquid crystal display (LCD), and the speaker; a storage portion 108 including a hard disk and the like ; And a communication section 109 including a network interface card such as a LAN card, a modem, and the like.
  • the communication section 109 performs communication processing via a network such as the Internet.
  • the driver 110 is also connected to the I / O interface 105 as needed.
  • a removable medium 111 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 110 as necessary, so that a computer program read therefrom is installed into the storage section 108 as necessary.
  • the method for detecting a failed node described in any of the above embodiments may be implemented as a computer software program.
  • embodiments of the present disclosure include a computer program product including a computer program tangibly embodied on a machine-readable medium, the computer program containing program code for performing a failed node detection method.
  • the computer program may be downloaded and installed from a network through the communication section 109, and / or installed from a removable medium 111.
  • the present application further provides a computer-readable storage medium.
  • the computer-readable storage medium may be a computer-readable storage medium included in the device of the foregoing embodiment; it may also exist alone and not assembled Computer-readable storage media in a device.
  • the computer-readable storage medium stores one or more programs, and the programs are used by one or more processors to execute the faulty node detection method described in this application.
  • each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, which contains one or more functions to implement a specified logical function Executable instructions.
  • the functions noted in the blocks may also occur in a different order than those marked in the drawings. For example, two blocks represented one after the other may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved.
  • each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts can be implemented by a dedicated hardware-based system that performs the specified function or operation , Or it can be implemented by a combination of dedicated hardware and computer instructions.
  • each unit may be a software program provided in a computer or a mobile smart device, or may be a separately configured hardware device.
  • the names of these units or modules do not in any way constitute a limitation on the units or modules themselves.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Hardware Redundancy (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本发明提供一种故障节点检测方法及系统、设备和可存储介质,其特征在于,包括:当第一区块执行失败时,将第一节点标记为故障节点;其中,所述第一区块从所述第一节点同步获得;将所述故障节点记录到故障节点列表中;其中,所述故障节点列表用于在进行区块同步时不再向所记录的故障节点进行同步。本发明通过将执行不通过的节点放入故障节点列表中,使区块同步时过滤掉同步节点中的故障节点,提高了区块同步的效率。

Description

一种故障节点检测方法及系统、设备和可存储介质 技术领域
本申请涉及区块链游戏技术领域,具体涉及一种故障节点检测方法及系统、设备和可存储介质。
背景技术
目前常见的区块同步方案为本节点向所连接的节点请求区块然后执行,如果从某个分叉节点请求过来的区块在本节点可能执行不通过,然后再向其他节点请求此高度的区块继续执行。然而在接下来进行区块请求时,还会向该故障节点发送请求,然后还是不通过,再向其他节点请求,这样在不能过滤故障节点的前提下同步区块的效率很低。
发明内容
鉴于现有技术中的上述缺陷或不足,期望提供一种能够过滤故障节点的故障节点检测方法及系统、设备和可存储介质。
第一方面,本发明提供一种故障节点检测方法,包括:
当第一区块执行失败时,将第一节点标记为故障节点;其中,第一区块从第一节点同步获得;
将故障节点记录到故障节点列表中;
其中,故障节点列表用于在进行区块同步时不再向所记录的故障节点进行同步。
进一步,当第一区块执行失败时,将第一节点标记为故障节点还包括:记录第一区块的故障区块高度、故障区块哈希和故障节点地址;
将故障节点记录到故障节点列表中还包括:将故障区块高度、故障区块哈希和故障节点地址记录到故障节点列表中,其中所述故障节点地址用于查找出现故障的节点。
进一步,当第一区块执行失败时,将第一节点标记为故障节点之前还包括:
执行第一区块前,在相同区块高度下校验第一区块的哈希值与故障节点列表记录的故障区块哈希是否相同:是,则将第一节点标记为故障节点,并不再执行第一区块。
进一步,定时向第一节点获取故障区块高度的第一区块哈希;校验第一区块哈希与故障区块哈希是否相同:否,则将第一节点从故障节点列表中移除。
进一步,定时校验当前节点在故障区块高度的第二区块哈希与故障区块哈希是否相同:
是,则将第一节点从故障节点列表中移除;
否,则执行定时向第一节点获取故障区块高度的第一区块哈希以及后续步骤。
第二方面,本发明提供一种同步方法,包括:
在同步节点列表中过滤按照故障节点检测方法生成的故障节点列表所记录的故障节点;
根据过滤后的同步节点列表进行区块同步。
第三方面,本发明提供一种故障节点检测系统,包括:
标记单元,配置用于当第一区块执行失败时,将第一节点标记为故障节点;其中,第一区块从第一节点同步获得;
记录单元,配置用于将故障节点记录到故障节点列表中;其中,故障节点列表用于在进行区块同步时不再向所记录的故障节点进行同步。
进一步,标记单元还包括第一记录子单元,配置用于记录第一区块的故障区块高度、故障区块哈希和故障节点地址;记录单元还包括第二记录子单元,配置用于将故障区块高度、故障区块哈希和故障节点地址记录到故障节点列表中。
进一步,还包括校验单元,配置用于执行第一区块前,在相同区块高度下校验第一区块的哈希值与故障节点列表记录的故障区块哈希是否相同:是,则将第一节点标记为故障节点,并不再 执行第一区块。
进一步,还包括:
信息获取单元,配置用于定时向第一节点获取故障区块高度的第一区块哈希;
第一验证单元,配置用于校验第一区块哈希与故障区块哈希是否相同:否,则将第一节点从故障节点列表中移除。
进一步,还包括:
第二验证单元,配置用于定时校验当前节点在故障区块高度的第二区块哈希与故障区块哈希是否相同:
是,则将第一节点从故障节点列表中移除;
否,则执行定时向第一节点获取故障区块高度的第一区块哈希以及后续步骤。
第四方面,本发明还提供一种设备,包括一个或多个处理器和存储器,其中存储器包含可由该一个或多个处理器执行的指令以使得该一个或多个处理器执行根据本发明各实施例提供的故障节点检测方法。
第五方面,本发明还提供一种存储有计算机程序的存储介质,该计算机程序使计算机执行根据本发明各实施例提供的故障节点检测方法。
本发明的有益效果:
本发明通过将执行不通过的节点放入故障节点列表中,使区块同步时过滤掉同步节点中的故障节点,加快了区块同步的速度,进一步,通过定时检测故障节点是否恢复,及时将故障节点从故障节点列表中移除。
附图说明
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本申请的其它特征、目的和优点将会变得更明显:
图1为本发明一实施例提供的一种故障节点检测方法的流程图。
图2为图1所示方法一优选实施方式的流程图。.
图3为图2所示方法一优选实施方式的流程图。
图4为图3所示方法的一种优选实施方式的流程图。
图5为本发明还提供了一种区块同步方法流程图。
图6为本发明提供的故障节点检测系统的结构图。
图7为图6所示系统的一种优选实施方式的结构图。
图8为图7所示系统的一种优选实施方式的结构图。
图9为图8所示系统的一种优选实施方式的结构图。
图10为本发明一实施例提供的一种设备的结构示意图。
具体实施方式
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释相关发明,而非对该发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与发明相关的部分。
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。
图1为本发明一实施例提供的一种故障节点检测方法的流程图。
如图1所示,在本实施例中,本发明提供一种故障节点检测方法,包括:
S11、当第一区块执行失败时,将第一节点标记为故障节点;其中,第一区块从第一节点同步获得;
S12、将故障节点记录到故障节点列表中;
其中,故障节点列表用于在进行区块同步时不再向所记录的故障节点进行同步。
在一优选实施例中,当第一区块执行失败时,将第一节点标记为故障节点还包括:记录第一区块的故障区块高度、故障区块哈希和故障节点地址,该故障节点地址用于查询出现故障的节点;
将故障节点记录到故障节点列表中还包括:将故障区块高度、 故障区块哈希和故障节点地址记录到故障节点列表中。
具体地,当前节点要同步第一区块到本节点,则向第一节点发送第一区块请求信息,当前节点接收到第一区块信息后,对第一区块的相关信息进行计算执行,在步骤S11中,若执行失败,则将第一节点标记为故障节点,并将该第一节点记录到故障节点列表中,其中记录到故障节点列表中的内容包括第一区块的故障区块高度,故障区块哈希值和故障节点地址,该故障节点地址可以供当前节点快速查询到出现故障的节点,在区块同步过程中,会过滤掉故障列表中记录的故障节点,从而使区块同步效率提高。
图2为图1所示方法一优选实施方式的流程图。如图2所示,在一优选实施例中,上述方法还包括:
S10、执行第一区块前,在相同区块高度下校验第一区块的哈希值与故障节点列表记录的故障区块哈希是否相同:是,则将第一节点标记为故障节点,并不再执行第一区块。
具体地,仍以图1所示为例,在当前节点收到第一节点的第一区块的相关信息后,在执行计算之前,先将收到的第一区块的第一区块哈希值与故障列表中记录的与第一区块高度相同高度下故障节点的故障区块哈希值对比是否一致,若一致,则将该第一节点标记为故障节点,且不再执行该第一区块,直接执行下一步,即,将故障节点记录到故障节点列表中。
图3为图2所示方法一优选实施方式的流程图。如图3所示,在一优选实施例中,上述方法还包括:
S13、定时向第一节点获取故障区块高度的第一区块哈希;
校验第一区块哈希与故障区块哈希是否相同:否,则将第一节点从故障节点列表中移除。
具体地,通过定时获取第一节点的故障区块高度的区块的第一区块哈希值,并将第一区块哈希值和记录在故障列表中的故障区块哈希值对比,若不一致,说明故障节点也就是第一节点已经恢复,则将故障节点列表里面记录的第一节点的故障区块高度,故障区块哈希和故障节点地址等信息删除,即将第一节点从故障 节点列表中移除。若一致,则说明故障节点(即第一节点)还没有恢复,等待下一个周期的检测。
图4为图3所示方法的一种优选实施方式的流程图。如图4所示,在一优选实施例中,上述方法还包括:
S14、定时校验当前节点在故障区块高度的第二区块哈希与故障区块哈希是否相同:
是,则将第一节点从故障节点列表中移除;
否,则执行定时向第一节点获取故障区块高度的第一区块哈希以及后续步骤。
具体地,定时获取当前节点在故障区块高度的第二区块哈希值,并与故障区块哈希值进行对比,若一致,说明故障节点已经恢复,则将第一节点从故障列表中移除,若不一致,则继续执行图3所示的方法步骤。
本实施例不仅可以适用于当前节点为主链上的节点,还适用于当前节点为分叉上的情况,即:若当前节点在分叉上,这时,如果同步主链节点的同高度的区块,则总是执行不通过的,因此会将主链上的节点全都放入故障节点列表中,然而,在处理分叉的机制下,会检测到当前节点处于分叉上,这时便会将当前节点处在分叉上的区块删除,并同步主链上的同高度区块,这时,当前节点就处于主链上了,这时,在定时检测时,将当前节点在故障区块高度的第二区块哈希值与故障哈希值对比就是一致的,那么,这时候,被放入故障节点列表的各主链节点均被移除。
本实施例针对有可能是当前节点是故障节点的情况下,仍然可以将故障节点检测出来并判断当前节点是否恢复为正常节点。
图5为本发明还提供了一种区块同步方法,如图5所示,在一优选实施例中,一种区块同步方法,包括:
S15、在同步节点列表中过滤按照故障节点检测方法生成的故障节点列表所记录的故障节点;
S16、根据过滤后的同步节点列表进行区块同步。
图6为本发明提供的故障节点检测系统的结构图。如图6所 示,在一优选实施例中,一种故障节点检测系统,包括:
标记单元61,配置用于当第一区块执行失败时,将第一节点标记为故障节点;其中,第一区块从第一节点同步获得;
记录单元62,配置用于将故障节点记录到故障节点列表中;
其中,故障节点列表用于在进行区块同步时不再向所记录的故障节点进行同步。
在一优选实施例中,标记单元61还包括第一记录子单元,配置用于记录第一区块的故障区块高度、故障区块哈希和故障节点地址;记录单元62还包括第二记录子单元,配置用于将故障区块高度、故障区块哈希和故障节点地址记录到故障节点列表中。
图7为图6所示系统的一种优选实施方式的结构图。如图7所示,在一优选实施例中,故障节点检测系统还包括校验单元63,配置用于执行第一区块前,在相同区块高度下校验第一区块的哈希值与故障节点列表记录的故障区块哈希是否相同:是,则将第一节点标记为故障节点,并不再执行第一区块。
图8为图7所示系统的一种优选实施方式的结构图。如图8所示,在一优选实施例中,故障节点检测系统还包括:
信息获取单元64,配置用于定时向第一节点获取故障区块高度的第一区块哈希;
第一验证单元65,配置用于校验第一区块哈希与故障区块哈希是否相同:否,则将第一节点从故障节点列表中移除。
图9为图8所示系统的一种优选实施方式的结构图。如图9所示,在一优选实施例中,上述系统还包括:
第二验证单元66,配置用于定时校验当前节点在故障区块高度的第二区块哈希与故障区块哈希是否相同:
是,则将第一节点从故障节点列表中移除;
否,则执行定时向第一节点获取故障区块高度的第一区块哈希以及后续步骤。
图10为本发明一实施例提供的一种设备的结构示意图。
如图10所示,作为另一方面,本申请还提供了一种设备100, 包括一个或多个中央处理单元(CPU)101,其可以根据存储在只读存储器(ROM)102中的程序或者从存储部分108加载到随机访问存储器(RAM)103中的程序而执行各种适当的动作和处理。在RAM103中,还存储有设备100操作所需的各种程序和数据。CPU101、ROM102以及RAM103通过总线104彼此相连。输入/输出(I/O)接口105也连接至总线104。
以下部件连接至I/O接口105:包括键盘、鼠标等的输入部分106;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分107;包括硬盘等的存储部分108;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分109。通信部分109经由诸如因特网的网络执行通信处理。驱动器110也根据需要连接至I/O接口105。可拆卸介质111,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器110上,以便于从其上读出的计算机程序根据需要被安装入存储部分108。
特别地,根据本公开的实施例,上述任一实施例描述的故障节点检测方法可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括有形地包含在机器可读介质上的计算机程序,计算机程序包含用于执行故障节点检测方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分109从网络上被下载和安装,和/或从可拆卸介质111被安装。
作为又一方面,本申请还提供了一种计算机可读存储介质,该计算机可读存储介质可以是上述实施例的装置中所包含的计算机可读存储介质;也可以是单独存在,未装配入设备中的计算机可读存储介质。计算机可读存储介质存储有一个或者一个以上程序,该程序被一个或者一个以上的处理器用来执行描述于本申请的故障节点检测方法。
附图中的流程图和框图,图示了按照本发明各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一 个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这根据所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以通过执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以通过专用硬件与计算机指令的组合来实现。
描述于本申请实施例中所涉及到的单元或模块可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元或模块也可以设置在处理器中,例如,各单元可以是设置在计算机或移动智能设备中的软件程序,也可以是单独配置的硬件装置。其中,这些单元或模块的名称在某种情况下并不构成对该单元或模块本身的限定。
以上描述仅为本申请的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本申请中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离本申请构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本申请中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。

Claims (13)

  1. 一种故障节点检测方法,其特征在于,包括:
    当第一区块执行失败时,将第一节点标记为故障节点;其中,所述第一区块从所述第一节点同步获得;
    将所述故障节点记录到故障节点列表中;
    其中,所述故障节点列表用于在进行区块同步时不再向所记录的故障节点进行同步。
  2. 根据权利要求1所述的方法,其特征在于,所述当第一区块执行失败时,将第一节点标记为故障节点还包括:记录所述第一区块的故障区块高度、故障区块哈希和故障节点地址,其中所述故障节点地址用于查找出现故障的节点;
    所述将所述故障节点记录到故障节点列表中还包括:将所述故障区块高度、故障区块哈希和所述故障节点地址记录到所述故障节点列表中。
  3. 根据权利要求2所述的方法,其特征在于,所述当第一区块执行失败时,将第一节点标记为故障节点之前还包括:
    执行所述第一区块前,在相同区块高度下校验所述第一区块的哈希值与所述故障节点列表记录的所述故障区块哈希是否相同:是,则将所述第一节点标记为故障节点,并不再执行所述第一区块。
  4. 根据权利要求2或3所述的方法,其特征在于,还包括:
    定时向所述第一节点获取所述故障区块高度的第一区块哈希;
    校验所述第一区块哈希与所述故障区块哈希是否相同:否,则将所述第一节点从所述故障节点列表中移除。
  5. 根据权利要求4所述的方法,其特征在于,还包括:
    定时校验当前节点在所述故障区块高度的第二区块哈希与所述故障区块哈希是否相同:
    是,则将所述第一节点从所述故障节点列表中移除;
    否,则执行所述定时向所述第一节点获取所述故障区块高度的第一区块哈希以及后续步骤。
  6. 一种区块同步方法,其特征在于,包括:
    在同步节点列表中过滤如权利要求1-5任一项所述方法生成的故障节点列表所记录的故障节点;
    根据过滤后的同步节点列表进行区块同步。
  7. 一种故障节点检测系统,其特征在于,包括:
    标记单元,配置用于当第一区块执行失败时,将第一节点标记为故障节点;其中,所述第一区块从所述第一节点同步获得;
    记录单元,配置用于将所述故障节点记录到故障节点列表中;
    其中,所述故障节点列表用于在进行区块同步时不再向所记录的故障节点进行同步。
  8. 根据权利要求7所述的系统,其特征在于,所述标记单元还包括第一记录子单元,配置用于记录所述第一区块的故障区块高度、故障区块哈希和故障节点地址;所述记录单元还包括第二记录子单元,配置用于将所述故障区块高度、故障区块哈希和所述故障节点地址记录到所述故障节点列表中。
  9. 根据权利要求8所述的系统,其特征在于,还包括:
    校验单元,配置用于执行所述第一区块前,在相同区块高度下校验所述第一区块的哈希值与所述故障节点列表记录的所述故障区块哈希是否相同:是,则将所述第一节点标记为故障节点,并不再执行所述第一区块。
  10. 根据权利8或9所述的系统,其特征在于,还包括:
    信息获取单元,配置用于定时向所述第一节点获取所述故障区块高度的第一区块哈希;
    第一验证单元,配置用于校验所述第一区块哈希与所述故障区块哈希是否相同:否,则将所述第一节点从所述故障节点列表中移除。
  11. 根据权利要求10所述的系统,其特征在于,还包括:
    第二验证单元,配置用于定时校验当前节点在所述故障区块高度的第二区块哈希与所述故障区块哈希是否相同:
    是,则将所述第一节点从所述故障节点列表中移除;
    否,则执行所述定时向所述第一节点获取所述故障区块高度的第一区块哈希以及后续步骤。
  12. 一种设备,其特征在于,所述设备包括:
    一个或多个处理器;
    存储器,用于存储一个或多个程序,
    当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器执行如权利要求1-6任一项所述的方法。
  13. 一种存储有计算机程序的存储介质,其特征在于,该程序被处理器执行时实现如权利要求1-6任一项所述的方法。
PCT/CN2019/099333 2018-08-13 2019-08-06 一种故障节点检测方法及系统、设备和可存储介质 WO2020034866A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810918776.XA CN109391510B (zh) 2018-08-13 2018-08-13 一种故障节点检测方法及系统、设备和可存储介质
CN201810918776.X 2018-08-13

Publications (1)

Publication Number Publication Date
WO2020034866A1 true WO2020034866A1 (zh) 2020-02-20

Family

ID=65417569

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/099333 WO2020034866A1 (zh) 2018-08-13 2019-08-06 一种故障节点检测方法及系统、设备和可存储介质

Country Status (2)

Country Link
CN (1) CN109391510B (zh)
WO (1) WO2020034866A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109391510B (zh) * 2018-08-13 2021-12-10 杭州复杂美科技有限公司 一种故障节点检测方法及系统、设备和可存储介质
CN111737360B (zh) * 2020-07-21 2020-12-15 腾讯科技(深圳)有限公司 基于区块链的设备管理方法、装置、计算机设备
CN117075802B (zh) * 2023-08-04 2024-05-10 上海虹港数据信息有限公司 一种基于人工智能算力的分布式存储方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5995981A (en) * 1997-06-16 1999-11-30 Telefonaktiebolaget Lm Ericsson Initialization of replicated data objects
CN104679611A (zh) * 2015-03-05 2015-06-03 浙江宇视科技有限公司 数据资源复制方法以及装置
CN108134706A (zh) * 2018-01-02 2018-06-08 中国工商银行股份有限公司 区块链多活高可用系统、计算机设备以及方法
CN109391510A (zh) * 2018-08-13 2019-02-26 杭州复杂美科技有限公司 一种故障节点检测方法及系统、设备和可存储介质

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106506203B (zh) * 2016-10-25 2019-12-10 杭州云象网络技术有限公司 一种应用于区块链的节点监控系统
CN107608826A (zh) * 2017-09-19 2018-01-19 郑州云海信息技术有限公司 一种存储集群的节点的故障恢复方法、装置及介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5995981A (en) * 1997-06-16 1999-11-30 Telefonaktiebolaget Lm Ericsson Initialization of replicated data objects
CN104679611A (zh) * 2015-03-05 2015-06-03 浙江宇视科技有限公司 数据资源复制方法以及装置
CN108134706A (zh) * 2018-01-02 2018-06-08 中国工商银行股份有限公司 区块链多活高可用系统、计算机设备以及方法
CN109391510A (zh) * 2018-08-13 2019-02-26 杭州复杂美科技有限公司 一种故障节点检测方法及系统、设备和可存储介质

Also Published As

Publication number Publication date
CN109391510B (zh) 2021-12-10
CN109391510A (zh) 2019-02-26

Similar Documents

Publication Publication Date Title
WO2020034866A1 (zh) 一种故障节点检测方法及系统、设备和可存储介质
US8352490B2 (en) Method and system for locating update operations in a virtual machine disk image
CN107004010B (zh) 控制多数据库系统
CN104951474B (zh) 一种用于获取MySQL binlog增量日志的方法和装置
US8380678B2 (en) Tracking files which have been processed by a backup or a restore operation
WO2017096968A1 (zh) 日志上传方法及装置
CN104202375A (zh) 同步数据的方法及系统
WO2016058333A1 (zh) 数据库的数据恢复方法、设备及计算机存储介质
BR112012008917A2 (pt) método para implementar sincronização de dados entre um banco de dados fonte e um banco de dados alvo, dispositivo de sincronização e sistema de sincronização
WO2017113694A1 (zh) 文件同步方法、装置及系统
US20160041886A1 (en) Data storage upon database failure
JP6455898B2 (ja) データ複製の方法、一次データストレージコントローラ、装置、システム、及びプログラム
CN111737230A (zh) 数据校验方法、装置、电子设备以及可读存储介质
US10795910B2 (en) Robust communication system for guaranteed message sequencing with the detection of duplicate senders
WO2019237574A1 (zh) 一种数据库差异的识别方法及装置
CN111538719A (zh) 数据迁移方法、装置、设备及计算机存储介质
US8271454B2 (en) Circular log amnesia detection
CN108228789B (zh) 从节点触发的同步异常恢复方法及装置
US20120317443A1 (en) Virtual debugging sessions
CN107316176A (zh) 保单处理的控制方法和装置
CN109299116B (zh) 一种数据同步方法、装置、设备及可读存储介质
CN113254394B (zh) 一种快照处理方法、系统、设备及存储介质
CN110675148B (zh) 一种验证节点集合的同步方法、系统及电子设备
WO2016095644A1 (zh) 数据库的高可用解决方法和装置
WO2020253078A1 (zh) 轻量级请求的并发处理方法及相关设备

Legal Events

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

Ref document number: 19849337

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19849337

Country of ref document: EP

Kind code of ref document: A1