CN110059088A - 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
CN110059088A
CN110059088A CN201910234278.8A CN201910234278A CN110059088A CN 110059088 A CN110059088 A CN 110059088A CN 201910234278 A CN201910234278 A CN 201910234278A CN 110059088 A CN110059088 A CN 110059088A
Authority
CN
China
Prior art keywords
data
block
data record
data block
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
CN201910234278.8A
Other languages
Chinese (zh)
Other versions
CN110059088B (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 CN201910234278.8A priority Critical patent/CN110059088B/en
Publication of CN110059088A publication Critical patent/CN110059088A/en
Application granted granted Critical
Publication of CN110059088B publication Critical patent/CN110059088B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

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, and the attribute tab character is spliced to the head of data record, the data record of a new tape label is formed, and is written in the block of data block.

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 chain type, to realize more convenient identification The state of data record, this specification embodiment provide data attribute identification method in a kind of piece of chain type account book, device and set Standby, the method specifically includes:
The operational order for data block or data record is received, determines the type of operational order;
According to the type of operational order, attribute tab character is determined;
Determine the data record operated required for operational order and its storage location in block;
The attribute tab character is spliced to the head of the data record, generates the data record of tape label;
The data record of the tape label is stored into the storage location to described in block;
It wherein, include at least one data record, each data in the block of each data block in addition to initial data block The cryptographic Hash of the data block determined in block comprising the cryptographic Hash by last data block and the data record for itself being included, number According to the block height of block based on the sequencing monotonic increase of Chunky Time.
Corresponding, this specification embodiment also provides the data attribute identity device in a kind of piece of chain type account book, comprising:
Command reception module receives the operational order for data block or data record, determines the type of operational order;
Character determining module determines attribute tab character according to the type of operational order;
Data record determining module determines the data record operated required for operational order and its depositing in block Storage space is set;
The attribute tab character is spliced to the head of the data record, generates the data of tape label by splicing module Record;
The data record of the tape label is stored the storage location to described in block by memory module;
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, and the attribute tab character is spliced to the head of data record Portion, forms the data record of a new tape label, and is written in the block of data block.By the above-mentioned means, can be flexible The state of data record 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 the process schematic of the data record for the construction tape label that this specification embodiment provides;
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 centralization Database service side provided by block chain type account book, the data block in block chain type account book includes to record for storing data Block, the process specifically comprise the following steps:
S201 receives the operational order for data block or data record, determines the type of operational order.
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.
S203 determines attribute tab character according to the type of operational order.
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 determines the data record operated required for operational order and its storage location in block.
The storage location stated, refers in the block of data block, the memory space or storage address recorded for storing data. Assuming that M data record is written in the account book of a block chain type, then, also there is the storage of M data record in account book simultaneously Position is respectively used to store this M data record.The storage location of one data record, where referring to the data record The cis-position number of the block height of data block and the data record within the data block.For example, including the data block of data record A Block height is 5, also, data record A is the 10th data record in the data block.Therefore, the corresponding storage position data record A It sets and can be (5,10).
It should be noted that under this embodiment, attribute tab character is not involved in the Kazakhstan of data record or block Uncommon value operation.Attribute tab character can be omitted when calculating the Hash of data record in database service provider.
The attribute tab character is spliced to the head of the data record, generates the data record of tape label by S207.
In one embodiment, data record can be by the data record of new writing data blocks, at this time data record institute Corresponding attribute tab character are as follows: attribute tab character corresponding to " write-in " shows that the data record is the data being newly written Record, alternatively, attribute tab character corresponding to " write-in " may be sky, to save space.
In another embodiment, data record has had corresponding attribute tab character.That is, storing within the data block Be tape label data record, head is for storing attribute tab character.At this point, the head of data record can be omitted Portion directly reads the content of data record, for splicing the corresponding attribute tab character of this operation.
Fig. 3 is the process schematic of the data record for the construction tape label that this specification embodiment provides.Either at which Under kind situation, corresponding attribute tab character and data note can be first obtained when user operates the data record It records, and attribute tab character is spliced to the head of the data record, generate the data record of tape label.At this point, attribute The form of tab character is present in the data record of newly-generated tape label before tab character.
The data record of the tape label is stored the storage location to described in block by S209.
For the data record being newly written, the data record of tape label is directly stored to the number distributed into data block According to record.For already existing data record, then the data of tape label are remembered in identified storage location before Record replaces the data record.
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, and the attribute tab character is spliced to the head of data record Portion, forms the data record of a new tape label, and is written in the block of data block.By the above-mentioned means, can be flexible The state of data record is marked, and easily the state of data record in data block is counted.
In a kind of specific embodiment, the form of the data record of tape label may also is that preceding tab character (attribute Tab character)+data record+rear tab character+remark information.Generating mode are as follows: preset preceding tab character is spliced to data The stem of record, will it is preset after tab character be spliced to the tail portion of data record, also, by remark information be spliced to it is described after The tail portion of tab character;Then, by the preceding tab character, the data record or data record Hash (in general, When receiving hide instruction, data record can be replaced using data record Hash in plain text, other operational orders are constant), it is described The data that tab character and the remark information are spliced into afterwards are determined as the data record of tape label.
Above-mentioned preceding tab character can be specified according to actual needs with rear tab character.For example, label before described Character can be " OE ", and the rear tab character can be " OF ".
It should also be noted that, the remark information specifically can be to realize that specific transactions need added information. For example, the remark information can be " hidden ", show that the data record has been concealed.When user is based on data record Cryptographic Hash inquire corresponding data record when, it is sightless that the remark information, which can prompt the data record,.
In one embodiment, when a data record has had the attribute tab character as preceding tab character, If operated again to the data at this time, the attribute tab character positioned at head can be directly replaced.For example, one by The data record of user's addition, the storage form in block are as follows: [01] [data record is in plain text], " 01 " therein is Attribute tab character corresponding to " addition ", if user performs " removing " behaviour to data block locating for the data record at this time Make, then the data record is also removed at this time, and the attribute tab character as corresponding to " removing " is " 02 ", then at this point, the number Become according to the storage form being recorded in block: [02] [data record is in plain text], avoiding the operation for generating replacement data again, Corresponding attribute tab character only need to be replaced can.
In other words, under this embodiment, the format of data record can be predefined, every day data in block The format of record is are as follows: [attribute tab character] [data record is in plain text].That is, a data record in include head and tail portion, Head records in plain text for storing data for storing attribute tab character, tail portion.Head is not involved in the cryptographic Hash of data record Calculating when being operated data record attribute tab character is determined according to action type, and cover write-in data record Head.
Corresponding, this specification embodiment also provides the data attribute identity device in a kind of piece of 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 the operational order for data block or data record, determines the class of operational order Type;
Character determining module 403 determines attribute tab character according to the type of operational order;
Data record determining module 405 determines the data record operated required for operational order and its in block Storage location;
The attribute tab character is spliced to the head of the data record, generates the number of tape label by splicing module 407 According to record;
The data record of the tape label is stored the storage location to described in block by memory module 409;
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 411, 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 splicing module 407, will it is preset after tab character be spliced to the tail portion of the data record, Also, remark information is spliced to the tail portion of the rear tab character;By the attribute tab character, data record, rear label The data that character and remark information are spliced into are determined as the data record of tape label.
Further, it is described when the data record operated required for operational order is the data record of tape label Device further includes writing module 413, determines the head of the data record of the tape label, and institute is written in the attribute tab character The head of the data record of tape label is stated, and is stored.
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 (9)

1. the data attribute identification method in a kind of piece of chain type account book, block provided by the database service side applied to centralization In chain type account book, the data block in block chain type account book includes the block recorded for storing data, which comprises
The operational order for data block or data record is received, determines the type of operational order;
According to the type of operational order, attribute tab character is determined;
Determine the data record operated required for operational order and its storage location in block;
The attribute tab character is spliced to the head of the data record, generates the data record of tape label;
The data record of the tape label is stored into the storage location to described in block;
It wherein, include at least one data record in the block of each data block, in each data block in addition to initial data block Cryptographic Hash comprising 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.
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 attribute tab character is spliced to the head of the data record by the method as described in claim 1, band is generated The data record of label, comprising:
Preset rear tab character is spliced to the tail portion of the data record, also, remark information is spliced to the rear mark Remember the tail portion of character;
The data that the attribute tab character, data record, rear tab character and remark information are spliced into are determined as tape label Data record.
4. the method as described in claim 1, the data record operated required for operational order is the data of tape label When record, the method also includes:
Determine the head of the data record of the tape label;
The attribute tab character is written to the head of the data record of the tape label, and is stored.
5. the data attribute identity device in a kind of piece of chain type account book, block provided by the database service side applied to centralization In chain type account book, the data block in block chain type account book includes the block recorded for storing data, which comprises
Command reception module receives the operational order for data block or data record, determines the type of operational order;
Character determining module determines attribute tab character according to the type of operational order;
Data record determining module determines the data record operated required for operational order and its storage position in block It sets;
The attribute tab character is spliced to the head of the data record, generates the data record of tape label by splicing module;
The data record of the tape label is stored the storage location to described in block by memory 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.
6. device as claimed in claim 5 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.
7. preset rear tab character is spliced to the data record by device as claimed in claim 5, the splicing module Tail portion, also, by remark information be spliced to it is described after tab character tail portion;By the attribute tab character, data record, The data that tab character and remark information are spliced into afterwards are determined as the data record of tape label.
8. device as claimed in claim 5, the data record operated required for operational order is the data of tape label When record, described device further includes writing module, determines the head of the data record of the tape label;By the attribute marker word The head of the data record of the tape label is written in symbol, and stores.
9. 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 the described in any item methods of Claims 1-4 when executing described program.
CN201910234278.8A 2019-03-26 2019-03-26 Data attribute identification method, device and equipment in block chain type account book Active CN110059088B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910234278.8A CN110059088B (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
CN201910234278.8A CN110059088B (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
CN110059088A true CN110059088A (en) 2019-07-26
CN110059088B CN110059088B (en) 2023-02-28

Family

ID=67316352

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910234278.8A Active CN110059088B (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) CN110059088B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112039893A (en) * 2020-08-31 2020-12-04 成都质数斯达克科技有限公司 Private transaction processing method and device, electronic equipment and readable storage medium
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

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0936618A2 (en) * 1998-02-12 1999-08-18 Hewlett-Packard Company Write pass identifier
CN106339875A (en) * 2016-08-25 2017-01-18 江苏通付盾科技有限公司 Operation record review method and operation record review device based on public block chain
CN107705125A (en) * 2017-08-28 2018-02-16 杭州云象网络技术有限公司 A kind of payment marking method based on block chain
WO2018214898A1 (en) * 2017-05-25 2018-11-29 阿里巴巴集团控股有限公司 Method and device for writing service data in block chain system
CN109145612A (en) * 2018-07-05 2019-01-04 东华大学 The cloud data sharing method of anti-data tampering, user's collusion is realized based on block chain
CN109194708A (en) * 2018-07-24 2019-01-11 哈尔滨工程大学 A kind of distributed memory system and its identity identifying method based on block chain technology
CN109379360A (en) * 2018-10-19 2019-02-22 平安科技(深圳)有限公司 Auditing method, electronic device and computer readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0936618A2 (en) * 1998-02-12 1999-08-18 Hewlett-Packard Company Write pass identifier
CN106339875A (en) * 2016-08-25 2017-01-18 江苏通付盾科技有限公司 Operation record review method and operation record review device based on public block chain
WO2018214898A1 (en) * 2017-05-25 2018-11-29 阿里巴巴集团控股有限公司 Method and device for writing service data in block chain system
CN107705125A (en) * 2017-08-28 2018-02-16 杭州云象网络技术有限公司 A kind of payment marking method based on block chain
CN109145612A (en) * 2018-07-05 2019-01-04 东华大学 The cloud data sharing method of anti-data tampering, user's collusion is realized based on block chain
CN109194708A (en) * 2018-07-24 2019-01-11 哈尔滨工程大学 A kind of distributed memory system and its identity identifying method based on block chain technology
CN109379360A (en) * 2018-10-19 2019-02-22 平安科技(深圳)有限公司 Auditing method, electronic device and computer readable storage medium

Cited By (4)

* 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
CN112307010B (en) * 2019-07-29 2024-04-16 创新先进技术有限公司 Data storage method, device and equipment
CN112039893A (en) * 2020-08-31 2020-12-04 成都质数斯达克科技有限公司 Private transaction processing method and device, electronic equipment and readable storage medium

Also Published As

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

Similar Documents

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

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

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.

Effective date of registration: 20200929

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.

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