WO2020211497A1 - 一种个人资产变更记录的存储方法、系统、装置及设备 - Google Patents

一种个人资产变更记录的存储方法、系统、装置及设备 Download PDF

Info

Publication number
WO2020211497A1
WO2020211497A1 PCT/CN2020/072004 CN2020072004W WO2020211497A1 WO 2020211497 A1 WO2020211497 A1 WO 2020211497A1 CN 2020072004 W CN2020072004 W CN 2020072004W WO 2020211497 A1 WO2020211497 A1 WO 2020211497A1
Authority
WO
WIPO (PCT)
Prior art keywords
data block
asset change
personal asset
hash value
client
Prior art date
Application number
PCT/CN2020/072004
Other languages
English (en)
French (fr)
Inventor
杨新颖
Original Assignee
创新先进技术有限公司
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 创新先进技术有限公司 filed Critical 创新先进技术有限公司
Priority to US16/790,628 priority Critical patent/US10691640B1/en
Publication of WO2020211497A1 publication Critical patent/WO2020211497A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6227Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database where protection concerns the structure of data, e.g. records, types, queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Definitions

  • the embodiments of this specification relate to the field of information technology, and in particular to a storage method, system, device, and equipment for personal asset change records.
  • asset change records are generally stored on the server, although users can query the corresponding personal asset change records from the server.
  • asset allocation itself is a transaction with all parties on the server side, and these asset change records are generally kept by the server side.
  • the user hopes that even if personal data is stored in the server side, the server side cannot tamper with the data at will , And the user can verify at any time whether it has been modified.
  • a method for storing personal asset change records is applied to a system including a database server and a client.
  • the database server stores personal asset change records through a blockchain ledger in a centralized manner.
  • the method includes:
  • the client obtains the personal asset change record, and sends the personal asset change record to the database server;
  • the database server receives the personal asset change record to be stored, and when the preset block condition is reached, determines at least one personal asset change record to be written in the data block, and generates the Nth data block in the blockchain ledger ,
  • the data block contains the hash value of the Nth data block and the personal asset change record:
  • the hash value and block height of the initial data block are given based on a preset method
  • the hash value of the Nth data block is determined according to the personal asset change record in the data block to be written and the hash value of the N-1th data block, and the hash value of the Nth data block is generated. Hope and the Nth data block of the personal asset change record, wherein the block height of the data block increases monotonically based on the sequence of the block time;
  • the database server determines the hash value of the personal asset change record written in the data block, and returns the hash value to the client;
  • the client receives and stores the hash value of the returned personal asset change record and the hash value of the data block.
  • the embodiment of this specification also provides a storage system for personal asset change records, including a database server and a client.
  • the database server stores personal asset change records in a centralized manner through a block chain ledger.
  • the client obtains the personal asset change record, and sends the personal asset change record to the database server;
  • the database server receives the personal asset change record to be stored, and when the preset block condition is reached, determines at least one personal asset change record to be written in the data block, and generates the Nth data block in the blockchain ledger ,
  • the data block contains the hash value of the Nth data block and the personal asset change record:
  • the hash value and block height of the initial data block are given based on a preset method
  • the hash value of the Nth data block is determined according to the personal asset change record in the data block to be written and the hash value of the N-1th data block, and the hash value of the Nth data block is generated. Hope and the Nth data block of the personal asset change record, wherein the block height of the data block increases monotonically based on the sequence of the block time;
  • the database server determines the hash value of the personal asset change record written in the data block, and returns the hash value to the client;
  • the client receives and stores the hash value of the returned personal asset change record and the hash value of the data block.
  • the embodiment of this specification also provides a method for storing personal asset change records, which is applied to a database server, and the method includes:
  • At least one personal asset change record in the data block to be written is determined, and the Nth data block in the block chain ledger is generated, and the data block contains the data of the Nth data block.
  • the hash value and block height of the initial data block are given based on a preset method
  • the hash value of the Nth data block is determined according to the personal asset change record in the data block to be written and the hash value of the N-1th data block, and the hash value of the Nth data block is generated. Hope and the Nth data block of the personal asset change record, wherein the block height of the data block increases monotonically based on the sequence of the block time;
  • the embodiment of this specification also provides a storage device for personal asset change records, which is applied to a database server, and the device includes:
  • the receiving module receives the personal asset change records to be stored sent by the client;
  • the data block generation module when the preset block condition is reached, determines at least one personal asset change record to be written in the data block, and generates the Nth data block in the block chain ledger.
  • the data block contains the first The hash value of the N data blocks and the personal asset change record:
  • the hash value and block height of the initial data block are given based on a preset method
  • the hash value of the Nth data block is determined according to the personal asset change record in the data block to be written and the hash value of the N-1th data block, and the hash value of the Nth data block is generated. Hope and the Nth data block of the personal asset change record, wherein the block height of the data block increases monotonically based on the sequence of the block time;
  • the hash return module determines the hash value of the personal asset change record written in the data block, and returns the hash value to the client.
  • the server stores the user-related asset change records in a block chain ledger, and the user will hold the hash value of the asset change record, so that it can be based on the hash value at any time
  • Initiating the query and verification of asset change records ensures that the user's asset change records have not been tampered with, as well as the integrity of the records, and the user experience is improved.
  • Fig. 1 is a schematic diagram of a flow chart of a personal asset change record in the system provided by an embodiment of this specification;
  • FIG. 2 is a schematic diagram of multiple users using the same account book provided by an embodiment of this specification
  • FIG. 3 is a schematic flowchart of a method for storing personal asset change records in a server provided by an embodiment of this specification;
  • FIG. 4 is a schematic structural diagram of a storage device for personal asset change records in the server provided by the embodiment of this specification;
  • Fig. 5 is a schematic structural diagram of a device for configuring the method of the embodiment of this specification.
  • users can perform asset-related behaviors such as payment and lending through the client, which will also generate corresponding asset change records.
  • the generated asset change records are fragmented, the time is scattered, and the format is also different.
  • it is not convenient for centralized management.
  • the user has a loan record in Huabei, and at the same time there is a quota purchase in Yu'ebao. Income will be generated every day, and Alipay will be used every day to pay for daily consumption, which will cause the user’s assets to change.
  • Figure 1 is a schematic flow diagram of a personal asset change record provided by an embodiment of this specification, which is applied to a system including a database server and a client.
  • the database server uses a block chain in a centralized manner.
  • the ledgers store personal asset change records. The process includes the following steps:
  • the client terminal obtains a personal asset change record, and sends the personal asset change record to the database server.
  • Personal asset change records can be payment records, transfer/receipt records, loan/repayment records, wealth management product delivery records, reconciliation records, etc.
  • the aforementioned personal asset change record can be a record.
  • user A purchases a fund through the client and obtains the delivery record of a fund; or, it can also contain multiple records, for example, user A continuously
  • the client has performed multiple operations on the funds under his own name, and a delivery record is generated every day.
  • the client packs the delivery records of multiple days and uploads them as personal asset change records.
  • the manner in which the client obtains the personal asset change record may be to select a specified personal asset change record through a user instruction, that is, to obtain it based on a user's manual operation.
  • the client may monitor the user's account balance, and when it detects that the balance has changed, it will obtain the related transaction that caused the balance to change, and then obtain the corresponding personal asset change record.
  • the user can determine the type of personal asset change record that needs to be written into the ledger through pre-configuration in the client, and automatically obtain and upload the personal asset change record that meets the setting to the database server.
  • a certain user may generate daily consumption records, cash income records of wealth management products, delivery records of wealth management products, credit card borrowing records, etc. through the client every day.
  • users are most concerned about the delivery records of wealth management products and credit card loan records with higher amounts, so that they can be selected from the configuration options given by the client. Only upload these two types of personal asset change records, and perform pre-configuration. The selection of records can make the ledger more in line with user expectations and improve user experience.
  • S103 The database server receives the personal asset change record to be stored, and when the preset block condition is reached, writes the personal asset change record into the data block in the ledger.
  • the account book is a block chain account book, and the form of the data block can include both the block header and the block body.
  • the block is used to store personal asset change records
  • the block header is used to store the relevant metadata of the data block.
  • the metadata includes the root hash and previous data of the Merkel tree corresponding to the personal asset change record in the block.
  • the preset block conditions include: the number of personal asset change records to be stored reaches the threshold. For example, every time 10 personal asset change records are received, a new data block is generated and 10 personal asset change records are written In the block; or, the time interval from the last block formation time reaches the time threshold, for example, every 1 hour, a new data block is generated, and the personal asset change records received within this 1 hour are written into the block.
  • the N here refers to the serial number of the data block.
  • the data block is in the form of a block chain, which is arranged sequentially based on the order of the block time, and has a strong timing characteristic.
  • the block height of the data block increases monotonically based on the sequence of the block time.
  • the block height can be a serial number, at this time the block height of the Nth data block is N; the block height can also be generated in other ways, for example, based on block time symmetric encryption to generate 12 to 15-bit large integer data as a block high.
  • the data block at this time is the initial data block (also called the genesis block).
  • the current data block (the first data block) can be generated based on the hash value of the previous data block (that is, the N-1th data block).
  • N data blocks for example, one feasible way is to determine the hash value of each personal asset change record to be written in the Nth block, and generate one according to the sequence in the block Merkel tree, the root hash value of the Merkel tree and the hash value of the previous data block are spliced together, and the hash algorithm is used again to generate the hash value of the current block.
  • each data block is determined by a hash value
  • the hash value of the data block is determined by the content and sequence of the personal asset change records in the data block and the hash value of the previous data block.
  • the user can initiate verification based on the hash value of the data block at any time. Any modification of the content of the data block (including the change of the content or order of personal assets in the data block) will result in the hash value of the data block calculated during verification.
  • the hash value of the data block is inconsistent when it is generated, which causes the verification to fail, thus realizing the immutability under centralization.
  • S105 The database server determines the hash value of the personal asset change record written in the data block, and returns the hash value to the client.
  • the hash value of the data block written into the ledger is determined at the same time.
  • the granularity of personal asset change records here is the same as the granularity of the client upload, that is, for each uploaded personal asset change record, the corresponding hash value must be returned, and the personal asset change record can also be returned at the same time.
  • the block hash and block height of the data block for users to verify.
  • the hash value of the data block in which the record is located can also be queried.
  • S107 The client receives the returned hash value of the personal asset change record and the hash value of the data block, and stores it.
  • the server stores the user-related asset change records in a block chain ledger, and the user will hold the hash value of the asset change record, so that it can be based on the hash at any time
  • the value initiates the query and verification of asset change records to ensure that the user's asset change records have not been tampered with, as well as to ensure the integrity of the records and improve user experience.
  • the client can also configure the amount of money, so that when the client obtains the user's personal asset change record, it can filter out some records with a small amount.
  • the specific configuration method can be that a default value of the asset change threshold is given in the client.
  • the default value is generally 0, that is, any personal asset change record will be written into the ledger.
  • Users can set the asset change threshold. For example, if the user configured asset change threshold is 1,000 yuan, the daily payment records will generally not be written into the ledger.
  • the client can also evaluate the historical average asset quota of the user to determine the aforementioned asset change threshold. For example, set the asset change threshold to be 1% of the average asset quota.
  • the specific historical average asset quota may be obtained by evaluating the user's daily assets in the client for a period of history (for example, the previous year), and then averaging the daily evaluation values.
  • the generated ledger may correspond to multiple users.
  • the user of the client terminal specifies other members (such as family members, relatives, friends, partners, etc.), and other members Authorize so that multiple users can share a ledger. That is, the users specified when generating the initial data block all have at least access rights to the ledger.
  • the user who initiates the generation of the ledger through the client has the administrator authority.
  • the administrator authority includes: delete/hide the ledger, configure the access authority of the ledger, configure other user authority, and so on.
  • Fig. 2 is a schematic diagram of multiple users using the same account book provided by the embodiment of this specification.
  • the client can query and verify the ledger based on the hash value at any time.
  • the specific query method can be implemented through query instructions.
  • the query instruction only needs to include the hash value to be queried input by the user.
  • the hash value here can be the hash value of the personal asset change record or the hash value of the data block in the ledger.
  • the database server can traverse and query from the data block, or query from a pre-established index.
  • the first is to enter the hash value of the personal asset change record, and return the block height of the data block where the personal asset change record is located, and the offset in the data block.
  • the second input the hash value of the data block, return the plaintext of all personal asset change records in the data block; or, enter the hash value of the personal asset change record, return the plaintext of the personal asset change record, specifically, you can use it
  • the query command SELECT (khash, &v) is implemented.
  • the database side receives the corresponding query command, the aforementioned query logic is executed based on the hash value to return the result.
  • the third type is the hash value of the input data block, and the block height is returned according to the block hash. Specifically, you can use the query command SELECT (khash, &v, BLK) to achieve.
  • the server cannot find the corresponding result. For example, if the user enters a hash value corresponding to a personal asset change record, but the result is not found in the database, then the user can reasonably suspect that the personal asset change record corresponding to the hash has changed. It may be tampered with, or data loss may have occurred.
  • the user can also actively initiate verification of multiple data blocks or personal asset change records that already exist in the database.
  • the verification instruction specifies which items in the ledger need to be verified through parameters Data block or which personal asset change record initiates verification, for example, a data block can be designated by hash value or block height, and multiple data blocks before or after the data block can be verified whether they are correct; or, through hash
  • the value specifies a corresponding personal asset change record to verify whether the personal asset change record exists in the database.
  • the result of the verification is a "yes" or "no”, and "correct” or “incorrect” metadata.
  • the first is to input the hash value, determine the data block by the hash value, perform verification on the data block, and obtain the verification result.
  • it can be implemented by the verification command VERIFY ('khash', &v).
  • the second type is to input the hash value.
  • the hash value determines the corresponding data block or determines the data block where the personal asset change record corresponding to the hash value is located. From the determined data block, it is verified to the initial data block. Yes, it can be achieved by verifying the instruction VERIFY('khash', &v, -1). Generally speaking, the initial block height is "0" or "1". Therefore, the -1 can also be other smaller than the initial block height value.
  • the third type is to input the hash value, and the corresponding data block is determined by the hash value, and the specified number of data blocks are verified from the determined data block.
  • the fourth type is to input the block height and the number to be verified.
  • the data block corresponding to the block height starts to verify the specified number of data blocks. Specifically, it can be achieved through the verification command VERIFY (blkh, &v, blknum).
  • the user provides the corresponding hash value, (usually the hash value returned by the server when writing to the ledger, or the user can calculate it by himself The hash value obtained), and then reconstruct the root hash of the Merkel tree in the data block according to the hash value of the personal asset change record. If the root hash of the Merkel tree is reconstructed and the previous saved If the root hash in the data block of is consistent, it means that the personal asset change record corresponding to the hash exists in the ledger.
  • the corresponding hash value usually the hash value returned by the server when writing to the ledger, or the user can calculate it by himself The hash value obtained
  • reconstruct the root hash of the Merkel tree in the data block according to the hash value of the personal asset change record If the root hash of the Merkel tree is reconstructed and the previous saved If the root hash in the data block of is consistent, it means that the personal asset change record corresponding to the hash exists in the ledger.
  • the verification method for the data block in the ledger is based on the hash value of the previous data block and the personal asset change record contained in it, and recalculate the hash value of the data block and compare it with the previously saved data block. Compare the hash values, if they are consistent, the verification is passed.
  • the verification can be performed on the server side.
  • the client since the client can obtain the full amount of information in the ledger based on the query instruction, the client can also perform local verification after obtaining the full amount of ledger information.
  • the administrator authority can perform query or verification, while the administrator user can configure the authority of other users. For example, other non-administrator users can also query and verify , But you cannot delete the ledger.
  • the embodiment of this specification also provides a storage system for personal asset change records, including a database server and a client.
  • the database server stores personal asset change records in a centralized manner through a block chain ledger.
  • the client obtains the personal asset change record, and sends the personal asset change record to the database server;
  • the database server receives the personal asset change record to be stored, and when the preset block condition is reached, determines at least one personal asset change record to be written in the data block, and generates the Nth data block in the blockchain ledger ,
  • the data block contains the hash value of the Nth data block and the personal asset change record:
  • the hash value and block height of the initial data block are given based on a preset method
  • the hash value of the Nth data block is determined according to the personal asset change record in the data block to be written and the hash value of the N-1th data block, and the hash value of the Nth data block is generated. Hope and the Nth data block of the personal asset change record, wherein the block height of the data block increases monotonically based on the sequence of the block time;
  • the database server determines the hash value of the personal asset change record written in the data block, and returns the hash value to the client;
  • the client receives and stores the hash value of the returned personal asset change record and the hash value of the data block.
  • the client monitors the user's account balance, and when the balance changes, obtains personal asset change records related to the balance change; or,
  • the client obtains a pre-designated type of personal asset change record, the pre-designated type of personal asset change record, including: payment record, transfer/receipt record, loan/repayment record, wealth management product delivery record and reconciliation record At least one.
  • the client terminal obtains personal asset change records whose change value exceeds a preset asset change threshold.
  • the client receives a user operation instruction to obtain the asset change threshold specified by the user; or, obtains the user's historical average asset quota, and determines the preset asset change threshold according to the historical average asset quota.
  • the client determines the users and permissions of the blockchain ledger, wherein the users of the ledger at least include users corresponding to the client, and users corresponding to the client Have administrator authority; correspondingly, the client obtains personal asset change records and sends the personal asset change record to the database server, including: the client corresponding to the user of the blockchain ledger obtains the personal asset change record, and Send personal asset change records to the library server.
  • the preset blocking condition includes: the number of business logs to be stored reaches a quantity threshold; or, the time interval from the last blocking moment reaches a time threshold.
  • the client sends a query request including a hash value to the database server; the database server obtains the corresponding personal asset change record in the ledger according to the hash value query, and returns it to the client end.
  • the client sends a verification request including a hash value to the database server; the database server receives the verification request, and verifies that the personal asset change corresponding to the hash value is recorded in the block Integrity in the chain ledger and return the verification result.
  • the embodiment of this specification also provides a method for storing personal asset change records, which is applied to the database server, as shown in FIG. 3, which is an example of the method for storing personal asset change records provided by the embodiment of this specification.
  • Process diagram including:
  • the hash value and block height of the initial data block are given based on a preset method
  • the hash value of the Nth data block is determined according to the personal asset change record in the data block to be written and the hash value of the N-1th data block, and the hash value of the Nth data block is generated. Hope and the Nth data block of the personal asset change record, wherein the block height of the data block increases monotonically based on the sequence of the block time;
  • S305 Determine the hash value of the personal asset change record written in the data block, and return the hash value to the client.
  • the embodiment of this specification also provides a storage device for personal asset change records, which is applied to the database server, as shown in FIG. 4, which is a diagram of the storage device for personal asset change records provided by the embodiment of this specification.
  • FIG. 4 is a diagram of the storage device for personal asset change records provided by the embodiment of this specification.
  • a schematic structural diagram, the device includes:
  • the receiving module 401 receives the personal asset change record to be stored sent by the client;
  • the data block contains The hash value of the Nth data block and the personal asset change record:
  • the hash value and block height of the initial data block are given based on a preset method
  • the hash value of the Nth data block is determined according to the personal asset change record in the data block to be written and the hash value of the N-1th data block, and the hash value of the Nth data block is generated. Hope and the Nth data block of the personal asset change record, wherein the block height of the data block increases monotonically based on the sequence of the block time;
  • the hash return module 405 determines the hash value of the personal asset change record written in the data block, and returns the hash value to the client.
  • the embodiments of this specification also provide a computer device, which includes at least a memory, a processor, and a computer program stored in the memory and capable of running on the processor.
  • the processor implements the personal computer program shown in FIG.
  • the storage method of asset change records are not limited to a computer device, which includes at least a memory, a processor, and a computer program stored in the memory and capable of running on the processor.
  • the processor implements the personal computer program shown in FIG.
  • the storage method of asset change records are examples of asset change records.
  • FIG. 5 shows a more specific hardware structure diagram of a computing device provided by an embodiment of this specification.
  • the device may include a processor 1010, a memory 1020, an input/output interface 1030, a communication interface 1040, and a bus 1050.
  • the processor 1010, the memory 1020, the input/output interface 1030, and the communication interface 1040 realize the communication connection between each other in the device through the bus 1050.
  • the processor 1010 may be implemented in a general-purpose CPU (Central Processing Unit, central processing unit), microprocessor, application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits for execution related Program to implement the technical solutions provided in the embodiments of this specification.
  • a general-purpose CPU Central Processing Unit, central processing unit
  • microprocessor microprocessor
  • application specific integrated circuit Application Specific Integrated Circuit, ASIC
  • ASIC Application Specific Integrated Circuit
  • the memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory, random access memory), static storage device, dynamic storage device, etc.
  • the memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of the present specification are implemented through software or firmware, related program codes are stored in the memory 1020 and called and executed by the processor 1010.
  • the input/output interface 1030 is used to connect an input/output module to realize information input and output.
  • the input/output/module can be configured in the device as a component (not shown in the figure), or can be connected to the device to provide corresponding functions.
  • the input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc.
  • an output device may include a display, a speaker, a vibrator, an indicator light, etc.
  • the communication interface 1040 is used to connect a communication module (not shown in the figure) to realize the communication interaction between the device and other devices.
  • the communication module can realize communication through wired means (such as USB, network cable, etc.), or through wireless means (such as mobile network, WIFI, Bluetooth, etc.).
  • the bus 1050 includes a path to transmit information between various components of the device (for example, the processor 1010, the memory 1020, the input/output interface 1030, and the communication interface 1040).
  • the device may also include the necessary equipment for normal operation.
  • the above-mentioned device may also include only the components necessary to implement the solutions of the embodiments of the present specification, rather than all the components shown in the figures.
  • the embodiment of this specification also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the method for storing a personal asset change record shown in FIG. 3 is implemented.
  • Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology.
  • the information can be computer-readable instructions, data structures, program modules, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices. According to the definition in this article, computer-readable media does not include transitory media, such as modulated data signals and carrier waves.
  • a typical implementation device is a computer.
  • the specific form of the computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email receiving and sending device, and a game control A console, a tablet computer, a wearable device, or a combination of any of these devices.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Storage Device Security (AREA)

Abstract

一种个人资产变更记录的存储方法、系统、装置及设备,所述方法包括:客户端获取个人资产变更记录,发送所述个人资产变更记录至数据库服务端(S101);数据库服务端接收待存储的个人资产变更记录,当达到预设的成块条件时,将个人资产变更记录写入账本中的数据块(S103);数据库服务端确定写入数据块中的个人资产变更记录的哈希值,返回哈希值至所述客户端(S105);客户端接收返回的个人资产变更记录的哈希值以及数据块的哈希值,并存储(S107)。

Description

一种个人资产变更记录的存储方法、系统、装置及设备 技术领域
本说明书实施例涉及信息技术领域,尤其涉及一种个人资产变更记录的存储方法、系统、装置及设备。
背景技术
个人用户或者家庭成员通过客户端进行个人资产的配置已很常见。而同时资产的变更记录一般都存储在服务端上,用户虽然可以从服务端中查询得到相应的个人资产变更记录。
但是对于用户而言,资产配置本身就是和服务端所有方进行的交易,而这些资产变更记录一般都是由服务端保存,用户希望即使个人数据存在服务端中,服务端也不能随意的篡改数据,并且用户可以随时验证是不是被修改了。
基于此,需要一种在中心化的场景下,对于用户而言不可篡改的个人资产变更记录存储方案。
发明内容
本申请实施例的目的是提供一种中心化的场景中实现不可篡改的个人资产变更记录存储方案:
为解决上述技术问题,本申请实施例是这样实现的:
一种个人资产变更记录的存储方法,应用于包括数据库服务端和客户端的系统中,所述数据库服务端以中心化的方式通过块链式账本存储个人资产变更记录,所述方法包括:
客户端获取个人资产变更记录,发送所述个人资产变更记录至数据库服务端;
数据库服务端,接收待存储的个人资产变更记录,当达到预设的成块条件时,确定待写入数据块中的至少一条个人资产变更记录,生成块链式账本中的第N个数据块,所述数据块中包含第N个数据块的哈希值和所述个人资产变更记录:
当N=1时,初始数据块的哈希值和块高基于预设方式给定;
当N>1时,根据待写入数据块中的个人资产变更记录和第N-1个数据块的哈希值确定第N个数据块的哈希值,生成包含第N个数据块的哈希值和所述个人资产变更记录的第N个数据块,其中,数据块的块高基于成块时间的先后顺序单调递增;
数据库服务端,确定写入数据块中的个人资产变更记录的哈希值,返回哈希值至所述客户端;
客户端,接收返回的个人资产变更记录的哈希值以及数据块的哈希值,并存储。
对应的,本说明书实施例还提供一种个人资产变更记录的存储系统,包括数据库服务端和客户端,所述数据库服务端以中心化的方式通过块链式账本存储个人资产变更记录,在所述系统中,
客户端获取个人资产变更记录,发送所述个人资产变更记录至数据库服务端;
数据库服务端,接收待存储的个人资产变更记录,当达到预设的成块条件时,确定待写入数据块中的至少一条个人资产变更记录,生成块链式账本中的第N个数据块,所述数据块中包含第N个数据块的哈希值和所述个人资产变更记录:
当N=1时,初始数据块的哈希值和块高基于预设方式给定;
当N>1时,根据待写入数据块中的个人资产变更记录和第N-1个数据块的哈希值确定第N个数据块的哈希值,生成包含第N个数据块的哈希值和所述个人资产变更记录的第N个数据块,其中,数据块的块高基于成块时间的先后顺序单调递增;
数据库服务端,确定写入数据块中的个人资产变更记录的哈希值,返回哈希值至所述客户端;
客户端,接收返回的个人资产变更记录的哈希值以及数据块的哈希值,并存储。
对应的,本说明书实施例还提供一种个人资产变更记录的存储方法,应用于数据库服务端中,所述方法包括:
接收客户端发送的待存储的个人资产变更记录;
当达到预设的成块条件时,确定待写入数据块中的至少一条个人资产变更记录,生成块链式账本中的第N个数据块,所述数据块中包含第N个数据块的哈希值和所述个人资产变更记录:
当N=1时,初始数据块的哈希值和块高基于预设方式给定;
当N>1时,根据待写入数据块中的个人资产变更记录和第N-1个数据块的哈希值确定第N个数据块的哈希值,生成包含第N个数据块的哈希值和所述个人资产变更记录的第N个数据块,其中,数据块的块高基于成块时间的先后顺序单调递增;
确定写入数据块中的个人资产变更记录的哈希值,返回所述哈希值至客户端。
对应的,本说明书实施例还提供一种个人资产变更记录的存储装置,应用于数据库服务端中,所述装置包括:
接收模块,接收客户端发送的待存储的个人资产变更记录;
数据块生成模块,当达到预设的成块条件时,确定待写入数据块中的至少一条个人资产变更记录,生成块链式账本中的第N个数据块,所述数据块中包含第N个数据块的哈希值和所述个人资产变更记录:
当N=1时,初始数据块的哈希值和块高基于预设方式给定;
当N>1时,根据待写入数据块中的个人资产变更记录和第N-1个数据块的哈希值确定第N个数据块的哈希值,生成包含第N个数据块的哈希值和所述个人资产变更记录的第N个数据块,其中,数据块的块高基于成块时间的先后顺序单调递增;
哈希返回模块,确定写入数据块中的个人资产变更记录的哈希值,返回所述哈希值至客户端。
通过本说明书实施例所提供的方案,服务端将用户相关的资产变更记录以块链式的账本进行存储,而用户方面将会持有资产变更记录的哈希值,从而随时可以基于哈希值发起对于资产变更记录的查询和验证,保证了用户的资产变更记录没有被篡改以及保证记录的完整性,提高用户体验。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本说明书实施例。
此外,本说明书实施例中的任一实施例并不需要达到上述的全部效果。
附图说明
为了更清楚地说明本说明书实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本说明书实施例中记载的一些实施例,对于本领域普通技术人员来讲,还可以根据这些附图获得其他的附图。
图1是本说明书实施例提供的在系统中一种个人资产变更记录的流程示意图;
图2为本说明书实施例所提供的多名用户使用同一账本的示意图;
图3为本说明书实施例所提供的在服务端中个人资产变更记录的存储方法的流程示意图;
图4为本说明书实施例所提供的在服务端中个人资产变更记录的存储装置的结构示意图;
图5是用于配置本说明书实施例方法的一种设备的结构示意图。
具体实施方式
为了使本领域技术人员更好地理解本说明书实施例中的技术方案,下面将结合本说明书实施例中的附图,对本说明书实施例中的技术方案进行详细地描述,显然,所描述的实施例仅仅是本说明书的一部分实施例,而不是全部的实施例。基于本说明书中的实施例,本领域普通技术人员所获得的所有其他实施例,都应当属于保护的范围。
在当前,用户可以通过客户端进行诸如支付、借贷等与资产相关的行为,由此也会产生相应的资产变更记录。一方面,产生的资产变更记录细碎,时间分散,格式也多不一样,对于用户方而言,不方便集中管理,例如,用户在花呗中有借贷记录,同时在余额宝中又有定额买入,每天还会产生收益,每天还会使用支付宝进行日常消费的支付,这些都会造成用户的资产发生变动。另一方面,这些资产发生变更时要么与服务端是相关的(例如,支付),要么服务端是直接利害关系方(例如,借贷行为),而同时资产变更记录也同时是服务端进行存储。基于此,本说明书提供一种在中心化的场景下,对于用户而言不可篡改的个人资产变更记录存储方案。
以下结合附图,详细说明本说明书各实施例提供的技术方案。如图1所示,图1是本说明书实施例提供的一种个人资产变更记录的流程示意图,应用于包括数据库服务端和客户端的系统中,所述数据库服务端以中心化的方式通过块链式账本存储个人资产变更记录,该流程具体包括如下步骤:
S101,客户端获取个人资产变更记录,发送所述个人资产变更记录至数据库服务端。
个人资产变更记录可以是支付记录、转账/收款记录、借贷/还款记录、理财产品交割记录以及对账记录等等。
需要说明的是,前述个人资产变更记录可以是一条记录,例如,用户A通过客户端购买了一笔基金,得到一条基金的交割记录;或者,也可以是包含多条记录,例如,用户A连续多天通过客户端对自己名下的基金进行了多次操作,每天都生成一条交割记录,客户端将多天的交割记录打包一起作为个人资产变更记录进行上传。
在一种实施例中,客户端获取个人资产变更记录的方式,可以是通过用户指令选取指定的个人资产变更记录,即,基于用户的手动操作进行获取。
在一种实施例中,客户端可以通过对用户的账户余额进行监控,当检测到余额发生改动时,即获取导致余额发生改动的相关交易,进而获取对应的个人资产变更记录。
具体而言,用户可以在客户端中通过预先的配置,确定需要进行写入账本的个人资产变更记录的类型,对符合设定的个人资产变更记录进行自动获取并上传数据库服务端。
例如,对于某个用户而言,其可能通过客户端每天产生关于日常消费的支付记录、理财产品的现金收益记录、理财产品交割记录、信用卡借贷记录等等。实际中,用户最关心的就是金额较高的理财产品交割记录、信用卡借贷记录,从而可以在客户端给出的配置选项中进行选定,只上传这两类个人资产变更记录,通过预先配置进行记录的选取可以使得账本更符合用户的预期,提高用户体验。
S103,数据库服务端,接收待存储的个人资产变更记录,当达到预设的成块条件时,将个人资产变更记录写入账本中的数据块。
所述的账本即为块链式的账本,数据块的形式可以同时包含块头和块体。块体中用于存储个人资产变更记录,块头中则用于存储数据块的相关元数据,元数据包括块体中的个人资产变更记录所对应的默克尔树的根哈希、前一数据块的哈希、自身数据块的哈希、账本版本号等等
所述预设的成块条件包括:待存储的个人资产变更记录数量达到数量阈值,例如,每接收到10条个人资产变更记录时,生成一个新数据块,将10条个人资产变更记录写入块中;或者,距离上一次成块时刻的时间间隔达到时间阈值,例如,每隔1小时,生成一个新数据块,将在这1小时内接收到的个人资产变更记录写入块中。
此处的N指的是数据块的序号,换言之,在本说明书实施例中,数据块是以块链的形式,基于成块时间的顺序先后排列,具有很强的时序特征。其中,数据块的块高基于成块时间的先后顺序单调递增。块高可以是序号,此时第N个数据块的块高即为N; 块高也可以其它方式生成,例如,基于成块时间对称加密,生成12至15位的大整型数据,作为块高。
当N=1时,即此时的数据块为初始数据块(也可以叫创世区块)。初始数据块的哈希值和块高基于预设方式给定。例如,初始数据块中不包含个人资产变更记录,哈希值则为任一给定的哈希值,块高blknum=0;又例如,初始数据块的生成触发条件与其它数据块的触发条件一致,但是初始数据块的哈希值由对初始数据块中的所有内容取哈希确定;又例如,初始数据块中包含创建者(即对于账本有操作权限的用户)的相关信息(例如,用户标识,包括身份证号、客户端账号、手机号码等等),初始数据块的哈希值即为对相关信息取哈希而得到。
当N>1时,由于前一数据块的内容和哈希值已经确定,则此时,可以基于前一数据块(即第N-1个数据块)的哈希值生成当前数据块(第N个数据块)的哈希值,例如,一种可行的方式为,确定每一条将要写入第N个块中的个人资产变更记录的哈希值,按照在块中的排列顺序,生成一个默克尔树,将默克尔树的根哈希值和前一数据块的哈希值拼接在一起,再次采用哈希算法,生成当前块的哈希值。又例如,还可以按照块中个人资产变更记录的顺序进行拼接并取哈希得到整体个人资产变更记录的哈希值,拼接前一数据块的哈希值和整体个人资产变更记录的哈希值,并对拼接得到的字串进行哈希运算,生成数据块的哈希值。
通过前述的数据块的生成方式,每一个数据块通过哈希值确定,数据块的哈希值由数据块中的个人资产变更记录的内容、顺序以及前一数据块的哈希值决定。用户可以随时基于数据块的哈希值发起验证,对于数据块中任何内容(包括对于数据块中个人资产变更记录内容或者顺序)的修改都会造成在验证时计算得到的数据块的哈希值和数据块生成时的哈希值不一致,而导致验证失败,从而实现了中心化下的不可篡改。
S105,数据库服务端,确定写入数据块中的个人资产变更记录的哈希值,返回哈希值至所述客户端。
在将客户端上传的个人资产变更记录写入账本中的同时,即同时确定写入账本的数据块的哈希值。此处个人资产变更记录的粒度与客户端上传时的粒度相同,即,对于每一条上传的个人资产变更记录均需要返回对应的哈希值,以及,还可以同时返回个人资产变更记录所处的数据块的块哈希以及块高,以供用户进行验证。
基于个人资产变更记录的哈希值也可以查询得到该记录所处的数据块的哈希值。
S107,客户端,接收返回的个人资产变更记录的哈希值以及数据块的哈希值,并存储。
通过本说明书实施例所提供的方案,服务端将用户相关的资产变更记录,以块链式的账本进行存储,而用户方面将会持有资产变更记录的哈希值,从而随时可以基于哈希值发起对于资产变更记录的查询和验证,保证了用户的资产变更记录没有被篡改以及保证记录的完整性,提高用户体验。
在一种实施例中,客户端中还可以进行金额大小的配置,以便客户端获取用户的个人资产变更记录时,可以滤除一些金额较小的记录。
具体的配置方式可以是,客户端中给出一个资产变更阈值的默认值,默认值一般是0,即任何个人资产变更记录都会写入账本。用户可以对资产变更阈值进行设定。例如,用户配置资产变更阈值为1000元,则日常支付的记录一般不会被写入账本中。
在一种实施例中,客户端还可以对用户的历史平均资产额度进行评估,以确定前述的资产变更阈值。例如,设定资产变更阈值为平均资产额度的1%。具体的历史平均资产额度的获取方式可以是对用户一段历史时间(例如,前1年)的在客户端中的每日资产进行评估,然后对每日的评估值进行平均得到。
在一种实施例中,生成的账本可以是对应于多名用户,例如,在生成初始数据块之前,客户端的用户通过指定其他成员(例如家庭成员、亲友、合作伙伴等等),而其他成员进行授权,从而实现多名用户共用一个账本。即在生成初始数据块时所指定的用户对于账本均至少有访问的权限。而其中,通过客户端发起生成账本的用户则具有管理员权限,管理员权限包括:删除/隐藏账本、配置账本的访问权限,配置其他用户权限等等。
进一步地,此时还可以对多名用户赋予管理员权限,以及,将账本所对应的用户的信息(例如,各用户的客户端账号、各用户的个人身份证号码等等)写入初始数据块,而初始数据块的哈希值则基于和账本相关的用户的信息计算得到,相当于在初始数据块中给与了存证。
对于多名用户的共同账本,每个用户发生资产变更时,均可以通过各自的客户端获取资产变更记录,并发送至同一账本,从而生成的账本是对应于多用户共同资产的记录,而同时服务端在写入个人资产变更记录时,则会将该个人资产记录的哈希值发送至该账本的每个管理员用户的客户端。如图2所示,图2为本说明书实施例所提供的多名 用户使用同一账本的示意图。
在将个人资产变更记录写入账本之后,客户端则随时可以基于哈希值对账本进行查询和验证。具体的查询方式可以通过查询指令来实现。查询指令中包含用户输入的待查询的哈希值即可。此处的哈希值可以是个人资产变更记录的哈希值或者账本中数据块的哈希值,数据库服务端可以从数据块进行遍历查询,也可以从预先建立的索引中进行查询。
以下示例性列举几种本说明书实施例所提供的几种查询方式:
第一种,输入个人资产变更记录的哈希值,返回个人资产变更记录所处的数据块的块高,以及,在该数据块中的偏移量,具体的,可以使用查询指令SELECT(khash,&v,FULL)实现;
第二种,输入数据块的哈希值,返回数据块中的所有个人资产变更记录的明文;或者,输入个人资产变更记录的哈希值,返回个人资产变更记录的明文,具体的,可以使用查询指令SELECT(khash,&v)实现,当数据库端接收到相应的查询指令时,即基于哈希值执行前述的查询逻辑以返回结果。
第三种,输入数据块的哈希值,根据块哈希返回块高。具体的,可以使用查询指令SELECT(khash,&v,BLK)来实现。
当然,也可能存在用户输入了一个哈希值,而服务方不能查询到相应的结果的情形。例如,用户输入了一个个人资产变更记录对应的哈希值,而数据库中查询不到结果,那么此时,用户可以合理的怀疑,该哈希所对应的个人资产变更记录已经发生了变动,有可能是被篡改,或者有可能发生了数据丢失。
在查询之外,用户还可以主动对数据库中已经存在的多个数据块或者个人资产变更记录发起验证,具体而言,可以由用户发起验证指令,验证指令中通过参数指定需要对账本中的哪些数据块或者哪条个人资产变更记录发起验证,例如,可以通过哈希值或者块高指定一个数据块,对该数据块之前或者之后的多个数据块发起是否正确的验证;或者,通过哈希值指定一条对应的个人资产变更记录,验证该个人资产变更记录是否存在数据库中。验证得到的结果是一个“有”或者“无”,以及“正确”或者“不正确”这样的元数据。以下示例性的给出了本说明书实施例所提供的几种验证方式:
第一种,输入哈希值,由哈希值确定数据块,对该数据块执行验证,得到验证结果,具体的,可以由验证指令VERIFY(‘khash’,&v)实现。
第二种,输入哈希值,由哈希值确定对应的数据块或者确定哈希值对应的个人资产变更记录所处的数据块,从确定的数据块开始往前验证直至初始数据块,具体的,可以通过验证指令VERIFY(‘khash’,&v,-1)实现,一般而言,初始块高为“0”或者“1”,因此,其中的-1也可以是其它小于初始块高的值。
第三种,输入哈希值,由哈希值确定对应的数据块,从确定的数据块开始往前验证指定个数的数据块,具体的,可以通过验证指令VERIFY(‘khash’,&v,blknum)实现。
第四种,输入块高和需要验证的数量,由块高对应的数据块开始往前验证指定数量的数据块,具体的,可以通过验证指令VERIFY(blkh,&v,blknum)实现。
具体的验证方式中,用对于数据块中的个人资产变更记录而言,用户提供其对应的哈希值,(一般就是写入账本时服务端所返回的哈希值,也可以是用户自己计算得到的哈希值),然后根据该个人资产变更记录的哈希值重新构建该数据块中的默克尔树的根哈希,如果重新构建得到默克尔树的根哈希与之前所保存的数据块中的根哈希是一致的,则说明该哈希所对应的个人资产变更记录存在于账本中。
对于账本中的数据块的验证方式则为基于前一数据块的哈希值和自身中所包含的个人资产变更记录,重新计算自身数据块的哈希值,并与之前所保存的自身数据块的哈希值进行对比,如果一致,则验证通过。
在一种实施例中,验证可以在服务端进行。同时,由于客户端可以基于查询指令得到账本中的全量信息,因此,也可以是客户端在获取全量账本信息后在本地进行验证。
需要说明的是,多名用户使用同一账本的情形中,管理员权限可以执行查询或者验证,而管理员用户则可以对其他用户的权限进行配置,例如,其他非管理员用户也可以查询和验证,但是不能删除账本。
对应的,本说明书实施例还提供一种个人资产变更记录的存储系统,包括数据库服务端和客户端,所述数据库服务端以中心化的方式通过块链式账本存储个人资产变更记录,在所述系统中,
客户端获取个人资产变更记录,发送所述个人资产变更记录至数据库服务端;
数据库服务端,接收待存储的个人资产变更记录,当达到预设的成块条件时,确定待写入数据块中的至少一条个人资产变更记录,生成块链式账本中的第N个数据块,所述数据块中包含第N个数据块的哈希值和所述个人资产变更记录:
当N=1时,初始数据块的哈希值和块高基于预设方式给定;
当N>1时,根据待写入数据块中的个人资产变更记录和第N-1个数据块的哈希值确定第N个数据块的哈希值,生成包含第N个数据块的哈希值和所述个人资产变更记录的第N个数据块,其中,数据块的块高基于成块时间的先后顺序单调递增;
数据库服务端,确定写入数据块中的个人资产变更记录的哈希值,返回哈希值至所述客户端;
客户端,接收返回的个人资产变更记录的哈希值以及数据块的哈希值,并存储。
进一步地,在所述系统中,客户端监控用户的账户余额,当余额发生变动时,获取与余额变动相关的个人资产变更记录;或者,
客户端获取预先指定类型的个人资产变更记录,所述预先指定类型的个人资产变更记录,包括:支付记录、转账/收款记录、借贷/还款记录、理财产品交割记录以及对账记录中的至少一种。
进一步地,在所述系统中,客户端获取变更数值超过预设资产变更阈值的个人资产变更记录。
进一步地,在所述系统中,客户端接收用户操作指令,获取由用户所指定的资产变更阈值;或者,获取用户的历史平均资产额度,根据所述历史平均资产额度确定预设资产变更阈值。
进一步地,在所述系统中,客户端确定所述块链式账本的用户和权限,其中,所述账本的用户中至少包括所述客户端所对应的用户,所述客户端所对应的用户具有管理员权限;相应的,客户端获取个人资产变更记录,发送所述个人资产变更记录至数据库服务端,包括:所述块链式账本的用户所对应的客户端获取个人资产变更记录,并发送个人资产变更记录至所述库服务端。
进一步地,在所述系统中,所述预设的成块条件包括:待存储的业务日志数量达到数量阈值;或者,距离上一次成块时刻的时间间隔达到时间阈值。
进一步地,在所述系统中,客户端,发送包含哈希值的查询请求至数据库服务端;数据库服务端,根据所述哈希值查询获取账本中对应的个人资产变更记录,并返回至客户端。
进一步地,在所述系统中,客户端,发送包含哈希值的验证请求至数据库服务端; 数据库服务端,接收验证请求,验证所述哈希值所对应的个人资产变更记录在所述块链式账本中的完整性,并返回验证结果。
对应的,本说明书实施例还提供一种个人资产变更记录的存储方法,应用于数据库服务端中,如图3所示,图3为本说明书实施例所提供的个人资产变更记录的存储方法的流程示意图,包括:
S301,接收客户端发送的待存储的个人资产变更记录;
S303,当达到预设的成块条件时,确定待写入数据块中的至少一条个人资产变更记录,生成块链式账本中的第N个数据块,所述数据块中包含第N个数据块的哈希值和所述个人资产变更记录:
当N=1时,初始数据块的哈希值和块高基于预设方式给定;
当N>1时,根据待写入数据块中的个人资产变更记录和第N-1个数据块的哈希值确定第N个数据块的哈希值,生成包含第N个数据块的哈希值和所述个人资产变更记录的第N个数据块,其中,数据块的块高基于成块时间的先后顺序单调递增;
S305,确定写入数据块中的个人资产变更记录的哈希值,返回所述哈希值至客户端。
对应的,本说明书实施例还提供一种个人资产变更记录的存储装置,应用于数据库服务端中,如图4所示,图4为本说明书实施例所提供的个人资产变更记录的存储装置的结构示意图,所述装置包括:
接收模块401,接收客户端发送的待存储的个人资产变更记录;
数据块生成模块403,当达到预设的成块条件时,确定待写入数据块中的至少一条个人资产变更记录,生成块链式账本中的第N个数据块,所述数据块中包含第N个数据块的哈希值和所述个人资产变更记录:
当N=1时,初始数据块的哈希值和块高基于预设方式给定;
当N>1时,根据待写入数据块中的个人资产变更记录和第N-1个数据块的哈希值确定第N个数据块的哈希值,生成包含第N个数据块的哈希值和所述个人资产变更记录的第N个数据块,其中,数据块的块高基于成块时间的先后顺序单调递增;
哈希返回模块405,确定写入数据块中的个人资产变更记录的哈希值,返回所述哈希值至客户端。
本说明书实施例还提供一种计算机设备,其至少包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,处理器执行所述程序时实现图3所示的个人资产变更记录的存储方法。
图5示出了本说明书实施例所提供的一种更为具体的计算设备硬件结构示意图,该设备可以包括:处理器1010、存储器1020、输入/输出接口1030、通信接口1040和总线1050。其中处理器1010、存储器1020、输入/输出接口1030和通信接口1040通过总线1050实现彼此之间在设备内部的通信连接。
处理器1010可以采用通用的CPU(Central Processing Unit,中央处理器)、微处理器、应用专用集成电路(Application Specific Integrated Circuit,ASIC)、或者一个或多个集成电路等方式实现,用于执行相关程序,以实现本说明书实施例所提供的技术方案。
存储器1020可以采用ROM(Read Only Memory,只读存储器)、RAM(Random Access Memory,随机存取存储器)、静态存储设备,动态存储设备等形式实现。存储器1020可以存储操作系统和其他应用程序,在通过软件或者固件来实现本说明书实施例所提供的技术方案时,相关的程序代码保存在存储器1020中,并由处理器1010来调用执行。
输入/输出接口1030用于连接输入/输出模块,以实现信息输入及输出。输入输出/模块可以作为组件配置在设备中(图中未示出),也可以外接于设备以提供相应功能。其中输入设备可以包括键盘、鼠标、触摸屏、麦克风、各类传感器等,输出设备可以包括显示器、扬声器、振动器、指示灯等。
通信接口1040用于连接通信模块(图中未示出),以实现本设备与其他设备的通信交互。其中通信模块可以通过有线方式(例如USB、网线等)实现通信,也可以通过无线方式(例如移动网络、WIFI、蓝牙等)实现通信。
总线1050包括一通路,在设备的各个组件(例如处理器1010、存储器1020、输入/输出接口1030和通信接口1040)之间传输信息。
需要说明的是,尽管上述设备仅示出了处理器1010、存储器1020、输入/输出接口1030、通信接口1040以及总线1050,但是在具体实施过程中,该设备还可以包括实现正常运行所必需的其他组件。此外,本领域的技术人员可以理解的是,上述设备中也可以仅包含实现本说明书实施例方案所必需的组件,而不必包含图中所示的全部组件。
本说明书实施例还提供一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现图3所示的个人资产变更记录的存储方法。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
通过以上的实施方式的描述可知,本领域的技术人员可以清楚地了解到本说明书实施例可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本说明书实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本说明书实施例各个实施例或者实施例的某些部分所述的方法。
上述实施例阐明的系统、方法、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于方法实施例而言,由于其基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。以上所描述的方法实施例仅仅是示意性的,其中所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,在实施本说明书实施例方案时可以把各模块的功能在同一个或多个软件和/或硬件中实现。也可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
以上所述仅是本说明书实施例的具体实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本说明书实施例原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本说明书实施例的保护范围。

Claims (19)

  1. 一种个人资产变更记录的存储方法,应用于包括数据库服务端和客户端的系统中,所述数据库服务端以中心化的方式通过块链式账本存储个人资产变更记录,所述方法包括:
    客户端获取个人资产变更记录,发送所述个人资产变更记录至数据库服务端;
    数据库服务端,接收待存储的个人资产变更记录,当达到预设的成块条件时,确定待写入数据块中的至少一条个人资产变更记录,生成块链式账本中的第N个数据块,所述数据块中包含第N个数据块的哈希值和所述个人资产变更记录:
    当N=1时,初始数据块的哈希值和块高基于预设方式给定;
    当N>1时,根据待写入数据块中的个人资产变更记录和第N-1个数据块的哈希值确定第N个数据块的哈希值,生成包含第N个数据块的哈希值和所述个人资产变更记录的第N个数据块,其中,数据块的块高基于成块时间的先后顺序单调递增;
    数据库服务端,确定写入数据块中的个人资产变更记录的哈希值,返回哈希值至所述客户端;
    客户端,接收返回的个人资产变更记录的哈希值以及数据块的哈希值,并存储。
  2. 如权利要求1所述的方法,客户端获取个人资产变更记录,包括:
    客户端监控用户的账户余额,当余额发生变动时,获取与余额变动相关的个人资产变更记录;或者,
    客户端获取预先指定类型的个人资产变更记录,所述预先指定类型的个人资产变更记录,包括:支付记录、转账/收款记录、借贷/还款记录、理财产品交割记录以及对账记录中的至少一种。
  3. 如权利要求1所述的方法,客户端获取个人资产变更记录,包括:
    客户端获取变更数值超过预设资产变更阈值的个人资产变更记录。
  4. 如权利要求3所述的方法,所述预设资产变更阈值通过如下方式得到:
    接收用户操作指令,获取由用户所指定的资产变更阈值;或者,
    获取用户的历史平均资产额度,根据所述历史平均资产额度确定预设资产变更阈值。
  5. 如权利要求1所述的方法,在生成初始数据块之前,所述方法还包括:
    确定所述块链式账本的用户和权限,其中,所述账本的用户中至少包括所述客户端所对应的用户,所述客户端所对应的用户具有管理员权限;
    相应的,客户端获取个人资产变更记录,发送所述个人资产变更记录至数据库服务端,包括:所述块链式账本的用户所对应的客户端获取个人资产变更记录,并发送个人 资产变更记录至所述库服务端。
  6. 如权利要求1所述的方法,所述预设的成块条件包括:
    待存储的业务日志数量达到数量阈值;或者,距离上一次成块时刻的时间间隔达到时间阈值。
  7. 如权利要求1所述的方法,还包括:
    客户端,发送包含哈希值的查询请求至数据库服务端;
    数据库服务端,根据所述哈希值查询获取账本中对应的个人资产变更记录,并返回至客户端。
  8. 如权利要求1所述的方法,还包括:
    客户端,发送包含哈希值的验证请求至数据库服务端;
    数据库服务端,接收验证请求,验证所述哈希值所对应的个人资产变更记录在所述块链式账本中的完整性,并返回验证结果。
  9. 一种个人资产变更记录的存储系统,包括数据库服务端和客户端,所述数据库服务端以中心化的方式通过块链式账本存储个人资产变更记录,在所述系统中,
    客户端获取个人资产变更记录,发送所述个人资产变更记录至数据库服务端;
    数据库服务端,接收待存储的个人资产变更记录,当达到预设的成块条件时,确定待写入数据块中的至少一条个人资产变更记录,生成块链式账本中的第N个数据块,所述数据块中包含第N个数据块的哈希值和所述个人资产变更记录:
    当N=1时,初始数据块的哈希值和块高基于预设方式给定;
    当N>1时,根据待写入数据块中的个人资产变更记录和第N-1个数据块的哈希值确定第N个数据块的哈希值,生成包含第N个数据块的哈希值和所述个人资产变更记录的第N个数据块,其中,数据块的块高基于成块时间的先后顺序单调递增;
    数据库服务端,确定写入数据块中的个人资产变更记录的哈希值,返回哈希值至所述客户端;
    客户端,接收返回的个人资产变更记录的哈希值以及数据块的哈希值,并存储。
  10. 如权利要求9所述的系统,
    客户端监控用户的账户余额,当余额发生变动时,获取与余额变动相关的个人资产变更记录;或者,
    客户端获取预先指定类型的个人资产变更记录,所述预先指定类型的个人资产变更记录,包括:支付记录、转账/收款记录、借贷/还款记录、理财产品交割记录以及对账记录中的至少一种。
  11. 如权利要求9所述的系统,客户端获取个人资产变更记录,包括:
    客户端获取变更数值超过预设资产变更阈值的个人资产变更记录。
  12. 如权利要求11所述的系统,在客户端中所述预设资产变更阈值通过如下方式得到:
    客户端接收用户操作指令,获取由用户所指定的资产变更阈值;或者,
    获取用户的历史平均资产额度,根据所述历史平均资产额度确定预设资产变更阈值。
  13. 如权利要求9所述的系统,还包括,
    客户端确定所述块链式账本的用户和权限,其中,所述账本的用户中至少包括所述客户端所对应的用户,所述客户端所对应的用户具有管理员权限;
    相应的,客户端获取个人资产变更记录,发送所述个人资产变更记录至数据库服务端,包括:所述块链式账本的用户所对应的客户端获取个人资产变更记录,并发送个人资产变更记录至所述库服务端。
  14. 如权利要求9所述的系统,所述预设的成块条件包括:
    待存储的业务日志数量达到数量阈值;或者,距离上一次成块时刻的时间间隔达到时间阈值。
  15. 如权利要求9所述的系统,还包括:
    客户端,发送包含哈希值的查询请求至数据库服务端;
    数据库服务端,根据所述哈希值查询获取账本中对应的个人资产变更记录,并返回至客户端。
  16. 如权利要求9所述的系统,还包括:
    客户端,发送包含哈希值的验证请求至数据库服务端;
    数据库服务端,接收验证请求,验证所述哈希值所对应的个人资产变更记录在所述块链式账本中的完整性,并返回验证结果。
  17. 一种个人资产变更记录的存储方法,应用于数据库服务端中,所述方法包括:
    接收客户端发送的待存储的个人资产变更记录;
    当达到预设的成块条件时,确定待写入数据块中的至少一条个人资产变更记录,生成块链式账本中的第N个数据块,所述数据块中包含第N个数据块的哈希值和所述个人资产变更记录:
    当N=1时,初始数据块的哈希值和块高基于预设方式给定;
    当N>1时,根据待写入数据块中的个人资产变更记录和第N-1个数据块的哈希值确定第N个数据块的哈希值,生成包含第N个数据块的哈希值和所述个人资产变更记 录的第N个数据块,其中,数据块的块高基于成块时间的先后顺序单调递增;
    确定写入数据块中的个人资产变更记录的哈希值,返回所述哈希值至客户端。
  18. 一种个人资产变更记录的存储装置,应用于数据库服务端中,所述装置包括:
    接收模块,接收客户端发送的待存储的个人资产变更记录;
    数据块生成模块,当达到预设的成块条件时,确定待写入数据块中的至少一条个人资产变更记录,生成块链式账本中的第N个数据块,所述数据块中包含第N个数据块的哈希值和所述个人资产变更记录:
    当N=1时,初始数据块的哈希值和块高基于预设方式给定;
    当N>1时,根据待写入数据块中的个人资产变更记录和第N-1个数据块的哈希值确定第N个数据块的哈希值,生成包含第N个数据块的哈希值和所述个人资产变更记录的第N个数据块,其中,数据块的块高基于成块时间的先后顺序单调递增;
    哈希返回模块,确定写入数据块中的个人资产变更记录的哈希值,返回所述哈希值至客户端。
  19. 一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,所述处理器执行所述程序时实现如权利要求17所述的方法。
PCT/CN2020/072004 2019-04-18 2020-01-14 一种个人资产变更记录的存储方法、系统、装置及设备 WO2020211497A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/790,628 US10691640B1 (en) 2019-04-18 2020-02-13 Storing an asset update record

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910314544.8A CN110147686A (zh) 2019-04-18 2019-04-18 一种个人资产变更记录的存储方法、系统、装置及设备
CN201910314544.8 2019-04-18

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/790,628 Continuation US10691640B1 (en) 2019-04-18 2020-02-13 Storing an asset update record

Publications (1)

Publication Number Publication Date
WO2020211497A1 true WO2020211497A1 (zh) 2020-10-22

Family

ID=67588517

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/072004 WO2020211497A1 (zh) 2019-04-18 2020-01-14 一种个人资产变更记录的存储方法、系统、装置及设备

Country Status (3)

Country Link
CN (1) CN110147686A (zh)
TW (1) TWI724730B (zh)
WO (1) WO2020211497A1 (zh)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110147686A (zh) * 2019-04-18 2019-08-20 阿里巴巴集团控股有限公司 一种个人资产变更记录的存储方法、系统、装置及设备
EP4139875A1 (en) * 2019-05-16 2023-03-01 Mighty Jaxx International Pte. Ltd. An ownership data management system and method
CN110727679A (zh) * 2019-09-25 2020-01-24 支付宝(杭州)信息技术有限公司 法院案卷的协同追踪方法、系统、装置及设备
CN110717172B (zh) * 2019-09-25 2021-04-27 蚂蚁区块链科技(上海)有限公司 一种块链式账本中的权限移交方法、装置及设备
CN110688664B (zh) * 2019-09-25 2021-03-23 蚂蚁区块链科技(上海)有限公司 一种块链式账本中的权限管理方法、装置及设备
CN111695077A (zh) * 2020-06-15 2020-09-22 河北中废通网络技术有限公司 资产信息推送方法、终端设备及可读存储介质
CN111831997B (zh) * 2020-06-18 2021-07-27 华东师范大学 一种客户端与中心化数据库之间建立可信关系的方法

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170228371A1 (en) * 2016-02-05 2017-08-10 Manifold Technology, Inc. Blockchain-enhanced database
CN108009445A (zh) * 2017-11-30 2018-05-08 成都蓝海贝信息技术有限公司 一种半中心化的可信数据管理系统
CN109033841A (zh) * 2018-07-12 2018-12-18 杨城 一种写验分离的弱中心化可信数据存储系统和管理方法
CN109299189A (zh) * 2018-09-05 2019-02-01 满金坝(深圳)科技有限公司 基于区块链的分布式数据库集群处理方法及装置
CN109377226A (zh) * 2018-10-30 2019-02-22 深圳市元征科技股份有限公司 一种交易信息管理方法及相关设备
CN109493043A (zh) * 2018-10-30 2019-03-19 广州品唯软件有限公司 交易记录区块化方法、装置、电子设备及存储介质
CN110147686A (zh) * 2019-04-18 2019-08-20 阿里巴巴集团控股有限公司 一种个人资产变更记录的存储方法、系统、装置及设备

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9985964B2 (en) * 2016-03-28 2018-05-29 Black Gold Coin, Inc. Systems and methods for providing block chain-based multifactor personal identity verification
CN106407795B (zh) * 2016-09-05 2019-05-14 北京众享比特科技有限公司 数据存在认证系统、认证方法及验证方法
CN106600403B (zh) * 2016-11-07 2021-05-04 北京金股链科技有限公司 一种资产管理方法、装置和系统
CN107104816A (zh) * 2017-03-07 2017-08-29 阿里巴巴集团控股有限公司 一种信息变更监控方法和装置
CN107368259B (zh) * 2017-05-25 2020-07-10 创新先进技术有限公司 一种向区块链系统中写入业务数据的方法和装置
CN107528855A (zh) * 2017-09-26 2017-12-29 武汉斗鱼网络科技有限公司 一种数据校验方法及服务器
CN109522747A (zh) * 2018-11-12 2019-03-26 杭州趣链科技有限公司 一种基于区块链的防篡改日志记录系统及方法

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170228371A1 (en) * 2016-02-05 2017-08-10 Manifold Technology, Inc. Blockchain-enhanced database
CN108009445A (zh) * 2017-11-30 2018-05-08 成都蓝海贝信息技术有限公司 一种半中心化的可信数据管理系统
CN109033841A (zh) * 2018-07-12 2018-12-18 杨城 一种写验分离的弱中心化可信数据存储系统和管理方法
CN109299189A (zh) * 2018-09-05 2019-02-01 满金坝(深圳)科技有限公司 基于区块链的分布式数据库集群处理方法及装置
CN109377226A (zh) * 2018-10-30 2019-02-22 深圳市元征科技股份有限公司 一种交易信息管理方法及相关设备
CN109493043A (zh) * 2018-10-30 2019-03-19 广州品唯软件有限公司 交易记录区块化方法、装置、电子设备及存储介质
CN110147686A (zh) * 2019-04-18 2019-08-20 阿里巴巴集团控股有限公司 一种个人资产变更记录的存储方法、系统、装置及设备

Also Published As

Publication number Publication date
TW202040477A (zh) 2020-11-01
TWI724730B (zh) 2021-04-11
CN110147686A (zh) 2019-08-20

Similar Documents

Publication Publication Date Title
WO2020211497A1 (zh) 一种个人资产变更记录的存储方法、系统、装置及设备
CN110188096B (zh) 一种数据记录的索引创建方法、装置及设备
CN110020542B (zh) 数据读写方法及装置、电子设备
CN110162662B (zh) 一种块链式账本中数据记录的验证方法、装置及设备
US10691640B1 (en) Storing an asset update record
TW202008196A (zh) 基於中心化結算與區塊鏈存證的交易方法及系統
WO2020015406A1 (zh) 一种基于区块链对版权使用者进行信用评价的方法及装置
TW202008235A (zh) 基於中心化結算與區塊鏈存證的交易方法及系統
CN113726751B (zh) 一种块链式账本中的权重管理方法、装置及设备
US11379836B2 (en) Methods and systems for recording data based on plurality of blockchain networks
CN110334153B (zh) 块链式账本中的授权方法、系统、装置及设备
US11050550B2 (en) Methods and systems for reading data based on plurality of blockchain networks
US11500861B2 (en) Methods and systems for recording data based on plurality of blockchain networks
WO2021000578A1 (zh) 一种块链式账本中的用户创建方法、装置及设备
US20220270084A1 (en) Leveraging Non-Fungible Tokens and Blockchain to Maintain Social Media Content
US10936734B2 (en) Blockchain authorization
CN111046052B (zh) 一种数据库中的操作记录存储方法、装置及设备
TWI707287B (zh) 簽約風險量化方法、代扣風險量化方法、裝置及設備
CN111444216A (zh) 一种基于中心化块链式账本的数据块删除方法
US11223692B2 (en) Service execution methods and apparatuses
CN110727679A (zh) 法院案卷的协同追踪方法、系统、装置及设备
CN110362570B (zh) 一种数据存储方法、装置及设备
US11086849B2 (en) Methods and systems for reading data based on plurality of blockchain networks
CN110636042B (zh) 一种服务端已验证块高的更新方法、装置及设备
CN110688664B (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: 20790469

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: 20790469

Country of ref document: EP

Kind code of ref document: A1