CN111713088A - Method and device for processing data and equipment for processing data - Google Patents

Method and device for processing data and equipment for processing data Download PDF

Info

Publication number
CN111713088A
CN111713088A CN201880089370.3A CN201880089370A CN111713088A CN 111713088 A CN111713088 A CN 111713088A CN 201880089370 A CN201880089370 A CN 201880089370A CN 111713088 A CN111713088 A CN 111713088A
Authority
CN
China
Prior art keywords
node
credit
value
nodes
blockchain network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201880089370.3A
Other languages
Chinese (zh)
Other versions
CN111713088B (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of CN111713088A publication Critical patent/CN111713088A/en
Application granted granted Critical
Publication of CN111713088B publication Critical patent/CN111713088B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The application provides a method and a device for processing data, wherein the method comprises the following steps: a first node determines a first credit value of the first node, wherein the first node is a node in a block chain network; and when the first node determines that the first credit value is greater than a first preset threshold value, carrying out workload calculation certification based on a first target value, wherein the first target value is a target value corresponding to a first difficulty, and the first difficulty is smaller than a second difficulty corresponding to workload calculation based on a preset target value. The method for processing data can reduce the difficulty of the consensus algorithm in the block chain network.

Description

Method and device for processing data and equipment for processing data Technical Field
The present application relates to the field of communications, and more particularly, to a method for processing data, an apparatus for processing data, and a device for processing data in the field of communications.
Background
In a blockchain network, a consensus mechanism is introduced to solve the problem that a common node agrees to certain information and updates it to a total shared book, and a typical consensus mechanism is Proof of work (PoW).
At present, the PoW algorithm is the arithmetic capability of each node in a block chain network, and is a process of extremely consuming resources by calculating the value of a random number (Nonce). Therefore, how to reduce the difficulty of the PoW algorithm in the blockchain network is an urgent problem to be solved.
Disclosure of Invention
The application provides a data processing method, a data processing device and data processing equipment, which can reduce the difficulty of a PoW algorithm in a block chain network.
In a first aspect, a method for processing data is provided, the method comprising: a first node determines a first credit value for the first node, wherein the first node is a node in a blockchain network. And under the condition that the first node determines that the first credit value is greater than a first preset threshold value, the first node performs workload certification calculation based on a first target value, wherein the first target value is a target value corresponding to a first difficulty, and the first difficulty is smaller than a second difficulty corresponding to the workload certification calculation based on a preset target value.
According to the method for processing data in the embodiment of the application, the node in the block chain firstly determines the current credit value of the node, when the credit value exceeds a first preset threshold value, when the workload certification calculation is carried out, the first target value obtained by calculation is the workload certification calculation, and the difficulty of calculating the first target value is smaller than the difficulty of calculating the preset target value.
With reference to the first aspect, in an implementation manner of the first aspect, the method further includes: the first node determines a second credit value for the first node. And the first node performs workload certification calculation based on the preset target value under the condition that the first node determines that the second credit value is less than or equal to the first preset threshold value.
According to the method for processing data in the embodiment of the application, a node in a block chain firstly determines the current credit value of the node, when the credit value does not exceed a first preset threshold value, a preset target value is calculated and is the workload proof is completed when the workload proof calculation is performed, then when the node credit value does not meet the preset requirement, the workload proof is performed based on the existing workload proof calculation difficulty, the second credit value and the first credit value can be determined at different moments and can be compatible with the existing workload proof calculation method.
With reference to the first aspect and the foregoing implementation manner of the first aspect, in another implementation manner of the first aspect, the method further includes: the first node determines a third credit value, wherein the third credit value is a credit value of a second node, and the second node is any one node except the first node in the block chain network. The first node determines a fourth credit value, wherein the fourth credit value is a credit value of a third node, and the third node is any one node except the first node and the second node in the block chain network. The first node sends transaction information to the second node if it is determined that the third credit value is higher than the fourth credit value.
According to the method for processing data in the embodiment of the application, a first node in a block chain can calculate credit values of all nodes in the block chain, when the credit value of a second node meets a second preset threshold value and the credit value of a third node meets the second preset threshold value, the first node can consider the second node as a trusted node, when a transaction needs to be sent out by the first node, the transaction can be sent to the trusted second node only, and power consumption of workload certification calculation can be reduced.
With reference to the first aspect and the foregoing implementation manner of the first aspect, in another implementation manner of the first aspect, the method further includes: the first node determines a third credit value, wherein the third credit value is a credit value of a second node, and the second node is any one node except the first node in the block chain network. The first node determines a fourth credit value, wherein the fourth credit value is a credit value of a third node, and the third node is any one node except the first node and the second node in the block chain network. The first node sends transaction information to the second node if it is determined that the third credit value is higher than the fourth credit value, and sends the transaction information to the third node after sending the transaction information to the second node.
According to the method for processing data, a first node in a block chain can calculate credit values of all nodes in the block chain, when the credit value of a second node meets a second preset threshold value, and the credit value of a third node meets the second preset threshold value, the first node can consider the second node as a trusted node, when a transaction needs to be sent out by the first node, the transaction can be sent to the trusted second node, and then the transaction is sent to the third node after the transaction is sent to the second node, so that the power consumption of workload certification calculation can be reduced. For example, the transaction information is sent to the second node at a fourth time, and the transaction information is sent to the third node at a fifth time, which is later than the fourth time.
Alternatively, the second preset threshold may be a value equal to the first preset threshold defined by the system, or may be a value different from the first preset threshold set by the system.
With reference to the first aspect and the foregoing implementation manner of the first aspect, in another implementation manner of the first aspect, before the first node determines the first credit value, the method further includes: the first node sends a join request message to X nodes in the block chain network, wherein the join request message comprises credit degree information, the credit degree information is used for indicating the latest credit value of the first node, and X is an integer greater than or equal to 1.
According to the method for processing data in the embodiment of the application, when the first node is not a node in the blockchain network, the first node needs to first send a join request message to the blockchain network, wherein optionally, the join request message of the first node may be broadcast in the blockchain network, the join request message of the first node includes credit degree information, and the node in the blockchain network may authenticate the join request message of the first node, judge the reliability of the credit value provided by the first node, and increase the security of the blockchain network.
With reference to the first aspect and the foregoing implementation manner of the first aspect, in another implementation manner of the first aspect, the method further includes: the first node receives an authentication confirmation message sent by at least one node in the X nodes and joins the blockchain network, wherein the authentication confirmation message is used for indicating that the first node can join the blockchain network; or the first node queries the authentication confirmation message from the blockchain network and joins the blockchain network, wherein the authentication confirmation message is used for confirming that the first node can join the blockchain network.
According to the data processing method of the embodiment of the application, the node authenticating the join request message of the first node may be X nodes in the blockchain network, and when the authentication confirmation message is sent by at least one node in the X nodes, or the first node may query the authentication confirmation message in the blockchain network and join the blockchain network, the first node can be enabled to carry current credit information of the first node when joining the blockchain network, and the subsequent workload certification based on credit value by the first node is facilitated.
With reference to the first aspect and the foregoing implementation manner of the first aspect, in another implementation manner of the first aspect, the method further includes: the first node sends credit statistics information to nodes in a credit statistics blockchain network.
According to the method for processing data in the embodiment of the application, the first node may first send the credit statistics information to the credit statistics block chain network, which is beneficial to acquiring the subsequent credit value.
With reference to the first aspect and the foregoing implementation manner of the first aspect, in another implementation manner of the first aspect, the performing, by the first node, workload certification calculation based on the first target value includes: and the first node performs workload certification calculation based on the first target value to obtain the consensus confirmation right. The first node generates a target block.
According to the method for processing data, the first node can obtain the consensus confirmation right after the workload proof calculation is carried out based on the first target value, and the target block is generated, so that the power consumption of the workload proof calculation of the first node can be reduced.
With reference to the first aspect and the foregoing implementation manner of the first aspect, in another implementation manner of the first aspect, the method further includes: the first node determining a fifth credit value; the target block comprises the fifth credit value; the first node determines a fifth credit value as the first credit value minus a preset credit consumption value.
According to the method for processing data, after the first node performs the workload proof calculation based on the first target value to obtain the consensus confirmation right, the first node re-determines the current credit value of the first node, wherein the current credit value is smaller than the first credit value of the first node, and the credit consumption value of the first node performing the workload proof calculation is subtracted, so that the first node can be prevented from continuously performing the workload proof calculation based on the first target value for multiple times to influence the security of the block chain network.
With reference to the first aspect and the foregoing implementation manner of the first aspect, in another implementation manner of the first aspect, the preset credit consumption value is a credit value consumed when the first node performs workload proving calculation based on the first target value to obtain the consensus verification right.
According to the method for processing data, the credit value consumed by the first node when the first node obtains the consensus confirmation right through the workload proving calculation based on the first target value is subtracted when the credit value is re-determined, and the latest credit value of the first node can be accurately determined.
With reference to the first aspect and the foregoing implementation manner of the first aspect, in another implementation manner of the first aspect, the target block further includes a height difference, where the height difference is used to indicate a block height difference between a block where the first node last obtained the consensus confirmation right based on the first target value and a block where the first node obtained the consensus confirmation right based on the first target value at the present time.
According to the method for processing data in the embodiment of the application, the block generated by the first node further includes the number of times of workload certification calculation between the first node calculating the first target value to obtain the consensus confirmation right and the current calculation between the first target value to obtain the consensus confirmation right, so that other nodes in the block chain network can know whether the first node has the right to calculate the first target value to obtain the consensus confirmation right.
With reference to the first aspect and the foregoing implementation manner of the first aspect, in another implementation manner of the first aspect, the method further includes: the first node receives first transaction information, wherein the first transaction information comprises credit requirement value information, and the credit requirement information is used for indicating the credit value required by the consensus confirmation of the first transaction by the blockchain node.
According to the method for processing data in the embodiment of the application, the first node receives the first transaction information in the blockchain network before the workload proving calculation is carried out, the first node obtains the credit requirement value required by the first transaction, and judges whether the credit value of the first node meets the credit requirement value required by the first transaction or not, so that the completion speed of the transaction in the blockchain network can be improved.
With reference to the first aspect and the foregoing implementation manner of the first aspect, in another implementation manner of the first aspect, the performing, by the first node, workload certification calculation based on the first target value further includes:
optionally, after the first node performs workload proving calculation based on the first target value to obtain the consensus confirmation right, the first node determines that the workload proving calculation is no longer performed based on the first target value in the competition of the consensus confirmation rights of the next N blocks;
optionally, after the first node performs workload proving calculation based on the first target value to obtain the consensus confirmation weight, the first node determines that the workload proving calculation is no longer performed based on the first target value in the competition of the consensus confirmation weights of the blocks in the following Y time units;
optionally, after the first node performs workload proving calculation based on a first target value to obtain a consensus confirmation right, the first node determines that the workload proving calculation is performed based on a preset target value or a second target value in competition of the consensus confirmation rights of the next N blocks, where the second target value is a target value corresponding to a third difficulty, and the third difficulty is smaller than the second difficulty and greater than the first difficulty;
optionally, after the first node performs workload certification calculation based on a first target value to obtain the consensus confirmation weight, the first node determines that the workload certification calculation is performed based on the preset target value or the second target value in the competition of the consensus confirmation weights in the following Y time units; wherein said N and said Y are positive integers.
According to the method for processing data in the embodiment of the application, after the first node performs the workload proof calculation based on the first target value to obtain the consensus confirmation right, the first node cannot perform the workload proof calculation based on the first target value again in the next transaction processing within N or Y time units, and the situation that the first node performs the workload proof calculation based on the first target value for multiple times to obtain the consensus confirmation right can be avoided, so that the security of the blockchain network is reduced.
It should be understood that the first node may be any one of the nodes in the blockchain network, such as a computer or server interconnected in the network.
In a second aspect, there is provided a method of processing data, the method comprising: the method comprises the steps that a second node receives a joining request message sent by a first node, wherein the joining request message comprises credit degree information, the credit degree information is used for indicating a credit value of the first node in a first block chain network, the second node is one node in the second block chain network, and the first node is one node in the first block chain network. And the second node acquires the credit value of the first node in the first block chain network according to the credit information.
According to the data processing method, the second node receives the request information sent by the first node, determines the latest credit value of the first node, can obtain the current credit value information when the first node joins the block chain network, and is beneficial to the first node to subsequently perform workload certification calculation based on the credit value.
With reference to the second aspect, in an implementation manner of the second aspect, the obtaining, by the second node, a credit value of the first node in the first blockchain network according to the credit information includes:
and the credit information is the credit value of the first node in the first block chain network, and the second node acquires the credit value according to the credit information.
According to the method for processing data in the embodiment of the application, the first node may directly include the credit value of the first node in the first blockchain network in the join request message and send the join request message to the second node, and the second node can acquire the credit value of the first node in the first blockchain network after receiving the join request message.
With reference to the second aspect and the foregoing implementation manner of the second aspect, in another implementation manner of the second aspect, the obtaining, by the second node, the credit value of the first node in the first blockchain network according to the credit information includes: the credit information comprises target block information recording the credit value in a target block chain network. And the second node sends a query request message to the target block chain network according to the target block information, wherein the query request message is used for requesting to acquire the credit value. And the second node receives inquiry response information sent by a third node, wherein the inquiry response information comprises the credit value, and the third node is one node in the target block chain network.
According to the method for processing data in the embodiment of the application, the second node can inquire the credit value information of the first node from the target block chain network, and a method for acquiring the credit value of the first node is added.
Optionally, in some embodiments, the target blockchain network may be a first blockchain network to which the first node belongs, that is, the join request message sent by the first node includes blockchain information where a credit value of the first node in the first blockchain network belongs is located, the second node queries the credit value according to the blockchain information, and a third node in the first blockchain network includes the credit value in the query response information and sends the query response information to the second node.
Optionally, in another embodiment, the target blockchain network may be a credit statistics blockchain network, that is, the join request message sent by the first node includes block information of a credit statistics blockchain network in which a credit value of the first node in the first blockchain network belongs, the second node queries the credit value according to the block information, and a third node in the credit statistics blockchain network includes the credit value in the query response information and sends the query response information to the second node.
In a third aspect, a method for processing data is provided, the method comprising: a third node receives credit statistic information sent by a first node, wherein the third node is a node in a credit statistic block chain network; and the third node determines the credit value of the first node according to the credit statistical information.
According to the data processing method, the third node can be used as a node for calculating the latest credit value of the first node in the credit statistics block chain network, the credit value of the first node is calculated, and convenience can be brought to follow-up inquiry of the latest credit value of the first node.
With reference to the third aspect, in an implementation manner of the third aspect, the method further includes: the third node receives query request information sent by a second node, wherein the query request information is used for requesting to acquire the credit value of the first node, and the second node is a node in the first block chain network. And the third node sends inquiry feedback information to the second node, wherein the inquiry feedback information comprises the credit value of the first node.
According to the method for processing data in the embodiment of the application, the third node can feed back the latest credit value of the first node to the second node which inquires the latest credit value of the first node, and a method for acquiring the credit value of the first node by the second node is added.
In a fourth aspect, there is provided a method of processing data, the method comprising: the method comprises the steps that a first node obtains credit values of N nodes in a first block chain network, wherein the first node is any one node in the first block chain network. The first node determines, according to credit values of the N nodes in the first blockchain network, to perform workload certification calculation using a first scheme or to perform workload certification calculation using a second scheme, where performing the workload certification calculation using the first scheme is to perform the workload certification calculation based on a first target value, where the first target value is a target value corresponding to a first difficulty, and performing the workload certification calculation using the second scheme is to perform the workload certification calculation based on a preset target value, where the preset target value is a target value corresponding to a second difficulty, and the first difficulty is smaller than the second difficulty.
According to the method for processing data in the embodiment of the application, the first node may calculate the credit values of the N nodes in the blockchain network before performing the workload proving calculation, where the N nodes may be a scheme in which all the nodes in the blockchain network judge to perform the workload proving calculation according to the calculated credit values of the N nodes, and a method for performing the workload proving calculation by reducing power consumption of the N nodes in the blockchain network may be provided.
With reference to the fourth aspect, in an implementation manner of the fourth aspect, the determining, by the first node, that the workload proof calculation is performed by using the first scheme or the workload proof calculation is performed by using the second scheme according to credit values of N nodes in the first blockchain network includes: and the first node determines to adopt the first scheme to carry out the workload certification calculation under the condition that the credit values of the N nodes in the first block chain network are all larger than a first preset threshold value. And the first node determines to adopt the second scheme to perform the workload certification calculation under the condition that the credit values of M nodes in the first blockchain network are determined to be less than or equal to the first preset threshold, wherein M is a positive integer greater than or equal to 0 and less than or equal to N.
According to the data processing method, when the credit values of the N nodes in the block chain network are all larger than the first preset value, the N nodes can reduce the difficulty in carrying out the workload proving calculation, and the power consumption of the whole network calculation can be reduced.
With reference to the fourth aspect and the foregoing implementation manner of the fourth aspect, in another implementation manner of the fourth aspect, the determining, by the first node, that the workload proof calculation is performed by using the first scheme or the workload proof calculation is performed by using the second scheme according to the credit values of the N nodes in the first block chain network includes: and the first node determines to adopt the first scheme to carry out the workload certification calculation under the condition that the ratio of the number of nodes with the credit value larger than the second preset value in the first blockchain network to the number of all nodes in the first blockchain network is larger than a third preset value, or the number of nodes with the credit value larger than the second preset value in the first blockchain network is larger than a fourth preset value. And the first node determines to adopt the second scheme to carry out the workload certification calculation under the condition that the ratio of the number of nodes with the credit value larger than the second preset value in the first blockchain network to the number of all nodes in the first blockchain network is smaller than or equal to a third preset value, or the number of nodes with the credit value larger than the second preset value in the first blockchain network is smaller than or equal to a fourth preset value.
According to the data processing method of the embodiment of the application, when the credit value of part of all nodes in the block chain network is greater than the first preset value, all nodes or the nodes with the credit values greater than the first preset value can reduce the difficulty for carrying out the workload proving calculation, and the power consumption of the whole network calculation can be reduced.
In a fifth aspect, an apparatus for processing data is provided, where the apparatus for processing data may be configured as a first node in the first aspect or may be configured as a first node for multiple computer apparatuses, and includes means for performing the steps of the method for processing data in the first aspect and the implementation manners of the first aspect.
A sixth aspect provides an apparatus for processing data, wherein the apparatus for processing data may be configured as the second node in the second aspect or may be configured as the second node for a plurality of computer apparatuses, and comprises means for performing the steps of the method for processing data in the second aspect and the implementations of the second aspect.
In a seventh aspect, an apparatus for processing data is provided, where the apparatus for processing data may be configured as the third node in the third aspect or may be configured as a third node for multiple computer apparatuses, and includes means for performing the steps of the method for processing data in the third aspect and the implementation manners of the third aspect.
In an eighth aspect, an apparatus for processing data is provided, where the apparatus for processing data may be configured as the first node in the fourth aspect or may be configured as the first node for a plurality of computer apparatuses, and includes means for performing the steps of the method for processing data in the fourth aspect and the implementation manners of the fourth aspect.
In a ninth aspect, there is provided an apparatus for processing data, the apparatus having a function of implementing each node in any one of the first to fourth aspects and various implementations thereof. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above.
In a tenth aspect, a server is provided, the server comprising a processor in its structure. The processor is configured to enable the server to perform the functions of any one of the first to fourth aspects and various implementations thereof, and in one possible design, the server may further include a transceiver to enable the server to receive or transmit information. In one possible design, the server may also include a memory, coupled to the processor, that stores program instructions and data necessary for the server. Alternatively, the server comprises a memory for storing a computer program and a processor for calling and running the computer program from the memory, so that the server performs the method of any one of the first to fourth aspects and any one of its various implementations for processing data.
In an eleventh aspect, there is provided a computer-readable storage medium storing a program for causing a server to execute the method of processing data of any one of the first to fourth aspects and any one of its various implementations. Alternatively, the computer readable storage medium is used for storing computer software instructions for the server, which comprise a program designed for executing the method of the first aspect.
In a twelfth aspect, a chip system is provided, which includes a processor for enabling a server to implement the functions involved in any one of the first to fourth aspects and various implementations thereof.
Therefore, the data processing method, the data processing device and the data processing equipment can reduce the difficulty of the consensus algorithm in the blockchain network when the credit value of the node meets the preset value.
Drawings
FIG. 1 is a diagram of an example of a blockchain network to which the method and apparatus for processing data according to the embodiments of the present application are applicable;
FIG. 2 is a schematic flow diagram of workload attestation;
fig. 3 is a schematic diagram of a data processing method according to an embodiment of the present application;
FIG. 4 is a schematic diagram of another data processing method provided in the embodiments of the present application;
FIG. 5 is a schematic diagram of another data processing method provided in the embodiments of the present application;
FIG. 6 is a schematic diagram of another data processing method provided in the embodiments of the present application;
FIG. 7 is a schematic diagram of another data processing method provided in the embodiments of the present application;
fig. 8 is a schematic block diagram of an example of a data processing apparatus according to an embodiment of the present application;
FIG. 9 is a schematic block diagram of another example of a data processing apparatus of an embodiment of the present application;
fig. 10 is a schematic block diagram of another example of the data processing apparatus according to the embodiment of the present application.
Detailed Description
The technical solution in the present application will be described below with reference to the accompanying drawings.
The method for caching data provided by the embodiment of the application can be applied to a computer, and the computer comprises a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer.
The hardware layer includes hardware such as a Central Processing Unit (CPU), a Memory Management Unit (MMU), and a Memory (also referred to as a main Memory).
The operating system may be any one or more computer operating systems that implement business processing through processes (processes), such as a Linux operating system, a Unix operating system, an Android operating system, an iOS operating system, or a windows operating system.
The application layer comprises applications such as a browser, an address list, word processing software, instant messaging software and the like. Furthermore, the embodiment of the present application does not particularly limit the specific structure of the execution subject of the method provided by the embodiment of the present application, as long as the communication can be performed according to the method provided by the embodiment of the present application by running the program recorded with the code of the method provided by the embodiment of the present application, for example, the execution subject of the method provided by the embodiment of the present application may be a computer device, or a functional module capable of calling a program and executing the program in the computer device.
In the embodiment of the present application, the computer device may be a handheld device such as a smartphone, or may be a terminal device such as a personal computer, or the computer may be a server, and the embodiment of the present application is not particularly limited as long as the data can be processed by the method for processing data according to the embodiment of the present application by running a code in which the method for processing data of the embodiment of the present application is recorded.
Among them, a server, also called a server, is a device that provides computing services. Since the server needs to respond to and process the service request, the server generally has the capability of assuming and securing the service. The server is constructed to include a processor, a hard disk, a memory, a system bus, etc., similar to a general-purpose computer architecture, but requires high processing power, stability, reliability, security, scalability, manageability, etc., due to the need to provide highly reliable services. The execution subject of the path detection in the embodiment of the present application may be a computer device, or a functional module capable of calling a program and executing the program in the computer device.
The node described herein refers to a basic unit capable of performing consensus operations, storing data, forwarding data, verifying data, and the like, and may be composed of one or more computer devices, for example, a computer, a portable computer, a server, a wearable device, and the like.
In the embodiment of the present application, the blockchain network 100 includes a structure of a blockchain network device for executing a consensus mechanism, as shown in fig. 1.
The blockchain network 100 includes nodes 130 as shown in fig. 1.
The nodes 130 (including the nodes 130a to 130e shown in fig. 1) may be understood as computers or servers, but not limited to computers or servers.
In the present embodiment, the nodes 130 are communicatively coupled to each other.
Thus, each node 130 may make decisions based on the negotiation mechanism based on the communication connection.
For example, some (e.g., at least two) or all of the nodes 130 in the blockchain network 100 can negotiate a decision, initiated by one or more nodes, between themselves to determine the outcome of the decision.
For example, in the embodiment of the present application, each node participating in negotiation may determine for a certain event based on a preset determination rule, so that each node participating in negotiation may obtain a determination result for the event, for example, the determination result may be "yes" or "no". Here, the determination rules used by the nodes participating in the negotiation may be the same or different, and the present application is not particularly limited.
Thereafter, communication may be performed between the nodes participating in the negotiation to determine the decision results of the nodes participating in the negotiation. Thus, the final decision result for the event made by the block chain network 100 can be determined based on the distribution of the decision results of the nodes participating in the negotiation. By way of example and not limitation, the blockchain network 100 may implement the above-described negotiation mechanism based on blockchain techniques.
The blockchain network 100, the blockchain network 100 is formed by the nodes 130, and it can be seen from fig. 1 that there is an equality between the nodes, and none of the nodes is a central node, i.e. there is no need for centralization in the blockchain network. The block chain is a decentralized database block chain network and consists of a data layer, a network layer, a consensus layer, an excitation layer, a contract layer and an application layer. The data layer encapsulates bottom data blocks and related data encryption, timestamp and other technologies, the network layer comprises a distributed networking mechanism, a data transmission mechanism, a data verification mechanism and the like, the consensus layer mainly encapsulates various consensus algorithms of network nodes, and the incentive layer integrates economic factors into a block chain technology system and mainly comprises an economic incentive issuing mechanism, an economic incentive distributing mechanism and the like. The contract layer mainly encapsulates various scripts, algorithms and intelligent contracts and is the basis of the programmable characteristic of the block chain; the application layer encapsulates various application scenarios and cases of the blockchain. In the model, a chained block structure based on a timestamp, a consensus mechanism of distributed nodes, economic excitation based on consensus computing power and a flexible programmable intelligent contract are the most representative innovation points of the block chain technology.
It should be understood that the blockchain network 100 shown in fig. 1 is an example of a blockchain network formed by the nodes 130 described above, and in other embodiments, the number of nodes forming the blockchain network may be different from that shown in fig. 1.
The blockchain network is generally divided into a public chain, a federation chain and a proprietary chain according to different application scenarios and design systems. Wherein:
each node of the public chain can freely join and leave the network, and participate in reading and writing of data on the chain, and the nodes are interconnected and intercommunicated in a flat topological structure during operation, and no centralized service end node exists in the network.
Each node of the federation chain usually has a corresponding entity organization, and can join and leave the network only after authorization. Organizations form interest-related alliances that collectively maintain healthy operation of blockchains.
The write-in authority of each node of the proprietary chain is subjected to internal control, and the read authority is selectively opened to the outside according to requirements. The special chain still has a general structure of block chain multi-node operation and is suitable for internal data management and audit of a specific mechanism.
The blockchain technology is not a single technology, but is a system which is integrated and applied by point-to-point transmission, a consensus mechanism, distributed data storage and a cryptology principle, and has the technical characteristics of full disclosure and tamper resistance.
First, point-to-point transmission: the nodes participating in the block chain are independent and peer-to-peer, and the synchronization of data and information is realized between the nodes through a point-to-point transmission technology. The nodes can be different physical machines or different instances of the cloud.
Second, consensus mechanism: the consensus mechanism of the block chain refers to a process that specific data and information of each node are agreed by interaction among nodes under a preset logic rule by nodes participating in multiple parties. The consensus mechanism needs to rely on a well-designed algorithm, so there is a certain difference between different consensus mechanism performances (e.g. Transaction Throughput Per Second (TPS), time delay for achieving consensus, consumed computing resources, consumed transmission resources, etc.).
Thirdly, distributed data storage: distributed storage in the block chain is that independent and complete data are stored in each node participating in the block chain, so that the data storage is ensured to be fully disclosed among the nodes. Unlike traditional distributed data storage, which divides data into multiple parts according to a certain rule for backup or synchronous storage, block chain distributed data storage relies on the consensus among independent nodes with equal positions in a block chain to realize high-consistency data storage.
Fourth, the principle of cryptography: the block chain is usually based on asymmetric encryption technology to realize credible information propagation, verification and the like.
The concept of "block" is to organize one or more data records in the form of "block", and the size of "block" can be customized according to the actual application scenario; and a "chain" is a data structure that connects "chunks" storing data records in chronological order and with a HASH (HASH) technique. In the blockchain, each 'block' comprises two parts of a 'block head' and a 'block body', wherein the 'block body' comprises transaction records packed into the 'block'; the "chunk header" contains the root HASH of all transactions in the "chunk" and the HASH of the previous "chunk". The data structure of the blockchain ensures that the data stored on the blockchain has the property of being not tampered.
The block chain is not limited in the present application, and for example, the present application may be applied to the public chain, the alliance chain or the proprietary chain, and the present application mainly relates to the above-mentioned consensus mechanism in the block chain. First, a consensus mechanism in a lower blockchain is described.
The blockchain needs to become a difficult-to-break, open, and non-falsifiable decentralized honest and trusted system of data records, and needs to achieve security, definition, and irreversibility of distributed data records in as short a time as possible, so as to provide a firmest and decentralized system. In practice, this flow is divided into two aspects:
(1) selecting a unique node to generate a block;
(2) making the distributed data recording irreversible.
The technical core for realizing the process is as follows: a consensus mechanism. The consensus mechanism is a mechanism that the block chain nodes achieve the overall network consensus on the block information, and can ensure that the latest block is accurately added to the block chain, the block chain information stored by the nodes is consistent and not forked, and even can resist malicious attacks.
The current mainstream consensus mechanisms include: workload certification, equity certification, a mixture of workload and equity certification, share authorization certification, a rayleigh consensus protocol, and the like.
The following takes workload certification as an example, and a brief description is given to a consensus mechanism in a next current block chain in conjunction with fig. 2.
FIG. 2 is a schematic flow diagram of workload proofs. The schematic includes S210-S240.
Basic principle of workload proof: the workload proving system is mainly characterized in that a client (node) needs to do work with certain difficulty to obtain a result, and a verifier can easily check whether the client does corresponding work or not according to the result. One of the core features of this scheme is asymmetry: the work is moderate for the requesting party and easy for the verifying party. It is different from the verification code, and the design starting point of the verification code is easy to be solved by human and not easy to be solved by a computer. The following describes the four steps S210-S240 in detail.
And S210, the node acquires the data record.
In the block chain, each node monitors the data records of the whole network and temporarily stores the data records which pass the basic validity verification.
S220, the node calculates the target value.
The node expends its own computational power trying different random numbers (nonces), performs the specified hash computation, and repeats the process until a reasonable random number is found, e.g., given a basic string "Hello, world! "the workload requirement given by the blockchain network is that an integer value called Nonce may be added after this string, SHA256 hash operation is performed on the changed (Nonce added) string, and if the target value is obtained that the hash result (expressed in 16-ary form) starts with" 0000", the verification is passed. In order to achieve the goal of workload certification, the node performing workload certification computation needs to continuously change the Nonce value and perform SHA256 hash operation on the obtained new character string. According to this rule, we need 4251 computations to find the hash with the first 4 bits being 0.
S230, the node generates block information.
And after finding out a reasonable random number, the node generates block information. Generating the block information includes: inputting block header information, and inputting block recording information into the generated block information. The block header information includes a version number, a hash value of the previous block, and the like. The tile record information includes a transaction list appended to the tile header information.
S240, the node broadcasts the block information.
After the node generates the block information, the block information is broadcast in the block chain network. After other nodes in the block chain network verify that the block information passes, the block information is connected into the block chain, the height of the main chain is increased by one, and then all the nodes in the block chain network are switched to the rear of the new block chain to continue carrying out workload proving calculation to generate new block information.
The workload is demonstrated in S220, and the node needs to continuously consume computing power to perform hash calculation to find the desired random number. If two nodes broadcast the block information at the same time, the nodes in the blockchain network determine which block constitutes the final blockchain according to the block information generation condition of the subsequent nodes, and how to select the block information is not limited in the present application.
The workload is mainly represented as follows: a block random number meeting the requirement is composed of N leading zeros, and the number of the zeros depends on the difficulty value of the network. To obtain a reasonable random number requires a large number of trial and error calculations, and the calculation time depends on the hash operation speed of the machine. When a node provides a reasonable random value, the node is actually subjected to a large number of trial and error calculations.
According to the consensus mechanism shown in fig. 2, each node needs to calculate the random value through the spelling calculation capability, which is a resource-consuming process. As blockchain technology evolves, more and more organizations are beginning to attach importance to and participate in the search for blockchain technology. The development ecology of the blockchain is gradually developed and enriched from the initial open-source communities with public-link projects such as bitcoin and ether house to various types of blockchain startup companies, capital investments, financial institutions, Information Technology (IT) enterprises and regulatory agencies. When the block chain technology is applied to the Internet of things, the equipment in the Internet of things is very sensitive to power consumption, so the workload proving mechanism restricts the development of the block chain Internet of things. In view of the above problems, the present application provides a consensus mechanism capable of reducing resource consumption.
Fig. 3 is a schematic diagram of a data processing method according to an embodiment of the present application. The schematic includes S310 and S320, which are described in detail below.
S310, the first node determines a first credit value of the first node.
Optionally, the first node determines, according to a consensus authentication record in a first blockchain network to which the first node belongs, a first credit value of the first node, where the first credit value is a credit value of the first node at a first time, and the first time may be a current time for calculating the credit value, or may be any time within a time period, and the first credit values of the first nodes are consistent during the time period.
Optionally, in some embodiments, the first node determining the first credit value comprises: and the first node determines an accumulation algorithm of the first credit value according to an accumulation mechanism of a consensus mechanism in the first block chain network to which the first node belongs, and calculates the first credit value according to the accumulation algorithm of the first credit value.
Optionally, in some embodiments, the first node calculates the first credit value in dependence on how much of the transaction amount the first node authenticates.
Optionally, in other embodiments, the first node determines the credit value that the first node can accumulate based on the transaction rate authenticated by the first node, and accumulates the first credit value based on the credit value that can accumulate.
Optionally, when the first node determines the credit value that the first node can accumulate according to the authenticated transaction amount or the transaction rate, the first node may use the specific gravity of the high-cost transaction, the medium-cost transaction or the low-cost transaction in the historical authentication transaction as the weight of the accumulated credit value to encourage the nodes in the blockchain network to process the low-cost small transaction.
For example, when the first node calculates the first credit value from the authentication record, the weight of the authenticated high-cost transaction in the accumulated calculation of the first credit value is 1/6, the weight of the authenticated high-cost transaction in the accumulated calculation of the first credit value is 1/3, and the weight of the authenticated low-cost transaction in the accumulated calculation of the first credit value is 1/2 in the historical authenticated transaction, so that when the credit value is calculated from the historical authenticated transaction, the larger occupation ratio of the low-cost transaction encourages the node to process small transactions with low costs, because the weight is more important in the subsequent calculation of the credit value.
It should be understood that the above-mentioned calculation of the first credit value by the first node according to the authentication record is only an example, and is not intended to limit the scope of the present application, and other methods capable of confirming the size of the first credit value are also within the scope of the present application.
Optionally, the determining, by the first node, the first credit value may be performed periodically, or may be a time for each node to calculate the credit value in the blockchain network, which is not limited in this application.
And S320, the first node performs workload certification calculation.
After the first node determines the first credit value, the first node determines the first credit value and a first preset threshold.
Optionally, in some embodiments, the first preset threshold may be a system-specified threshold.
Alternatively, in other embodiments, the first preset threshold may be a threshold agreed by each node in the blockchain network.
Optionally, in some embodiments, the first credit value is greater than the first preset threshold. In this case, the first node performs the workload proof calculation based on a first target value, which is a target value corresponding to a first difficulty, wherein the first difficulty is smaller than a second difficulty corresponding to the workload proof calculation based on the preset target value.
For example, if the first credit is 11 and the first predetermined threshold is 10, the first credit is greater than the first predetermined threshold. If the first node performs the workload proof calculation based on the preset target value, the proof verification is passed if the hash result calculated by the first node starts with "0000". The hash result starting with "0000" is the preset target value. Then, in the case where the first node performs the workload proof calculation based on the first target value, if the hash result calculated by the first node starts with "000", the workload proof can be obtained by the verification. The result starting with "000" is the first target value.
Optionally, before the first node performs the work amount calculation proof calculation based on the first target value, the first transaction information is received, where the first transaction information includes credit requirement value information, and the credit requirement information is used to indicate a credit value required for the first transaction information to be subjected to consensus confirmation by a node in the blockchain network, where the first transaction information may be the number of transactions included in the entire blockchain, the first transaction information is included in a blockhead in the blockchain, and the first node is capable of acquiring the first transaction information according to the blockhead.
Optionally, if the first node determines that the first credit value is greater than or equal to the credit value included in the first transaction information, the first node may compete with other nodes in the blockchain network for the consensus confirmation right of the first transaction information, and include the first transaction information in the generated block after obtaining the consensus confirmation right.
Optionally, in some embodiments, the first credit value is less than or equal to the first preset threshold. In this case, the first node performs the workload certification calculation based on a preset target value, which is a target value corresponding to the second difficulty.
For example, if the first credit is 9 and the first predetermined threshold is 10, the first credit is smaller than the first predetermined threshold. If the first node performs the workload proof calculation based on the preset target value, the proof verification is passed if the hash result calculated by the first node starts with "0000". The hash result starting with "0000" is the preset target value. Then, in the case where the first node performs the workload proof calculation based on the preset target value, it is necessary that the obtained hash result starts with "0000" in order to obtain the workload proof through the verification.
The first node has a higher difficulty in computing hash results beginning with "0000" than hash results beginning with "000". Therefore, the difficulty of the workload proof calculation of the first node based on the first target value is lower than the difficulty of the workload proof calculation of the first node based on the preset target value. Therefore, when the first node performs the workload proof calculation based on the first target value, the number of calculations may be less than the number of workload proof calculations performed by the first node based on the preset target value.
Optionally, in some embodiments, before the first node performs the workload proof calculation based on the first target value, the first node determines that the first node performs the workload proof calculation less than N times in succession based on the first target value, where N is an integer greater than 0.
For example, after the first node performs the workload proof calculation based on the first target value twice in succession, the system provides that even if the first credit value of the first node is greater than the first preset threshold value, the block information broadcasted after the first node performs the workload proof calculation based on the first target value again to obtain the consensus confirmation right will not be accepted by other nodes in the blockchain network.
Optionally, in other embodiments, before the first node performs the workload proof calculation based on the first target value, the first node determines that the first node performs the workload proof calculation continuously more than M times based on a preset target value, where M is an integer greater than 0.
For example, in the case that the first credit value of the first node is greater than the first preset threshold value after the first node performs the workload verification calculation based on the preset target value twice in succession, the first node may perform the workload verification calculation based on the first target value to obtain the consensus confirmation right.
Optionally, before the first node performs the workload proof calculation based on the first target value, the first node determines that the first node performs the workload proof calculation based on a preset target value or a second target value in Y time units, where a difficulty of performing the workload proof calculation based on the second target value is smaller than a difficulty of performing the workload proof calculation based on the preset target value and is greater than a difficulty of performing the workload proof calculation based on the first target value, where Y is an integer greater than 0. One time unit may be 1ms, 0.5ms, 2ms, 5ms, etc., and the specific length of the time unit is not limited in the embodiments of the present application. For example, with 1ms as a time unit, it may be determined that the first node may perform the workload proof calculation based on the first target value after the first node performs the workload proof calculation based on the preset target value or the second target value within 2 ms.
For example, after the first node performs the workload proof calculation based on the first target value for two consecutive time units, the system provides that even if the first credit value of the first node is greater than the first preset threshold, the first node performs the workload proof calculation based on the first target value again and obtains the consensus confirmation right, and then the broadcasted block information will not be accepted by other nodes in the block chain network.
Specifically, taking the blockchain network in fig. 1 as an example, the node 130a has been continuously performed twice, or when the workload proof calculation is performed in two consecutive time units, the obtained calculation result is a hash with the first 3 bits being 0, and the node 130a generates and broadcasts the block information after performing the workload proof calculation, then the node 130a performs the workload proof calculation and broadcasts the block information again with the obtained calculation result being a hash with the first 3 bits being 0, and other nodes (such as the nodes 130b to 130n shown in fig. 1) in fig. 1 will not receive the block information broadcast by the node 130 a.
Optionally, in order that the first node does not continuously perform the workload verification calculation based on the first target value, after the first node performs the workload verification calculation based on the first target value for the first time, the first credit value is subtracted by a corresponding amount to obtain a new credit value.
Alternatively, in some embodiments, the corresponding amount may be sized to a predetermined credit consumption value specified by the blockchain network.
Alternatively, in some embodiments, the corresponding amount may be a predetermined credit consumption value agreed between nodes in the blockchain network.
Alternatively, in some embodiments, the corresponding amount may be a credit value consumed by the first node in performing the workload attestation calculation to obtain the consensus confirmation right based on the first target value.
Optionally, the first node may include the information of the new credit value in the broadcasted block information, so that other nodes in the block chain network can know the new credit value of the first node, the first node may determine the new credit value and the first preset threshold before performing the workload proof calculation again, the workload proof calculation is similar to the method after determining the first credit value, and details are omitted here.
Optionally, after obtaining the consensus verification right to generate the block information, the first node broadcasts the first credit value in the network of the block chain to which the first node belongs, for example, adds the first credit value to the generated block information.
Alternatively, in some embodiments, the adding, by the first node, the first credit value to the generated block information may be to record the credit value in new block information each time the consensus verification right is obtained to generate new block information, and update its credit value.
Optionally, in some embodiments, the adding, by the first node, the first credit value to the generated block information may also be performed through a preset control mechanism, for example, periodically or after a credit value accumulation threshold is met, and the adding of the credit value is further performed, which is not limited in this application.
After the first node broadcasts the first credit value, other nodes in the block chain network to which the first node belongs can perform consensus authentication on the first credit value broadcast by the first node, namely, whether the first node can perform workload certification based on the first credit value is judged, and if the consensus authentication is passed, the whole network node receives a block generated by the first node performing workload certification based on the first credit value.
It should be understood that the first node may be any one of the nodes 130 in the blockchain network shown in fig. 1, and the scope of protection of the present application is not limited thereto.
Fig. 4 is a schematic diagram of another data processing method provided in the embodiment of the present application. The schematic includes steps S410-S420, which are described in detail below.
S410, the first node determines a third credit value and a fourth credit value.
The first node determines a third credit value, wherein the third credit value is a credit value of a second node, and the second node is any one node except the first node in the block chain network;
the first node determines a fourth credit value, wherein the fourth credit value is a credit value of a third node, and the third node is any one node except the first node and the second node in the block chain network.
And S420, the first node sends the transaction information.
Optionally, in some embodiments, the first node sends the transaction information to the second node if it is determined that the third credit value is higher than the fourth credit value, for example, if the first node determines that the third credit value of the second node is 2, the first node determines that the fourth credit value of the third node is 1, the first node may send the transaction information only to the second node.
Optionally, in some embodiments, the first node sends the transaction information to the second node if it is determined that the third credit value is higher than the fourth credit value, and sends the transaction information to the third node after sending the transaction information to the second node, for example, if the first node determines that the third credit value of the second node is 2, and the first node determines that the fourth credit value of the third node is 1, the first node may send the transaction information to the third node after sending the transaction information to the second node.
Fig. 5 is a schematic diagram of another data processing method according to an embodiment of the present application. The schematic includes steps S510-S520, which are described in detail below.
S510, the first node sends a joining request message to the second node.
When a first node wishes to join a new blockchain (a second blockchain network), the first node sends a join request message to a second node, wherein the first node belongs to the first blockchain network and the second node belongs to the second blockchain network.
Optionally, in some embodiments, the first node sends the join request message to the second node.
Optionally, in some embodiments, the first node sends the join request message to a plurality of nodes in the second blockchain network, and the second node obtains the consensus confirmation right of the join request message.
Optionally, in some embodiments, the first node broadcasts the join request message in a second blockchain network to which the second node belongs, and the second node obtains the consensus confirmation right of the join request message.
Optionally, in some embodiments, the first node adds the credit value of the first node in the first blockchain network (i.e. the blockchain to which the first node currently belongs) to the join request message.
Optionally, in some embodiments, the first node provides, in the join request message, the block information in the first blockchain network where the current credit value of the first node is located. The block information is used for the second node of the consensus authentication in the second block chain to inquire the credit value of the first node.
Optionally, in some embodiments, the first node provides, in the join request message, block information in the credit statistics block chain network in which the current credit value of the first node is located. The block information is used for the second node of the consensus authentication in the second block chain to inquire the credit value of the first node.
Optionally, in some embodiments, when the first node requests to join the second blockchain network, the first node may pay a cost of the join request message to the second blockchain network.
Optionally, in some embodiments, the first node may pay the above fee by including the fee in the join request message, where the request fee may be an actual fee or may be an indirect fee, the actual fee may be how many bitcoins or ethernet coins are used as the transaction fee, and the indirect fee may be a portion of the obtained authentication fee that is given to the authentication node in the second blockchain network that performs the consensus authentication on the join request message at that time according to a certain proportion when the first node joins the second blockchain network within a certain time.
S520, the second node acquires the credit value of the first node.
Optionally, in some embodiments, the join request message sent by the first node includes a credit value of the first node, and the second node may obtain the credit value of the first node when receiving the join request message.
Optionally, in other embodiments, the second node sends, according to the join request message that includes the block information that records the credit value of the first node in the first blockchain network to which the first node belongs, an inquiry request message to the first blockchain network to which the first node belongs, the fourth node may send, to the second node, inquiry response information that includes the credit value, the second node acquires the credit value of the first node according to the inquiry response information, and the fourth node is any node in the first blockchain network except for the first node.
Optionally, in other embodiments, the second node sends, according to the join request message that includes the block information of the first node in the credit statistics block chain network, where the block information records the credit value in the credit statistics block chain network, an inquiry request message to the credit statistics block chain network, and a third node in the credit statistics block chain network sends an inquiry response message, where the inquiry response message includes the credit value, and the second node obtains the credit value of the first node according to the inquiry response message, and the third node is any one node in the credit statistics block chain network.
Optionally, the obtaining, by the second node, the consensus confirmation right of the join request message of the first node before obtaining the credit value of the first node includes:
optionally, in some embodiments, the first node broadcasts the join request message in a second blockchain network to which the second node belongs, and then all nodes in the second blockchain network know the join request message of the first node.
Optionally, in other embodiments, the first node sends the join request message to a plurality of nodes in the second blockchain network, and then the plurality of nodes all know the join request message of the first node.
When all the nodes or the plurality of nodes in the second blockchain network perform consensus authentication on the join request message of the first node, the authentication competition manner among all the nodes or the plurality of nodes in the second blockchain may be that according to the method shown in fig. 3, the node with a high credit value performs low-difficulty workload certification calculation to obtain the join request message authentication of the first node, for example, the join request message consensus authentication right of the first node is obtained when the current credit value of the second node in the second blockchain is higher.
Optionally, in some embodiments, the second node may also obtain the consensus authentication without contention. For example, the first node sends a join request message only to the second node, which agrees to acknowledge the join request message.
Optionally, after the second node confirms the consensus of the join request message of the first node, the second node sends an authentication confirmation message to the first node.
Optionally, in some embodiments, the second node sends an authentication confirmation message to the first node, and confirms that the first node may join the second blockchain network to which the second node belongs.
Optionally, in some other embodiments, the second node broadcasts the authentication confirmation message in the second blockchain network, and the first node queries the authentication confirmation message in the second blockchain network to confirm to join the second blockchain network.
Optionally, after the second node completes authenticating the join request message of the first node, the second node needs to notify other nodes in the second blockchain network of the authentication result.
Optionally, in some embodiments, the second node may add the obtained credit value of the first node to the generated block information, and broadcast the block information in the second blockchain network. The other nodes in the second blockchain may determine that the second node has completed authentication with the first node in the event that it determines that the blocking information broadcast by the second node is received.
Optionally, in other embodiments, the second node determines the credit value of the first node, and the information is input into the block information generated by the second node and broadcast. Optionally, in other embodiments, there may be X nodes in the second blockchain network for authenticating the join request message of the first node. The second node is one of the X nodes.
Optionally, in some embodiments, the first node can only acknowledge the join if each of the X nodes sends an authentication acknowledgement message.
Optionally, in other embodiments, a node greater than or equal to a certain percentage (e.g., 51%) of X nodes in the second blockchain network sends an authentication confirmation message, and the first node can confirm the joining, where X is an integer greater than or equal to 1.
Optionally, in other embodiments, several nodes in the X nodes in the second blockchain network sequentially acknowledge, and then the last node sends the authentication acknowledgement message as if, for example, assuming that there are 3 nodes in the second blockchain network, node 1 acknowledges joining, then node 2 acknowledges, node 2 acknowledges joining, then node 3 acknowledges, and after node 3 acknowledges joining, node 3 sends the authentication acknowledgement message as if. If node 1 acknowledges that it cannot join, node 2 does not need to acknowledge.
Optionally, in other embodiments, the authentication confirmation message may be sequentially confirmed by each node of the X nodes in the second blockchain, most nodes of the X nodes in the second blockchain network, or several nodes of the X nodes in the second blockchain network, and then the last node broadcasts in the second blockchain network, and the first node may obtain the authentication confirmation message by querying from the second blockchain network.
Optionally, in some embodiments, the authentication confirmation message may be sequentially confirmed by each of the X nodes in the second blockchain, most of the X nodes in the second blockchain network, or several of the X nodes in the second blockchain network, and then the last node is directly sent to the first node.
Optionally, after the first node obtains the authentication confirmation message, the authentication of the join request message of the first node is successful, the first node may join the second blockchain network as a new blockchain link point, and after the initial credit value calculation, the first node determines the current initial credit value of the first node in the second blockchain.
Optionally, in some embodiments, the first node initial credit value calculation may be an initial credit value determined by averaging or accumulating credit values provided by nodes sending authentication confirmation messages in each of the X times of consensus authentications.
Optionally, the first node determines whether the Nonce calculation difficulty may be reduced according to the initial credit value, so as to obtain the block consensus validation right in the second block chain network, specifically, the first node may determine the consensus validation right in the second block chain network according to the method provided in fig. 3, which is not described herein again.
Optionally, in some embodiments, the first node may join the second blockchain network directly after sending the join request message.
Fig. 6 is a schematic diagram of another data processing method according to an embodiment of the present application. The schematic includes S610-S640, which are described in detail below.
S610, the first node sends a joining request message to the second node.
The joining request message is used for requesting to join the second block chain network, and the second node receives the joining request message sent by the first node. The join request message includes credit information indicating a credit value of the first node in a first blockchain network, wherein the second node is one node in a second blockchain network, and the first node is one node in the first blockchain network. And the second node acquires the credit value of the first node in the first block chain network according to the credit information.
Optionally, in some embodiments, the first node sends the join request message to the second node.
Optionally, in some embodiments, the first node broadcasts the join request message in a second blockchain network to which the second node belongs, and the second node obtains the consensus confirmation right of the join request message.
Optionally, in some embodiments, the join request message includes a credit value of the first node in the first blockchain network.
Optionally, in other embodiments, the join request message includes block information of the first node in the first blockchain network to which the first node records the credit value, and the second node may send an inquiry request message to the first blockchain network according to the target block information, where the inquiry request message is used to request to acquire the credit value.
S620, the first node sends the signaling statistics information to the third node.
The credit statistics are used to calculate a credit value for the first node. The third node is any one node in the credit statistics block chain network.
And the third node determines the credit value of the first node according to the credit statistical information.
For example, the credit statistics block chain may require the first node to provide information such as transaction cost of the first node, number of blocks authenticated, number of transactions in blocks authenticated, etc. The first node may send provisioning required information for the credit statistics blockchain to nodes in the credit statistics blockchain. The information required to be provided by the credit statistic block chain is the credit statistic information.
Optionally, in some embodiments, the first node may periodically send the credit statistics to nodes in the credit statistics block chain.
Optionally, in other embodiments, the first node may send the credit statistics information to nodes in the credit statistics block chain based on being triggered by an event.
For example, the first node sends the credit statistics to the third node upon determining that the number of authenticated transactions increases beyond a certain number. For another example, the first node may send the credit statistics to the third node after obtaining consensus confirmation. For another example, the first node may send the credit statistics to the third node if it is determined that the credit value of the first node is above a preset threshold.
Optionally, in some embodiments, the first node may broadcast the credit statistics information to the credit statistics block chain by a broadcast method.
Alternatively, in other embodiments, the first node may send the credit statistics directly to one or more nodes in the credit statistics broadcast, and the one or more nodes may then broadcast the credit statistics in the credit statistics block chain.
The node in the credit statistics block chain that receives the credit statistics information sent by the first node may perform consensus authentication based on the credit statistics information and the credit value thereof to compete for the consensus confirmation right of the credit statistics information, and optionally may compete in a workload certification calculation manner shown in fig. 3, which is not repeated here, for example, the third node in the credit statistics block chain is a node that obtains the consensus confirmation right.
The third node may determine, based on a preset algorithm, the credit degree of the first node in the credit statistics block chain according to the credit degree statistics information, and perform consensus authentication and maintenance. The predetermined algorithm may be a set of accumulation mechanisms that are known per se through the credit statistics blockchain, for example, to determine the credit rating of a node based on the number of transactions that the node has been authenticated for. As another example, the credit for a node may be determined based on a transaction rate for the node.
S630, the second node sends a query request message to the third node.
The query request message is used for querying the credit value of the first node. And the second node in the second block chain network acquires the consensus confirmation right and authenticates the join request message of the first node.
Optionally, in some embodiments, the join request message sent by the first node includes a credit value of the first node, and the second node may obtain the credit value of the first node when receiving the join request message.
Optionally, in other embodiments, the second node sends, according to the join request message that includes the block information that records the credit value of the first node in the first blockchain network to which the first node belongs, an inquiry request message to the first blockchain network to which the first node belongs, the fourth node may send, to the second node, inquiry response information that includes the credit value, the second node acquires the credit value of the first node according to the inquiry response information, and the fourth node is any node in the first blockchain network except for the first node.
Optionally, in other embodiments, the second node sends, according to the join request message that includes the block information of the first node in the credit statistics block chain network, where the block information records the credit value in the credit statistics block chain network, an inquiry request message to the credit statistics block chain network, and a third node in the credit statistics block chain network sends an inquiry response message, where the inquiry response message includes the credit value, and the second node obtains the credit value of the first node according to the inquiry response message, and the third node is any one node in the credit statistics block chain network.
Optionally, in some embodiments, the second node may pay a query fee to the credit statistics blockchain or the first blockchain network. And the second node confirms the joining request message of the first node under the condition of inquiring the credit degree of the first node, and adds indication information for authenticating the joining request message of the first node in a newly broadcasted block.
Optionally, the second node sends the query request message by broadcasting in the credit statistics block chain network or the first block chain network, and then the node in the credit statistics block chain network or the first block chain network performs consensus authentication on the query request message, for example, a third node in the credit statistics block chain network or the first block chain network obtains the consensus right of the second node sending the query request message.
Optionally, the third node directly sends the current credit value information of the first node to the second node, or the third node broadcasts the current credit value information of the first node, and the second node queries in the first block chain network of the credit statistics block chain network to obtain the current credit value of the first node.
The second node can complete a consensus authentication process through the three steps (receiving a join request message sent by the first node, sending an inquiry request message to the third node, and receiving the current credit value of the first node sent by the third node).
Optionally, in some embodiments, the first node may perform the above-mentioned consensus authentication process with other nodes in the second blockchain network. The first node and the node in the second blockchain can perform X times of consensus authentication processes. It is to be understood that the X consensus authentication processes are performed by X different nodes in the second blockchain.
And S640, the first node acquires the authentication confirmation message.
Optionally, in some embodiments, the second node sends an authentication confirmation message to the first node. The join acknowledgement message is used to acknowledge that the first node can join the blockchain network.
Optionally, in some other embodiments, the second node broadcasts the authentication confirmation message in the second blockchain network to which the second node belongs. The first node may query the second blockchain network for the authentication confirmation message.
Optionally, in some embodiments, in a case that the first node performs X times of consensus authentication with X nodes in the second blockchain, the node that sends the acknowledgement message to the first node is the node that performs the last consensus authentication. Obviously, in the embodiment shown in fig. 6, the second node is taken as the node of the last consensus authentication in the case of performing X consensus authentications.
Optionally, in other embodiments, if the first node performs consensus authentication with only one node in the second blockchain network, the authentication confirmation message is sent by the node performing the consensus authentication.
Optionally, the first node may periodically count its transaction authentication records in the old and new blockchains, and send the transaction authentication records to the credit statistics blockchain for credit confirmation and recording.
Optionally, when a node sends transaction data in the blockchain network for blockchain authentication, the node may assist in the transaction data with a "credit" requirement indication indicating that the relevant transaction is required for credit for authentication by the blockchain network node.
Fig. 7 is a schematic diagram of another data processing method according to an embodiment of the present application. The schematic includes steps S710-S720, which are described in detail below.
S710, the blockchain network determines credit values for a plurality of nodes.
Optionally, in some embodiments, the blockchain network determines credit values for a plurality of nodes, including: the method comprises the steps that a first node acquires credit values of N nodes in a block chain network, wherein the first node is any one node in the block chain network, the credit values of the N nodes are the credit values acquired by the first node respectively, and N is a positive integer. For example, there are 10 nodes in the block chain network, and the credit values of 5 nodes in the 10 nodes obtained by the first node are 1, 2, 3, 4, and 5, respectively. The first node is any one of the nodes in the blockchain network. In other words, any one node in the blockchain network needs to perform the action performed by the first node.
Optionally, in other embodiments, the blockchain network determines credit values for a plurality of nodes, including: the method includes the steps that M nodes in the blockchain network acquire credit values of the N nodes in the blockchain network, wherein the M nodes are any M nodes in the blockchain network, the credit values of the N nodes are the average value of M times of credit values acquired by the M nodes, or the credit values of the N nodes are the maximum value of the M times of credit values acquired by the M nodes, and M, N is a positive integer. For example, there are 10 nodes in the block chain network, the first node obtains the credit values of 5 nodes of the 10 nodes as 1, 2, 3, 4, and 5, respectively, and the second node obtains the credit values of the 5 nodes of the 10 nodes as 2, 3, 4, 5, and 6, respectively, so that the credit values of the 5 nodes are 1.5, 2.5, 3.5, 4.5, and 5.5, respectively, or the credit values of the 5 nodes are 2, 3, 4, 5, and 6, respectively.
It should be understood that the form of 5 of the above 10 nodes is an example form, and the credit values of all the nodes in the blockchain network can be obtained according to the above method.
S720, determining a workload certification calculation algorithm.
Optionally, the current credit values of all nodes in the blockchain network are greater than the first preset threshold, where the credit values of all nodes may be determined in S710, and then the blockchain network determines that the first credit value is greater than the first preset threshold, for example, there are 10 nodes in the blockchain network, and the current credit values of the 10 nodes are greater than the first preset threshold, and the blockchain network determines that the first credit value is greater than the first preset threshold.
Optionally, if the current credit values of some nodes in the blockchain network are all greater than the first preset threshold, where the credit values of the some nodes may be determined in S710, the blockchain network determines that the first credit value is greater than the first preset threshold, where some nodes may be more than half of the nodes specified by the system, for example, there are 10 nodes in the blockchain network, where the current credit values of 6 nodes are all greater than the first preset threshold, and the blockchain network determines that the first credit value is greater than the first preset threshold.
Optionally, when a ratio of the number of nodes in the blockchain network whose current credit values are larger than a first preset threshold to the number of all nodes in the blockchain network is larger than a third preset value, the blockchain network determines that the first credit value is larger than the first preset threshold, for example, 10 nodes in the blockchain network have current credit values of 6 nodes that are larger than the first preset threshold, where the ratio is 0.6, and may determine that the first credit value is larger than the first preset threshold when the ratio is larger than 0.5.
Optionally, in some embodiments, when the blockchain network determines that the first credit value is greater than the first preset threshold, optionally, a one-time reduction in the complexity of the full-network proof of workload computation algorithm may be performed.
Optionally, in some embodiments, when the blockchain network determines that the first credit value is greater than the first preset threshold, only nodes with credits above the first preset threshold may be allowed to perform one reduction in the complexity of the network-wide workload proof calculation algorithm. And after the subsequent difficulty is recovered, the blockchain network starts to accept the participation of the new low-credit node.
It should be understood that the first node in fig. 3-7 may be the same node or one node in a blockchain network may perform the actions of the first node in fig. 3-7.
Fig. 8 shows a schematic block diagram of a data processing apparatus 500 of an embodiment of the present application. The apparatus shown in fig. 8 may be applied to a blockchain network, where the blockchain network may include a plurality of apparatuses 500, and each node in the blockchain network may be composed of one or more apparatuses 500, where the apparatus 500 includes: a sending module 501, a receiving module 502 and a processing module 503.
A sending module 501, configured to send information.
For example, the method is used for the first node to send a join request message to the blockchain network to which the second node belongs, or for the first node to send credit statistics information to the credit statistics blockchain network, or for the second node to send query request information to the credit statistics blockchain network, or for the second node to send/broadcast an authentication confirmation message to/at the blockchain network to which the first node belongs, or for the third node to send/broadcast query feedback information to/at the credit statistics blockchain network to which the second node belongs.
A receiving module 502 is configured to receive information.
For example, for the first node to receive/query the authentication confirmation message in the blockchain network, or for the second node to receive/query the query feedback information in the blockchain network, or for the third node to receive/query the credit statistics information of the first node in the credit statistics blockchain network, or for the third node to receive/query the second node in the credit statistics blockchain network to send the query request message.
The processing module 503 includes a determination unit, a calculation unit, a generation unit, and the like for processing information.
For example, the determining unit is configured to determine, by the first node, a first credit value of the first node, or determine credit values of other nodes in the blockchain network to which the first node belongs, or determine, by the first node, that the first credit value is greater than or equal to a credit value included in the first transaction information, or determine, by the first node, that the workload proof calculation is no longer performed based on the first target value in a competition of consensus confirmation rights in N blocks/Y time units after the workload proof calculation is performed based on the first target value; the second node determines the credit value of the first node according to the credit information sent by the first node. The method is used for the third node to determine the credit value of the first node according to the credit statistical information sent by the first node.
For example, the calculation unit is configured to, by the first node, perform the workload proof calculation based on a first target value if the first credit value is greater than a first preset threshold, or perform the workload proof calculation based on the preset target value if the second credit value is less than or equal to the first preset threshold, or perform the workload proof calculation by the second node or a third node.
For example, the generating unit is configured to generate new block information by the first node, the second node, or the third node, and broadcast the new block information to the affiliated blockchain network.
Fig. 9 shows a schematic block diagram of a data processing apparatus 600 of an embodiment of the present application. The apparatus 600 as shown in fig. 9 may comprise a processing unit 601 and a communication unit 602.
Optionally, in some embodiments, the apparatus 600 may be a first node described in the above processing method, for example, the apparatus 600 may be configured as the first node. As another example, the apparatus 600 itself is the first node. As another example, the first node may be configured with the apparatus 600. The apparatus 600 may perform the actions or processes performed by the first node in the methods described above. Here, detailed description thereof is omitted in order to avoid redundancy.
Optionally, in other embodiments, the apparatus 600 may be the first node described in the above processing method, for example, the apparatus 600 may be configured as the second node. As another example, the apparatus 600 itself is the second node. As another example, the second node may be configured with the apparatus 600. The apparatus 600 may perform the actions or processes performed by the second node as in the above-described method. Here, detailed description thereof is omitted in order to avoid redundancy.
The apparatus 600 may be the third node described in the above processing method, for example, the apparatus 600 may be configured as the first node. As another example, the apparatus 600 itself is the third node. As another example, the first node may be configured with the apparatus 600. The apparatus 600 may perform actions or processes as performed by the third node in the above-described method. Here, detailed description thereof is omitted in order to avoid redundancy.
Optionally, the apparatus 600 further comprises a storage unit, which is communicatively connected to the processing unit. The data processing apparatus according to the embodiment of the present application is further described below with reference to fig. 10.
Fig. 10 is a block diagram of another data processing apparatus provided in an embodiment of the present application. The data processing apparatus 700 as shown in fig. 10 comprises a memory 701 and a processor 702.
A memory 701 for storing a program.
A processor 702 configured to execute the program stored in the memory 701, wherein when the program is executed, the switching device 700 is enabled to implement the method provided in the embodiments of fig. 2-7.
Some or all of the methods shown in fig. 2-7 may be implemented in software using switching device 700.
The memory 701 may be a physically separate unit or may be integrated with the processor 702.
Alternatively, when some or all of the methods shown in fig. 2-7 are implemented in software, switching device 700 may include only processor 702. A memory 701 for storing programs is located outside the device 700 and a processor 702 is connected to the memory 701 by means of circuits/wires for reading and executing programs stored in the memory 701.
The processor 702 may be a Central Processing Unit (CPU), a Network Processor (NP), or a combination of a CPU and an NP.
The processor 702 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof.
Memory 701 may include volatile memory (volatile memory), such as random-access memory (RAM); the memory 701 may also include a non-volatile memory (non-volatile memory), such as a flash memory (flash memory), a Hard Disk Drive (HDD) or a solid-state drive (SSD); the memory 701 may also comprise a combination of memories of the kind described above.
Yet another aspect of the present application provides a computer-readable storage medium having stored therein instructions, which when executed on a computer, cause the computer to perform the steps performed by the first node in the method as described above in fig. 3-8.
Yet another aspect of the present application provides a computer-readable storage medium having stored therein instructions, which when executed on a computer, cause the computer to perform the steps performed by the second node in the method as described above in fig. 4-6.
Yet another aspect of the present application provides a computer-readable storage medium having stored therein instructions, which, when executed on a computer, cause the computer to perform the steps performed by the third node in the method as shown in fig. 6.
A further aspect of the application provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the steps performed by the first node in the method as shown in fig. 3-7.
A further aspect of the application provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the steps performed by the second node in the method as shown in fig. 4-6.
Yet another aspect of the application provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the steps performed by the third node in the method as shown in fig. 6.
It should be noted that the above-described method embodiments may be applied in 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 embodiments 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, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, or discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application 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 application 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.
It will be appreciated that the memory in the embodiments of the subject application can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of example, but not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), Double Data Rate Synchronous Dynamic random access memory (DDR SDRAM), Enhanced Synchronous SDRAM (ESDRAM), Synchronous link SDRAM (SLDRAM), and Direct Rambus RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
It should be understood that the term "and/or" herein is merely one type of association relationship that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
It should be understood that, in various embodiments of the present application, the sequence numbers of the above-mentioned processes do not imply an order of execution, and the order of execution of the processes should be determined by their functions and inherent logic, and should not limit the implementation processes of the embodiments of the present application.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (28)

  1. A method of processing data, the method comprising:
    a first node determines a first credit value of the first node, wherein the first node is a node in a block chain network;
    and the first node performs workload certification calculation based on a first target value under the condition that the first credit value is determined to be greater than a first preset threshold value, wherein the first target value is a target value corresponding to a first difficulty, and the first difficulty is smaller than a second difficulty corresponding to the workload certification calculation based on the preset target value.
  2. The method of claim 1, wherein the method further comprises:
    the first node determining a second credit value for the first node;
    and the first node performs workload certification calculation based on the preset target value under the condition that the second credit value is determined to be less than or equal to the first preset threshold value.
  3. The method of claim 1 or 2, wherein the method further comprises:
    the first node determines a third credit value, wherein the third credit value is a credit value of a second node, and the second node is any one node except the first node in the block chain network;
    the first node determines a fourth credit value, wherein the fourth credit value is a credit value of a third node, and the third node is any one node except the first node and the second node in the block chain network;
    the first node sends transaction information to the second node if it is determined that the third credit value is higher than the fourth credit value.
  4. The method of claim 1 or 2, wherein the method further comprises:
    the first node determines a third credit value, wherein the third credit value is a credit value of a second node, and the second node is any one node except the first node in the block chain network;
    the first node determines a fourth credit value, wherein the fourth credit value is a credit value of a third node, and the third node is any one node except the first node and the second node in the block chain network;
    the first node sends transaction information to the second node if it is determined that the third credit value is higher than the fourth credit value, and sends the transaction information to the third node after sending the transaction information to the second node.
  5. The method of any of claims 1 to 4, wherein prior to the first node determining the first credit value, the method further comprises:
    the first node sends a join request message to X nodes in the block chain network, wherein the join request message comprises credit degree information, the credit degree information is used for indicating the latest credit value of the first node, and X is an integer greater than or equal to 1.
  6. The method of claim 5, wherein the method further comprises:
    the first node receives an authentication confirmation message sent by at least one node in the X nodes and joins the blockchain network, wherein the authentication confirmation message is used for indicating that the first node can join the blockchain network; alternatively, the first and second electrodes may be,
    and the first node inquires the authentication confirmation message from the blockchain network and joins the blockchain network, wherein the authentication confirmation message is used for confirming that the first node can join the blockchain network.
  7. The method of any of claims 1 to 6, further comprising:
    the first node sends credit statistics information to nodes in a credit statistics blockchain network.
  8. The method of any of claims 1 to 7, wherein the first node performing a workload attestation calculation based on a first target value comprises:
    the first node performs workload certification calculation based on a first target value to obtain a consensus confirmation right;
    the first node generates a target block.
  9. The method of claim 8, wherein the target block comprises a fifth credit value, the fifth credit value being a difference between the first credit value and a predetermined credit consumption value.
  10. The method of claim 9, wherein the predetermined credit consumption value is a predetermined credit value consumed by the first node in performing a workload proving calculation based on a first target value to obtain a consensus validation authority.
  11. The method according to any of claims 8 to 10, wherein the target block further comprises a height difference indicating a block height difference between a block from which the first node last obtained the consensus confirmation right based on the first target value and a block from which the first node currently obtained the consensus confirmation right based on the first target value.
  12. The method of any of claims 1 to 11, further comprising:
    the first node receives first transaction information in the blockchain network, wherein the first transaction information comprises credit requirement value information, and the credit requirement information is used for indicating a credit value required by the first transaction information for consensus confirmation by the blockchain nodes.
  13. The method of claim 12, wherein the method further comprises:
    the first node determines that the first credit value is greater than or equal to a credit value required for consensus confirmation of the first transaction message by the block link point;
    the first node determines that the first transaction information is contained in the generated block.
  14. The method of any one of claims 1 to 13, further comprising:
    after the first node performs workload proving calculation based on the first target value to obtain the consensus confirmation right, the first node determines that the workload proving calculation is no longer performed based on the first target value in the competition of the consensus confirmation rights of the next N blocks; alternatively, the first and second electrodes may be,
    after the first node performs workload proving calculation based on the first target value to obtain the consensus confirmation weight, the first node determines that the workload proving calculation is no longer performed based on the first target value in competition of the consensus confirmation weights of the blocks in the following Y time units; alternatively, the first and second electrodes may be,
    after the first node performs workload proving calculation based on a first target value to obtain a consensus confirmation right, the first node determines that the workload proving calculation is performed based on a preset target value or a second target value in competition of the consensus confirmation rights of the next N blocks, wherein the second target value is a target value corresponding to a third difficulty, and the third difficulty is smaller than the second difficulty and larger than the first difficulty; alternatively, the first and second electrodes may be,
    after the first node performs workload certification calculation based on a first target value to obtain a consensus confirmation right, the first node determines that the workload certification calculation is performed based on the preset target value or the second target value in competition of the consensus confirmation right in subsequent Y time units; wherein said N and said Y are positive integers.
  15. A method of processing data, the method comprising:
    a second node receives a join request message sent by a first node, wherein the join request message comprises credit degree information, the credit degree information is used for indicating a credit value of the first node in a first block chain network, the second node is one node in a second block chain network, and the first node is one node in the first block chain network;
    and the second node acquires the credit value of the first node in the first block chain network according to the credit information.
  16. The method of claim 15, wherein the credit information is a credit value of the first node in a first blockchain network, and wherein the second node obtains the credit value of the first node in the first blockchain network according to the credit information comprises:
    and the second node acquires the credit value according to the credit information.
  17. The method of claim 15, wherein the credit information comprises target block information in a target block chain network recording the credit value, and the second node acquires the credit value of the first node in the first block chain network according to the credit information comprises:
    the second node sends a query request message to the target block chain network according to the target block information, wherein the query request message is used for requesting to acquire the credit value;
    and the second node receives inquiry response information sent by a third node, wherein the inquiry response information comprises the credit value, and the third node is one node in the target block chain network.
  18. A method of processing data, the method comprising:
    a third node receives credit statistic information sent by a first node, wherein the third node is a node in a credit statistic block chain network;
    and the third node determines the credit value of the first node according to the credit statistical information.
  19. The method of claim 18, wherein the method further comprises:
    the third node receives a query request message sent by a second node, wherein the query request message is used for requesting to acquire a credit value of the first node, and the second node is a node in a second block chain network;
    and the third node sends inquiry feedback information to the second node, wherein the inquiry feedback information comprises the credit value of the first node.
  20. A method of processing data, the method comprising:
    a first node acquires credit values of N nodes in a first block chain network, wherein the first node is any one node in the first block chain network, and N is a positive integer;
    the first node determines, according to credit values of the N nodes in the first blockchain network, to perform workload certification calculation using a first scheme or to perform workload certification calculation using a second scheme, where performing the workload certification calculation using the first scheme is to perform the workload certification calculation based on a first target value, where the first target value is a target value corresponding to a first difficulty, and performing the workload certification calculation using the second scheme is to perform the workload certification calculation based on a preset target value, where the preset target value is a target value corresponding to a second difficulty, and the first difficulty is smaller than the second difficulty.
  21. The method of claim 20, wherein the first node determining whether to perform the workload proof calculation using a first scheme or to perform the workload proof calculation using a second scheme based on the credit values of the N nodes in the first blockchain network comprises:
    the first node determines to adopt the first scheme to perform the workload certification calculation under the condition that the credit values of the N nodes in the first block chain network are all larger than a first preset threshold value;
    and the first node determines to adopt the second scheme to perform the workload certification calculation under the condition that the credit values of M nodes in the first block chain network are determined to be less than or equal to the first preset threshold, wherein M is a positive integer greater than or equal to 0 and less than or equal to N.
  22. The method of claim 21, wherein the first node determining whether to perform the workload proof calculation using the first scheme or the workload proof calculation using the second scheme based on the credit values of the N nodes in the first blockchain network comprises:
    the first node determines to adopt the first scheme to perform the workload certification calculation under the condition that the ratio of the number of nodes with credit values larger than a first preset threshold value in the first blockchain network to the number of all nodes in the first blockchain network is larger than a third preset value, or the number of nodes with credit values larger than the first preset threshold value in the first blockchain network is larger than a fourth preset value;
    and the first node determines to adopt the second scheme to carry out the workload certification calculation under the condition that the ratio of the number of nodes with the credit value larger than the first preset threshold value in the first blockchain network to the number of all nodes in the first blockchain network is smaller than or equal to a third preset value, or the number of nodes with the credit value larger than the first preset threshold value in the first blockchain network is smaller than or equal to a fourth preset value.
  23. An apparatus for processing data, the apparatus being a first node in a blockchain network, the apparatus being configured to perform the units of the method of processing data according to any one of claims 1 to 14.
  24. An apparatus for processing data, the apparatus being a second node in a blockchain network, the apparatus being configured to perform the units of the method of processing data according to any one of claims 15 to 17.
  25. An apparatus for processing data, the apparatus being a third node in a credit statistics blockchain network, the apparatus being configured to perform the means of the method of processing data according to claim 18 or 19.
  26. An apparatus for processing data, the apparatus being a first node in a blockchain network, the apparatus being configured to perform the units of the method of processing data according to any one of claims 20 to 22.
  27. An apparatus for processing data, comprising:
    a memory for storing a computer program;
    a processor for executing a computer program stored in the memory to cause the apparatus to perform a method of processing data as claimed in any one of claims 1 to 22.
  28. A computer-readable storage medium comprising a computer program which, when run on a computer, causes the computer to perform a method of processing data according to any one of claims 1 to 22.
CN201880089370.3A 2018-02-14 2018-02-14 Method and device for processing data and equipment for processing data Active CN111713088B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/076882 WO2019157740A1 (en) 2018-02-14 2018-02-14 Method for processing data, apparatus for processing data and device for processing data

Publications (2)

Publication Number Publication Date
CN111713088A true CN111713088A (en) 2020-09-25
CN111713088B CN111713088B (en) 2022-03-01

Family

ID=67619109

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201880089370.3A Active CN111713088B (en) 2018-02-14 2018-02-14 Method and device for processing data and equipment for processing data

Country Status (2)

Country Link
CN (1) CN111713088B (en)
WO (1) WO2019157740A1 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111127144A (en) * 2019-12-16 2020-05-08 中国联合网络通信集团有限公司 User credit evaluation method, device and storage medium
CN111242718B (en) * 2019-12-18 2024-01-19 深圳大学 Block chain-based data transaction method, device, equipment and medium
CN111199504B (en) * 2019-12-29 2023-09-26 杭州拓深科技有限公司 Block chain-based decentralization fire control maintenance supervision method
CN113127560A (en) * 2019-12-31 2021-07-16 航天信息股份有限公司 Competition accounting method and device
CN112632610A (en) * 2020-12-28 2021-04-09 杭州趣链科技有限公司 Private data processing method, device and system
CN112954037A (en) * 2021-02-03 2021-06-11 中国互联网络信息中心 Domain name abuse processing method and system based on alliance chain
CN114867016A (en) * 2021-02-03 2022-08-05 北京邮电大学 Node authentication method, system and device
CN112988893B (en) * 2021-03-15 2023-05-12 中国联合网络通信集团有限公司 Information management method, system, block chain node and medium based on block chain

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150220918A1 (en) * 2014-02-04 2015-08-06 Lenovo (Singapore) Pte. Ltd. Biometric account card
CN105488722A (en) * 2015-11-30 2016-04-13 布比(北京)网络技术有限公司 Asset data processing method and device based on derivation chain
US20160328713A1 (en) * 2015-05-05 2016-11-10 ShoCard, Inc. Identity Management Service Using A Blockchain Providing Identity Transactions Between Devices
CN106453286A (en) * 2016-09-27 2017-02-22 北京天德科技有限公司 Reputation method and system based on block chain
CN106651346A (en) * 2016-11-28 2017-05-10 上海凯岸信息科技有限公司 Block chain-based credit investigation data sharing and trading system
CN106878396A (en) * 2017-01-19 2017-06-20 布比(北京)网络技术有限公司 The processing method of trade information, device and system
CN107067242A (en) * 2017-03-24 2017-08-18 钱德君 Difficulty value creation method in a kind of block chain generating process
CN107146152A (en) * 2017-03-28 2017-09-08 杭州象链网络技术有限公司 A kind of credit management system kept accounts based on block chain
US20170323392A1 (en) * 2016-05-05 2017-11-09 Lance Kasper Consensus system for manipulation resistant digital record keeping
CN107395403A (en) * 2017-07-07 2017-11-24 北京区块链云科技有限公司 A kind of fiduciary block chain common recognition method suitable for extensive ecommerce
CN107438003A (en) * 2016-05-27 2017-12-05 索尼公司 Electronic equipment, method and information processing system for electronic equipment
CN107679976A (en) * 2017-09-28 2018-02-09 电子科技大学 A kind of auction system based on block chain

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150220918A1 (en) * 2014-02-04 2015-08-06 Lenovo (Singapore) Pte. Ltd. Biometric account card
US20160328713A1 (en) * 2015-05-05 2016-11-10 ShoCard, Inc. Identity Management Service Using A Blockchain Providing Identity Transactions Between Devices
CN105488722A (en) * 2015-11-30 2016-04-13 布比(北京)网络技术有限公司 Asset data processing method and device based on derivation chain
US20170323392A1 (en) * 2016-05-05 2017-11-09 Lance Kasper Consensus system for manipulation resistant digital record keeping
CN107438003A (en) * 2016-05-27 2017-12-05 索尼公司 Electronic equipment, method and information processing system for electronic equipment
CN106453286A (en) * 2016-09-27 2017-02-22 北京天德科技有限公司 Reputation method and system based on block chain
CN106651346A (en) * 2016-11-28 2017-05-10 上海凯岸信息科技有限公司 Block chain-based credit investigation data sharing and trading system
CN106878396A (en) * 2017-01-19 2017-06-20 布比(北京)网络技术有限公司 The processing method of trade information, device and system
CN107067242A (en) * 2017-03-24 2017-08-18 钱德君 Difficulty value creation method in a kind of block chain generating process
CN107146152A (en) * 2017-03-28 2017-09-08 杭州象链网络技术有限公司 A kind of credit management system kept accounts based on block chain
CN107395403A (en) * 2017-07-07 2017-11-24 北京区块链云科技有限公司 A kind of fiduciary block chain common recognition method suitable for extensive ecommerce
CN107679976A (en) * 2017-09-28 2018-02-09 电子科技大学 A kind of auction system based on block chain

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ZHIXONG CHEN;YIXUAN ZHU: ""Personal Archive Service System using Blockchain Technology: Case Study, Promising and Challenging"", 《2017 IEEE INTERNATIONAL CONFERENCE ON AI & MOBILE SERVICES (AIMS)》 *

Also Published As

Publication number Publication date
CN111713088B (en) 2022-03-01
WO2019157740A1 (en) 2019-08-22

Similar Documents

Publication Publication Date Title
CN111713088B (en) Method and device for processing data and equipment for processing data
EP4120114A1 (en) Data processing method and apparatus, smart device and storage medium
CN109327528B (en) Node management method and device based on block chain
Ferrer-Gomila et al. A fair contract signing protocol with blockchain support
WO2018177093A1 (en) Block chain processing method, accounting node, verification node and storage medium
Jia et al. A2 chain: a blockchain‐based decentralized authentication scheme for 5G‐enabled IoT
CN110177124B (en) Identity authentication method based on block chain and related equipment
US10482078B2 (en) Methods and devices for handling hash-tree based data signatures
CN112600678B (en) Data processing method, device, equipment and storage medium
TWI717927B (en) Hybrid blockchain architecture with computing pool
US20230037932A1 (en) Data processing method and apparatus based on blockchain network, and computer device
CN109300038B (en) Resource flow transaction system
CN110945831B (en) Generation of anti-Sybil attack identities
CN108768672B (en) Data processing method, device and storage medium
CN112235301A (en) Method and device for verifying access authority and electronic equipment
US20240179019A1 (en) Consensus result synchronization across algorithms of different fault tolerance types
CN111385096B (en) Block chain network system, signature processing method, terminal and storage medium
Rafati Niya et al. Architectures for Blockchain‐IoT Integration
WO2021233109A1 (en) Blockchain-based message processing method and apparatus, and device and storage medium
Wang et al. An efficient, secured, and infinitely scalable consensus mechanism for peer-to-peer energy trading blockchain
Diallo et al. Toward scalable blockchain for data management in VANETs
Dai et al. Towards Trustworthy IoT: A Blockchain‐Edge Computing Hybrid System with Proof‐of‐Contribution Mechanism
CN116389504A (en) Block chain-based identity authentication quick consensus method, system, equipment and medium
CN112507369B (en) Service processing method and device based on block chain, readable medium and electronic equipment
CN110766407A (en) Transaction verification method, accounting node and medium based on block chain

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant