CN111541733A - Method for testing message storage in P2P network, computer readable storage medium and P2P network - Google Patents

Method for testing message storage in P2P network, computer readable storage medium and P2P network Download PDF

Info

Publication number
CN111541733A
CN111541733A CN202010155481.9A CN202010155481A CN111541733A CN 111541733 A CN111541733 A CN 111541733A CN 202010155481 A CN202010155481 A CN 202010155481A CN 111541733 A CN111541733 A CN 111541733A
Authority
CN
China
Prior art keywords
node
message
nodes
network
testing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010155481.9A
Other languages
Chinese (zh)
Other versions
CN111541733B (en
Inventor
杜晓楠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN202010155481.9A priority Critical patent/CN111541733B/en
Publication of CN111541733A publication Critical patent/CN111541733A/en
Application granted granted Critical
Publication of CN111541733B publication Critical patent/CN111541733B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/104Peer-to-peer [P2P] networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • 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/104Peer-to-peer [P2P] networks
    • H04L67/1087Peer-to-peer [P2P] networks using cross-functional networking aspects
    • H04L67/1093Some peer nodes performing special functions

Abstract

The invention relates to a method for testing message storage in a P2P network, which comprises the following steps: s1, marking each message broadcasted in the P2P network, preprocessing each newly joined P2P node and synchronizing the message for each newly joined P2P node; s2, selecting a part of P2P nodes as a test node and a tested node respectively according to a set rule, wherein the test node receives the test result of the tested node and broadcasts the test result to a set number of other P2P nodes; and S3, judging whether the tested node is honest or not according to the test result of the other P2P nodes, and processing the dishonest tested node according to the test result. The invention also relates to a computer readable storage medium and a P2P network. The invention can effectively test the message storage in the P2P node and process the P2P node which does not store the prior message, thereby ensuring the reliability of the P2P node and further ensuring the integrity and reliability of the data stored by the node.

Description

Method for testing message storage in P2P network, computer readable storage medium and P2P network
Technical Field
The present invention relates to the field of P2P networks, and more particularly, to a method of testing message storage in a P2P network, a computer readable storage medium, and a P2P network.
Background
A P2P network (Peer-to-Peer network), i.e., a Peer-to-Peer network, in which participants share a portion of their own hardware resources, and these shared resources provide services and content through the network and can be accessed directly by other Peer nodes without going through intermediate entities. Participants in this network are both providers and acquirers of resources, services and content.
In a P2P network environment, multiple computers connected to each other are in a peer-to-peer relationship, each computer has the same functionality, without a master-slave relationship, and a computer can serve as both a server, setting shared resources for use by other computers in the network, and a workstation, and the overall network generally does not rely on a dedicated centralized server, nor does it have a dedicated workstation. Each computer in the network can both act as a requester of network services and provide resources, services and content in response to requests from other computers. Typically these resources and services include: sharing and exchange of information, computing resources (e.g., CPU computing power sharing), storage sharing (e.g., use of cache and disk space), network sharing, printer sharing, and the like. Therefore, P2P network is widely applied in service scenarios with high requirement on robustness, such as: data download, store broadcast of messages, etc.
However, the nodes in the P2P network have an untrustworthy property, and some P2P nodes may not store the previous message or may modify or delete the stored data, so that the data integrity or reliability of the data or message stored in the P2P network cannot be guaranteed.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a method, a computer-readable storage medium, and a P2P network for testing message storage in a P2P network, so as to isolate or delete a P2P node that does not store a previous message, thereby ensuring the reliability of a P2P node in the P2P network, and further ensuring the integrity and reliability of data stored in the P2P network.
The technical scheme adopted by the invention for solving the technical problems is as follows: a method of testing message storage in a P2P network, comprising:
s1, marking each message broadcasted in the P2P network, preprocessing each newly joined P2P node and synchronizing the message for each newly joined P2P node;
s2, selecting a part of P2P nodes as a test node and a tested node respectively according to a set rule, wherein the test node receives the test result of the tested node and broadcasts the test result to a set number of other P2P nodes;
and S3, judging whether the tested node is honest or not according to the test result of the other P2P nodes, and processing the dishonest tested node according to the test result.
In the method for testing message storage in a P2P network according to the present invention, the step S1 further includes:
s11, calculating the hash of each message broadcasted in the P2P network by adopting a hash algorithm to mark each message;
s12, carrying out node discovery processing on the newly added P2P node;
s13, performing inter-node state confirmation processing on the newly added P2P node after the node discovery processing;
s14, each newly joined P2P node downloads a tagged list of messages.
In the method for testing message storage in a P2P network according to the present invention, the step S11 further includes: and calculating the hash of the message based on the workload certification, the timestamp, the message type and the message content of the message by adopting a hash algorithm.
In the method for testing message storage in a P2P network, S121, connecting the newly joined P2P node to a seed node, and then requiring the seed node to give a P2P node closest to itself;
and S122, inquiring the second closest node from the P2P node closest to the node, and recursively inquiring for a plurality of times until a set number of P2P found nodes are obtained.
In the method for testing message storage in a P2P network according to the present invention, the step S13 further includes:
s131, the newly added P2P node selects a set number of nearest nodes from the P2P discovery nodes according to a set rule, and sends a handshake message to the nearest nodes;
s132, the nearest node receiving the handshake message verifies the handshake message and returns a handshake confirmation message based on a verification result;
s133, the newly joined P2P node synchronizes the latest message of the node based on the handshake confirmation message and the latest message.
In the method for testing message storage in a P2P network according to the present invention, the step S2 further includes:
s21, periodically selecting a test node based on the asc sorting index value of the public key of the selected part of P2P nodes;
s22, selecting a part of the nearest P2P nodes of the test nodes as tested nodes;
s23, the testing node requires the tested node to provide the testing result according to the set rule and broadcasts the testing result to the remaining P2P nodes in the latest P2P node.
In the method for testing message storage in a P2P network according to the present invention, the step S23 further includes:
s231, the testing node randomly selects a hash set of a predetermined number of messages in a predetermined time and broadcasts the hash set to the tested node;
s232, the tested node takes out locally stored messages according to the hash set, combines the messages into a message set according to the sequence, calculates the hash of the message set, and returns the hash of the message set to the testing node;
s233, the testing node broadcasts the hash set, the hashes of the message set, and the public keys and corresponding IP ports of the tested node to the remaining P2P nodes of the nearest P2P nodes.
In the method for testing message storage in a P2P network according to the present invention, the step S3 further includes:
s31, each other P2P node judges whether each tested node passes the test or not according to the message and the test result stored in the node, and broadcasts the judgment result to other P2P nodes;
s32, generating a final judgment result of whether the tested node is honest or not based on the judgment results of all the other P2P nodes;
and S33, the test node broadcasts the final judgment result and isolates or deletes the tested node which is finally judged to be dishonest.
Another solution to the technical problem of the present invention is to configure a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the method for testing message storage in a P2P network.
In another technical solution adopted to solve the technical problem, a P2P network is constructed, which includes a plurality of P2P nodes, and the P2P node stores a computer program, and when the computer program is executed by a processor, the method for storing the test message in the P2P network is implemented.
By implementing the method for testing message storage in the P2P network, the computer readable storage medium and the P2P network, the message storage in the P2P node can be effectively tested, and the P2P node which does not store the prior message is processed, so that the reliability of the P2P node in the P2P network is ensured, and the integrity and the reliability of the data stored in the P2P node are ensured.
Drawings
The invention will be further described with reference to the accompanying drawings and examples, in which:
FIG. 1 is a schematic flow chart diagram illustrating a first preferred embodiment of a method for testing message storage in a P2P network;
fig. 2 is a diagram of a preferred data structure of messages for the method of testing message storage in a P2P network of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention relates to a method for testing message storage in a P2P network, which comprises the following steps: s1, marking each message broadcasted in the P2P network, preprocessing each newly joined P2P node and synchronizing the message for each newly joined P2P node; s2, selecting a part of P2P nodes as a test node and a tested node respectively according to a set rule, wherein the test node receives the test result of the tested node and broadcasts the test result to a set number of other P2P nodes; and S3, judging whether the tested node is honest or not according to the test result of the other P2P nodes, and processing the dishonest tested node according to the test result. Therefore, the invention can carry out screening test on P2P nodes in the P2P network, and corresponding penalty is carried out on the P2P node if the P2P nodes with set number of screened nodes find that the past messages are not stored. By effectively testing the message storage in the P2P node and processing the P2P node which does not store the previous message, the reliability of the P2P node in the P2P network is ensured, and the integrity and reliability of the data stored in the node are ensured.
Fig. 1 is a flowchart illustrating a first preferred embodiment of a method for testing message storage in a P2P network according to the present invention. As shown in fig. 1, each message broadcasted among the P2P network is marked in step S1, and each newly joined P2P node is preprocessed and messages are synchronized for each newly joined P2P node. In a preferred embodiment of the present invention, the step S1 further includes: s11, calculating the hash of each message broadcasted in the P2P network by adopting a hash algorithm to mark each message; s12, carrying out node discovery processing on the newly added P2P node; s13, performing inter-node state confirmation processing on the newly added P2P node after the node discovery processing; s14, each newly joined P2P node downloads a tagged list of messages.
Preferably, fig. 2 is a diagram illustrating a preferred data structure of a message of the method of testing message storage in a P2P network of the present invention. As shown in fig. 2, the data structure of the message includes the following.
And (3) hashing: i.e., the hash value of the message, the content of the hash calculation includes the workload certificate, the timestamp, the message type, the message content of the message, but does not include P2P-related information and a random number, i.e., the hash of the message may be calculated based on the workload certificate, the timestamp, the message type, the message content of the message using a hash algorithm. The P2P related information is information related to network broadcast and will not be written to disk by P2P node finally. The computation of the hash uses the blake2b function because the blake2b function is highly normalized and will not differ from implementation-specific predictions.
And (3) workload proving: it requires that the P2P node perform multiple hash calculations on the message content and a randomly generated random number before broadcasting the message until the hash calculated value meets a certain number of preamble 0 requirements. After receiving the message, the other P2P nodes perform workload certification and verification of random values. This is done to prevent Sybil attacks and large volume attacks.
Time stamping: indicating the time at which the P2P node received the message.
Message type: it may be a common message type, or a heartbeat message type, or a common message type. The purpose of adding heartbeat messages is two as follows: one is the connection between keep-alive P2P nodes; and secondly, the message storage test is prevented from being carried out when the P2P network is idle, and insufficient messages are not screened.
Message content: i.e. the specific message content.
Information related to P2P: the random number can be defined by expanding according to the network topology in the concrete implementation process: which may be randomly generated during the operation.
In a preferred embodiment of the present invention, the step S12 relates to an acquisition process of the P2P discovery node, which further includes: s121, connecting the newly added P2P node to a seed node, and then requiring the seed node to give a P2P node closest to the seed node; and S122, inquiring the second closest node from the P2P node closest to the node, and recursively inquiring for a plurality of times until a set number of P2P found nodes are obtained.
In an embodiment of the present invention, the acquisition process of the P2P discovery node may be further implemented as follows. The newly joined P2P node, after joining the P2P network, first connects to the seed node, and then asks the seed node to give the P2P node closest to itself. In this embodiment, the distance between nodes can be calculated according to a classical DHT distance algorithm. Then after the newly added P2P node receives the nearest P2P node given by the seed node, the second nearest node is continuously inquired about each or at least part of the nearest P2P nodes, and the inquiry is repeated for a plurality of times until enough P2P found nodes are obtained, wherein the maximum number of P2P found nodes is 1024.
In a preferred embodiment of the present invention, the step S13 relates to the confirmation of the inter-node status, which further includes: s131, the newly added P2P node selects a set number of nearest nodes from the P2P discovery nodes according to a set rule, and sends a handshake message to the nearest nodes; s132, the nearest node receiving the handshake message verifies the handshake message and returns a handshake confirmation message based on a verification result; s133, the newly joined P2P node synchronizes the latest message of the node based on the handshake confirmation message and the latest message.
In an embodiment of the present invention, the confirmation of the inter-node state may be further implemented as follows. The newly joined P2P node screens the P2P discovery node. For example, a small number of P2P discovery nodes closest to the self can be selected according to the DHT algorithm, and it is proposed that 32P 2P discovery nodes closest to the self are selected. Of course, other numbers can be selected, and the setting can be performed by those skilled in the art according to actual needs. The newly joining P2P node then begins to connect the 32P 2P discovery nodes that are closest to itself, send a handshake message to it, which contains the messages that it has recently received, and tag the handshake message. The node receiving the handshake message then verifies its identity. For example, when the latest message sent is found to be different from the timestamp of the latest message of the user by no more than 120 seconds, a handshake confirmation is replied, otherwise, no reply is replied, or the handshake fails. Of course, in other preferred embodiments of the present invention, other authentication methods may be adopted. When sending the handshake acknowledgement, the latest message of itself may be sent together. And after receiving the handshake confirmation, the newly-added P2P node verifies whether the message of the node has an error with the received latest message, and if so, synchronizes the latest message to the opposite end.
Returning to fig. 1, in step S2, a part of P2P nodes are selected as a testing node and a tested node according to a set rule, and the testing node receives the testing result of the tested node and broadcasts the testing result to a set number of other P2P nodes. Preferably, in a preferred embodiment of the present invention, every time a period T (of course, multiple periods or a set time period is also possible), a set rule may be selected to select a part of the P2P nodes for storage test, so as to require the tested node to give a total hash value of several random messages, and then broadcast the test result to other nodes for verification.
In a further preferred embodiment of the present invention, the step S2 further includes: s21, selecting a test node based on the asc sorting index value of the public key of the selected part of P2P nodes; s22, selecting a part of the nearest P2P nodes of the test nodes as tested nodes; s23, the testing node requires the tested node to provide the testing result according to the set rule and broadcasts the testing result to the remaining P2P nodes in the latest P2P node. Preferably, the step S23 further includes: s231, the testing node randomly selects a hash set of a predetermined number of messages in a predetermined time and broadcasts the hash set to the tested node; s232, the tested node takes out locally stored messages according to the hash set, combines the messages into a message set according to the sequence, calculates the hash of the message set, and returns the hash of the message set to the testing node; s233, the testing node broadcasts the hash set, the hashes of the message set, and the public keys and corresponding IP ports of the tested node to the remaining P2P nodes of the nearest P2P nodes.
Preferably, in a further preferred embodiment of the invention, each participating P2P node will have a different identity: the test nodes initiate the test, broadcast the test result, respond to the test and return the test result, and the check nodes check whether each tested node passes the test. The following further describes a specific implementation manner of step S2 as follows:
selecting a test node:
preferably, the selection of the test node includes performing asc sorting on a certain P2P node and its public key and the public keys of all its N P2P discovery nodes, and if the index value index of itself in the asc sorting is found to be exactly the test period periodic% N, then itself may become the initiator of this round of test, i.e., the test node. After the identity of the test node is confirmed, 10 nodes in the 32 nodes closest to the test node are randomly screened as the tested nodes, and then the remaining 20 nodes are used as check nodes in the subsequent steps. Of course the number of nodes here may vary.
Storage test procedure
After the tested node is selected, a random screening of a hash set h of several (e.g., 5) messages for a period of time (e.g., 30) minutes is started1,h2,h3,h4,h5]And set the hash to [ h ]1,h2,h3,h4,h5]Broadcast to the tested nodes.
The node under test may or may not confirm whether the testing node qualifies for testing, for example, by checking its index value index. Then the tested node is assembled according to the hash required by the testing node1,h2,h3,h4,h5]Taking out the corresponding messages stored locally, splicing the messages into a message set M in sequence, and calculating the Hash H of the message set by adopting a blake2b functionMBlake2b (M) and replies to the test node.
Returning now to FIG. 1, proceeding to step S3, in step S3, the other P2P nodes determine whether the tested node is honest according to the test results, and process the tested node that is not honest according to the test results. In a further preferred embodiment of the present invention, the step S3 further includes: s31, each other P2P node judges whether each tested node passes the test or not according to the message and the test result stored in the node, and broadcasts the judgment result to other P2P nodes; s32, generating a final judgment result of whether the tested node is honest or not based on the judgment results of all the other P2P nodes; and S33, the test node broadcasts the final judgment result and isolates or deletes the tested node which is finally judged to be dishonest.
The following further describes a specific implementation manner of step S3, and here, the following description is continued by taking an example of selecting 10 nodes from the previous 32 nodes for testing, and it is known to those skilled in the art that other numbers may be selected to perform the steps of the present invention:
broadcasting test results
After receiving the test reply messages of all the tested nodes, the testing node starts to broadcast the test results to the remaining 22 nodes in the 32 nodes nearest to the testing node, namely the check node, wherein the test results comprise: hash set of messages for a test node h1,h2,h3,h4,h5](ii) a Public key P of tested node1,P2,...,P10]And a corresponding IP port; hash H of message set replied by each tested nodeMSet of (2)
Figure BDA0002402590460000091
After receiving the test result in the remaining 22 nodes, i.e. each check node in the check nodes, the hash set [ h ] of the message according to the test node1,h2,h3,h4,h5]Finding out the local corresponding messages, and splicing the messages into a local message set M according to the sequenceAnd calculating the hash H of the local message set by using a blake2b functionValidateRank blake2b (M), compare in order HValidateWhether or not equal to
Figure BDA0002402590460000092
If not, voting to judge that the corresponding tested node fails the test, if equal, voting to judge that the corresponding tested node passes the test, and broadcasting a judgment result to surrounding nodes, wherein the judgment result comprises: hash set of messages for a test node h1,h2,h3,h4,h5](ii) a Public key P of tested node1,P2,...,P10]And a corresponding IP port; check result set of check nodes
Figure BDA0002402590460000093
After the broadcast is finished, 22 nodes start to collect the test results of other nodes, and a final conclusion V is obtainedf. For example if it is for the subject [ P ]1,P2,...,P10]And if the test pass number of the same public key in the node exceeds 11 tickets, the node corresponding to the public key is considered to be honest. If for the tested person [ P1,P2,...,P10]If the test of the same public key in the public key exceeds 11 tickets, the node of the public key is considered to be dishonest. Of course other numbers may be chosen, such as more than 2/3, for example 18 of the 22 nodes may be required to pass through to consider the tested node honest, and so on.
The test node then broadcasts a final decision result, which may also include a hash set of the test node's message h1,h2,h3,h4,h5](ii) a Public key P of tested node1,P2,...,P10]And a corresponding IP port; check result set of check nodes
Figure BDA0002402590460000101
Upon receiving allCheck result set of check nodes
Figure BDA0002402590460000102
For the same tested node, if the vote is objected to exceed 11 votes, the node is finally considered to be dishonest, and the final result is broadcasted to the remaining 32 nodes; if the vote is approved to exceed 11, the node is finally considered to be honest, and the final result is broadcasted to the remaining 32 nodes
For a dishonest node under test, isolation processing may be performed, for example, the node under test may not broadcast its IP port information to other P2P nodes, and may not broadcast new messages to the node, and may not broadcast information of other P2P nodes to the node, or may be downgraded, or may be deleted directly.
The method for testing the message storage in the P2P network can effectively test the message storage in the P2P node, and process the P2P node which does not store the prior message, thereby ensuring the reliability of the P2P node in the P2P network and further ensuring the integrity and reliability of the data stored by the node.
The invention also relates to a computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method of testing message storage in a P2P network.
The invention also relates to a P2P network comprising a plurality of P2P nodes, the P2P nodes having stored thereon a computer program which, when executed by a processor, implements a method of testing message storage in a P2P network according to any of claims 1 to 8.
By implementing the computer-readable storage medium for testing message storage in the P2P network and the P2P network, the message storage in the P2P node can be effectively tested, and the P2P node which does not store the prior message is processed, so that the reliability of the P2P node in the P2P network is ensured, and the integrity and the reliability of the data stored in the P2P node are ensured.
Accordingly, the present invention can be realized in hardware, software, or a combination of hardware and software. The present invention can be realized in a centralized fashion in at least one computer system, or in a distributed fashion where different elements are spread across several interconnected computer systems. Any kind of computer system or other apparatus adapted for carrying out the methods of the present invention is suited. A typical combination of hardware and software could be a general purpose computer system with a computer program that, when being loaded and executed, controls the computer system such that it carries out the methods described herein.
The present invention may also be implemented by a computer program product, comprising all the features enabling the implementation of the methods of the invention, when loaded in a computer system. The computer program in this document refers to: any expression, in any programming language, code or notation, of a set of instructions intended to cause a system having an information processing capability to perform a particular function either directly or after either or both of the following: a) conversion to other languages, codes or symbols; b) reproduced in a different format.
While the invention has been described with reference to specific embodiments, it will be understood by those skilled in the art that various changes may be made and equivalents may be substituted without departing from the scope of the invention. In addition, many modifications may be made to adapt a particular situation or material to the teachings of the invention without departing from its scope. Therefore, it is intended that the invention not be limited to the particular embodiment disclosed, but that the invention will include all embodiments falling within the scope of the appended claims.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (10)

1. A method of testing message storage in a P2P network, comprising:
s1, marking each message broadcasted in the P2P network, preprocessing each newly joined P2P node and synchronizing the message for each newly joined P2P node;
s2, selecting a part of P2P nodes as a test node and a tested node respectively according to a set rule, wherein the test node receives the test result of the tested node and broadcasts the test result to a set number of other P2P nodes;
and S3, judging whether the tested node is honest or not according to the test result of the other P2P nodes, and processing the dishonest tested node according to the test result.
2. The method of testing message storage in a P2P network of claim 1, wherein the step S1 further comprises:
s11, calculating the hash of each message broadcasted in the P2P network by adopting a hash algorithm to mark each message;
s12, carrying out node discovery processing on the newly added P2P node;
s13, performing inter-node state confirmation processing on the newly added P2P node after the node discovery processing;
s14, each newly joined P2P node downloads a tagged list of messages.
3. The method for testing message storage in a P2P network as claimed in claim 2, wherein said step S11 further comprises: and calculating the hash of the message based on the workload certification, the timestamp, the message type and the message content of the message by adopting a hash algorithm.
4. The method for testing message storage in a P2P network as claimed in claim 2, wherein said step S12 further comprises:
s121, connecting the newly added P2P node to a seed node, and then requiring the seed node to give a P2P node closest to the seed node;
and S122, inquiring the second closest node from the P2P node closest to the node, and recursively inquiring for a plurality of times until a set number of P2P found nodes are obtained.
5. The method for testing message storage in a P2P network as claimed in claim 2, wherein said step S13 further comprises:
s131, the newly added P2P node selects a set number of nearest nodes from the P2P discovery nodes according to a set rule, and sends a handshake message to the nearest nodes;
s132, the nearest node receiving the handshake message verifies the handshake message and returns a handshake confirmation message based on a verification result;
s133, the newly joined P2P node synchronizes the latest message of the node based on the handshake confirmation message and the latest message.
6. The method of testing message storage in a P2P network of claim 1, wherein the step S2 further comprises:
s21, periodically selecting a test node based on the asc sorting index value of the public key of the selected part of P2P nodes;
s22, selecting a part of the nearest P2P nodes of the test nodes as tested nodes;
s23, the testing node requires the tested node to provide the testing result according to the set rule and broadcasts the testing result to the remaining P2P nodes in the latest P2P node.
7. The method of claim 6, wherein the step S23 further comprises:
s231, the testing node randomly selects a hash set of a predetermined number of messages in a predetermined time and broadcasts the hash set to the tested node;
s232, the tested node takes out locally stored messages according to the hash set, combines the messages into a message set according to the sequence, calculates the hash of the message set, and returns the hash of the message set to the testing node;
s233, the testing node broadcasts the hash set, the hashes of the message set, and the public keys and corresponding IP ports of the tested node to the remaining P2P nodes of the nearest P2P nodes.
8. The method of testing message storage in a P2P network of claim 1, wherein the step S3 further comprises:
s31, each other P2P node judges whether each tested node passes the test or not according to the message and the test result stored in the node, and broadcasts the judgment result to other P2P nodes;
s32, generating a final judgment result of whether the tested node is honest or not based on the judgment results of all the other P2P nodes;
and S33, the test node broadcasts the final judgment result and isolates or deletes the tested node which is finally judged to be dishonest.
9. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the method of testing message storage in a P2P network according to any one of claims 1 to 8.
10. A P2P network comprising a plurality of P2P nodes, the P2P nodes having stored thereon a computer program, characterized in that the program, when executed by a processor, implements the method of testing message storage in a P2P network according to any of claims 1-8.
CN202010155481.9A 2020-03-06 2020-03-06 Method for testing message storage in P2P network, computer readable storage medium and P2P network Active CN111541733B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010155481.9A CN111541733B (en) 2020-03-06 2020-03-06 Method for testing message storage in P2P network, computer readable storage medium and P2P network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010155481.9A CN111541733B (en) 2020-03-06 2020-03-06 Method for testing message storage in P2P network, computer readable storage medium and P2P network

Publications (2)

Publication Number Publication Date
CN111541733A true CN111541733A (en) 2020-08-14
CN111541733B CN111541733B (en) 2022-09-20

Family

ID=71974791

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010155481.9A Active CN111541733B (en) 2020-03-06 2020-03-06 Method for testing message storage in P2P network, computer readable storage medium and P2P network

Country Status (1)

Country Link
CN (1) CN111541733B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080313500A1 (en) * 2007-06-15 2008-12-18 Alcatel Lucent Proctor peer for malicious peer detection in structured peer-to-peer networks
CN109617702A (en) * 2019-01-29 2019-04-12 深圳市先河系统技术有限公司 Method, block chain node and the device with store function of information signature
CN109639436A (en) * 2019-01-04 2019-04-16 平安科技(深圳)有限公司 The data property held verification method and terminal device based on salt figure
CN109905360A (en) * 2019-01-07 2019-06-18 平安科技(深圳)有限公司 Data verification method and terminal device
CN110213059A (en) * 2019-06-20 2019-09-06 腾讯科技(深圳)有限公司 A kind of generation method of random number, generating means and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080313500A1 (en) * 2007-06-15 2008-12-18 Alcatel Lucent Proctor peer for malicious peer detection in structured peer-to-peer networks
CN109639436A (en) * 2019-01-04 2019-04-16 平安科技(深圳)有限公司 The data property held verification method and terminal device based on salt figure
CN109905360A (en) * 2019-01-07 2019-06-18 平安科技(深圳)有限公司 Data verification method and terminal device
CN109617702A (en) * 2019-01-29 2019-04-12 深圳市先河系统技术有限公司 Method, block chain node and the device with store function of information signature
CN110213059A (en) * 2019-06-20 2019-09-06 腾讯科技(深圳)有限公司 A kind of generation method of random number, generating means and storage medium

Also Published As

Publication number Publication date
CN111541733B (en) 2022-09-20

Similar Documents

Publication Publication Date Title
CN109936457B (en) Block chain multi-party witness method, device, equipment and computer readable storage medium
Hassanzadeh-Nazarabadi et al. Lightchain: A dht-based blockchain for resource constrained environments
US8819237B2 (en) Method for monitoring and providing information over a peer to peer network
US7640339B1 (en) Method and apparatus for monitoring a node in a distributed system
CN111625593B (en) Block chain-based data processing method and device and computer equipment
CA2477197A1 (en) Secured and access controlled peer-to-peer resource sharing method and apparatus
CN114048517B (en) Dual channel consensus system and method for blockchains, computer readable storage medium
US20220067063A1 (en) Apparatus and method for adaptively managing sharded blockchain network based on deep q network
CN108710681A (en) File acquisition method, device, equipment and storage medium
CN111737104A (en) Block chain network service platform, test case sharing method thereof and storage medium
KR20200081533A (en) Blockchain Consensus Method based Improved Dynamic Blind Voting for Internet of Things Environment
WO2020197514A1 (en) A distributed hash table based blockchain architecture for resource constrained environments
KR20040091675A (en) Dynamic addressing in transient networks
Schuchard et al. Balancing the shadows
Guo et al. A hierarchical and location-aware consensus protocol for iot-blockchain applications
Mišić et al. PBFT-based ordering service for IoT domains
Mikalsen Firechain: An efficient blockchain protocol using secure gossip
CN110708383B (en) Network connection method of block chain node and related equipment
CN111541733B (en) Method for testing message storage in P2P network, computer readable storage medium and P2P network
CN111915325B (en) Method, system and computer readable storage medium for tracing blockchain transaction information
CN112398924A (en) Block chain node admission control method, block chain node admission control device, computer equipment and storage medium
Li et al. DHBFT: dynamic hierarchical Byzantine fault-tolerant consensus mechanism based on credit
Jelasity et al. Towards secure epidemics: Detection and removal of malicious peers in epidemic-style protocols
Aktypi et al. SeCaS: Secure capability sharing framework for IoT devices in a structured P2P network
Chow Running on karma–P2P reputation and currency systems

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40028325

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant