CN111741067B - Block chain-based tableware circulation information management method and device and block chain system - Google Patents

Block chain-based tableware circulation information management method and device and block chain system Download PDF

Info

Publication number
CN111741067B
CN111741067B CN202010429054.5A CN202010429054A CN111741067B CN 111741067 B CN111741067 B CN 111741067B CN 202010429054 A CN202010429054 A CN 202010429054A CN 111741067 B CN111741067 B CN 111741067B
Authority
CN
China
Prior art keywords
node
authorization
information
nodes
authorized
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
CN202010429054.5A
Other languages
Chinese (zh)
Other versions
CN111741067A (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.)
Guangdong Gree Digital Services Co ltd
Original Assignee
Guangzhou Geli Network 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 Guangzhou Geli Network Technology Co ltd filed Critical Guangzhou Geli Network Technology Co ltd
Priority to CN202010429054.5A priority Critical patent/CN111741067B/en
Publication of CN111741067A publication Critical patent/CN111741067A/en
Application granted granted Critical
Publication of CN111741067B publication Critical patent/CN111741067B/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
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/12Hotels or restaurants
    • 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/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/562Brokering proxy services
    • 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/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02WCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO WASTEWATER TREATMENT OR WASTE MANAGEMENT
    • Y02W90/00Enabling technologies or technologies with a potential or indirect contribution to greenhouse gas [GHG] emissions mitigation

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Business, Economics & Management (AREA)
  • Tourism & Hospitality (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Marketing (AREA)
  • Computing Systems (AREA)
  • Strategic Management (AREA)
  • Economics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Technology Law (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Primary Health Care (AREA)
  • Human Resources & Organizations (AREA)
  • Power Engineering (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a block chain-based tableware circulation information management method and device and a block chain system, wherein the method comprises the following steps: the first authorization node with the last accounting authority selects one authorization node from the rest authorization nodes as a proxy node; the agent node collects the voting results of each authorization node in the rest authorization nodes except the agent node and counts all the collected voting results to obtain the authorization node with the highest vote number as the second authorization node with the current accounting authority; and the second authorization node acquires the tableware circulation information to be packaged, packages the tableware circulation information to be packaged into blocks and broadcasts the blocks to all other authorization nodes so that each authorization node adds the received blocks to the block chain at the authorization node. Therefore, the block chain system can be applied to the management of the tableware circulation information of the recyclable tableware by implementing the invention, thereby realizing the safe and effective management of the tableware circulation information and being beneficial to improving the use safety of the recyclable tableware.

Description

Block chain-based tableware circulation information management method and device and block chain system
Technical Field
The invention relates to the technical field of block chains, in particular to a block chain-based tableware circulation information management method and device and a block chain system.
Background
With the rapid development of take-away meal delivery services, the problems caused by disposable tableware (such as disposable plastic meal boxes) are becoming more serious. Chinese puts forward garbage classification measures, which realize garbage classification to a certain extent, but the problems brought by disposable tableware are not relieved. In order to reduce the use of disposable tableware in the catering industry, the concept of recyclable tableware has been proposed, namely: the catering trade company receives the takeaway order and then holds the food and delivers the food to the ordering person through the recyclable food and beverage appliance, when the ordering person finishes the meal, the recyclable food and beverage appliance is returned, for example, returned to a matched tableware recovery cabinet or called to recover personnel, and the recyclable food and beverage appliance is delivered to the catering trade company through strict warehousing, disinfection and ex-warehouse processes after being recovered.
Therefore, in order to improve the use safety of the recyclable catering utensils, how to effectively manage the circulation information of the recyclable catering utensils is very important.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a method and an apparatus for managing tableware circulation information based on a block chain, and a block chain system, which can combine the block chain with the circulation management of tableware to realize effective management of the tableware circulation information.
In order to solve the above technical problem, a first aspect of the embodiments of the present invention discloses a method for managing tableware circulation information based on a blockchain, where the method is applied to a blockchain system, the blockchain system includes a plurality of authorized nodes, and the method includes:
the first authorization node selects one authorization node from the rest authorization nodes except the first authorization node as a proxy node, wherein the first authorization node is the last authorization node with accounting authority in all the authorization nodes;
the agent node collects the voting result of each authorization node in the rest authorization nodes except the agent node in all the authorization nodes, and counts all the collected voting results to obtain the authorization node with the highest vote number as the second authorization node with the current accounting authority;
and the second authorization node acquires the tableware circulation information to be packaged, packages the tableware circulation information to be packaged into blocks and broadcasts the blocks to all other authorization nodes, so that each authorization node adds all the received blocks to a block chain at the authorization node.
The second aspect of the embodiment of the present invention discloses an authorization node, where the authorization node is a first authorization node that has an accounting right last time among all authorization nodes of a blockchain system, and the first authorization node includes:
a designating module, configured to select one authorized node from remaining authorized nodes except the first authorized node in all authorized nodes of the blockchain system, as a proxy node;
the agent node is used for collecting the voting result of each authorization node in the rest authorization nodes except the agent node in all the authorization nodes of the block chain system, and counting all the collected voting results to obtain the authorization node with the highest vote number as the second authorization node with the current accounting authority;
the second authorization node is used for acquiring tableware circulation information to be packaged, packaging the tableware circulation information to be packaged into blocks and broadcasting the blocks to all other authorization nodes, so that each authorization node adds all the received blocks to a block chain at the authorization node.
The third aspect of the embodiment of the present invention discloses another authorization node, where the authorization node is a proxy node specified by a first authorization node having an accounting right last time among all authorization nodes of a blockchain system, and the proxy node includes:
the collection module is used for collecting the voting result of each authorization node in the rest authorization nodes except the proxy node in all the authorization nodes;
the counting module is used for counting all the collected voting results to obtain an authorization node with the highest vote number, and the authorization node is used as a second authorization node with the accounting authority;
the second authorization node is configured to obtain tableware circulation information to be packaged, package the tableware circulation information to be packaged into blocks, and broadcast the blocks to all other authorization nodes, so that each authorization node adds all received blocks to a block chain at the authorization node.
The fourth aspect of the present invention discloses another authorization node, where the authorization node is a second authorization node that has a highest ticket number counted by a proxy node specified by a first authorization node having a last accounting authority and has an accounting authority this time among all authorization nodes of a block chain system, and the second authorization node includes:
the first acquisition module is used for acquiring the circulation information of the tableware to be packaged;
the packaging module is used for packaging the tableware circulation information to be packaged into blocks;
and the block broadcasting module is used for broadcasting all the blocks packed by the packing module to all other authorized nodes except the second authorized node so that the authorized nodes receiving all the blocks add the blocks to the block chain at the authorized node.
The fifth aspect of the present invention discloses another authorization node, where the authorization node includes:
a memory storing executable program code;
a processor coupled with the memory;
the processor calls the executable program code stored in the memory to execute part or all of the steps of the block chain-based tableware circulation information management method disclosed by the first aspect of the embodiment of the invention.
A sixth aspect of the embodiments of the present invention discloses a computer-readable storage medium, where the computer-readable storage medium stores computer instructions, and when the computer instructions are called, the computer instructions are configured to perform some or all of the steps in the block chain-based tableware circulation information management method disclosed in the first aspect of the embodiments of the present invention.
The seventh embodiment of the present invention discloses a blockchain system, which includes a plurality of authorized nodes, and is used to implement the steps in the block chain-based tableware circulation information management method disclosed in the first aspect of the present invention.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, in a block chain system applied to tableware circulation information management, a first authorization node selects one authorization node from the rest authorization nodes except the first authorization node as a proxy node, and the first authorization node is the authorization node with the accounting authority at the last time in all the authorization nodes; the agent node collects the voting results of each authorization node in the rest authorization nodes except the agent node in all the authorization nodes, and counts all the collected voting results to obtain the authorization node with the highest vote number as the second authorization node with the accounting authority at this time; and the second authorization node acquires the tableware circulation information to be packaged, packages the tableware circulation information to be packaged into blocks and broadcasts the blocks to all other authorization nodes, so that each authorization node adds all the received blocks to a block chain at the authorization node. Therefore, the block chain system can be applied to the tableware circulation information management of the recyclable tableware by implementing the invention, realizes the safe and effective management of the tableware circulation information of the recyclable tableware, is beneficial to improving the use safety of the recyclable tableware, and in addition, a new consensus mechanism is introduced in the blockchain system, and after the user submits the circulation information of the tableware to be packaged, the authorization nodes do not need to contend for the accounting authority by calculating the appointed characters, and the proxy nodes appointed by the authorization nodes with the accounting authority at the last time only need to count the voting results of the rest authorization nodes except the proxy nodes, so that the fairness for determining the authorization nodes with the accounting authority is improved, a large amount of computing resources are not needed to be consumed, the efficiency for determining the authorization nodes with the accounting authority is improved, and then be favorable to improving the efficiency of packing into the block and adding to the block chain with the tableware circulation information of treating the packing.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a scene diagram of an application scenario disclosed in an embodiment of the present invention;
FIG. 2 is a flow chart of a block chain-based tableware circulation information management method according to an embodiment of the present invention;
FIG. 3 is a flow chart of another block chain-based tableware circulation information management method according to the embodiment of the present invention;
FIG. 4 is a schematic structural diagram of an authorization node according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of another authorization node disclosed in the embodiment of the present invention;
FIG. 6 is a schematic structural diagram of another authorization node disclosed in the embodiment of the present invention;
FIG. 7 is a schematic structural diagram of another authorization node disclosed in the embodiment of the present invention;
FIG. 8 is a block diagram according to an embodiment of the present invention;
FIG. 9 is a block diagram illustrating another embodiment of the present invention;
fig. 10 is a schematic diagram illustrating a principle of implementing management of tableware circulation information based on a blockchain system according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," and the like in the description and claims of the present invention and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, article, or article that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or article.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The invention discloses a block chain-based tableware circulation information management method, a block chain-based tableware circulation information management device and a block chain system, which can be used for applying the block chain system to the tableware circulation information management of recyclable tableware, realize the safe and effective management of the tableware circulation information of the recyclable tableware, and are favorable for improving the use safety of the recyclable tableware, in addition, a new consensus mechanism is introduced into the block chain system, after a user submits the tableware circulation information to be packaged, all authorization nodes do not need to contend for accounting authority in a mode of calculating appointed characters, only the agent nodes appointed by the authorization nodes with the accounting authority last time need to count the voting results of the rest authorization nodes except the agent nodes, so that the fairness of determining the authorization nodes with the accounting authority is improved, a large amount of computing resources are not needed to be consumed, energy is saved, and the efficiency of determining the authorization nodes with the accounting authority is improved, and then be favorable to improving the efficiency of packing into the block and adding to the block chain with the tableware circulation information of treating the packing. The following are detailed descriptions.
In order to better understand the tableware circulation information management method and device based on the block chain and the block chain system disclosed in the present invention, first, one of the scenarios applied in the embodiment of the present invention is described, please refer to fig. 1, and fig. 1 is a scenario diagram of an application scenario disclosed in the embodiment of the present invention. The application scenario shown in fig. 1 is mainly a circulation scenario of recyclable tableware, and the specific circulation process is as follows: the recyclable tableware is delivered to corresponding catering merchants after being delivered from the warehouse, along with the ordering behavior (such as take-out ordering behavior) or the tableware leasing behavior of consumers, the recyclable tableware is circulated from the catering merchants to the consumers, the recyclable tableware can be recycled by recycling personnel on the door after being used by the consumers, the recyclable tableware can be placed in a tableware recycling cabinet, the recyclable tableware can be returned to the catering merchants, the returned recyclable tableware is transported to a dining and sterilizing factory through logistics, in the dining and sterilizing factory, the recyclable tableware can arrive at a residual area to primarily clean residues in the recyclable tableware and then be transported to a cleaning area to perform assembly line cleaning and sterilizing on the recyclable tableware, after the recyclable tableware is cleaned and sterilized, the recyclable tableware is transported to a packaging area to perform assembly line packaging on the recyclable tableware, and after the recyclable tableware is packaged, the packaged recyclable tableware can be conveyed to a warehouse, and when a catering business needs to rent the recyclable tableware, the recyclable tableware is taken out of the warehouse and distributed to the corresponding catering business, so that the recyclable tableware is circulated. Preferably, before or after the recyclable tableware is subjected to the in-line packaging, the recyclable tableware after being washed and sterilized can be detected by the detection center to generate a corresponding detection report.
Furthermore, a monitoring device is arranged at least one link of the dining and dining factory to monitor the related operation of the recyclable tableware in the link in real time and further form a monitoring video file.
Furthermore, each link of the recyclable tableware in the circulation process has corresponding tableware circulation information, and the tableware circulation information can be reported to a dining and dining management system by a user of the corresponding link through corresponding terminal equipment or a user terminal, in addition, for a consumer, the circulation tracing of the recyclable tableware can be realized through the dining and dining management system, and further, the related tracing information of the recyclable tableware and/or the related information of a catering merchant can be fed back (text feedback, video feedback and the like); for the food and beverage factory, the related data (such as the pipeline data, the related date, the disinfection batch, the detection report, the real-time state of the recyclable tableware, etc.) of the food and beverage factory can be uploaded to the food and beverage operation management system, and intelligent and convenient management can be realized through the food and beverage operation management system, such as at least one of management of the recyclable tableware in and out, management of the uploaded detection report, customer management and report management. Still further, a government supervision department can perform information interaction with the dining and dining operation management system through a supervision terminal to realize circulation supervision of the recyclable tableware, such as supervision of relevant information fed back by catering merchants, dining enterprises and consumers, and specifically can realize video monitoring of operation flows of the catering enterprises and the dining merchants, register public instructions of illegal acts and timely handle consumer complaints.
Further, the tableware circulation information corresponding to each link of the recyclable tableware in the circulation process can also be uploaded to the block chain of each authorization node in the block chain system by the user through the authorization node of the block chain system to realize the management of the tableware circulation information based on the block chain system, that is, the dining operation management system can realize the management of the tableware circulation information based on the block chain system, and the block chain system can include a plurality of authorization nodes, which can include a dining factory node, a plurality of dining enterprise nodes, a plurality of dining merchant nodes, a plurality of consumer nodes, and the like Cleaning and sterilizing area nodes, packaging area nodes, detection area nodes, warehouse nodes and the like. Further, the authorized nodes included in the blockchain system can be increased or decreased according to actual situations, existing authorized nodes can exit the blockchain system, and new objects (such as consumers, catering merchants, logistics carriers, entry recyclers, and the like) can also be added into the blockchain system to become authorized nodes after obtaining authorization of the blockchain system. Further, if a certain object needs to use the blockchain system, the blockchain system needs to allocate a public key and a private key for the certain object, and further needs to allocate a user ID for the certain object or authorize the user ID input by the certain object; if an object needs to be added into the blockchain system to become an authorization node, the object needs to be allocated with a public key, a private key and an authorization code by the blockchain system, and further needs to be allocated with a user ID by the blockchain system or authorized for the user ID input by the object. The details will be described below.
Example one
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for managing tableware circulation information based on a block chain according to an embodiment of the present invention. The method described in fig. 2 is applied to a blockchain system, which may include a plurality of authorized nodes. As shown in fig. 2, the method may include the operations of:
101. the first authorized node selects one authorized node from the rest authorized nodes except the first authorized node as a proxy node.
In the embodiment of the invention, the first authorization node is an authorization node which has the accounting authority last time in all the authorization nodes included in the blockchain system. It should be noted that, when the building of the blockchain system is completed, the first authorization node is an initial node, and when the blockchain system is subsequently applied to tableware circulation information management, the first authorization node is an authorization node having the last accounting authority among all authorization nodes included in the blockchain system, and the authorization node having the last accounting authority may be an originating node or an authorization node having the last accounting authority determined by a voting mechanism.
102. And the agent node collects the voting results of each authorization node in the rest authorization nodes except the agent node in all the authorization nodes, counts all the collected voting results to obtain the authorization node with the highest vote number, and serves as the second authorization node with the accounting authority at this time.
In the embodiment of the present invention, it should be noted that the agent node itself may or may not participate in the voting. If the agent node participates in voting, when the authorized node with the highest vote count is counted, the voting result of the agent node itself needs to be considered in addition to counting the collected voting result of each authorized node in other authorized nodes. It should be further noted that the agent node may collect the voting result of each authorized node in the remaining authorized nodes except the agent node in all the authorized nodes, or may collect only the voting result of each authorized node having the voting right in the remaining authorized nodes except the agent node in all the authorized nodes.
In the embodiment of the invention, the voting result of the authorization node is used for representing the authorization node which is selected by the authorization node at this time and has the accounting authority, and when the authorization node participates in voting, the method can select a preset number of authorization nodes for voting according to a preset requirement, the preset number can be one or a plurality of authorization nodes, preferably, the number of the authorization nodes selected by each authorization node during voting can be specifically determined by the number of the authorization nodes with the accounting authority actually required at this time, further optionally, the number of the authorization nodes with the accounting authority actually required at this time can be specifically determined by the data volume of the tableware circulation information to be packaged, and the more the data volume of the tableware circulation information to be packaged, the more the number of the authorization nodes with the accounting authority which are actually required at this time, and the embodiment of the invention is not limited. Therefore, the mode of determining the number of the actually required authorized nodes with the accounting authority according to the data volume of the tableware circulation information to be packaged is favorable for improving the efficiency of packaging the tableware circulation information to be packaged into blocks and adding the blocks to the block chain, the mode of setting the voting number is favorable for improving the validity of the voting result of the authorized nodes, and the occurrence of malicious voting is reduced.
In the embodiment of the present invention, after counting all voting results to obtain the authorized node with the highest vote number, the proxy node may further perform the following operations:
the proxy node broadcasts the related information of the second authorization node to all authorization nodes except the proxy node, so that the subsequent authorization nodes except the proxy node verify the identity of the second authorization node when receiving the block broadcast by the second authorization node.
Each authorization node has a node identifier uniquely corresponding to the node identifier, and may also have an IP address and/or a port number and/or a public key and/or a private key uniquely corresponding to the node identifier, and the related information of the second authorization node may include at least one of the node identifier of the second authorization node, the IP address of the second authorization node, the public key of the second authorization node, and the port number of the second authorization node, which is not limited in the embodiment of the present invention.
As an optional implementation manner, the counting, by the agent node, all the collected voting results to obtain an authorized node with the highest vote number, and as a second authorized node having the current accounting right, may include:
the agent node counts all the collected voting results to obtain all the voted authorization nodes to be voted and the vote number of each authorization node to be voted;
the proxy node determines a target authorization node to be selected with the highest ticket number according to the ticket number of each authorization node to be selected;
when the number of the target authorization nodes to be selected is one, the proxy node determines the target authorization nodes to be selected as second authorization nodes with the accounting authority at this time;
when the number of the target nodes to be authorized is at least two, the agent node selects one authorization node from all the target nodes to be authorized as a second authorization node with the accounting authority;
when the number of the target nodes to be authorized is at least two, the second authorized node is one of the authorized nodes randomly selected by the agent node from all the target nodes to be authorized; or the second authorized node is one authorized node which is selected by the agent node from all target authorized nodes to be selected and meets the preset node condition.
Optionally, each authorization node to be selected corresponds to a corresponding node parameter, and the real-time node parameter may be one or a combination of multiple types, such as response speed of the authorization node, total number of historical votes of the authorization node, total number of historical effective votes of the authorization node, and computing power of the authorization node.
Still further optionally, the counting, by the agent node, all the collected voting results to obtain all the voting authorization nodes to be voted and the number of votes of each authorization node to be voted may include:
and the agent node filters invalid voting results from all the collected voting results to obtain valid voting results, and determines all the voted authorization nodes to be voted and the vote number of each authorization node to be voted according to all the valid voting results.
The invalid voting result includes a voting result that the voting result is empty, a voting result that the number of the selected authorization nodes does not reach the preset number, or a voting result that a duplicate authorization node exists in the selected authorization nodes. Therefore, the mode of filtering the invalid voting results in the process of determining the second authorization node according to the voting mechanism is beneficial to reducing the processing resources required by the agent node for counting the voting results, and can improve the counting efficiency, and in addition, the fairness for selecting the authorization node with the accounting authority at this time can be further improved.
Optionally, after the authorization node generates the voting result, the authorization node may further generate a state identifier corresponding to the voting result according to whether the specific content of the voting result and the specific content of the voting result satisfy a preset content condition, and bear the state identifier on the voting result, so as to obtain the voting result required to be collected by the agent node. The status identifier is used for indicating whether the voting result is valid, if the content of the voting result meets the preset content condition, the status identifier is used for indicating that the voting result is valid, and if the content of the voting result does not meet the preset content condition, the status identifier is used for indicating that the voting result is invalid. Therefore, the mode of bearing the state identifier in the voting result enables the agent node to directly identify whether the voting result is an invalid voting result according to the state identifier borne by the voting result after receiving the voting result, and the specific content of the voting result does not need to be further analyzed, so that the efficiency of filtering the invalid voting result by the agent node is improved, and the efficiency of obtaining the second authorization result with the highest vote number through statistics is improved.
It should be noted that, when the number of the authorization nodes with the accounting authority required this time is multiple, after counting the number of votes of each authorization node to be selected, the proxy node may sort all authorization nodes to be selected according to the order of the number of votes from high to low, and select the authorization nodes to be selected that are N bits before the sorting as the multiple second authorization nodes with the accounting authority, where N is the number of the authorization nodes with the accounting authority required this time.
103. And the second authorization node acquires the tableware circulation information to be packaged, packages the tableware circulation information to be packaged into blocks and broadcasts the blocks to all other authorization nodes, so that each authorization node adds all the received blocks to a block chain at the authorization node.
In the embodiment of the invention, after the second authorized node packs the tableware circulation information to be packed into the blocks, the blocks obtained by packing need to be added to the block chain at the second authorized node, which is beneficial to realizing the synchronization of the blocks on the block chains of all the authorized nodes. Furthermore, when the second authorization node packs the tableware circulation information to be packed, the tableware circulation information to be packed can be packed when the quantity or number of the tableware circulation information to be packed reaches a set data quantity or number, and therefore the utilization rate of the second authorization node processing resources is improved. Still further, only when the circulation information of the tableware to be packaged reaches the set data volume or number, the steps 101 to 103 in the embodiment of the present invention are triggered, which is beneficial to improving the utilization rate of the node processing resources.
In the embodiment of the present invention, it should be noted that each authorization node is pre-configured with a plurality of information pools, different information pools are used for storing tableware circulation information of different information types, and each authorization node further has a block chain whose number is matched with that of the information pools, preferably, the information pools are in one-to-one correspondence with the block chains, that is, after tableware circulation information to be packaged, which is obtained or mined from one information pool, is packaged into a block and the block is broadcast to the authorization node, the authorization node adds the block to the corresponding block chain, so as to implement multi-chain parallelism, thereby facilitating effective and efficient management of the tableware circulation information. And when the number of the second authorization nodes is multiple, each second authorization node needs to execute step 103, the tableware circulation information to be packaged acquired by different second authorization nodes is different and has no overlap, and when a certain second authorization node executes step 103, other second authorization nodes also belong to other authorization nodes except the certain second authorization node.
Further alternatively, the plurality of information pools (also called "information pool set") pre-constructed at each authorization node may include at least one of a data pool for storing traceability information submitted by a user through one of the authorization nodes for tracing circulation of the recyclable tableware, such as one or more sets of cleaning and disinfecting information of the recyclable tableware at a dining and sterilizing plant, packaging lot information, detection reports, warehouse entry and exit information, restaurant information circulated to after warehouse exit, consumer information of the recyclable tableware rented or used by ordering for takeout, recycling information of the recyclable tableware, and the like, a transaction pool for storing transaction information submitted by the user through one of the authorization nodes for generating virtual resource transaction during circulation of the recyclable tableware, for example, the combination of one or more of information corresponding to a deposit required to be paid by a consumer for using the recyclable tableware, information corresponding to a deposit required to be refunded when the recyclable tableware is successfully recovered, information corresponding to a reward required to be issued to a recovery person after the recovery person successfully recovers the recyclable tableware, and the like, the intelligent contract pool is used for storing contract information which is submitted by the user through one of authorization nodes and is leased and/or returned by the recyclable tableware, wherein when the recyclable tableware is used or leased by the consumer, corresponding contract information is generated, namely, an intelligent contract is generated; when the consumer can recycle the tableware and return the tableware, the corresponding contract information is triggered, and the embodiment of the invention is not limited. And the blockchain at each authorization node can comprise one or more of a blockchain matched with the data pool, a blockchain matched with the transaction pool and a blockchain matched with the intelligent contract pool, and the specifically included blockchain is matched with a pre-constructed information pool at the authorization node.
In the embodiment of the present invention, since the tableware circulation information of the recyclable tableware in the circulation process includes a plurality of information types, all the tableware circulation information of one recyclable tableware is distributed on different block chains, and the tableware circulation information is associated through the tableware identifier uniquely corresponding to the recyclable tableware, or through the user identifier uniquely corresponding to the consumer using the recyclable tableware, or through a combination of the two, the embodiment of the present invention is not limited.
It should be noted that the number of the information pools pre-constructed at each authorized node and the information type of the information stored in each information pool may be adaptively adjusted according to the actual situation, and all authorized nodes in the blockchain system may form a federation chain. And the tableware circulation information with large data volume related in the tableware circulation information can be not packaged into blocks and added to the block chain, and at the moment, the tableware circulation information can be uploaded and stored in the central server to reduce the data volume of the block chain, so that the search efficiency and the reading efficiency of the data on the block chain are improved.
It should be noted that the tableware circulation information to be packaged may be uploaded or submitted by a plurality of users through a plurality of authorized nodes, the tableware circulation information submitted or uploaded by each user or each authorized node may be referred to as 1 event, and when the tableware circulation information to be packaged includes a plurality of events, the process of packaging the block by the second authorized node may include: calculating the hash value of each event to obtain a plurality of hash values, grouping the obtained plurality of hash values to obtain a plurality of groups of hash values, calculating the hash value of each group of hash values to obtain a plurality of hash values, continuously executing the steps of grouping the obtained plurality of hash values to obtain a plurality of groups of hash values, calculating the hash value of each group of hash values to obtain a plurality of hash values until obtaining a total hash value corresponding to the tableware circulation information to be packaged, so as to form a corresponding block. When the total hash value changes, the authorization node can determine that the block is tampered or damaged without adding the block to a corresponding block chain, and when any hash value on the block changes, all hash values on the upper layer of the block can be changed, and specific damaged or changed events can be found from top to bottom through the changed hash values.
Optionally, the structure of the block mentioned in the embodiment of the present invention may be a tree structure or a chain structure, which is not limited in the embodiment of the present invention. The structure of the tree-structured block can be as shown in fig. 8, and the structure of the chain-structured block can be as shown in fig. 9. In the blocks of the chain structure, one block includes, in addition to specific data and a corresponding hash value, a node identifier of an authorized node packaged to obtain the block, and further may include a node identifier of an authorized node counted from the authorized node and/or a node identifier of an authorized node designated to the authorized node.
In the embodiment of the present invention, taking a block with a tree structure as an example, the implementation principle of the block chain system applied to the management of the tableware circulation information may be as shown in fig. 10, and fig. 10 is a schematic diagram of the principle of implementing the management of the tableware circulation information based on the block chain system disclosed in the embodiment of the present invention.
In an optional embodiment, the method may further comprise the operations of:
any authorization node receives an inquiry request triggered by a certain user and aiming at tableware circulation information of certain recyclable tableware, wherein the inquiry request at least comprises a tableware identification uniquely corresponding to the certain recyclable tableware and/or a user identification uniquely corresponding to a consumer using (or renting) the recyclable tableware, and optionally, the information type of the tableware circulation information inquired by the certain user;
the authorization node judges whether the query request is legal or not, and when the query request is judged to be legal, all blocks matched with the query request are searched in parallel from all block chains at the authorization node;
the authorization node analyzes the tableware circulation information contained in all the searched blocks and outputs the analyzed tableware circulation information.
Still further optionally, the outputting, by the authorization node, the analyzed tableware circulation information may include:
the authorization node arranges the analyzed tableware circulation information into a default format or a format appointed by a certain user, and outputs the tableware circulation information arranged into a corresponding format.
Therefore, when the query request of the user for the tableware circulation information exists, the optional embodiment can search the corresponding blocks from the plurality of block chains in parallel, and the query efficiency of the tableware circulation information is improved.
In yet another alternative embodiment, the obtaining, by the second authorized node, the tableware distribution information to be packaged, packaging the tableware distribution information to be packaged into blocks, and broadcasting the blocks to all other authorized nodes may include:
the second authorization node determines at least one target information pool from a pre-established information pool set, wherein the target information pool stores tableware circulation information to be packaged, and different information pools are used for storing tableware circulation information of different information types;
the second authorization node acquires tableware circulation information to be packaged stored in each target information pool;
and the second authorization node respectively packages the tableware circulation information to be packaged, which is acquired from each target information pool and stored in the target information pool, into blocks matched with the information types of the tableware circulation information stored in the target information pool, and broadcasts all the packaged blocks to all other authorization nodes.
Optionally, after obtaining the tableware circulation information to be packaged stored in each target information pool from the target information pool, the second authorization node may determine whether all the obtained tableware circulation information to be packaged reaches a set quantity value or a set number, and if so, perform subsequent packaging and broadcasting operations.
Therefore, in the optional embodiment, after the authorization node with the accounting authority is determined through a voting mechanism, the authorization node acquires the tableware circulation information to be packaged from the information pool in which the tableware circulation information to be packaged is stored, packages the tableware circulation information to be packaged into blocks according to the information types, and broadcasts the blocks to all other authorization nodes, so that the tableware circulation information management based on the block chain system is realized.
In yet another alternative embodiment, when an authorized node in the blockchain system receives a chunk broadcasted from a second authorized node, the authorized node adds the received chunk to the chunk at the authorized node, which may specifically include the following steps:
the authorization node determines the information type of the tableware circulation information carried on each received block;
and the authorization node adds each block to a block chain matched with the information type of the tableware circulation information carried on the block according to the information type of the tableware circulation information carried on each block.
The tableware circulation information carried on the blocks of different block chains at the authorization node is different in information type, and the tableware circulation information carried on the blocks of the same block chain at the authorization node is the same in information type.
In this optional embodiment, further optionally, when an authorized node in the blockchain system receives a chunk broadcasted from a second authorized node, before the authorized node adds the received chunk to the chunk at the authorized node, the authorized node may further perform the following operations:
and the authorized node checks the received block after receiving the block, and when the check is passed, the operation of adding the received block to the block chain at the authorized node is executed.
Still further optionally, the authorizing node checks the received block after receiving the block, including:
after the block is received, the authorization node checks whether a broadcast node of the block is a second authorization node, and when the broadcast node is checked to be the second authorization node, the block is determined to be checked to be passed; or,
after the block is received, the authorization node checks whether a broadcast node of the block is the authorization node with the highest ticket number counted by the proxy node, and when the broadcast node is checked to be the authorization node with the highest ticket number counted by the proxy node, the block is determined to be checked to be passed; or,
after the block is received, the authorization node checks whether a broadcast node of the block is the authorization node with the highest ticket number counted by the agent node selected by the first authorization node, and when the broadcast node is checked to be the authorization node with the highest ticket number counted by the agent node selected by the first authorization node, the block is determined to be checked to be passed; or,
after receiving the block, the authorized node checks whether the hash value on the block changes, and if the hash value on the block does not change, the block is determined to be checked to be passed.
It should be noted that the check method for checking whether the hash value changes may perform combined check on the block in any one of the first three check methods, and when each check method in the combined check passes the block check, it is finally determined that the block check passes.
Therefore, in the optional embodiment, after the authorized node receives the blocks broadcast by other authorized nodes, the received blocks need to be checked first, and the blocks are added to the corresponding block chain after the blocks pass the check, so that the probability of adding the malicious tampered blocks to the block chain is reduced, and the accuracy and reliability of the added blocks are improved.
It should be noted that the "accounting authority" referred to in the present invention may be understood as an authority for mining information to be packaged and packaging the information into blocks. And besides broadcasting the packed blocks to other authorized nodes, the second authorized node also needs to add the packed blocks to a corresponding block chain at the second authorized node.
It should be noted that, when initializing an authorized node, a user, data or a block and a linked list, the block and linked list system needs to perform the following processes: checking, passing the synchronous flow, completing the confirmation flow and completing the flow synchronously, if the synchronization is not successful, continuing to execute the synchronous flow.
It can be seen that the method described in the embodiment of the present invention can apply the block chain system to the management of the tableware circulation information of the recyclable tableware, thereby realizing the safe and effective management of the tableware circulation information of the recyclable tableware, and being beneficial to improving the safety of the recyclable tableware, and furthermore, a new consensus mechanism is introduced into the block chain system, after the user submits the tableware circulation information to be packaged, all authorization nodes do not need to contend for the accounting authority by calculating appointed characters, only the proxy node designated by the authorization node having the accounting authority last time needs to count the voting results of the remaining authorization nodes except the proxy node, thereby improving the fairness for determining the authorization node having the accounting authority, not consuming a large amount of computing resources, saving energy, and being beneficial to improving the efficiency for determining the authorization node having the accounting authority, and then be favorable to packing the tableware circulation information of treating the packing into the block and add the efficiency on the block chain. In addition, each authorization node is in multi-chain parallel, so that the adding efficiency of blocks is improved, and the inquiry efficiency of tableware circulation information can be improved.
Example two
Referring to fig. 3, fig. 3 is a flowchart illustrating another tableware circulation information management method based on a block chain according to an embodiment of the present invention. The method described in fig. 3 is applied to a blockchain system, which may include a plurality of authorization nodes, where each authorization node is pre-configured with 3 information pools including a data pool, a transaction pool, and an intelligent contract pool, and the blockchain at each authorization node includes a blockchain corresponding to the information pool, a blockchain corresponding to the transaction pool, and a blockchain corresponding to the intelligent contract pool. As shown in fig. 3, the method may include the operations of:
201. and the third authorization node detects the registration operation triggered by the user and acquires the target user identifier and the public key input by the user according to the registration operation.
202. And when the target user identifier is a user identifier pre-authorized by the blockchain system, the third authorization node encrypts the random verification code generated by the blockchain system through the public key to obtain an encrypted character string.
203. And the third authorization node acquires the private key of the user, and decrypts the encrypted character string through the private key to obtain the decrypted verification code.
204. And the third authorization node judges whether the decrypted verification code is consistent with the random verification code, and when the decrypted verification code is consistent with the random verification code, the third authorization node determines that the user can report the tableware circulation information through the third authorization node.
In the embodiment of the invention, a public key uniquely corresponding to a user and a private key uniquely corresponding to the public key are distributed to the user in advance by a block chain system; or, the blockchain system allocates a public key uniquely corresponding to the user, a private key uniquely corresponding to the user and an authorization code uniquely corresponding to the user in advance, wherein the authorization code is used for verifying whether the user is an authorized node of the blockchain system when the user joins or starts the blockchain system as a node. Still further optionally, each user further has a user identifier uniquely corresponding to the user identifier, where the user identifier may be a user application to the blockchain system, or a user self-filling and authorized by the blockchain system, and the embodiment of the present invention is not limited.
205. And the third authorization node detects an information reporting request triggered by the user and acquires signed information obtained by signing the target tableware circulation information required to be reported by the user by using the private key of the user according to the information reporting request.
206. And the third authorization node verifies the signed information according to the public key of the user to verify the user identity of the reported signed information.
207. When the user identity of the reported signed information passes the verification, the third authorization node broadcasts the signed information to all other authorization nodes, so that the authorization node receiving the signed information stores the signed information into all information pools of the authorization node to serve as the tableware circulation information to be packaged.
In the embodiment of the present invention, the third authorization node also needs to add the signed information to an information pool, which is matched with the information type of the signed information, in all information pools at the third authorization node.
208. The first authorized node selects one authorized node from the rest authorized nodes except the first authorized node as a proxy node.
In the embodiment of the invention, the first authorization node is the authorization node with the accounting authority last time in all the authorization nodes included in the blockchain system.
209. And the agent node collects the voting results of each authorization node in the rest authorization nodes except the agent node in all the authorization nodes, counts all the collected voting results to obtain the authorization node with the highest vote number, and serves as the second authorization node with the accounting authority at this time.
210. The second authorization node acquires the tableware circulation information to be packaged, packages the tableware circulation information to be packaged into blocks, and adds the packaged blocks to corresponding block chains at the second authorization node.
211. And the second authorized node broadcasts the packaged block to all other authorized nodes.
And the authorization node receiving the block broadcast by the second authorization node checks the received block, and adds the received block to a corresponding block chain at the authorization node after the check is passed.
For the relevant description of step 208 to step 211, please refer to the relevant description in the first embodiment, which is not repeated in the embodiments of the present invention.
Still further optionally, the blockchain system further includes a control node, or the blockchain system may designate one of the authorized nodes as the control node. After the second authorized node obtains the tableware circulation information to be packaged, packages the tableware circulation information to be packaged into blocks and broadcasts the blocks to all other authorized nodes, so that the authorized node adds all the received blocks to the block chain at the authorized node, the method may further include the following operations:
and the control node determines the second authorization node as an authorization node which needs to select a new proxy node from the rest authorization nodes except the second authorization node next time.
It should be noted that after determining the authorization node having the accounting authority last time, the authorization node having the accounting authority this time, and the authorization node having the ticket counting authority this time, the corresponding authorization node may broadcast its action type to all other authorization nodes.
It can be seen that the method described in the embodiment of the present invention can apply the block chain system to the management of the tableware circulation information of the recyclable tableware, thereby realizing the safe and effective management of the tableware circulation information of the recyclable tableware, and being beneficial to improving the safety of the recyclable tableware, and furthermore, a new consensus mechanism is introduced into the block chain system, after the user submits the tableware circulation information to be packaged, all authorization nodes do not need to contend for the accounting authority by calculating appointed characters, only the proxy node designated by the authorization node having the accounting authority last time needs to count the voting results of the remaining authorization nodes except the proxy node, thereby improving the fairness for determining the authorization node having the accounting authority, not consuming a large amount of computing resources, saving energy, and being beneficial to improving the efficiency for determining the authorization node having the accounting authority, and then be favorable to packing into the efficiency on the block and add to the block chain with the tableware circulation information of treating the packing. In addition, each authorization node is in multi-chain parallel, so that the adding efficiency of blocks is improved, and the inquiry efficiency of tableware circulation information can be improved. In addition, when a user needs to use the blockchain system or join the blockchain system as an authorized node, the user needs to apply for corresponding information (a public key, a private key, an authorized code and the like) to the blockchain system, so that the use safety of the blockchain system is improved, the user needs to be verified when the user starts the blockchain system and submits or reports tableware circulation information after starting the blockchain system, and the use safety of the blockchain system is further improved.
EXAMPLE III
Referring to fig. 4, fig. 4 is a schematic structural diagram of an authorized node according to an embodiment of the present invention. As shown in fig. 4, the authorization node is the first authorization node having the accounting right last time among all authorization nodes of the blockchain system, and the blockchain system includes a plurality of authorization nodes including the first authorization node. As shown in fig. 4, the first authorizing node may include:
a designating module 301, configured to select one authorized node from the remaining authorized nodes except the first authorized node in all authorized nodes of the blockchain system as a proxy node.
The agent node is used for collecting the voting result of each authorization node in the rest authorization nodes except the agent node in all the authorization nodes of the block chain system, counting all the collected voting results to obtain the authorization node with the highest vote number, and using the authorization node as the second authorization node with the current accounting authority.
And the second authorization node is used for acquiring the tableware circulation information to be packaged, packaging the tableware circulation information to be packaged into blocks and broadcasting the blocks to all other authorization nodes, so that each authorization node adds all the received blocks to a block chain at the authorization node.
Optionally, the specific manner in which the second authorization node obtains the tableware circulation information to be packaged, packages the tableware circulation information to be packaged into blocks, and broadcasts the blocks to all other authorization nodes is as follows:
the second authorization node determines at least one target information pool from a pre-established information pool set, wherein the target information pool stores tableware circulation information to be packaged, and different information pools are used for storing tableware circulation information of different information types;
the second authorization node acquires tableware circulation information to be packaged stored in each target information pool;
and the second authorization node respectively packages the tableware circulation information to be packaged, which is acquired from each target information pool and stored in the target information pool, into blocks matched with the information types of the tableware circulation information stored in the target information pool, and broadcasts all the packaged blocks to all other authorization nodes.
Optionally, the set of information pools at each authorizing node may include at least one of a data pool, a transaction pool, and an intelligent contract pool. The data pool is used for storing traceability information which is submitted by a user through one of the authorization nodes and used for tracing circulation of the recyclable tableware, the transaction pool is used for storing transaction information which is submitted by the user through one of the authorization nodes and used for generating virtual resource transfer in the circulation process of the recyclable tableware, and the intelligent contract pool is used for storing contract information which is submitted by the user through one of the authorization nodes and used for leasing the recyclable tableware and/or returning the recyclable tableware.
Still further optionally, the number of blockchains at each authorizing node matches the number of information pools comprised by the set of information pools. The specific way for the authorized node to add all received blocks to the block chain at the authorized node is as follows:
the authorization node determines the information type of the tableware circulation information carried on each received block;
and the authorization node adds each block to a block chain matched with the information type of the tableware circulation information carried on the block according to the information type of the tableware circulation information carried on each block.
The tableware circulation information carried on the blocks of different block chains at the authorization node is different in information type, and the tableware circulation information carried on the blocks of the same block chain at the authorization node is the same in information type.
As a further alternative, before the grant node adds all received blocks to the block chain at the grant node, the grant node is further configured to:
and checking the received blocks after the blocks are received, and when the checks are passed, performing the operation of adding the received blocks to the block chain at the authorized node.
Still further optionally, the specific way for the authorized node to check the received block after receiving the block may be:
after the block is received, checking whether a broadcast node of the block is a second authorized node, and determining that the block is checked to be passed when the broadcast node is checked to be the second authorized node; or,
after the block is received, whether a broadcast node of the block is an authorized node with the highest ticket number counted by the proxy node is checked, and when the broadcast node is checked to be the authorized node with the highest ticket number counted by the proxy node, the block is determined to be checked to be passed; or,
after the block is received, the authorization node checks whether a broadcast node of the block is the authorization node with the highest ticket number counted by the proxy node selected by the first authorization node, and when the broadcast node is checked to be the authorization node with the highest ticket number counted by the proxy node selected by the first authorization node, the block is determined to be checked to be passed.
In an optional embodiment, as shown in fig. 4, the first authorization node may further include:
the first detection module 302 is configured to detect an information reporting request triggered by a user, and obtain signed information obtained by signing, by using a private key of the user, target tableware circulation information that the user needs to report according to the information reporting request.
The verification module 303 is configured to verify the signed information according to the public key of the user to verify the user identity of the signed information reported.
And the information broadcasting module 304 is configured to broadcast the signed information to all other authorized nodes when the verification of the verifying module 303 passes, so that the authorized node receiving the signed information stores the signed information in all information pools of the authorized node, and the information pools are matched with the information types of the signed information and serve as tableware circulation information to be packaged.
In yet another optional embodiment, as shown in fig. 4, the first authorization node may further include:
a second detection module 305, configured to detect a registration operation triggered by a user.
An obtaining module 306, configured to obtain, according to the registration operation, the target user identifier and the public key input by the user.
And an encrypting module 307, configured to encrypt, when the target user identifier is a user identifier authorized in advance by the blockchain system, the random verification code generated by the blockchain system by using the public key, to obtain an encrypted character string.
The decryption module 308 is configured to obtain a private key of the user, and decrypt the encrypted character string through the private key to obtain a decrypted verification code.
The judging module 309 is configured to judge whether the decrypted verification code is consistent with the random verification code.
A determining module 310, configured to determine that the user can report the tableware circulation information through the first authorized node when the determining module 309 determines that the tableware circulation information is consistent with the first authorized node, and further trigger the first detecting module 302 to start.
In another alternative embodiment, the blockchain system allocates a public key uniquely corresponding to the user and a private key uniquely corresponding to the user in advance; or, the blockchain system allocates the public key uniquely corresponding to the user, the private key uniquely corresponding to the user and the authorization code uniquely corresponding to the user in advance. The authorization code is used for verifying whether the user is an authorized node of the blockchain system when the user joins or starts the blockchain system as a node.
Optionally, the blockchain system further includes a control node, or the blockchain system may designate one of the authorized nodes as the control node. The control node is used for determining the second authorization node as an authorization node which needs to select a new proxy node from the rest authorization nodes except the second authorization node next time.
It should be noted that, when the first authorized node does not have the authority to designate the proxy node, it may be used as a common authorized node, which can be used for the verified user to report or submit information, receive blocks broadcasted by other authorized nodes, and add the blocks to the corresponding block chain after verifying the blocks, or be designated as an authorized node having the accounting authority counted by the proxy node, or be used as an authorized node having the accounting authority counted by the proxy node. Namely: in practical applications, corresponding functional modules are started according to the role of the authorization node 'playing' in the blockchain system, and details are not described in the fourth embodiment and the fifth embodiment.
It can be seen that the authorization node described in the embodiment of the present invention can apply the block chain system to the management of the tableware circulation information of the recyclable tableware, thereby achieving the safe and effective management of the tableware circulation information of the recyclable tableware, and facilitating the improvement of the safety of the use of the recyclable tableware, and furthermore, a new consensus mechanism is introduced into the block chain system, after the user submits the tableware circulation information to be packaged, all authorization nodes do not need to contend for the accounting authority by calculating appointed characters, only the agent node designated by the authorization node having the accounting authority last time needs to count the voting results of the remaining authorization nodes except the agent node, thereby improving the fairness of determining the authorization node having the accounting authority, not consuming a large amount of computing resources, and facilitating the improvement of the efficiency of determining the authorization node having the accounting authority, and then be favorable to improving the efficiency of packing into the block and adding to the block chain with the tableware circulation information of treating the packing.
Example four
Referring to fig. 5, fig. 5 is a schematic structural diagram of another authorization node according to an embodiment of the disclosure. The authorization node described in fig. 5 is a proxy node specified by the first authorization node having the accounting right last time among all authorization nodes of the blockchain system, and optionally, the first authorization node may specifically be the first authorization node described in the third embodiment. As shown in fig. 5, the proxy node may include:
a collecting module 401, configured to collect voting results of each authorization node in the remaining authorization nodes except the proxy node.
And a counting module 402, configured to count all the collected voting results to obtain an authorization node with the highest vote number, which is used as the second authorization node with the current accounting authority.
The second authorization node is used for acquiring the tableware circulation information to be packaged, packaging the tableware circulation information to be packaged into blocks and broadcasting the blocks to all other authorization nodes, so that each authorization node adds all the received blocks to a block chain at the authorization node.
Optionally, the specific manner in which the second authorization node obtains the tableware circulation information to be packaged, packages the tableware circulation information to be packaged into blocks, and broadcasts the blocks to all other authorization nodes is as follows:
the second authorization node determines at least one target information pool from a pre-established information pool set, wherein the target information pool stores tableware circulation information to be packaged, and different information pools are used for storing tableware circulation information of different information types;
the second authorization node acquires tableware circulation information to be packaged stored in each target information pool;
and the second authorization node respectively packages the tableware circulation information to be packaged, which is acquired from each target information pool and stored in the target information pool, into blocks matched with the information types of the tableware circulation information stored in the target information pool, and broadcasts all the packaged blocks to all other authorization nodes.
Optionally, the set of information pools at each authorizing node may include at least one of a data pool, a transaction pool, and an intelligent contract pool. The data pool is used for storing traceability information which is submitted by a user through one of the authorization nodes and used for tracing circulation of the recyclable tableware, the transaction pool is used for storing transaction information which is submitted by the user through one of the authorization nodes and used for generating virtual resource transfer in the circulation process of the recyclable tableware, and the intelligent contract pool is used for storing contract information which is submitted by the user through one of the authorization nodes and used for leasing the recyclable tableware and/or returning the recyclable tableware.
Still further optionally, the number of blockchains at each authorizing node matches the number of information pools comprised by the set of information pools. The specific way for the authorized node to add all received blocks to the block chain at the authorized node is as follows:
the authorization node determines the information type of the tableware circulation information carried on each received block;
and the authorization node adds each block to a block chain matched with the information type of the tableware circulation information carried on the block according to the information type of the tableware circulation information carried on each block.
The tableware circulation information carried on the blocks of different block chains at the authorization node is different in information type, and the tableware circulation information carried on the blocks of the same block chain at the authorization node is the same in information type.
As a further alternative, before the grant node adds all received blocks to the block chain at the grant node, the grant node is further configured to:
and checking the received blocks after the blocks are received, and when the checks are passed, performing the operation of adding the received blocks to the block chain at the authorized node.
Still further optionally, the specific way for the authorized node to check the received block after receiving the block may be:
after the block is received, checking whether a broadcast node of the block is a second authorized node, and determining that the block is checked to be passed when the broadcast node is checked to be the second authorized node; or,
after the block is received, whether a broadcast node of the block is an authorized node with the highest ticket number counted by the proxy node is checked, and when the broadcast node is checked to be the authorized node with the highest ticket number counted by the proxy node, the block is determined to be checked to be passed; or,
after the block is received, the authorization node checks whether a broadcast node of the block is the authorization node with the highest ticket number counted by the proxy node selected by the first authorization node, and when the broadcast node is checked to be the authorization node with the highest ticket number counted by the proxy node selected by the first authorization node, the block is determined to be checked to be passed.
As an alternative implementation, as shown in fig. 5, the proxy node may further include:
the first detecting module 403 is configured to detect an information reporting request triggered by a user, and obtain signed information obtained by signing, by using a private key of the user, target tableware circulation information that the user needs to report according to the information reporting request.
And the verifying module 404 is configured to verify the signed information according to the public key of the user to verify the user identity of the signed information reported.
And the information broadcasting module 405 is configured to broadcast the signed information to all other authorized nodes when the verification module 404 passes the verification, so that the authorized nodes that receive the signed information store the signed information in all information pools of the authorized nodes, and the information pools are matched with the information types of the signed information and serve as tableware circulation information to be packaged.
In yet another alternative embodiment, as shown in fig. 5, the proxy node may further include:
the second detection module 406 is configured to detect a registration operation triggered by a user.
An obtaining module 407, configured to obtain, according to the registration operation, the target user identifier and the public key input by the user.
The encryption module 408 is configured to encrypt the random verification code generated by the blockchain system by using the public key to obtain an encrypted character string when the target user identifier is a user identifier authorized in advance by the blockchain system.
The decryption module 409 is configured to obtain a private key of the user, and decrypt the encrypted character string through the private key to obtain a decrypted verification code.
The judging module 410 is configured to judge whether the decrypted verification code is consistent with the random verification code.
The determining module 411 is configured to determine that the user can report the tableware circulation information through the first authorized node when the determining module 410 determines that the tableware circulation information is consistent with the first authorized node.
In another alternative embodiment, the blockchain system allocates a public key uniquely corresponding to the user and a private key uniquely corresponding to the user in advance; or, the blockchain system allocates the public key uniquely corresponding to the user, the private key uniquely corresponding to the user and the authorization code uniquely corresponding to the user in advance. The authorization code is used for verifying whether the user is an authorized node of the blockchain system when the user joins or starts the blockchain system as a node.
In another alternative embodiment, the statistics module 402 performs statistics on all the collected voting results to obtain an authorized node with the highest vote number, and the specific manner of using the authorized node with the current accounting authority is as follows:
counting all the collected voting results to obtain all the voted authorization nodes to be voted and the vote number of each authorization node to be voted;
determining a target authorization node to be selected with the highest ticket number according to the ticket number of each authorization node to be selected;
when the number of the target authorization nodes to be selected is one, determining the target authorization nodes to be selected as second authorization nodes with the accounting authority at this time;
and when the number of the target nodes to be authorized is at least two, selecting one authorization node from all the target nodes to be authorized as a second authorization node with the accounting authority at this time.
When the number of the target nodes to be authorized is at least two, the second authorized node is one of the authorized nodes randomly selected from all the target nodes to be authorized by the statistical module 402; or, the second authorized node is one of the authorized nodes that are selected by the statistics module 402 from all target authorized nodes to be selected and meet the preset node condition.
Optionally, the blockchain system further includes a control node, or the blockchain system may designate one of the authorized nodes as the control node. The control node is used for determining the second authorization node as an authorization node which needs to select a new proxy node from the rest authorization nodes except the second authorization node next time.
Therefore, the authorization node described by the embodiment of the invention can apply the block chain system to the tableware circulation information management of the recyclable tableware, realize the safe and effective management of the tableware circulation information of the recyclable tableware, and is favorable for improving the use safety of the recyclable tableware, in addition, a new consensus mechanism is introduced into the block chain system, after the tableware circulation information to be packaged is submitted by a user, the accounting authority is not required to be contended by all authorization nodes in a way of calculating appointed characters, the voting results of the rest authorization nodes except the proxy node are only required to be counted by the proxy node appointed by the authorization node with the accounting authority at the last time, the fairness of determining the authorization node with the accounting authority is improved, a large amount of calculation resources are not required to be consumed, and the efficiency of determining the authorization node with the accounting authority is improved, and then be favorable to improving the efficiency of packing into the block and adding to the block chain with the tableware circulation information of treating the packing.
EXAMPLE five
Referring to fig. 6, fig. 6 is a schematic structural diagram of another authorized node according to an embodiment of the present invention. The authorization node described in fig. 6 is a second authorization node which has the highest ticket number and has the current accounting authority and is specified by a proxy node specified by a first authorization node having the last accounting authority in all authorization nodes of the blockchain system, and optionally, the first authorization node may be the first authorization node described in the third embodiment, and the proxy node may be the proxy node described in the fourth embodiment. As shown in fig. 6, the second authorizing node includes:
a first obtaining module 501, configured to obtain circulation information of tableware to be packaged.
And the packaging module 502 is used for packaging the tableware circulation information to be packaged into blocks.
A block broadcasting module 503, configured to broadcast the block packed by the packing module 502 to all authorized nodes except the second authorized node, so that the authorized node that receives the block adds the block to the block chain at the authorized node.
In an alternative embodiment, the first obtaining module 501 obtains the circulation information of the dishes to be packaged in a specific manner as follows:
determining at least one target information pool from a pre-established information pool set, wherein the target information pool stores tableware circulation information to be packaged, and different information pools are used for storing tableware circulation information of different information types;
and acquiring the tableware circulation information to be packaged stored in each target information pool.
The specific way of packing the tableware circulation information to be packed into blocks by the packing module 502 is as follows:
and respectively packaging the tableware circulation information to be packaged, which is acquired from each target information pool and stored in the target information pool, into blocks matched with the information types of the tableware circulation information stored in the target information pool.
Optionally, the set of information pools at each authorizing node may include at least one of a data pool, a transaction pool, and an intelligent contract pool. The data pool is used for storing traceability information which is submitted by a user through one of the authorization nodes and used for tracing circulation of the recyclable tableware, the transaction pool is used for storing transaction information which is submitted by the user through one of the authorization nodes and used for generating virtual resource transfer in the circulation process of the recyclable tableware, and the intelligent contract pool is used for storing contract information which is submitted by the user through one of the authorization nodes and used for leasing the recyclable tableware and/or returning the recyclable tableware.
Still further optionally, the block broadcasting module 503 broadcasts the block packed by the packing module to all authorized nodes except the second authorized node, so that the authorized node receiving the block performs the following operations:
determining the information type of the tableware circulation information carried on each received block by the authorization node receiving the block;
and adding each block to a block chain matched with the information type of the tableware circulation information carried on the block according to the information type of the tableware circulation information carried on each block by the authorization node receiving the block.
The tableware circulation information carried on the blocks of different block chains at the authorization node is different in information type, and the tableware circulation information carried on the blocks of the same block chain at the authorization node is the same in information type.
As yet another alternative, before adding all received blocks to the block chain at the authorized node, the authorized node receiving the blocks is further configured to:
and checking the received block after the block is received by the authorized node receiving the block, and when the check is passed, performing the operation of adding the received block to the blockchain at the authorized node.
As a further alternative, the specific way for the authorized node receiving the block to check the received block after receiving the block may be:
after the block is received, checking whether a broadcasting node of the block is a second authorized node by an authorized node of the received block, and determining that the block is checked to be passed when the broadcasting node is checked to be the second authorized node; or,
after the block is received, the authorization node of the received block checks whether the broadcast node of the block is the authorization node with the highest ticket number counted by the proxy node, and when the broadcast node is checked to be the authorization node with the highest ticket number counted by the proxy node, the block is checked to be passed; or,
after the block is received, whether a broadcast node of the block is an authorized node with the highest ticket number counted by the agent node selected by the first authorized node is checked by the authorized node of the received block, and when the authorized node with the highest ticket number counted by the agent node selected by the first authorized node is checked by the broadcast node, the block is determined to be checked to be passed.
As an optional implementation manner, as shown in fig. 6, the second authorization node may further include:
the first detection module 504 is configured to detect an information reporting request triggered by a user, and obtain signed information obtained by signing, by using a private key of the user, target tableware circulation information that the user needs to report according to the information reporting request.
And the verifying module 505 is configured to verify the signed information according to the public key of the user to verify the user identity of the signed information reported.
And the information broadcasting module 506 is configured to broadcast the signed information to all other authorized nodes when the verification module 505 passes the verification, so that the authorized node receiving the signed information stores the signed information into all information pools of the authorized node, and the information pools are matched with the information types of the signed information and serve as tableware circulation information to be packaged.
In yet another optional embodiment, as shown in fig. 6, the second authorization node may further include:
a second detection module 507, configured to detect a registration operation triggered by a user.
An obtaining module 508, configured to obtain the target user identifier and the public key input by the user according to the registration operation.
The encrypting module 509 is configured to encrypt the random verification code generated by the blockchain system by using the public key to obtain an encrypted character string when the target user identifier is a user identifier authorized in advance by the blockchain system.
The decryption module 510 is configured to obtain a private key of the user, and decrypt the encrypted character string through the private key to obtain a decrypted verification code.
The judging module 511 is configured to judge whether the decrypted verification code is consistent with the random verification code.
A determining module 512, configured to determine that the user can report the tableware circulation information through the first authorized node when the determining module 511 determines that the tableware circulation information is consistent with the first authorized node.
In another alternative embodiment, the blockchain system allocates a public key uniquely corresponding to the user and a private key uniquely corresponding to the user in advance; or, the blockchain system allocates the public key uniquely corresponding to the user, the private key uniquely corresponding to the user and the authorization code uniquely corresponding to the user in advance. The authorization code is used for verifying whether the user is an authorized node of the blockchain system when the user joins or starts the blockchain system as a node.
In yet another alternative embodiment, after obtaining the tableware circulation information to be packaged, packaging the tableware circulation information to be packaged into blocks and broadcasting the blocks to all other authorized nodes, so that the authorized nodes add all the received blocks to the block chain at the authorized node, the second authorized node is changed into an authorized node which needs to select a new proxy node from the rest authorized nodes except the second authorized node for the next time.
Optionally, the blockchain system further includes a control node, or the blockchain system may designate one of the authorized nodes as the control node. The control node is used for determining the second authorization node as an authorization node which needs to select a new proxy node from the rest authorization nodes except the second authorization node next time.
It can be seen that the authorization node described in the embodiment of the present invention can apply the block chain system to the management of the tableware circulation information of the recyclable tableware, thereby achieving the safe and effective management of the tableware circulation information of the recyclable tableware, and facilitating the improvement of the safety of the use of the recyclable tableware, and furthermore, a new consensus mechanism is introduced into the block chain system, after the user submits the tableware circulation information to be packaged, all authorization nodes do not need to contend for the accounting authority by calculating appointed characters, only the agent node designated by the authorization node having the accounting authority last time needs to count the voting results of the remaining authorization nodes except the agent node, thereby improving the fairness of determining the authorization node having the accounting authority, not consuming a large amount of computing resources, and facilitating the improvement of the efficiency of determining the authorization node having the accounting authority, and then be favorable to improving the efficiency of packing into the block and adding to the block chain with the tableware circulation information of treating the packing.
EXAMPLE six
Referring to fig. 7, fig. 7 is a schematic structural diagram of another authorization node according to an embodiment of the disclosure. The grant node depicted in fig. 7 is any grant node in the blockchain system. As shown in fig. 7, the authorizing node may include:
a memory 601 in which executable program code is stored;
a processor 602 coupled to a memory 601;
the processor 602 calls the executable program code stored in the memory 601 to execute the steps of the block chain-based tableware distribution information management method described in the first embodiment or the second embodiment of the present invention, wherein the steps executed by the processor 602 are related to the "role" played by the authorized node in the block chain system.
EXAMPLE seven
The embodiment of the invention discloses a computer storage medium, which stores computer instructions, and when the computer instructions are called, the computer instructions are used for executing steps in the tableware circulation information management method based on the block chain, which is described in the first embodiment or the second embodiment of the invention, and the executed steps are related to the role played by an authorized node in the block chain system.
Example eight
The embodiment of the invention discloses a computer program product, which comprises a non-transitory computer readable storage medium storing a computer program, wherein the computer program is operable to make a computer execute the steps of the block chain-based tableware circulation information management method described in the first embodiment or the second embodiment, and the executed steps are related to the role played by an authorized node in the block chain system.
Example nine
The embodiment of the invention discloses a block chain system, which comprises a plurality of authorized nodes and is used for realizing the tableware circulation information management method based on the block chain described in the first embodiment or the second embodiment.
The above-described embodiments of the apparatus are merely illustrative, and the modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above detailed description of the embodiments, those skilled in the art will clearly understand that the embodiments may be implemented by software plus a necessary general hardware platform, and may also be implemented by hardware. Based on such understanding, the above technical solutions may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, where the storage medium includes a Read-Only Memory (ROM), a Random Access Memory (RAM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), a One-time Programmable Read-Only Memory (OTPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc-Read-Only Memory (CD-ROM), or other disk memories, CD-ROMs, or other magnetic disks, A tape memory, or any other medium readable by a computer that can be used to carry or store data.
Finally, it should be noted that: the tableware circulation information management method and device based on the block chain and the block chain system disclosed in the embodiments of the present invention are only preferred embodiments of the present invention, and are only used for illustrating the technical solutions of the present invention, not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art; the technical solutions described in the foregoing embodiments may still be modified, or some 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 spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (15)

1. A tableware circulation information management method based on a block chain is applied to a block chain system, the block chain system comprises a plurality of authorized nodes, and the method comprises the following steps:
the first authorization node selects one authorization node from the rest authorization nodes except the first authorization node as a proxy node, wherein the first authorization node is the last authorization node with accounting authority in all the authorization nodes;
the agent node collects the voting result of each authorization node in the rest authorization nodes except the agent node in all the authorization nodes, and counts all the collected voting results to obtain the authorization node with the highest vote number as the second authorization node with the current accounting authority;
and the second authorization node acquires the tableware circulation information to be packaged, packages the tableware circulation information to be packaged into blocks and broadcasts the blocks to all other authorization nodes, so that each authorization node adds all the received blocks to a block chain at the authorization node.
2. The block chain-based tableware circulation information management method according to claim 1, wherein the second authorized node obtains the tableware circulation information to be packaged, packages the tableware circulation information to be packaged into blocks and broadcasts the blocks to all other authorized nodes, and the method comprises the following steps:
the second authorization node determines at least one target information pool from a pre-established information pool set, wherein the target information pool stores tableware circulation information to be packaged, and different information pools are used for storing tableware circulation information of different information types;
the second authorization node acquires tableware circulation information to be packaged stored in each target information pool from the target information pools;
and the second authorization node respectively packages the tableware circulation information to be packaged, which is acquired from each target information pool and stored in the target information pool, into blocks matched with the information types of the tableware circulation information stored in the target information pool, and broadcasts all the blocks obtained by packaging to all other authorization nodes.
3. The method of claim 2, wherein the set of information pools comprises at least one of a data pool, a transaction pool, and an intelligent contract pool;
the data pool is used for storing traceability information which is submitted by a user through one of the authorization nodes and is used for tracing the circulation of the recyclable tableware;
the transaction pool is used for storing transaction information which is submitted by a user through one of the authorization nodes and generates virtual resource transfer in the circulation process of the recyclable tableware;
the intelligent contract pool is used for storing contract information of the rentals of the recyclable tableware and/or the return of the recyclable tableware, which is submitted by a user through one of the authorization nodes.
4. The method for managing tableware circulation information based on block chain according to claim 2 or 3, wherein the number of block chains at each authorization node matches the number of information pools comprised by the information pool set;
the authorizing node adds all the received blocks to a block chain at the authorizing node, including:
the authorization node determines the type of the received tableware circulation information carried on each block;
the authorization node adds each block to a block chain matched with the information type of the tableware circulation information carried on the block according to the information type of the tableware circulation information carried on each block;
the tableware circulation information carried on the blocks of different block chains at the authorization node is different in information type, and the tableware circulation information carried on the blocks of the same block chain at the authorization node is the same in information type.
5. The method of claim 4, wherein before the authorized node adds all the received blocks to the block chain at the authorized node, the method further comprises:
and the authorized node checks all the received blocks after receiving the blocks, and when the check is passed, the authorized node executes the operation of adding all the received blocks to the block chain at the authorized node.
6. The method for managing tableware circulation information based on block chain according to claim 5, wherein said authorizing node checks all received blocks after receiving said blocks, including:
after receiving the blocks, the authorization node checks whether broadcast nodes of all the blocks are the second authorization node, and when the broadcast nodes are checked to be the second authorization node, the authorization node determines that all the blocks are checked to be passed; or,
after receiving the blocks, the authorization node checks whether broadcast nodes of all the blocks are authorization nodes with the highest ticket number counted by the proxy node, and when the broadcast nodes are the authorization nodes with the highest ticket number counted by the proxy node, the authorization nodes determine that all the blocks pass the check; or,
after receiving the block, the authorization node checks whether broadcast nodes of all the blocks are authorization nodes with the highest votes counted by the proxy nodes selected by the first authorization node, and when the broadcast nodes are the authorization nodes with the highest votes counted by the proxy nodes selected by the first authorization node, the authorization nodes determine that all the blocks are checked to be passed.
7. The block chain-based tableware distribution information managing method according to any one of claims 1 to 6, further comprising:
the third authorization node detects an information reporting request triggered by a user, and obtains signed information obtained by signing target tableware circulation information needing to be reported by the user through a private key of the user according to the information reporting request;
the third authorization node verifies the signed information according to the public key of the user to verify the user identity of the signed information reported, and when the verification is passed, the signed information is broadcasted to all other authorization nodes, so that the authorization node receiving the signed information stores the signed information into an information pool matched with the information type of the signed information in all information pools of the authorization node as tableware circulation information to be packaged;
wherein the third authorized node is any one of all the authorized nodes.
8. The method as claimed in claim 7, wherein before the third authorized node detects the user-triggered information reporting request, the method further comprises:
the third authorization node detects a registration operation triggered by a user, and acquires a target user identifier and a public key input by the user according to the registration operation;
when the target user identifier is a user identifier pre-authorized by the blockchain system, the third authorization node encrypts a random verification code generated by the blockchain system through the public key to obtain an encrypted character string;
the third authorization node acquires a private key of a user, and decrypts the encrypted character string through the private key to obtain a decrypted verification code;
and the third authorization node judges whether the decrypted verification code is consistent with the random verification code, and when the decrypted verification code is consistent with the random verification code, the third authorization node determines that the user can report tableware circulation information through the third authorization node.
9. The method for managing tableware circulation information according to claim 8, wherein said blockchain system assigns said public key uniquely corresponding thereto and said private key uniquely corresponding thereto to a user in advance; or the block chain system allocates the public key uniquely corresponding to the user, the private key uniquely corresponding to the user and the authorization code uniquely corresponding to the user in advance;
the authorization code is used for verifying whether a user is an authorized node of the blockchain system when the user joins or starts the blockchain system as a node.
10. The method for managing tableware circulation information based on block chain according to claim 1, wherein the agent node counts all the collected voting results to obtain an authorized node with the highest vote number as a second authorized node having the current accounting authority, and the method comprises:
the agent node counts all the collected voting results to obtain all the voting authorization nodes to be voted and the vote number of each voting authorization node;
the proxy node determines a target authorization node to be selected with the highest ticket number according to the ticket number of each authorization node to be selected;
when the number of the target authorization nodes to be selected is one, the proxy node determines the target authorization nodes to be selected as second authorization nodes with the accounting authority at this time;
when the number of the target nodes to be authorized is at least two, the agent node selects one authorization node from all the target nodes to be authorized as a second authorization node with the accounting authority at this time;
when the number of the target nodes to be authorized is at least two, the second authorized node is one of the authorized nodes randomly selected by the agent node from all the target nodes to be authorized; or, the second authorized node is one authorized node which is selected by the agent node from all the target authorized nodes to be selected and meets the preset node condition.
11. The method of claim 1, wherein the blockchain system further comprises a control node;
the second authorized node obtains the tableware circulation information to be packaged, packages the tableware circulation information to be packaged into blocks and broadcasts the blocks to all other authorized nodes, so that after the authorized node adds all the received blocks to a block chain at the authorized node, the method further comprises the following steps:
and the control node determines the second authorization node as an authorization node which needs to select a new proxy node from the rest authorization nodes except the second authorization node next time.
12. An authorizing node, wherein the authorizing node is a first authorizing node having accounting authority last time among all authorizing nodes of a blockchain system, and the first authorizing node comprises:
a designating module, configured to select one authorized node from remaining authorized nodes except the first authorized node in all authorized nodes of the blockchain system, as a proxy node;
the agent node is used for collecting the voting result of each authorization node in the rest authorization nodes except the agent node in all the authorization nodes of the block chain system, and counting all the collected voting results to obtain the authorization node with the highest vote number as the second authorization node with the current accounting authority;
the second authorization node is used for acquiring tableware circulation information to be packaged, packaging the tableware circulation information to be packaged into blocks and broadcasting the blocks to all other authorization nodes, so that each authorization node adds all the received blocks to a block chain at the authorization node.
13. An authorizing node, wherein the authorizing node is a proxy node designated by a first authorizing node having accounting authority last time among all authorizing nodes of a blockchain system, and the proxy node comprises:
the collection module is used for collecting the voting result of each authorization node in the rest authorization nodes except the agent node in all the authorization nodes;
the counting module is used for counting all the collected voting results to obtain an authorization node with the highest vote number, and the authorization node is used as a second authorization node with the accounting authority;
the second authorization node is configured to acquire tableware circulation information to be packaged, package the tableware circulation information to be packaged into blocks, and broadcast the blocks to all other authorization nodes, so that each authorization node adds all received blocks to a block chain at the authorization node.
14. An authorization node, which is a second authorization node having a highest ticket number counted by a proxy node designated by a first authorization node having a last accounting authority and having an accounting authority this time among all authorization nodes of a blockchain system, the second authorization node comprising:
the acquisition module is used for acquiring the circulation information of the tableware to be packaged;
the packaging module is used for packaging the tableware circulation information to be packaged into blocks;
and the block broadcasting module is used for broadcasting all the blocks packed by the packing module to all other authorized nodes except the second authorized node so that the authorized nodes receiving all the blocks add the blocks to the block chain at the authorized node.
15. A blockchain system, wherein the blockchain system comprises a plurality of authorized nodes and is used for implementing the method for managing tableware circulation information based on blockchain according to any one of claims 1 to 11.
CN202010429054.5A 2020-05-20 2020-05-20 Block chain-based tableware circulation information management method and device and block chain system Active CN111741067B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010429054.5A CN111741067B (en) 2020-05-20 2020-05-20 Block chain-based tableware circulation information management method and device and block chain system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010429054.5A CN111741067B (en) 2020-05-20 2020-05-20 Block chain-based tableware circulation information management method and device and block chain system

Publications (2)

Publication Number Publication Date
CN111741067A CN111741067A (en) 2020-10-02
CN111741067B true CN111741067B (en) 2022-08-12

Family

ID=72647470

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010429054.5A Active CN111741067B (en) 2020-05-20 2020-05-20 Block chain-based tableware circulation information management method and device and block chain system

Country Status (1)

Country Link
CN (1) CN111741067B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113572825B (en) * 2021-07-09 2023-03-21 中国科学院计算技术研究所 Access control and resource access control method and system for relay chain cross-link architecture
CN113713128A (en) * 2021-08-17 2021-11-30 苏州宝凡电子科技有限公司 Block chain marking system for distributed storage data

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106411503A (en) * 2016-11-28 2017-02-15 中国银行股份有限公司 Accounting method, accounting system, voting node and accounting node under block chain voting and accounting mode
CN108257311A (en) * 2018-01-09 2018-07-06 陈洪波 A kind of tableware environment-friendly cycle uses system and method
CN108764797A (en) * 2018-05-31 2018-11-06 腾讯科技(深圳)有限公司 Circulation information querying method, device, equipment, system and storage medium
CN109039646A (en) * 2018-07-12 2018-12-18 北京链享未来科技有限公司 A kind of packing of block chain block and verification method and system based on node capacity
CN109146518A (en) * 2018-08-03 2019-01-04 中南大学 A kind of product traceability method
CN109194702A (en) * 2018-06-04 2019-01-11 平安科技(深圳)有限公司 Medical data recording method, system, computer equipment and storage medium
CN109544177A (en) * 2018-11-01 2019-03-29 广东黾车新能源汽车产业有限公司 A kind of accessory method for tracing based on block chain technology
CN109639837A (en) * 2019-01-31 2019-04-16 东南大学 Block chain DPoS common recognition method based on faith mechanism
WO2019083611A1 (en) * 2017-10-27 2019-05-02 BXB Digital Pty Limited Systems and methods for executing smart contracts using a block chain
CN110135540A (en) * 2019-05-03 2019-08-16 北京联博达科技有限公司 Device containing identification code and the apparatus system and method for recycling the device containing identification code
CN110503373A (en) * 2019-08-21 2019-11-26 腾讯云计算(北京)有限责任公司 A kind of material-flow method and device based on block chain network

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2017263465B9 (en) * 2016-05-11 2021-01-28 Nasdaq, Inc. Application framework using blockchain-based asset ownership

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106411503A (en) * 2016-11-28 2017-02-15 中国银行股份有限公司 Accounting method, accounting system, voting node and accounting node under block chain voting and accounting mode
WO2019083611A1 (en) * 2017-10-27 2019-05-02 BXB Digital Pty Limited Systems and methods for executing smart contracts using a block chain
CN108257311A (en) * 2018-01-09 2018-07-06 陈洪波 A kind of tableware environment-friendly cycle uses system and method
CN108764797A (en) * 2018-05-31 2018-11-06 腾讯科技(深圳)有限公司 Circulation information querying method, device, equipment, system and storage medium
CN110796414A (en) * 2018-05-31 2020-02-14 腾讯科技(深圳)有限公司 Circulation information inquiry method, device, equipment, system and storage medium
CN109194702A (en) * 2018-06-04 2019-01-11 平安科技(深圳)有限公司 Medical data recording method, system, computer equipment and storage medium
CN109039646A (en) * 2018-07-12 2018-12-18 北京链享未来科技有限公司 A kind of packing of block chain block and verification method and system based on node capacity
CN109146518A (en) * 2018-08-03 2019-01-04 中南大学 A kind of product traceability method
CN109544177A (en) * 2018-11-01 2019-03-29 广东黾车新能源汽车产业有限公司 A kind of accessory method for tracing based on block chain technology
CN109639837A (en) * 2019-01-31 2019-04-16 东南大学 Block chain DPoS common recognition method based on faith mechanism
CN110135540A (en) * 2019-05-03 2019-08-16 北京联博达科技有限公司 Device containing identification code and the apparatus system and method for recycling the device containing identification code
CN110503373A (en) * 2019-08-21 2019-11-26 腾讯云计算(北京)有限责任公司 A kind of material-flow method and device based on block chain network

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Adaptable Blockchain-Based Systems: A Case Study for Product Traceability;Qinghua Lu等;《IEEE Software 》;20171113;全文 *
可循环使用外卖餐盒的推广与保障措施研究;薛娜等;《物流工程与管理》;20200410;全文 *
外卖可循环餐具的使用方案 ——给"饿了么"、"美团"等外卖平台的一封公开信;罗罗;《https://zhuanlan.zhihu.com/p/29646891》;20170925;全文 *

Also Published As

Publication number Publication date
CN111741067A (en) 2020-10-02

Similar Documents

Publication Publication Date Title
CN111741067B (en) Block chain-based tableware circulation information management method and device and block chain system
CN103875015B (en) Gathered using the multiple-factor identity fingerprint of user behavior
CN110599147A (en) Ciphertext retrieval fair payment method and system based on block chain
EP3345349A2 (en) Systems and methods for detecting and scoring anomalies
CN109299995B (en) Virtual article sending method, device, server and storage medium
Terzi et al. Transforming the supply-chain management and industry logistics with blockchain smart contracts
CN106600275B (en) Risk identification method and device
CN109302300B (en) Data distribution and processing method, system and computer readable recording medium
CN105741132A (en) Two-dimensional code-based online-to-offline sales data processing system and method
CN105205906B (en) The processing of ballot task, the method and device of distribution ballot task
JP6230728B2 (en) System architecture and method for ensuring network information security
CN107274586A (en) A kind of method that private express delivery is received and deposited automatically
Kolomeets et al. Analysis of the malicious bots market
CN110599322A (en) Data auditing method and device based on block chain network
CN108133373A (en) Seek the method and device for the adventure account for relating to machine behavior
CN108055272B (en) Remote authorization-based bid document screening method and system
CN106779608A (en) A kind of information processing method and information processing system based on wechat platform
CN115222410A (en) Block chain based transaction uplink method and device, electronic equipment and storage medium
CN110930090B (en) E-commerce big data logistics supply chain control system based on artificial intelligence and block chain
CN114819891A (en) Rice full supply chain information supervision method based on parallel block chain and intelligent contract
CN107506355B (en) Object grouping method and device
CN103780592B (en) Method and apparatus for determining being stolen of user account
CN109062945B (en) Information recommendation method, device and system for social network
CN110349357B (en) Remote automatic counting system, device and method based on terminal instruction forwarding
WO2019191579A1 (en) System and methods for recording codes in a distributed environment

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
CP03 Change of name, title or address

Address after: Room 2105-2113, No. 37, Huanshi West Road, Liwan District, Guangzhou, Guangdong 510000

Patentee after: Guangdong Gree Digital Services Co.,Ltd.

Country or region after: China

Address before: Room 2007, 2008, 2009, 2012, 2013, 2105-2113, No. 37, Huanshi West Road, Liwan District, Guangzhou City, Guangdong Province, 528400

Patentee before: GUANGZHOU GELI NETWORK TECHNOLOGY Co.,Ltd.

Country or region before: China

CP03 Change of name, title or address