CN111080447A - Rotation method and system for neutral node in block chain system - Google Patents
Rotation method and system for neutral node in block chain system Download PDFInfo
- Publication number
- CN111080447A CN111080447A CN201911215789.1A CN201911215789A CN111080447A CN 111080447 A CN111080447 A CN 111080447A CN 201911215789 A CN201911215789 A CN 201911215789A CN 111080447 A CN111080447 A CN 111080447A
- Authority
- CN
- China
- Prior art keywords
- rotation
- node
- nodes
- period
- task
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 78
- 230000007935 neutral effect Effects 0.000 title claims abstract description 53
- 238000001514 detection method Methods 0.000 claims abstract description 54
- 238000012545 processing Methods 0.000 claims abstract description 53
- 230000008569 process Effects 0.000 claims abstract description 26
- 238000012937 correction Methods 0.000 claims description 36
- 238000012790 confirmation Methods 0.000 claims description 26
- 238000004364 calculation method Methods 0.000 claims description 23
- 230000000875 corresponding effect Effects 0.000 claims description 17
- 230000003993 interaction Effects 0.000 claims description 6
- 230000002596 correlated effect Effects 0.000 claims description 3
- 230000000694 effects Effects 0.000 claims description 3
- 230000001360 synchronised effect Effects 0.000 claims description 3
- 239000002699 waste material Substances 0.000 abstract description 3
- 230000006870 function Effects 0.000 description 26
- 238000010586 diagram Methods 0.000 description 14
- 238000004590 computer program Methods 0.000 description 12
- 238000005516 engineering process Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 230000001276 controlling effect Effects 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 238000011017 operating method Methods 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 238000011022 operating instruction Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2379—Updates performed during online database operations; commit processing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- General Physics & Mathematics (AREA)
- Business, Economics & Management (AREA)
- Physics & Mathematics (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Development Economics (AREA)
- General Business, Economics & Management (AREA)
- Technology Law (AREA)
- Strategic Management (AREA)
- Marketing (AREA)
- Economics (AREA)
- Computing Systems (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The method of the embodiment of the invention provides a rotation method and a rotation system for a neutral node in a block chain system, and the whole block chain system ensures the detection efficiency and accuracy of the neutral node and the operational efficiency and accuracy of the common node by controlling the rotation mode of the common node and the neutral node; therefore, when the method is applied to an application with a large processing amount, the follow-up processing is carried out without waiting for all nodes to finish tasks, so that the waste of computing resources of all nodes is reduced, the processing speed of the block chain system is greatly improved, and the loss of accuracy in the node task processing process is reduced to a certain extent.
Description
[ technical field ] A method for producing a semiconductor device
The present invention relates to the field of blockchain technologies, and in particular, to a rotation method and system for a neutral node in a blockchain system.
[ background of the invention ]
If a node in the blockchain system needs to perform transaction processing, consensus processing is performed in the blockchain system for the transaction content to ensure agreement among all nodes in the blockchain system. The current node sends a proposal to be identified to other nodes, the other nodes carry out identification confirmation on the proposal after receiving the proposal to be identified, and return the identification confirmation result to the current node, and the current node judges whether the identification passes according to the received identification confirmation result. The operation amount of the node required by the transaction accounting is not very high, and if an application with a large processing amount is accessed in the blockchain system, the processing speed of the blockchain system is greatly reduced when the node executes all the processes.
[ summary of the invention ]
Embodiments of the present invention provide a rotation method and system for a neutral node in a blockchain system.
In a first aspect, an embodiment of the present invention provides a rotation method for a neutral node in a block chain system, when a rotation period is reached and a first common node satisfies a rotation condition, if a rotation list is not empty, the first common node selects the neutral node from the rotation list according to priority, and sends a rotation request to other common nodes in the block chain system for confirmation;
and when the number of the confirmation passing messages received by the first common node is greater than the preset number, the first common node and the corresponding neutral node are rotated, and the rotation result is synchronized to all the common nodes.
The above-described aspects and any possible implementations further provide an implementation, and the method further includes:
when the rotation period is not reached or the rotation period is reached but the first common node does not meet the rotation condition, randomly acquiring a task issued by the block chain system, processing the task to generate a task result, and broadcasting the task result to other common nodes in the block chain system;
other common nodes process the broadcast after receiving the broadcast based on the blockchain constraint rule, and the blockchain system generates the reward block based on the blockchain constraint rule.
The above-described aspects and any possible implementations further provide an implementation, and the method further includes:
when a rotation period is reached and a first common node meets a rotation condition, if a rotation list is empty, the first common node updates a credit score based on a correction function and a calculation formula of the credit score, and sends the updated credit score to other common nodes in the block chain system for confirmation;
and if the number of the confirmation passing messages received by the first common node is greater than the preset number, synchronizing the updated credit score to all the common nodes.
The above-described aspect and any possible implementation further provide an implementation, where the credit score is calculated by:
wherein, C is the credit score,the credit score is the average of the credit scores of nearly 10 times, β is the task processing amount of a specified time period, α is the task completion amount of the specified time period, χ is the task accuracy amount of the specified time period, δ is the rotation number of the specified time period, ε is the confirmation voting accuracy amount of the specified time period, φ is the confirmation voting number of the specified time period, P is a first correction constant, Q is a second correction constant, R is a third correction constant, and S is a fourth correction constant;
the correction function is:
wherein M is1、M2、M3、M4、M5、M6Respectively showing whether the first, second, third, fourth, fifth and sixth rotation periods have the empty condition, namely the empty condition of the last six rotation periods, if so, Mn1, if not empty, Mn=0;C1、C2、C3、C4、C5、C6Respectively representing credit scores of a first rotation period, a second rotation period, a third rotation period, a fourth rotation period, a fifth rotation period and a sixth rotation period, namely the credit score of the latest six rotation periods; t is an adjusting parameter of the correction function; the sixth rotation period is the latest rotation period;
and (4) subtracting the result of the calculation formula of the credit score and the result of the correction function to update the credit score.
The above-described aspects and any possible implementations further provide an implementation, and the method further includes:
the block chain system calculates the detection scores of the neutral nodes according to a preset period, and sequentially writes the marks corresponding to the central nodes meeting the preset detection scores into a rotation list according to the priority order until all the vacant positions of the rotation list are occupied;
and the block chain system judges whether a central node which is not written into the rotation list exists or not under the condition of meeting a preset detection score, and if so, the detection score is updated based on a compensation function and a calculation formula of the detection score.
The above-described aspect and any possible implementation manner further provide an implementation manner, and the calculation formula of the detection score is:
wherein K is a credit score, Δ C is the credit score of the latest common node, η is the detection times of the specified time period, μ is the detection accuracy times of the specified time period, π is the rotation times of the specified time period, U is a first correction constant, V is a second correction constant, and W is a third correction constant;
the compensation function is:
wherein N is1、N2、N3、N4、N5、N6Respectively showing whether the first, second, third, fourth, fifth and sixth rotation periods have a wheel empty condition, namely the wheel empty condition of the last six rotation periods, wherein the sixth rotation period is the last rotation period, and if the wheel empty condition is N, the wheel empty condition is Nn1, if no wheel is empty, Nn=0;K1、K2、K3、K4、K5、K6The detection scores of a first preset period, a second preset period, a third preset period, a fourth preset period, a fifth preset period and a sixth preset period are represented, and the sixth preset period is the latest preset periodSetting a period; h is an adjusting parameter of the compensation function;
and summing the result of the calculation formula of the detection score and the result of the compensation function to update the detection score.
The above aspect and any possible implementation further provide an implementation, where the rotation condition includes:
the first common node is identified as a rogue node; and/or the presence of a gas in the gas,
the first common node is determined as a failed node; and/or the presence of a gas in the gas,
at least one of the credit score and the computing power score of the first common node is less than a corresponding threshold value; and/or the activity of the first common node is less than a preset threshold value.
The above-described aspect and any possible implementation manner further provide an implementation manner that the computation power score is positively correlated with the task accuracy of the first common node per unit time.
The above-described aspects and any possible implementations further provide an implementation, and the method further includes:
the blockchain constraint rules include:
each common node in the block chain system only processes one task at a time;
when the current common node processes the task, if other task results based on the same task are received, the current common node immediately stops processing the current task;
when the task results are recorded in blocks by the blockchain system, the blockchain system puts a reward block to the ordinary node with the earliest time stamp, the reward block can trade among the ordinary nodes, and the transaction record is written into the blockchain system.
In a second aspect, an embodiment of the present invention provides a rotation system for a neutral node in a blockchain system, the system including:
a blockchain system comprising a plurality of regular nodes and a plurality of neutral nodes;
the common node includes at least:
the selection module is used for selecting a neutral node from the rotation list according to the priority when the rotation period is reached and the first common node meets the rotation condition and the rotation list is not empty, and sending a rotation request to other common nodes in the block chain system for confirmation;
the rotation module is used for rotating with the corresponding neutral nodes when the number of the received confirmation passing messages is larger than the preset number, and synchronizing the rotation result to all common nodes;
the processing module is used for randomly acquiring the tasks issued by the block chain system when the rotation period is not reached or the rotation period is reached but the rotation condition is not met, generating task results after processing, and broadcasting the task results to other common nodes in the block chain system;
the updating module is used for updating the credit score based on a correction function and a calculation formula of the credit score if the rotation list is empty when the rotation period is reached and the first common node meets the rotation condition, and sending the updated credit score to other common nodes in the block chain system for confirmation;
the module composition of the neutral node is the same as that of the common node;
the blockchain system further comprises:
the storage layer records historical data of each node;
the interaction layer is used for carrying out data interaction with the common nodes and the neutral nodes and scheduling the common nodes and the neutral nodes;
the processing layer is used for calculating the detection scores of the neutral nodes according to a preset period, and sequentially writing the marks corresponding to the central nodes meeting the preset detection scores into a rotation list according to the priority order until all the vacant positions of the rotation list are occupied; judging whether a central node which is not written into the rotation list exists or not under the condition of meeting a preset detection score, and if so, updating the detection score based on a compensation function and a calculation formula of the detection score;
the constraint layer is used for establishing a block chain constraint rule, and specifically comprises the following steps:
each common node in the block chain system only processes one task at a time;
when the current common node processes the task, if other task results based on the same task are received, the current common node immediately stops processing the current task;
when the task results are recorded in blocks by the blockchain system, the blockchain system puts a reward block to the ordinary node with the earliest time stamp, the reward block can trade among the ordinary nodes, and the transaction record is written into the blockchain system.
One of the above technical solutions has the following beneficial effects:
the method of the embodiment of the invention provides a rotation method and a rotation system for a neutral node in a block chain system, and the whole block chain system ensures the detection efficiency and accuracy of the neutral node and the operational efficiency and accuracy of the common node by controlling the rotation mode of the common node and the neutral node; therefore, when the method is applied to an application with a large processing amount, the follow-up processing is carried out without waiting for all nodes to finish tasks, so that the waste of computing resources of all nodes is reduced, the processing speed of the block chain system is greatly improved, and the loss of accuracy in the node task processing process is reduced to a certain extent.
[ description of the drawings ]
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
Fig. 1 is a flowchart illustrating a rotation method for a neutral node in a blockchain system according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating update of detection scores according to an embodiment of the present invention;
FIG. 3 is a block chain system architecture diagram according to an embodiment of the present invention;
FIG. 4 is a functional block diagram of a node according to an embodiment of the present invention;
fig. 5 is a hardware schematic diagram of a node device according to an embodiment of the present invention.
[ detailed description ] embodiments
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be described in detail and completely with reference to the following embodiments and accompanying drawings. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Please refer to fig. 1, which is a flowchart illustrating a rotation method for a neutral node in a blockchain system in fig. 1, wherein the method includes the following steps:
when a rotation period is reached and a first common node meets a rotation condition, if a rotation list is not empty, the first common node selects a neutral node from the rotation list according to priority, and sends a rotation request to other common nodes in the block chain system for confirmation;
and when the number of the confirmation passing messages received by the first common node is greater than the preset number, the first common node and the corresponding neutral node are rotated, and the rotation result is synchronized to all the common nodes.
In the embodiment of the invention, when the application with larger processing capacity is accessed in the block chain system, a node rotation system is established, weaker ordinary nodes in the system are rotated out to be used as neutral nodes, and meanwhile, stronger neutral nodes in the system are supplemented into the ordinary nodes. The rotation mechanism can effectively improve the task processing efficiency of the nodes, when an application with a large processing amount is accessed into the block chain system, the nodes can output task processing results firstly, and then the neutral nodes trace and feed back the task processing results, so that the block chain system can reduce the loss of the block chain system in the aspect of processing task accuracy under the condition of greatly improving the processing speed.
It should be noted that the method further includes:
when the rotation period is not reached or the rotation period is reached but the first common node does not meet the rotation condition, randomly acquiring a task issued by the block chain system, processing the task to generate a task result, and broadcasting the task result to other common nodes in the block chain system;
other common nodes process the broadcast after receiving the broadcast based on the blockchain constraint rule, and the blockchain system generates the reward block based on the blockchain constraint rule.
Specifically, the above steps are the work to be processed by the common node in the common state, and the process reduces the confirmation process of all the nodes, thereby reducing the amount of computation and increasing the processing speed of the block chain.
Further, the method further comprises:
when a rotation period is reached and a first common node meets a rotation condition, if a rotation list is empty, the first common node updates a credit score based on a correction function and a calculation formula of the credit score, and sends the updated credit score to other common nodes in the block chain system for confirmation;
and if the number of the confirmation passing messages received by the first common node is greater than the preset number, synchronizing the updated credit score to all the common nodes.
Wherein, the calculation formula of the credit score is as follows:
wherein, C is the credit score,is the average of the credit scores of nearly 10 times, β is the task processing amount of a specified time period, α is the task completion amount of the specified time period, χ is the task accuracy amount of the specified time periodDelta is the rotation number of the designated time period, epsilon is the confirmed voting accuracy of the designated time period, phi is the confirmed voting number of the designated time period, P is a first correction constant, Q is a second correction constant, R is a third correction constant, and S is a fourth correction constant;
the correction function is:
wherein M is1、M2、M3、M4、M5、M6Respectively showing whether the first, second, third, fourth, fifth and sixth rotation periods have the empty condition, namely the empty condition of the last six rotation periods, if so, Mn1, if not empty, Mn=0;C1、C2、C3、C4、C5、C6Respectively representing credit scores of a first rotation period, a second rotation period, a third rotation period, a fourth rotation period, a fifth rotation period and a sixth rotation period, namely the credit score of the latest six rotation periods; t is an adjusting parameter of the correction function; the sixth rotation period is the latest rotation period;
and (4) subtracting the result of the calculation formula of the credit score and the result of the correction function to update the credit score.
Referring to fig. 2, fig. 2 is a schematic view of a process of updating a detection score according to an embodiment of the present invention, in which the method for updating the detection score specifically includes:
the block chain system calculates the detection scores of the neutral nodes according to a preset period, and sequentially writes the marks corresponding to the central nodes meeting the preset detection scores into a rotation list according to the priority order until all the vacant positions of the rotation list are occupied;
and the block chain system judges whether a central node which is not written into the rotation list exists or not under the condition of meeting a preset detection score, and if so, the detection score is updated based on a compensation function and a calculation formula of the detection score.
Wherein, the calculation formula of the detection score is as follows:
wherein K is a credit score, Δ C is the credit score of the latest common node, η is the detection times of the specified time period, μ is the detection accuracy times of the specified time period, π is the rotation times of the specified time period, U is a first correction constant, V is a second correction constant, and W is a third correction constant;
the compensation function is:
wherein N is1、N2、N3、N4、N5、N6Respectively showing whether the first, second, third, fourth, fifth and sixth rotation periods have a wheel empty condition, namely the wheel empty condition of the last six rotation periods, wherein the sixth rotation period is the last rotation period, and if the wheel empty condition is N, the wheel empty condition is Nn1, if no wheel is empty, Nn=0;K1、K2、K3、K4、K5、K6The detection scores of a first preset period, a second preset period, a third preset period, a fourth preset period, a fifth preset period and a sixth preset period are represented, and the sixth preset period is the latest preset period; h is an adjusting parameter of the compensation function;
and summing the result of the calculation formula of the detection score and the result of the compensation function to update the detection score.
Specifically, the rotation condition includes:
the first common node is identified as a rogue node; and/or the presence of a gas in the gas,
the first common node is determined as a failed node; and/or the presence of a gas in the gas,
at least one of the credit score and the computing power score of the first common node is less than a corresponding threshold value; and/or the presence of a gas in the gas,
the activity of the first common node is smaller than a preset threshold value.
And (4) voting results of the rogue nodes based on the reported nodes, if the nodes exist, the block chain system randomly selects a plurality of nodes as the nodes of the accompanying party, and the voting results of the nodes of the accompanying party determine whether the nodes are the rogue nodes. The fault node is mainly caused by the communication fault sent by the node. The calculation power score is positively correlated with the accurate amount of the task of the first common node in unit time.
It should be noted that the blockchain constraint rule includes:
each common node in the block chain system only processes one task at a time;
when the current common node processes the task, if other task results based on the same task are received, the current common node immediately stops processing the current task;
when the task results are recorded in blocks by the blockchain system, the blockchain system puts a reward block to the ordinary node with the earliest time stamp, the reward block can trade among the ordinary nodes, and the transaction record is written into the blockchain system.
The method of the embodiment of the invention provides a rotation method and a rotation system for a neutral node in a block chain system, and the whole block chain system ensures the detection efficiency and accuracy of the neutral node and the operational efficiency and accuracy of the common node by controlling the rotation mode of the common node and the neutral node; therefore, when the method is applied to an application with a large processing amount, the nodes can output task processing results firstly, then the neutral nodes trace and feed back the task processing results, and the task is not required to be completed by all the nodes and then the subsequent processing is carried out, so that the waste of computing resources of each node is reduced, the processing speed of the block chain system is greatly improved, and the loss of accuracy in the task processing process of the nodes is reduced to a certain extent.
The embodiment of the invention further provides an embodiment of a device for realizing the steps and the method in the embodiment of the method.
Please refer to fig. 3, which is a block chain system architecture diagram according to an embodiment of the present invention, the system includes:
a blockchain system comprising a plurality of regular nodes 310 and a plurality of neutral nodes 320;
please refer to fig. 4, which is a functional block diagram of a node according to an embodiment of the present invention, wherein the common node at least includes:
a selecting module 410, configured to, when a rotation period is reached and a first common node meets a rotation condition and a rotation list is not empty, select a neutral node from the rotation list according to a priority, and send a rotation request to other common nodes in the block chain system for confirmation;
a rotation module 420, configured to rotate with the corresponding neutral node if the number of the received acknowledgement pass messages is greater than a preset number, and synchronize rotation results to all common nodes;
the processing module 430 is configured to randomly acquire a task issued by the block chain system when a rotation period is not reached or the rotation period is reached but a rotation condition is not satisfied, generate a task result after processing, and broadcast the task result to other common nodes in the block chain system;
an updating module 440, configured to update the credit score based on a correction function and a calculation formula of the credit score if the rotation list is empty when the rotation period is reached and the first common node meets the rotation condition, and send the updated credit score to other common nodes in the block chain system for confirmation;
the module composition of the neutral node is the same as that of the common node;
the blockchain system further comprises:
a storage layer 311 for recording history data of each node;
the interaction layer 312 is used for performing data interaction with the common nodes and the neutral nodes and scheduling between the common nodes and the neutral nodes;
the processing layer 313 is used for calculating the detection scores of the neutral nodes according to a preset period, and sequentially writing the identifiers corresponding to the central nodes meeting the preset detection scores into a rotating list according to the priority order until all the vacant positions of the rotating list are occupied; judging whether a central node which is not written into the rotation list exists or not under the condition of meeting a preset detection score, and if so, updating the detection score based on a compensation function and a calculation formula of the detection score;
the constraint layer 314 is configured to establish a block chain constraint rule, and specifically includes:
each common node in the block chain system only processes one task at a time;
when the current common node processes the task, if other task results based on the same task are received, the current common node immediately stops processing the current task;
when the task results are recorded in blocks by the blockchain system, the blockchain system puts a reward block to the ordinary node with the earliest time stamp, the reward block can trade among the ordinary nodes, and the transaction record is written into the blockchain system.
Since each unit module in the embodiment can execute the method shown in fig. 1, reference may be made to the related description of fig. 1 for a part of the embodiment that is not described in detail. Fig. 5 is a hardware schematic diagram of a node device according to an embodiment of the present invention. Referring to fig. 5, at a hardware level, the node device includes a processor, and optionally further includes an internal bus, a network interface, and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory, such as at least 1 disk Memory. Of course, the node device may also include hardware required for other services.
The processor, the network interface, and the memory may be connected to each other via an internal bus, which may be an ISA (Industry Standard Architecture) bus, a PCI (peripheral component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 5, but this does not indicate only one bus or one type of bus.
And the memory is used for storing programs. In particular, the program may include program code comprising computer operating instructions. The memory may include both memory and non-volatile storage and provides instructions and data to the processor.
In a possible implementation manner, the processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program, and the corresponding computer program can also be obtained from other equipment so as to form a pricing device of the electricity price on a logic level. And the processor executes the program stored in the memory so as to realize the node working method provided by any embodiment of the invention through the executed program.
An embodiment of the present invention further provides a computer-readable storage medium storing one or more programs, where the one or more programs include instructions, which when executed by a node device including a plurality of application programs, enable the node device to execute the node operating method provided in any embodiment of the present invention.
The method performed by the node device according to the embodiment of the present invention may be applied to or implemented by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
An embodiment of the present invention further provides a computer-readable storage medium storing one or more programs, where the one or more programs include instructions, which when executed by a node device including a plurality of application programs, enable the node device to execute the node operating method provided in any embodiment of the present invention.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units or modules by function, respectively. Of course, the functionality of the units or modules may be implemented in the same one or more software and/or hardware when implementing the invention.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The invention may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments of the present invention are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present invention, and is not intended to limit the present invention. Various modifications and alterations to this invention will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.
Claims (10)
1. A rotation method for a neutral node in a blockchain system, the method comprising:
when a rotation period is reached and a first common node meets a rotation condition, if a rotation list is not empty, the first common node selects a neutral node from the rotation list according to priority, and sends a rotation request to other common nodes in the block chain system for confirmation;
and when the number of the confirmation passing messages received by the first common node is greater than the preset number, the first common node and the corresponding neutral node are rotated, and the rotation result is synchronized to all the common nodes.
2. The method of claim 1, further comprising:
when the rotation period is not reached or the rotation period is reached but the first common node does not meet the rotation condition, randomly acquiring a task issued by the block chain system, processing the task to generate a task result, and broadcasting the task result to other common nodes in the block chain system;
other common nodes process the broadcast after receiving the broadcast based on the blockchain constraint rule, and the blockchain system generates the reward block based on the blockchain constraint rule.
3. The method of claim 1, further comprising:
when a rotation period is reached and a first common node meets a rotation condition, if a rotation list is empty, the first common node updates a credit score based on a correction function and a calculation formula of the credit score, and sends the updated credit score to other common nodes in the block chain system for confirmation;
and if the number of the confirmation passing messages received by the first common node is greater than the preset number, synchronizing the updated credit score to all the common nodes.
4. The method of claim 3, wherein the credit score is calculated by the formula:
wherein, C is the credit score,is the average of the credit scores of nearly 10 times, β is the task throughput of a specified time period, α is the task completion of a specified time period, χ is the task accuracy of a specified time period, δ is the specified timeThe rotation times of the segments, epsilon is the confirmed voting accuracy of the designated time period, phi is the confirmed voting times of the designated time period, P is a first correction constant, Q is a second correction constant, R is a third correction constant, and S is a fourth correction constant;
the correction function is:
wherein M is1、M2、M3、M4、M5、M6Respectively showing whether the first, second, third, fourth, fifth and sixth rotation periods have the empty condition, namely the empty condition of the last six rotation periods, if so, Mn1, if not empty, Mn=0;C1、C2、C3、C4、C5、C6Respectively representing credit scores of a first rotation period, a second rotation period, a third rotation period, a fourth rotation period, a fifth rotation period and a sixth rotation period, namely the credit score of the latest six rotation periods; t is an adjusting parameter of the correction function; the sixth rotation period is the latest rotation period;
and (4) subtracting the result of the calculation formula of the credit score and the result of the correction function to update the credit score.
5. The method of claim 1, further comprising:
the block chain system calculates the detection scores of the neutral nodes according to a preset period, and sequentially writes the marks corresponding to the central nodes meeting the preset detection scores into a rotation list according to the priority order until all the vacant positions of the rotation list are occupied;
and the block chain system judges whether a central node which is not written into the rotation list exists or not under the condition of meeting a preset detection score, and if so, the detection score is updated based on a compensation function and a calculation formula of the detection score.
6. The method of claim 5,
the calculation formula of the detection score is as follows:
wherein K is a credit score, Δ C is the credit score of the latest common node, η is the detection times of the specified time period, μ is the detection accuracy times of the specified time period, π is the rotation times of the specified time period, U is a first correction constant, V is a second correction constant, and W is a third correction constant;
the compensation function is:
wherein N is1、N2、N3、N4、N5、N6Respectively showing whether the first, second, third, fourth, fifth and sixth rotation periods have a wheel empty condition, namely the wheel empty condition of the last six rotation periods, wherein the sixth rotation period is the last rotation period, and if the wheel empty condition is N, the wheel empty condition is Nn1, if no wheel is empty, Nn=0;K1、K2、K3、K4、K5、K6The detection scores of a first preset period, a second preset period, a third preset period, a fourth preset period, a fifth preset period and a sixth preset period are represented, and the sixth preset period is the latest preset period; h is an adjusting parameter of the compensation function;
and summing the result of the calculation formula of the detection score and the result of the compensation function to update the detection score.
7. The method of claim 1, wherein the rotation condition comprises:
the first common node is identified as a rogue node; and/or the presence of a gas in the gas,
the first common node is determined as a failed node; and/or the presence of a gas in the gas,
at least one of the credit score and the computing power score of the first common node is less than a corresponding threshold value; and/or the presence of a gas in the gas,
the activity of the first common node is smaller than a preset threshold value.
8. The method of claim 7, wherein the computational power score is positively correlated with the task accuracy per unit time of the first regular node.
9. The method of claim 2, wherein the blockchain constraint rule comprises:
each common node in the block chain system only processes one task at a time;
when the current common node processes the task, if other task results based on the same task are received, the current common node immediately stops processing the current task;
when the task results are recorded in blocks by the blockchain system, the blockchain system puts a reward block to the ordinary node with the earliest time stamp, the reward block can trade among the ordinary nodes, and the transaction record is written into the blockchain system.
10. A rotation system for a neutral node in a blockchain system, comprising:
a blockchain system comprising a plurality of regular nodes and a plurality of neutral nodes;
the common node includes at least:
the selection module is used for selecting a neutral node from the rotation list according to the priority when the rotation period is reached and the first common node meets the rotation condition and the rotation list is not empty, and sending a rotation request to other common nodes in the block chain system for confirmation;
the rotation module is used for rotating with the corresponding neutral nodes when the number of the received confirmation passing messages is larger than the preset number, and synchronizing the rotation result to all common nodes;
the processing module is used for randomly acquiring the tasks issued by the block chain system when the rotation period is not reached or the rotation period is reached but the rotation condition is not met, generating task results after processing, and broadcasting the task results to other common nodes in the block chain system;
the updating module is used for updating the credit score based on a correction function and a calculation formula of the credit score if the rotation list is empty when the rotation period is reached and the first common node meets the rotation condition, and sending the updated credit score to other common nodes in the block chain system for confirmation;
the module composition of the neutral node is the same as that of the common node;
the blockchain system further comprises:
the storage layer records historical data of each node;
the interaction layer is used for carrying out data interaction with the common nodes and the neutral nodes and scheduling the common nodes and the neutral nodes;
the processing layer is used for calculating the detection scores of the neutral nodes according to a preset period, and sequentially writing the marks corresponding to the central nodes meeting the preset detection scores into a rotation list according to the priority order until all the vacant positions of the rotation list are occupied; judging whether a central node which is not written into the rotation list exists or not under the condition of meeting a preset detection score, and if so, updating the detection score based on a compensation function and a calculation formula of the detection score;
the constraint layer is used for establishing a block chain constraint rule, and specifically comprises the following steps:
each common node in the block chain system only processes one task at a time;
when the current common node processes the task, if other task results based on the same task are received, the current common node immediately stops processing the current task;
when the task results are recorded in blocks by the blockchain system, the blockchain system puts a reward block to the ordinary node with the earliest time stamp, the reward block can trade among the ordinary nodes, and the transaction record is written into the blockchain system.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911215789.1A CN111080447B (en) | 2019-12-02 | 2019-12-02 | Rotation method and system for neutral node in block chain system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911215789.1A CN111080447B (en) | 2019-12-02 | 2019-12-02 | Rotation method and system for neutral node in block chain system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111080447A true CN111080447A (en) | 2020-04-28 |
CN111080447B CN111080447B (en) | 2020-10-30 |
Family
ID=70312486
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911215789.1A Active CN111080447B (en) | 2019-12-02 | 2019-12-02 | Rotation method and system for neutral node in block chain system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111080447B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111769984A (en) * | 2020-06-29 | 2020-10-13 | 北京天仪百康科贸有限公司 | Method for adding nodes in block chain network and block chain system |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170046652A1 (en) * | 2015-08-13 | 2017-02-16 | The Toronto-Dominion Bank | Systems and method for tracking behavior of networked devices using hybrid public-private blockchain ledgers |
CN107124403A (en) * | 2017-04-14 | 2017-09-01 | 朱清明 | The generation method and computing device of common recognition block in block chain |
CN107862216A (en) * | 2017-10-13 | 2018-03-30 | 布比(北京)网络技术有限公司 | Method for secret protection, device and the storage medium merchandised for anonymity across chain |
CN108810077A (en) * | 2018-04-19 | 2018-11-13 | 深圳市网心科技有限公司 | Block chain common recognition processing method, electronic device and computer readable storage medium |
CN108882238A (en) * | 2018-06-21 | 2018-11-23 | 中国石油大学(华东) | A kind of lightweight rotation ca authentication method in mobile ad hoc network based on common recognition algorithm |
US20190363875A1 (en) * | 2017-07-28 | 2019-11-28 | Upheaval LLC | Blockchain content reconstitution facilitation systems and methods |
-
2019
- 2019-12-02 CN CN201911215789.1A patent/CN111080447B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170046652A1 (en) * | 2015-08-13 | 2017-02-16 | The Toronto-Dominion Bank | Systems and method for tracking behavior of networked devices using hybrid public-private blockchain ledgers |
CN107124403A (en) * | 2017-04-14 | 2017-09-01 | 朱清明 | The generation method and computing device of common recognition block in block chain |
US20190363875A1 (en) * | 2017-07-28 | 2019-11-28 | Upheaval LLC | Blockchain content reconstitution facilitation systems and methods |
CN107862216A (en) * | 2017-10-13 | 2018-03-30 | 布比(北京)网络技术有限公司 | Method for secret protection, device and the storage medium merchandised for anonymity across chain |
CN108810077A (en) * | 2018-04-19 | 2018-11-13 | 深圳市网心科技有限公司 | Block chain common recognition processing method, electronic device and computer readable storage medium |
CN108882238A (en) * | 2018-06-21 | 2018-11-23 | 中国石油大学(华东) | A kind of lightweight rotation ca authentication method in mobile ad hoc network based on common recognition algorithm |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111769984A (en) * | 2020-06-29 | 2020-10-13 | 北京天仪百康科贸有限公司 | Method for adding nodes in block chain network and block chain system |
CN111769984B (en) * | 2020-06-29 | 2022-12-09 | 南京浩澜创达科技有限公司 | Method for adding nodes in block chain network and block chain system |
Also Published As
Publication number | Publication date |
---|---|
CN111080447B (en) | 2020-10-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110032880B (en) | Screen recording evidence obtaining method and system based on block chain and electronic equipment | |
CN110659988B (en) | Parallel processing method and device for block chain consensus and execution and electronic equipment | |
CN107450981B (en) | Block chain consensus method and equipment | |
CN107450979B (en) | Block chain consensus method and device | |
CN113840012B (en) | Block chain-based screen recording evidence obtaining method and system and electronic equipment | |
CN108765159B (en) | Block chain-based uplink and state processing method and device and interconnection system | |
CN107451854B (en) | Method and device for determining user type and electronic equipment | |
CN110659137B (en) | Processing resource allocation method and system for offline tasks | |
CN113205416A (en) | Service processing method and system based on block chain prediction machine | |
CN112101939A (en) | Node management method and system based on block chain | |
WO2021238514A1 (en) | Blockchain-based data processing method, apparatus and device, and readable storage medium | |
CN110743169B (en) | Anti-cheating method and system based on block chain | |
CN111080447B (en) | Rotation method and system for neutral node in block chain system | |
CN111611558A (en) | Identity verification method and device | |
CN111402058A (en) | Data processing method, device, equipment and medium | |
CN110020886B (en) | Pricing method, system and device and electronic equipment | |
CN111769984B (en) | Method for adding nodes in block chain network and block chain system | |
CN111459474B (en) | Templated data processing method and device | |
CN111105268B (en) | Advertisement putting cost adjusting method and device, storage medium and electronic equipment | |
CN107194712B (en) | Method and device for recording change information of shared account and method and system for supplementing account of internal account | |
CN112416534A (en) | Agent-based task management method and device | |
CN110599139B (en) | Block output method and device in block chain consensus algorithm | |
CN112351085A (en) | Network resource safety sharing method | |
CN109615465B (en) | Service order processing method and device and electronic equipment | |
CN113554498B (en) | Processing method and device for user account request |
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: 20201012 Address after: 15th floor, 14th floor, building 1, District 1, No.81 Beiqing Road, Haidian District, Beijing 100089 Applicant after: BAIWANG Co.,Ltd. Address before: 123 Changjiang West Road, Shushan District, Hefei City, Anhui Province 230000 Applicant before: Pei Baolin |
|
GR01 | Patent grant | ||
GR01 | Patent grant |