WO2019196237A1 - 居民户籍信息管理方法、服务器及计算机可读存储介质 - Google Patents

居民户籍信息管理方法、服务器及计算机可读存储介质 Download PDF

Info

Publication number
WO2019196237A1
WO2019196237A1 PCT/CN2018/096259 CN2018096259W WO2019196237A1 WO 2019196237 A1 WO2019196237 A1 WO 2019196237A1 CN 2018096259 W CN2018096259 W CN 2018096259W WO 2019196237 A1 WO2019196237 A1 WO 2019196237A1
Authority
WO
WIPO (PCT)
Prior art keywords
registration information
household registration
node
resident household
identity identifier
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.)
Ceased
Application number
PCT/CN2018/096259
Other languages
English (en)
French (fr)
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Publication of WO2019196237A1 publication Critical patent/WO2019196237A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/26Government or public services
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management

Definitions

  • the present application belongs to the field of computer technology, and in particular, to a resident household registration information management method, a server, and a computer readable storage medium.
  • the commonly used resident household registration information management methods can be divided into two categories, one is centralized management, which stores all resident household registration information in one server, but this storage method is invaded by hackers or occurs. In the event of a failure, the household registration information is easily falsified or damaged, and the security is low.
  • the other type is distributed management, which stores the household registration information in multiple servers, that is, multiple sets are formed. Backups effectively improve the security of information. However, because this method exchanges redundancy for security, a large amount of storage resources are wasted in the case of a large number of household registration information.
  • the embodiment of the present application provides a method for managing a household registration information, a server, and a computer readable storage medium, so as to solve the problem that the existing centralized management security is low, and distributed management wastes a large amount of storage resources. .
  • the first aspect of the embodiment of the present application provides a method for managing a household registration information, which is applied to a preset residential household information management blockchain, wherein the resident household registration information management blockchain includes a main blockchain and two In the above secondary blockchain, each of the secondary blockchains includes a primary node and at least one secondary node, and the primary blockchain includes a primary node of each of the secondary blockchains, and the method includes :
  • the first node receives the resident registration information sent by the user terminal, where the first node is any one of the secondary nodes;
  • the first node generates a first block according to the resident household registration information, and broadcasts the first block in a secondary block chain to which the first node belongs;
  • Each secondary node in the secondary blockchain to which the first node belongs updates the local resident household registration information database according to the first block
  • the first node forwards the resident household registration information to a second node, where the second node is a primary node of a secondary blockchain to which the first node belongs;
  • the second node generates a second block according to the resident household registration information, and broadcasts the second block in the main blockchain;
  • Each primary node in the primary blockchain updates a local resident household registration information database according to the second block.
  • a second aspect of the embodiments of the present application provides a server, which may include a module for implementing the steps of the foregoing resident household registration information management method.
  • a third aspect of the embodiments of the present application provides a computer readable storage medium storing computer readable instructions, the computer readable instructions being implemented by a processor to implement the resident household registration information management method A step of.
  • a fourth aspect of an embodiment of the present application provides a server including a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, the processor executing the computer The steps of implementing the above-mentioned resident household registration information management method when reading instructions.
  • the embodiment of the present application has the beneficial effects that: through the embodiment of the present application, the complete resident household registration information is distributed and stored in each secondary node in each sub-blockchain, and each secondary node Only the resident household registration information needs to be stored, and only the complete household registration information is backed up in each main node in the main blockchain. On the one hand, the overall security of the household registration information is ensured, on the other hand, Reduce overall redundancy and reduce the consumption of storage resources.
  • FIG. 1 is a specific example diagram of a residential household information management blockchain in the embodiment of the present application.
  • FIG. 2 is a flowchart of an embodiment of a method for managing a household registration information in an embodiment of the present application
  • FIG. 3 is a schematic flowchart of processing a resident household information storage request in an embodiment of the present application
  • FIG. 4 is a schematic flowchart of processing a resident household information inquiry request in an embodiment of the present application
  • FIG. 5 is a structural diagram of an embodiment of a server according to an embodiment of the present application.
  • FIG. 6 is a schematic block diagram of a server in an embodiment of the present application.
  • the real estate transaction method in the embodiment of the present application is applied to a preset resident household information management blockchain
  • the resident household registration information management blockchain includes a main blockchain and two or more secondary blockchains, each of which The secondary block chain includes a primary node and at least one secondary node, and the primary blockchain includes a primary node of each of the secondary blockchains.
  • FIG. 1 shows a specific example of the resident household information management blockchain.
  • the resident household registration information management blockchain includes three secondary blockchains, and each secondary blockchain includes two secondary nodes.
  • the number of secondary block chains included in the resident household information management blockchain and the number of secondary nodes included in each secondary blockchain may be adjusted, wherein different The number of secondary nodes included in the secondary blockchain may be the same or different.
  • an embodiment of a method for managing a household registration information in an embodiment of the present application may include:
  • Step S201 The first node receives the resident registration information sent by the user terminal.
  • the first node is any one of the secondary nodes.
  • the user terminal may encrypt the resident household registration information before transmitting the resident household registration information, and the specific encryption method may use a symmetric encryption algorithm or an asymmetric encryption. algorithm.
  • the symmetric encryption algorithm is an encryption method using a single-key cryptosystem, and the same key can be used as both information encryption and decryption. If a symmetric encryption algorithm is used, the user terminal uses the preset key to the resident. The household registration information is encrypted, and the first node decrypts the resident household registration information by using the same key after receiving the household registration information.
  • the asymmetric encryption algorithm requires two keys, a public key and a private key. The public key and the private key are a pair.
  • the information is encrypted with the public key, it can only be decrypted with the corresponding private key. If the data is encrypted with the private key, only the corresponding public key can be used for decryption.
  • the encryption algorithm the user terminal encrypts the resident household registration information by using a preset key (public key or private key), and the first node uses another key after receiving the resident household registration information. (If the encryption uses a public key, the private key is used here, if the private key is encrypted, the public key is used here) to decrypt the resident household registration information.
  • Step S202 the first node generates a first block according to the resident household registration information, and broadcasts the first block in a secondary block chain to which the first node belongs.
  • the first node first acquires a chain end block in a sub-block chain to which it belongs, that is, a block that is newly added to the sub-block chain, wherein each block includes a block header. And performing a feature operation on the block header of the chain tail block to obtain a first feature value; performing a feature operation on the resident household registration information to obtain a second feature value; and according to the first feature value and The second feature value generates a block header of the first block, and generates a block body of the first block according to the resident household registration information, thereby forming a complete first block.
  • the feature operation may be a hash operation, and the feature value may be a hash value obtained by the operation.
  • a hash operation is the conversion of an input of arbitrary length into a fixed-length output, which is a hash value. This conversion is a compression map, that is, the length of the output is usually much smaller than the length of the input, and different inputs may be hashed to the same output, and it is not possible to uniquely determine the input value from the output value. Simply put, it is a process of compressing a message of any length into a message summary of a fixed length.
  • the hashing operations used in this embodiment may include, but are not limited to, specific algorithms such as MD4, MD5, SHA1, and the like.
  • Step S203 each secondary node in the secondary blockchain to which the first node belongs updates the local resident household registration information database according to the first block.
  • a local resident household registration information database is maintained in each secondary node in each secondary blockchain, and only the resident household registration information required for the current secondary blockchain is stored in the resident household registration information database, and no other times are stored. Resident household registration information required for the blockchain.
  • the resident household registration information database maintained by each secondary node in the same secondary blockchain is consistent.
  • Step S204 the first node forwards the resident household registration information to the second node.
  • the second node is a primary node of a secondary blockchain to which the first node belongs.
  • the first node may encrypt the resident household registration information before forwarding the resident household registration information.
  • For the specific encryption method refer to the content in step S201, and details are not described herein again.
  • Step S205 the second node generates a second block according to the resident household registration information, and broadcasts the second block in the main blockchain.
  • the second node first acquires a chain end block in the main blockchain, that is, a block newly added into the main block chain, where each block includes a block header and a block body, and then performing a feature operation on the block header of the chain tail block to obtain a first feature value; performing a feature operation on the resident household registration information to obtain a second feature value; and according to the first feature value and the The second feature value generates a block header of the second block, and generates a block body of the second block according to the resident household registration information, thereby forming a complete second block.
  • Step S206 each main node in the main blockchain updates a local resident household registration information database according to the second block.
  • Each of the master nodes in the main blockchain maintains a local resident household registration information database, and stores the resident household registration information required for all the secondary blockchains in the resident household registration information database, that is, backs up the complete resident registration. information.
  • the resident household registration information database maintained by each of the master nodes in the main blockchain is consistent.
  • the steps shown in FIG. 3 may be further included:
  • Step S301 the first node receives a resident household registration information storage request sent by the user terminal.
  • the resident household registration information storage request includes an identity identifier, where the identity identifier is a unique identifier of the resident household registration information, and the identity identifiers of different resident household registration information are also different.
  • Step S302 the first node extracts the identity identifier in the resident household registration request, and queries the identity identifier in the local resident household registration information database.
  • the identity identifier is first hashed using K independent hash functions according to the following formula:
  • HashKeyk HASHk (Identity)
  • Identity is the identity identifier
  • HASHk is a hash function with sequence number k
  • HashKeyk is a hash value of k obtained by operation, 1 ⁇ k ⁇ K
  • K is an integer greater than 1.
  • an array of queries corresponding to the local resident household registration information database is obtained, and the query array is a preset array for characterizing whether the specific data is stored in the local resident household registration information database.
  • the query array does not satisfy the determining condition, determining that the identity identifier is not queried in the local resident household registration information database, and if the query array satisfies the judgment condition, determining the local resident household registration information database The identity is queried in the middle.
  • the preset process of the query array specifically includes:
  • ARRAY[m] Value_2, where 1 ⁇ m ⁇ M, M is the query The number of elements in the array, and Value_2 is the preset second value.
  • the specific values of the first value and the second value may be set according to actual conditions. Generally, the first value may be set to 1, and the second value is 0.
  • step S303 is performed, and if the query fails, that is, the first node is in the local resident household registration information database. If the identity is not found, step S304 and step S305 are performed.
  • Step S303 the first node sends a message that the resident household registration information already exists to the user terminal.
  • Step S304 the first node sends a first collaborative processing request to the second node.
  • the first node is stored in the resident household registration information database of the first node, and only the local resident registration information is stored, and the second resident local household registration information database stores the complete resident registration information, so the first node
  • the first collaborative processing request may be sent to the second node, so that the second node continues to query the local resident household registration information database. Said identity.
  • the identity identifier is included in the first collaborative processing request.
  • Step S305 After receiving the first collaborative processing request sent by the first node, the second node queries the local resident registration information database for the identity identifier.
  • step S302 The specific query process is similar to that in step S302. For details, refer to the description in step S302, and details are not described herein again.
  • step S306 and step S307 are performed, and if the query fails, that is, the second node is in the local resident registration. If the identity identifier is not found in the information database, step S308 and step S309 are performed.
  • Step S306 the second node sends a message that the resident household registration information already exists to the first node.
  • Step S307 the first node forwards a message that the resident household registration information already exists to the user terminal.
  • Step S308 the second node sends a message to the first node that the resident household registration information does not exist.
  • the identity information is first used to check whether the household registration information has been stored, and if not stored, the storage process is executed, and if it has been stored, The storage process is executed again, thereby avoiding multiple storage of the same resident household registration information, reducing the consumption of storage resources and improving the effective utilization of the storage resources.
  • the user terminal may include the steps shown in FIG. 4:
  • Step S401 the first node receives a resident household registration information query request sent by the user terminal.
  • the resident household registration information inquiry request includes an identity identifier.
  • Step S402 the first node extracts the identity identifier in the resident household registration query request, and queries the identity identifier in the local resident household registration information database.
  • step S403 is performed, and if the query fails, that is, the first node is in the local resident household registration information database. If the identity is not found, step S404 and step S405 are performed.
  • Step S403 the first node sends the resident household registration information corresponding to the identity identifier to the user terminal.
  • Step S404 the first node sends a second collaborative processing request to the second node.
  • the second collaborative processing request includes the identity identifier
  • Step S405 After receiving the second coordinated processing request sent by the first node, the second node queries the local resident household registration information database for the identity identifier.
  • step S406 and step S407 are performed, and if the query fails, that is, the second node is in the local resident registration. If the identity identifier is not found in the information database, step S408 and step S409 are performed.
  • Step S406 the second node sends the resident household registration information corresponding to the identity identifier to the first node.
  • Step S407 the first node forwards the resident household registration information to the user terminal.
  • Step S408 the second node sends a message that the resident household registration information does not exist to the first node.
  • Step S409 the first node forwards, to the user terminal, a message that the household registration information does not exist.
  • the embodiment of the present application realizes that the complete resident household registration information is distributed and stored in each secondary node in each sub-blockchain, and only the partial household registration information needs to be stored in each secondary node, only in the The complete household registration information is backed up in each main node in the main blockchain.
  • the overall security of the household registration information is ensured, on the other hand, the overall redundancy is greatly reduced, and the storage resources are reduced. Consumption.
  • FIG. 5 is a structural diagram of an embodiment of a server provided by an embodiment of the present application, where the server is applied to the first node,
  • the server can include:
  • the resident household registration information receiving module 501 is configured to receive the resident household registration information sent by the user terminal;
  • the first block generating module 502 is configured to generate a first block according to the resident household registration information
  • a first block broadcast module 503, configured to broadcast the first block in a secondary block chain to which the first node belongs, so that each secondary node in the secondary block chain to which the first node belongs is based on The first block updates a local resident household registration information database;
  • a first forwarding module 504 configured to forward the resident household registration information to a second node, where the second node is a primary node of a secondary blockchain to which the first node belongs, so that the second node is configured according to the The resident household registration information generates a second block, and the second block is broadcast in the main blockchain.
  • server may further include:
  • a storage request receiving module configured to receive a resident household registration information storage request sent by the user terminal, where the resident household registration information storage request includes an identity identifier;
  • a first extraction module configured to extract an identity identifier in the resident household registration request
  • a first query module configured to query the identity identifier in a local resident household registration information database
  • a message sending module configured to send, to the user terminal, a message that the resident household registration information already exists if the identity identifier is queried in the local resident household registration information database;
  • a first collaborative processing request sending module configured to: if the identity identifier is not found in the local resident household registration information database, send a first collaborative processing request to the second node, so that the second node is locally The identity identifier is queried in the resident household registration information database, and the first collaborative processing request includes the identity identifier.
  • the first query module may include:
  • a hash operation unit configured to hash the identity identifier by using K mutually independent hash functions according to the following formula:
  • HashKeyk HASHk (Identity)
  • Identity is the identity identifier
  • HASHk is a hash function with sequence number k
  • HashKeyk is a hash value of k obtained by operation, 1 ⁇ k ⁇ K
  • K is an integer greater than 1.
  • the query array obtaining unit is configured to obtain a query array corresponding to the local resident household registration information database, where the query array is an preset array for characterizing whether the specific data is stored in the local resident household registration information database;
  • the first determining unit is configured to determine that the identity identifier is not queried in the local resident household registration information database if the query array does not satisfy the determining condition.
  • server may further include:
  • the first assignment module is configured to perform the following assignment operations on the value of any one of the m when the resident household registration information database has not stored any resident household registration information:
  • the identity identifier extraction module is configured to extract an identity identifier in the resident household registration information when a resident household registration information is added to the local resident household registration information database;
  • a hash operation unit configured to hash the identity identifier by using K mutually independent hash functions according to the following formula:
  • HashKeyExistk HASHk (IdentityExist)
  • IdentityExist is the identity identifier
  • HashKeyExistk is a hash value of the sequence number k obtained by the operation
  • the second assignment module is configured to perform the following assignment operations on the value of any one of k:
  • server may further include:
  • the query request receiving module is configured to receive a resident household registration information query request sent by the user terminal, where the resident household registration information query request includes an identity identifier;
  • a second extraction module configured to extract an identity identifier in the resident household registration query request
  • a second query module configured to query the identity identifier in a local resident household registration information database
  • the household registration information sending module is configured to: if the first node queries the identity identifier in the local resident household registration information database, send the resident household registration information corresponding to the identity identifier to the user terminal;
  • a second collaborative processing request sending module configured to: if the identity identifier is not found in the local resident household registration information database, send a second collaborative processing request to the second node, so that the second node is locally Querying the identity identifier in the resident household registration information database, where the second collaborative processing request includes the identity identifier;
  • a second forwarding module configured to forward the resident household registration information corresponding to the identity identifier sent by the second node to the user terminal.
  • FIG. 6 is a schematic block diagram of a server provided by an embodiment of the present application. For convenience of description, only parts related to the embodiment of the present application are shown.
  • the server 6 may be a local server or a cloud server.
  • the server 6 can include a processor 60, a memory 61, and computer readable instructions 62 stored in the memory 61 and executable on the processor 60.
  • the processor 60 executes the computer readable instructions 62 to implement the steps performed by the first node in the foregoing embodiments of the respective resident registration information management method, or the processor 60 executes the computer readable instructions
  • the functions of the modules/units in the various virtual device embodiments described above are implemented at 62 o'clock, such as the functions of modules 501 through 504 shown in FIG.
  • the functional units in the various embodiments of the present application may be stored in a computer readable storage medium if implemented in the form of a software functional unit and sold or used as a separate product. Based on such understanding, the technical solution of the present application, in essence or the contribution to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium.
  • a number of computer readable instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application.

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Tourism & Hospitality (AREA)
  • Strategic Management (AREA)
  • Human Resources & Organizations (AREA)
  • Economics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Educational Administration (AREA)
  • Primary Health Care (AREA)
  • Health & Medical Sciences (AREA)
  • Development Economics (AREA)
  • General Health & Medical Sciences (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Data Mining & Analysis (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请属于计算机技术领域,尤其涉及一种居民户籍信息管理方法、服务器及计算机可读存储介质。所述方法应用于预设的居民户籍信息管理区块链中,所述居民户籍信息管理区块链包括一条主区块链及两条以上的次区块链,每条所述次区块链中包括一个主节点和至少一个次节点,所述主区块链中包括各条所述次区块链的主节点,所述方法实现了将完整的居民户籍信息分散存储在各条次区块链中的各个次节点中,每个次节点中仅需存储部分的居民户籍信息,只在所述主区块链中的各个主节点中备份了完整的居民户籍信息,一方面,保证了居民户籍信息的整体安全性,另一方面,大大降低了整体的冗余度,减少了对于存储资源的消耗。

Description

居民户籍信息管理方法、服务器及计算机可读存储介质
本申请要求于2018年4月10日提交中国专利局、申请号为201810315726.2、发明名称为“一种居民户籍信息管理方法及服务器”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请属于计算机技术领域,尤其涉及一种居民户籍信息管理方法、服务器及计算机可读存储介质。
背景技术
目前通常使用的居民户籍信息管理方式可以分为两类,一类是集中式管理,这种方式会将所有的居民户籍信息集中存储在一个服务器中,但是这种存储方式在被黑客侵入或者发生故障时极易发生居民户籍信息被篡改或者损坏的情况,安全性较低;另一类是分布式管理,这种方式会将居民户籍信息分布存储在多个服务器中,也即形成了多套备份,有效地提高了信息的安全性,但是由于这种方式是以冗余度来换取安全性,在居民户籍信息较多的情况下,会浪费大量的存储资源。
技术问题
有鉴于此,本申请实施例提供了一种居民户籍信息管理方法、服务器及计算机可读存储介质,以解决现有的集中式管理安全性较低,以及分布式管理浪费大量的存储资源的问题。
技术解决方案
本申请实施例的第一方面提供了一种居民户籍信息管理方法,应用于预设的居民户籍信息管理区块链中,所述居民户籍信息管理区块链包括一条主区块链及两条以上的次区块链,每条所述次区块链中包括一个主节点和至少一个次节点,所述主区块链中包括各条所述次区块链的主节点,所述方法包括:
第一节点接收用户终端发送的居民户籍信息,所述第一节点为任意一个所述次节点;
所述第一节点根据所述居民户籍信息生成第一区块,并在所述第一节点所属的次区块链中广播所述第一区块;
所述第一节点所属的次区块链中的各个次节点根据所述第一区块更新本地的居民户籍信息数据库;
所述第一节点将所述居民户籍信息转发至第二节点,所述第二节点为所述第一节点所属的次区块链的主节点;
所述第二节点根据所述居民户籍信息生成第二区块,并在所述主区块链中广播所述第二区块;
所述主区块链中的各个主节点根据所述第二区块更新本地的居民户籍信息数据库。
本申请实施例的第二方面提供了一种服务器,可以包括用于实现上述居民户籍信息管理方法的步骤的模块。
本申请实施例的第三方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被处理器执行时实现上述居民户籍信息管理方法的步骤。
本申请实施例的第四方面提供了一种服务器,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现上述居民户籍信息管理方法的步骤。
有益效果
本申请实施例与现有技术相比存在的有益效果是:通过本申请实施例,实现了将完整的居民户籍信息分散存储在各条次区块链中的各个次节点中,每个次节点中仅需存储部分的居民户籍信息,只在所述主区块链中的各个主节点中备份了完整的居民户籍信息,一方面,保证了居民户籍信息的整体安全性,另一方面,大大降低了整体的冗余度,减少了对于存储资源的消耗。
附图说明
图1为本申请实施例中居民户籍信息管理区块链的一个具体实例图;
图2为本申请实施例中一种居民户籍信息管理方法的一个实施例流程图;
图3为本申请实施例中对居民户籍信息存储请求进行处理的示意流程图;
图4为本申请实施例中对居民户籍信息查询请求进行处理的示意流程图;
图5为本申请实施例中一种服务器的一个实施例结构图;
图6为本申请实施例中一种服务器的示意框图。
本发明的实施方式
本申请实施例中的房产交易方法应用于预设的居民户籍信息管理区块链中,所述居民户籍信息管理区块链包括一条主区块链及两条以上的次区块链,每条所述次区块链中包括一个主节点和至少一个次节点,所述主区块链中包括各条所述次区块链的主节点。图1所示为所述居民户籍信息管理区块链的一个具体实例,该实例中的居民户籍信息管理区块链包括三条次区块链,每条次区块链中包括两个次节点。当然,在不同的情景下,可以对所述居民户籍信息管理区块链所包括的次区块链的条数以及每条次区块链所包括的次节点的个数进行调整,其中,不同的次区块链所包括的次节点的个数可以是相同的,也可以是不同的。
如图2所示,本申请实施例中一种居民户籍信息管理方法的一个实施例可以包括:
步骤S201,第一节点接收用户终端发送的居民户籍信息。
所述第一节点为任意一个所述次节点。
优选地,为了保证通信过程的安全性,所述用户终端在发送所述居民户籍信息前,可以对所述居民户籍信息进行加密,具体的加密方式可以使用对称加密算法,也可以使用非对称加密算法。其中,对称加密算法为采用单钥密码系统的加密方法,同一个密钥可以同时用作信息的加密和解密,若采用对称加密算法,则所述用户终端采用预设的密钥对所述居民户籍信息进行加密,所述第一节点在接收到所述居民户籍信息后,也采用相同的密钥对所述居民户籍信息进行解密。非对称加密算法需要两个密钥,分别为公钥和私钥。公钥和私钥是一对,如果用公钥对信息进行加密,只有用对应的私钥才能解密;如果用私钥对数据进行加密,那么只有用对应的公钥才能解密,若采用非对称加密算法,则所述用户终端采用预设的密钥(公钥或私钥)对所述居民户籍信息进行加密,所述第一节点在接收到所述居民户籍信息后,使用另一个密钥(若加密使用公钥,则此处使用私钥,若加密使用私钥,则此处使用公钥)对所述居民户籍信息进行解密。
步骤S202,所述第一节点根据所述居民户籍信息生成第一区块,并在所述第一节点所属的次区块链中广播所述第一区块。
具体地,所述第一节点首先获取其所属的次区块链中的链尾区块,也即最新添加入所述次区块链中的区块,其中,每个区块均包括区块头和区块主体,然后对所述链尾区块的区块头进行特征运算,得到第一特征值;对所述居民户籍信息进行特征运算,得到第二特征值;根据所述第一特征值和所述第二特征值生成所述第一区块的区块头,并根据所述居民户籍信息生成所述第一区块的区块主体,从而构成了完整的第一区块。
所述特征运算可以为哈希运算,所述特征值可以为运算所得的哈希值。哈希运算是把任意长度的输入变换成固定长度的输出,该输出就是哈希值。这种转换是一种压缩映射,也就是,输出的长度通常远小于输入的长度,不同的输入可能会散列成相同的输出,而不可能从输出值来唯一的确定输入值。简单的说就是一种将任意长度的消息压缩到某一固定长度的消息摘要的过程。在本实施例中所使用的哈希运算可以包括但不限于MD4、MD5、SHA1等具体的算法。
步骤S203,所述第一节点所属的次区块链中的各个次节点根据所述第一区块更新本地的居民户籍信息数据库。
每个次区块链中的各个次节点中均维护着本地的居民户籍信息数据库,在该居民户籍信息数据库中仅存储当前的次区块链所需的居民户籍信息,而不存储其它的次区块链所需的居民户籍信息。在同一个次区块链中的各个次节点所维护的居民户籍信息数据库是一致的。
步骤S204,所述第一节点将所述居民户籍信息转发至第二节点。
所述第二节点为所述第一节点所属的次区块链的主节点。为了保证通信过程的安全性,所述第一节点在转发所述居民户籍信息前,可以对所述居民户籍信息进行加密,具体的加密方法可以参照步骤S201中的内容,在此不再赘述。
步骤S205,所述第二节点根据所述居民户籍信息生成第二区块,并在所述主区块链中广播所述第二区块。
具体地,所述第二节点首先获取所述主区块链中的链尾区块,也即最新添加入所述主区块链中的区块,其中,每个区块均包括区块头和区块主体,然后对所述链尾区块的区块头进行特征运算,得到第一特征值;对所述居民户籍信息进行特征运算,得到第二特征值;根据所述第一特征值和所述第二特征值生成所述第二区块的区块头,并根据所述居民户籍信息生成所述第二区块的区块主体,从而构成了完整的第二区块。
步骤S206,所述主区块链中的各个主节点根据所述第二区块更新本地的居民户籍信息数据库。
所述主区块链中的各个主节点中均维护着本地的居民户籍信息数据库,在该居民户籍信息数据库中存储所有的次区块链所需的居民户籍信息,即备份了完整的居民户籍信息。在所述主区块链中的各个主节点所维护的居民户籍信息数据库是一致的。
进一步地,为了避免同一居民户籍信息被重复存储,在图2所示的步骤之前,还可以包括如图3所示的步骤:
步骤S301,所述第一节点接收所述用户终端发送的居民户籍信息存储请求。
所述居民户籍信息存储请求中包括身份标识,所述身份标识为所述居民户籍信息的唯一标识,不同居民户籍信息的身份标识也各不相同。
步骤S302,所述第一节点提取所述居民户籍存储请求中的身份标识,并在本地的居民户籍信息数据库中查询所述身份标识。
具体地,首先根据下式分别使用K个相互独立的哈希函数对所述身份标识进行哈希运算:
HashKeyk =HASHk (Identity)
其中,Identity为所述身份标识,HASHk为序号为k的哈希函数,HashKeyk为运算得到的序号为k的哈希值,1≤k≤K,K为大于1的整数。
然后,获取与本地的居民户籍信息数据库对应的查询数组,所述查询数组为预设的用于表征特定数据是否存储在本地的居民户籍信息数据库中的数组。
最后,判断所述查询数组是否满足以下判断条件:对任意一个k的取值,等式ARRAY[HashKeyk]==Value_1均成立,其中,ARRAY为所述查询数组,Value_1为预设的第一数值。
若所述查询数组不满足所述判断条件,则判定在本地的居民户籍信息数据库中未查询到所述身份标识,若所述查询数组满足所述判断条件,则判定在本地的居民户籍信息数据库中查询到所述身份标识。
其中,所述查询数组的预设过程具体包括:
当本地的居民户籍信息数据库中尚未存储任何居民户籍信息时,对任意一个m的取值,均执行以下赋值操作:ARRAY[m]=Value_2,其中,1≤m≤M,M为所述查询数组中的元素个数,Value_2为预设的第二数值。
当本地的居民户籍信息数据库中新增了一条居民户籍信息时,首先提取所述居民户籍信息中的身份标识,然后根据下式分别使用K个相互独立的哈希函数对所述身份标识进行哈希运算:HashKeyExistk=HASHk (IdentityExist),其中,IdentityExist为所述身份标识,HashKeyExistk为运算得到的序号为k的哈希值。最后,对任意一个k的取值,均执行以下赋值操作:ARRAY[HashKeyExistk]=Value_1。
所述第一数值和所述第二数值的具体取值可以根据实际情况设置,一般地,可以设置所述第一数值为1,所述第二数值为0。
若查询成功,也即所述第一节点在本地的居民户籍信息数据库中查询到所述身份标识,则执行步骤S303,若查询失败,也即所述第一节点在本地的居民户籍信息数据库中未查找到所述身份标识,则执行步骤S304和步骤S305。
步骤S303,所述第一节点向所述用户终端发送居民户籍信息已存在的消息。
由于所述居民户籍信息已经被存储过,则无需再执行图2所示的步骤。
步骤S304,所述第一节点向所述第二节点发送第一协同处理请求。
由于所述第一节点本地的居民户籍信息数据库中存储的只是局部的居民户籍信息,而所述第二节点本地的居民户籍信息数据库中存储的是完整的居民户籍信息,因此所述第一节点在本地的居民户籍信息数据库中未查询到所述身份标识时,可以向所述第二节点发送第一协同处理请求,以使所述第二节点继续在其本地的居民户籍信息数据库中查询所述身份标识。所述第一协同处理请求中包括所述身份标识。
步骤S305,所述第二节点在接收到所述第一节点发送的所述第一协同处理请求后,在本地的居民户籍信息数据库中查询所述身份标识。
具体的查询过程与步骤S302中的类似,具体可参照步骤S302中的描述,在此不再赘述。
若查询成功,也即所述第二节点在本地的居民户籍信息数据库中查询到所述身份标识,则执行步骤S306和步骤S307,若查询失败,也即所述第二节点在本地的居民户籍信息数据库中未查找到所述身份标识,则执行步骤S308和步骤S309。
步骤S306,所述第二节点向所述第一节点发送居民户籍信息已存在的消息。
步骤S307,所述第一节点向所述用户终端转发居民户籍信息已存在的消息。
由于所述居民户籍信息已经被存储过,则无需再执行图2所示的步骤。
步骤S308,所述第二节点向所述第一节点发送居民户籍信息不存在的消息。
由于所述居民户籍信息尚未被存储过,则可继续执行图2所示的步骤。
通过图3所示的步骤,在进行居民户籍信息存储之前,首先通过身份标识查询该居民户籍信息是否已被存储过,若未被存储过,则执行存储过程,若已被存储过,则不再执行存储过程,从而避免了同一居民户籍信息的多次存储,减少了对于存储资源的消耗,提高了存储资源的有效利用率。
进一步地,当用户终端需要查询某个居民户籍信息时,可以包括如图4所示的步骤:
步骤S401,所述第一节点接收用户终端发送的居民户籍信息查询请求。
所述居民户籍信息查询请求中包括身份标识。
步骤S402,所述第一节点提取所述居民户籍查询请求中的身份标识,并在本地的居民户籍信息数据库中查询所述身份标识。
若查询成功,也即所述第一节点在本地的居民户籍信息数据库中查询到所述身份标识,则执行步骤S403,若查询失败,也即所述第一节点在本地的居民户籍信息数据库中未查找到所述身份标识,则执行步骤S404和步骤S405。
步骤S403,所述第一节点向所述用户终端发送与所述身份标识对应的居民户籍信息。
步骤S404,所述第一节点向所述第二节点发送第二协同处理请求。
所述第二协同处理请求中包括所述身份标识;
步骤S405,所述第二节点在接收到所述第一节点发送的所述第二协同处理请求后,在本地的居民户籍信息数据库中查询所述身份标识。
若查询成功,也即所述第二节点在本地的居民户籍信息数据库中查询到所述身份标识,则执行步骤S406和步骤S407,若查询失败,也即所述第二节点在本地的居民户籍信息数据库中未查找到所述身份标识,则执行步骤S408和步骤S409。
步骤S406,所述第二节点向所述第一节点发送与所述身份标识对应的居民户籍信息。
步骤S407,所述第一节点向所述用户终端转发所述居民户籍信息。
步骤S408,所述第二节点向所述第一节点发送居民户籍信息不存在的消息。
步骤S409,所述第一节点向所述用户终端转发居民户籍信息不存在的消息。
综上所述,本申请实施例实现了将完整的居民户籍信息分散存储在各条次区块链中的各个次节点中,每个次节点中仅需存储部分的居民户籍信息,只在所述主区块链中的各个主节点中备份了完整的居民户籍信息,一方面,保证了居民户籍信息的整体安全性,另一方面,大大降低了整体的冗余度,减少了对于存储资源的消耗。
对应于上文实施例所述的一种居民户籍信息管理方法,图5示出了本申请实施例提供的一种服务器的一个实施例结构图,所述服务器应用于所述第一节点中,所述服务器可以包括:
居民户籍信息接收模块501,用于接收用户终端发送的居民户籍信息;
第一区块生成模块502,用于根据所述居民户籍信息生成第一区块;
第一区块广播模块503,用于在所述第一节点所属的次区块链中广播所述第一区块,以使所述第一节点所属的次区块链中的各个次节点根据所述第一区块更新本地的居民户籍信息数据库;
第一转发模块504,用于将所述居民户籍信息转发至第二节点,所述第二节点为所述第一节点所属的次区块链的主节点,以使所述第二节点根据所述居民户籍信息生成第二区块,并在所述主区块链中广播所述第二区块。
进一步地,所述服务器还可以包括:
存储请求接收模块,用于接收所述用户终端发送的居民户籍信息存储请求,所述居民户籍信息存储请求中包括身份标识;
第一提取模块,用于提取所述居民户籍存储请求中的身份标识;
第一查询模块,用于在本地的居民户籍信息数据库中查询所述身份标识;
消息发送模块,用于若在本地的居民户籍信息数据库中查询到所述身份标识,则向所述用户终端发送居民户籍信息已存在的消息;
第一协同处理请求发送模块,用于若在本地的居民户籍信息数据库中未查找到所述身份标识,则向所述第二节点发送第一协同处理请求,以使所述第二节点在本地的居民户籍信息数据库中查询所述身份标识,所述第一协同处理请求中包括所述身份标识。
进一步地,所述第一查询模块可以包括:
哈希运算单元,用于根据下式分别使用K个相互独立的哈希函数对所述身份标识进行哈希运算:
HashKeyk =HASHk (Identity)
其中,Identity为所述身份标识,HASHk为序号为k的哈希函数,HashKeyk为运算得到的序号为k的哈希值,1≤k≤K,K为大于1的整数;
查询数组获取单元,用于获取与本地的居民户籍信息数据库对应的查询数组,所述查询数组为预设的用于表征特定数据是否存储在本地的居民户籍信息数据库中的数组;
条件判断单元,用于判断所述查询数组是否满足以下判断条件:对任意一个k的取值,等式ARRAY[HashKeyk]==Value_1均成立,其中,ARRAY为所述查询数组,Value_1为预设的第一数值;
第一判定单元,用于若所述查询数组不满足所述判断条件,则判定在本地的居民户籍信息数据库中未查询到所述身份标识。
进一步地,所述服务器还可以包括:
第一赋值模块,用于当本地的居民户籍信息数据库中尚未存储任何居民户籍信息时,对任意一个m的取值,均执行以下赋值操作:
ARRAY[m]=Value_2
其中,1≤m≤M,M为所述查询数组中的元素个数,Value_2为预设的第二数值;
身份标识提取模块,用于当本地的居民户籍信息数据库中新增了一条居民户籍信息时,提取所述居民户籍信息中的身份标识;
哈希运算单元,用于根据下式分别使用K个相互独立的哈希函数对所述身份标识进行哈希运算:
HashKeyExistk=HASHk (IdentityExist)
其中,IdentityExist为所述身份标识,HashKeyExistk为运算得到的序号为k的哈希值;
第二赋值模块,用于对任意一个k的取值,均执行以下赋值操作:
ARRAY[HashKeyExistk]=Value_1。
进一步地,所述服务器还可以包括:
查询请求接收模块,用于接收用户终端发送的居民户籍信息查询请求,所述居民户籍信息查询请求中包括身份标识;
第二提取模块,用于提取所述居民户籍查询请求中的身份标识;
第二查询模块,用于在本地的居民户籍信息数据库中查询所述身份标识;
户籍信息发送模块,用于若所述第一节点在本地的居民户籍信息数据库中查询到所述身份标识,则向所述用户终端发送与所述身份标识对应的居民户籍信息;
第二协同处理请求发送模块,用于若在本地的居民户籍信息数据库中未查找到所述身份标识,则向所述第二节点发送第二协同处理请求,以使所述第二节点在本地的居民户籍信息数据库中查询所述身份标识,所述第二协同处理请求中包括所述身份标识;
第二转发模块,用于向所述用户终端转发所述第二节点发送的与所述身份标识对应的居民户籍信息。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的服务器、模块和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。
图6示出了本申请实施例提供的一种服务器的示意框图,为了便于说明,仅示出了与本申请实施例相关的部分。
在本实施例中,所述服务器6可以是本地服务器,也可以是云端服务器。该服务器6可包括:处理器60、存储器61以及存储在所述存储器61中并可在所述处理器60上运行的计算机可读指令62。所述处理器60执行所述计算机可读指令62时实现上述各个居民户籍信息管理方法实施例中由所述第一节点所执行的步骤,或者,所述处理器60执行所述计算机可读指令62时实现上述各虚拟装置实施例中各模块/单元的功能,例如图5所示模块501至504的功能。
在本申请各个实施例中的各功能单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干计算机可读指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。

Claims (20)

  1. 一种居民户籍信息管理方法,其特征在于,所述方法应用于预设的居民户籍信息管理区块链中,所述居民户籍信息管理区块链包括一条主区块链及两条以上的次区块链,每条所述次区块链中包括一个主节点和至少一个次节点,所述主区块链中包括各条所述次区块链的主节点,所述方法包括:
    第一节点接收用户终端发送的居民户籍信息,所述第一节点为任意一个所述次节点;
    所述第一节点根据所述居民户籍信息生成第一区块,并在所述第一节点所属的次区块链中广播所述第一区块;
    所述第一节点所属的次区块链中的各个次节点根据所述第一区块更新本地的居民户籍信息数据库;
    所述第一节点将所述居民户籍信息转发至第二节点,所述第二节点为所述第一节点所属的次区块链的主节点;
    所述第二节点根据所述居民户籍信息生成第二区块,并在所述主区块链中广播所述第二区块;
    所述主区块链中的各个主节点根据所述第二区块更新本地的居民户籍信息数据库。
  2. 根据权利要求1所述的居民户籍信息管理方法,其特征在于,在第一节点接收用户终端发送的居民户籍信息之前,还包括:
    所述第一节点接收所述用户终端发送的居民户籍信息存储请求,所述居民户籍信息存储请求中包括身份标识;
    所述第一节点提取所述居民户籍存储请求中的身份标识,并在本地的居民户籍信息数据库中查询所述身份标识;
    若所述第一节点在本地的居民户籍信息数据库中查询到所述身份标识,则向所述用户终端发送居民户籍信息已存在的消息;
    若所述第一节点在本地的居民户籍信息数据库中未查找到所述身份标识,则向所述第二节点发送第一协同处理请求,所述第一协同处理请求中包括所述身份标识;
    所述第二节点在接收到所述第一节点发送的所述第一协同处理请求后,在本地的居民户籍信息数据库中查询所述身份标识;
    若所述第二节点在本地的居民户籍信息数据库查询到所述身份标识,则向所述第一节点发送居民户籍信息已存在的消息。
  3. 根据权利要求2所述的居民户籍信息管理方法,其特征在于,所述在本地的居民户籍信息数据库中查询所述身份标识包括:
    根据下式分别使用K个相互独立的哈希函数对所述身份标识进行哈希运算:
    HashKeyk =HASHk (Identity)
    其中,Identity为所述身份标识,HASHk为序号为k的哈希函数,HashKeyk为运算得到的序号为k的哈希值,1≤k≤K,K为大于1的整数;
    获取与本地的居民户籍信息数据库对应的查询数组,所述查询数组为预设的用于表征特定数据是否存储在本地的居民户籍信息数据库中的数组;
    判断所述查询数组是否满足以下判断条件:对任意一个k的取值,等式ARRAY[HashKeyk]==Value_1均成立,其中,ARRAY为所述查询数组,Value_1为预设的第一数值;
    若所述查询数组不满足所述判断条件,则判定在本地的居民户籍信息数据库中未查询到所述身份标识。
  4. 根据权利要求3所述的居民户籍信息管理方法,其特征在于,所述查询数组的预设过程包括:
    当本地的居民户籍信息数据库中尚未存储任何居民户籍信息时,对任意一个m的取值,均执行以下赋值操作:
    ARRAY[m]=Value_2
    其中,1≤m≤M,M为所述查询数组中的元素个数,Value_2为预设的第二数值;
    当本地的居民户籍信息数据库中新增了一条居民户籍信息时,提取所述居民户籍信息中的身份标识;
    根据下式分别使用K个相互独立的哈希函数对所述身份标识进行哈希运算:
    HashKeyExistk=HASHk (IdentityExist)
    其中,IdentityExist为所述身份标识,HashKeyExistk为运算得到的序号为k的哈希值;
    对任意一个k的取值,均执行以下赋值操作:
    ARRAY[HashKeyExistk]=Value_1。
  5. 根据权利要求1至4中任一项所述的居民户籍信息管理方法,其特征在于,还包括:
    所述第一节点接收用户终端发送的居民户籍信息查询请求,所述居民户籍信息查询请求中包括身份标识;
    所述第一节点提取所述居民户籍查询请求中的身份标识,并在本地的居民户籍信息数据库中查询所述身份标识;
    若所述第一节点在本地的居民户籍信息数据库中查询到所述身份标识,则向所述用户终端发送与所述身份标识对应的居民户籍信息;
    若所述第一节点在本地的居民户籍信息数据库中未查找到所述身份标识,则向所述第二节点发送第二协同处理请求,所述第二协同处理请求中包括所述身份标识;
    所述第二节点在接收到所述第一节点发送的所述第二协同处理请求后,在本地的居民户籍信息数据库中查询所述身份标识;
    若所述第二节点在本地的居民户籍信息数据库查询到所述身份标识,则向所述第一节点发送与所述身份标识对应的居民户籍信息;
    所述第一节点向所述用户终端转发所述居民户籍信息。
  6. 一种服务器,其特征在于,所述服务器应用于预设的居民户籍信息管理区块链中的第一节点中,所述居民户籍信息管理区块链包括一条主区块链及两条以上的次区块链,每条所述次区块链中包括一个主节点和至少一个次节点,所述主区块链中包括各条所述次区块链的主节点,所述第一节点为任意一个所述次节点,所述服务器包括:
    居民户籍信息接收模块,用于接收用户终端发送的居民户籍信息;
    第一区块生成模块,用于根据所述居民户籍信息生成第一区块;
    第一区块广播模块,用于在所述第一节点所属的次区块链中广播所述第一区块,以使所述第一节点所属的次区块链中的各个次节点根据所述第一区块更新本地的居民户籍信息数据库;
    第一转发模块,用于将所述居民户籍信息转发至第二节点,所述第二节点为所述第一节点所属的次区块链的主节点,以使所述第二节点根据所述居民户籍信息生成第二区块,并在所述主区块链中广播所述第二区块。
  7. 根据权利要求6所述的服务器,其特征在于,还包括:
    存储请求接收模块,用于接收所述用户终端发送的居民户籍信息存储请求,所述居民户籍信息存储请求中包括身份标识;
    第一提取模块,用于提取所述居民户籍存储请求中的身份标识;
    第一查询模块,用于在本地的居民户籍信息数据库中查询所述身份标识;
    消息发送模块,用于若在本地的居民户籍信息数据库中查询到所述身份标识,则向所述用户终端发送居民户籍信息已存在的消息;
    第一协同处理请求发送模块,用于若在本地的居民户籍信息数据库中未查找到所述身份标识,则向所述第二节点发送第一协同处理请求,以使所述第二节点在本地的居民户籍信息数据库中查询所述身份标识,所述第一协同处理请求中包括所述身份标识。
  8. 根据权利要求7所述的服务器,其特征在于,所述第一查询模块包括:
    哈希运算单元,用于根据下式分别使用K个相互独立的哈希函数对所述身份标识进行哈希运算:
    HashKeyk =HASHk (Identity)
    其中,Identity为所述身份标识,HASHk为序号为k的哈希函数,HashKeyk为运算得到的序号为k的哈希值,1≤k≤K,K为大于1的整数;
    查询数组获取单元,用于获取与本地的居民户籍信息数据库对应的查询数组,所述查询数组为预设的用于表征特定数据是否存储在本地的居民户籍信息数据库中的数组;
    条件判断单元,用于判断所述查询数组是否满足以下判断条件:对任意一个k的取值,等式ARRAY[HashKeyk]==Value_1均成立,其中,ARRAY为所述查询数组,Value_1为预设的第一数值;
    第一判定单元,用于若所述查询数组不满足所述判断条件,则判定在本地的居民户籍信息数据库中未查询到所述身份标识。
  9. 根据权利要求8所述的服务器,其特征在于,还包括:
    第一赋值模块,用于当本地的居民户籍信息数据库中尚未存储任何居民户籍信息时,对任意一个m的取值,均执行以下赋值操作:
    ARRAY[m]=Value_2
    其中,1≤m≤M,M为所述查询数组中的元素个数,Value_2为预设的第二数值;
    身份标识提取模块,用于当本地的居民户籍信息数据库中新增了一条居民户籍信息时,提取所述居民户籍信息中的身份标识;
    哈希运算单元,用于根据下式分别使用K个相互独立的哈希函数对所述身份标识进行哈希运算:
    HashKeyExistk=HASHk (IdentityExist)
    其中,IdentityExist为所述身份标识,HashKeyExistk为运算得到的序号为k的哈希值;
    第二赋值模块,用于对任意一个k的取值,均执行以下赋值操作:
    ARRAY[HashKeyExistk]=Value_1。
  10. 根据权利要求6至9中任一项所述的服务器,其特征在于,还包括:
    查询请求接收模块,用于接收用户终端发送的居民户籍信息查询请求,所述居民户籍信息查询请求中包括身份标识;
    第二提取模块,用于提取所述居民户籍查询请求中的身份标识;
    第二查询模块,用于在本地的居民户籍信息数据库中查询所述身份标识;
    户籍信息发送模块,用于若所述第一节点在本地的居民户籍信息数据库中查询到所述身份标识,则向所述用户终端发送与所述身份标识对应的居民户籍信息;
    第二协同处理请求发送模块,用于若在本地的居民户籍信息数据库中未查找到所述身份标识,则向所述第二节点发送第二协同处理请求,以使所述第二节点在本地的居民户籍信息数据库中查询所述身份标识,所述第二协同处理请求中包括所述身份标识;
    第二转发模块,用于向所述用户终端转发所述第二节点发送的与所述身份标识对应的居民户籍信息。
  11. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,其特征在于,应用于预设的居民户籍信息管理区块链中,所述居民户籍信息管理区块链包括一条主区块链及两条以上的次区块链,每条所述次区块链中包括一个主节点和至少一个次节点,所述主区块链中包括各条所述次区块链的主节点,所述计算机可读指令被处理器执行时实现如下步骤:
    接收用户终端发送的居民户籍信息;
    根据所述居民户籍信息生成第一区块;
    在所述第一节点所属的次区块链中广播所述第一区块,以使所述第一节点所属的次区块链中的各个次节点根据所述第一区块更新本地的居民户籍信息数据库;
    将所述居民户籍信息转发至第二节点,所述第二节点为所述第一节点所属的次区块链的主节点,以使所述第二节点根据所述居民户籍信息生成第二区块,并在所述主区块链中广播所述第二区块。
  12. 根据权利要求11所述的计算机可读存储介质,其特征在于,在接收用户终端发送的居民户籍信息之前,还包括:
    接收所述用户终端发送的居民户籍信息存储请求,所述居民户籍信息存储请求中包括身份标识;
    提取所述居民户籍存储请求中的身份标识;
    在本地的居民户籍信息数据库中查询所述身份标识;
    若在本地的居民户籍信息数据库中查询到所述身份标识,则向所述用户终端发送居民户籍信息已存在的消息;
    若在本地的居民户籍信息数据库中未查找到所述身份标识,则向所述第二节点发送第一协同处理请求,以使所述第二节点在本地的居民户籍信息数据库中查询所述身份标识,所述第一协同处理请求中包括所述身份标识。
  13. 根据权利要求12所述的计算机可读存储介质,其特征在于,所述在本地的居民户籍信息数据库中查询所述身份标识包括:
    根据下式分别使用K个相互独立的哈希函数对所述身份标识进行哈希运算:
    HashKeyk =HASHk (Identity)
    其中,Identity为所述身份标识,HASHk为序号为k的哈希函数,HashKeyk为运算得到的序号为k的哈希值,1≤k≤K,K为大于1的整数;
    获取与本地的居民户籍信息数据库对应的查询数组,所述查询数组为预设的用于表征特定数据是否存储在本地的居民户籍信息数据库中的数组;
    判断所述查询数组是否满足以下判断条件:对任意一个k的取值,等式ARRAY[HashKeyk]==Value_1均成立,其中,ARRAY为所述查询数组,Value_1为预设的第一数值;
    若所述查询数组不满足所述判断条件,则判定在本地的居民户籍信息数据库中未查询到所述身份标识。
  14. 根据权利要求13所述的计算机可读存储介质,其特征在于,所述查询数组的预设过程包括:
    当本地的居民户籍信息数据库中尚未存储任何居民户籍信息时,对任意一个m的取值,均执行以下赋值操作:
    ARRAY[m]=Value_2
    其中,1≤m≤M,M为所述查询数组中的元素个数,Value_2为预设的第二数值;
    当本地的居民户籍信息数据库中新增了一条居民户籍信息时,提取所述居民户籍信息中的身份标识;
    根据下式分别使用K个相互独立的哈希函数对所述身份标识进行哈希运算:
    HashKeyExistk=HASHk (IdentityExist)
    其中,IdentityExist为所述身份标识,HashKeyExistk为运算得到的序号为k的哈希值;
    对任意一个k的取值,均执行以下赋值操作:
    ARRAY[HashKeyExistk]=Value_1。
  15. 根据权利要求11至14中任一项所述的计算机可读存储介质,其特征在于,还包括:
    接收用户终端发送的居民户籍信息查询请求,所述居民户籍信息查询请求中包括身份标识;
    提取所述居民户籍查询请求中的身份标识;
    在本地的居民户籍信息数据库中查询所述身份标识;
    若所述第一节点在本地的居民户籍信息数据库中查询到所述身份标识,则向所述用户终端发送与所述身份标识对应的居民户籍信息;
    若在本地的居民户籍信息数据库中未查找到所述身份标识,则向所述第二节点发送第二协同处理请求,以使所述第二节点在本地的居民户籍信息数据库中查询所述身份标识,所述第二协同处理请求中包括所述身份标识;
    向所述用户终端转发所述第二节点发送的与所述身份标识对应的居民户籍信息。
  16. 一种服务器,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现如下步骤:
    接收用户终端发送的居民户籍信息;
    根据所述居民户籍信息生成第一区块;
    在所述第一节点所属的次区块链中广播所述第一区块,以使所述第一节点所属的次区块链中的各个次节点根据所述第一区块更新本地的居民户籍信息数据库;
    将所述居民户籍信息转发至第二节点,所述第二节点为所述第一节点所属的次区块链的主节点,以使所述第二节点根据所述居民户籍信息生成第二区块,并在所述主区块链中广播所述第二区块。
  17. 根据权利要求16所述的服务器,其特征在于,在接收用户终端发送的居民户籍信息之前,还包括:
    接收所述用户终端发送的居民户籍信息存储请求,所述居民户籍信息存储请求中包括身份标识;
    提取所述居民户籍存储请求中的身份标识;
    在本地的居民户籍信息数据库中查询所述身份标识;
    若在本地的居民户籍信息数据库中查询到所述身份标识,则向所述用户终端发送居民户籍信息已存在的消息;
    若在本地的居民户籍信息数据库中未查找到所述身份标识,则向所述第二节点发送第一协同处理请求,以使所述第二节点在本地的居民户籍信息数据库中查询所述身份标识,所述第一协同处理请求中包括所述身份标识。
  18. 根据权利要求17所述的服务器,其特征在于,所述在本地的居民户籍信息数据库中查询所述身份标识包括:
    根据下式分别使用K个相互独立的哈希函数对所述身份标识进行哈希运算:
    HashKeyk =HASHk (Identity)
    其中,Identity为所述身份标识,HASHk为序号为k的哈希函数,HashKeyk为运算得到的序号为k的哈希值,1≤k≤K,K为大于1的整数;
    获取与本地的居民户籍信息数据库对应的查询数组,所述查询数组为预设的用于表征特定数据是否存储在本地的居民户籍信息数据库中的数组;
    判断所述查询数组是否满足以下判断条件:对任意一个k的取值,等式ARRAY[HashKeyk]==Value_1均成立,其中,ARRAY为所述查询数组,Value_1为预设的第一数值;
    若所述查询数组不满足所述判断条件,则判定在本地的居民户籍信息数据库中未查询到所述身份标识。
  19. 根据权利要求18所述的服务器,其特征在于,所述查询数组的预设过程包括:
    当本地的居民户籍信息数据库中尚未存储任何居民户籍信息时,对任意一个m的取值,均执行以下赋值操作:
    ARRAY[m]=Value_2
    其中,1≤m≤M,M为所述查询数组中的元素个数,Value_2为预设的第二数值;
    当本地的居民户籍信息数据库中新增了一条居民户籍信息时,提取所述居民户籍信息中的身份标识;
    根据下式分别使用K个相互独立的哈希函数对所述身份标识进行哈希运算:
    HashKeyExistk=HASHk (IdentityExist)
    其中,IdentityExist为所述身份标识,HashKeyExistk为运算得到的序号为k的哈希值;
    对任意一个k的取值,均执行以下赋值操作:
    ARRAY[HashKeyExistk]=Value_1。
  20. 根据权利要求16至19中任一项所述的服务器,其特征在于,还包括:
    接收用户终端发送的居民户籍信息查询请求,所述居民户籍信息查询请求中包括身份标识;
    提取所述居民户籍查询请求中的身份标识;
    在本地的居民户籍信息数据库中查询所述身份标识;
    若所述第一节点在本地的居民户籍信息数据库中查询到所述身份标识,则向所述用户终端发送与所述身份标识对应的居民户籍信息;
    若在本地的居民户籍信息数据库中未查找到所述身份标识,则向所述第二节点发送第二协同处理请求,以使所述第二节点在本地的居民户籍信息数据库中查询所述身份标识,所述第二协同处理请求中包括所述身份标识;
    向所述用户终端转发所述第二节点发送的与所述身份标识对应的居民户籍信息。
PCT/CN2018/096259 2018-04-10 2018-07-19 居民户籍信息管理方法、服务器及计算机可读存储介质 Ceased WO2019196237A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810315726.2A CN108765230B (zh) 2018-04-10 2018-04-10 一种居民户籍信息管理方法及服务器
CN201810315726.2 2018-04-10

Publications (1)

Publication Number Publication Date
WO2019196237A1 true WO2019196237A1 (zh) 2019-10-17

Family

ID=63981637

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/096259 Ceased WO2019196237A1 (zh) 2018-04-10 2018-07-19 居民户籍信息管理方法、服务器及计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN108765230B (zh)
WO (1) WO2019196237A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108765230B (zh) * 2018-04-10 2020-02-14 平安科技(深圳)有限公司 一种居民户籍信息管理方法及服务器
CN110674531B (zh) * 2019-10-11 2023-06-27 腾讯科技(深圳)有限公司 基于区块链的居住信息管理方法、装置、服务器及介质
CN110941672B (zh) * 2019-11-21 2023-11-24 腾讯科技(深圳)有限公司 户籍管理方法、装置、设备以及存储介质
CN111008386A (zh) * 2019-11-28 2020-04-14 山东爱城市网信息技术有限公司 一种基于区块链管理户籍的方法、设备及介质
CN110909011A (zh) * 2019-12-03 2020-03-24 北京海益同展信息科技有限公司 公民信息的处理方法、装置、设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107222482A (zh) * 2017-06-01 2017-09-29 黑龙江卓亚科技有限公司 一种基于复合区块链网络的数据管理系统及方法
CN107315786A (zh) * 2017-06-12 2017-11-03 腾讯科技(深圳)有限公司 业务数据存储方法及装置
US20180054491A1 (en) * 2016-08-19 2018-02-22 Ca, Inc. Maintaining distributed state among stateless service clients
CN108765230A (zh) * 2018-04-10 2018-11-06 平安科技(深圳)有限公司 一种居民户籍信息管理方法及服务器

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1217277C (zh) * 2002-04-01 2005-08-31 上海网上乐园信息技术有限公司 同网异构分布式信息处理系统及其实现方法
CN104584509A (zh) * 2014-12-31 2015-04-29 深圳大学 一种共享数据的访问控制方法、装置及系统
CN107169865B (zh) * 2017-04-24 2021-06-29 北京果仁宝科技有限公司 基于区块链技术的资产数据处理系统
CN111880746A (zh) * 2017-05-25 2020-11-03 创新先进技术有限公司 一种向区块链系统中写入业务数据的方法和装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180054491A1 (en) * 2016-08-19 2018-02-22 Ca, Inc. Maintaining distributed state among stateless service clients
CN107222482A (zh) * 2017-06-01 2017-09-29 黑龙江卓亚科技有限公司 一种基于复合区块链网络的数据管理系统及方法
CN107315786A (zh) * 2017-06-12 2017-11-03 腾讯科技(深圳)有限公司 业务数据存储方法及装置
CN108765230A (zh) * 2018-04-10 2018-11-06 平安科技(深圳)有限公司 一种居民户籍信息管理方法及服务器

Also Published As

Publication number Publication date
CN108765230A (zh) 2018-11-06
CN108765230B (zh) 2020-02-14

Similar Documents

Publication Publication Date Title
CN115242555B (zh) 一种可监管的跨链隐私数据共享方法及装置
CN110213042B (zh) 一种基于无证书代理重加密的云数据去重方法
CN108449309B (zh) 一种混合型可搜索加密方法和系统
Li et al. A hybrid cloud approach for secure authorized deduplication
WO2019196237A1 (zh) 居民户籍信息管理方法、服务器及计算机可读存储介质
Wang et al. A key-sharing based secure deduplication scheme in cloud storage
CN105681273B (zh) 客户端重复数据删除方法
WO2020224489A1 (zh) 基于区块链的银行数据共享方法及相关设备
CN108768994B (zh) 数据匹配方法、装置及计算机可读存储介质
CN107315967B (zh) 数据匹配方法、装置及计算机可读存储介质
CN114880698B (zh) 数据库访问方法和装置、计算设备和计算机程序产品
CN109586908A (zh) 一种安全报文传输方法及其系统
CN116208330B (zh) 一种基于量子加密的工业互联网云边协同数据安全传输方法及系统
Li et al. Secure deduplication system with active key update and its application in IoT
CN114866244B (zh) 基于密文分组链接加密的可控匿名认证方法、系统及装置
CN107395627B (zh) 一种基于单向函数的轻量级认证协议
Backendal et al. Puncturable key wrapping and its applications
CN108965824B (zh) 基于cpk的视频监控方法、系统、摄像头、服务器及客户端
Zhang et al. Galaxy: A scalable bft and privacy-preserving pub/sub iot data sharing framework based on blockchain
Gao et al. An efficient certificateless public auditing scheme in cloud storage
CN110213232B (zh) 一种指纹特征和密钥双重验证方法和装置
Ramasamy et al. Dynamic verifiable encrypted keyword search using bitmap index and homomorphic MAC
CN110659903B (zh) 一种基于区块链的数据交易方法
CN116366259B (zh) 一种面向密文数据的公共可验证布尔搜索系统及方法
CN118568755A (zh) 一种可信多方数据传输方法、装置、电子设备和存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18914549

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18914549

Country of ref document: EP

Kind code of ref document: A1