CN111488616A - Method and device for realizing preplan machine of service data block chain - Google Patents

Method and device for realizing preplan machine of service data block chain Download PDF

Info

Publication number
CN111488616A
CN111488616A CN202010277751.3A CN202010277751A CN111488616A CN 111488616 A CN111488616 A CN 111488616A CN 202010277751 A CN202010277751 A CN 202010277751A CN 111488616 A CN111488616 A CN 111488616A
Authority
CN
China
Prior art keywords
data
verified
user
block chain
block
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.)
Pending
Application number
CN202010277751.3A
Other languages
Chinese (zh)
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.)
Beijing Ruice Technology Co Ltd
Original Assignee
Beijing Ruice Technology 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 Beijing Ruice Technology Co Ltd filed Critical Beijing Ruice Technology Co Ltd
Priority to CN202010277751.3A priority Critical patent/CN111488616A/en
Publication of CN111488616A publication Critical patent/CN111488616A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • 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/2246Trees, e.g. B+trees
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6227Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database where protection concerns the structure of data, e.g. records, types, queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Abstract

The application discloses a method and a device for realizing a prediction machine of a service data block chain, wherein a service data block chain system comprises a plurality of block chain nodes, and the method comprises the following steps: the block chain link point receives data to be verified sent by other block chain nodes, and the data to be verified is verified; the block chain link point calls an Oracle prediction machine to check the data to be verified; after the data to be verified passes the verification, packaging the data to be verified into a block to be verified; and sending the block to be verified to other block chain nodes for verification so as to facilitate uplink after the block to be verified completes the consensus verification. The function of the prediction machine is realized on the service data block chain, the trusted data source of the service data block chain is increased, data can be conveniently checked, the mode that a user uses the block chain is increased, and user experience is improved.

Description

Method and device for realizing preplan machine of service data block chain
Technical Field
The invention relates to the technical field of internet big data, and discloses a method and a device for realizing a prediction machine of a service data block chain.
Background
Currently, the blockchain technology is a distributed stored ledger that uses technologies such as encryption algorithm and consensus mechanism. With the use of blockchain technology, more and more internet data is stored on the blockchain.
In the existing block chain, only transaction data can be stored, wherein the transaction data comprises a transfer party address, a receiving party address and a transfer amount; but various business data (e.g., internet-related data such as evidence-storing data, traceability data, financial data, travel data, search data, self-media data, research data, advertisement data, e-commerce data, community data, knowledge question and answer data, knowledge payment data, shared bicycle data, recruitment data, living service data, renting data, voting data, OTO data (also referred to as online-to-offline data), social data, praise data, evaluation data, and network appointment data) may be linked up.
In addition, after the business data is uplinked, how to realize the function of the Oracle ora.
The foregoing description is merely for convenience in understanding and is not to be construed as limiting the prior art to the present application.
Disclosure of Invention
Based on the above problems, the application discloses a method and a device for implementing a prediction machine of a service data block chain, the method implements the function of the prediction machine on the service data block chain, increases the trusted data source of the service data block chain, facilitates the data verification, further increases the mode of using the block chain by a user, and improves the user experience.
The first aspect of the present application discloses a method for implementing a prediction machine of a service data block chain, where a service data block chain system includes a plurality of block chain nodes, and the method includes:
the block chain link point receives data to be verified sent by other block chain nodes, and the data to be verified is verified;
the block chain link point calls an Oracle prediction machine to check the data to be verified;
after the data to be verified passes the verification, packaging the data to be verified into a block to be verified;
and sending the block to be verified to other block chain nodes for verification so as to facilitate uplink after the block to be verified completes the consensus verification.
In a possible embodiment, the verifying the data to be verified by invoking an Oracle ora:
the data to be verified is data outside the chain, and the Oracle prediction machine queries target data outside the chain corresponding to the data outside the chain through a trusted data source outside the chain;
the block link point compares whether the target data outside the chain is consistent with the data outside the chain, and judges whether the data outside the chain to be verified passes the verification according to the comparison result; and if the comparison result is consistent, the data outside the chain to be verified passes verification.
In a possible embodiment, the verifying the data to be verified by invoking an Oracle ora:
the data to be verified is on-chain user operation data, and the Oracle prediction machine queries target user operation data corresponding to the user operation data through locally stored on-chain user operation data; the user operation data is the operation of the user on the service data;
the block chain node compares whether the target user operation data is consistent with the user operation data or not, and judges whether the user operation data to be verified passes the verification or not according to the comparison result; and if the comparison result is consistent, the operation data of the user to be verified is verified to be passed.
In a possible implementation manner, after the block link point passes the verification of the data to be verified, the data to be verified is packed into a block to be verified; the method specifically comprises the following steps:
the block chain link point checks the data to be verified with other multiple block chain link points, when a preset checking condition is met, the data to be verified is determined to pass the checking, and the data to be verified passing the checking is packaged into a block to be verified; wherein the content of the first and second substances,
the preset checking condition comprises any one of the following conditions:
the number of the block chain links passing the check accounts for more than half of the total number of the block chain links;
the number of the block chain links passing the check accounts for more than two thirds of the total number of the block chain links.
In a possible embodiment, the block chain node sends the block to be verified to other block chain nodes for verification, so that the block to be verified performs uplink after the consensus verification is completed; the method specifically comprises the following steps:
checking the verification result of the data to be verified stored in the local tree structure of other block link points, wherein the tree structure is an MPT tree;
judging whether the block to be verified passes verification or not according to the verification result of the data to be verified; if the verification result of the data to be verified is that the verification is passed, judging that the block to be verified passes the verification;
when a preset condition is met, determining that the block to be verified passes verification, and chaining the block to be verified; the preset condition comprises that more than half of the block chain nodes in other block chain nodes judge that the block to be verified passes verification or more than two thirds of the block chain nodes in other block chain nodes judge that the block to be verified passes verification.
In one possible implementation, the off-link data is lottery data on the internet, and the data to be verified comprises current lottery drawing result data won by the first user;
the Oracle predicting machine inquires the current target lottery winning result through an official lottery website;
the block chain node compares the target lottery winning result with the current lottery drawing result in the data to be verified, and verifies the data to be verified according to the comparison result; and if the comparison result is consistent, the data to be verified is verified to be passed.
In a possible implementation manner, the user operation data is comment data of a commodity purchased on the internet, and the data to be verified includes comment data of a second user on a first commodity;
the Oracle Oracle ora;
the block chain node compares the target comment data of the second user on the first commodity with the comment data of the second user on the first commodity in the data to be verified, and verifies the data to be verified according to the comparison result; and if the comparison result is consistent, the data to be verified is verified to be passed.
In a possible embodiment, the block link point stores the data state after the user operates the service by using a tree structure, where the tree structure includes a state tree and a relationship tree; wherein the content of the first and second substances,
the state tree stores one or more of user data, entity data and integral data, and stores the data state of a user after the user operates the service;
the relation tree stores one or more of user data-integral data, user data-message data, user data-entity data, user data-user operation data, entity data-integral data and entity data-user data, and stores the relation between data states after a user operates a service.
In one possible embodiment, any one of user data, entity data, point data, user data-message data, user data-entity data, user data-user operation data, entity data-point data and entity data-user data is stored in the database supporting attribute query in the form of a data table, so that a user can query according to attribute fields in the data table; the data processing method comprises the following steps that one kind of data corresponds to one data table, any line in any one data table corresponds to one piece of data, and one kind of data comprises multiple lines of data; the database supporting attribute query comprises a relational database and a memory database; or
Any one of user data, entity data, integral data, user data-message data, user data-entity data, user data-user operation data, entity data-integral data and entity data-user data is stored in a KV database in a key value pair mode.
In one possible embodiment, the digital account of the user includes one or more of user data, entity data, point data, user data-entity data, user data-user operations, and user data-message data;
after the message data in the user data-message data respond to the viewing operation of the user, the relation tree stores the tree root of a relation subtree, and the value of a leaf node in the relation subtree stores a point viewing reward or an entity viewing reward; wherein the message data comprises a point view reward or an entity view reward; or
And storing the point viewing reward or the entity viewing reward by the value of the leaf node of the relational tree in an array or a hash table mode.
A second aspect of the present application discloses a prediction machine implementation apparatus for a service data block chain, where a service data block chain system includes a plurality of block chain nodes, and the apparatus is a block chain node; wherein the content of the first and second substances,
the block chain link point receives data to be verified sent by other block chain nodes, and the data to be verified is verified;
the block chain link point calls an Oracle prediction machine to check the data to be verified;
after the data to be verified passes the verification, packaging the data to be verified into a block to be verified;
and sending the block to be verified to other block chain nodes for verification so as to facilitate uplink after the block to be verified completes the consensus verification.
A third aspect of the present application provides a computer-readable storage medium, which stores computer instructions, and when the computer instructions are executed by a processor, the computer instructions implement any one of the above-mentioned technical solutions.
A fourth aspect of the present application provides an electronic device, which includes a processor configured to execute any one of the above technical solutions.
The function of the prediction machine is realized on the service data block chain, the trusted data source of the service data block chain is increased, data can be conveniently checked, the mode that a user uses the block chain is increased, and user experience is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flow chart of a method for implementing a prediction machine of a service data block chain according to the present application;
fig. 2 is a schematic block head structure diagram of a service data block chain according to the present application;
fig. 3 is a schematic structural diagram of a prophetic implementation device of a service data block chain disclosed in the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first" and "second" in this application are used for convenience of understanding only, and are not to be construed as sequential or limiting in any way.
For the purpose of facilitating understanding of the embodiments of the present invention, the following description will be further explained with reference to specific embodiments, which are not to be construed as limiting the embodiments of the present invention.
Blockchains are generally divided into three types: public chain (Public Blockchain), private chain (PrivateBlockchain) and alliance 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. The most decentralized of these is the public chain. The public chain is represented by bitcoin and ether house, and the participators joining the public chain can read the data record on the chain, participate in transaction, compete for accounting right of new blocks, and the like.
Furthermore, each participant (i.e., node) is free to join and leave the network and perform related operations. Private chains are the opposite, with the network's write rights controlled by an organization or organization and the data read rights specified by the organization. Briefly, a private chain can be a weakly centralized system with strictly limited and few participating nodes. This type of blockchain is more suitable for use within a particular establishment.
Based on the basic characteristics of a blockchain, a blockchain is usually composed of several blocks. The time stamps corresponding to the creation time of the block are recorded in the blocks respectively, and all the blocks form a time-ordered data chain according to the time stamps recorded in the blocks strictly.
The real data generated by the physical world can be constructed into a standard transaction (transaction) format supported by a block chain, then is issued to the block chain, is identified by node equipment in the block chain, and is packed into a block by the node equipment serving as an accounting node in the block chain after the identification is achieved, and is subjected to persistent evidence storage in the block chain.
In the field of blockchain, an important concept is Account (Account); taking an ether house as an example, the ether house generally divides an account into an external account and a contract account; the external account is an account directly controlled by the user; and the contract account is created by the user through an external account, the account containing the contract code (i.e. the smart contract).
Of course, for some blockchain items derived based on the ethernet framework, the account types supported by the blockchain may be further expanded, and are not particularly limited in this specification.
For accounts in a blockchain, the account status of the account is usually maintained through a structure. When a transaction in a block is executed, the status of the account associated with the transaction in the block chain is also typically changed.
Taking etherhouses as an example, the structure of an account usually includes fields such as Balance, Nonce, Code, and storage. Wherein:
a Balance field for maintaining the current account Balance of the account;
a Nonce field for the number of transactions for the account; the counter is used for guaranteeing that each transaction can be processed only once, and replay attack is effectively avoided.
A code field for maintaining a contract code for the account; in practical applications, only the hash value of the contract code is typically maintained in the code field; thus, the code field is also commonly referred to as a codehash field. For external accounts, this field is null.
storage field to maintain the storage of the account (default to empty). In practical application, the storage field only maintains the root node of an MPT (Merkle Patricia Trie) tree constructed based on the storage content of the account; thus, the storage field is also commonly referred to as the storageRoot field.
Wherein, for the external account, the code field and storage field shown above are null values.
Most blockchain items typically use Merkle trees; alternatively, the data is stored and maintained based on the data structure of the Merkle tree. Taking etherhouses as an example, the etherhouses use MPT tree (a Merkle tree variation) as a data organization form for organizing and managing important data such as account status, transaction information, and the like.
The Etherhouse designs three MPT trees, namely an MPT state tree, an MPT transaction tree and an MPT receipt tree, aiming at data needing to be stored and maintained in a block chain.
The MPT state tree is an MPT tree organized by account state data (state) of all accounts in the block chain; the MPT transaction tree is transaction data (transaction) in a block and is organized into the MPT tree; the MPT receipt tree is an MPT tree organized by transaction receipts (receipts) corresponding to each transaction generated after the transaction in the block is completed. The hash values of the root nodes of the MPT state tree, MPT transaction tree, and MPT receipt tree shown above are all added to the block header.
Wherein the MPT transaction tree and the MPT receipt tree correspond to tiles, each tile having its own MPT transaction tree and MPT receipt tree. The MPT state tree is a global MPT tree, which does not correspond to a specific tile, but covers account state data of all accounts in the tile chain.
The following describes a storage structure of a service data block chain in the present application.
The present specification discloses a method for implementing a prediction machine of a service data block chain, which is applied to a service data block chain system, as shown in fig. 1, where the service data block chain system includes a plurality of block chain nodes; the method includes S101-S104.
The entity information in the present specification refers to abstraction of objective objects and also refers to specific objective objects, the entity information includes associated attributes and non-associated attributes, and the associated attributes refer to that attribute values can be increased or decreased; the user information refers to description information of a user, and the user information comprises a user address; the point information is point information issued by the user, and is point information other than the original points on the block chain, and the point information includes the name and the total amount of the point.
S101, the block chain link points receive data to be verified sent by other block chain nodes, and the data to be verified are verified.
And S102, the block link points call an Oracle prediction machine to verify the data to be verified.
In one example, the verifying the to-be-verified data by calling an Oracle:
the data to be verified is data outside the chain, and the Oracle prediction machine queries target data outside the chain corresponding to the data outside the chain through a trusted data source outside the chain;
the block link point compares whether the target data outside the chain is consistent with the data outside the chain, and judges whether the data outside the chain to be verified passes the verification according to the comparison result; and if the comparison result is consistent, the data outside the chain to be verified passes verification.
In one example, the off-link data is lottery data on the internet, and the data to be verified comprises current lottery drawing result data won by the first user;
the Oracle predicting machine inquires the current target lottery winning result through an official lottery website;
the block chain node compares the target lottery winning result with the current lottery drawing result in the data to be verified, and verifies the data to be verified according to the comparison result; and if the comparison result is consistent, the data to be verified is verified to be passed.
In one example, the verifying the to-be-verified data by calling an Oracle:
the data to be verified is on-chain user operation data, and the Oracle prediction machine queries target user operation data corresponding to the user operation data through locally stored on-chain user operation data; the user operation data is the operation of the user on the service data;
the block chain node compares whether the target user operation data is consistent with the user operation data or not, and judges whether the user operation data to be verified passes the verification or not according to the comparison result; and if the comparison result is consistent, the operation data of the user to be verified is verified to be passed.
At this time, the corresponding block chain node calls the locally stored user operation data of the decentralized client.
In one example, the user operation data is comment data of a commodity purchased on the internet, and the data to be verified comprises comment data of a second user on a first commodity;
the Oracle Oracle ora;
the block chain node compares the target comment data of the second user on the first commodity with the comment data of the second user on the first commodity in the data to be verified, and verifies the data to be verified according to the comparison result; and if the comparison result is consistent, the data to be verified is verified to be passed.
S103, after the data to be verified is checked, packaging the data to be verified into a block to be verified.
In one example, after the block link point passes the verification of the data to be verified, packaging the data to be verified into a block to be verified; the method specifically comprises the following steps:
the block chain link point checks the data to be verified with other multiple block chain link points, when a preset checking condition is met, the data to be verified is determined to pass the checking, and the data to be verified passing the checking is packaged into a block to be verified; wherein the content of the first and second substances,
the preset checking condition comprises any one of the following conditions:
the number of the block chain links passing the check accounts for more than half of the total number of the block chain links;
the number of the block chain links passing the check accounts for more than two thirds of the total number of the block chain links.
And S104, sending the block to be verified to other block chain nodes for verification so as to facilitate uplink after the block to be verified completes the consensus verification.
In one example, the block chain node sends the block to be verified to other block chain nodes for verification, so that the block to be verified performs uplink after the consensus verification is completed; the method specifically comprises the following steps:
checking the verification result of the data to be verified stored in the local tree structure of other block link points, wherein the tree structure is an MPT tree;
judging whether the block to be verified passes verification or not according to the verification result of the data to be verified; if the verification result of the data to be verified is that the verification is passed, judging that the block to be verified passes the verification;
when a preset condition is met, determining that the block to be verified passes verification, and chaining the block to be verified; the preset condition comprises that more than half of the block chain nodes in other block chain nodes judge that the block to be verified passes verification or more than two thirds of the block chain nodes in other block chain nodes judge that the block to be verified passes verification.
In one example, the block chain node stores the data state after the user operates the service by adopting a tree structure, wherein the tree structure comprises a state tree and a relation tree; wherein the content of the first and second substances,
the state tree stores one or more of user data, entity data and integral data, and stores the data state of a user after the user operates the service;
the relation tree stores one or more of user data-integral data, user data-message data, user data-entity data, user data-user operation data, entity data-integral data and entity data-user data, and stores the relation between data states after a user operates a service.
In one example, any one of user data, entity data, point data, user data-message data, user data-entity data, user data-user operation data, entity data-point data and entity data-user data is stored in the database supporting attribute query in the form of a data table, so that a user can query according to attribute fields in the data table; the data processing method comprises the following steps that one kind of data corresponds to one data table, any line in any one data table corresponds to one piece of data, and one kind of data comprises multiple lines of data; the database supporting attribute query comprises a relational database and a memory database; or
Any one of user data, entity data, integral data, user data-message data, user data-entity data, user data-user operation data, entity data-integral data and entity data-user data is stored in a KV database in a key value pair mode.
In one example, the digital account of the user includes one or more of user data, entity data, point data, user data-entity data, user data-user operations, and user data-message data;
after the message data in the user data-message data respond to the viewing operation of the user, the relation tree stores the tree root of a relation subtree, and the value of a leaf node in the relation subtree stores a point viewing reward or an entity viewing reward; wherein the message data comprises a point view reward or an entity view reward; or
And storing the point viewing reward or the entity viewing reward by the value of the leaf node of the relational tree in an array or a hash table mode.
The user data-entity data comprises the operation of different entities (such as the operation of business data of commodities, self-media messages, questionnaires, online appointment cars, search results and the like) performed by the same user, and reflects the entity operation condition of the same user; user data-user operations include associations between the same user and a plurality of user operations (user operations such as purchasing commodities, collecting self-media, replying questionnaires, reserving online car appointments, and the like) of the same user, wherein the user operations include entity or point operations, and the user operations reflect the conditions of the same user for carrying out the operations; the user data-message data includes that the user A receives the messages sent by the other user B, and the messages can be advertisement messages or commodity preferential messages. The digital account of the user comprehensively reflects the operation condition of the user on the blockchain, so that the user can inquire the condition of the account at any time, and the experience of the user in using the blockchain is greatly improved.
In one example, the tree structure is also referred to as a link correlation database, and the user data, the entity data, and the point data are also referred to as user information, entity information, and point information. The incidence relation stored in the correlation coefficient database on the chain comprises the incidence relation of entity information and user information; wherein, one entity information corresponds to one or more user information.
For example: on an electronic commerce platform (such as Taobao, Tianmao and Jingdong shopping mall) of the Internet, a commodity is purchased by a plurality of different users; on a self-media platform (such as WeChat and microblog) on the Internet, one piece of self-media data is praised or commented by a plurality of users; the one-to-many relationship between such entities and users can be expressed by using the association relationship between the entity information and the user information. The method and the device facilitate chaining of the service data and query of the service data by the user.
In one example, the association stored in the on-chain association coefficient database includes an association of user information and point information; wherein one user information corresponds to one or more point information.
At this time, a user may have multiple points; for example: a user has both native credits on the blockchain and other types of credits. The incidence relation can describe the one-to-many relation between the user and the score, and meanwhile, the user can conveniently inquire. It should be noted that a user in the blockchain system at least has the native scores of the blockchain system; it is possible to have credits issued by other users or by themselves.
In one example, the association stored in the on-chain association coefficient database includes an association of entity information and point information; wherein one entity information corresponds to one or more integral information.
At this time, equivalently, on the block chain, the securitization of the entity is realized; for example: the ownership of a commodity corresponds to an integral, and the transfer of the integral corresponds to the transfer of the ownership of the commodity; the ownership of a set of houses corresponds to a predetermined number of points, the number of owned points corresponds to the ownership proportion of the houses, and namely, the houses are owned to sell or rent the prices in the same proportion.
As described above, any one of the user information (e.g., Account field), credit information (e.g., Asset field), entity information (e.g., Object field), entity information-user information (e.g., Object-Account field), user information-credit information (e.g., Account-Asset field), and entity information-credit information (e.g., Object-Asset field) may be implemented by using an MPT status tree, and the tree roots of various MPT status trees are stored in the block header. As shown in FIG. 2, the user Action of the tile store (e.g., the Action field), and the root of the MPT state tree of the Receipt information stored by the on-chain database (e.g., the Recept field) are also stored in the tile header.
It should be noted that the block in the blockchain system includes a block header and a block body, the block header stores summary information, and the block body stores transfer information (also called transaction information). In this specification, the user operation is stored in a block of the block, and a digest value (also referred to as a hash value) of the user operation is stored in a block header; the on-chain state database in this specification is also part of the storage of the blockchain system, and each blockchain node has the on-chain state database and the block to store the service data in this specification.
In one example, the on-chain database is a database supporting attribute query or a KV database, wherein the database supporting attribute query includes a relational database and an in-memory database.
In one example, the attribute types of the user information and/or the entity information include an associated attribute and a non-associated attribute; and the attribute value of the associated attribute is automatically increased or decreased according to the user operation data.
In one example, any one of the user information, the entity information, the point information, the entity information-user information, the user information-point information, and the entity information-point information is organized into an MPT state tree; the MPT state Tree is a merkel Tree Merkle variety of a Tree structure fused with a prefix Tree Trie, and the merkel Tree Merkle is a merkel Patricia Tree state Tree.
In one example, any one of the user information, the entity information, the point information, the user information-the point information, the entity information-the point information and the entity information-the user information is stored in the database supporting attribute query in the form of a data table, so that a user can query according to an attribute field in the data table; one kind of information corresponds to one data table, any line in any one data table corresponds to one piece of information, and one kind of information comprises a plurality of lines of information; the database supporting attribute query comprises a relational database and an in-memory database.
In one example, any one of the user information, the entity information, the point information, the user information-the point information, the entity information-the point information, and the entity information-the user information is stored in a KV database and stored in a key-value pair manner.
In one example, any one of the user information, the entity information, the point information, the entity information-user information, the user information-point information, and the entity information-point information is organized into an MPT state tree; wherein the root of any one of the MPT state trees is stored in the block header.
In one example, the value of a leaf node in the relationship tree stores one or more of user information-point information, entity information-point information, and entity information-user information in a hash table or array.
In one example, the value of a leaf node of the relationship tree is to store a tree root of a relationship sub-tree that stores one or more of user information-score information, entity information-score information, and entity information-user information, the relationship sub-tree being a merkel tree or an MPT tree.
In the above, the information is stored in the way of the MPT state tree, and the user can query through the address information; directly adopting a user address, a point address and an entity address message to inquire information aiming at user information, point information and entity information; and aiming at the entity information-user information, the user information-integral information and the entity information-integral information, respectively adopting an entity address, a user address and an entity address to carry out information inquiry.
In addition, the user address can be obtained by carrying out multiple times of hash operation according to the user public key; the point address or the entity address may be obtained by a user operation of creating a point or an entity, for example: and carrying out multiple times of hash operation on the user operation, and selecting characters with preset digits from the obtained hash value as integral addresses or entity addresses.
In one example, the on-chain database employs a database supporting attribute queries, wherein the on-chain database includes a relational database and an in-memory database. That is, any state information of user information, point information, entity information-user information, user information-point information, and entity information-point information is stored by using a database supporting attribute query, the relational database can be MySql, and the memory database can be MongoDB.
At this time, by using the database supporting attribute query, the user information, the point information, the entity information-user information, the user information-point information, and the entity information-point information can be queried by using corresponding attributes, and the query efficiency of attribute query is higher compared with the query by using an address on a block chain. Meanwhile, the MPT state tree root of the above information is stored in the chunk header, as shown in fig. 2. In actual use, if any of the MPT state trees is not used, the MPT state tree can be set to empty.
In the specification, any one of user information, point information, entity information-user information, user information-point information and entity information-point information is organized into a data structure of an MPT state tree, namely a data logic structure, the adopted storage structure can be a KV database, such as L evalDB database, and also can be a MySql and MongoDB database which support attribute query, and the databases are physical storage structures.
The present specification enables the business data to be uplink, and enables various association relationships of the business data to be uplink; the benefits of the business data uplink include, but are not limited to, true trustworthiness, traceability, personal attribution of data rights, etc.
In addition, various attributes of the service data can be stored on the block chain by storing user operation data in the blocks and storing state data and state associated data in the on-chain state database, so that the problem of chaining the service data is solved; in addition, the state data and the state associated data stored in the state database on the chain are convenient for the user to access.
The function of the prediction machine is realized on the service data block chain, the trusted data source of the service data block chain is increased, data can be conveniently checked, the mode that a user uses the block chain is increased, and user experience is improved.
The specification also discloses a prediction machine implementation device of the service data block chain, wherein the service data block chain system comprises a plurality of block chain nodes, and the device is a block chain node.
The block chain link point receives data to be verified sent by other block chain nodes, and the data to be verified is verified;
the block chain link point calls an Oracle prediction machine to check the data to be verified;
after the data to be verified passes the verification, packaging the data to be verified into a block to be verified;
and sending the block to be verified to other block chain nodes for verification so as to facilitate uplink after the block to be verified completes the consensus verification.
The function of the prediction machine is realized on the service data block chain, the trusted data source of the service data block chain is increased, data can be conveniently checked, the mode that a user uses the block chain is increased, and user experience is improved.
The same or similar parts in the above device embodiments and the above method embodiments can be referred to each other, and are not described herein again.
The present specification also discloses a computer readable storage medium storing computer instructions which, when executed by a processor, implement any one of the above-mentioned technical solutions.
The present specification also discloses an electronic device comprising a processor configured to perform any of the above-described technical solutions.
Meanwhile, the application also provides an embodiment of the entity device.
Blockchain node, fig. 3 shows a schematic structural diagram of a computer device, which may include: a processor 310, a memory 320, an input/output interface 330, a communication interface 340, and a bus 350. Wherein the processor 340, the memory 320, the input/output interface 330, and the communication interface 340 are communicatively coupled to each other within the device via a bus 350.
The processor 310 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 specification.
The Memory 320 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 320 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 320 and called to be executed by the processor 310.
The input/output interface 330 is used for connecting an input/output module to realize information input and output. The i/o module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. 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 340 is used for connecting a communication module (not shown in the figure) to implement communication interaction between the present device and other devices. 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).
Bus 350 includes a path that transfers information between the various components of the device, such as processor 310, memory 320, input/output interface 330, and communication interface 340.
It should be noted that although the above-mentioned device only shows the processor 310, the memory 320, the input/output interface 330, the communication interface 340 and the bus 350, 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.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied in hardware, a software module executed by a processor, or a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only illustrative of the present invention and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the scope of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for implementing a predictive engine for a service data blockchain, wherein a service data blockchain system comprises a plurality of blockchain nodes, the method comprising:
the block chain link point receives data to be verified sent by other block chain nodes, and the data to be verified is verified;
the block chain link point calls an Oracle prediction machine to check the data to be verified;
after the data to be verified passes the verification, packaging the data to be verified into a block to be verified;
and sending the block to be verified to other block chain nodes for verification so as to facilitate uplink after the block to be verified completes the consensus verification.
2. The prolog machine implementation method of claim 1, wherein the block chain node calls an Oracle prolog machine to check the data to be verified, and specifically comprises:
the data to be verified is data outside the chain, and the Oracle prediction machine queries target data outside the chain corresponding to the data outside the chain through a trusted data source outside the chain;
the block link point compares whether the target data outside the chain is consistent with the data outside the chain, and judges whether the data outside the chain to be verified passes the verification according to the comparison result; and if the comparison result is consistent, the data outside the chain to be verified passes verification.
3. The prolog machine implementation method of claim 1, wherein the block chain node calls an Oracle prolog machine to check the data to be verified, and specifically comprises:
the data to be verified is on-chain user operation data, and the Oracle prediction machine queries target user operation data corresponding to the user operation data through locally stored on-chain user operation data; the user operation data is the operation of the user on the service data;
the block chain node compares whether the target user operation data is consistent with the user operation data or not, and judges whether the user operation data to be verified passes the verification or not according to the comparison result; and if the comparison result is consistent, the operation data of the user to be verified is verified to be passed.
4. The prediction machine implementation method according to claim 1, wherein after the block link point passes the verification of the data to be verified, the data to be verified is packed into a block to be verified; the method specifically comprises the following steps:
the block chain link point checks the data to be verified with other multiple block chain link points, when a preset checking condition is met, the data to be verified is determined to pass the checking, and the data to be verified passing the checking is packaged into a block to be verified; wherein the content of the first and second substances,
the preset checking condition comprises any one of the following conditions:
the number of the block chain links passing the check accounts for more than half of the total number of the block chain links;
the number of the block chain links passing the check accounts for more than two thirds of the total number of the block chain links.
5. The method according to any of claims 1-3, wherein the blockchain node sends the block to be verified to other blockchain nodes for verification, so that the block to be verified performs uplink after the consensus verification is completed; the method specifically comprises the following steps:
checking the verification result of the data to be verified stored in the local tree structure of other block link points, wherein the tree structure is an MPT tree;
judging whether the block to be verified passes verification or not according to the verification result of the data to be verified; if the verification result of the data to be verified is that the verification is passed, judging that the block to be verified passes the verification;
when a preset condition is met, determining that the block to be verified passes verification, and chaining the block to be verified; the preset condition comprises that more than half of the block chain nodes in other block chain nodes judge that the block to be verified passes verification or more than two thirds of the block chain nodes in other block chain nodes judge that the block to be verified passes verification.
6. The method of claim 2, wherein the off-link data is lottery data on the internet, and the data to be verified includes current lottery drawing result data won by the first user;
the Oracle predicting machine inquires the current target lottery winning result through an official lottery website;
the block chain node compares the target lottery winning result with the current lottery drawing result in the data to be verified, and verifies the data to be verified according to the comparison result; and if the comparison result is consistent, the data to be verified is verified to be passed.
7. The language predictive machine implementation method according to claim 3, wherein the user operation data is comment data after purchase of a commodity on the internet, and the data to be verified includes comment data of a second user on a first commodity;
the Oracle Oracle ora;
the block chain node compares the target comment data of the second user on the first commodity with the comment data of the second user on the first commodity in the data to be verified, and verifies the data to be verified according to the comparison result; and if the comparison result is consistent, the data to be verified is verified to be passed.
8. The method according to claim 5, wherein the blockchain node stores the data state of the user after the operation on the service by using a tree structure, wherein the tree structure comprises a state tree and a relationship tree; wherein the content of the first and second substances,
the state tree stores one or more of user data, entity data and integral data, and stores the data state of a user after the user operates the service;
the relation tree stores one or more of user data-integral data, user data-message data, user data-entity data, user data-user operation data, entity data-integral data and entity data-user data, and stores the relation between data states after a user operates a service.
9. The propheter implementation method of claim 8, wherein any one of user data, entity data, point data, user data-message data, user data-entity data, user data-user operation data, entity data-point data, and entity data-user data is stored in the database supporting attribute query in the form of a data table, so that a user can query according to an attribute field in the data table; the data processing method comprises the following steps that one kind of data corresponds to one data table, any line in any one data table corresponds to one piece of data, and one kind of data comprises multiple lines of data; the database supporting attribute query comprises a relational database and a memory database; or
Any one of user data, entity data, integral data, user data-message data, user data-entity data, user data-user operation data, entity data-integral data and entity data-user data is stored in a KV database in a key value pair mode.
10. The preplan realization device of the service data block chain is characterized in that a service data block chain system comprises a plurality of block chain nodes, and the device is a block chain node; wherein the content of the first and second substances,
the block chain link point receives data to be verified sent by other block chain nodes, and the data to be verified is verified;
the block chain link point calls an Oracle prediction machine to check the data to be verified;
after the data to be verified passes the verification, packaging the data to be verified into a block to be verified;
and sending the block to be verified to other block chain nodes for verification so as to facilitate uplink after the block to be verified completes the consensus verification.
CN202010277751.3A 2020-04-08 2020-04-08 Method and device for realizing preplan machine of service data block chain Pending CN111488616A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010277751.3A CN111488616A (en) 2020-04-08 2020-04-08 Method and device for realizing preplan machine of service data block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010277751.3A CN111488616A (en) 2020-04-08 2020-04-08 Method and device for realizing preplan machine of service data block chain

Publications (1)

Publication Number Publication Date
CN111488616A true CN111488616A (en) 2020-08-04

Family

ID=71797873

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010277751.3A Pending CN111488616A (en) 2020-04-08 2020-04-08 Method and device for realizing preplan machine of service data block chain

Country Status (1)

Country Link
CN (1) CN111488616A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112383611A (en) * 2020-11-11 2021-02-19 上海保险交易所股份有限公司 File evidence storing method, system and server based on block chain
CN112711777A (en) * 2020-12-29 2021-04-27 杭州趣链科技有限公司 Chain linking method, chain linking device and node equipment
CN113065167A (en) * 2021-04-06 2021-07-02 北京瑞卓喜投科技发展有限公司 Method and device for updating downlink data authorization prediction machine and electronic equipment
CN113468276A (en) * 2021-09-06 2021-10-01 北京微芯感知科技有限公司 Trusted data acquisition method and device of on-chain prediction machine and electronic equipment
CN113472544A (en) * 2021-08-31 2021-10-01 北京微芯感知科技有限公司 Digital identity verification method and device, computer equipment and storage medium
CN113761078A (en) * 2021-01-12 2021-12-07 深圳市库链科技有限公司 Prediction machine based on block chain relational database and implementation method thereof
WO2022077846A1 (en) * 2020-10-15 2022-04-21 杭州云链趣链数字科技有限公司 Blockchain-based operation and maintenance method and system, computer device and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108171493A (en) * 2017-11-14 2018-06-15 北京欧链科技有限公司 The data processing method and device of block chain
CN109146146A (en) * 2018-07-27 2019-01-04 阿里巴巴集团控股有限公司 Event prediction method and device, electronic equipment
US20190081793A1 (en) * 2017-09-12 2019-03-14 Kadena, LLC Parallel-chain architecture for blockchain systems
CN109525441A (en) * 2018-12-24 2019-03-26 浙江超脑时空科技有限公司 A kind of outer data cochain method and apparatus of block chain network chain
US20190188399A1 (en) * 2017-12-20 2019-06-20 PencilData, Inc. Dynamically generated smart contracts
CN110493325A (en) * 2019-07-31 2019-11-22 阿里巴巴集团控股有限公司 Block chain state method of data synchronization and device, electronic equipment
CN110781192A (en) * 2019-10-30 2020-02-11 支付宝(杭州)信息技术有限公司 Verification method, device and equipment of block chain data
CN110928880A (en) * 2019-11-19 2020-03-27 腾讯科技(深圳)有限公司 Data processing method, device, terminal and medium based on block chain

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190081793A1 (en) * 2017-09-12 2019-03-14 Kadena, LLC Parallel-chain architecture for blockchain systems
CN108171493A (en) * 2017-11-14 2018-06-15 北京欧链科技有限公司 The data processing method and device of block chain
US20190188399A1 (en) * 2017-12-20 2019-06-20 PencilData, Inc. Dynamically generated smart contracts
CN109146146A (en) * 2018-07-27 2019-01-04 阿里巴巴集团控股有限公司 Event prediction method and device, electronic equipment
CN109525441A (en) * 2018-12-24 2019-03-26 浙江超脑时空科技有限公司 A kind of outer data cochain method and apparatus of block chain network chain
CN110493325A (en) * 2019-07-31 2019-11-22 阿里巴巴集团控股有限公司 Block chain state method of data synchronization and device, electronic equipment
CN110781192A (en) * 2019-10-30 2020-02-11 支付宝(杭州)信息技术有限公司 Verification method, device and equipment of block chain data
CN110928880A (en) * 2019-11-19 2020-03-27 腾讯科技(深圳)有限公司 Data processing method, device, terminal and medium based on block chain

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
李赫: "《区块链技术金融应用实践》", 30 September 2017, 北京航空航天大学出版社 *
邵奇峰 等: "区块链技术:架构及进展", 《计算机学报》 *
陈东敏: "《区块链技术原理及底层架构》", 31 May 2017, 北京航空航天大学出版社 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022077846A1 (en) * 2020-10-15 2022-04-21 杭州云链趣链数字科技有限公司 Blockchain-based operation and maintenance method and system, computer device and storage medium
CN112383611A (en) * 2020-11-11 2021-02-19 上海保险交易所股份有限公司 File evidence storing method, system and server based on block chain
CN112383611B (en) * 2020-11-11 2022-12-09 上海保险交易所股份有限公司 File evidence storing method and system based on block chain and server
CN112711777A (en) * 2020-12-29 2021-04-27 杭州趣链科技有限公司 Chain linking method, chain linking device and node equipment
CN113761078A (en) * 2021-01-12 2021-12-07 深圳市库链科技有限公司 Prediction machine based on block chain relational database and implementation method thereof
CN113065167A (en) * 2021-04-06 2021-07-02 北京瑞卓喜投科技发展有限公司 Method and device for updating downlink data authorization prediction machine and electronic equipment
CN113472544A (en) * 2021-08-31 2021-10-01 北京微芯感知科技有限公司 Digital identity verification method and device, computer equipment and storage medium
CN113468276A (en) * 2021-09-06 2021-10-01 北京微芯感知科技有限公司 Trusted data acquisition method and device of on-chain prediction machine and electronic equipment

Similar Documents

Publication Publication Date Title
US20210174440A1 (en) Providing virtual markers based upon network connectivity
CN111488616A (en) Method and device for realizing preplan machine of service data block chain
US20220245626A1 (en) Computer-implemented system and method for generating and extracting user related data stored on a blockchain
US20130173457A1 (en) Systems and methods for conducting more reliable financial transactions, credit decisions, and security assessments
CN111488615A (en) Cross-link realization method and device for service data block chain
US20190378162A1 (en) Systems and methods for enforcing advertising standards and digital advertisement measurements
US20210287303A9 (en) Scoring trustworthiness, competence, and/or compatibility of any entity for activities including recruiting or hiring decisions, composing a team, insurance underwriting, credit decisions, or shortening or improving sales cycles
US20230116362A1 (en) Scoring trustworthiness, competence, and/or compatibility of any entity for activities including recruiting or hiring decisions, composing a team, insurance underwriting, credit decisions, or shortening or improving sales cycles
Yoo et al. A study for efficiency improvement of used car trading based on a public blockchain
CN111488349A (en) Data query method and device based on service data block chain
CN111488353B (en) Intelligent contract implementation method and device for business data block chain
CN111488344A (en) User operation data uplink method and system based on service data block chain
CN111488343A (en) E-commerce data uplink method and device based on business data block chain
CN111488356A (en) Data storage method and device for service data block chain
CN111488352A (en) Point exchange method and device based on business data block chain
CN111488613A (en) Data efficient query method and device for service data block chain
CN111488345A (en) Storage optimization method and device for service data block chain
CN111737729A (en) Evaluation data storage method and system based on service data block chain
CN111695132A (en) Voting data storage method and system based on service data block chain
CN111476607A (en) Advertisement method and system based on business data block chain
CN111488609A (en) Service data block link-based order receiving method and device
CN111488359A (en) Relation data storage method and device of business data block chain
CN111488348A (en) Data storage method and device for service data block chain
CN111488357A (en) Method and device for realizing digital account of service data block chain
CN111488351A (en) Data operation method and device for service data block chain

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