Unlock instant, AI-driven research and patent intelligence for your innovation.

Method for writing data into blockchain based on blockchain smart contract

A smart contract and blockchain technology, applied in the blockchain field, can solve problems such as difficulty in application, slow process, and limited amount of data on the chain

Pending Publication Date: 2021-03-16
福州凌云数据科技有限公司
View PDF4 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] In the existing technology, some basic data is uploaded to the chain with each transaction through the transaction process of the blockchain. In this way, a transaction is performed every time a piece of data is uploaded to the chain, which makes the process very slow. The amount of data on the chain is very limited, and the type is still a fixed string
This chaining method is difficult to apply in many practical application scenarios, and because of data limitations, the use of the blockchain is quite simple, and various advanced features of the blockchain cannot be really used, such as decentralization.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for writing data into blockchain based on blockchain smart contract

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0018] The present invention will be described in further detail below in conjunction with the accompanying drawings.

[0019] refer to figure 1 , which is a data chaining method based on a blockchain smart contract disclosed by the present invention, comprising the following steps:

[0020] S1, when the data is saved, the smart contract will automatically write the data into the storage area of ​​the blockchain, and call the uuid algorithm to randomly generate a key value and return it;

[0021] S2, when calling the data query, the key value is passed in, at this time the smart contract can query the corresponding data according to the key value and return;

[0022] S3, save the key value in the upper application layer and the block height or block hash included in the smart contract call as the traceability field added to the block, and you can directly call the block chain browser to view the block information.

[0023] Among them, the smart contract includes a data stora...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to a method for writing data into blockchain based on a blockchain smart contract. The method comprises the following steps: S1, when calling data for storage, a smart contract automatically writes data into a storage area of a blockchain, and calls a uuid algorithm to randomly generate a key value for returning; S2, when data query is called, a key value is transmitted in, and at the moment, the smart contract can query corresponding data according to the key value and returns the data; and S3, the key value and the block height or block hash contained in the calling ofthe smart contract in the upper application layer are stored as the traceability field added by the block, and a block chain browser is called directly to check the block information. According to theinvention, the smart contract of the block chain is adopted to carry out data uploading operation, the smart contract is a code issued to the block chain in advance, and the code can be called by a miner so as to execute some characteristic operations. At a predefined interface of writing data into a block chain, the interface can be accessed at any time and data can be written into a chain.

Description

technical field [0001] The present invention relates to the technical field of block chains, in particular to a data uploading method based on block chain smart contracts. Background technique [0002] The rapid development of blockchain technology makes it possible for blockchain to be applied in all walks of life. In the actual application of blockchain, data is usually uploaded to the blockchain, and the characteristics of the blockchain are used to ensure data security. It cannot be tampered with, and this process is called data on-chain. [0003] In the existing technology, some basic data is uploaded to the chain with each transaction through the transaction process of the blockchain. In this way, a transaction is performed every time a piece of data is uploaded to the chain, which makes the process very slow. The amount of data on the chain is very limited, and the type is still a fixed string. This chaining method is difficult to apply in many practical application...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F16/2458G06F16/27G06Q20/38
CPCG06F16/2471G06F16/27G06Q20/3829G06Q20/3827
Inventor 林永枝向斌黄和嘉肖振超
Owner 福州凌云数据科技有限公司