CN109936486B - Automatic dial testing method, device, equipment and storage medium based on block chain - Google Patents

Automatic dial testing method, device, equipment and storage medium based on block chain Download PDF

Info

Publication number
CN109936486B
CN109936486B CN201910000487.6A CN201910000487A CN109936486B CN 109936486 B CN109936486 B CN 109936486B CN 201910000487 A CN201910000487 A CN 201910000487A CN 109936486 B CN109936486 B CN 109936486B
Authority
CN
China
Prior art keywords
dial testing
nodes
dial
node
block chain
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
CN201910000487.6A
Other languages
Chinese (zh)
Other versions
CN109936486A (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910000487.6A priority Critical patent/CN109936486B/en
Publication of CN109936486A publication Critical patent/CN109936486A/en
Application granted granted Critical
Publication of CN109936486B publication Critical patent/CN109936486B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to the technical field of block chain consensus mechanism technology-based dial testing, in particular to an automatic dial testing method, device, equipment and storage medium based on a block chain. The method comprises the following steps: screening preset number of dial testing nodes in the block chain network through a consensus mechanism, and obtaining alternate accounting rights by the dial testing nodes according to a preset time table; after the alternate accounting rights are obtained, reading a dial testing algorithm and a dial testing task preset by the intelligent contract from the block chain network, and executing the dial testing task through the dial testing algorithm to obtain a dial testing result; and generating a dial testing block according to the dial testing result, and performing uplink in the block chain network to form a new block chain. According to the invention, a decentralized block chain network is introduced, based on the decentralized advantages of the block chain, the dial testing node competition election and the dial testing algorithm synchronization are carried out by depending on the characteristics of the block chain, such as time stamp, non-tampering and the like, and the fair and open execution of the dial testing task is realized.

Description

Automatic dial testing method, device, equipment and storage medium based on block chain
Technical Field
The invention relates to the technical field of dial testing, in particular to an automatic dial testing method, device, equipment and storage medium based on a block chain.
Background
With the advancement of informatization, the internet occupies an increasingly important position in the life of people. Various web sites on the internet serve users from all over the world at all times, and therefore the stability of the web sites is very important. In view of the characteristics of the internet, the servers of the website are generally composed of customized computer clusters, so the stability of each computer affects the stability of the whole cluster. In order to find out whether a computer providing services is halted or not and the services are unavailable in time, a dial testing system is required to perform dial testing on a computer cluster. The existing dial testing systems are centralized systems, dial testing nodes are all in a traditional deployment mode, information synchronization and transmission do not exist among the dial testing nodes, the contribution of the dial testing nodes to the overall network dial testing service depends on a centralized recording mode, and disputes are easily generated when dial testing tasks are distributed.
Disclosure of Invention
In view of this, it is necessary to provide a block chain-based automatic dial testing method, apparatus, device and storage medium for solving the problem that disputes are easily generated because no information is synchronized and transmitted between dial testing nodes in the conventional dial testing system.
An automatic dial testing method based on a block chain comprises the following steps:
screening preset number of dial testing nodes in a block chain network through a consensus mechanism, wherein the dial testing nodes obtain alternate accounting rights according to a preset time schedule;
after the alternate accounting right is obtained, reading a dial testing algorithm and a dial testing task preset by an intelligent contract from the blockchain network, and executing the dial testing task through the dial testing algorithm to obtain a dial testing result;
and generating a dial testing block according to the dial testing result, and performing uplink in the block chain network to form a new block chain.
In one possible design, the screening a preset number of dial-up test nodes in a blockchain network through a consensus mechanism, where the dial-up test nodes obtain alternate accounting rights according to a preset schedule, includes:
acquiring node resource information of a node per se, wherein the node resource information comprises network connectivity, CPU idle rate and memory idle rate, and broadcasting the node resource information to other nodes in the block chain network;
after node resource information of a plurality of nodes in the block chain network is obtained, adding the network connection speed, the CPU idle rate and the memory idle rate in the network connectivity to obtain a node resource value of each node, sequencing the node resource values of the plurality of nodes from top to bottom, and screening out a plurality of nodes with the highest node resource values;
automatically voting to the screened nodes through a consensus mechanism of the block chain network, recording the votes of all nodes in the block chain network through the consensus mechanism, and defining the preset number of nodes with the highest votes as dial testing nodes.
In one possible design, the sorting node resource values of the nodes from top to bottom to screen out the nodes with the highest node resource values, includes:
when a plurality of nodes with the highest node resource value are screened, if the node resource values of at least two nodes are the same, the node stability of each node is obtained, the dial testing task times and the execution quality scores of each node are obtained from a block chain list, the node contribution degree of each node is calculated, and the node contribution degree Z of the ith node is calculatediThe formula is as follows:
Zi=Ai*a+Bi*b+Ci*c
a+b+c=100%
wherein A isiNumber of dial testing tasks for the ith node, BiIs the execution quality score of the ith node, CiA, b and c are percentage coefficients;
screening out a plurality of nodes with the highest contribution degree of the nodes from at least two nodes;
and if the node contribution degrees of at least two nodes are the same, screening out the nodes with the broadcasting prior.
In one possible design, after obtaining the alternate billing right, reading a dial testing algorithm and a dial testing task preset by an intelligent contract from the blockchain network, and executing the dial testing task through the dial testing algorithm before obtaining a dial testing result, the method includes:
acquiring a dial testing algorithm and a dial testing task uploaded by a user through a preset dial testing maintenance interface, and storing the dial testing algorithm and the dial testing task in an intelligent contract of the block chain network;
acquiring a dial testing algorithm or a dial testing task inquired by a user through a preset dial testing maintenance interface, and displaying the dial testing algorithm or the dial testing task through the dial testing maintenance interface;
and acquiring a dial testing algorithm or a dial testing task modified by a user through a preset dial testing maintenance interface, and updating the dial testing algorithm or the dial testing task into an intelligent contract of the block chain network.
In one possible design, after obtaining the alternate accounting right, reading a dial testing algorithm and a dial testing task preset by an intelligent contract from the blockchain network, and executing the dial testing task through the dial testing algorithm to obtain a dial testing result, the method includes:
after acquiring the alternate accounting rights, reading a dial testing algorithm and a dial testing task preset by an intelligent contract from the blockchain network;
comparing the dial testing algorithm with a dial testing algorithm stored in an intelligent contract of the node of the self, and if the dial testing algorithm is different from the dial testing algorithm stored in the node of the self, replacing the dial testing algorithm with the dial testing algorithm stored in the node of the self;
and calling a dial testing algorithm stored in the node per se, and executing the dial testing task to obtain a dial testing result.
In one possible design, the generating a dial test block from the dial test result and performing uplink in the blockchain network to form a new blockchain includes:
and after generating a dial test block according to the dial test result, broadcasting in the block chain network, carrying out consistency verification on the dial test block through other nodes, and defining that the dial test block completes chaining in the block chain network when the dial test block passes the verification of M other nodes to form a new block chain.
In one possible design, the verifying consistency of the test block by the other node, when the test block passes the verification, includes:
after receiving the broadcast, judging whether the nodes broadcasting the dial testing block are consistent with the arrangement sequence according to the arrangement sequence of the dial testing nodes obtained by the alternate accounting right in the consensus mechanism, if not, defining that the verification fails, ending the verification, and if so, continuing the verification;
acquiring data information in a block body of the dial testing block and a hash value in a block head, and obtaining a verification value for the data information according to a hash value algorithm;
and comparing the verification value with the hash value, judging whether the verification value is the same as the hash value, if the verification value is not the same as the hash value, finishing the verification, and if the verification value is the same as the hash value, signing the hash value in the block header and then continuously broadcasting the signature to other nodes in the block chain network.
An automatic dial testing device based on a block chain comprises:
the screening dial testing node module is used for screening a preset number of dial testing nodes in the block chain network through a consensus mechanism, and the dial testing nodes obtain alternate accounting rights according to a preset time schedule;
the dial testing task execution module is used for reading a dial testing algorithm and a dial testing task preset by an intelligent contract from the block chain network after acquiring the alternate accounting right, and executing the dial testing task through the dial testing algorithm to obtain a dial testing result;
and the module for generating the dialing test block is used for generating the dialing test block according to the dialing test result and carrying out chain winding in the block chain network to form a new block chain.
A computer device comprising a memory and a processor, the memory having stored therein computer readable instructions which, when executed by the processor, cause the processor to perform the steps of the above block chain based automatic dial testing method.
A storage medium having stored thereon computer-readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the above block chain based automatic dial testing method.
The automatic dial testing method, the device, the computer equipment and the storage medium based on the block chain comprise the steps of screening out a preset number of dial testing nodes in a block chain network through a consensus mechanism, wherein the dial testing nodes obtain alternate accounting rights according to a preset time schedule; after the alternate accounting right is obtained, reading a dial testing algorithm and a dial testing task preset by an intelligent contract from the blockchain network, and executing the dial testing task through the dial testing algorithm to obtain a dial testing result; and generating a dial testing block according to the dial testing result, and performing uplink in the block chain network to form a new block chain. According to the invention, a decentralized block chain network is introduced, based on the decentralized advantages of the block chain, the dial testing node competition election and the dial testing algorithm synchronization are carried out by depending on the characteristics of the block chain, such as time stamp, non-tampering and the like, and the fair and open execution of the dial testing task is realized.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention.
Fig. 1 is a flowchart of an automatic block chain-based call testing method according to an embodiment of the present invention;
FIG. 2 is a flowchart of step S1 in one embodiment;
FIG. 3 is a flowchart of the method for screening the nodes of step S102 in one embodiment;
FIG. 4 is a flowchart of the consistency verification of step S3 in one embodiment;
fig. 5 is a block diagram of an automatic dial testing device based on a block chain according to an embodiment 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.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
Fig. 1 is a flowchart of an automatic dial testing method based on a block chain in an embodiment of the present invention, and as shown in fig. 1, an automatic dial testing method based on a block chain includes the following steps:
step S1, screening dial testing nodes: and screening preset number of dial testing nodes in the block chain network through a consensus mechanism, and acquiring alternate accounting rights by the dial testing nodes according to a preset time schedule.
The blockchain network is a system based on a blockchain technology, also called a distributed ledger technology, and is an internet database technology. The method is characterized by decentralization, openness and transparency, and each user can participate in maintaining database records. The blockchain network is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm. The block chain network mainly comprises a data layer, an intelligent contract layer and the like, wherein the data layer encapsulates bottom data blocks and related basic data and basic algorithms such as data encryption and time stamps, and the bottom data blocks are presented in a chain structure, namely the block chain is a chain data structure formed by combining the data blocks in a sequential connection mode according to a time sequence and is a distributed account book which is guaranteed to be not tampered and forged in a cryptographic mode. The intelligent contract is based on the credible data which can not be tampered, and can automatically execute some predefined rules, terms or algorithms.
Any terminal participating in dial testing can be registered as a node in the blockchain network, and participate in the screening of the dial testing node in the step together through a consensus mechanism of the blockchain network. And the screened dial testing nodes obtain alternate accounting rights, and the accounting is the process of obtaining and executing the dial testing task.
In one embodiment, step S1, as shown in fig. 2, includes:
step S101, collecting and broadcasting information: and acquiring node resource information of the node, wherein the node resource information comprises network connectivity, CPU idle rate and memory idle rate, and broadcasting the node resource information to other nodes in the block chain network.
When the node resource information is collected, the network connectivity, the CPU idle rate and the memory idle rate of the node can be monitored through a hook mechanism, and the node resource information is obtained. The acquisition of the network connectivity mainly acquires the network connection speed of the node.
When the node resource information is broadcasted to other nodes in the block chain network, the common identity orderer node is started, the connection is established with a plurality of peer nodes of the peer-to-peer network through the orderer node, the node resource information is broadcasted to the peer nodes, and the node resource information is stored in the peer nodes.
Step S102, screening a plurality of nodes: after node resource information of a plurality of nodes in a block chain network is obtained, the network connection speed, the CPU idle rate and the memory idle rate in the network connectivity are added to obtain a node resource value of each node, the node resource values of the nodes are sorted from top to bottom, and the nodes with the highest node resource values are screened out.
Any node in the block chain network not only broadcasts the node resource information of the node to other nodes, but also receives the node resource information broadcast by other nodes, and after receiving the node resource information of a certain number of nodes, for example, after 90% of the nodes in the block chain network broadcast the node resource information, the node resource information is processed to obtain the node resource value of each node. In the step, the node resource information broadcasted by all nodes does not need to be received before the node resource information is processed in a unified way. When a plurality of nodes with the highest node resources are screened, a plurality of nodes with a certain proportion can be screened according to the number of the nodes in the block chain network. For example, when the blockchain network contains 1000 nodes, the node with the highest resource value of 100 nodes is screened out.
In node screening, if there are a plurality of nodes having the same node resource value, for example, the screened nodes o, p, and q are nodes 99 th, 100 th, and 101 th respectively having the same node resource value, in an embodiment, as shown in fig. 3, the following screening method is adopted:
step S10201, calculating the contribution degree of the node: when a plurality of nodes with the highest node resource values are screened, if the node resource values of at least two nodes are the same, the node stability of each node is obtained, and the dial testing task frequency, the dial testing task frequency and the dial testing task frequency of each node are obtained from a block chain list,Executing quality scores, calculating the node contribution degree of each node, and the node contribution degree Z of the ith nodeiThe formula is as follows:
Zi=Ai*a+Bi*b+Ci*c
a+b+c=100%
wherein A isiNumber of dial testing tasks for the ith node, BjIs the execution quality score of the ith node, CiAnd a, b and c are percentage coefficients for the node stability of the ith node.
In the step, the node stability refers to the stability of a connection node network, the delay time is monitored by connecting nodes at fixed frequency, and the reciprocal of the delay time is defined as a node stability parameter.
Each node registered in the blockchain network is preset with a blockchain list, and the blockchain list stores information such as the dial testing node and the hash value of the dial testing block of each uplink dial testing block according to the block uplink sequence. In the block chain list, any dial testing node contains a corresponding dial testing block, and the dial testing frequency is recorded as the number of corresponding dial testing times plus one, so that the dial testing frequency of each node in the plurality of nodes with the highest node resource value is searched out from the block chain list. And obtaining a dial test result in the block body of the dial test block according to the hash value of the dial test block, wherein the dial test result contains a state parameter which is good or bad, reading the state parameter, if the state parameter is good, adding one to the quality value, finding out the quality value of each node in a plurality of nodes with the highest node resource value from the block chain list, and dividing the quality value of each node by the dial test times to obtain the execution quality score of each node.
Contribution degree Z at nodeiIn the formula, the coefficients a, b and c can be 10%, 50% and 40%, respectively.
Step S10202, screening nodes according to the contribution degrees of the nodes: and screening out a plurality of nodes with the highest node contribution degree from at least two nodes.
After the node contribution degrees of the nodes are obtained, the node contribution degrees are sorted from high to low, and the node with the highest node contribution degree is screened out. For example, when the node o, the node p and the node q are respectively 99 th, 100 th and 101 th nodes and have the same node resource value, the node contribution degrees of the three nodes are calculated, and after the node contribution degrees are sequenced, the node q, the node o and the node p are obtained from top to bottom according to the sequencing of the node contribution degrees. Since 100 nodes need to be screened, the node q and the node o are screened out, and the node p is abandoned.
Step S10203, screening nodes before broadcast: and if the node contribution degrees of at least two nodes are the same, screening out the nodes with the broadcasting prior.
When the nodes are screened according to the node contribution degrees in step S10202, if the node contribution degrees of two nodes are the same, for example, the node contribution degree of the node q is the highest, and the node contribution degrees of the nodes o and p are the same, one of the two nodes needs to be screened, and at this time, the node which broadcasts the previous node in the two nodes is screened.
In the embodiment, a plurality of nodes are progressively screened through three layers of parameters, namely, node resource information, node contribution degree and broadcast time, so that a plurality of nodes which are relatively idle in a block chain network, have high dial testing execution quality and are high in running speed are screened out.
Step S103, screening dial testing nodes: automatically voting to the screened nodes through a consensus mechanism of the block chain network, recording the votes of all nodes in the block chain network through the consensus mechanism, and defining the preset number node with the highest votes as a dial-up test node.
Each node in the block chain network has the right of voting, the voting work is automatically carried out through a consensus mechanism, the number of votes obtained by each node is recorded through the consensus mechanism, and the preset number of nodes with the highest votes is used as dial testing nodes. For example, the 100 nodes with the highest votes are defined as dial testing nodes.
The joint recognition mechanism in the step adopts a DPoS joint recognition mechanism, and the preset number of nodes are selected through the DPoS joint recognition mechanism. The DPoS consensus mechanism is a share authorization certification mechanism, and the principle is that a small group of nodes are selected at random through different strategies, and the selected small group of nodes perform creation, verification, signature and mutual supervision of a new block, so that the time and the labor cost required by block creation and confirmation are greatly reduced.
In this embodiment, a group of relatively idle nodes with high dial testing quality and high running speed are screened out as dial testing nodes in a blockchain network by a consensus mechanism in a multi-layer progressive manner, and subsequent dial testing tasks are executed.
Step S2, executing a dial testing task: and after the alternate accounting rights are obtained, reading a dial testing algorithm and a dial testing task preset by the intelligent contract from the block chain network, and executing the dial testing task through the dial testing algorithm to obtain a dial testing result.
The block chain network is provided with an intelligent contract layer, and an intelligent contract of the intelligent contract layer comprises a plurality of dial testing algorithms and corresponding dial testing tasks. The dial testing algorithm and the dial testing task in the step are as follows: the dial testing task is used for checking whether a domain name is available, the domain name corresponds to a plurality of machine rooms, and dial testing nodes need to calculate the machine room information nearest to the dial testing nodes through a dial testing algorithm and request the machine rooms for testing. The specific dial testing algorithm analyzes the node position by acquiring the IP of the dial testing node, scans the information of the machine room, and calculates which IP position of the machine room is closest to the dial testing node, so that the machine room is defined as the machine room which needs to execute the dial testing task.
In one embodiment, before step S2, the method includes: acquiring a dial testing algorithm and a dial testing task uploaded by a user through a preset dial testing maintenance interface, and storing the dial testing algorithm and the dial testing task in an intelligent contract of a block chain network; acquiring a dial testing algorithm or a dial testing task inquired by a user through a preset dial testing maintenance interface, and displaying the dial testing algorithm or the dial testing task through the dial testing maintenance interface; and acquiring a dial testing algorithm or a dial testing task modified by a user through a preset dial testing maintenance interface, and updating the dial testing algorithm or the dial testing task into an intelligent contract of the block chain network.
The main body of the embodiment is a node with intelligent contract maintenance authority, and the general energy-saving mode has no maintenance authority. When the dial testing algorithm needs to be upgraded or modified, the dial testing algorithm and the dial testing task in the intelligent contract are added, modified and deleted according to the requirements through the embodiment.
In one embodiment, step S2 includes: after acquiring the alternate accounting rights, reading a dial testing algorithm and a dial testing task preset by the intelligent contract from the block chain network; comparing the dial testing algorithm with the dial testing algorithm stored in the intelligent contract of the node, and if the dial testing algorithm is different from the dial testing algorithm stored in the intelligent contract of the node, replacing the dial testing algorithm with the dial testing algorithm stored in the node; and calling a dial testing algorithm stored in the node per se, and executing a dial testing task to obtain a dial testing result.
After acquiring the alternate accounting rights, any node reads the dial testing algorithm and the dial testing task in the intelligent contract from the blockchain network before the dial testing task is performed in order to synchronize with the dial testing algorithm in the intelligent contract of the blockchain network, compares and synchronizes with the dial testing algorithm stored in the intelligent contract, and then executes the dial testing task, so that the dial testing algorithm and the dial testing task executed each time are guaranteed to be the latest.
In order to synchronize the intelligent contract directly upgraded or modified in the blockchain network, the intelligent contract synchronization operation is performed before the dial test task is performed, so that the maintenance of the dial test algorithm is realized, the dial test algorithm and the dial test task are maintained simply and conveniently, and the problem that the dial test algorithm is required to be upgraded manually one by one and the maintenance is difficult in the traditional dial test node is solved.
Step S3, generating a test block: and generating a dial testing block according to the dial testing result, and performing uplink in the block chain network to form a new block chain.
After the dial testing node completes the dial testing task, a dial testing block is generated for the dial testing result and is shared in the block chain network for other nodes to share the dial testing result.
In one embodiment, step S3 includes: and after generating a dial test block according to the dial test result, broadcasting in the block chain network, carrying out consistency verification on the dial test block through other nodes, and defining that the dial test block finishes chaining in the block chain network to form a new block chain when the dial test block passes the verification of M other nodes. The consistency verification, as shown in fig. 4, adopts the following method:
step S301, first verification: after receiving the broadcast, judging whether the nodes of the broadcast dial testing block are consistent with the arrangement sequence according to the arrangement sequence of the dial testing nodes of the alternate accounting rights obtained in the consensus mechanism, if not, defining that the verification fails, ending the verification, and if so, continuing the verification.
And any node in the block chain carries out consistency verification after receiving the broadcast. In order to reduce the time and labor cost required by verification, the dial testing node preferably performs consistency verification on the dial testing block, and the dial testing node not only broadcasts the generated dial testing block and waits for consistency verification of other nodes, but also performs consistency verification on the dial testing block broadcast by other nodes. When the node receives the broadcast, the peer node receives the dial test block broadcast by other nodes in the block chain network. Since the dial testing nodes obtaining the alternate accounting rights are determined in step S1, the first verification is that the nodes judge whether the sequence of the dial testing blocks of each block output is consistent according to the sequence of the dial testing nodes in the consensus mechanism, thereby ensuring consistency.
Step S302, second verification: the data information in the block body of the dial-testing block and the hash value in the block head are obtained, a verification value is obtained for the data information according to a hash value algorithm, the verification value is compared with the hash value, whether the data information is the same as the hash value or not is judged, if the data information is different from the hash value, the verification is not passed, the verification is finished, and if the data information is the same as the hash value, the data information and the hash value in the block head are signed and then continuously broadcasted to other nodes in the block chain network.
The data information in this step is the dial testing result, and this step is used to verify whether the data in the dial testing block itself is tampered. And when the verification value is the same as the hash value, the dial testing result is considered to be not tampered.
When the dial testing block passes the verification of M other nodes, completing the chain loading, and synchronously updating the dial testing block completing the chain loading, wherein all nodes in the block chain network update the block chain list of the nodes: and reading the hash value of the previous block and the hash value of the current block in the testing block, comparing the hash values with a block chain list in a node of the current block, adding the hash value of the current block and the corresponding testing block into the block chain list when the chain tail of the block chain list is the hash value of the previous block, and defining the testing block as a chain tail block to realize the synchronization of data in the block chain network.
And triggering the intelligent contract after the preset number of dial testing nodes finish the dial testing task, and re-screening the dial testing nodes in the step S1.
In the automatic dial testing method based on the block chain, the dial testing node obtains the node right in a resource competition mode, the average status of each node is equal, and disputes cannot be generated; the dial testing algorithm is synchronized through an intelligent contract, so that the dial testing algorithm is convenient to update; and (4) performing account keeping and cochain on the dial test result, ensuring the transparency of the account book and the fairness of each node, wherein the account book can not be tampered and can be traced. In the embodiment, by introducing the advantages of decentralization and non-tampering of the block chain technology, the enthusiasm and transparency of joining of the dial testing nodes are increased, and a fairer dial testing network is constructed.
In one embodiment, an automatic dial testing apparatus based on a block chain is provided, as shown in fig. 5, including the following modules:
the screening dial testing node module is used for screening a preset number of dial testing nodes in the block chain network through a consensus mechanism, and the dial testing nodes obtain alternate accounting rights according to a preset time schedule;
the dial testing task execution module is used for reading a dial testing algorithm and a dial testing task preset by the intelligent contract from the block chain network after acquiring the alternate accounting right, and executing the dial testing task through the dial testing algorithm to obtain a dial testing result;
and the module for generating the dialing test block is used for generating the dialing test block according to the dialing test result and carrying out chaining in the block chain network to form a new block chain.
In one embodiment, a computer device is provided, which includes a memory and a processor, where the memory stores computer readable instructions, and the computer readable instructions, when executed by the processor, cause the processor to implement the steps in the block chain based automatic dial testing method according to the foregoing embodiments.
In one embodiment, a storage medium storing computer readable instructions is provided, and the computer readable instructions, when executed by one or more processors, cause the one or more processors to perform the steps of the automatic block chain based dial testing method of the embodiments. The storage medium may be a nonvolatile storage medium.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, and the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express some exemplary embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. An automatic dial testing method based on a block chain is characterized by comprising the following steps:
screening preset number of dial testing nodes in a block chain network through a consensus mechanism, wherein the dial testing nodes obtain alternate accounting rights according to a preset time schedule;
after the alternate accounting rights are obtained, reading a dial testing algorithm and a dial testing task preset by an intelligent contract from the blockchain network, and executing the dial testing task through the dial testing algorithm to obtain a dial testing result;
and generating a dial testing block according to the dial testing result, and performing uplink in the block chain network to form a new block chain.
2. The blockchain-based automatic dial testing method of claim 1, wherein a predetermined number of dial testing nodes are screened out from a blockchain network through a consensus mechanism, and the dial testing nodes obtain alternate accounting rights according to a predetermined schedule, comprising:
acquiring node resource information of a node per se, wherein the node resource information comprises network connectivity, CPU idle rate and memory idle rate, and broadcasting the node resource information to other nodes in the block chain network;
after node resource information of a plurality of nodes in the block chain network is obtained, adding the network connection speed, the CPU idle rate and the memory idle rate in the network connectivity to obtain a node resource value of each node, sequencing the node resource values of the plurality of nodes from high to low, and screening out a plurality of nodes with the highest node resource values;
automatically voting to the screened nodes through a consensus mechanism of the block chain network, recording the votes of all nodes in the block chain network through the consensus mechanism, and defining the preset number of nodes with the highest votes as dial testing nodes.
3. The method of claim 2, wherein the step of sorting the node resource values of the plurality of nodes from high to low to screen out the plurality of nodes with the highest node resource values comprises:
when a plurality of nodes with the highest node resource value are screened, if the node resource values of at least two nodes are the same, the node stability of each node is obtained, the dial testing task times and the execution quality scores of each node are obtained from a block chain list, the node contribution degree of each node is calculated, and the node contribution degree Z of the ith node is calculatediThe formula is as follows:
Zi=Ai*a+Bi*b+Ci*c
a+b+c=100%
wherein A isiNumber of dial testing tasks for the ith node, BiIs the execution quality score of the ith node, CiA, b and c are percentage coefficients;
screening out a plurality of nodes with the highest contribution degree of the nodes from at least two nodes;
and if the node contribution degrees of at least two nodes are the same, screening out the nodes with the broadcasting prior.
4. The automatic dial testing method based on the blockchain according to claim 1, wherein after the alternate accounting right is obtained, a dial testing algorithm and a dial testing task preset by an intelligent contract are read from the blockchain network, the dial testing task is executed through the dial testing algorithm, and before a dial testing result is obtained, the method comprises the following steps:
acquiring a dial testing algorithm and a dial testing task uploaded by a user through a preset dial testing maintenance interface, and storing the dial testing algorithm and the dial testing task in an intelligent contract of the block chain network;
acquiring a dial testing algorithm or a dial testing task inquired by a user through a preset dial testing maintenance interface, and displaying the dial testing algorithm or the dial testing task through the dial testing maintenance interface;
and acquiring a dial testing algorithm or a dial testing task modified by a user through a preset dial testing maintenance interface, and updating the dial testing algorithm or the dial testing task into an intelligent contract of the block chain network.
5. The automatic dial testing method based on the blockchain according to claim 1, wherein after the alternate accounting right is obtained, a dial testing algorithm and a dial testing task preset by an intelligent contract are read from the blockchain network, and the dial testing task is executed through the dial testing algorithm to obtain a dial testing result, comprising the following steps:
after the alternate accounting rights are obtained, reading a dial testing algorithm and a dial testing task preset by an intelligent contract from the blockchain network;
comparing the dial testing algorithm with a dial testing algorithm stored in an intelligent contract of the node of the self, and if the dial testing algorithm is different from the dial testing algorithm stored in the node of the self, replacing the dial testing algorithm with the dial testing algorithm stored in the node of the self;
and calling a dial testing algorithm stored in the node per se, and executing the dial testing task to obtain a dial testing result.
6. The method according to claim 1, wherein the generating the dial test result into a dial test block and performing uplink in the blockchain network to form a new blockchain comprises:
and after generating a dial test block according to the dial test result, broadcasting in the block chain network, carrying out consistency verification on the dial test block through other nodes, and defining that the dial test block completes chaining in the block chain network when the dial test block passes the verification of M other nodes to form a new block chain.
7. The blockchain-based automatic dial testing method of claim 6, wherein the verifying the consistency of the dial test block by other nodes comprises, when the dial test block passes the verification:
after receiving the broadcast, judging whether the nodes broadcasting the dial testing block are consistent with the arrangement sequence according to the arrangement sequence of the dial testing nodes obtained by the alternate accounting right in the consensus mechanism, if not, defining that the verification fails, ending the verification, and if so, continuing the verification;
acquiring data information in a block body of the dial testing block and a hash value in a block head, and obtaining a verification value for the data information according to a hash value algorithm;
and comparing the verification value with the hash value, judging whether the verification value is the same as the hash value, if the verification value is not the same as the hash value, finishing the verification, and if the verification value is the same as the hash value, signing the hash value in the block header and then continuously broadcasting the signature to other nodes in the block chain network.
8. The utility model provides an automatic dial survey device based on block chain which characterized in that includes:
the screening dial testing node module is used for screening a preset number of dial testing nodes in the block chain network through a consensus mechanism, and the dial testing nodes obtain alternate accounting rights according to a preset time schedule;
the dial testing task execution module is used for reading a dial testing algorithm and a dial testing task preset by an intelligent contract from the block chain network after acquiring the alternate accounting right, and executing the dial testing task through the dial testing algorithm to obtain a dial testing result;
and the module for generating the dialing test block is used for generating the dialing test block according to the dialing test result and carrying out chain winding in the block chain network to form a new block chain.
9. A computer device comprising a memory and a processor, the memory having stored therein computer readable instructions which, when executed by the processor, cause the processor to perform the steps of the blockchain based automatic dial testing method of any one of claims 1 to 7.
10. A storage medium having stored thereon computer-readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the blockchain-based automatic dial testing method of any one of claims 1 to 7.
CN201910000487.6A 2019-01-02 2019-01-02 Automatic dial testing method, device, equipment and storage medium based on block chain Active CN109936486B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910000487.6A CN109936486B (en) 2019-01-02 2019-01-02 Automatic dial testing method, device, equipment and storage medium based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910000487.6A CN109936486B (en) 2019-01-02 2019-01-02 Automatic dial testing method, device, equipment and storage medium based on block chain

Publications (2)

Publication Number Publication Date
CN109936486A CN109936486A (en) 2019-06-25
CN109936486B true CN109936486B (en) 2021-11-26

Family

ID=66984996

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910000487.6A Active CN109936486B (en) 2019-01-02 2019-01-02 Automatic dial testing method, device, equipment and storage medium based on block chain

Country Status (1)

Country Link
CN (1) CN109936486B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109872152B (en) * 2019-01-11 2022-07-15 平安科技(深圳)有限公司 Block chain consensus method based on share authorization certification mechanism and related equipment
CN110572468B (en) * 2019-09-17 2022-11-04 平安科技(深圳)有限公司 Server cluster file synchronization method and device, electronic equipment and storage medium
CN110943869B (en) * 2019-12-16 2022-03-04 杭州复杂美科技有限公司 Block consensus and broadcast method, equipment and storage medium
CN111353177A (en) * 2020-05-25 2020-06-30 杭州趣链科技有限公司 Block chain-based privacy large file storage system
CN111651260A (en) * 2020-06-24 2020-09-11 北京米弘科技有限公司 Network detection task scheduling method and device based on block chain technology
CN112860509A (en) * 2021-01-14 2021-05-28 金茂数字科技有限公司 Dial testing alarm method and device
CN113726758A (en) * 2021-08-25 2021-11-30 百保(上海)科技有限公司 Data privacy calculation method and system based on block chain
CN114189522B (en) * 2021-10-15 2024-04-16 敏博科技(武汉)有限公司 Priority-based blockchain consensus method and system in Internet of vehicles
CN113949657B (en) * 2021-11-30 2023-04-18 中国电信股份有限公司 Internet of things detection device, system and test method
CN114430383B (en) * 2022-01-29 2024-06-07 北京百度网讯科技有限公司 Detection node screening method and device, electronic equipment and storage medium
CN114978945B (en) * 2022-05-13 2024-05-28 北京有竹居网络技术有限公司 Network dial testing method based on edge node, server cluster and related equipment
CN115514663B (en) * 2022-09-23 2023-10-27 北京奇艺世纪科技有限公司 Dial testing method, system, device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106569887A (en) * 2016-11-04 2017-04-19 东南大学 Fine-grained task scheduling method under cloud environment
US9934138B1 (en) * 2016-12-07 2018-04-03 International Business Machines Corporation Application testing on a blockchain
WO2018149505A1 (en) * 2017-02-17 2018-08-23 Nokia Technologies Oy Voting-consensus distributed ledger
CN108848055A (en) * 2018-05-03 2018-11-20 中国银联股份有限公司 A kind of block chain common recognition method, accounting nodes and node
CN108900380A (en) * 2018-07-14 2018-11-27 上海分布信息科技有限公司 A kind of node administration method and its realize system
CN109088792A (en) * 2018-08-06 2018-12-25 佛山市甜慕链客科技有限公司 A kind of block chain data transmission testing method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106569887A (en) * 2016-11-04 2017-04-19 东南大学 Fine-grained task scheduling method under cloud environment
US9934138B1 (en) * 2016-12-07 2018-04-03 International Business Machines Corporation Application testing on a blockchain
WO2018149505A1 (en) * 2017-02-17 2018-08-23 Nokia Technologies Oy Voting-consensus distributed ledger
CN108848055A (en) * 2018-05-03 2018-11-20 中国银联股份有限公司 A kind of block chain common recognition method, accounting nodes and node
CN108900380A (en) * 2018-07-14 2018-11-27 上海分布信息科技有限公司 A kind of node administration method and its realize system
CN109088792A (en) * 2018-08-06 2018-12-25 佛山市甜慕链客科技有限公司 A kind of block chain data transmission testing method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
区块链:需求侧资源参与电网互动的支撑技术;李彬;《电力建设》;20170301;第38卷(第3期);全文 *

Also Published As

Publication number Publication date
CN109936486A (en) 2019-06-25

Similar Documents

Publication Publication Date Title
CN109936486B (en) Automatic dial testing method, device, equipment and storage medium based on block chain
CN108122165A (en) A kind of block chain common recognition method and system
CN108881169A (en) Time distribution and synchronous method and system, data processing system based on block chain
CN111092896B (en) Food source tracing distributed data synchronization method based on optimized PAXOS
CN112118239B (en) Block chain consensus method and device, electronic equipment and storage medium
CN110213522A (en) A kind of video data handling procedure, device and relevant device
CN110598110B (en) Service pushing method and device
CN111082943A (en) Efficient block chain consensus method
TWI770749B (en) Inspection method and device
CN112540926A (en) Resource allocation fairness federal learning method based on block chain
CN112398956B (en) Data processing method, device and equipment based on block chain and readable storage medium
CN111935207A (en) Block chain system consensus method based on improved C4.5 algorithm
CN103984887A (en) Method and device for controlling user permission
CN105208090A (en) Zookeeper-based Leader selection method
CN114301935B (en) Reputation-based internet of things edge cloud collaborative federal learning node selection method
CN112564942A (en) Distribution network control method and device of Internet of things equipment, equipment and storage medium
CN106454428A (en) Method and system for correcting interaction time in live program
CN108494828A (en) A kind of update method of node data, medium, device and computing device
CN110930254A (en) Data processing method, device, terminal and medium based on block chain
CN109743682A (en) Method for inspecting, apparatus and system
CN111798234B (en) Lightweight block chain system and construction method
CN115510152A (en) Method and device for screening nodes of prediction machine, storage medium and electronic device
JP2023508210A (en) Data processing method, device, device and computer program based on blockchain
Fernández et al. Distributed slicing in dynamic systems
WO2015124668A1 (en) Tree-structure storage method for managing computation offloading data

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