CN111641616A - Processing method, device and storage medium for accounting right in block chain network - Google Patents

Processing method, device and storage medium for accounting right in block chain network Download PDF

Info

Publication number
CN111641616A
CN111641616A CN202010432959.8A CN202010432959A CN111641616A CN 111641616 A CN111641616 A CN 111641616A CN 202010432959 A CN202010432959 A CN 202010432959A CN 111641616 A CN111641616 A CN 111641616A
Authority
CN
China
Prior art keywords
block
accounting
node
blockchain network
accounting node
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
CN202010432959.8A
Other languages
Chinese (zh)
Other versions
CN111641616B (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.)
Iallchain Co Ltd
Original Assignee
Iallchain 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 Iallchain Co Ltd filed Critical Iallchain Co Ltd
Priority to CN202010432959.8A priority Critical patent/CN111641616B/en
Publication of CN111641616A publication Critical patent/CN111641616A/en
Application granted granted Critical
Publication of CN111641616B publication Critical patent/CN111641616B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0442Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H30/00ICT specially adapted for the handling or processing of medical images
    • G16H30/20ICT specially adapted for the handling or processing of medical images for handling medical images, e.g. DICOM, HL7 or PACS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3297Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving time stamps, e.g. generation of time stamps
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Abstract

The embodiment of the application provides a processing method, a device and a storage medium for accounting right in a block chain network, after a block is generated by an accounting node, the block is not broadcasted to the block chain network immediately, but a random time duration is waited, in the process of waiting the random time duration, the accounting node may receive the block broadcasted by other accounting nodes in the block chain network, if the block broadcasted by other accounting nodes is approved by most accounting nodes in the block chain network, the blocks broadcasted by other accounting nodes are recorded in a block chain account book, when the accounting node is a more computationally powerful accounting node and the other nodes are less computationally powerful accounting nodes, the more computationally powerful accounting node can be prevented from obtaining accounting right for a long time, and the less computationally powerful accounting node can not obtain accounting right, so that the more computationally powerful accounting node and the less computationally powerful accounting node can both obtain accounting right, thereby allowing the blockchain network to function properly.

Description

Processing method, device and storage medium for accounting right in block chain network
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a processing method, equipment and a storage medium for accounting right in a block chain network.
Background
Current medical images can be identified and diagnosed by Artificial Intelligence (AI). However, a certain amount of computational power is required for support. Because the current hospitals lack the corresponding computing power, there is a certain limitation in identifying and diagnosing medical images through AI. To address this issue, AI-based medical identification may be combined with blockchain ideas. For example, billing nodes in the blockchain network may compete for billing rights by medically identifying medical images.
Because the accounting nodes preferentially complete the medical identification and can obtain the accounting right under the condition that the medical identification result is correct, the accounting nodes with high calculation power can obtain the accounting right for a long time, while the accounting nodes with low calculation power can hardly obtain the accounting right, so that the accounting nodes with low calculation power do not participate in accounting any more, and finally the blockchain network cannot normally operate.
Disclosure of Invention
Embodiments of the present invention provide a processing method, a device, and a storage medium for a billing right in a blockchain network, so that a billing node with a strong calculation power and a billing node with a weak calculation power both have an opportunity to obtain the billing right, and thus the blockchain network can operate normally.
In a first aspect, an embodiment of the present invention provides a method for processing an accounting right in a blockchain network, where the method includes:
the method comprises the steps that an accounting node receives at least one medical image broadcast in a blockchain network by a medical image generating node in the blockchain network;
the accounting node performs medical identification on the at least one medical image to obtain a medical identification result corresponding to the at least one medical image;
the accounting node records the medical identification result corresponding to the at least one medical image in a first block;
the accounting node sends the hash value of the first block to a timestamp server;
the accounting node receiving a timestamp from the timestamp server;
the accounting node generates a first random time length according to the hash value of the first block;
if the accounting node receives a second block broadcast by other accounting nodes in the blockchain network within the first random time length from the timestamp, verifying the second block by the accounting node, wherein the second block and the first block are blocks with the same sequence number in the blockchain network;
if the accounting node verifies the second block, the second block is recorded in a block chain ledger.
In a second aspect, an embodiment of the present invention provides an accounting node, including:
a memory;
a processor;
a communication interface; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to:
receiving at least one medical image broadcast by a medical image generation node in a blockchain network through the communication interface;
performing medical identification on the at least one medical image to obtain a medical identification result corresponding to the at least one medical image;
recording a medical identification result corresponding to the at least one medical image in a first block;
sending the hash value of the first block to a timestamp server through the communication interface;
receiving a timestamp from the timestamp server via the communication interface;
generating a first random time length according to the hash value of the first block;
if the communication interface receives a second block broadcast by other accounting nodes in the blockchain network within the first random time length from the timestamp, verifying the second block, wherein the second block and the first block are blocks with the same sequence number in the blockchain network;
if the second block passes the verification, the second block is recorded into a blockchain ledger.
In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the method in the first aspect.
In the processing method, device, and storage medium for accounting right in a blockchain network provided in the embodiments of the present invention, after a block is generated by an accounting node, the block is not broadcasted to the blockchain network immediately, but a random duration is waited, during the process of waiting for the random duration, the accounting node may receive a block broadcasted by another accounting node in the blockchain network, if the block broadcasted by another accounting node is approved by most accounting nodes in the blockchain network, the blocks broadcasted by other accounting nodes are recorded in a blockchain accounting book, when the accounting node is a more computationally powerful accounting node and the other nodes are less computationally powerful accounting nodes, it is avoided that the more computationally powerful accounting node obtains long-term accounting right and the less computationally powerful accounting node does not obtain accounting right, so that both the more computationally powerful accounting node and the less computationally powerful accounting node have an opportunity to obtain accounting right, thereby allowing the blockchain network to function properly.
Drawings
Fig. 1 is a schematic diagram of an application scenario provided in an embodiment of the present invention;
fig. 2 is a flowchart of a processing method for accounting rights in a blockchain network according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an accounting node according to an embodiment of the present invention.
With the foregoing drawings in mind, certain embodiments of the disclosure have been shown and described in more detail below. These drawings and written description are not intended to limit the scope of the disclosed concepts in any way, but rather to illustrate the concepts of the disclosure to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The method for processing the accounting right in the block chain network provided by the embodiment of the invention can be applied to the communication system shown in fig. 1. As shown in fig. 1, the communication system includes: the medical image. The medical image generation node comprises a billing node A, a billing node B, a billing node C, a medical image generation node and a user node, wherein the billing node A, the billing node B, the billing node C, the medical image generation node and the user node are participating nodes in a block chain network. It is understood that the description is only illustrative and does not limit the number and types of nodes in the blockchain network. The accounting node can be one or a plurality of cloud servers, the cloud servers are a server cluster, a plurality of servers are arranged, the server cluster is similar to a universal computer framework, and the cloud servers comprise processors, hard disks, memories, system buses and the like. The medical image generation node may be a medical device such as a Computed Tomography (CT) machine or an X-ray machine. The user node may specifically be a terminal device of a clinician or patient, e.g. a smartphone, a tablet, a personal computer, etc. In addition, in the present embodiment, the blockchain network is a decentralized, peer-to-peer (P2P) communication network.
It is understood that in the embodiment of the present application, the medical image generation node may be used to generate a medical image. Billing nodes such as billing node a, billing node B, billing node C, etc. may be used to perform medical identification on the medical image. The block chain account book in the block chain network can be used for recording a medical identification result obtained after medical identification is carried out on the medical image by the accounting node. The user node may be configured to query the medical identification results in the blockchain ledger.
For example, as shown in fig. 1, a medical image generation node (e.g., a medical device such as a CT machine or an X-ray machine) can generate a plurality of medical images such as a medical image PICi, a medical image PICi +1, and a medical image PICi +2 as a node for generating a medical image. After the medical image generating node is connected to the P2P network, the medical image generating node can broadcast the medical images in the P2P network. Wherein each medical image may include generation time information and identification information. The generation time information may specifically be a time stamp at the time of generation of the medical image. The identification information may specifically be a medical serial number of the medical image. That is, each medical image is marked by adopting a mode of generating time information and identification information, and each medical image can be uniquely marked, so that the medical images are prevented from being overlapped or repeated with the medical images generated by other medical equipment such as other CT machines, other X-ray machines and the like in the block chain network. It is understood that the blockchain network may include more than one medical image generation node, for example, there may be a plurality of medical image generation nodes, and the medical image generated by each medical image generation node may be effectively marked by using the generation time information and the identification information.
In addition, as shown in fig. 1, a plurality of accounting nodes, e.g., accounting node a, accounting node B, accounting node C, are included in the blockchain network. In the embodiment of the present application, when the medical image generating node broadcasts the medical image in the blockchain network, the accounting node a, the accounting node B, and the accounting node C may all receive the medical image.
For example, the accounting node a, the accounting node B, and the accounting node C may respectively generate a candidate block according to a predetermined rule, where the candidate block includes at least one medical image.
Optionally, the preset rule includes at least one of the following: packing a preset number of medical images into a candidate block; packing the medical images broadcasted by the medical image generating node into a candidate block within a preset time; and packaging the medical images with the accumulated storage size reaching a preset threshold into a candidate block.
For example, taking the billing node a as an example, the billing node a may pack n medical images into one candidate block. Or the accounting node a may pack the medical images broadcast by the medical image generating node into one candidate block every m minutes. Or the accounting node a may accumulate and store the medical images broadcast by the medical image generating node, and when the accumulated and stored size reaches a preset threshold P, the accounting node a packs the accumulated and stored medical images into a candidate block.
It can be understood that the manner of generating the candidate blocks by the accounting node B and the accounting node C according to the preset rule is similar to the manner of generating the candidate blocks by the accounting node a according to the preset rule, and is not described herein again.
For example, taking billing node a as an example, the billing node a may employ an AI algorithm to perform medical identification on at least one medical image in the candidate block. Similarly, the accounting node B and the accounting node C may also perform medical identification on at least one medical image in the candidate block generated by each of the accounting node B and the accounting node C by using an AI algorithm.
It is understood that the accounting node a, the accounting node B and the accounting node C may have different algorithms, and thus, the accounting node a, the accounting node B and the accounting node C may have different speeds or accuracies for medical identification of at least one medical image in the candidate block. In the embodiment of the present application, the earliest one of the accounting node a, the accounting node B and the accounting node C to complete the medical identification may obtain the accounting right, i.e. the right to record information in the new block in the blockchain network. That is, the accounting node a, the accounting node B and the accounting node C compete for accounting rights of the new block by performing medical identification on at least one medical image in the candidate block.
For example, if the accounting node a is an accounting node that completes the medical identification earliest in the accounting node a, the accounting node B, and the accounting node C, the accounting node a may record the at least one medical image in the candidate block and the medical identification result of the at least one medical image in a new block in the blockchain network, where the new block is a newly generated block in the blockchain network, and is referred to as a first block here.
Further, accounting node a broadcasts the first block in the blockchain network so that other accounting nodes in the blockchain network, e.g. accounting node B, accounting node C, may receive the first block. When accounting node B and accounting node C receive the first block, the first block is verified, for example, the medical identification result in the first block is verified. If both accounting node B and accounting node C approve the medical identification result in the first block, it indicates that the first block is verified, and the first block can be recorded into the blockchain ledger. Furthermore, accounting node A, accounting node B and accounting node C begin to compete for accounting right of the next block. For example, the first block is the nth block in the blockchain network, and when both accounting node B and accounting node C approve the nth block, accounting node a, accounting node B and accounting node C begin to contend for accounting right for the (N + 1) th block. When a plurality of blocks after the nth block are approved, the node in the blockchain network may consider that the medical identification result in the nth block is finally approved by most accounting nodes in the blockchain network, so that the medical identification result in the nth block can be queried by the user node. For example, the user node may query a medical identification result corresponding to the medical image in an nth block in the blockchain account according to the timestamp and the medical serial number of the medical image, so that a clinician or a patient refers to or applies the medical identification result in the medical diagnosis process.
In other embodiments, if the accounting node a is the earliest accounting node among the accounting node a, the accounting node B and the accounting node C to complete the medical identification, the accounting node a may record at least one medical image in the candidate block, the medical identification result of the at least one medical image and the reward value required by the accounting node a in the nth block. Further, the accounting node a may sign the nth block using a private key of the accounting node a to obtain signature information, and broadcast the signature information to the blockchain network. When other accounting nodes in the block chain network receive the signature information, the public key of the accounting node A is adopted to verify the private key signature of the accounting node A, and if the private key signature of the accounting node A passes the verification, the other accounting nodes determine that the Nth block is not tampered.
Additionally, the billing node a may also broadcast a first message in the blockchain network, which may include the manner in which billing node a generates the nth block, e.g., billing node a packages N medical images into a candidate block. And performing medical identification on the n medical images in the candidate block. Further, the nth block is generated according to the N medical images and medical identification results corresponding to the N medical images.
In the embodiment of the present application, the accounting node a that completes the medical identification earliest may also determine the rule generated by the (N + 1) th block. Specifically, the first message may include the generation manner of the (N + 1) th block, for example, the accounting node a may specify that the (N + 1) th block is generated by packaging the medical images broadcast by the medical image generation node into a candidate block every m minutes.
Or, the first message may include both the nth block and the (N + 1) th block generation.
In addition, the originating node in the blockchain network, i.e. the node that creates the first block, may also broadcast a second message in the blockchain network, where the second message includes the time range to which each of the preset rules applies, that is, the second message may be used to specify which of the preset rules is selected to generate the candidate block in which time range, so as to avoid the problem that the medical identification results are diverse and cannot be compared.
As described in the above embodiment, after the accounting node a broadcasts the nth block in the blockchain network, if the accounting node B and the accounting node C both verify the nth block, the accounting node a, the accounting node B and the accounting node C start to contend for the accounting right of the next block, i.e., the (N + 1) th block. If the accounting node B and the accounting node C do not approve the Nth block, the accounting node B and the accounting node C can respectively continue the process of carrying out medical identification on at least one medical image in the candidate block. If billing node B completes the medical identification process before billing node C, billing node B may record the at least one medical image and the medical identification result corresponding to the at least one medical image in the nth block. Since the medical identification result included in the nth block generated by the accounting node a is different from the medical identification result included in the nth block generated by the accounting node B, the nth block generated by the accounting node a may be denoted as a first block, and the nth block generated by the accounting node B may be denoted as a second block. Furthermore, the accounting node B may sign the private key for the second block that is considered to be correct by itself, and broadcast the second block signed by the private key to the block chain network for verification by the accounting node a and the accounting node C. If accounting node a and accounting node C validate the second block, then the second block will be recorded in the blockchain ledger in place of the first block.
In summary, in the prior art, the billing right is contended by the billing node in a manner of calculating a hash value meeting requirements by searching for a random number, and the billing right is contended by the billing node in a manner of performing medical identification on at least one medical image in the candidate block, so that the meaningless waste of computing power and electric power of the billing node can be effectively avoided, and the limitation problem that the medical image is identified and diagnosed through the AI due to lack of corresponding computing power in the current hospital is solved.
However, since the accounting node preferentially completes the medical identification and can obtain the accounting right under the condition that the medical identification result is correct, the accounting node with high calculation power may obtain the accounting right for a long time, while the accounting node with low calculation power may hardly obtain the accounting right, so that the accounting node with low calculation power no longer participates in accounting, and finally the blockchain network cannot normally operate. To solve this problem, embodiments of the present application provide a method for processing accounting rights in a blockchain network, and the method is described below with reference to specific embodiments.
The method for processing the accounting right in the block chain network provided by the embodiment of the invention aims to solve the technical problems in the prior art.
The following describes the technical solutions of the present invention and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present invention will be described below with reference to the accompanying drawings.
Fig. 2 is a flowchart of a processing method for accounting rights in a blockchain network according to an embodiment of the present invention. The embodiment of the invention provides a method for processing the accounting right in the block chain network aiming at the technical problems in the prior art, which comprises the following specific steps:
step 201, the billing node receives at least one medical image broadcast in the blockchain network by the medical image generation node in the blockchain network.
As shown in fig. 1, a medical image generation node may generate at least one medical image and broadcast the one medical image in the blockchain network so that a billing node in the blockchain network may receive the at least one medical image. For example, billing node a, billing node B, and billing node C may each receive the at least one medical image.
Step 202, the accounting node performs medical identification on the at least one medical image to obtain a medical identification result corresponding to the at least one medical image.
Further, the accounting node a, the accounting node B and the accounting node C may respectively adopt an AI algorithm to identify the at least one medical image. The accounting node a, the accounting node B and the accounting node C have different computing power, so that the accounting node a, the accounting node B and the accounting node C respectively adopt the AI algorithm to perform medical identification on the at least one medical image at different speeds, and in addition, the accounting node a, the accounting node B and the accounting node C respectively adopt the AI algorithm to perform medical identification on the at least one medical image to obtain different medical identification results.
Step 203, the accounting node records the medical identification result corresponding to the at least one medical image in a first block.
For example, the medical identification is completed by the accounting node a at the earliest time, the accounting node a may record the medical identification result obtained by the accounting node a performing the medical identification on the at least one medical image in a new block, where the new block generated by the accounting node a is recorded as the first block. Further, the first block may also include a generation time of the first block.
Step 204, the accounting node sends the hash value of the first chunk to a timestamp server.
Further, accounting node a may send the hash value for the first chunk to the timestamp server.
Step 205, the accounting node receives a timestamp from the timestamp server.
The timestamp server may generate an authenticated timestamp T from the hash value of the first chunk and send the timestamp T to accounting node a, so that accounting node a may receive timestamp T from the timestamp server.
And step 206, the accounting node generates a first random time length according to the hash value of the first block.
Accounting node a may generate a first random duration based on the hash value for the first chunk. The first random duration may be the last N digits of the hash value of the first chunk. N may be a variable integer or a fixed integer. For example, in the present embodiment, N may be equal to 3. For example, an originating node in the blockchain network may broadcast the modified N within a preset time frame. Specifically, an originating node in the blockchain network may broadcast the modified N in the form of a private key signed broadcast message. Alternatively, the starting node in the blockchain network may also write N into the starting block. The starting block may be understood as the first node in the blockchain network.
For example, if the last N digits of the hash value of the first chunk are 112, the first random duration is 112 seconds. In the embodiment of the present application, after generating the first block, the accounting node a does not broadcast the first block in the blockchain network immediately, but needs to wait for 112 seconds, i.e., after waiting for 112 seconds, the accounting node a may broadcast the first block in the blockchain network. For example, accounting node a may sign the first block with accounting node a's private key, obtain a signed first block, and broadcast the signed first block in the blockchain network at T +112 seconds.
Step 207, if the accounting node receives a second block broadcasted by other accounting nodes in the blockchain network within the first random time length from the timestamp, the accounting node verifies the second block, and the second block and the first block are blocks with the same sequence number in the blockchain network.
Accounting node a waits for messages broadcast by other accounting nodes in the blockchain network before accounting node a broadcasts the first block into the blockchain network, i.e. within the 112 seconds. For example, accounting node B and/or accounting node C may broadcast a second block within the 112 seconds, the second block and the first block being the same sequence number blocks in the blockchain network. For example, the second block and the first block are both the nth block in the blockchain network. The nth block generated by accounting node a and the nth block generated by accounting node B may be different. The nth block generated by accounting node a and the nth block generated by accounting node C may also be different. When accounting node a receives the second block broadcast by accounting node B and/or accounting node C in this 112, accounting node a may validate the second block.
Optionally, the verifying the second block by the accounting node includes: the accounting node calculating a time difference between a generation time and a release time of the second tile, the release time being a time at which the second tile was broadcast into the blockchain network; if the time difference is equal to the first random duration, the accounting node verifies the hash value of the second block and the medical identification result included in the second block.
For example, the accounting node a may calculate a time difference between the generation time and the release time of the second chunk, which may be the time the second chunk was broadcast into the blockchain network. Further, the accounting node a may verify whether the time difference is equal to the first random time duration. If the time difference is equal to the first random duration, accounting node a may further verify the hash value of the second chunk and the medical identification result included in the second chunk. For example, accounting node a may compare whether the hash value of the second chunk is the same as the hash value of the first chunk, and whether the medical identification result included in the second chunk is the same as the medical identification result included in the first chunk, and if both are the same, accounting node a verifies the second chunk.
Optionally, the receiving, by the accounting node, a second block broadcasted by the other accounting node in the block chain network includes: if the accounting node receives second blocks broadcast by a plurality of other accounting nodes in the blockchain network, the accounting node determines a target block from the second blocks broadcast by the plurality of other accounting nodes, wherein the sum of the generation time of the target block and a second random time length is minimum, and the second random time length is determined according to the hash value of the target block.
For example, accounting node a receives the second block broadcast by multiple other accounting nodes simultaneously. For example, accounting node a receives the second block broadcast by accounting node B and accounting node C in the blockchain network at the same time. The accounting node a may determine a target block from the second blocks broadcast by the accounting node B and the accounting node C, respectively, where the target block needs to satisfy the following conditions: the generation time of the target block is the smallest sum of the last N digits of the hash value of the target block. For example, the sum of the generation time of the second chunk broadcast by accounting node B and the last N digits of the hash value of the second chunk is denoted as a first sum, and the sum of the generation time of the second chunk broadcast by accounting node C and the last N digits of the hash value of the second chunk is denoted as a second sum. If the first sum is minimum, the second block broadcast by the accounting node B is the target block. That is, the target block is a block selected by the accounting node a from the second blocks broadcast by the accounting node B and the accounting node C, respectively, which satisfies the aforementioned condition. Further, the accounting node a verifies the target block.
For example, the accounting node a may calculate the time difference between the generation time and the release time of the target tile, which may be the time the target tile was broadcast into the blockchain network. Further, the accounting node a may verify whether the time difference is equal to the first random time duration. If the time difference is equal to the first random duration, the billing node a may further verify the hash value of the target block and the medical identification result included in the target block. For example, accounting node a may compare whether the hash value of the target tile is the same as the hash value of the first tile, and whether the medical identification result included in the target tile is the same as the medical identification result included in the first tile, and if both are the same, accounting node a verifies the target tile.
And step 208, if the accounting node verifies the second block, recording the second block into a block chain account book.
If the second block is verified by accounting node a and most accounting nodes in the blockchain network verify the second block, the second block is recorded in a blockchain ledger. Accounting node a starts preparing the next block.
In the embodiment of the invention, after the block is generated by the accounting node, the block is not broadcasted to the block chain network immediately, but the random time length is waited, and in the process of waiting the random time length, the accounting node may receive the blocks broadcast by other accounting nodes in the blockchain network, and if the blocks broadcast by other accounting nodes are approved by most accounting nodes in the blockchain network, the blocks broadcast by other accounting nodes are recorded into the blockchain ledger, when the accounting node is a computationally intensive accounting node, when other accounting nodes are the accounting nodes with weak calculation, the accounting nodes with strong calculation can be prevented from obtaining the accounting right for a long time, and the accounting nodes with weak calculation can be prevented from obtaining the accounting right, therefore, the accounting node with strong calculation and the accounting node with weak calculation have the opportunity to obtain the accounting right, and the block chain network can normally operate.
On the basis of the above embodiment, the method further includes: if the accounting node fails to verify the second block and the first random time length from the timestamp is passed, the accounting node broadcasts the first block in the blockchain network so that other accounting nodes in the blockchain network can verify the first block, and when the other accounting nodes in the blockchain network verify the first block, the first block is recorded in a blockchain account book.
For example, if billing node a does not verify the second block broadcast by billing node B and/or billing node C and T +112 seconds have elapsed, i.e., billing node a has waited for a random time of 112 seconds, then billing node a may broadcast the first block generated by billing node a in the blockchain network for other billing nodes in the blockchain network to verify the first block. If most accounting nodes in the blockchain network validate the first block, the first block is recorded into the blockchain ledger.
Optionally, the method further includes: if the accounting node does not receive a second block broadcast by other accounting nodes in the blockchain network within the first random time length from the timestamp, the accounting node broadcasts the first block in the blockchain network when the first random time length from the timestamp arrives, so that the other accounting nodes in the blockchain network verify the first block, and after the other accounting nodes in the blockchain network verify the first block, the first block is recorded in a blockchain account book.
For example, when accounting node a does not receive the second block broadcast by accounting node B and/or accounting node C during the time from T to T +112, accounting node a broadcasts the first block generated by accounting node a in the blockchain network when T +112 seconds are reached from T, for other accounting nodes in the blockchain network to verify the first block. If most accounting nodes in the blockchain network validate the first block, the first block is recorded into the blockchain ledger. Further, accounting node a may prepare the next block.
In addition, the time calculated from the hash value of the chunk may be used as the time interval of the whole chunk generation, that is, the time of random waiting is not counted from the generation time of the current chunk, but counted from the generation time of the last chunk.
In the embodiment of the invention, after the block is generated by the accounting node, the block is not broadcasted to the block chain network immediately, but the random time length is waited, and in the process of waiting the random time length, the accounting node may receive the blocks broadcast by other accounting nodes in the blockchain network, and if the blocks broadcast by other accounting nodes are approved by most accounting nodes in the blockchain network, the blocks broadcast by other accounting nodes are recorded into the blockchain ledger, when the accounting node is a computationally intensive accounting node, when other accounting nodes are the accounting nodes with weak calculation, the accounting nodes with strong calculation can be prevented from obtaining the accounting right for a long time, and the accounting nodes with weak calculation can be prevented from obtaining the accounting right, therefore, the accounting node with strong calculation and the accounting node with weak calculation have the opportunity to obtain the accounting right, and the block chain network can normally operate.
Fig. 3 is a schematic structural diagram of an accounting node according to an embodiment of the present invention. The accounting node provided in the embodiment of the present invention may execute the processing flow provided in the embodiment of the processing method for accounting rights in the blockchain network, as shown in fig. 3, the accounting node 30 includes: memory 31, processor 32, computer programs and communication interface 33; wherein the computer program is stored in the memory 31 and is configured to be executed by the processor 32 for: receiving at least one medical image broadcast by a medical image generation node in a blockchain network through the communication interface; performing medical identification on the at least one medical image to obtain a medical identification result corresponding to the at least one medical image; recording a medical identification result corresponding to the at least one medical image in a first block; sending the hash value of the first block to a timestamp server through the communication interface; receiving a timestamp from the timestamp server via the communication interface; generating a first random time length according to the hash value of the first block; if the communication interface receives a second block broadcast by other accounting nodes in the blockchain network within the first random time length from the timestamp, verifying the second block, wherein the second block and the first block are blocks with the same sequence number in the blockchain network; if the second block passes the verification, the second block is recorded into a blockchain ledger.
Optionally, when the processor verifies the second block, the processor is specifically configured to: calculating a time difference between a generation time and a release time of the second tile, the release time being a time at which the second tile is broadcast into the blockchain network; and if the time difference is equal to the first random time length, verifying the hash value of the second block and the medical identification result included in the second block.
Optionally, when the processor receives, through the communication interface, a second block broadcasted by another accounting node in the block chain network, the processor is specifically configured to: and if the communication interface receives second blocks broadcast by a plurality of other accounting nodes in the blockchain network, determining a target block from the second blocks broadcast by the plurality of other accounting nodes, wherein the sum of the generation time of the target block and a second random time length is minimum, and the second random time length is determined according to the hash value of the target block.
Optionally, the processor is further configured to: if the accounting node fails to verify the second block and the first random time length from the timestamp passes, broadcasting the first block in the blockchain network for other accounting nodes in the blockchain network to verify the first block, and recording the first block into a blockchain account book after the other accounting nodes in the blockchain network verify the first block.
Optionally, the processor is further configured to: if the accounting node does not receive a second block broadcast by other accounting nodes in the blockchain network within the first random time length from the timestamp, broadcasting the first block in the blockchain network through the communication interface when the first random time length from the timestamp arrives, so that other accounting nodes in the blockchain network verify the first block, and recording the first block into a blockchain account book after the other accounting nodes in the blockchain network verify the first block.
The accounting node of the embodiment shown in fig. 3 may be configured to implement the technical solution of the above method embodiment, and the implementation principle and the technical effect are similar, and are not described herein again.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the method for processing accounting rights in a blockchain network described in the foregoing embodiment.
In the embodiments provided in the present invention, it should be understood that the disclosed 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 invention 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 integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention. 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.
It is obvious to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to perform all or part of the above described functions. For the specific working process of the device described above, reference may be made to the corresponding process in the foregoing method embodiment, which is not described herein again.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (11)

1. A method for processing billing rights in a blockchain network, comprising:
the method comprises the steps that an accounting node receives at least one medical image broadcast in a blockchain network by a medical image generating node in the blockchain network;
the accounting node performs medical identification on the at least one medical image to obtain a medical identification result corresponding to the at least one medical image;
the accounting node records the medical identification result corresponding to the at least one medical image in a first block;
the accounting node sends the hash value of the first block to a timestamp server;
the accounting node receiving a timestamp from the timestamp server;
the accounting node generates a first random time length according to the hash value of the first block;
if the accounting node receives a second block broadcast by other accounting nodes in the blockchain network within the first random time length from the timestamp, verifying the second block by the accounting node, wherein the second block and the first block are blocks with the same sequence number in the blockchain network;
if the accounting node verifies the second block, the second block is recorded in a block chain ledger.
2. The method of claim 1, wherein the verifying the second block by the accounting node comprises:
the accounting node calculating a time difference between a generation time and a release time of the second tile, the release time being a time at which the second tile was broadcast into the blockchain network;
if the time difference is equal to the first random duration, the accounting node verifies the hash value of the second block and the medical identification result included in the second block.
3. The method of claim 1 or 2, wherein the accounting node receives a second block broadcast by other accounting nodes in the blockchain network, and comprises:
if the accounting node receives second blocks broadcast by a plurality of other accounting nodes in the blockchain network, the accounting node determines a target block from the second blocks broadcast by the plurality of other accounting nodes, wherein the sum of the generation time of the target block and a second random time length is minimum, and the second random time length is determined according to the hash value of the target block.
4. The method according to any one of claims 1-3, further comprising:
if the accounting node fails to verify the second block and the first random time length from the timestamp is passed, the accounting node broadcasts the first block in the blockchain network so that other accounting nodes in the blockchain network can verify the first block, and when the other accounting nodes in the blockchain network verify the first block, the first block is recorded in a blockchain account book.
5. The method according to any one of claims 1-3, further comprising:
if the accounting node does not receive a second block broadcast by other accounting nodes in the blockchain network within the first random time length from the timestamp, the accounting node broadcasts the first block in the blockchain network when the first random time length from the timestamp arrives, so that the other accounting nodes in the blockchain network verify the first block, and after the other accounting nodes in the blockchain network verify the first block, the first block is recorded in a blockchain account book.
6. An accounting node, comprising:
a memory;
a processor;
a communication interface; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to:
receiving at least one medical image broadcast by a medical image generation node in a blockchain network through the communication interface;
performing medical identification on the at least one medical image to obtain a medical identification result corresponding to the at least one medical image;
recording a medical identification result corresponding to the at least one medical image in a first block;
sending the hash value of the first block to a timestamp server through the communication interface;
receiving a timestamp from the timestamp server via the communication interface;
generating a first random time length according to the hash value of the first block;
if the communication interface receives a second block broadcast by other accounting nodes in the blockchain network within the first random time length from the timestamp, verifying the second block, wherein the second block and the first block are blocks with the same sequence number in the blockchain network;
if the second block passes the verification, the second block is recorded into a blockchain ledger.
7. An accounting node as claimed in claim 6, wherein the processor, when validating the second block, is configured to:
calculating a time difference between a generation time and a release time of the second tile, the release time being a time at which the second tile is broadcast into the blockchain network;
and if the time difference is equal to the first random time length, verifying the hash value of the second block and the medical identification result included in the second block.
8. An accounting node as claimed in claim 6 or 7, wherein the processor, on receiving a second block broadcast by other accounting nodes in the blockchain network via the communication interface, is configured to:
and if the communication interface receives second blocks broadcast by a plurality of other accounting nodes in the blockchain network, determining a target block from the second blocks broadcast by the plurality of other accounting nodes, wherein the sum of the generation time of the target block and a second random time length is minimum, and the second random time length is determined according to the hash value of the target block.
9. Accounting node according to any one of claims 6-8, wherein the processor is further configured to:
if the accounting node fails to verify the second block and the first random time length from the timestamp passes, broadcasting the first block in the blockchain network for other accounting nodes in the blockchain network to verify the first block, and recording the first block into a blockchain account book after the other accounting nodes in the blockchain network verify the first block.
10. Accounting node according to any one of claims 6-8, wherein the processor is further configured to:
if the accounting node does not receive a second block broadcast by other accounting nodes in the blockchain network within the first random time length from the timestamp, broadcasting the first block in the blockchain network through the communication interface when the first random time length from the timestamp arrives, so that other accounting nodes in the blockchain network verify the first block, and recording the first block into a blockchain account book after the other accounting nodes in the blockchain network verify the first block.
11. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-5.
CN202010432959.8A 2020-05-19 2020-05-19 Processing method, device and storage medium for accounting right in block chain network Active CN111641616B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010432959.8A CN111641616B (en) 2020-05-19 2020-05-19 Processing method, device and storage medium for accounting right in block chain network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010432959.8A CN111641616B (en) 2020-05-19 2020-05-19 Processing method, device and storage medium for accounting right in block chain network

Publications (2)

Publication Number Publication Date
CN111641616A true CN111641616A (en) 2020-09-08
CN111641616B CN111641616B (en) 2023-02-03

Family

ID=72332089

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010432959.8A Active CN111641616B (en) 2020-05-19 2020-05-19 Processing method, device and storage medium for accounting right in block chain network

Country Status (1)

Country Link
CN (1) CN111641616B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108564468A (en) * 2018-04-04 2018-09-21 上海金丘信息科技股份有限公司 A kind of common recognition method based on the dynamic equity for trusting member
CN109039648A (en) * 2018-08-03 2018-12-18 克洛斯比尔有限公司 A kind of creation method, equipment and the readable storage medium storing program for executing of block chain
CN109408595A (en) * 2018-10-26 2019-03-01 全链通有限公司 Block chain bookkeeping methods, equipment and computer readable storage medium
CN110049043A (en) * 2019-04-17 2019-07-23 江苏全链通信息科技有限公司 Server log monitoring method and system based on block chain
US20190370793A1 (en) * 2018-06-04 2019-12-05 Decentralized Finance Labs, Inc. Hybrid consensus for blockchain using proof of work and proof of stake
CN111080289A (en) * 2019-10-25 2020-04-28 武汉瑞盈通网络技术有限公司 Improved block chain consensus mechanism based on PoW and PoS
CN111147229A (en) * 2019-12-30 2020-05-12 山东爱城市网信息技术有限公司 Consensus method and device with block hash to be generated as seed and medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108564468A (en) * 2018-04-04 2018-09-21 上海金丘信息科技股份有限公司 A kind of common recognition method based on the dynamic equity for trusting member
US20190370793A1 (en) * 2018-06-04 2019-12-05 Decentralized Finance Labs, Inc. Hybrid consensus for blockchain using proof of work and proof of stake
CN109039648A (en) * 2018-08-03 2018-12-18 克洛斯比尔有限公司 A kind of creation method, equipment and the readable storage medium storing program for executing of block chain
CN109408595A (en) * 2018-10-26 2019-03-01 全链通有限公司 Block chain bookkeeping methods, equipment and computer readable storage medium
CN110049043A (en) * 2019-04-17 2019-07-23 江苏全链通信息科技有限公司 Server log monitoring method and system based on block chain
CN111080289A (en) * 2019-10-25 2020-04-28 武汉瑞盈通网络技术有限公司 Improved block chain consensus mechanism based on PoW and PoS
CN111147229A (en) * 2019-12-30 2020-05-12 山东爱城市网信息技术有限公司 Consensus method and device with block hash to be generated as seed and medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
戴安博等: "POW区块链共识算法分析与展望", 《通信技术》 *

Also Published As

Publication number Publication date
CN111641616B (en) 2023-02-03

Similar Documents

Publication Publication Date Title
CN110148475B (en) Medical information sharing method and device, readable storage medium and server
CN107480990B (en) Block chain accounting method and device
CN110868441B (en) Block chain public link maintenance method and device, node and block chain public link
WO2018176484A1 (en) Method and apparatus for processing medical image transmission data, and electronic device
TWI729699B (en) Face data collection method, non-volatile computer readable medium for face data collection, and computer-implemented system for face data collection
US10867018B2 (en) Secure computation system, secure computation device, secure computation method, and program
CN108848148B (en) Transaction information confirmation method and device based on block chain
CN108615151B (en) Data processing method, block chain server and node equipment
WO2018151279A1 (en) Data managing system, program, data structure, and recording medium
JP2019061578A (en) Learning support device, operation method for learning support device, learning support program, learning support system, and terminal device
CN110351276B (en) Data processing method, device and computer readable storage medium
EP3799052A1 (en) Providing and receiving medical data records
CN110958107A (en) Electronic voting method, device and storage medium based on block chain
CN111641617B (en) Processing method, device and storage medium for accounting right in block chain network
JP2015513156A (en) Byzantine fault tolerance and threshold coin toss
CN111641616B (en) Processing method, device and storage medium for accounting right in block chain network
CN110119947B (en) Method and apparatus for shared workload proof computing power generation of symbiotic blockchains
CN111627530B (en) Medical image identification method, device and storage medium
CN111613304B (en) Medical image processing method, device and storage medium
CN110730186A (en) Token issuing method, accounting node and medium based on block chain
CN110471922B (en) Content extension method and device for accounting node and computer readable storage medium
CN112769786B (en) Data transmission method and device based on oblivious transmission rule and computer equipment
CN112286703B (en) User classification method and device, client device and readable storage medium
CN117010889A (en) Data processing method, device, equipment, medium and product
CN108881397A (en) Method, apparatus, equipment and the storage medium of Medical Devices processing information

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