CN110008743A - Data attribute identification method, device and equipment in a kind of piece of chain type account book - Google Patents

Data attribute identification method, device and equipment in a kind of piece of chain type account book Download PDF

Info

Publication number
CN110008743A
CN110008743A CN201910234777.7A CN201910234777A CN110008743A CN 110008743 A CN110008743 A CN 110008743A CN 201910234777 A CN201910234777 A CN 201910234777A CN 110008743 A CN110008743 A CN 110008743A
Authority
CN
China
Prior art keywords
data
block
data block
data record
record
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910234777.7A
Other languages
Chinese (zh)
Other versions
CN110008743B (en
Inventor
杨新颖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201910234777.7A priority Critical patent/CN110008743B/en
Publication of CN110008743A publication Critical patent/CN110008743A/en
Application granted granted Critical
Publication of CN110008743B publication Critical patent/CN110008743B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1004Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum
    • 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

Abstract

Disclose data attribute identification method, device and the equipment in a kind of piece of chain type account book.In the account book of block chain type storage, when user makes certain type of operation for data record, attribute tab character corresponding to an operation note is provided accordingly, the corresponding relationship of the attribute tab character and data record is established, and the state array being located in the build of data block is written.

Description

Data attribute identification method, device and equipment in a kind of piece of chain type account book
Technical field
This specification embodiment is related to the mark of the data attribute in information technology field more particularly to a kind of piece of chain type account book Method, device and equipment.
Background technique
When using the account book storing data of block chain type, although data are difficult to tamper with, user still can be right Stored data record carries out certain operations.In this process, the state of data record can change.
For the needs of business, user may need to check for each data record in one or several data blocks point Any operation has not been done, or wants to know about the current state of each data record in a data block.In current solution Without a kind of convenient method realized to the data record progress status indication in data block.
Summary of the invention
For the problem of the status indication inconvenience of data record in the account book of existing piece of chain type, to realize more convenient knowledge The state of other data record, this specification embodiment provide data attribute identification method in a kind of piece of chain type account book, device and Equipment is applied in block chain type account book, the block comprising record metadata for storing data in the data block in block chain type account book Head, the method specifically include:
Operational order is received, the type of operational order is determined and needs to be implemented the data of operation determined by operational order Record;
According to the type of the operational order, attribute tab character corresponding to the operational order, the attribute are determined Tab character is used for the last change state of mark data record;
The number is written in the corresponding relationship by the corresponding relationship for establishing the attribute tab character and the data record According to the state array in the build of the locating data block of record;
Wherein, in addition to initial data block, include at least one data record in each data block, wrapped in each data block Cryptographic Hash containing the data block that the cryptographic Hash by last data block and the data record for itself being included determine, data block Sequencing monotonic increase of the block height based on Chunky Time.
Corresponding, this specification embodiment also provides the data attribute identity device in a kind of piece of chain type account book, is applied to Build in block chain type account book, comprising record metadata for storing data in the data block in block chain type account book, comprising:
Command reception module receives operational order, determines the type of operational order and need determined by operational order Execute the data record of operation;
Character determining module determines that attribute corresponding to the operational order marks according to the type of the operational order Character, the attribute tab character are used for the last change state of mark data record;
Relationship establishes module, establishes the corresponding relationship of the attribute tab character and the data record;
The status number in the build of data block locating for the data record is written in the corresponding relationship by writing module Group;
Wherein, in addition to initial data block, include at least one data record in each data block, wrapped in each data block Cryptographic Hash containing the data block that the cryptographic Hash by last data block and the data record for itself being included determine, data block Sequencing monotonic increase of the block height based on Chunky Time.
In the account book of block chain type storage, when user makes certain type of operation for data record, i.e., accordingly Provide attribute tab character corresponding to an operation note, establish the attribute tab character it is corresponding with data record close System, and the state array being located in the build of data block is written.By the above-mentioned means, can be flexibly to the state of data record It is marked, and easily the state of data record in data block is counted.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not This specification embodiment can be limited.
In addition, any embodiment in this specification embodiment does not need to reach above-mentioned whole effects.
Detailed description of the invention
In order to illustrate more clearly of this specification embodiment or technical solution in the prior art, below will to embodiment or Attached drawing needed to be used in the description of the prior art is briefly described, it should be apparent that, the accompanying drawings in the following description is only The some embodiments recorded in this specification embodiment for those of ordinary skill in the art can also be attached according to these Figure obtains other attached drawings.
Fig. 1 is the structural schematic diagram of a kind of piece of chain type account book involved in this specification embodiment;
Fig. 2 is the process signal of the data attribute identification method in a kind of piece of chain type account book that this specification embodiment provides Figure;
Fig. 3 is a kind of schematic diagram of the build comprising state array provided by this specification embodiment;
Fig. 4 is the structural representation of the data attribute identity device in a kind of piece of chain type account book that this specification embodiment provides Figure;
Fig. 5 is the structural schematic diagram for configuring a kind of equipment of this specification embodiment method.
Specific embodiment
In order to make those skilled in the art more fully understand the technical solution in this specification embodiment, below in conjunction with this Attached drawing in specification embodiment is described in detail the technical solution in this specification embodiment, it is clear that described Embodiment is only a part of the embodiment of this specification, instead of all the embodiments.The embodiment of base in this manual, Those of ordinary skill in the art's every other embodiment obtained, all should belong to the range of protection.
On ordinary meaning, block chain type account book includes two kinds: block chain and class block chain account book.Block chain is normally divided into Three types: publicly-owned chain (Public Blockchain), privately owned chain (Private Blockchain) and alliance's chain (Consortium Blockchain).In addition, there are also a plurality of types of combinations, such as privately owned chain+alliance's chain, alliance's chain+publicly-owned The different combinations such as chain.No matter which kind of block chain, be construed as decentralization, needed in data write-in block chain into The common recognition of each node of row, reaches data in the consistency of each node, realization is difficult to tamper with.And the account book of class block chain is then a kind of The mode of data storage is carried out under the scene of centralization, but it equally has the characteristic that can not be distorted.
The either account book of block chain or class block chain, in form can be as shown in Figure 1.Fig. 1 is this specification The structural schematic diagram of a kind of piece of chain type account book involved in embodiment.One block chain type account book, by multiple data chunks at data It is arranged between block according to Chunky Time sequence.From primary data BOB(beginning of block), each data block has a sub-block, each number It is determined according to the cryptographic Hash of block by the cryptographic Hash and the data record that itself is included of last data block.In each data block, It include build and block, build is used to store the metadata of some data blocks (such as in block height, parent data block Hash, block The root Hash of Merkel tree etc. that constitutes of data record), block is then used to store specific data record.
It should be noted that data record is difficult to be tampered in the account book of block chain type.But this is not meant to use Family cannot carry out certain specific operations to data record.
For example, node can initiate a use in the limited alliance's chain of node or the block chain account book of privately owned chain type In the transaction of the data record of designated position of the concealment comprising sensitive data, after common recognition passes through in block chain, to include original The concealment data of the cryptographic Hash of data record replace former data record, and do not influence the simple payment verification of block chain (Simplified Payment Verification, SPV) or other verifyings.In another example in the class block chain account of centralization In this, user then can such as add the data in data block by different instruction predetermined, remove, hide Etc. operation.Specific mode of operation will be described below in detail.
As user operates the data record in block chain type account book, the state of data record is just corresponding to be occurred Change.User needs for business at this time, it may be necessary to which understanding has what change has occurred in which data record, and carries out Corresponding statistics.Based on this, this specification embodiment provides a kind of scheme that the attribute for data record is recorded.
To keep the scheme of this specification embodiment more clear and easy to understand, first in involved in this specification embodiment The generation method and form of the class block chain account book of the heart are described.In a specific embodiment, the account of class block chain Originally it can be generated by such as under type:
Firstly, the database service provider of centralization receives data record to be stored, the Kazakhstan of each data record is determined Uncommon value.The data record of to be stored can be the various consumer records of client personal user herein, be also possible to using clothes Business instruction of the device based on user, business result, intermediate state and the operation note etc. generated when executing service logic.Tool The business scenario of body may include consumer record, audit log, supply chain, government regulation record, medical records etc..
Then, when reaching preset blocking condition, database service provider determines each number in data block to be written According to record, the n-th data block of the cryptographic Hash comprising data block and data record is generated.
The preset blocking condition includes: that data record quantity to be stored reaches amount threshold, for example, often receiving When 1000 datas record, a new data block is generated, 1,000 datas are recorded in write-in block;Alternatively, apart from the last time at The time interval at block moment reaches time threshold, for example, a new data block was generated every 5 minutes, it will be inscribed at this 5 minutes In the data record write-in block received.
N herein refers to the serial number of data block, and in other words, in this specification embodiment, data block is with block chain Form, the sequence based on Chunky Time successively arrange, and have very strong temporal aspect.Wherein, the block height of data block is based on blocking The sequencing monotonic increase of time.Block height can be serial number, and the block height of n-th data block is N at this time;Block height can also be with it Its mode generates, for example, converting the big integers of monotonic increases a series of for the block high generation time, (generally 12 to 15 whole Type data), as block height.
As N=1, i.e., data block at this time is initial data block.The cryptographic Hash and block height of initial data block are based on pre- If mode is given.For example, not including data record in initial data block, cryptographic Hash is then any given cryptographic Hash, and block is high Blknum=0;In another example the generation trigger condition of initial data block is consistent with the trigger condition of other data blocks, but it is initial The cryptographic Hash of data block takes Hash to determine by the content to all data records in initial data block.
As N > 1, since content and the cryptographic Hash of last data block are it has been determined that then at this point it is possible to be based on last data The cryptographic Hash of block (i.e. the N-1 data block) generates the cryptographic Hash of current data block (n-th data block), for example, a kind of feasible Mode be to determine that the cryptographic Hash of the data record in n-th block will be written in each, according to putting in order in block, A Merkel tree is generated, the cryptographic Hash of the root cryptographic Hash of Merkel tree and last data block is stitched together, is used again Hash algorithm generates the cryptographic Hash of current block.In another example can also be spliced according to the sequence of data record in block and take Kazakhstan The uncommon cryptographic Hash for obtaining overall data record splices the cryptographic Hash of last data block and the cryptographic Hash of overall data record, and right Splice obtained word string and carry out Hash operation, generates the cryptographic Hash of data block.
By the generating mode of data block above-mentioned, in the database service provider of centralization, without carrying out node Common recognition, each data block is determining by cryptographic Hash, content, sequence of the cryptographic Hash of data block by the data record in data block And the cryptographic Hash of last data block determines.
Under one the smallest verifying granularity, each data record has a corresponding cryptographic Hash, and user can be with When initiate to verify based on the cryptographic Hash of data record or data block, for content any in data block (including for data block Middle data record content or sequence) modification can all cause the cryptographic Hash and data block of the data block that are calculated in verifying Cryptographic Hash when generation is inconsistent, and leads to authentication failed, thus can not distort under realizing centralization.
Below in conjunction with attached drawing, the technical solution that each embodiment of this specification provides is described in detail.As shown in Fig. 2, Fig. 2 is this The flow diagram for the data attribute identification method in a kind of piece of chain type account book that specification embodiment provides, is applied to block chain type It include the build for recording metadata for storing data in account book, in the data block in block chain type account book, which specifically includes Following steps:
S201 receives operational order, determines the type of operational order and need to be implemented operation determined by operational order Data record.
In class block chain account book, operational order can derive from one or several authorized users, can also derive from Database service side.Operational order may include multiple types, for example, addition, removing, concealment, verifying, inquiry etc..Data Library service side always can determine the data record operated by operational order.
Simply provide below several specific operational orders form and its respective implementation.
Addition instruction, APPEND (v , &khash): user adds data record " v ", the service side of centralization into account book The cryptographic Hash " khash " of returned data record gives user.
Verifying instruction, VERIFY (' khash ' , &v): user inputs cryptographic Hash " khash ", to determined by cryptographic Hash Data block or data record execute verifying, return to verification result " &v ".The mode of verifying is remembered according to the data in data block Record building Merkel tree, obtains the root Hash of Merkel tree, is calculated one according to the cryptographic Hash of the root Hash and parent data block A cryptographic Hash, and it is whether consistent with the comparison of the cryptographic Hash of the data block.
Clearance order, PURGE (lgid, blkbound): user specifies account book mark " lgid " and block high " blkbound ", the data block before service side determines block height based on block height is the data block for needing to remove, and then removes this It is a little to determine the data block for needing to remove.And a pseudo- initial data block is generated, the cryptographic Hash of pseudo- initial data block is equal to true The cryptographic Hash for the last one data block that fixed needs are removed, this way it is possible to avoid occurring mistake when being verified afterwards.Quilt The data of removing actually in the window phase of certain time (for example, 72 hours) are still present in database service side, only It is to be removed from the account book in form.
Hide instruction, OCCULT (blkheight, txoff): user specifies by block high " blkheight " and specifies Offsets The record of a data determined by " txoff " is measured, the data record is replaced with concealmentization data, includes institute in concealmentization data State the transaction Hash of data record.
Inquiry instruction, RETRIEVE (khash): user inputs the cryptographic Hash " khash " of a data record, inquiry The block height and data that obtain data block locating for data record corresponding to the cryptographic Hash are recorded in the offset in the data block “&v”。
Above-mentioned part simply gives several examples, in practical applications, database service only for operational order Side is also based on business and needs to provide more executable operational order, and other parameters are added in operational order, To realize more complicated database service, this does not constitute the limitation to the application.
By parameter included in operational order, data record or data block to be executed can be always determined. When operation object is data block, it is believed that same one will be performed to all data records included in the data block Kind operation.
S203 determines attribute tab character corresponding to the operational order according to the type of the operational order, described Attribute tab character is used for the last change state of mark data record.
The type of operational order and the mapping relations of attribute tab character can be established in advance, and be stored in database service In the address that side can call at any time, corresponding attribute tab character is provided so as to the type based on operational order.
For example, for the database service side of centralization tab character can be given based on operation " addition " " 01 " gives tab character " 02 " for operation " removing ", for operation " concealment ", gives tab character " FF " etc..To The current state of the data record can be known by attribute tab character, and will be seen that the nearest progress of the data record Which kind of operation.
S205 establishes the corresponding relationship of the attribute tab character and the data record, the corresponding relationship is written State array in the build of data block locating for the data record.
In the account book of block chain type, content included in build and block and reading manner are all can be customized 's.As shown in figure 3, Fig. 3 is a kind of schematic diagram of the build comprising state array provided by this specification embodiment.Status number For group for storing corresponding relationship above-mentioned, corresponding relationship among these can be the one of attribute tab character and the data record One corresponding relationship is also possible to an attribute tab character corresponding to multiple data records.Under different corresponding relationship relationships, State array has the different forms of expression.Information for expressing data record can be the unique identification of data record, Cryptographic Hash including data record, or location information within the data block etc..
In the account book of block chain type storage, when user makes certain type of operation for data record, i.e., accordingly Provide attribute tab character corresponding to an operation note, establish the attribute tab character it is corresponding with data record close System, and the state array being located in the build of data block is written.By the above-mentioned means, can be flexibly to the state of data record It is marked, and easily the state of data record in data block is counted, and attribute tab character is stored in Reading data, storage and the other operations of block body are not interfered in block head, it is more convenient.
Specifically, can be believed by the position of the data record within the data block in data record in a data block Breath uniquely determines.Location information can be the offset that data are recorded in block, alternatively, location information can also be that data are remembered Record the storage serial number in block.
So at this point it is possible to which the state array is written in the corresponding relationship for establishing location information and attribute tab character.Tool For body, it can determine the correspondence element in array according to location information, and the element is written in attribute tab character In, the position of the data element and the corresponding relationship of attribute tab character are contained in the element in array.
For example, the element in array can be using location information as key, to be the key-value pair of value with attribute tab character Form: (location information, attribute tab character), the form of array may is that { (location information 1, attribute tab character 1), (position Confidence breath 2, attribute tab character 3), (location information 6, attribute tab character 1) ... ... }.When user carried out data record After operation, that is, a corresponding array element is generated, or modify to the attribute tab character in array element.
Under this embodiment, the location information in different array elements will not be identical.At this point, need not be deposited in array The status information of all data records is stored up, the status information that the data record of state change occurred need to be only stored with.
In another example the element in array can be using attribute tab character as key, it take location information as the key-value pair of value Form: (attribute tab character 1;Location information 1, location information 2 ... ...), the form of array can be as follows: { (attribute mark Remember character 1;Location information 1, location information 2 ... ...), (attribute tab character 2;Location information 9, location information 10 ... ...) ... ... }.
Under this embodiment, the attribute tab character in different array elements will not be identical, an attribute label Character can correspond to multiple location informations.At this point, describing the identical multiple numbers of nearest state in a data element According to record, it is convenient for subsequent statistical.
In one embodiment, each array element in array sequentially corresponds to data record, each number Group element is the initial markers character of a default, and the value of initial markers character can be given based on predetermined manner, for example, giving Determining initial markers character is " 00 ".When data record performs certain operation by user, corresponding array element is repaired It is changed to corresponding attribute tab character.
For example, have 1000 datas record in the block of a data block, then it is corresponding to be generated in the build of data block It accordingly include the array of 1000 array elements, each array element sequentially corresponds to data record, at this point, in array Comprising 1000 elements, each element is a tab character, and form can be as follows: { initial markers character, attribute Tab character 1, attribute tab character 2, attribute tab character 3, initial markers character ... ... }.Whenever to a data record into Gone certain operation when, directly being modified according to the serial number of data record to corresponding element in the data can.
Under this embodiment, the location information of data record has been hidden in data record by way of sequence Element in, in array need not again in the form of plaintext storing data record location information, memory space can be saved.
Further, it is also possible to establish a corresponding state index, except the account book of block chain type to inquire.Specific rope Draw the mode of foundation are as follows: the block height for determining data block locating for the data record and the offset in the data block;It establishes The concordance list of corresponding relationship comprising described piece of height, offset and attribute tab character, and store.At this point, the member in concordance list The form of element are as follows: (cryptographic Hash of data record, block is high, offset, attribute tab character).User is if it is desired to inquire a certain item number According to record state when, then the cryptographic Hash that can input the data record is inquired from index.In above-mentioned index, The mark that the cryptographic Hash of data record can be used as data record is deposited in the index.
In practical applications, each operation of data record also can be written into and carries out depositing card in account book.For example, can be with By way of database service provider disposes intelligent contract, database service provider is whenever receiving operational order When, it can operational order is packaged into the account book of data record write area, the authenticity of data-recording status is further increased.
Corresponding, this specification embodiment also provides the data attribute identity device in a kind of piece of chain type account book, is applied to It include the build for recording metadata for storing data in block chain type account book, in the data block in block chain type account book, such as Fig. 4 institute Show, Fig. 4 is the structural schematic diagram of the data attribute identity device in a kind of piece of chain type account book that this specification embodiment provides, packet It includes:
Command reception module 401 receives operational order, determines the type of operational order and need determined by operational order Execute the data record of operation;
Character determining module 403 determines attribute mark corresponding to the operational order according to the type of the operational order Remember that character, the attribute tab character are used for the last change state of mark data record;
Relationship establishes module 405, establishes the corresponding relationship of the attribute tab character and the data record;
The state in the build of data block locating for the data record is written in the corresponding relationship by writing module 407 Array;
Wherein, in addition to initial data block, include at least one data record in each data block, wrapped in each data block Cryptographic Hash containing the data block that the cryptographic Hash by last data block and the data record for itself being included determine, data block Sequencing monotonic increase of the block height based on Chunky Time.
Further, described device further includes data block generation module 409, receives data record to be stored, and is determined each The cryptographic Hash of data record;When reaching preset blocking condition, each data record in data block to be written is determined, generate packet The n-th data block of cryptographic Hash and data record containing data block, specifically includes: as N=1, the cryptographic Hash of initial data block It is given based on predetermined manner with block height;As N > 1, according to each data record and the N-1 data block in data block to be written Cryptographic Hash determine the cryptographic Hash of n-th data block, generate the N of the cryptographic Hash comprising n-th data block and each data record A data block.
Further, the relationship establishes module 405, determines the position letter that the data are recorded in the data block Breath, wherein the location information includes the offset or storage serial number of the data record within the data block;Said write mould The state array is written in the corresponding relationship of the location information and attribute tab character by block 407.
Further, in the state array, each of array element is attribute mark corresponding to data record Remember character, is arranged according to the sequence of data record within the data block.
Further, in the state array, the form of element is key-value pair, and the element in array is marked with attribute Character is key, is value with location information;Alternatively, the element in array is value with attribute tab character using location information as key.
Further, described further includes index creation module 411, determines that the block of data block locating for the data record is high With the offset in the data block;Establish the rope of the corresponding relationship comprising described piece of height, offset and attribute tab character Draw table, and stores.
This specification embodiment also provides a kind of computer equipment, includes at least memory, processor and is stored in On reservoir and the computer program that can run on a processor, wherein processor realizes number shown in Fig. 2 when executing described program According to attribute-bit method.
Fig. 5 shows one kind provided by this specification embodiment and more specifically calculates device hardware structural schematic diagram, The equipment may include: processor 1010, memory 1020, input/output interface 1030, communication interface 1040 and bus 1050.Wherein processor 1010, memory 1020, input/output interface 1030 and communication interface 1040 are real by bus 1050 The now communication connection inside equipment each other.
Processor 1010 can use general CPU (Central Processing Unit, central processing unit), micro- place Reason device, application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or one Or the modes such as multiple integrated circuits are realized, for executing relative program, to realize technical side provided by this specification embodiment Case.
Memory 1020 can use ROM (Read Only Memory, read-only memory), RAM (Random Access Memory, random access memory), static storage device, the forms such as dynamic memory realize.Memory 1020 can store Operating system and other applications are realizing technical solution provided by this specification embodiment by software or firmware When, relevant program code is stored in memory 1020, and execution is called by processor 1010.
Input/output interface 1030 is for connecting input/output module, to realize information input and output.Input and output/ Module can be used as component Configuration (not shown) in a device, can also be external in equipment to provide corresponding function.Wherein Input equipment may include keyboard, mouse, touch screen, microphone, various kinds of sensors etc., output equipment may include display, Loudspeaker, vibrator, indicator light etc..
Communication interface 1040 is used for connection communication module (not shown), to realize the communication of this equipment and other equipment Interaction.Wherein communication module can be realized by wired mode (such as USB, cable etc.) and be communicated, can also be wirelessly (such as mobile network, WIFI, bluetooth etc.) realizes communication.
Bus 1050 include an access, equipment various components (such as processor 1010, memory 1020, input/it is defeated Outgoing interface 1030 and communication interface 1040) between transmit information.
It should be noted that although above equipment illustrates only processor 1010, memory 1020, input/output interface 1030, communication interface 1040 and bus 1050, but in the specific implementation process, which can also include realizing normal fortune Other assemblies necessary to row.In addition, it will be appreciated by those skilled in the art that, it can also be only comprising real in above equipment Component necessary to existing this specification example scheme, without including all components shown in figure.
This specification embodiment also provides a kind of computer readable storage medium, is stored thereon with computer program, the journey Data attribute identification method shown in Fig. 2 is realized when sequence is executed by processor.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
As seen through the above description of the embodiments, those skilled in the art can be understood that this specification Embodiment can be realized by means of software and necessary general hardware platform.Based on this understanding, this specification is implemented Substantially the part that contributes to existing technology can be embodied in the form of software products the technical solution of example in other words, The computer software product can store in storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions are to make It is each to obtain computer equipment (can be personal computer, server or the network equipment etc.) execution this specification embodiment Method described in certain parts of a embodiment or embodiment.
System, method, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity, Or it is realized by the product with certain function.A kind of typically to realize that equipment is computer, the concrete form of computer can To be personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play In device, navigation equipment, E-mail receiver/send equipment, game console, tablet computer, wearable device or these equipment The combination of any several equipment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for method reality For applying example, since it is substantially similar to the method embodiment, so describing fairly simple, related place is referring to embodiment of the method Part explanation.Embodiment of the method described above is only schematical, wherein described be used as separate part description Module may or may not be physically separated, can be each module when implementing this specification example scheme Function realize in the same or multiple software and or hardware.Can also select according to the actual needs part therein or Person's whole module achieves the purpose of the solution of this embodiment.Those of ordinary skill in the art are not the case where making the creative labor Under, it can it understands and implements.
The above is only the specific embodiment of this specification embodiment, it is noted that for the general of the art For logical technical staff, under the premise of not departing from this specification embodiment principle, several improvements and modifications can also be made, this A little improvements and modifications also should be regarded as the protection scope of this specification embodiment.

Claims (13)

1. the data attribute identification method in a kind of piece of chain type account book is applied in block chain type account book, the number in block chain type account book According to the build in block comprising recording metadata for storing data, which comprises
Operational order is received, determine the type of operational order and needs to be implemented the data note of operation determined by operational order Record;
According to the type of the operational order, attribute tab character corresponding to the operational order, the attribute label are determined Character is used for the last change state of mark data record;
The corresponding relationship is written the data and remembered by the corresponding relationship for establishing the attribute tab character and the data record State array in the build of the locating data block of record;
Wherein, include at least one data record in each data block in addition to initial data block, in each data block comprising by The block of the cryptographic Hash for the data block that the cryptographic Hash of last data block and the data record for itself being included determine, data block is high Sequencing monotonic increase based on Chunky Time.
2. the method as described in claim 1, the data block is based on by the database service provider under the scene of centralization As under type is pre-generated:
Data record to be stored is received, determines the cryptographic Hash of each data record;
When reaching preset blocking condition, each data record in data block to be written is determined, generate the Kazakhstan comprising data block The n-th data block of uncommon value and data record, specifically includes:
As N=1, the cryptographic Hash and block height of initial data block are given based on predetermined manner;
As N > 1, n-th number is determined according to the cryptographic Hash of each data record and the N-1 data block in data block to be written According to the cryptographic Hash of block, the n-th data block of the cryptographic Hash comprising n-th data block and each data record is generated.
3. the method as described in claim 1 establishes the corresponding relationship of the attribute tab character and the data record, by institute Corresponding relationship is stated to be written in data block locating for the data record, comprising:
The location information that the data are recorded in the data block is determined, wherein the location information includes the data record Offset or storage serial number within the data block;
The state array is written into the corresponding relationship of the location information and attribute tab character.
4. method as claimed in claim 3, in the state array,
Each of array element is attribute tab character corresponding to data record, within the data block according to data record Sequence arranges.
5. method as claimed in claim 3, in the state array, the form of element is key-value pair,
Element in array is value with location information using attribute tab character as key;Alternatively,
Element in array is value with attribute tab character using location information as key.
6. the method as described in claim 1, further includes:
The block height for determining data block locating for the data record and the offset in the data block;
The concordance list of the corresponding relationship comprising described piece of height, offset and attribute tab character is established, and is stored.
7. the data attribute identity device in a kind of piece of chain type account book is applied in block chain type account book, the number in block chain type account book According to the build in block comprising recording metadata for storing data, comprising:
Command reception module receives operational order, determines the type of operational order and need to be implemented determined by operational order The data record of operation;
Character determining module determines attribute tab character corresponding to the operational order according to the type of the operational order, The attribute tab character is used for the last change state of mark data record;
Relationship establishes module, establishes the corresponding relationship of the attribute tab character and the data record;
The state array in the build of data block locating for the data record is written in the corresponding relationship by writing module;
Wherein, include at least one data record in each data block in addition to initial data block, in each data block comprising by The block of the cryptographic Hash for the data block that the cryptographic Hash of last data block and the data record for itself being included determine, data block is high Sequencing monotonic increase based on Chunky Time.
8. device as claimed in claim 7 further includes data block generation module, data record to be stored is received, is determined each The cryptographic Hash of data record;When reaching preset blocking condition, each data record in data block to be written is determined, generate packet The n-th data block of cryptographic Hash and data record containing data block, specifically includes: as N=1, the cryptographic Hash of initial data block It is given based on predetermined manner with block height;As N > 1, according to each data record and the N-1 data block in data block to be written Cryptographic Hash determine the cryptographic Hash of n-th data block, generate the N of the cryptographic Hash comprising n-th data block and each data record A data block.
9. device as claimed in claim 7, the relationship establishes module, determines that the data are recorded in the data block Location information, wherein the location information includes the offset or storage serial number of the data record within the data block;It is described The state array is written in the corresponding relationship of the location information and attribute tab character by writing module.
10. device as claimed in claim 9, in the state array, each of array element is data record institute Corresponding attribute tab character is arranged according to the sequence of data record within the data block.
11. device as claimed in claim 9, in the state array, the form of element is key-value pair, the member in array Element is value with location information using attribute tab character as key;Alternatively, the element in array, using location information as key, with attribute Tab character is value.
12. device as claimed in claim 7 further includes index creation module, determines data block locating for the data record Block is high and the offset in the data block;Establish the corresponding pass comprising described piece of height, offset and attribute tab character The concordance list of system, and store.
13. a kind of computer equipment including memory, processor and stores the meter that can be run on a memory and on a processor Calculation machine program, wherein the processor realizes such as method as claimed in any one of claims 1 to 6 when executing described program.
CN201910234777.7A 2019-03-26 2019-03-26 Data attribute identification method, device and equipment in block chain type account book Active CN110008743B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910234777.7A CN110008743B (en) 2019-03-26 2019-03-26 Data attribute identification method, device and equipment in block chain type account book

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910234777.7A CN110008743B (en) 2019-03-26 2019-03-26 Data attribute identification method, device and equipment in block chain type account book

Publications (2)

Publication Number Publication Date
CN110008743A true CN110008743A (en) 2019-07-12
CN110008743B CN110008743B (en) 2023-02-28

Family

ID=67168255

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910234777.7A Active CN110008743B (en) 2019-03-26 2019-03-26 Data attribute identification method, device and equipment in block chain type account book

Country Status (1)

Country Link
CN (1) CN110008743B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110598386A (en) * 2019-09-27 2019-12-20 腾讯科技(深圳)有限公司 Data processing method, device and equipment based on block chain and storage medium
CN110636042A (en) * 2019-08-14 2019-12-31 阿里巴巴集团控股有限公司 Method, device and equipment for updating verified block height of server
CN112307010A (en) * 2019-07-29 2021-02-02 创新先进技术有限公司 Data storage method, device and equipment
CN112307011A (en) * 2019-07-29 2021-02-02 创新先进技术有限公司 Data storage method, device and equipment
CN112380573A (en) * 2019-07-29 2021-02-19 创新先进技术有限公司 Digital signature method, device and equipment in block chain type account book
WO2021073240A1 (en) * 2019-10-18 2021-04-22 蚂蚁区块链科技(上海)有限公司 Method, device, and apparatus for storing data in blockchain ledger
CN113535720A (en) * 2019-07-29 2021-10-22 创新先进技术有限公司 Index creating method, device and equipment in block chain type account book

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110252099A1 (en) * 2010-04-07 2011-10-13 Amol Pattekar Apparatus and method for efficiently managing data in a social netwroking service
CN107516180A (en) * 2017-08-25 2017-12-26 迅鳐成都科技有限公司 A kind of system and method that storage transaction security and operating efficiency are improved based on block chain
CN107819777A (en) * 2017-11-17 2018-03-20 北京亿生生网络科技有限公司 A kind of data based on block chain technology deposit card method and system
CN108989357A (en) * 2018-09-12 2018-12-11 中国人民解放军国防科技大学 User authorization and data sharing access control method based on block chain
CN109284340A (en) * 2018-09-14 2019-01-29 清华大学 The storage and search method of relational data in resource-constrained smart object
US20190034922A1 (en) * 2017-07-25 2019-01-31 Bank Of America Corporation Real-time processing distributed ledger system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110252099A1 (en) * 2010-04-07 2011-10-13 Amol Pattekar Apparatus and method for efficiently managing data in a social netwroking service
US20190034922A1 (en) * 2017-07-25 2019-01-31 Bank Of America Corporation Real-time processing distributed ledger system
CN107516180A (en) * 2017-08-25 2017-12-26 迅鳐成都科技有限公司 A kind of system and method that storage transaction security and operating efficiency are improved based on block chain
CN107819777A (en) * 2017-11-17 2018-03-20 北京亿生生网络科技有限公司 A kind of data based on block chain technology deposit card method and system
CN108989357A (en) * 2018-09-12 2018-12-11 中国人民解放军国防科技大学 User authorization and data sharing access control method based on block chain
CN109284340A (en) * 2018-09-14 2019-01-29 清华大学 The storage and search method of relational data in resource-constrained smart object

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112307010A (en) * 2019-07-29 2021-02-02 创新先进技术有限公司 Data storage method, device and equipment
CN112307011A (en) * 2019-07-29 2021-02-02 创新先进技术有限公司 Data storage method, device and equipment
CN112380573A (en) * 2019-07-29 2021-02-19 创新先进技术有限公司 Digital signature method, device and equipment in block chain type account book
CN113535720A (en) * 2019-07-29 2021-10-22 创新先进技术有限公司 Index creating method, device and equipment in block chain type account book
CN112307010B (en) * 2019-07-29 2024-04-16 创新先进技术有限公司 Data storage method, device and equipment
CN110636042A (en) * 2019-08-14 2019-12-31 阿里巴巴集团控股有限公司 Method, device and equipment for updating verified block height of server
CN110598386A (en) * 2019-09-27 2019-12-20 腾讯科技(深圳)有限公司 Data processing method, device and equipment based on block chain and storage medium
CN110598386B (en) * 2019-09-27 2023-05-30 腾讯科技(深圳)有限公司 Block chain-based data processing method, device, equipment and storage medium
WO2021073240A1 (en) * 2019-10-18 2021-04-22 蚂蚁区块链科技(上海)有限公司 Method, device, and apparatus for storing data in blockchain ledger

Also Published As

Publication number Publication date
CN110008743B (en) 2023-02-28

Similar Documents

Publication Publication Date Title
CN110008743A (en) Data attribute identification method, device and equipment in a kind of piece of chain type account book
CN110188096B (en) Index creating method, device and equipment for data record
US20210160053A1 (en) Merkle tree construction methods and apparatuses and simplified payment verification methods and apparatuses
CN109902086B (en) Index creation method, device and equipment
CN110162662B (en) Verification method, device and equipment for data records in block chain type account book
CN111352935B (en) Index creating method, device and equipment in block chain type account book
CN110022315A (en) Weight management method, device and equipment in a kind of piece of chain type account book
CN110275916A (en) Storage method, system, device and the equipment of data operating record
CN109951290A (en) A kind of time service authentication method, device and the equipment of chain type account book
CN110162526A (en) Querying method, device and the equipment of data record in a kind of piece of chain type account book
CN110347674A (en) A kind of index creation method, device and equipment based on service identification
CN110019278B (en) Data verification method, device and equipment
CN110147686A (en) A kind of storage method, system, device and the equipment of personal asset change record
CN110474775A (en) User's creation method, device and equipment in a kind of piece of chain type account book
CN110059088A (en) Data attribute identification method, device and equipment in a kind of piece of chain type account book
CN110061843A (en) The high creation method of block, device and equipment in a kind of chain type account book
CN110266494A (en) Time service authentication method, device and equipment in a kind of piece of chain type account book
CN110347679A (en) A kind of date storage method based on receipt, device and equipment
CN111046052B (en) Method, device and equipment for storing operation records in database
CN110046509B (en) Method and device for hiding transaction written into block chain
CN110059087A (en) Data attribute identification method, device and equipment in a kind of piece of chain type account book
CN110008210B (en) Index creation method, device and equipment
CN110362570B (en) Data storage method, device and equipment
CN111444194B (en) Method, device and equipment for clearing indexes in block chain type account book
CN115203746A (en) Data account access authorization method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20200923

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200923

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant