CN118264387B - Consensus determining method and system for intranet environment - Google Patents

Consensus determining method and system for intranet environment Download PDF

Info

Publication number
CN118264387B
CN118264387B CN202410699422.6A CN202410699422A CN118264387B CN 118264387 B CN118264387 B CN 118264387B CN 202410699422 A CN202410699422 A CN 202410699422A CN 118264387 B CN118264387 B CN 118264387B
Authority
CN
China
Prior art keywords
computing
candidate blocks
computing node
hash value
nodes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410699422.6A
Other languages
Chinese (zh)
Other versions
CN118264387A (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.)
Diankeyun Beijing Technology Co ltd
Original Assignee
Diankeyun Beijing Technology 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 Diankeyun Beijing Technology Co ltd filed Critical Diankeyun Beijing Technology Co ltd
Priority to CN202410699422.6A priority Critical patent/CN118264387B/en
Publication of CN118264387A publication Critical patent/CN118264387A/en
Application granted granted Critical
Publication of CN118264387B publication Critical patent/CN118264387B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • H04L12/185Arrangements for providing special services to substations for broadcast or conference, e.g. multicast with management of multicast group membership
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • 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
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • 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/3226Cryptographic 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 using a predetermined code, e.g. password, passphrase or PIN
    • 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/3247Cryptographic 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 digital signatures
    • 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/40Network security protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Storage Device Security (AREA)

Abstract

The invention provides a consensus determining method and a system for an intranet environment, wherein the method is applied to a computational power network block chain of a block chain multi-component computational power base, the computational power network block chain comprises a plurality of computing nodes, and the method comprises the following steps: a computing node in a computing power network block chain receives a computing power task and generates a computing power task acceptance record; receiving computing power task receiving records of other computing nodes in a computing power network block chain to generate an alternative block, and publishing the alternative block in the computing power network block chain; the computing node compares the self-generated candidate block with the received candidate block of the computing node to determine whether to authenticate the self-candidate block; the computing node computes the hash value of the self-authenticated candidate block and issues the hash value in a computing power network block chain; the computing node randomly receives the hash values issued by other computing nodes with the first preset number, compares the hash values issued by the computing nodes with the received hash values issued by the computing nodes, judges whether the authentication achieves consensus, and completes final authentication of the candidate block.

Description

Consensus determining method and system for intranet environment
Technical Field
The invention relates to the technical field of blockchain, in particular to a consensus determining method and system for an intranet environment.
Background
The block chain consensus mechanism is a mode for determining to achieve consensus and maintaining the consensus, and is a core technology for the block chain system to establish trust among different nodes to achieve the consensus and achieve decentralization. The mechanism determines the mode of agreement of the participating nodes on the transaction data, ensures that the compliance data is finally confirmed by all honest nodes, and realizes the consistency and activity of the data record of the distributed account book.
The consensus mechanism is the core part of the blockchain technology, and determines the safety, expandability and reliability of the whole blockchain system. The typical consensus mechanism of the blockchain operation is complex and heavy on the internet, and more resources are wasted, such as the POW consensus mechanism, the daily wasted computational resources are huge, and if the system is applied to a computational base scene, the system belongs to an intranet environment, and too much computational waste is not worth. There is a need for lightweight consensus algorithms that can quickly reach consensus among multiple computing nodes.
Disclosure of Invention
In view of the foregoing, embodiments of the present invention provide a consensus determination method for an intranet environment to obviate or ameliorate one or more of the disadvantages of the prior art.
One aspect of the present invention provides a consensus determination method for an intranet environment, the method being applied to a power calculation network blockchain of a blockchain multi-power calculation base, the power calculation network blockchain including a plurality of computing nodes, the method comprising the steps of:
a computing node in the computing power network block chain receives the computing power task issued in the computing power network block chain and generates a computing power task acceptance record aiming at the computing power task;
receiving calculation task receiving records of other calculation nodes in a calculation network block chain, generating alternative blocks based on all calculation task receiving records, issuing the generated alternative blocks in a broadcast message mode of private key signature in the calculation network block chain, and receiving the alternative blocks issued in a broadcast message mode of private key signature of the other calculation nodes;
Determining the number of the most identical candidate blocks based on the candidate blocks generated by the computing node and the received published candidate blocks of other computing nodes, and determining the self-authenticated candidate blocks based on the number of the most identical candidate blocks;
the computing node computes the hash value of the self-authenticated alternative block and issues the hash value in a broadcast message mode of private key signature in a computing power network block chain;
The computing node randomly receives the hash values issued by other computing nodes with the first preset number, compares the hash values with the received hash values issued by other computing nodes with the first preset number after the private key signature of the computing node passes verification, judges whether authentication achieves consensus, and completes final authentication of the candidate block.
By adopting the scheme, the application combines the cluster application scene of the calculation power base, each calculation node can be used as an accounting node, the task acceptance records of the calculation nodes in the cluster, which replace the calculation nodes sent by the users, are collected, and written into the account book of the blockchain. Any computing node is used as an accounting node, once an alternative block is generated, a broadcast message mode is published, other accounting nodes send confirmation notices if the block is approved, a large amount of calculation is not needed in the whole new block generation process, and the achievement of the consensus can be completed only by carrying out a plurality of times of message publishing and confirmation in a block chain, so that the efficiency is greatly improved, hash values published by other computing nodes of a first preset number are randomly received in the block approval process, the hash values of the accounting nodes are compared with the hash values published by other computing nodes, the one-by-one comparison is not needed, and the authentication efficiency is improved while the calculation force is saved.
In some embodiments of the present invention, in the step of receiving the power task acceptance records of other computing nodes in the power network blockchain, generating an alternative block based on all of the power task acceptance records, generating an alternative block based on the earliest power task acceptance record based on the time record in the power task acceptance records.
In some embodiments of the present invention, in the step of determining the most identical candidate blocks based on the candidate blocks generated by the computing node and the received published candidate blocks of other computing nodes, and determining the self-authenticated candidate blocks based on the most identical candidate blocks, the candidate blocks in the computing node are compared to obtain the most identical candidate blocks in the candidate blocks of the computing node, the ratio of the most identical candidate blocks in the candidate blocks of the computing node to the total number of the candidate blocks of the computing node is obtained by processing, and the authenticated candidate blocks are determined by comparing with a preset first threshold value.
In some embodiments of the present invention, in the step of comparing the hash value of the user with the hash values issued by the other computing nodes of the first preset number, the number of hash values issued by the other computing nodes, which are the same as the user hash value, in the comparison process is recorded, and the ratio of the same number of hash values to the first preset number is calculated and compared with the preset second threshold.
In some embodiments of the invention, the first threshold and the second threshold are each greater than or equal to 1/2.
In some embodiments of the present invention, each of the computing nodes is provided with a number, a comparison vector is constructed in the step of comparing the hash value of the computing node with the hash value issued by the other computing nodes of the first preset number, each dimension corresponds to one computing node in the blockchain of the computing power network, in the process of constructing the comparison vector, if the hash value of the computing node is the same as the computing node corresponding to the dimension, a first parameter is filled in the dimension, if the hash value of the computing node is different from the computing node corresponding to the dimension, a second parameter is filled, and if the hash value of the computing node is not the same as the computing node corresponding to the dimension, a third parameter is filled in.
In some embodiments of the present invention, in the step of calculating the ratio of the same number of hash values to the first preset number in the step of recording the number of hash values issued by other calculation nodes that are the same as the hash value of the other calculation nodes in the comparison process, the ratio of the number of first parameters to the number of first parameters and the number of second parameters in the comparison vector is calculated.
In some embodiments of the present invention, in the step of comparing the hash value of the self with the hash values issued by the other computing nodes of the received first preset number, and determining whether authentication is agreed, if the ratio of the same hash value number to the first preset number is greater than a preset second threshold, randomly selecting the dimension in which the second preset number of first parameters are located from the comparison vectors constructed by the self, obtaining the comparison vector constructed by the computing node corresponding to the dimension, constructing a plurality of comparison vectors as a comparison matrix, and determining whether authentication is agreed based on the comparison matrix.
In some embodiments of the present invention, in the step of determining whether to authenticate agreement based on the comparison matrix, the comparison matrix is input into a pre-trained neural network model, and whether to authenticate agreement is determined based on a classification result of the neural network model.
The second aspect of the present invention also provides a consensus determination system for an intranet environment, the system comprising a computer device comprising a processor and a memory, the memory having stored therein computer instructions for executing the computer instructions stored in the memory, the system implementing the steps implemented by the method as described above when the computer instructions are executed by the processor.
The third aspect of the present invention also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps performed by the consensus determination method for an intranet environment as described above.
Additional advantages, objects, and features of the invention will be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the invention. The objectives and other advantages of the invention may be realized and attained by the structure particularly pointed out in the written description and drawings.
It will be appreciated by those skilled in the art that the objects and advantages that can be achieved with the present invention are not limited to the above-described specific ones, and that the above and other objects that can be achieved with the present invention will be more clearly understood from the following detailed description.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate and together with the description serve to explain the application.
Fig. 1 is a schematic diagram of an embodiment of a consensus determination method for an intranet environment according to the present invention.
Detailed Description
The present invention will be described in further detail with reference to the following embodiments and the accompanying drawings, in order to make the objects, technical solutions and advantages of the present invention more apparent. The exemplary embodiments of the present invention and the descriptions thereof are used herein to explain the present invention, but are not intended to limit the invention.
It should be noted here that, in order to avoid obscuring the present invention due to unnecessary details, only structures and/or processing steps closely related to the solution according to the present invention are shown in the drawings, while other details not greatly related to the present invention are omitted.
As shown in fig. 1, the present invention proposes a consensus determination method for an intranet environment, the method is applied to a power calculation network blockchain of a blockchain multi-power calculation base, the power calculation network blockchain includes a plurality of calculation nodes, and the method includes the following steps:
In the implementation process, the block chain multi-component computing base is a combination of block chain technology and computing base. The base uses the characteristics of the block chain such as decentralization, non-falsification, transparency, safety and the like to provide stronger and reliable basic support for the computing base. Such a multi-component computing base may provide a decentralized, distributed ledger technique for recording and managing computing tasks, data, and resources in the computing base from a blockchain perspective. By using a blockchain consensus mechanism, different computing nodes can establish trust and commonly maintain the account book, so that the safety and transparency of data are ensured.
Meanwhile, the main functions of the computing power base comprise data processing, model training, real-time response, safety and the like. In a blockchain multi-computing base, these functions may be better supported and optimized. For example, more complex computing task allocation and result verification may be achieved through intelligent contract technology of the blockchain; through the distributed storage and transmission technology of the block chain, more efficient data processing and transmission can be realized; through encryption and access control techniques of the blockchain, security of data and privacy can be protected.
The power clusters of the blockchain multi-component power base are significantly different from the power clusters of other bases in several aspects, including:
decentralizing properties: the computing force cluster of the block chain multi-component computing force base has the characteristic of decentralization. This means that the nodes in the computing power cluster are widely distributed, without a centralized control point. This design improves the robustness and fault tolerance of the system because any single node failure does not affect the operation of the overall system. In contrast, the computing power clusters of other bases may employ a centralized or relatively centralized architecture, with the risk of single point failure;
Data transparency and non-tamper evident: blockchain technology makes data in the computing clusters of a multi-element computing base highly transparent and non-tamper-resistant. All computing tasks, data, and resources are recorded on the blockchain and can be verified and audited by the public ledger. This feature ensures the authenticity and trustworthiness of the data, reducing the risk of fraud and tampering. The computing clusters of other bases may lack such data transparency and non-tamper resistance;
Security and privacy protection: the blockchain multi-computing power base protects the security of data and privacy through encryption and access control techniques. Distributed storage techniques of smart contracts and blockchains may ensure that only authorized users can access and manipulate data. In addition, anonymity of the blockchain and encryption technology can also protect privacy of users. In contrast, the computing clusters of other bases may require additional security measures to protect data and privacy;
Resource allocation and task scheduling: the computing power cluster of the blockchain multi-computing power base can realize more intelligent and fair resource allocation and task scheduling by utilizing an intelligent contract and a consensus mechanism of the blockchain. The intelligent contracts may define rules for task allocation and scheduling, while the consensus mechanism may ensure that these rules are executed consistently across all nodes. This design can improve the efficiency of resource utilization and the accuracy of task completion. Other chassis' computing clusters may need to rely on a centralized management system for resource allocation and task scheduling;
cross-chain and interoperability: the computing clusters of the blockchain multi-computing base may support cross-chain and interoperability. This means that different blockchain networks can be interconnected to enable sharing of data and resources. This feature may expand the range of applications and flexibility of the computing power cluster. Computing clusters of other bases can be difficult to implement across chains and interoperability.
Step S100, a computing node in a computing power network block chain receives a computing power task published in the computing power network block chain and generates a computing power task acceptance record aiming at the computing power task;
In the specific implementation process, before a step that a computing node in a computing power network blockchain receives a computing power task issued in the computing power network blockchain, after any computing node receives a computing power task request, a unique task ID of the whole network is generated and issued in a computing power cluster in a broadcast message mode of private key signature.
In the implementation process, if other computing nodes capable of meeting the request condition of the computing power task receive the computing power task, the computing power task is processed by the computing nodes. Generating a computing power Task acceptance record, wherein the computing power Task acceptance record comprises a Task ID, a Task description, a receiving Task node and a time stamp, and the computing power Task acceptance record is signed by a private key and then is issued in a blockchain of a computing power cluster.
Step S200, receiving calculation task receiving records of other calculation nodes in the calculation network block chain, generating alternative blocks based on all calculation task receiving records, releasing the generated alternative blocks in a broadcast message mode of private key signature in the calculation network block chain, and receiving the alternative blocks released in a broadcast message mode of private key signature of other calculation nodes;
The candidate block comprises a calculation task acceptance record.
In an implementation, any one of the computing nodes may act as an accounting node, any one of which may accept records from all of the computing tasks collected from the computing clusters.
Step S300, determining the number of the most identical candidate blocks based on the candidate blocks generated by the computing node and the received published candidate blocks of other computing nodes, and determining the self-authenticated candidate blocks based on the number of the most identical candidate blocks;
In some embodiments of the present invention, after receiving the alternative blocks of other accounting nodes, the computing node first verifies the private key signature of the sending node of the alternative block, and after the private key signature passes the verification, compares the content of the alternative block that is managed by itself with the content of the alternative block that is released by other accounting nodes.
Step S400, the computing node calculates the hash value of the self-authenticated candidate block and issues the hash value in a broadcast message mode of private key signature in a computing power network block chain;
In the implementation process, if the computing node authenticates the candidate block, the hash value of the candidate block is computed and is issued in a broadcast message mode in front of the private key in the computing power network block chain.
In some embodiments of the present invention, in the step of calculating the hash value of the candidate block itself, a hash algorithm is used to calculate the hash value.
Step S500, the computing node randomly receives the hash values issued by other computing nodes with the first preset number, compares the hash values with the received hash values issued by other computing nodes with the first preset number after the private key signature of the computing node passes verification, judges whether authentication achieves consensus, and completes final authentication of the candidate block.
In some embodiments of the present invention, the computing node randomly receives the hash value issued by the first preset number of other computing nodes, so that the number of computing nodes calculated in each computation can be guaranteed to be the first preset number, and the computing efficiency is improved while the computing amount is reduced.
By adopting the scheme, the application combines the cluster application scene of the calculation power base, each calculation node can be used as an accounting node, the task acceptance records of the calculation nodes in the cluster, which replace the calculation nodes sent by the users, are collected, and written into the account book of the blockchain. Any computing node is used as an accounting node, once an alternative block is generated, a broadcast message mode is published, other accounting nodes send confirmation notices if the block is approved, a large amount of calculation is not needed in the whole new block generation process, and the achievement of the consensus can be completed only by carrying out a plurality of times of message publishing and confirmation in a block chain, so that the efficiency is greatly improved, hash values published by other computing nodes of a first preset number are randomly received in the block approval process, the hash values of the accounting nodes are compared with the hash values published by other computing nodes, the one-by-one comparison is not needed, and the authentication efficiency is improved while the calculation force is saved.
In some embodiments of the present invention, in the step of receiving the power task acceptance records of other computing nodes in the power network blockchain, generating an alternative block based on all of the power task acceptance records, generating an alternative block based on the earliest power task acceptance record based on the time record in the power task acceptance records.
In a specific implementation, the time stamp in the calculation power receiving record of each calculation node may be different due to the problems of delay and the like possibly existing in the transmission process.
In some embodiments of the present invention, in the step of determining the most identical candidate blocks based on the candidate blocks generated by the computing node and the received published candidate blocks of other computing nodes, and determining the self-authenticated candidate blocks based on the most identical candidate blocks, the candidate blocks in the computing node are compared to obtain the most identical candidate blocks in the candidate blocks of the computing node, the ratio of the most identical candidate blocks in the candidate blocks of the computing node to the total number of the candidate blocks of the computing node is obtained by processing, and the authenticated candidate blocks are determined by comparing with a preset first threshold value.
In some embodiments of the present invention, in the step of calculating the ratio of the number of candidate blocks identical to the candidate block generated by itself to the total number of comparisons, the calculation is based on the following formula:
The same number of candidate blocks as the candidate block itself is generated/the total number of comparisons.
In some embodiments of the present invention, in the step of comparing with the preset first threshold value to determine whether to authenticate the candidate block of the user, if the ratio of the number of candidate blocks identical to the candidate block generated by the user to the total number of comparisons is greater than the preset first threshold value, then determining to authenticate the candidate block of the user.
In some embodiments of the present invention, in the step of comparing the hash value of the user with the hash values issued by the other computing nodes of the first preset number, the number of hash values issued by the other computing nodes, which are the same as the user hash value, in the comparison process is recorded, and the ratio of the same number of hash values to the first preset number is calculated and compared with the preset second threshold.
In some embodiments of the present invention, in the step of calculating the ratio of the same number of hash values to the first preset number, the following formula is used:
the same number of hash values/first preset number.
In some embodiments of the present invention, in the step of comparing the hash value of itself with the hash value issued by the other computing node of the first preset number received, and determining whether the authentication achieves the consensus, the ratio of the same hash value number to the first preset number is calculated and compared with a preset second threshold, and if the ratio is greater than the preset second threshold, the agreement is directly determined.
By adopting the scheme, the consensus mechanism of the scheme is combined with the cluster application scene of the calculation power base, a large amount of calculation is not needed, but only a plurality of message release times are needed in the block chain, simple mathematical statistics is carried out, so that the achievement of consensus can be completed, and the efficiency is greatly improved.
In some embodiments of the invention, the first threshold and the second threshold are each greater than or equal to 1/2.
In a specific implementation, the first threshold value and the second threshold value may be 1/2, 2/3 or 3/5, and preferably 2/3.
In some embodiments of the present invention, each of the computing nodes is provided with a number, a comparison vector is constructed in the step of comparing the hash value of the computing node with the hash value issued by the other computing nodes of the first preset number, each dimension corresponds to one computing node in the blockchain of the computing power network, in the process of constructing the comparison vector, if the hash value of the computing node is the same as the computing node corresponding to the dimension, a first parameter is filled in the dimension, if the hash value of the computing node is different from the computing node corresponding to the dimension, a second parameter is filled, and if the hash value of the computing node is not the same as the computing node corresponding to the dimension, a third parameter is filled in.
In the implementation process, the first parameter, the second parameter and the third parameter are natural numbers.
In the implementation process, since the hash values of the received computing nodes are all the first preset number, the sum of the numbers of the first parameter and the second parameter in the comparison vector of the scheme can be ensured to be the first preset number.
In some embodiments of the present invention, in the step of calculating the ratio of the same number of hash values to the first preset number in the step of recording the number of hash values issued by other calculation nodes that are the same as the hash value of the other calculation nodes in the comparison process, the ratio of the number of first parameters to the number of first parameters and the number of second parameters in the comparison vector is calculated.
By adopting the scheme, the quantity of the first parameters and the quantity of the second parameters can be clarified through the generated comparison vector, and the calculation nodes corresponding to the hash values which are not compared can be clarified, so that on one hand, the ratio of the same hash value quantity to the first preset quantity can be rapidly calculated, and on the other hand, the calculation nodes corresponding to the hash values which are not compared can be clarified through the third parameters, and the processing precision is ensured.
In some embodiments of the present invention, in the step of comparing the hash value of the self with the hash values issued by the other computing nodes of the received first preset number, and determining whether authentication is agreed, if the ratio of the same hash value number to the first preset number is greater than a preset second threshold, randomly selecting the dimension in which the second preset number of first parameters are located from the comparison vectors constructed by the self, obtaining the comparison vector constructed by the computing node corresponding to the dimension, constructing a plurality of comparison vectors as a comparison matrix, and determining whether authentication is agreed based on the comparison matrix.
In some embodiments of the present invention, since each dimension corresponds to one computing node in the blockchain of the computing power network in the comparison vector, the present invention can determine the corresponding computing node through the dimension where the first parameter is located, and further since the present invention randomly selects the dimension where the second preset number of first parameters are located from the comparison vector constructed by itself, the number of rows of the comparison matrix in the present invention is the second preset number.
By adopting the scheme, in the construction process of the contrast matrix, the dimension of the second preset number of first parameters is randomly selected from the contrast vectors constructed by the contrast matrix, the contrast vector constructed by the computing node corresponding to the dimension is obtained, and as the computing node corresponding to the dimension of the first parameters is the same as the hash value of the computing node, the corresponding relationship exists between the computing node and the computing node, but the contrast vector of the computing node is different from the contrast vector of the computing node in the maximum probability, the scheme constructs a plurality of contrast vectors with the corresponding relationship as the contrast matrix, performs joint calculation on a plurality of contrast vectors with the corresponding relationship, reduces the accuracy brought by the missing part dimension of the single contrast vector, and improves the authentication accuracy through the plurality of contrast vectors with the corresponding relationship in the contrast matrix.
In some embodiments of the present invention, in the step of determining whether to authenticate agreement based on the comparison matrix, the comparison matrix is input into a pre-trained neural network model, and whether to authenticate agreement is determined based on a classification result of the neural network model.
By adopting the scheme, the neural network model can efficiently and accurately determine consensus through a plurality of contrast vectors with corresponding relations based on the corresponding relations existing among the rows in the contrast matrix.
The embodiment of the invention also provides a consensus determining system for an intranet environment, which comprises a computer device, wherein the computer device comprises a processor and a memory, the memory is stored with computer instructions, the processor is used for executing the computer instructions stored in the memory, and the system realizes the steps realized by the method when the computer instructions are executed by the processor.
The embodiment of the invention also provides a computer readable storage medium, on which a computer program is stored, which when being executed by a processor, realizes the steps realized by the consensus determination method for an intranet environment. The computer readable storage medium may be a tangible storage medium such as Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, floppy disks, hard disk, a removable memory disk, a CD-ROM, or any other form of storage medium known in the art.
Those of ordinary skill in the art will appreciate that the various illustrative components, systems, and methods described in connection with the embodiments disclosed herein can be implemented as hardware, software, or a combination of both. The particular implementation is hardware or software dependent on the specific application of the solution and the design constraints. 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 invention. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, a plug-in, a function card, or the like. When implemented in software, the elements of the invention are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine readable medium or transmitted over transmission media or communication links by a data signal carried in a carrier wave.
It should be understood that the invention is not limited to the particular arrangements and instrumentality described above and shown in the drawings. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and shown as examples. The method processes of the present invention are not limited to the specific steps described and shown, but various changes, modifications and additions, or the order between steps may be made by those skilled in the art after appreciating the spirit of the present invention.
In this disclosure, features that are described and/or illustrated with respect to one embodiment may be used in the same way or in a similar way in one or more other embodiments and/or in combination with or instead of the features of the other embodiments.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, and various modifications and variations can be made to the embodiments of the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (7)

1. A consensus determination method for an intranet environment, wherein the method is applied to a computational power network blockchain of a blockchain multi-component computational power base, the computational power network blockchain comprises a plurality of computing nodes, and the method comprises the following steps:
a computing node in the computing power network block chain receives the computing power task issued in the computing power network block chain and generates a computing power task acceptance record aiming at the computing power task;
receiving calculation task receiving records of other calculation nodes in a calculation network block chain, generating alternative blocks based on all calculation task receiving records, issuing the generated alternative blocks in a broadcast message mode of private key signature in the calculation network block chain, and receiving the alternative blocks issued in a broadcast message mode of private key signature of the other calculation nodes;
Determining the number of the most identical candidate blocks based on the candidate blocks generated by the computing node and the received published candidate blocks of other computing nodes, and determining the self-authenticated candidate blocks based on the number of the most identical candidate blocks;
the computing node computes the hash value of the self-authenticated alternative block and issues the hash value in a broadcast message mode of private key signature in a computing power network block chain;
After the private key signature of the comparison vector is verified, the self hash value is compared with the hash value issued by the other computing nodes with the first preset number, the number of the hash values issued by the other computing nodes with the same hash value in the comparison process is recorded, the ratio of the same hash value number to the first preset number is calculated and compared with a preset second threshold, each computing node is correspondingly provided with a number, a comparison vector is constructed, in the comparison vector, each dimension corresponds to one computing node in a computing force network block chain, in the construction process of the comparison vector, if the self hash value is the same as the computing node corresponding to the dimension, the first parameter is filled in the dimension, if the self hash value is different from the computing node corresponding to the dimension, the second parameter is filled in, if the self hash value is not compared with the computing node corresponding to the dimension, the third parameter is filled in, whether the authentication vector is achieved or not is judged, if the same hash value number is greater than the preset ratio, the second parameter is greater than the preset number, the comparison vector is calculated from the second parameter, the comparison vector is constructed, and the comparison vector is finally compared, and whether the comparison vector is constructed is judged, and the comparison vector is finally is constructed.
2. The consensus determination method for an intranet environment according to claim 1, wherein in the step of receiving the power task acceptance records of other computing nodes in the power network blockchain, generating the candidate block based on all the power task acceptance records, generating the candidate block based on the earliest power task acceptance record based on the time record in the power task acceptance records.
3. The consensus determining method for an intranet environment according to claim 1, wherein in the step of determining the most identical candidate blocks based on the candidate blocks generated by the computing node itself and the received published candidate blocks of other computing nodes, and determining the self-authenticated candidate blocks based on the most identical candidate blocks, the candidate blocks in the computing node are compared to obtain the most identical candidate blocks in the candidate blocks of the computing node, the ratio of the most identical candidate blocks in the candidate blocks of the computing node to the total number of candidate blocks of the computing node is processed, and compared with a preset first threshold value, and the authenticated candidate blocks are determined.
4. The consensus determining method for an intranet environment according to claim 3, wherein the first threshold and the second threshold are each greater than or equal to 1/2.
5. The consensus determining method for an intranet environment according to claim 1, wherein in the step of calculating a ratio of the same number of hash values to a first preset number by counting the number of hash values issued by other calculation nodes having the same hash value as the hash value of the comparison node in the record comparison process, a ratio of the number of first parameters to the number of first parameters and the number of second parameters in the comparison vector is calculated.
6. The consensus determining method for an intranet environment according to claim 1, wherein in the step of determining whether to authenticate to agree based on the comparison matrix, the comparison matrix is input into a pre-trained neural network model, and whether to authenticate to agree is determined based on a classification result of the neural network model.
7. A consensus determination system for an intranet environment, the system comprising a computer device comprising a processor and a memory, the memory having stored therein computer instructions, the processor being configured to execute the computer instructions stored in the memory, the system implementing the steps implemented by the method according to any one of claims 1-6 when the computer instructions are executed by the processor.
CN202410699422.6A 2024-05-31 2024-05-31 Consensus determining method and system for intranet environment Active CN118264387B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410699422.6A CN118264387B (en) 2024-05-31 2024-05-31 Consensus determining method and system for intranet environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410699422.6A CN118264387B (en) 2024-05-31 2024-05-31 Consensus determining method and system for intranet environment

Publications (2)

Publication Number Publication Date
CN118264387A CN118264387A (en) 2024-06-28
CN118264387B true CN118264387B (en) 2024-07-26

Family

ID=91602872

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410699422.6A Active CN118264387B (en) 2024-05-31 2024-05-31 Consensus determining method and system for intranet environment

Country Status (1)

Country Link
CN (1) CN118264387B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA3141042A1 (en) * 2019-06-13 2020-12-17 Luis Eduardo Gutierrez-Sheris System and method using a fitness-gradient blockchain consensus and providing advanced distributed ledger capabilities via specialized data records
CN115344879A (en) * 2022-09-01 2022-11-15 中国联合网络通信集团有限公司 Consensus method based on block chain network, storage node and miner node

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2706459C1 (en) * 2018-08-08 2019-11-19 Максим Михайлович Михайленко Method of single coordinated decision making in distributed computer system
CN117436138A (en) * 2023-11-01 2024-01-23 国网吉林省电力有限公司 Power grid data safety processing method and system based on block chain

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA3141042A1 (en) * 2019-06-13 2020-12-17 Luis Eduardo Gutierrez-Sheris System and method using a fitness-gradient blockchain consensus and providing advanced distributed ledger capabilities via specialized data records
CN115344879A (en) * 2022-09-01 2022-11-15 中国联合网络通信集团有限公司 Consensus method based on block chain network, storage node and miner node

Also Published As

Publication number Publication date
CN118264387A (en) 2024-06-28

Similar Documents

Publication Publication Date Title
CN110599261B (en) Electric automobile safety electric power transaction and excitation system based on energy source block chain
Tian et al. A blockchain-based machine learning framework for edge services in IIoT
CN112084257B (en) Efficient database machine learning verification
US7363492B2 (en) Method for zero-knowledge authentication of a prover by a verifier providing a user-selectable confidence level and associated application devices
CN109726887A (en) The acquisition of mobile crowdsourcing Data Data and processing system and method based on block chain
Kim et al. Blockchain based energy trading scheme for vehicle-to-vehicle using decentralized identifiers
Wang et al. DAG blockchain-based lightweight authentication and authorization scheme for IoT devices
CN116405187B (en) Distributed node intrusion situation sensing method based on block chain
CN114503146A (en) Method and apparatus for registration and authentication of miner identity in a blockchain network
CN112651830A (en) Block chain consensus method applied to power resource sharing network
CN110868295A (en) Anti-quantum computing alliance chain system based on secret sharing and communication method
Hong et al. A secure peer to peer multiparty transaction scheme based on blockchain
CN113676447A (en) Block chain-based scientific and technological service platform cross-domain identity authentication scheme
CN111385096A (en) Block chain network, signature processing method, terminal and storage medium
Das Toward next generation of blockchain using improvized bitcoin-ng
CN110990790B (en) Data processing method and equipment
CN112583598A (en) Complex Internet of things alliance chain system communication mechanism
Guo et al. A double auction for charging scheduling among vehicles using DAG-blockchains
KR102610531B1 (en) A neural consensus proof based block chain network platform system constructed by using a non-random consensus proof-based blockchain network
Liu et al. A blockchain-based cross-domain authentication management system for IoT devices
An et al. Blockchain technology research and application: A literature review and future trends
Huang et al. Data Availability and Decentralization: New Techniques for zk-Rollups in Layer 2 Blockchain Networks
CN118264387B (en) Consensus determining method and system for intranet environment
Xiao et al. New digital signature algorithm based on ECC and its application in bitcoin and IoT
Dorri et al. Blockchain for Cyberphysical Systems

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