Anchor node fraud detection method, device, medium and equipment
By dividing regional blocks in the alliance chain and adopting anchor node voting and hash signature verification mechanisms, the problem of difficult data identification caused by complex transmission paths in the alliance chain is solved, and communication efficiency and transaction credibility are improved.
Patent Information
- Application Number
- CN202011209080.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-03
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2040-11-03
AI Technical Summary
The independent working of each node in the alliance chain leads to the complex transmission path and verification methods, and it is difficult to identify forged data.
By dividing the blockchain network into multiple regional blocks, nodes in each regional block vote to select anchor nodes, and through hash operation and signature verification mechanisms, other regional blocks vote to verify the verification information of transaction initiator, and decide to The credibility of the anchor node.
It improves the communication efficiency between cross-domain blocks, ensures the credibility of transaction initiators, and solves the problem of difficult to identify forged data.
Smart Images

Figure CN112307447B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of blockchain technology, and more specifically, to a method, device, medium and equipment for detecting anchor node fraud. Background Art
[0002] With the rapid development in recent years, blockchain, as the core of its underlying technology, has also come into people's sight. The consensus mechanism, as the core of blockchain technology, has attracted great attention and widespread concern from government departments, financial institutions, technology companies and capital markets. In the research of related consensus algorithms, Proof of Work (PoW) ensures the reliability of information on the entire network through computing power competition, but there is a serious problem of computing power waste. Therefore, some digital currency enthusiasts in the Bitcointalk forum proposed Proof of Stake (PoS), which greatly reduces resource consumption by introducing coin age. On this basis, the Larimer team proposed the Delegate Proof of Stake (DPoS) algorithm in March 2014 to further improve the accounting speed. However, the consensus speed of a single blockchain at this stage still cannot effectively meet the actual social needs. Compared with the throughput of more than 10,000 transactions per second of the traditional centralized settlement system, blockchain still has a large performance gap.
[0003] In the prior art, the concept of consortium chain is proposed. The consortium chain is only for members of a specific group and limited third parties. It designates multiple pre-selected nodes as account keepers, and the generation of each block is jointly decided by all pre-selected nodes.
[0004] For the alliance chain, since each node on the alliance chain works independently, the transmission path and verification methods are relatively complicated, resulting in very poor timeliness of data transmission, which brings about the technical problem of difficulty in identifying forged data. Summary of the invention
[0005] In order to solve the technical problem that each node in the alliance chain of the prior art works independently, the transmission path and verification means are complicated, and the forged data is difficult to identify, the present disclosure provides a method for detecting anchor node fraud in the alliance chain sharding consensus system, including:
[0006] Divide the blockchain network into N geographical blocks P i , i=1, 2, ..., N, where N is an integer greater than 2;
[0007] Each of the area blocks P i The nodes in the vote are selected to represent the regional block P i The anchor node of all nodes;
[0008] When a transaction initiator is in the region block P i When initiating a transaction, the region block P i The anchor node of the region sends verification information to the anchor nodes of other region blocks;
[0009] Other regional blocks vote to verify the verification information of the transaction initiator, and the result of the vote determines the regional block P where the transaction initiator initiates the transaction. i Whether the anchor node is a trusted anchor node.
[0010] Furthermore, when a transaction initiator is in the region block P i When initiating a transaction, the region block P i The anchor node of the region sends verification information to the anchor nodes of other region blocks, including:
[0011] When a transaction initiator is in the region block P i When initiating a transaction, the region block P i The anchor node sends verification information including transaction information and the first hash value after the transaction information is hashed to the anchor nodes of other regional blocks.
[0012] Further, the first hash value after the hash operation is calculated using the region block P i The private key is used to encrypt the encrypted signature, and the signature and transaction information are used as the verification information.
[0013] Furthermore, the other regional blocks vote to verify the verification information of the transaction initiator, and the result of the vote determines the regional block P where the transaction initiator initiates the transaction. i The specific process of determining whether a node is a trusted anchor node is as follows:
[0014] Other regional blocks respectively perform hash operations on the transaction information to obtain a second hash value;
[0015] Compare and verify whether the first hash value and the second hash value are consistent. If they are consistent, the verification is passed, and the transaction initiator initiates the transaction in the region block P i The anchor node is a trusted anchor node.
[0016] Furthermore, the other regional blocks vote to verify the verification information of the transaction initiator, and the result of the vote determines the regional block P where the transaction initiator initiates the transaction. i The specific process of determining whether a node is a trusted anchor node is as follows:
[0017] The other regional blocks are respectively i decrypting the signature using the public key to obtain the first hash value;
[0018] Other regional blocks respectively perform hash operations on the transaction information to obtain a second hash value;
[0019] Compare and verify whether the first hash value and the second hash value are consistent. If they are consistent, the verification is successful, and the anchor node of the regional block Pi where the transaction initiator initiates the transaction is a trusted anchor node.
[0020] Furthermore, the blockchain network is divided into N regional blocks Pi as follows:
[0021] Divide all nodes in the blockchain network into N regional blocks P according to their geographical locations i , i=1, 2,…, N, where N is an integer greater than 2.
[0022] Furthermore, it also includes:
[0023] If the region block P where the transaction is initiated i The anchor node of the region block P is an untrusted anchor node. i Re-vote to elect a new node to represent the regional block P i The anchor node.
[0024] In order to achieve the above technical objectives, the present disclosure can also provide an anchor node fraud detection device in a consortium chain sharding consensus system, comprising:
[0025] The block module is used to divide the blockchain network into N regional blocks P i , i=1, 2, ..., N, where N is an integer greater than 2;
[0026] Anchor node selection module, used for each of the area blocks P i The nodes in the vote are selected to represent the regional block P i The anchor node of all nodes;
[0027] The sending module is used when a transaction initiator is in the region block P i When initiating a transaction, the anchor node of the regional block Pi sends verification information to the anchor nodes of other regional blocks;
[0028] The verification module is used by other regional blocks to vote on the verification information of the transaction initiator. The result of the voting verification determines the regional block P where the transaction initiator initiates the transaction. i Whether it is a trusted anchor node.
[0029] In order to achieve the above technical objectives, the present disclosure can also provide a computer storage medium on which a computer program is stored. When the computer program is executed by a processor, it is used to implement the steps of the above-mentioned anchor node fraud detection method in the alliance chain sharding consensus system.
[0030] In order to achieve the above technical objectives, the present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above-mentioned anchor node fraud detection method in the alliance chain sharding consensus system are implemented.
[0031] The beneficial effects of the present disclosure are:
[0032] The present invention provides a method for detecting anchor node fraud in a sharding consensus system, which ensures the credibility of the transaction initiator, greatly improves the efficiency of intercommunication between cross-domain blocks, and solves the technical problem of the difficulty in identifying forged data in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 A schematic diagram of the process of embodiment 1 of the present disclosure is shown;
[0034] Figure 2 A schematic diagram of the process of Embodiment 2 of the present disclosure is shown;
[0035] Figure 3 A schematic diagram of the structure of Embodiment 3 of the present disclosure is shown;
[0036] Figure 4 A structural schematic diagram of Example 4 of the present disclosure is shown. DETAILED DESCRIPTION
[0037] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0038] Various structural schematic diagrams according to embodiments of the present disclosure are shown in the accompanying drawings. These figures are not drawn to scale, and some details are magnified and some details may be omitted for the purpose of clear expression. The shapes of various regions and layers shown in the figures and the relative sizes and positional relationships therebetween are only exemplary, and may deviate in practice due to manufacturing tolerances or technical limitations, and those skilled in the art may further design regions / layers with different shapes, sizes, and relative positions according to actual needs.
[0039] Blockchain is a distributed shared accounting technology. What it aims to do is to enable all parties involved to establish a trust relationship at the technical level. Blockchain can be roughly divided into blockchain underlying technology and blockchain upper-layer applications. The so-called blockchain application is the transformation, optimization or innovation of blockchain technology. The core significance of blockchain technology is to establish data credit between participants.
[0040] The application of blockchain technology is far beyond the financial industry. Communication operators are also enthusiastic about it, especially in the field of telecom operators, where blockchain technology is becoming a new favorite. Blockchain technology can be understood as a role of network infrastructure similar to the TCP / IP protocol. It will be one of the key infrastructure elements supporting the new Internet industry characterized by peer-to-peer openness in the future, and will further affect the specific application forms of many industries, just like the impact of the Web on industries around the world.
[0041] In the field of communications, information is traditionally transmitted point-to-point, which allows trackers to intercept information by tracking the path of information transmission, which brings a security issue, and thus creates an urgent need to ensure the absolute security of the information transmission path. The principle of blockchain technology may just help solve this problem. The new application of blockchain in the field of communications can completely change the channels of information transmission and fundamentally solve the problem of information transmission path security. Blockchain technology opens a door to changes in the future communication information transmission mode.
[0042] Embodiment 1:
[0043] like Figure 1 As shown:
[0044] The present disclosure provides a method for detecting anchor node fraud in a consortium chain sharding consensus system, comprising:
[0045] S1: Divide the blockchain network into N geographical blocks P i , i=1, 2…, N, where N is an integer greater than 2.
[0046] Preferably, the blockchain network can be divided into N geographical blocks P according to the geographical location area. i , i=1, 2, ..., N, where N is an integer greater than 2;
[0047] The geographical location area may be:
[0048] The global blockchain network is divided into four regional blocks according to geographical locations: European block, Asian block, American block and other regional blocks.
[0049] S2: Each of the area blocks P i The nodes in vote to select the anchor node representing all nodes of the regional block Pi;
[0050] Specifically,
[0051] The supervisory node receives voting announcement information broadcasted by the voting initiator node in the blockchain network, wherein the voting announcement information includes: voting qualification conditions, identification information of the supervisory node, information to be voted, voting deadline and voting rules.
[0052] The blockchain network includes the voting initiator node, the supervisory node, the accounting node and the node to be voted.
[0053] The initiator node of electronic voting can be any participating node in the blockchain network. That is to say, any participating node in the blockchain network can serve as the initiator node of a vote. The initiator node can set the qualification conditions that the voting node needs to meet, as well as the specific information to be voted.
[0054] The supervisory node can be a database that stores complete user identity information. The supervisory node can generate the identity authentication information of the voting node according to the qualification conditions of the voting node. The supervisory node can be a notarized third-party node. For example, when selecting the anchor node representing the Asian block, the supervisory node can be the database of the Asian transaction party.
[0055] The node to be voted can be any one or more participating nodes in the blockchain network.
[0056] Specifically, the electronic voting initiator node broadcasts voting announcement information in the blockchain network, and the voting announcement information includes: voting qualification conditions, identification information of the supervisory node, information to be voted, voting deadline and voting rules. When the supervisory node receives the electronic voting announcement information, it extracts the voting qualification conditions from the electronic voting announcement information.
[0057] The supervisory node queries and obtains the blockchain public keys and / or blockchain identifiers of multiple anchor nodes that meet the voting qualifications according to the voting qualification conditions.
[0058] The supervisory node searches for an anchor node that meets the voting qualifications based on the voting qualification conditions in the database of the supervisory node, and further queries to obtain the blockchain public key and / or blockchain identifier of the anchor node that meets the voting qualifications.
[0059] The supervisory node performs a private key signature on the blockchain public keys and / or blockchain identifiers of the multiple voting nodes that are eligible to vote.
[0060] The supervisory node broadcasts the blockchain public keys and / or blockchain identifiers of the multiple voting-eligible anchor nodes signed by the private key in the blockchain network.
[0061] S3: When a transaction initiator is in the region block P i When initiating a transaction, the region block P i The anchor node of the region sends verification information to the anchor nodes of other region blocks;
[0062] Specifically, when a transaction initiator is in the region block P i When initiating a transaction, the region block Pi The anchor node sends verification information including transaction information and the first hash value after the hash operation of the transaction information to the anchor nodes of other regional blocks.
[0063] Preferably, when a transaction initiator is in the region block P i When initiating a transaction, the first hash value after hashing the transaction information is used in the region block P i The encrypted signature is obtained by encrypting the private key, and the signature and transaction information are used as the verification information. i The anchor node sends verification information containing transaction information and the signature to the anchor nodes of other regional blocks.
[0064] The beneficial effects of the above preferred technical solution are:
[0065] The regional block that initiates the transaction encrypts the first hash value with a private key, which effectively prevents the first hash value from being tampered with during the transmission of the verification information, resulting in deviation in the anchor node credibility verification.
[0066] S4: Other regional blocks vote to verify the verification information of the transaction initiator. The result of the vote determines the regional block P where the transaction initiator initiates the transaction. i Whether the anchor node is a trusted anchor node.
[0067] Specifically, other regional blocks respectively perform hash operations on the transaction information to obtain a second hash value;
[0068] Compare and verify whether the first hash value and the second hash value are consistent. If they are consistent, the verification is passed, and the transaction initiator initiates the transaction in the region block P i A trusted anchor node.
[0069] Preferably, if the verification information includes transaction information and region block P i The signature verification information needs to be decrypted before the hash check.
[0070] The other regional blocks are respectively i decrypting the signature using the public key to obtain the first hash value;
[0071] Other regional blocks respectively perform hash operations on the transaction information to obtain a second hash value;
[0072] Compare and verify whether the first hash value and the second hash value are consistent. If they are consistent, the verification is passed, and the transaction initiator initiates the transaction in the region block P i The anchor node is a trusted anchor node.
[0073] A hash value is a string of binary values of fixed length, which is calculated by a hash algorithm.
[0074] The hash algorithm can map a binary value of any length to a shorter fixed-length binary value, which is called a hash value. A hash value is a unique and extremely compact numerical representation of a piece of data. If the data being hashed changes even one letter of the paragraph, subsequent hashes will produce different values.
[0075] It is computationally impossible to find two different inputs that hash to the same value, so the hash value of data can verify the integrity of the data; it is generally used for fast search and encryption algorithms.
[0076] A hash value is a numerical value obtained by calculating a piece of data through a hash algorithm. This value has two characteristics: one-way and unique.
[0077] The verification is performed using a one-way and unique hash value, which is both efficient and secure, and will not have any impact on the original transaction data.
[0078] Unidirectional
[0079] The hash value cannot be reversed to get the original data. For example, a number "1234" can be obtained through a hash algorithm to get a hash value A, but the hash value A can never be decrypted to get the original number "1234".
[0080] Uniqueness
[0081] Only the hash values obtained by hashing the exactly same data are the same, that is, the hash value and the original data are uniquely corresponding, and there is no situation where two different data can obtain the same hash value.
[0082] The power of hash encryption is that no matter what the encrypted content is, as long as the content is consistent, the hash value is consistent. This makes it easy and efficient to compare whether two pieces of information are consistent without having to worry about the details of the data.
[0083] The present disclosure utilizes the unidirectional and unique characteristics of the hash value of the hash operation. If the result of the second hash value is the same as the first hash value, it means that the transaction information before transmission and the received transaction information are the same, both are original transaction information, and are not considered to be tampered with, thereby ensuring the security of the transaction.
[0084] The technical solution of this application is explained in detail below with reference to a specific example:
[0085] The transaction initiator at a node in regional block P1 needs to send a request to other regional blocks P2-P NTo initiate a transaction, you need to go through the P1 anchor node of the regional block to other regional blocks P2-P N Sending transaction information. In order to ensure the security and reliability of transaction information and prevent it from being tampered with by the anchor node of regional block P1, verification is required before conducting actual transactions.
[0086] The verification process is as follows: the anchor node of the regional block P1 sends verification information including virtual transaction information and the signature of the virtual transaction information encrypted by the hash algorithm and encrypted by the private key of the anchor node;
[0087] The verification information is broadcast to other regional blocks P2-P N Anchor nodes of other regional blocks P2-P N After receiving the verification information, the anchor node of the region block P1 first uses the public key of the anchor node of the region block P1 to decrypt the signature to obtain the first hash value after the anchor node operation of the region block P1. N The anchor node performs a hash operation on the virtual transaction information in the received verification information to obtain a second hash value. If the value of the first hash value is the same as the second hash value, it means that the anchor node of the regional block P1 is credible, the transaction information has not been tampered with, and the transaction can be carried out.
[0088] Embodiment 2:
[0089] The present disclosure can also make the following improvements on the technical solution of embodiment 1:
[0090] The anchor node fraud detection method in the alliance chain sharding consensus system disclosed in the present invention also includes:
[0091] S5: If the region block P where the transaction is initiated i The anchor node of the region block P is an untrusted anchor node. i Re-vote to elect a new node to represent the regional block P i The anchor node.
[0092] The beneficial effects of the above technical solution are:
[0093] If the anchor node of the regional block to be traded is not trustworthy, a new node will be voted again to be selected as the anchor node representing the regional block, ensuring the reliability of the transaction.
[0094] Embodiment three:
[0095] like Figure 3 As shown,
[0096] The present disclosure can also provide a device for detecting anchor node fraud in a consortium chain sharding consensus system, comprising:
[0097] The block division module 301 is used to divide the blockchain network into N regional blocks Pi , i=1, 2, ..., N, where N is an integer greater than 2;
[0098] Preferably, the blockchain network can be divided into N geographical blocks P according to the geographical location area. i , i=1, 2, ..., N, where N is an integer greater than 2;
[0099] The geographical location area may be:
[0100] The global blockchain network is divided into four regional blocks according to geographical locations: European block, Asian block, American block and other regional blocks.
[0101] Anchor node selection module 302, for each of the area blocks P i The nodes in the vote are selected to represent the regional block P i The anchor node of all nodes;
[0102] The sending module 303 is used to send a transaction to the region block P. i When initiating a transaction, the anchor node of the regional block Pi sends verification information to the anchor nodes of other regional blocks;
[0103] Specifically, the sending module 303 is when a transaction initiator is in the region block P i When initiating a transaction, the region block P i The anchor node sends verification information including transaction information and the first hash value after the transaction information is hashed to the anchor nodes of other regional blocks.
[0104] Preferably, the sending module 3030 sends a transaction to the sender in the region block P. i When initiating a transaction, the first hash value after hashing the transaction information is used in the region block P i The encrypted signature is obtained by encrypting the private key, and the signature and transaction information are used as the verification information. i The anchor node sends verification information containing transaction information and the signature to the anchor nodes of other regional blocks.
[0105] The beneficial effects of the above preferred technical solution are:
[0106] The regional block that initiates the transaction encrypts the first hash value with a private key, which effectively prevents the first hash value from being tampered with during the transmission of the verification information, resulting in deviation in the anchor node credibility verification.
[0107] Verification module 304 is used for other regional blocks to vote and verify the verification information of the transaction initiator. The result of the voting and verification determines the regional block P where the transaction initiator initiates the transaction. i Whether it is a trusted anchor node.
[0108] Specifically, the verification module 304 performs hash operations on the transaction information in other regional blocks to obtain a second hash value;
[0109] Compare and verify whether the first hash value and the second hash value are consistent. If they are consistent, the verification is passed, and the transaction initiator initiates the transaction in the region block P i A trusted anchor node.
[0110] Preferably, if the verification information includes transaction information and region block P i The signature verification information needs to be decrypted before the hash check.
[0111] The other regional blocks are respectively i decrypting the signature using the public key to obtain the first hash value;
[0112] Other regional blocks respectively perform hash operations on the transaction information to obtain a second hash value;
[0113] Compare and verify whether the first hash value and the second hash value are consistent. If they are consistent, the verification is passed, and the transaction initiator initiates the transaction in the region block P i The anchor node is a trusted anchor node.
[0114] The block module 301 provided in the present disclosure is connected with the anchor node selection module 302 , the sending module 303 and the verification module 304 in sequence.
[0115] Embodiment 4:
[0116] The present disclosure can also provide a computer storage medium on which a computer program is stored. When the computer program is executed by a processor, it is used to implement the steps of the above-mentioned anchor node fraud detection method in the alliance chain sharding consensus system.
[0117] The computer storage medium of the present disclosure may be implemented using a semiconductor memory or a magnetic core memory.
[0118] Semiconductor memory, mainly used in computers, has two types of semiconductor storage elements: Mos and bipolar. Mos elements have high integration, simple process but slow speed. Bipolar elements have complex process, high power consumption, low integration but fast speed. After the advent of NMos and CMos, Mos memory began to occupy a dominant position in semiconductor memory. NMos is fast, such as Intel's 1K-bit static random access memory with an access time of 45ns. CMos consumes less power, and the access time of 4K-bit CMos static memory is 300ns. The above semiconductor memories are all random access memories (RAM), that is, they can read and write new content randomly during operation. Semiconductor read-only memory (ROM) can be read randomly but cannot be written during operation. It is used to store solidified programs and data. ROM is divided into two types: non-rewritable fuse read-only memory - PROM and rewritable read-only memory EPROM.
[0119] Magnetic core memory has the characteristics of low cost and high reliability, and has more than 20 years of practical experience. Magnetic core memory was widely used as main memory before the mid-1970s. Its storage capacity can reach more than 10 bits, and the fastest access time is 300ns. The capacity of typical magnetic core memory in the world is 4MS~8MB, and the access cycle is 1.0~1.5μs. After the rapid development of semiconductor storage to replace magnetic core memory as the main memory, magnetic core memory can still be used as a large-capacity expansion memory.
[0120] Embodiment five:
[0121] The present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above-mentioned anchor node fraud detection method in the alliance chain sharding consensus system are implemented.
[0122] Figure 4 FIG. 1 is a schematic diagram of the internal structure of an electronic device in one embodiment. Figure 4As shown, the electronic device includes a processor, a storage medium, a memory and a network interface connected via a system bus. Among them, the storage medium of the computer device stores an operating system, a database and computer-readable instructions. The database may store a control information sequence. When the computer-readable instructions are executed by the processor, the processor can implement a method for detecting anchor node fraud in a consortium chain sharding consensus system. The processor of the electrical device is used to provide computing and control capabilities to support the operation of the entire computer device. The memory of the computer device may store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor can execute a method for detecting anchor node fraud in a consortium chain sharding consensus system. The network interface of the computer device is used to connect and communicate with a terminal. Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0123] The electronic device includes but is not limited to smart phones, computers, tablet computers, wearable smart devices, artificial intelligence devices, mobile power supplies, etc.
[0124] In some embodiments, the processor may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and a combination of various control chips, etc. The processor is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes various functions of the electronic device and processes data by running or executing programs or modules stored in the memory (for example, executing remote data reading and writing programs, etc.), and calling data stored in the memory.
[0125] The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory and at least one processor, etc.
[0126] Figure 4Only an electronic device with components is shown, and those skilled in the art will understand that Figure 4 The structure shown does not constitute a limitation on the electronic device, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0127] For example, although not shown, the electronic device may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, etc. The electronic device may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0128] Furthermore, the electronic device may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices.
[0129] Optionally, the electronic device may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.
[0130] Furthermore, the computer-usable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.
[0131] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0132] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0133] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0134] The embodiments of the present disclosure are described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present disclosure. The scope of the present disclosure is defined by the appended claims and their equivalents. Without departing from the scope of the present disclosure, a person skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A method for detecting anchor node fraud in a consortium chain sharding consensus system, characterized in that: include: Divide the blockchain network into N geographical blocks P i , i=1, 2, ..., N, where N is an integer greater than 2; Each of the area blocks P i The nodes in the vote are selected to represent the regional block P i The anchor node of all nodes; When a transaction initiator is in the region block P i When initiating a transaction, the region block P i The anchor node of the region sends verification information to the anchor nodes of other region blocks; Other regional blocks vote to verify the verification information of the transaction initiator, and the result of the vote determines the regional block P where the transaction initiator initiates the transaction. i Whether the anchor node is a trusted anchor node; The other regional blocks vote to verify the verification information of the transaction initiator, and the result of the vote determines the regional block P where the transaction initiator initiates the transaction. i The specific process of determining whether a node is a trusted anchor node is as follows: Other regional blocks perform hash operations on the transaction information to obtain a second hash value; Compare and verify whether the first hash value and the second hash value are consistent. If they are consistent, the verification is passed, and the transaction initiator initiates the transaction in the region block P i The anchor node is a trusted anchor node; The method further comprises: If the region block P where the transaction is initiated i The anchor node of the region block P is an untrusted anchor node. i Re-vote to elect a new node to represent the regional block P i The anchor node.
2. The method according to claim 1, characterized in that When a transaction initiator is in the region block P i When initiating a transaction, the region block P i The anchor node of the region sends verification information to the anchor nodes of other region blocks, including: When a transaction initiator is in the region block P i When initiating a transaction, the region block P i The anchor node sends verification information including transaction information and the first hash value after the transaction information is hashed to the anchor nodes of other regional blocks.
3. The method according to claim 2, characterized in that The first hash value after the hash operation is used as the region block P i The private key is used to encrypt the encrypted signature, and the signature and transaction information are used as the verification information.
4. The method according to claim 3, characterized in that The other regional blocks vote to verify the verification information of the transaction initiator, and the result of the vote determines the regional block P where the transaction initiator initiates the transaction. i The specific process of determining whether a node is a trusted anchor node is as follows: The other regional blocks are respectively i decrypting the signature using the public key to obtain the first hash value; Other regional blocks respectively perform hash operations on the transaction information to obtain a second hash value; Compare and verify whether the first hash value and the second hash value are consistent. If they are consistent, the verification is successful, and the anchor node of the regional block Pi where the transaction initiator initiates the transaction is a trusted anchor node.
5. The method according to any one of claims 1 to 4, characterized in that The blockchain network is divided into N regional blocks P i Specifically: Divide all nodes in the blockchain network into N regional blocks P according to their geographical locations i , i=1, 2,…, N, where N is an integer greater than 2.
6. A device for detecting anchor node fraud in a consortium chain sharding consensus system, characterized in that: include: The block module is used to divide the blockchain network into N regional blocks P i , i=1, 2, ..., N, where N is an integer greater than 2; Anchor node selection module, used for each of the area blocks P i The nodes in the vote are selected to represent the regional block P i The anchor node of all nodes; The sending module is used when a transaction initiator is in the region block P i When initiating a transaction, the anchor node of the regional block Pi sends verification information to the anchor nodes of other regional blocks; The verification module is used by other regional blocks to vote on the verification information of the transaction initiator. The result of the voting verification determines the regional block P where the transaction initiator initiates the transaction. i Whether it is a trusted anchor node; The verification module is further used to: perform hash operations on the transaction information of other regional blocks to obtain a second hash value; compare and verify whether the first hash value and the second hash value are consistent. If they are consistent, the verification is passed, and the regional block P of the transaction initiator initiates the transaction. i The anchor node is a trusted anchor node; The device is also used for: If the anchor node of the regional block Pi that initiated the transaction is an untrusted anchor node, the regional block Pi will re-vote to select a new node as the anchor node representing the regional block Pi.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 5 are implemented.
8. A computer storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by the processor, they are used to implement the steps corresponding to the anchor node fraud detection method in the alliance chain sharding consensus system described in any one of claims 1 to 5.
