CN115225510B - Method and device for acquiring block chain public chain network structure and electronic equipment - Google Patents

Method and device for acquiring block chain public chain network structure and electronic equipment Download PDF

Info

Publication number
CN115225510B
CN115225510B CN202210849488.XA CN202210849488A CN115225510B CN 115225510 B CN115225510 B CN 115225510B CN 202210849488 A CN202210849488 A CN 202210849488A CN 115225510 B CN115225510 B CN 115225510B
Authority
CN
China
Prior art keywords
information
target node
node
response information
detection packet
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.)
Active
Application number
CN202210849488.XA
Other languages
Chinese (zh)
Other versions
CN115225510A (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.)
Beijing Topsec Technology Co Ltd
Beijing Topsec Network Security Technology Co Ltd
Beijing Topsec Software Co Ltd
Original Assignee
Beijing Topsec Technology Co Ltd
Beijing Topsec Network Security Technology Co Ltd
Beijing Topsec Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Topsec Technology Co Ltd, Beijing Topsec Network Security Technology Co Ltd, Beijing Topsec Software Co Ltd filed Critical Beijing Topsec Technology Co Ltd
Priority to CN202210849488.XA priority Critical patent/CN115225510B/en
Publication of CN115225510A publication Critical patent/CN115225510A/en
Application granted granted Critical
Publication of CN115225510B publication Critical patent/CN115225510B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/12Discovery or management of network topologies
    • 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/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • 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
    • 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/1042Peer-to-peer [P2P] networks using topology management mechanisms
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the application provides a method, a device, electronic equipment and a storage medium for acquiring a block chain public chain network structure, wherein the method comprises the following steps: acquiring interface document information of a block chain public chain; analyzing the interface document information to obtain node conventional information and a node list; constructing a first detection packet according to the node conventional information; constructing a second probe packet according to the first probe packet and the node list; obtaining communication relation information among nodes according to the second detection packet; and generating a block chain public chain network structure according to the communication relation information. By implementing the embodiment of the application, the connection relation among all nodes of the block chain public chain can be established, the network structure is generated, the efficiency of generating the network structure can be improved, and meanwhile, the safety of the block chain is not influenced.

Description

Method and device for acquiring block chain public chain network structure and electronic equipment
Technical Field
The present disclosure relates to the field of blockchain technologies, and in particular, to a method and apparatus for acquiring a blockchain public chain network structure, an electronic device, and a computer readable storage medium.
Background
Blockchain public chains are also known as public chains, which means blockchains that anyone worldwide can enter the system at any time to read data, send confirmatory transactions, and compete for accounting.
At present, the identification detection of the public chain of the block chain is single identification detection of virtual information on the public chain, only the degree of identifying a specific virtual information product is achieved, the public chain where the specific virtual information is located is not deeply excavated, and therefore the specific information of the public chain cannot be obtained, the communication relation of data exchange between other nodes on the public chain, the distribution conditions of different clients and different versions and the overall view of the public chain network structure cannot be known, and the change of the whole public chain network structure cannot be timely monitored. In addition, the prior art cannot consider the problems of the efficiency and the safety of the public chain during the identification and detection of the public chain.
Disclosure of Invention
An object of the embodiments of the present invention is to provide a method, an apparatus, an electronic device, and a computer readable storage medium for acquiring a blockchain public chain network structure, which can establish a connection relationship between nodes of a blockchain public chain to generate a network structure, and can improve efficiency of generating the network structure without affecting the security of the blockchain.
In a first aspect, an embodiment of the present application provides a method for acquiring a blockchain public chain network structure, where the method includes:
acquiring interface document information of a block chain public chain;
analyzing the interface document information to obtain node conventional information and a node list;
constructing a first detection packet according to the node conventional information;
constructing a second probe packet according to the first probe packet and the node list;
obtaining communication relation information among nodes according to the second detection packet;
and generating a block chain public chain network structure according to the communication relation information.
In the implementation process, the detection packet is constructed to actively detect the target node to obtain the communication relation information among the nodes, so that the connection relation among all the nodes of the block chain public chain is established, the network structure is generated, the efficiency of generating the network structure can be improved, and meanwhile, the safety of the block chain is not influenced.
Further, the step of constructing a second probe packet according to the first probe packet and the node list includes:
sending the first detection packet to a target node so that the target node returns first response information;
receiving the first response information of the target node;
and constructing a second detection packet according to the first response information and the node list.
In the implementation process, the first response information is obtained through the detection of the target node by the first detection packet, and then the target node is deeply detected layer by layer according to the first response information and the mode of constructing the second detection packet by the node list, so that the detection efficiency of the target node is improved.
Further, the step of constructing a second probe packet according to the first response information and the node list includes:
obtaining characteristic information of the block chain public chain according to the first response information;
determining a product name according to the characteristic information;
and constructing the second detection packet according to the product name and the node list.
In the implementation process, the characteristic information of the block chain public chain is obtained, the product name is further determined, and the second detection packet is constructed according to the product name and the node list, so that the constructed second detection packet is more accurate and can contain more node information.
Further, the step of obtaining the communication relationship information between the nodes according to the second probe packet includes:
detecting the target node according to the second detection packet to obtain second response information;
and obtaining the communication relation information among the nodes according to the second response information.
In the implementation process, the second response information is obtained after the target node is detected, and the communication relation information is obtained according to the second response information, so that the communication relation information is more accurate, the relation among the nodes can be reflected, and the detection efficiency is improved.
Further, the step of detecting the target node according to the second detection packet to obtain second response information includes:
sending the second detection packet to the target node so as to enable the target node to return second response information;
the second response information of the target node is received.
In the implementation process, the target node is actively detected, so that the information of the target node can be directly and rapidly obtained, the second response information is ensured to contain more information of the target node, and the accuracy of the subsequent network structure generation is improved.
Further, the step of receiving the second response information of the target node includes:
acquiring a response status code of the target node;
judging whether the response state code is 200;
and if yes, receiving the second response information of the target node.
In the implementation process, whether the second response information is received is judged according to the value of the response state code of the target node, so that the accuracy of the obtained second response information can be ensured, and the receiving efficiency is improved.
Further, the step of obtaining the communication relationship information between the nodes according to the second response information includes:
extracting the IP address and port information in the second response information;
and obtaining the communication relation information between the nodes according to the IP address and the port information.
In the implementation process, the communication relation information between the nodes is obtained according to the IP address and the port information, so that the obtained communication relation information is more accurate, and the port information of the nodes can be quickly found.
In a second aspect, an embodiment of the present application further provides an acquiring device of a blockchain public chain network structure, where the device includes:
the acquisition module is used for acquiring interface document information of the block chain public chain;
the analysis module is used for analyzing the interface document information to obtain node conventional information and a node list;
the construction module is used for constructing a first detection packet according to the node conventional information; the method is also used for constructing a second probe packet according to the first probe packet and the node list;
the connection module is used for obtaining the communication relation information between the nodes according to the second detection packet;
and the generation module is used for generating a block chain public chain network structure according to the communication relation information.
In the implementation process, the detection packet is constructed to actively detect the target node to obtain the communication relation information among the nodes, so that the connection relation among all the nodes of the block chain public chain is established, the network structure is generated, the efficiency of generating the network structure can be improved, and meanwhile, the safety of the block chain is not influenced.
In a third aspect, an electronic device provided in an embodiment of the present application includes: a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method according to any one of the first aspects when the computer program is executed.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium having stored thereon instructions that, when executed on a computer, cause the computer to perform the method according to any of the first aspects.
In a fifth aspect, embodiments of the present application provide a computer program product, which when run on a computer, causes the computer to perform the method according to any one of the first aspects.
Additional features and advantages of the disclosure will be set forth in the description which follows, or in part will be obvious from the description, or may be learned by practice of the techniques of the disclosure.
And may be practiced in accordance with the disclosure as hereinafter described in detail with reference to the preferred embodiments of the present application.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a method for obtaining a blockchain public chain network structure according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an acquiring device of a blockchain public chain network structure according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only to distinguish the description, and are not to be construed as indicating or implying relative importance.
The detailed description of the present application is further described in detail below with reference to the drawings and examples. The following examples are illustrative of the present application, but are not intended to limit the scope of the present application.
Example 1
Fig. 1 is a flow chart of a method for acquiring a blockchain public chain network structure according to an embodiment of the present application, as shown in fig. 1, the method includes:
s1, acquiring interface document information of a block chain public chain;
s2, analyzing the interface document information to obtain node conventional information and a node list;
s3, constructing a first detection packet according to the conventional information of the node;
s4, constructing a second detection packet according to the first detection packet and the node list;
s5, obtaining communication relation information between the nodes according to the second detection packet;
s6, generating a block chain public chain network structure according to the communication relation information.
In the implementation process, the detection packet is constructed to actively detect the target node to obtain the communication relation information among the nodes, so that the connection relation among all the nodes of the block chain public chain is established, the network structure is generated, the efficiency of generating the network structure can be improved, and meanwhile, the safety of the block chain is not influenced.
Since the explosion of blockchain, the public chain project has been vigorously developed, and competition for the public chain project can be said to be white-hot. Blockchain public chains are also known as public chains, which means blockchains that anyone worldwide can enter the system at any time to read data, send confirmatory transactions, and compete for accounting.
The blockchain network employs a P2P overlay network. P2P networks, i.e. peer-to-peer networks, also called peer-to-peer networks or peer-to-peer networks, are an idea of a network structure, which essentially differs from the client/server structure that is currently dominant in the network structure in that there is no central node (or central server) in the whole network structure, through which different nodes can interact directly, and each node connected to each other is in a peer-to-peer position. Due to the characteristic of decentralization, a network structure that a block chain adopts a P2P network as a bottom layer thereof becomes quite natural, nodes in the block chain are mutually discovered in the P2P network by running a specific discovery algorithm, and then a direct channel is established for communication.
The public chain of the block chain adopts a P2P coverage network, and network data exchange of the public chain adopts a flooding mode for transmission, namely, firstly, data is forwarded to a target node, and then, the target node continuously forwards the data to the target node. And so on until the data is passed to all nodes in the public network.
According to the method and the device, the network topology graph is established through detection of the plurality of nodes on the block chain public chain, communication relations of data exchange between other nodes on the Jie Gong chain can be obtained, the overall view of the whole public chain network structure can be described, the change of the whole public chain network structure can be timely monitored, and distribution conditions of different clients and different versions in the whole public chain network can be displayed.
In S1, an official API interface document of the blockchain male chain of the probe to be identified is looked up, alternatively the blockchain male chain may be virtual information.
In S2, the required API interface method is found out through interpretation and analysis of the API interface document, and the two commonly used methods are: acquiring node conventional information and acquiring a node list. Optionally, the API interface method may also be analyzed to determine whether to conform to the HTTP GET request method or the HTTP POST request method.
The network structure of the block chain public chain can be mostly realized through an API interface, the API interface method adopts an HTTP GET or HTTP POST method to request the API interface, and the response is in a JSON-RPC form. The probe node can be deployed in the block chain public chain, a probe data packet is constructed, and the whole public chain network structure is detected by adopting an active detection mode.
Further, S4 includes:
sending a first detection packet to a target node so that the target node returns first response information;
receiving first response information of a target node;
and constructing a second probe packet according to the first response information and the node list.
In the implementation process, the first response information is obtained through the detection of the target node by the first detection packet, and then the target node is deeply detected layer by layer according to the first response information and the mode of constructing the second detection packet by the node list, so that the detection efficiency of the target node is improved.
And constructing a first detection packet according to the node conventional information. Since the API interface methods of the different virtual information are different, the information data in the first configuration packet is also different according to the difference of the node regular information. Actively sending a first detection packet to a target node for detection, receiving first response information of the target node, and acquiring feature information of virtual information of detection to be identified from the first response information, wherein the feature information comprises a plurality of dimension features, such as: protocol, product name, version number, node status, block number, altitude, total number of nodes, etc. The protocol, the product name and the version number are important identification features, the node state, the number of blocks, the height and the total number of nodes are auxiliary identification features, and if part of important identification features are missing, the auxiliary identification features can be used for identification so as to improve the accuracy of identification and determine specific virtual information products.
Further, the step of constructing a second probe packet according to the first response information and the node list includes:
obtaining characteristic information of a block chain public chain according to the first response information;
determining the product name according to the characteristic information;
and constructing a second detection packet according to the product name and the node list.
In the implementation process, the characteristic information of the block chain public chain is obtained, the product name is further determined, and the second detection packet is constructed according to the product name and the node list, so that the constructed second detection packet is more accurate and can contain more node information.
After the specific product name of the virtual information is determined, a second detection packet is constructed according to the node list, and the target node is actively sent to the second detection packet for detection.
Further, S5 includes:
detecting the target node according to the second detection packet to obtain second response information;
and obtaining the communication relation information among the nodes according to the second response information.
In the implementation process, the second response information is obtained after the target node is detected, and the communication relation information is obtained according to the second response information, so that the communication relation information is more accurate, the relation among the nodes can be reflected, and the detection efficiency is improved.
Further, the step of detecting the target node according to the second detection packet to obtain second response information includes:
sending a second detection packet to the target node so that the target node returns second response information;
second response information of the target node is received.
In the implementation process, the target node is actively detected, so that the information of the target node can be directly and rapidly obtained, the second response information is ensured to contain more information of the target node, and the accuracy of the subsequent network structure generation is improved.
Further, the step of receiving the second response information of the target node includes:
acquiring a response state code of a target node;
judging whether the response state code is 200;
if yes, receiving second response information of the target node.
In the implementation process, whether the second response information is received is judged according to the value of the response state code of the target node, so that the accuracy of the obtained second response information can be ensured, and the receiving efficiency is improved.
By determining the response status code of the target node, optionally, the response status code may be an HTTP response status code, and when the HTTP response status code is 200, the second response information of the target node is received.
Further, the step of obtaining the communication relationship information between the nodes according to the second response information includes:
extracting the IP address and the port information in the second response information;
and obtaining the communication relation information between the nodes according to the IP address and the port information.
In the implementation process, the communication relation information between the nodes is obtained according to the IP address and the port information, so that the obtained communication relation information is more accurate, and the port information of the nodes can be quickly found.
And judging the second response information according to the JSON data format KEY, extracting the IP address and the port information of the target node in the second response information, and storing the IP address and the port information of the adjacent node of the target node into a list file. Since the API interface methods of the different virtual information acquisition node lists are different, the acquired node list information is different, and the method of extracting the IP address and port information in the second response information is also different.
And extracting the IP addresses and the port information of all the nodes in the block chain public chain, namely obtaining the communication relation information between the nodes according to the IP addresses and the port information of all the nodes, and generating a block chain public chain network structure according to the communication relation information between the nodes, wherein the network structure can be optionally shown by a network topology graph.
The network topology graph can show the distribution of different clients and different versions in the public chain. The method comprises the following steps: the same product name is used as a main node of the topology, different version numbers are used as secondary nodes, and then the IP addresses of the different nodes are connected.
According to the embodiment of the application, the detection packet of the legal API request is sent through the API interface, malicious damage to the public chain of the block chain is avoided, the active detection mode is adopted, resources are saved, each node is found through less resource speculation, and then full network detection is achieved. And the overall view of the public-link network structure can be described, the matching process is continuously optimized by setting and adjusting the scanning period of the detection packet, and the change of the whole network structure can be timely monitored. According to the service requirement, the distribution conditions of different clients and different versions in the whole public chain can be displayed.
Example two
In order to execute a corresponding method of the above embodiment to achieve the corresponding functions and technical effects, an apparatus for acquiring a blockchain public chain network structure is provided below, as shown in fig. 2, where the apparatus includes:
the acquisition module 1 is used for acquiring interface document information of a block chain public chain;
the analysis module 2 is used for analyzing the interface document information to obtain node conventional information and a node list;
a construction module 3, configured to construct a first probe packet according to node conventional information; the method is also used for constructing a second detection packet according to the first detection packet and the node list;
the connection module 4 is used for obtaining the communication relation information between the nodes according to the second detection packet;
and the generation module 5 is used for generating a block chain public chain network structure according to the communication relation information.
In the implementation process, the detection packet is constructed to actively detect the target node to obtain the communication relation information among the nodes, so that the connection relation among all the nodes of the block chain public chain is established, the network structure is generated, the efficiency of generating the network structure can be improved, and meanwhile, the safety of the block chain is not influenced.
The building block 3 is also for:
sending a first detection packet to a target node so that the target node returns first response information;
receiving first response information of a target node;
and constructing a second probe packet according to the first response information and the node list.
In the implementation process, the first response information is obtained through the detection of the target node by the first detection packet, and then the target node is deeply detected layer by layer according to the first response information and the mode of constructing the second detection packet by the node list, so that the detection efficiency of the target node is improved.
The building block 3 is also for:
obtaining characteristic information of a block chain public chain according to the first response information;
determining the product name according to the characteristic information;
and constructing a second detection packet according to the product name and the node list.
In the implementation process, the characteristic information of the block chain public chain is obtained, the product name is further determined, and the second detection packet is constructed according to the product name and the node list, so that the constructed second detection packet is more accurate and can contain more node information.
The connection module 4 is also for:
detecting the target node according to the second detection packet to obtain second response information;
and obtaining the communication relation information among the nodes according to the second response information.
In the implementation process, the second response information is obtained after the target node is detected, and the communication relation information is obtained according to the second response information, so that the communication relation information is more accurate, the relation among the nodes can be reflected, and the detection efficiency is improved.
The connection module 4 is also for:
sending a second detection packet to the target node so that the target node returns second response information;
second response information of the target node is received.
In the implementation process, the target node is actively detected, so that the information of the target node can be directly and rapidly obtained, the second response information is ensured to contain more information of the target node, and the accuracy of the subsequent network structure generation is improved.
The connection module 4 is also for:
acquiring a response state code of a target node;
judging whether the response state code is 200;
if yes, receiving second response information of the target node.
In the implementation process, whether the second response information is received is judged according to the value of the response state code of the target node, so that the accuracy of the obtained second response information can be ensured, and the receiving efficiency is improved.
The connection module 4 is also for:
extracting the IP address and the port information in the second response information;
and obtaining the communication relation information between the nodes according to the IP address and the port information.
In the implementation process, the communication relation information between the nodes is obtained according to the IP address and the port information, so that the obtained communication relation information is more accurate, and the port information of the nodes can be quickly found.
The above-mentioned acquisition device of the blockchain public network structure can implement the method of the first embodiment. The options in the first embodiment described above also apply to this embodiment, and are not described in detail here.
The rest of the embodiments of the present application may refer to the content of the first embodiment, and in this embodiment, no further description is given.
Example III
The embodiment of the application provides an electronic device, which comprises a memory and a processor, wherein the memory is used for storing a computer program, and the processor runs the computer program to enable the electronic device to execute the acquisition method of the blockchain public chain network structure of the embodiment I.
Alternatively, the electronic device may be a server.
Referring to fig. 3, fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device may include a processor 31, a communication interface 32, a memory 33, and at least one communication bus 34. Wherein the communication bus 34 is used to enable direct connection communication of these components. The communication interface 32 of the device in the embodiment of the present application is used for performing signaling or data communication with other node devices. The processor 31 may be an integrated circuit chip with signal processing capabilities.
The processor 31 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but may also be a Digital Signal Processor (DSP), application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. The general purpose processor may be a microprocessor or the processor 31 may be any conventional processor or the like.
The Memory 33 may be, but is not limited to, random access Memory (Random Access Memory, RAM), read Only Memory (ROM), programmable Read Only Memory (Programmable Read-Only Memory, PROM), erasable Read Only Memory (Erasable Programmable Read-Only Memory, EPROM), electrically erasable Read Only Memory (Electric Erasable Programmable Read-Only Memory, EEPROM), etc. The memory 33 has stored therein computer readable instructions which, when executed by the processor 31, enable the apparatus to perform the various steps described above in relation to the embodiment of the method of fig. 1.
Optionally, the electronic device may further include a storage controller, an input-output unit. The memory 33, the memory controller, the processor 31, the peripheral interface, and the input/output unit are electrically connected directly or indirectly to each other, so as to realize data transmission or interaction. For example, the components may be electrically coupled to each other via one or more communication buses 34. The processor 31 is arranged to execute executable modules stored in the memory 33, such as software functional modules or computer programs comprised by the device.
The input-output unit is used for providing the user with the creation task and creating the starting selectable period or the preset execution time for the task so as to realize the interaction between the user and the server. The input/output unit may be, but is not limited to, a mouse, a keyboard, and the like.
It will be appreciated that the configuration shown in fig. 3 is merely illustrative, and that the electronic device may also include more or fewer components than shown in fig. 3, or have a different configuration than shown in fig. 3. The components shown in fig. 3 may be implemented in hardware, software, or a combination thereof.
In addition, the embodiment of the present application further provides a computer readable storage medium storing a computer program, where the computer program when executed by a processor implements the method for acquiring the blockchain public chain network structure of the first embodiment.
The present application also provides a computer program product which, when run on a computer, causes the computer to perform the method described in the method embodiments.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners as well. The apparatus embodiments described above are merely illustrative, for example, flow diagrams and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based devices which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present application may be integrated together to form a single part, or each module may exist alone, or two or more modules may be integrated to form a single part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk, etc.
The foregoing is merely exemplary embodiments of the present application and is not intended to limit the scope of the present application, and various modifications and variations may be suggested to one skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application. It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
The foregoing is merely specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.

Claims (5)

1. The method for acquiring the block chain public chain network structure is characterized by comprising the following steps:
acquiring interface document information of a block chain public chain;
analyzing the interface document information to obtain node conventional information and a node list, or analyzing an API interface method to judge whether the interface document information accords with an HTTP GET request method or an HTTP POST request method;
constructing a first detection packet according to the node conventional information;
constructing a second probe packet according to the first probe packet and the node list;
obtaining communication relation information among nodes according to the second detection packet;
generating a block chain public chain network structure according to the communication relation information;
the step of constructing a second probe packet according to the first probe packet and the node list includes:
sending the first detection packet to a target node so that the target node returns first response information;
receiving the first response information of the target node;
constructing a second detection packet according to the first response information and the node list;
the step of constructing a second probe packet according to the first response information and the node list includes:
obtaining characteristic information of the block chain public chain according to the first response information;
determining a product name according to the characteristic information;
constructing the second detection packet according to the product name and the node list;
the step of obtaining the communication relation information between the nodes according to the second probe packet includes:
detecting the target node according to the second detection packet to obtain second response information;
obtaining communication relation information among the nodes according to the second response information;
the step of detecting the target node according to the second detection packet to obtain second response information includes:
sending the second detection packet to the target node so as to enable the target node to return second response information;
receiving the second response information of the target node;
the step of receiving the second response information of the target node includes:
acquiring a response status code of the target node;
judging whether the response state code is 200;
and if yes, receiving the second response information of the target node.
2. The method for obtaining a blockchain public network structure according to claim 1, wherein the step of obtaining the communication relationship information between the nodes according to the second response information includes:
extracting the IP address and port information in the second response information;
and obtaining the communication relation information between the nodes according to the IP address and the port information.
3. An acquisition device of a blockchain public chain network structure, the device comprising:
the acquisition module is used for acquiring interface document information of the block chain public chain;
the analysis module is used for analyzing the interface document information to obtain node conventional information and a node list, or analyzing an API interface method to judge whether the interface document information accords with an HTTP GET request method or an HTTP POST request method;
the construction module is used for constructing a first detection packet according to the node conventional information; the method is also used for constructing a second probe packet according to the first probe packet and the node list;
the connection module is used for obtaining the communication relation information between the nodes according to the second detection packet;
the generation module is used for generating a block chain public chain network structure according to the communication relation information;
the building module is also for:
sending the first detection packet to a target node so that the target node returns first response information;
receiving the first response information of the target node;
constructing a second detection packet according to the first response information and the node list;
obtaining characteristic information of the block chain public chain according to the first response information;
determining a product name according to the characteristic information;
constructing the second detection packet according to the product name and the node list;
the connection module is also used for:
detecting the target node according to the second detection packet to obtain second response information;
obtaining communication relation information among the nodes according to the second response information;
the connection module is also used for:
sending the second detection packet to the target node so as to enable the target node to return second response information;
receiving the second response information of the target node;
acquiring a response status code of the target node;
judging whether the response state code is 200;
and if yes, receiving the second response information of the target node.
4. An electronic device comprising a memory for storing a computer program and a processor that runs the computer program to cause the electronic device to perform the method of acquiring a blockchain public network structure according to any of claims 1 to 2.
5. A computer readable storage medium, characterized in that it stores a computer program which, when executed by a processor, implements the method of acquiring a blockchain public network structure according to any of claims 1 to 2.
CN202210849488.XA 2022-07-19 2022-07-19 Method and device for acquiring block chain public chain network structure and electronic equipment Active CN115225510B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210849488.XA CN115225510B (en) 2022-07-19 2022-07-19 Method and device for acquiring block chain public chain network structure and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210849488.XA CN115225510B (en) 2022-07-19 2022-07-19 Method and device for acquiring block chain public chain network structure and electronic equipment

Publications (2)

Publication Number Publication Date
CN115225510A CN115225510A (en) 2022-10-21
CN115225510B true CN115225510B (en) 2024-01-23

Family

ID=83612053

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210849488.XA Active CN115225510B (en) 2022-07-19 2022-07-19 Method and device for acquiring block chain public chain network structure and electronic equipment

Country Status (1)

Country Link
CN (1) CN115225510B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107947994A (en) * 2017-12-11 2018-04-20 日立楼宇技术(广州)有限公司 Network topology self-discovery method, apparatus, the network equipment and computer-readable storage medium
CN110474818A (en) * 2019-07-11 2019-11-19 福州博泉网络科技有限公司 Block chain network sniffer, Network Sniffing method and optimization method
CN111262788A (en) * 2020-01-11 2020-06-09 杭州拾贝知识产权服务有限公司 Optimized and improved Merkle tree storage method and system
WO2020114242A1 (en) * 2018-12-07 2020-06-11 白杰 Token conversion method based on public blockchain and blockchain system
CN111355630A (en) * 2020-02-18 2020-06-30 杭州复杂美科技有限公司 Block chain performance quantitative analysis method, system, equipment and storage medium
CN112134762A (en) * 2020-09-24 2020-12-25 腾讯科技(深圳)有限公司 Test method, device, terminal and storage medium for block chain network structure
CN114422409A (en) * 2021-12-17 2022-04-29 深圳壹账通智能科技有限公司 Block chain network testing method, device, equipment and storage medium
CN114465931A (en) * 2021-12-30 2022-05-10 深信服科技股份有限公司 Network detection method, device, electronic equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102217378B (en) * 2011-05-27 2014-03-05 华为技术有限公司 Method, device and system for detecting routing information
SG11202100940TA (en) * 2018-09-25 2021-02-25 Sony Corp Communication network, method, network equipment and communication device
US11489914B2 (en) * 2020-01-19 2022-11-01 Bernt Erik Bjontegard Contextual intelligence of every-thing communication platform integrating edge computation, augmented intelligence and distributed ledger data storage nodes and tokens for real world data interactions across internet of things with payment integration

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107947994A (en) * 2017-12-11 2018-04-20 日立楼宇技术(广州)有限公司 Network topology self-discovery method, apparatus, the network equipment and computer-readable storage medium
WO2020114242A1 (en) * 2018-12-07 2020-06-11 白杰 Token conversion method based on public blockchain and blockchain system
CN110474818A (en) * 2019-07-11 2019-11-19 福州博泉网络科技有限公司 Block chain network sniffer, Network Sniffing method and optimization method
CN111262788A (en) * 2020-01-11 2020-06-09 杭州拾贝知识产权服务有限公司 Optimized and improved Merkle tree storage method and system
CN111355630A (en) * 2020-02-18 2020-06-30 杭州复杂美科技有限公司 Block chain performance quantitative analysis method, system, equipment and storage medium
CN112134762A (en) * 2020-09-24 2020-12-25 腾讯科技(深圳)有限公司 Test method, device, terminal and storage medium for block chain network structure
CN114422409A (en) * 2021-12-17 2022-04-29 深圳壹账通智能科技有限公司 Block chain network testing method, device, equipment and storage medium
CN114465931A (en) * 2021-12-30 2022-05-10 深信服科技股份有限公司 Network detection method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN115225510A (en) 2022-10-21

Similar Documents

Publication Publication Date Title
CN111355697B (en) Detection method, device, equipment and storage medium for botnet domain name family
CN107733581B (en) Rapid internet asset feature detection method and device based on whole network environment
CN108776616B (en) Method for determining credible state of block chain node, block chain link point and system
CN105119942B (en) A kind of flood attack detection method
US9037668B2 (en) Electronic message manager system, method, and computer program product for scanning an electronic message for unwanted content and associated unwanted sites
JP2016152594A (en) Network attack monitoring device, network attack monitoring method, and program
CN106209759A (en) Detection resides in the apocrypha on network
CN111314285A (en) Method and device for detecting route prefix attack
CN110928880B (en) Data processing method, device, terminal and medium based on block chain
US8856931B2 (en) Network browser system, method, and computer program product for scanning data for unwanted content and associated unwanted sites
JP5739034B1 (en) Attack detection system, attack detection device, attack detection method, and attack detection program
CN112437062B (en) ICMP tunnel detection method, device, storage medium and electronic equipment
KR102095853B1 (en) Virus database acquisition method and device, equipment, server and system
EP3316550A1 (en) Network monitoring device and method
CN109450690B (en) Method and device for quickly locking lost host in networking
CN102868685A (en) Method and device for judging automatic scanning behavior
CN116055102A (en) Method for updating necessary repair loopholes, method for scanning necessary repair loopholes and related equipment
CN109547427B (en) Blacklist user identification method and device, computer equipment and storage medium
CN115225510B (en) Method and device for acquiring block chain public chain network structure and electronic equipment
CN107682354A (en) A kind of network virus detection method, apparatus and equipment
EP3913888A1 (en) Detection method for malicious domain name in domain name system and detection device
CN117424743A (en) Data processing method and device, electronic equipment and storage medium
WO2017145843A1 (en) Analysis method, analysis device, and analysis program
EP3232360B1 (en) Malware analysis system, malware analysis method, and malware analysis program
CN111314326A (en) Method, device, equipment and medium for confirming HTTP vulnerability scanning host

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
GR01 Patent grant
GR01 Patent grant