CN109238758B - Method and device for detecting faults of block chain mining machine - Google Patents

Method and device for detecting faults of block chain mining machine Download PDF

Info

Publication number
CN109238758B
CN109238758B CN201810869319.6A CN201810869319A CN109238758B CN 109238758 B CN109238758 B CN 109238758B CN 201810869319 A CN201810869319 A CN 201810869319A CN 109238758 B CN109238758 B CN 109238758B
Authority
CN
China
Prior art keywords
state
mining
value
mining machines
machines
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
CN201810869319.6A
Other languages
Chinese (zh)
Other versions
CN109238758A (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.)
Dongying Yuchen Technology Co ltd
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN201810869319.6A priority Critical patent/CN109238758B/en
Publication of CN109238758A publication Critical patent/CN109238758A/en
Application granted granted Critical
Publication of CN109238758B publication Critical patent/CN109238758B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01MTESTING STATIC OR DYNAMIC BALANCE OF MACHINES OR STRUCTURES; TESTING OF STRUCTURES OR APPARATUS, NOT OTHERWISE PROVIDED FOR
    • G01M99/00Subject matter not provided for in other groups of this subclass
    • G01M99/005Testing of complete machines, e.g. washing-machines or mobile phones

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a method and a device for detecting an ore machine fault, wherein the method for detecting the ore machine fault comprises the following steps: sending a status query signal to a plurality of mining machines; receiving state values fed back by a plurality of mining machines according to the state query signals; detecting whether the state value is matched with a pre-stored state threshold value; and when the state value is detected to be not matched with the pre-stored state threshold value, determining the fault mining machine according to a preset state query model. According to the technical scheme, the detection speed of the calculated state of the ore machine can be effectively improved, so that the fault ore machine can be quickly and effectively positioned, and an engineer can conveniently maintain the fault ore machine.

Description

Method and device for detecting faults of block chain mining machine
Technical Field
The invention relates to the field of block chains, in particular to an ore machine fault detection method, an ore machine fault detection device, a server, a terminal and a computer readable storage medium.
Background
The process of digging the digital currency is completed by the cooperation of an ore machine and an ore pool of the mine field. The method is characterized in that the total force of the ore machines in the ore field added into the ore pool is calculated, at the moment, the state monitoring of the ore machines is very important, when the ore pool sends a signal, if a certain ore machine in a certain ore field breaks down, the ore pool cannot receive the signal late, the current excavation work can be influenced, and further the whole operational capability of the ore pool is influenced.
In the related art, hundreds or even thousands of mining machines are usually arranged in a mine field, when a certain mining machine in a certain mine field breaks down, if a mine pool or the mine field monitors the fault of each mining machine, a large amount of time and computing power are occupied, and especially in a channel with a rising digital currency price, the mode brings about great asset loss, the faulty mining machine is not monitored and positioned, and the mine pool cannot reasonably distribute computing tasks, so that computing resources are wasted.
Disclosure of Invention
The present invention is directed to solving at least one of the problems of the prior art or the related art.
To this end, the invention aims to provide a method for detecting a failure of an ore machine, a device for detecting a failure of an ore machine, a server and a computer-readable storage medium.
In order to achieve the above object, a first aspect of the present invention provides an ore machine fault detection method, adapted to a server, including: sending a status query signal to a plurality of mining machines; receiving state values fed back by a plurality of mining machines according to the state query signals; detecting whether the state value is matched with a pre-stored state threshold value; and when the state value is detected to be not matched with the pre-stored state threshold value, determining the fault mining machine according to a preset state query model.
In the above technical solution, preferably, the state value is a mercker root value, and whether the state value is matched with a pre-stored state threshold is detected, specifically including the following steps: detecting whether the number of the received consistent signals of the Mercker root value is the same as the number of the plurality of mining machines; determining that the state value does not match the pre-stored state threshold value upon detecting that the number of consistent signals does not correspond to the number of the plurality of mining machines.
In any of the above technical solutions, preferably, the method further includes: and when the number of the consistent signals is detected to be consistent with the number of the ore machines, determining that the state value is matched with the pre-stored state threshold value so as to wait for the state inquiry signals to be continuously sent.
In any one of the above technical solutions, preferably, when it is detected that the state value is not matched with the pre-stored state threshold value, determining the faulty mining machine according to a preset state query model, specifically including the following steps: dividing the multiple ore machines into two halves or closest halves to obtain a first group of ore machines and a second group of ore machines, wherein the number of the first group of ore machines is the same as that of the second group of ore machines, or the difference value between the number of the first group of ore machines and that of the second group of ore machines is 1; carrying out state detection on a first group of mining machines; detecting whether a faulty mining machine is in a first set of mining machines; when a fault mining machine is detected in the first group of mining machines, determining that the fault mining machine is detected, reporting the fault mining machine and finishing the query process; and when the fault mining machine is not detected in the first group of mining machines, repeatedly iterating the ore machine number segmentation on the second group of mining machines until the fault mining machine is detected.
In any of the above technical solutions, before sending the status query signal to the plurality of mining machines, preferably, the method further includes: and acquiring a credible Mercker root value from a credible source to serve as a pre-stored state threshold value.
The technical scheme of the second aspect of the invention provides an ore machine fault detection method, which is suitable for an ore machine in an ore field and comprises the following steps: when a state query signal sent by a server is received, generating a current state value according to the state query signal; the status value is sent to a server to determine by the server whether the mine miner is malfunctioning.
In the foregoing technical solution, preferably, when receiving a status query signal sent by a server, generating a current status value according to the status query signal includes the following steps: generating a merkel tree when a state query signal is received; the merkel root value of the block header is generated from the merkel tree to determine the merkel root value as a state value.
Specifically, at the bottom layer of the merkel tree, data is divided into small data blocks, corresponding hashes correspond to the small data blocks, but the two adjacent hashes are combined into a character string in an upward mode, then the hashes of the character string are operated, so that each two hashes are married to obtain a 'sub-hash', if the total number of the hashes at the bottom layer is a single number, a single hash is necessarily generated at the end, the hash operation is directly performed on the hash, so that the sub-hash can be obtained, and the upward pushing is still the same way, a new-level hash with a smaller number can be obtained, an inverted tree is necessarily formed, and a Root hash is left at the position of the Root of the tree, and the generation is called merkel Root, namely the merkel Root value of the head of the merkel tree generation block.
The technical scheme of the third aspect of the invention provides an ore machine fault detection device, which is suitable for a server and comprises the following components: a transmitting unit for transmitting a status query signal to a plurality of mining machines; the receiving unit is used for receiving state values fed back by the plurality of mining machines according to the state inquiry signals; the detection unit is used for detecting whether the state value is matched with a pre-stored state threshold value; and the determining unit is used for determining the fault mining machine according to a preset state query model when the state value is detected to be not matched with the pre-stored state threshold value.
In the above technical solution, preferably, the detection unit is further configured to: detecting whether the number of the received consistent signals of the Mercker root value is the same as the number of the plurality of mining machines; the determination unit is further configured to: determining that the state value does not match the pre-stored state threshold value upon detecting that the number of consistent signals does not correspond to the number of the plurality of mining machines.
In any of the above technical solutions, preferably, the determining unit is further configured to: and when the number of the consistent signals is detected to be consistent with the number of the ore machines, determining that the state value is matched with the pre-stored state threshold value so as to wait for the state inquiry signals to be continuously sent.
In any of the above technical solutions, preferably, the method further includes: the dividing unit is used for dividing the multiple mining machines into two halves or closest halves to obtain a first group of mining machines and a second group of mining machines, wherein the number of the first group of mining machines is the same as that of the second group of mining machines, or the difference value between the number of the first group of mining machines and that of the second group of mining machines is 1; the detection unit is further configured to: carrying out state detection on a first group of mining machines; the detection unit is further configured to: detecting whether a faulty mining machine is in a first set of mining machines; the determination unit is further configured to: when a fault mining machine is detected in the first group of mining machines, determining that the fault mining machine is detected, reporting the fault mining machine and finishing the query process; the dividing unit is further configured to: and when the fault mining machine is not detected in the first group of mining machines, repeatedly iterating the ore machine number segmentation on the second group of mining machines until the fault mining machine is detected.
In any of the above technical solutions, preferably, the method further includes: and the acquisition unit is used for acquiring the credible Mercker root value from the credible source to serve as the pre-stored state threshold value.
The technical scheme of the fourth aspect of the invention provides an ore machine fault detection device, which is suitable for an ore machine in an ore field and comprises the following components: the generating unit is used for generating a current state value according to the state inquiry signal when receiving the state inquiry signal sent by the server; and the sending unit is used for sending the state value to the server so as to determine whether the mine ore machine fails or not by the server.
In the above technical solution, preferably, the generating unit is further configured to: generating a merkel tree when a state query signal is received; the generation unit is further configured to: the merkel root value of the block header is generated from the merkel tree to determine the merkel root value as a state value.
An aspect of a fifth aspect of the present invention provides a server, including a memory, a processor and a computer program stored on the memory and operable on the processor, wherein the processor implements the method for detecting a failure of an ore mining machine according to any one of the first aspect of the present invention when executing the computer program.
An aspect of a sixth aspect of the present invention provides a terminal, which includes a memory, a processor and a computer program stored on the memory and operable on the processor, wherein the processor implements the method for detecting a failure of an ore mining machine according to any one of the second aspect of the present invention when executing the computer program.
An aspect of the seventh aspect of the present invention provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of detecting a failure of an ore machine of any aspect of the first aspect of the present invention.
The technical scheme realizes the following technical effects:
(1) compare with the mode that detects the ore deposit computational state one by the engineer, can effectively improve the detection speed of ore deposit computational state to effectively fix a position trouble ore deposit fast, and then make things convenient for the engineer to maintain.
(2) The loss of assets by a malfunctioning mining machine can be reduced compared to the way in which the states of the mining machine calculation are detected individually by an engineer.
(3) The reasonable allocation of the computing tasks in the mine pond is facilitated, and the reasonable allocation of the computing resources is further caused.
Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 shows a schematic flow diagram of a method of detecting a failure of a mining machine according to one embodiment of the invention;
FIG. 2 shows a schematic flow diagram of a method of detecting a failure of a mining machine according to another embodiment of the invention;
FIG. 3 shows a schematic block diagram of a detection arrangement of a mine machine fault according to one embodiment of the invention;
FIG. 4 shows a schematic block diagram of a detection arrangement for mine machine failure according to another embodiment of the invention;
FIG. 5 shows a schematic diagram of a mine deployment network in accordance with one embodiment of the invention;
FIG. 6 shows a schematic flow diagram of a method of detecting a failure of a mining machine according to yet another embodiment of the invention;
FIG. 7 shows a schematic block diagram of a detection arrangement for mine failure according to a further embodiment of the invention;
FIG. 8 shows a schematic flow diagram of a method of detecting a failure of a mining machine according to yet another embodiment of the invention;
FIG. 9 shows a schematic diagram of a mine deployment network in accordance with another embodiment of the invention.
Detailed Description
In order that the above objects, features and advantages of the present invention can be more clearly understood, a more particular description of the invention will be rendered by reference to the appended drawings. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, however, the present invention may be practiced in other ways than those specifically described herein, and therefore the scope of the present invention is not limited by the specific embodiments disclosed below.
As shown in fig. 1, a method for detecting a failure of an ore machine according to an embodiment of the present invention is applicable to a server, and includes: step 102, sending a state inquiry signal to a plurality of mining machines; 104, receiving state values fed back by a plurality of mining machines according to the state query signals; step 106, detecting whether the state value is matched with a pre-stored state threshold value; and step 108, when the state value is detected to be not matched with the pre-stored state threshold value, determining a fault mining machine according to a preset state query model.
In this embodiment, through receiving the state value that a plurality of ore machines are fed back according to the state inquiry signal that sends to whether detect with prestore the state threshold value and match, and then when detecting mismatching, according to state inquiry algorithm, confirm the ore machine that breaks down, compare with the mode that detects the ore machine computational state one by the engineer, can effectively improve the detection speed that the ore machine computed state, thereby effectively fix a position trouble ore machine fast, and then make things convenient for the engineer to maintain.
In the foregoing embodiment, preferably, the state value is a mercker root value, and whether the state value is matched with a pre-stored state threshold is detected, specifically including the following steps: detecting whether the number of the received consistent signals of the Mercker root value is the same as the number of the plurality of mining machines; determining that the state value does not match the pre-stored state threshold value upon detecting that the number of consistent signals does not correspond to the number of the plurality of mining machines.
In the embodiment, whether the merkel root value is the same as the trusted pre-stored merkel root value or not is detected, namely whether the quantity value of the received merkel root value consistent signals is the same as the quantity of the mining machines or not is detected to be different, namely the merkel tree is damaged or false, and further the existence of the failed mining machine is indicated, so that the safety is high, and the verification efficiency is high.
In any of the above embodiments, preferably, the method further includes: and when the number of the consistent signals is detected to be consistent with the number of the ore machines, determining that the state value is matched with the pre-stored state threshold value so as to wait for the state inquiry signals to be continuously sent.
In any of the foregoing embodiments, preferably, when it is detected that the state value does not match the pre-stored state threshold value, determining the faulty mining machine according to a preset state query model, specifically includes the following steps: dividing the multiple ore machines into two halves or closest halves to obtain a first group of ore machines and a second group of ore machines, wherein the number of the first group of ore machines is the same as that of the second group of ore machines, or the difference value between the number of the first group of ore machines and that of the second group of ore machines is 1; carrying out state detection on a first group of mining machines; detecting whether a faulty mining machine is in a first set of mining machines; when a fault mining machine is detected in the first group of mining machines, determining that the fault mining machine is detected, reporting the fault mining machine and finishing the query process; and when the fault mining machine is not detected in the first group of mining machines, repeatedly iterating the ore machine number segmentation on the second group of mining machines until the fault mining machine is detected.
In this embodiment, by employing a log-recursive algorithm to perform a state query of the mining machine to determine the problematic mining machine, the loss of assets by a malfunctioning mining machine can be reduced as compared to a manner in which the states are computed by the mining machine individually detected by engineers.
In any of the above embodiments, preferably, before sending the status query signal to the plurality of mining machines, the method further includes: and acquiring a credible Mercker root value from a credible source to serve as a pre-stored state threshold value.
In this embodiment, the reliability of state detection is ensured by obtaining a trusted mercker root value from a trusted source.
As shown in fig. 2, a method of detecting a failure of a mining machine according to another embodiment of the present invention is applicable to a mining field mining machine, including: step 202, when receiving a state query signal sent by a server, generating a current state value according to the state query signal; the status value is sent 204 to the server to determine by the server whether the mine miner is malfunctioning.
In this embodiment, through to the service area send the state value to whether there is the trouble ore deposit by the server according to the state value determination, compare with the mode that detects the ore deposit computational state one by the engineer, can effectively improve the detection speed that the ore deposit calculated state to effectively fix a position the trouble ore deposit fast, and then make things convenient for the engineer to maintain.
In the foregoing embodiment, preferably, when receiving a status query signal sent by a server, generating a current status value according to the status query signal includes the following steps: generating a merkel tree when a state query signal is received; the merkel root value of the block header is generated from the merkel tree to determine the merkel root value as a state value.
In the embodiment, the merkel root value is generated to detect whether the merkel root value is the same as the trusted pre-stored merkel root value, that is, whether the number value of the received merkel root value consistent signals is the same as the number of mining machines, and when the merkel root value consistent signals are detected to be different, the merkel tree is damaged or false, so that the existence of a faulty mining machine is indicated, the safety is high, and the verification efficiency is high.
Specifically, at the bottom layer of the merkel tree, data is divided into small data blocks, corresponding hashes correspond to the small data blocks, but the two adjacent hashes are combined into a character string in an upward mode, then the hashes of the character string are operated, so that each two hashes are married to obtain a 'sub-hash', if the total number of the hashes at the bottom layer is a single number, a single hash is necessarily generated at the end, the hash operation is directly performed on the hash, so that the sub-hash can be obtained, and the upward pushing is still the same way, a new-level hash with a smaller number can be obtained, an inverted tree is necessarily formed, and a Root hash is left at the position of the Root of the tree, and the generation is called merkel Root, namely the merkel Root value of the head of the merkel tree generation block.
As shown in fig. 3, the apparatus 300 for detecting a failure of an ore machine according to an embodiment of the present invention is adapted to a server, and includes: a transmitting unit 302 for transmitting status inquiry signals to a plurality of mining machines; a receiving unit 304, configured to receive state values fed back by multiple mining machines according to the state query signal; a detecting unit 306, configured to detect whether the state value matches a pre-stored state threshold; the determining unit 308 is configured to determine a faulty mining machine according to a preset state query model when it is detected that the state value does not match the pre-stored state threshold value.
In this embodiment, through receiving the state value that a plurality of ore machines are fed back according to the state inquiry signal that sends to whether detect with prestore the state threshold value and match, and then when detecting mismatching, according to state inquiry algorithm, confirm the ore machine that breaks down, compare with the mode that detects the ore machine computational state one by the engineer, can effectively improve the detection speed that the ore machine computed state, thereby effectively fix a position trouble ore machine fast, and then make things convenient for the engineer to maintain.
In the above embodiment, preferably, the detecting unit 306 is further configured to: detecting whether the number of the received consistent signals of the Mercker root value is the same as the number of the plurality of mining machines; the determining unit 308 is further configured to: determining that the state value does not match the pre-stored state threshold value upon detecting that the number of consistent signals does not correspond to the number of the plurality of mining machines.
In the embodiment, whether the merkel root value is the same as the trusted pre-stored merkel root value or not is detected, namely whether the quantity value of the received merkel root value consistent signals is the same as the quantity of the mining machines or not is detected to be different, namely the merkel tree is damaged or false, and further the existence of the failed mining machine is indicated, so that the safety is high, and the verification efficiency is high.
In any of the above embodiments, preferably, the determining unit 308 is further configured to: and when the number of the consistent signals is detected to be consistent with the number of the ore machines, determining that the state value is matched with the pre-stored state threshold value so as to wait for the state inquiry signals to be continuously sent.
In any of the above embodiments, preferably, the method further includes: the dividing unit 310 is configured to divide the multiple mining machines into two halves or closest to two halves to obtain a first group of mining machines and a second group of mining machines, where the number of the first group of mining machines and the number of the second group of mining machines are the same, or the difference between the number of the first group of mining machines and the number of the second group of mining machines is 1; the detection unit 306 is further configured to: carrying out state detection on a first group of mining machines; the detection unit 306 is further configured to: detecting whether a faulty mining machine is in a first set of mining machines; the determining unit 308 is further configured to: when a fault mining machine is detected in the first group of mining machines, determining that the fault mining machine is detected, reporting the fault mining machine and finishing the query process; the dividing unit 310 is further configured to: and when the fault mining machine is not detected in the first group of mining machines, repeatedly iterating the ore machine number segmentation on the second group of mining machines until the fault mining machine is detected.
In this embodiment, by employing a log-recursive algorithm to perform a state query of the mining machine to determine the problematic mining machine, the loss of assets by a malfunctioning mining machine can be reduced as compared to a manner in which the states are computed by the mining machine individually detected by engineers.
In any of the above embodiments, preferably, the method further includes: an obtaining unit 312, configured to obtain the trusted mercker root value from the trusted source as the pre-stored state threshold.
In this embodiment, the reliability of state detection is ensured by obtaining a trusted mercker root value from a trusted source.
As shown in fig. 4, a device 400 for detecting a failure of a mining machine according to another embodiment of the present invention, adapted for use with a mining machine, includes: a generating unit 402, configured to generate a current state value according to a state inquiry signal when receiving the state inquiry signal sent by the server; a sending unit 404 for sending the status value to the server for determining by the server whether the mine miner is malfunctioning.
In this embodiment, through to the service area send the state value to whether there is the trouble ore deposit by the server according to the state value determination, compare with the mode that detects the ore deposit computational state one by the engineer, can effectively improve the detection speed that the ore deposit calculated state to effectively fix a position the trouble ore deposit fast, and then make things convenient for the engineer to maintain.
In the above embodiment, preferably, the generating unit 402 is further configured to: generating a merkel tree when a state query signal is received; the generating unit 402 is further configured to: the merkel root value of the block header is generated from the merkel tree to determine the merkel root value as a state value.
In the embodiment, the merkel root value is generated to detect whether the merkel root value is the same as the trusted pre-stored merkel root value, that is, whether the number value of the received merkel root value consistent signals is the same as the number of mining machines, and when the merkel root value consistent signals are detected to be different, the merkel tree is damaged or false, so that the existence of a faulty mining machine is indicated, the safety is high, and the verification efficiency is high.
Specifically, bitcoin is a decentralized network architecture, forwarding new transactions and new blocks through the nodes that install bitcoin daemons. The mining machine and the mine pool form another network at the same time, which is called a miner network.
The miners' network is divided into several major parts, including the ore machine, the mine pit, the purse, and the like, and sometimes the mine pit software is installed with the purse, which may be collectively referred to as the mine pit.
The communication protocol between the ore machine and the ore pool software is stratum, and the communication between the ore pool software and the wallet is a bitcoinrpc interface.
The stratum is JSON in a data format, and the specific protocol is as follows:
1. task subscription
The mine machine starts, and is firstly connected with a mine pool by a mining. The mine pool returns the subscription number, ExtraNonce1 and ExtraNonce2_ size with mining.
2. Task allocation
The command is sent periodically by the pit to the mining machine, which should return to the task as soon as the mining machine registers with the mining.
3. Ore machine login
The mining machine logs in the mine pit by using a certain account and a password by using a mining. The method must be performed immediately after initiating the connection, otherwise the mine machine is not given the mine pit mission.
4. Result submission
And when the mining machine finds legal share, submitting a task to the mining pool by a' mining. The mine pool returns true, i.e. the submission is successful, and if the mine pool fails, there is a specific reason in error.
5. Difficulty adjustment
Difficulty adjustment is carried out on an ore machine sent from an ore pond, the difficulty is adjusted by a mining set _ difference method, and the difficulty value in params is the difficulty value.
The mine machine will adopt the new difficulty in the next task, and the mine pool will sometimes immediately issue a new task and set the cleaning task to true so that the mine machine will immediately work with the new difficulty.
As shown in fig. 5, the server is connected to and communicates with each of the ore machines through a bus. Since the number of mine machines in a mine site is several hundreds to several thousands, the sequential failure detection of all the mine machines by engineers is unacceptable in terms of time. Therefore, the invention provides a fault detection method based on the network topology structure.
The Merck root of a file is first obtained from a trusted source, and once the root is obtained, the Merck tree can be obtained from other untrusted sources. The received Mercker tree is checked through the trusted root of the tree. If the Merck tree is corrupted or spurious, another Merck tree is obtained from another source until a Merck tree matching the root of the TrustedTree is obtained.
As shown in fig. 6, a method of detecting a failure of a mining machine according to still another embodiment of the present invention includes: step 602, sending a status query signal; step 604, whether all root consistent signals are received, if yes, step 606 is entered, and if no, step 608 is entered; step 606, waiting for the next status query; step 608, executing the state query algorithm; step 610, inquiring a fault machine, entering step 612 when the result is yes, and returning to step 608 when the result is no; and step 612, reporting the fault mining machine and waiting for the next state query.
Specifically, the server sends out identical status inquiry signals to all the mining machines (e.g., n mining machines) at certain intervals (preferably, one hour), and the mining machines send the mercker root value of the block head to the server after receiving the status inquiry signals. If the calculation state of the mining machine is normal, the Mercker root value of the block head sent by the mining machine is consistent with the Mercker root value stored in the server in advance; if the mining machine state is failure, the Mercker root value of the block head sent by the mining machine is inconsistent with the Mercker root value stored in the server in advance.
The transaction record is stored by using the transaction list, and in the past 10 minutes, all newly generated transaction lists in the whole network are stored in a new block, and all blocks are connected in series to form a block chain. The blockchain thus corresponds to a distributed book. Each node in the whole network participates in maintaining the account book together. A new block is generated every 10 minutes and is updated to all nodes in the entire network synchronously. After the confirmation of the whole network, the change can not be carried out.
After sending out the state query signal once, the server counts whether root value consistent signals (for example, n root value consistent signals) equal to the total number of the mining machines are received or not. If a consistent signal of root value equal to the total number of the mining machines is received, the server waits for the next state query. If no consistent signal of root value equal to the total number of the mining machines is received, the server executes a state query algorithm to detect which mining machine is out of order. When the fault mining machine is inquired, the server reports the number of the fault mining machine to the mining field and the mining pool, so that an engineer can conveniently maintain the mining field and the mining pool can redistribute the calculation task.
As shown in fig. 8, assuming that there are n ore machines in the mine site, the n ore machines can be divided into the two most closely numbered parts. For example, if n is an even number, the n is divided into two groups, each n/2; n is an odd number, one is (n +1)/2, and the other is n- (n + 1)/2.
When a fault is confirmed in n mining machines, the n mining machines are divided into two groups, and then the fault is randomly detected for one group (namely, the state query signal is sent again for the group of mining machines). If no faulty machine is detected (i.e. the state detection unit 10 receives signals equal to the number of tackers root values), the next group is detected, and if a faulty machine is detected (i.e. the state detection unit 10 does not receive signals equal to the number of tackers root values), it is reported. The method is iterated repeatedly, and the mining machine with the real calculation fault can be found.
The steps of the state query algorithm are summarized as follows:
step 802: halving the number of the ore machines or closest to halving;
step 804: carrying out state detection on one group of mining machines;
step 806: determining whether the fault mining machine is in the current group, if so, entering step 4, and if not, entering step 5;
step 808: a status check is made for another set of mining machines and then returns to step 802.
Step 810: and confirming whether the fault mining machine is detected, if so, entering a step 812, namely reporting the fault mining machine and finishing the inquiry process, and if not, then returning to the step 802.
The block size of bitcoin is currently strictly limited to within 1 MB. A 4 byte block size field is not included.
As shown in fig. 7, a state detection unit is included in the server, which is composed of the following units: a control unit 704, a counting unit 702, and a sending and detecting signal unit 706. The specific arrangement is shown in the following figures:
at each status inquiry, the control unit 704 controls the sending and detecting signal unit 706 to send a status inquiry signal to each mining machine through the bus, and the sending and detecting signal unit 706 sends a signal including the mercker root value, which is fed back by each mining machine through the bus, to the counting unit 702. The number of mercker root values that coincide with the mercker root values stored in advance is counted by the counting unit 702, and the counted number is sent by the counting unit 702 to the control unit 704. The control unit 704 confirms whether the faulty mining machine is present in the current round of inquiry.
As shown in fig. 9, in the network topology, some ore machines are set as master ore machines, which play the role of the server in embodiment 1, that is, each master ore machine includes a status detection unit 10 therein, and each master ore machine executes the above-mentioned status query algorithm proposed by the present invention on its own ore machine cluster through a bus. When a fault mining machine is detected, the main mining machine reports the reporting server to a mining field and a mining pool. This network structure decomposes the query task to each host machine, thereby effectively reducing the amount of computation of the server and enabling a faster location of a faulty machine than in embodiment 1.
A server according to an embodiment of the present invention comprises a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method for detecting a failure of an ore machine according to any one of the embodiments of the first aspect of the present invention when executing the computer program.
A terminal according to an embodiment of the invention comprises a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method for detecting a failure of an ore machine according to any one of the embodiments of the second aspect of the invention when executing the computer program.
A computer readable storage medium according to an embodiment of the invention has stored thereon a computer program which, when executed by a processor, implements a method of detecting a failure of an ore-mining machine according to any one of the embodiments of the first aspect of the invention.
The steps in the method of the invention can be sequentially adjusted, combined and deleted according to actual needs.
The units in the device of the invention can be merged, divided and deleted according to actual needs.
It will be understood by those skilled in the art that all or part of the steps in the methods of the embodiments described above may be implemented by hardware instructions of a program, and the program may be stored in a computer-readable storage medium, where the storage medium includes Read-Only Memory (ROM), Random Access Memory (RAM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), One-time Programmable Read-Only Memory (OTPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Compact Disc Read-Only Memory (CD-ROM), or other Memory, such as a magnetic disk, or a combination thereof, A tape memory, or any other medium readable by a computer that can be used to carry or store data.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (7)

1. A method for detecting faults of an ore machine is suitable for an ore field server and is characterized by comprising the following steps: sending a status query signal to a plurality of mining machines;
receiving state values fed back by the plurality of mining machines according to the state query signals;
detecting whether the state value is matched with a pre-stored state threshold value;
when the state value is detected to be not matched with the pre-stored state threshold value, determining a fault mining machine according to a preset state query model;
the detecting method comprises the following steps of detecting whether a state value is matched with a pre-stored state threshold value or not, wherein the state value is a Mercker root value, and the detecting method specifically comprises the following steps: detecting whether the number of received consistent signals of the merkel root value is the same as the number of the plurality of mining machines;
determining that the state value does not match the pre-stored state threshold value upon detecting that the number of consistent signals does not correspond to the number of the plurality of mining machines.
2. A method of detecting a fault on a mining machine as claimed in claim 1, further comprising: upon detecting that the number of consistent signals is consistent with the number of the plurality of mining machines, determining that the state value matches the pre-stored state threshold value to wait for continued transmission of the state inquiry signal.
3. A method for detecting a fault in a mining machine as claimed in claim 2, wherein the step of determining a faulty mining machine according to a preset state query model upon detecting that the state value does not match the pre-stored state threshold value, includes the steps of: halving or nearest halving the plurality of mining machines to obtain a first group of mining machines and a second group of mining machines, wherein the number of the first group of mining machines and the second group of mining machines is the same or the difference between the number of the first group of mining machines and the number of the second group of mining machines is 1;
performing state detection on the first set of mining machines;
detecting whether the malfunctioning mining machine is in the first set of mining machines;
when the fault mining machine is detected to be in the first group of mining machines, determining that the fault mining machine is detected, reporting the fault mining machine and finishing a query process;
upon detecting that the malfunctioning mining machine is not in the first set of mining machines, iteratively iterating a number of mining machines segmentation on the second set of mining machines until the malfunctioning mining machine is detected.
4. A method of detecting a fault in a mining machine as claimed in any one of claims 1 to 3, further comprising, prior to sending a status query signal to the plurality of mining machines: and acquiring a credible Mercker root value from a credible source to serve as the pre-stored state threshold value.
5. A method for detecting faults of an ore machine is suitable for an ore field ore machine, and is characterized by comprising the following steps: when a state query signal sent by a server is received, generating a current state value according to the state query signal;
sending the status value to the server to determine by the server whether the mine miner is malfunctioning; when receiving a state query signal sent by a server, the method for generating a current state value according to the state query signal specifically comprises the following steps: generating a merkel tree upon receiving the status query signal;
generating a Merck root value of a block header from the Merck tree to determine the Merck root value as the state value.
6. A detection device of ore deposit machine trouble is applicable to the mining site server, its characterized in that includes: a transmitting unit for transmitting a status query signal to a plurality of mining machines;
the receiving unit is used for receiving state values fed back by the plurality of mining machines according to the state inquiry signals;
the detection unit is used for detecting whether the state value is matched with a pre-stored state threshold value;
the determining unit is used for determining a fault mining machine according to a preset state query model when the state value is detected to be not matched with the pre-stored state threshold value; the detection unit is further configured to: detecting whether the number of received consistent signals of the Mercker root value is the same as the number of the plurality of mining machines;
the determination unit is further configured to: determining that the state value does not match the pre-stored state threshold value upon detecting that the number of consistent signals does not correspond to the number of the plurality of mining machines.
7. A mining fault detection apparatus as claimed in claim 6, wherein the determination unit is further configured to: when the number of the consistent signals is detected to be consistent with the number of the plurality of mining machines, determining that the state value is matched with the pre-stored state threshold value so as to wait for the state inquiry signals to be continuously sent; further comprising: a dividing unit, configured to divide the multiple mining machines into two or most approximate two halves to obtain a first group of mining machines and a second group of mining machines, where the first group of mining machines and the second group of mining machines are the same in number, or a difference between the first group of mining machines and the second group of mining machines is 1;
the detection unit is further configured to: performing state detection on the first set of mining machines;
the detection unit is further configured to: detecting whether the malfunctioning mining machine is in the first set of mining machines;
the determination unit is further configured to: when the fault mining machine is detected to be in the first group of mining machines, determining that the fault mining machine is detected, reporting the fault mining machine and finishing a query process;
the dividing unit is further configured to: upon detecting that the malfunctioning mining machine is not in the first set of mining machines, iteratively performing a number of mining machines segmentation on the second set of mining machines until the malfunctioning mining machine is detected;
the acquiring unit is used for acquiring a credible Mercker root value from a credible source to serve as the pre-stored state threshold value;
the generating unit is used for generating a current state value according to a state inquiry signal when receiving the state inquiry signal sent by a server;
a transmitting unit for transmitting the status value to the server to determine by the server whether the mine miner is malfunctioning;
the generation unit is further configured to: generating a merkel tree upon receiving the status query signal;
the generation unit is further configured to: generating a Merck root value of a block header from the Merck tree to determine the Merck root value as the state value.
CN201810869319.6A 2018-08-02 2018-08-02 Method and device for detecting faults of block chain mining machine Active CN109238758B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810869319.6A CN109238758B (en) 2018-08-02 2018-08-02 Method and device for detecting faults of block chain mining machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810869319.6A CN109238758B (en) 2018-08-02 2018-08-02 Method and device for detecting faults of block chain mining machine

Publications (2)

Publication Number Publication Date
CN109238758A CN109238758A (en) 2019-01-18
CN109238758B true CN109238758B (en) 2020-12-18

Family

ID=65072705

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810869319.6A Active CN109238758B (en) 2018-08-02 2018-08-02 Method and device for detecting faults of block chain mining machine

Country Status (1)

Country Link
CN (1) CN109238758B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109165123A (en) * 2018-08-02 2019-01-08 佛山鑫达智汇科技有限公司 Detection method, detection device, server and the storage medium of mine machine failure

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2017329089A1 (en) * 2016-09-19 2019-04-04 Financial & Risk Organisation Limited Systems and methods for interception of smart contracts
WO2018112949A1 (en) * 2016-12-23 2018-06-28 深圳前海达闼云端智能科技有限公司 Block chain mining method, device, and node apparatus
CN106604316B (en) * 2017-01-03 2021-04-02 张毅昆 Method, device and system for positioning fault of wireless access equipment
CN109165123A (en) * 2018-08-02 2019-01-08 佛山鑫达智汇科技有限公司 Detection method, detection device, server and the storage medium of mine machine failure

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109165123A (en) * 2018-08-02 2019-01-08 佛山鑫达智汇科技有限公司 Detection method, detection device, server and the storage medium of mine machine failure

Also Published As

Publication number Publication date
CN109238758A (en) 2019-01-18

Similar Documents

Publication Publication Date Title
CN110633323B (en) Service data storage method, device, storage medium and computer equipment
CN107748702B (en) Data recovery method and device
CN108241968B (en) Method for leading processor to participate block chain consensus
US20170132060A1 (en) Information processing device and error detection method
CN110602239A (en) Block chain information storage method and related equipment
CN110569251A (en) Data processing method, related equipment and computer readable storage medium
CN110572287B (en) Data disaster tolerance method and device, computer equipment and storage medium
CN113778463B (en) Business service deployment method and device
CN110309173B (en) Contract data recording method and device, block chain node and storage medium
CN109218311B (en) Block chain agglomeration method, block chain node and block chain
US20200073781A1 (en) Systems and methods of injecting fault tree analysis data into distributed tracing visualizations
CN113312005B (en) Block chain-based Internet of things data capacity expansion storage method and system and computing equipment
CN110958161A (en) Block link point monitoring method and device
CN109542602B (en) Block chain-based distributed task processing method, device and system
CN109542781B (en) Block chain consensus algorithm testing method and device, calculating device and storage medium
CN111899019A (en) Method and system for cross validation and sharing of blacklist and multiple parties
CN109254956B (en) Data downloading method and device and electronic equipment
CN109238758B (en) Method and device for detecting faults of block chain mining machine
CN112184436A (en) Data synchronization method, electronic device and readable storage medium
CN112487091A (en) Method and device for determining block chain consensus node
US10860747B2 (en) Method for transmitting and checking the validity of configuration data in an electronic system, and associated electronic system and computer program product
CN111026711A (en) Block chain based data storage method and device, computer equipment and storage medium
CN109993526B (en) Block chain checking method, processing node and storage medium
CN113630445B (en) Data storage method and device based on block chain network
CN109165123A (en) Detection method, detection device, server and the storage medium of mine machine failure

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20201130

Address after: 325000 No.8 Dongyou Road, Lucheng District, Wenzhou City, Zhejiang Province

Applicant after: Li Shuqin

Address before: 528200 Guangdong Foshan Nanhai District Guicheng Street Xia Nan Road No.61 Chuangyue Times Cultural and Creative Park Building 1 Business Incubator Co., Ltd. One of the 210 rooms 14

Applicant before: FOSHAN XINDA ZHIHUI TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20211209

Address after: 257000 room 320, Wanda harbor city, No. 25-1, Gangcheng Road, dongyinggang Economic Development Zone, Dongying City, Shandong Province

Patentee after: Dongying Yuchen Technology Co.,Ltd.

Address before: 325000 No. 8, Dongyou Road, Lucheng District, Wenzhou City, Zhejiang Province

Patentee before: Li Shuqin