CN110059088B - Data attribute identification method, device and equipment in block chain type account book - Google Patents

Data attribute identification method, device and equipment in block chain type account book Download PDF

Info

Publication number
CN110059088B
CN110059088B CN201910234278.8A CN201910234278A CN110059088B CN 110059088 B CN110059088 B CN 110059088B CN 201910234278 A CN201910234278 A CN 201910234278A CN 110059088 B CN110059088 B CN 110059088B
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.)
Active
Application number
CN201910234278.8A
Other languages
Chinese (zh)
Other versions
CN110059088A (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
Advanced New Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Advanced New Technologies Co Ltd filed Critical Advanced New Technologies Co 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

Images

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Business, Economics & Management (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Technology Law (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Development Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Storage Device Security (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A method, a device and equipment for identifying data attributes in a block chain type account book are disclosed. In the account book stored in the block chain manner, each time a user performs a certain type of operation on a data record, an attribute mark character corresponding to the operation record is correspondingly given, and the attribute mark character is spliced to the head of the data record to form a new marked data record and is written into a block of a data block.

Description

Data attribute identification method, device and equipment in block chain type account book
Technical Field
The embodiment of the specification relates to the technical field of information, in particular to a data attribute identification method, device and equipment in a block chain type account book.
Background
When the block-chained account book is used for storing data, although the data is difficult to tamper, a user can still perform certain operations on the stored data records. In this process, the state of data recording changes.
For business needs, a user may need to see what operations have been performed separately for each data record in one or several data blocks, or want to know the current status of each data record in one data block. There is no convenient way to implement status tagging of data records in a data block in the current solution.
Disclosure of Invention
To solve the problem of inconvenient state marking of data records in an existing chained account book, and to achieve more convenient state identification of data records, embodiments of the present specification provide a method, an apparatus, and a device for identifying data attributes in a block chained account book, where the method specifically includes:
receiving an operation instruction for a data block or a data record, and determining the type of the operation instruction;
determining attribute marking characters according to the type of the operation instruction;
determining the data record required to be operated by the operation instruction and the storage position of the data record in the block body;
splicing the attribute mark characters to the head of the data record to generate a marked data record;
storing the tagged data record to the storage location in the block;
the data processing method comprises the steps that the block body of each data block comprises at least one data record except an initial data block, each data block comprises a hash value of a previous data block and a hash value of the data block determined by the data record contained in the data block, and the block height of the data block is monotonically increased based on the sequence of blocking time.
Correspondingly, an embodiment of the present specification further provides a data attribute identification device in a block chain type account book, including:
the instruction receiving module is used for receiving an operation instruction for the data block or the data record and determining the type of the operation instruction;
the character determining module is used for determining attribute marking characters according to the type of the operation instruction;
the data record determining module is used for determining the data record required to be operated by the operation instruction and the storage position of the data record in the block body;
the splicing module splices the attribute mark characters to the head of the data record to generate the marked data record;
a storage module for storing the marked data record to the storage location in the block;
the data block comprises at least one data record except for the initial data block, each data block comprises a hash value of a previous data block and a hash value of a data block determined by the data record contained in the data block, and the block height of the data block is monotonically increased based on the sequence of the blocking time.
In the account book stored in the block chain manner, each time a user performs a certain type of operation on a data record, an attribute mark character corresponding to the operation record is correspondingly given, and the attribute mark character is spliced to the head of the data record to form a new marked data record and is written into a block of a data block. By the mode, the state of the data record can be flexibly marked, and the state of the data record in the data block can be conveniently counted.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of embodiments of the invention.
In addition, any one of the embodiments in the present specification is not required to achieve all of the effects described above.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the embodiments of the present specification, and other drawings can be obtained by those skilled in the art according to the drawings.
Fig. 1 is a schematic structural diagram of a block chain ledger according to an embodiment of the present specification;
fig. 2 is a schematic flowchart of a method for identifying data attributes in a block-chained ledger provided by an embodiment of the present specification;
FIG. 3 is a schematic diagram of a process for constructing a tagged data record provided by an embodiment of the present description;
fig. 4 is a schematic structural diagram of a data attribute identification apparatus in a block chain ledger provided by an embodiment of this specification;
fig. 5 is a schematic structural diagram of an apparatus for configuring a method according to an embodiment of the present disclosure.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the embodiments of the present specification, the technical solutions in the embodiments of the present specification will be described in detail below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present specification, and not all the embodiments. All other embodiments that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of protection.
In general terms, a blockchain ledger contains two types: block chains and class block chain accounts. Blockchains are generally divided into three types: public chain (Public Blockchain), private chain (Private Blockchain), and federation chain (Consortium Blockchain). In addition, there are various types of combinations, such as private chain + federation chain, federation chain + public chain, and other different combinations. Any kind of block chain can be regarded as decentralized, and the data writing into the block chain needs to be commonly recognized by each node, so that the consistency of the data in each node is achieved, and the data is difficult to tamper. The book of the class blockchain is a way to store data in a centralized scenario, but the book also has the characteristic of being not falsifiable.
The ledger, whether for blockchains or class blockchains, may be in the form shown in fig. 1. Fig. 1 is a schematic structural diagram of a block chain type ledger according to an embodiment of the present specification. The block chain type account book is composed of a plurality of data blocks, and the data blocks are arranged according to a block time sequence. Starting from the initial data block, each data block has a sub-data block, and the hash value of each data block is determined by the hash value of the previous data block and the data record contained in the data block. Each data block includes a block header for storing metadata of some data blocks (e.g., block height, parent data block hash, root hash of a merkel tree formed by data records in the block, etc.), and a block body for storing a specific data record.
Note that, in the block chain type account book, the data record is hard to be falsified. However, this does not mean that the user cannot perform some specific operation on the data record.
For example, in a blockchain ledger with limited nodes, or a private chain, a node may initiate a transaction to hide a data record containing a specified location of sensitive data, replace the original data record with the obscured data containing the hash value of the original data record after consensus passes in the blockchain, and not affect Simple Pay Verification (SPV) or other Verification of the blockchain. For another example, in the centralized class blockchain ledger, the user can perform operations such as adding, clearing, hiding, etc. on the data in the data block through different predefined instructions. The specific mode of operation will be described in detail below.
As the user operates the data records in the block chain ledger, the state of the data records is changed accordingly. The user may need to know which data records have changed and make corresponding statistics for the business needs at this time. Based on this, the embodiments of the present specification provide a scheme for recording attributes of data records.
In order to make the configuration of the present embodiment easier to understand, a method and a format for generating a centralized class block chain book in the present embodiment will be described first. In a specific embodiment, the ledger of the class blockchain may be generated as follows:
first, a centralized database service provider receives data records to be stored, and determines hash values of the data records. The data records to be stored here may be various consumption records of individual users of the client, and also may be business results, intermediate states, operation records, and the like generated by the application server when executing business logic based on instructions of the users. Specific business scenarios may include consumption records, audit logs, supply chains, government regulatory records, medical records, and the like.
Then, when the preset blocking condition is reached, the database service provider determines each data record to be written into the data block, and generates an nth data block including the hash value of the data block and the data record.
The preset blocking condition comprises the following steps: when the number of data records to be stored reaches a number threshold, for example, a new data block is generated every time one thousand data records are received, and one thousand data records are written into the block; alternatively, a time interval from the last blocking time reaches a time threshold, e.g., every 5 minutes, a new data block is generated, and the data records received within the 5 minutes are written into the block.
N here refers to a sequence number of the data block, in other words, in this embodiment of the present specification, the data block is arranged in a block chain manner, and is arranged in sequence based on the blocking time, and has a strong timing characteristic. The block height of the data block is monotonically increased based on the sequence of the blocking time. The block height may be a sequence number, and at this time, the block height of the nth data block is N; the block height may also be generated in other ways, for example, by converting the generation time of the block height into a series of monotonically increasing large integers (typically 12 to 15 bits of integer data) as the block height.
When N =1, the data block at this time is the initial data block. The hash value and the block height of the initial data block are given based on a preset mode. For example, the initial data block does not contain data records, the hash value is any given hash value, and the block height blknum =0; for another example, the trigger condition for generation of the initial data block is consistent with the trigger conditions of other data blocks, but the hash value of the initial data block is determined by hashing the contents of all data records in the initial data block.
When N >1, since the content and hash value of the previous data block have already been determined, at this time, the hash value of the current data block (nth data block) may be generated based on the hash value of the previous data block (i.e., nth-1 data block), for example, one possible way is to determine the hash value of each data record to be written into the nth data block, generate a mercker tree in the order of arrangement in the blocks, concatenate the root hash value of the mercker tree with the hash value of the previous data block, and generate the hash value of the current block again using the hash algorithm. For example, the hash value of the data block may be generated by concatenating the data records in the order of the data records in the block and hashing the concatenated data records to obtain the hash value of the entire data record, concatenating the hash value of the previous data block and the hash value of the entire data record, and performing a hash operation on the concatenated string.
By the above-mentioned data block generation method, at a centralized database service provider, without node consensus, each data block is determined by a hash value, and the hash value of a data block is determined by the content and sequence of data records in the data block and the hash value of the previous data block.
Under a minimum verification granularity, each data record has a corresponding hash value, a user can initiate verification based on the hash values of the data records or the data blocks at any time, and modification of any content in the data blocks (including content or sequence of the data records in the data blocks) can cause inconsistency between the hash value of the data blocks calculated during verification and the hash value generated during data block generation, so that verification failure is caused, and centralized non-tampering is realized.
The technical solutions provided by the embodiments of the present description are described in detail below with reference to the accompanying drawings. As shown in fig. 2, fig. 2 is a schematic flowchart of a data attribute identification method in a block chain type ledger provided by an embodiment of this specification, which is applied to a block chain type ledger provided by a centralized database server, where a data block in the block chain type ledger includes a block for storing a data record, and the process specifically includes the following steps:
s201, receiving an operation instruction for the data block or the data record, and determining the type of the operation instruction.
In the class blockchain ledger, the operation instruction can be from one or more authorized users, and can also be from the database server. The operation instructions may include various types, such as add, clear, hide, verify, query, and so forth. The database server side can always determine the data records needing to be operated through the operation instructions.
The following briefly provides several specific forms of operational instructions, and their respective implementations.
Add instruction, APPEND (v, & khush): and the user adds the data record 'v' into the account book, and the centralized server returns the hash value 'khash' of the data record to the user.
Validation instruction, VERIFY ('khash', & v): the user inputs the hash value "khash", performs verification on the data block or data record determined by the hash value, and returns a verification result "& v". And the verification mode is that the Mercker tree is constructed according to the data records in the data block to obtain the root hash of the Mercker tree, a hash value is calculated according to the root hash and the hash value of the father data block, and whether the hash value is consistent with the hash value of the data block or not is compared.
Clear instruction, PURGE (lgid, blkbound): the user specifies the book identifier 'lgid' and the block height 'blkbound', and the server determines that the data blocks before the block height are all the data blocks needing to be cleared based on the block height, and then clears the data blocks determined to need to be cleared. And generating a pseudo-initial data block, wherein the hash value of the pseudo-initial data block is equal to the hash value of the determined last data block needing to be cleared, so that errors can be avoided when verification is carried out later. Purged data actually remains on the database server for a window of time (e.g., 72 hours), but has been formally removed from the account.
A hide instruction, OCCULT (blkhight, txoff): the user specifies a data record defined by a block height "blkhight" and a specified offset "txoff", and replaces the data record with the concealment data that includes the transaction hash of the data record.
Query instruction, RETRIEVE (khush, & v): the user inputs a hash value 'khush' of a data record, and the block height of a data block where the data record corresponding to the hash value is located and the offset '& v' of the data record in the data block are inquired.
The above parts only give a few examples for the operation instruction simply, and in practical applications, the database service side may also give more executable operation instructions based on business needs, and add other parameters in the operation instructions to implement more complex database services, which does not constitute a limitation to the present application.
And S203, determining attribute flag characters according to the type of the operation instruction.
The mapping relation between the type of the operation instruction and the attribute mark characters can be established in advance and stored in an address which can be called by a database server at any time, so that the corresponding attribute mark characters can be given based on the type of the operation instruction.
For example, for a centralized database server, the AND token character "01" may be given based on the operation "Add", for the operation "clear", for the operation "02", for the operation "hide", for the operation "FF", and so on. The current state of the data record can thus be known by the attribute flag character, and what has been done recently for the data record can be known.
And S205, determining the data record required to be operated by the operation instruction and the storage position of the data record in the block.
The storage location refers to a storage space or a storage address for storing data records in the block of the data block. If M data records are written in a block-chained account book, the account book also has storage locations for the M data records, and the storage locations are used for storing the M data records respectively. The storage location of a data record refers to the block height of the data block in which the data record is located, and the order number of the data record in the data block. For example, the block height of the data block containing data record a is 5, and data record a is the 10 th data record in the data block. Therefore, the storage location corresponding to data record a may be (5, 10).
It should be noted that, in this embodiment, the attribute flag character does not participate in the hash value calculation of the data record or the block. The database service provider may omit the attribute flag character when computing the hash of the data record.
And S207, splicing the attribute mark characters to the head of the data record to generate the marked data record.
In one embodiment, the data record may be a data record that is newly written to the data block, and the attribute flag character corresponding to the data record is: the attribute flag character corresponding to "write" indicates that the data record is a newly written data record, or the attribute flag character corresponding to "write" may be empty, so as to save space.
In another embodiment, the data records already have corresponding attribute flag characters. That is, stored in the data block is already a tagged data record, the header of which is used to store the attribute tag character. At this time, the head of the data record can be omitted, and the content of the data record can be directly read for splicing the attribute mark characters corresponding to the operation.
Fig. 3 is a schematic diagram of a process for constructing a tagged data record provided by an embodiment of the present description. In any case, when the user operates the data record, the corresponding attribute marker characters and the data record are obtained first, and the attribute marker characters are spliced to the head of the data record to generate the marked data record. At this time, the attribute flag character exists in the newly generated tagged data record in the form of a previous flag character.
And S209, storing the data record with the mark to the storage position in the block.
For the newly written data record, the data record with the mark may be directly stored in the data record allocated in the data block. For an existing data record, the marked data record may be replaced with the data record at the previously determined storage location.
In the block-chain stored book, each time a user performs a certain type of operation on a data record, an attribute mark character corresponding to an operation record is correspondingly given, and the attribute mark character is spliced to the head of the data record to form a new marked data record, and the new marked data record is written into a block of a data block. By the mode, the state of the data record can be flexibly marked, and the state of the data record in the data block can be conveniently counted.
In a specific embodiment, the marked data record may also be in the form of: front marker character (attribute marker character) + data record + rear marker character + remark information. The generation method comprises the following steps: splicing a preset front marker character to the head of a data record, splicing a preset rear marker character to the tail of the data record, and splicing remark information to the tail of the rear marker character; and then, determining the data formed by splicing the front marker character, the data record or the data record hash (generally, when a hiding instruction is received, the data record hash is used for replacing the data record plaintext, and other operation instructions are not changed), the rear marker character and the remark information as the marked data record.
The front marker characters and the rear marker characters can be specified according to actual needs. For example, the front marker may be "OE" and the back marker may be "OF".
It should be further noted that the remark information may specifically be information added to implement a specific service requirement. For example, the remark information may be "hidden" indicating that the data record has been suppressed. When a user queries a corresponding data record based on the hash value of the data record, the remark information may prompt that the data record is invisible.
In one embodiment, when a data record already has an attribute flag character as a preceding flag character, the attribute flag character at the head may be directly replaced if the data is operated upon again at this time. For example, a data record added by the user is stored in the form of: [01] the data record plaintext, wherein "01" is the attribute flag character corresponding to "add", and if the user performs a "clear" operation on the data block where the data record is located, the data record is also cleared at this time, and since the attribute flag character corresponding to "clear" is "02", the storage form of the data record in the block body at this time becomes: [02] [ data recording plaintext ] avoids the operation of regenerating replacement data, and only the corresponding attribute flag character needs to be replaced.
In other words, in this embodiment, the format of the data records in the block may be defined in advance, and the format of the data records for each day is: [ attribute flag character ] [ data record plaintext ]. That is, a data record contains a header for storing the attribute flag character and a trailer for storing the data record plaintext. The header does not participate in the calculation of the hash value of the data record, and each time the data record is operated, the attribute mark character is determined according to the operation type, and the header of the data record is written in an overwriting mode.
Correspondingly, an embodiment of the present specification further provides a data attribute identification device in a block chain type account book, as shown in fig. 4, fig. 4 is a schematic structural diagram of the data attribute identification device in the block chain type account book provided in the embodiment of the present specification, and the data attribute identification device includes:
an instruction receiving module 401, configured to receive an operation instruction for a data block or a data record, and determine a type of the operation instruction;
a character determining module 403, which determines attribute flag characters according to the type of the operation instruction;
the data record determining module 405 determines the data record required to be operated by the operation instruction and the storage position of the data record in the block;
the splicing module 407 splices the attribute mark characters to the head of the data record to generate a marked data record;
a storage module 409 for storing the marked data record to the storage location in the block;
the data block comprises at least one data record except for the initial data block, each data block comprises a hash value of a previous data block and a hash value of a data block determined by the data record contained in the data block, and the block height of the data block is monotonically increased based on the sequence of the blocking time.
Further, the apparatus further includes a data block generating module 411, which receives data records to be stored, and determines hash values of the data records; when a preset blocking condition is reached, determining each data record to be written into the data block, and generating an nth data block containing the hash value of the data block and the data record, specifically comprising: when N =1, the hash value and the block height of the initial data block are given based on a preset mode; and when N is greater than 1, determining the hash value of the Nth data block according to each data record to be written into the data block and the hash value of the (N-1) th data block, and generating the Nth data block comprising the hash value of the Nth data block and each data record.
Further, the splicing module 407 splices a preset post-marker character to the tail of the data record, and splices remark information to the tail of the post-marker character; and determining the data formed by splicing the attribute mark characters, the data records, the rear mark characters and the remark information as the marked data records.
Further, when the data record required to be operated by the operation instruction is a marked data record, the apparatus further includes a writing module 413, which determines the header of the marked data record, writes the attribute mark character into the header of the marked data record, and stores the attribute mark character.
Embodiments of the present specification further provide a computer device, which at least includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the data attribute identification method shown in fig. 2 when executing the program.
Fig. 5 is a schematic diagram illustrating a more specific hardware structure of a computing device according to an embodiment of the present disclosure, where the computing device may include: a processor 1010, a memory 1020, an input/output interface 1030, a communication interface 1040, and a bus 1050. Wherein the processor 1010, memory 1020, input/output interface 1030, and communication interface 1040 are communicatively coupled to each other within the device via a bus 1050.
The processor 1010 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present disclosure.
The Memory 1020 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, or the like. The memory 1020 may store an operating system and other application programs, and when the technical solutions provided by the embodiments of the present specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and called by the processor 1010 for execution.
The input/output interface 1030 is used for connecting an input/output module to input and output information. The i/o module may be configured as a component within the device (not shown) or may be external to the device to provide corresponding functionality. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, an indicator light, etc.
The communication interface 1040 is used for connecting a communication module (not shown in the drawings) to implement communication interaction between the present apparatus and other apparatuses. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, bluetooth and the like).
The bus 1050 includes a path to transfer information between various components of the device, such as the processor 1010, memory 1020, input/output interface 1030, and communication interface 1040.
It should be noted that although the above-mentioned device only shows the processor 1010, the memory 1020, the input/output interface 1030, the communication interface 1040 and the bus 1050, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures.
Embodiments of the present specification also provide a computer-readable storage medium on which a computer program is stored, where the computer program is executed by a processor to implement the data attribute identification method shown in fig. 2.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
From the above description of the embodiments, it is clear to those skilled in the art that the embodiments of the present disclosure can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the embodiments of the present specification may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments of the present specification.
The systems, methods, modules or units described in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the method embodiment, since it is substantially similar to the method embodiment, it is relatively simple to describe, and reference may be made to the partial description of the method embodiment for relevant points. The above-described method embodiments are merely illustrative, and the modules described as separate components may or may not be physically separate, and the functions of the modules may be implemented in one or more software and/or hardware when implementing the embodiments of the present disclosure. And part or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
The foregoing is only a specific embodiment of the embodiments of the present disclosure, and it should be noted that, for those skilled in the art, a plurality of modifications and decorations can be made without departing from the principle of the embodiments of the present disclosure, and these modifications and decorations should also be regarded as the protection scope of the embodiments of the present disclosure.

Claims (9)

1. A data attribute identification method in a block chain type account book is applied to the block chain type account book provided by a centralized database server side, wherein data blocks in the block chain type account book comprise blocks for storing data records, and the method comprises the following steps:
receiving an operation instruction for a data block or a data record, and determining the type of the operation instruction;
determining attribute marking characters according to the type of the operation instruction;
determining the data record required to be operated by the operation instruction and the storage position of the data record in the block body;
splicing the attribute mark characters to the head of the data record to generate a marked data record;
storing the tagged data record to the storage location in the block;
the data processing method comprises the steps that the data blocks of the data blocks are divided into at least two data blocks, wherein except for the initial data block, the block body of each data block comprises at least one data record, each data block comprises the hash value of the previous data block and the hash value of the data block determined by the data record contained in the data block, and the block height of the data block is monotonically increased based on the sequence of the blocking time.
2. The method of claim 1, wherein the data block is pre-generated by a database service provider in a centralized scenario based on:
receiving data records to be stored, and determining hash values of the data records;
when a preset blocking condition is reached, determining each data record to be written into the data block, and generating an nth data block containing the hash value of the data block and the data record, specifically comprising:
when N =1, the hash value and the block height of the initial data block are given based on a preset mode;
and when N is greater than 1, determining the hash value of the Nth data block according to each data record to be written into the data block and the hash value of the (N-1) th data block, and generating the Nth data block comprising the hash value of the Nth data block and each data record.
3. The method of claim 1, stitching the attribute marker character to a header of the data record, generating a marked data record, comprising:
splicing preset rear mark characters to the tail parts of the data records, and splicing remark information to the tail parts of the rear mark characters;
and determining the data spliced by the attribute mark characters, the data records, the rear mark characters and the remark information as the marked data records.
4. The method of claim 1, when the data record required for the operation instruction to perform the operation is a marked data record, the method further comprising:
determining a header of the tagged data record;
and writing the attribute mark character into the head of the marked data record and storing.
5. A data attribute identification device in a block chain type account book is applied to the block chain type account book provided by a centralized database server side, wherein a data block in the block chain type account book comprises a block body for storing data records, and the device comprises:
the instruction receiving module is used for receiving an operation instruction for the data block or the data record and determining the type of the operation instruction;
the character determining module is used for determining attribute marking characters according to the type of the operation instruction;
the data record determining module is used for determining the data record required to be operated by the operation instruction and the storage position of the data record in the block body;
the splicing module splices the attribute mark characters to the head of the data record to generate the marked data record;
a storage module for storing the marked data record to the storage location in the block;
each data block comprises at least one data record except for the initial data block, each data block comprises a hash value of a previous data block and a hash value of a data block determined by the data record contained in the data block, and the block height of the data block is monotonically increased based on the sequence of the blocking time.
6. The apparatus of claim 5, further comprising a data block generation module that receives data records to be stored, determines a hash value for each data record; when a preset blocking condition is reached, determining each data record to be written into the data block, and generating an nth data block including the hash value of the data block and the data record, specifically including: when N =1, the hash value and the block height of the initial data block are given based on a preset mode; and when N is greater than 1, determining the hash value of the Nth data block according to each data record to be written into the data block and the hash value of the (N-1) th data block, and generating the Nth data block comprising the hash value of the Nth data block and each data record.
7. The apparatus according to claim 5, wherein the splicing module splices a preset post-marker character to the tail of the data record, and splices remark information to the tail of the post-marker character; and determining the data spliced by the attribute mark characters, the data records, the rear mark characters and the remark information as the marked data records.
8. The apparatus of claim 5, further comprising a write module that determines a header of the tagged data record when the data record required to be operated on by the operation instruction is the tagged data record; and writing the attribute mark character into the head of the marked data record and storing.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of claims 1 to 4 when executing the 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 CN110059088A (en) 2019-07-26
CN110059088B true 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)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112307010B (en) * 2019-07-29 2024-04-16 创新先进技术有限公司 Data storage method, device and equipment
CN112307011A (en) * 2019-07-29 2021-02-02 创新先进技术有限公司 Data storage method, device and equipment
CN112039893B (en) * 2020-08-31 2023-04-18 成都质数斯达克科技有限公司 Private transaction processing method and device, electronic equipment and readable storage medium

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

Also Published As

Publication number Publication date
CN110059088A (en) 2019-07-26

Similar Documents

Publication Publication Date Title
CN109902086B (en) Index creation method, device and equipment
CN110188096B (en) Index creating method, device and equipment for data record
CN110008743B (en) Data attribute identification method, device and equipment in block chain type account book
CN109902071B (en) Service log storage method, system, device and equipment
CN109951290B (en) Time service authentication method, device and equipment for chain type account book
CN110162662B (en) Verification method, device and equipment for data records in block chain type account book
CN110162526B (en) Method, device and equipment for inquiring data records in block chain type account book
CN111444196B (en) Method, device and equipment for generating Hash of global state in block chain type account book
CN110022315B (en) Weight management method, device and equipment in block chain type account book
CN111352935B (en) Index creating method, device and equipment in block chain type account book
CN110059088B (en) Data attribute identification method, device and equipment in block chain type account book
CN110349019B (en) Verification method, device and equipment in block chain type account book
CN110825737A (en) Index creation and data query method, device and equipment
CN110347679B (en) Data storage method, device and equipment based on receipt
CN110837502B (en) Data storage method, device and equipment in block chain type account book
CN111444192B (en) Method, device and equipment for generating Hash of global state in block chain type account book
CN110061843B (en) Block height creating method, device and equipment in chain type account book
CN110879687B (en) Data reading method, device and equipment based on disk storage
CN110716965A (en) Query method, device and equipment in block chain type account book
CN110059087B (en) Data attribute identification method, device and equipment in block chain type account book
CN110750533A (en) Data storage method, device and equipment based on multiple service attributes
CN110727679A (en) Cooperative tracking method, system, device and equipment for court case
CN110362570B (en) Data storage method, device and equipment
CN111444194B (en) Method, device and equipment for clearing indexes in block chain type account book
CN111444197B (en) Verification method, device and equipment for data records in block chain type account book

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