WO2020238554A1 - 基于区块链的数据保存方法、装置和计算机设备 - Google Patents

基于区块链的数据保存方法、装置和计算机设备 Download PDF

Info

Publication number
WO2020238554A1
WO2020238554A1 PCT/CN2020/088011 CN2020088011W WO2020238554A1 WO 2020238554 A1 WO2020238554 A1 WO 2020238554A1 CN 2020088011 W CN2020088011 W CN 2020088011W WO 2020238554 A1 WO2020238554 A1 WO 2020238554A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
blockchain
template
preset
feedback information
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.)
Ceased
Application number
PCT/CN2020/088011
Other languages
English (en)
French (fr)
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.)
OneConnect Smart Technology Co Ltd
Original Assignee
OneConnect Smart 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 OneConnect Smart Technology Co Ltd filed Critical OneConnect Smart Technology Co Ltd
Publication of WO2020238554A1 publication Critical patent/WO2020238554A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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

Definitions

  • This application relates to the field of blockchain, and in particular to a method, device, computer equipment, and storage medium for data storage based on blockchain.
  • the main purpose of this application is to provide a blockchain-based data storage method, device, computer equipment and storage medium, which aims to solve the problems of poor data security and poor direct use of data.
  • this application proposes a blockchain-based data storage method applied to a data storage terminal, including:
  • Receiving a data saving instruction for designated data where the data saving instruction records the type of the designated data, and the data saving terminal is a blockchain node in a pre-built blockchain network;
  • the initial data is recorded into the blockchain network.
  • This application provides a block chain-based data storage device applied to a data storage terminal, including:
  • the data storage instruction receiving unit is used to receive a data storage instruction for specified data, wherein the data storage instruction records the type of the specified data, and the data storage terminal is a blockchain node in a pre-built blockchain network ;
  • An initial data template retrieval unit configured to retrieve an initial data template corresponding to the specified data type from a plurality of preset data templates
  • An initial data acquisition unit configured to fill the pre-prepared data into the initial data template to obtain initial data
  • An initial data sending unit configured to send the initial data to a blockchain node with audit authority
  • a data storage condition judging unit configured to receive feedback information of the blockchain node with audit authority, and judge whether the feedback information meets a preset data storage condition
  • the data storage unit is configured to record the initial data into the blockchain network if the feedback information meets a preset data storage condition.
  • the present application provides a computer device including a memory and a processor, the memory stores a computer program, and the processor implements the steps of any one of the above methods when the computer program is executed.
  • the present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above methods are implemented.
  • the blockchain-based data storage method, device, computer equipment, and storage medium of the present application solve the problems of poor data security and poor direct use of data.
  • FIG. 1 is a schematic flowchart of a data storage method based on blockchain according to an embodiment of the application
  • Fig. 2 is a schematic block diagram of the structure of a block chain-based data storage device according to an embodiment of the application;
  • FIG. 3 is a schematic block diagram of the structure of a computer device according to an embodiment of the application.
  • an embodiment of the present application provides a blockchain-based data storage method, applied to a data storage terminal, and includes:
  • S5. Receive feedback information of the blockchain node with audit authority, and determine whether the feedback information meets preset data storage conditions
  • a data storage instruction for designated data is received, wherein the data storage instruction records the type of the designated data, and the data storage terminal is a blockchain node in a pre-built blockchain network.
  • the data specified in this document can be any data, such as virtual currency transactions, production data, trade data, financial data, loan approval data, risk control data and other data.
  • the data storage instruction refers to an instruction instructing to record the specified data in the blockchain.
  • the pre-built blockchain network can be a public chain, a consortium chain or a private chain, and the consortium chain is preferred.
  • Blockchain nodes can include any terminals, such as computer terminals in various banks.
  • the consensus mechanism of the blockchain network can be any consensus mechanism, such as a workload proof mechanism, an equity proof mechanism, a designated consensus mechanism (DPOS), etc.
  • a consensus mechanism of share authorization proof is adopted.
  • the type of the specified data can be a type classified in any way, for example, risk control data, production data, trade data, etc., of course, it can also include any data type classified by different classification methods. Different types of designated data use different data formats.
  • the initial data template corresponding to the type of the specified data is retrieved from a plurality of preset data templates. Since different types of designated data use different data formats, by calling the initial data template corresponding to the type of the designated data from a plurality of preset data templates, the accurate data format can be obtained early, and the data formation rate can be improved. Speed, eliminating the need to form data from scratch. Further, the initial data template is composed of a data frame template and at least one data sub-template, so as to further utilize the characteristics of editable and groupable separated data to achieve higher efficiency and more accurate data generation.
  • the pre-prepared data is filled into the initial data template to obtain initial data. It can be seen from the foregoing that the initial data template is generated in a targeted manner. Therefore, the pre-prepared data matches the initial data template, and the pre-prepared data is filled into the initial data template to obtain the initial data.
  • the initial data is sent to a blockchain node with audit authority.
  • blockchain nodes with audit authority are also different. For example, when the consensus mechanism of share authorization certificate is adopted, the blockchain node with audit authority is the trusted blockchain node voted by all blockchain nodes. These blockchain nodes with audit authority audit the initial data, and then determine whether the initial data can be added to the blockchain network.
  • the feedback information of the blockchain node with audit authority is received, and it is judged whether the feedback information meets the preset data storage conditions.
  • the feedback information may be any form of information that can reflect whether the initial data is approved or not.
  • the feedback information includes approval or failure.
  • the process of judging whether the feedback information satisfies the preset data storage condition includes: judging whether the number of the reviewed feedback information is greater than a preset number threshold; if the number of the reviewed feedback information is greater than the preset number Threshold, it is determined that the feedback information meets the preset data storage conditions.
  • the preset number threshold is, for example, half of the number of blockchain nodes with audit authority plus one.
  • step S6 if the feedback information meets the preset data storage conditions, the initial data is recorded into the blockchain network. If the feedback information meets the preset data storage conditions, it indicates that the initial data is correct and it is allowed to join the blockchain. Accordingly, the initial data is recorded into the blockchain network.
  • the initial data template is composed of a data frame template and at least one data sub-template, and the step of invoking an initial data template corresponding to the type of the specified data from a plurality of preset data templates S2, including:
  • S201 Acquire multiple preset data frame templates and multiple data sub-templates according to the type of the specified data and the corresponding relationship between the preset data type and the template;
  • S202 Acquire a data frame template and a data sub-template selected by the data storage terminal, and combine the data frame template and the data sub-template selected by the data storage terminal to form the initial data template;
  • the initial data template used in this embodiment is composed of a data frame template and at least one data sub-template, so that data can be formed by combining preset templates, making data generation faster and capable of targeted generation Appropriate data.
  • the format, layout (frame) and other aspects of the data are different.
  • the frame template and sub-template (detail part template) are designed in advance.
  • the data sub-template is, for example, the mortgage sub-template (including fields related to the mortgage, including the mortgage name field, the valuation field, the mortgage history field, etc.).
  • the blockchain network includes designated blockchain nodes, and the step S3 of filling the pre-prepared data into the initial data template to obtain the initial data includes:
  • S301 Receive specific data sent from a designated blockchain node, where the specific data includes the identity information, educational experience, or information of whether the specific object belongs to the blacklist;
  • the pre-prepared data is filled into the initial data template to obtain the initial data.
  • This embodiment uses specific data sent from a designated blockchain node as the data, and will be added to the blockchain in the subsequent process, so as to use the data of the blockchain to be difficult to tamper with, to ensure that the specific data is true and effective, so that the specific data Related programs have real data to rely on.
  • the specific data includes the identity information, education experience, or blacklist information of the specific object, which can be called by processes such as specific operation approval.
  • Filling the specific data into the initial data template to obtain the initial data includes: extracting specific data sent from designated blockchain nodes to obtain data content corresponding to different fields; and filling the data content in In the corresponding fields of the initial data template, initial data is obtained.
  • the designated block chain node may be any block chain node, for example, a bank block chain node.
  • the specific data is, for example, risk control data.
  • the blockchain network adopts a designated consensus mechanism, the step of receiving feedback information from the blockchain node with audit authority, and determining whether the feedback information meets preset data storage conditions S5, including:
  • S501 Receive feedback information from multiple trusted blockchain nodes voted based on the designated consensus mechanism, where the trusted blockchain node has audit authority, and the feedback information includes audit passed or audit failed;
  • S502 Count the number of feedback information that has passed the audit, and determine whether the number of the feedback information that has passed the audit is greater than a preset number threshold;
  • the blockchain network in this embodiment adopts a consensus mechanism that specifies a consensus mechanism (such as a share authorization certification mechanism), thereby reducing the time required for review.
  • a consensus mechanism such as a share authorization certification mechanism
  • the share authorization proof mechanism is similar to the voting of the board of directors, that is, the blockchain nodes will vote to elect a certain number of nodes (trusted blockchain nodes), and the trusted blockchain nodes will act on behalf of all blockchain nodes. Verification and review work, which eliminates the need for verification and review of every blockchain node.
  • the feedback information includes approval or failure.
  • the specific number threshold can be set to, for example, half of the number of blockchain nodes with audit authority plus one.
  • the data storage instruction for the specified data is received, wherein the data storage instruction records the type of the specified data, and the data storage terminal is a blockchain node in a pre-built blockchain network Before step S1, include:
  • S02. Generate other blocks based on the genesis block, where the other blocks include the hash value of the previous block;
  • the designated languages include any feasible languages such as JAVA, C++, Python, etc.
  • Class is the basis for information encapsulation in object-oriented programming.
  • a class is a user-defined type, also called a type. Each class contains data descriptions and a set of functions for manipulating data or passing messages.
  • the blockchain class is the class describing the blockchain. Instantiating the blockchain class is to declare an object of the blockchain type, thereby obtaining the genesis block (the first block before the block), and the previous block in the genesis block The hash value of can be set to 0. Based on the genesis block, other blocks are generated, where the other blocks include the hash value of the previous block, thereby forming a multi-block blockchain.
  • the terminal that agrees to the preset consensus mechanism of the blockchain (the preset terminal) is used as the blockchain node, thereby establishing the blockchain network.
  • the consensus mechanism is, for example, a workload proof mechanism, a rights proof mechanism, a designated consensus mechanism, and the like. Accordingly, the blockchain network is established.
  • the method includes:
  • S64 Receive audit information of the modified data from the blockchain node with audit authority, and determine whether the audit information meets preset data storage conditions;
  • the modified data is realized.
  • the data of the designated data that has been added to the blockchain is difficult to tamper with, but there is an error when the data of the designated data is entered, so there is a need for modification.
  • the modified data is added to the blockchain network.
  • the preset data storage condition is, for example, that the number of approved blockchain nodes is greater than a preset threshold. Wherein, after the instruction data is successfully modified, the modified data will be marked as invalid as a reminder.
  • the method includes:
  • the specific data retrieved from the blockchain is more authentic and reliable than the specific data obtained by other technical means in the prior art, so the specific operation approval based on the specific data can avoid fraud caused by data tampering risk.
  • the specific data includes the identity information, educational experience, or blacklist information of the specific object, and the way to determine whether the specific data meets the preset specific operation approval criteria includes: determining whether the specific object’s identity information is consistent with the preset If the identity information is the same, determine whether the preset educational experience is the same as the educational experience of the specific object, and/or determine whether the specific object belongs to the blacklist.
  • the specific operation approval instruction is, for example, a loan approval instruction.
  • the blockchain-based data storage method of this application receives a data storage instruction for specified data; fills the pre-prepared data into the initial data template to obtain the initial data; and sends the initial data to the district with review authority Blockchain node; receiving feedback information of the blockchain node with audit authority; if the feedback information meets a preset data storage condition, then recording the initial data into the blockchain network. This solves the problem of poor data security and poor direct use of data.
  • an embodiment of the present application provides a blockchain-based data storage device, which is applied to a data storage terminal, and includes:
  • the data saving instruction receiving unit 10 is configured to receive a data saving instruction for designated data, wherein the data saving instruction records the type of the designated data, and the data saving terminal is a block chain in a pre-built block chain network node;
  • the initial data template retrieval unit 20 is configured to retrieve an initial data template corresponding to the specified data type from a plurality of preset data templates;
  • the initial data acquisition unit 30 is configured to fill the pre-prepared data into the initial data template to obtain initial data;
  • the initial data sending unit 40 is configured to send the initial data to a blockchain node with audit authority
  • the data storage condition judging unit 50 is configured to receive feedback information of the blockchain node with audit authority, and judge whether the feedback information meets the preset data storage condition;
  • the data storage unit 60 is configured to record the initial data into the blockchain network if the feedback information meets a preset data storage condition.
  • a data storage instruction for specified data is received, wherein the data storage instruction records the type of the specified data, and the data storage terminal is a blockchain node in a pre-built blockchain network.
  • the specified data in this document can be any data, such as virtual currency transactions, production data, trade data, financial data, specific operation approval data, specific data and other data.
  • the data storage instruction refers to an instruction instructing to record the specified data in the blockchain.
  • the pre-built blockchain network can be a public chain, a consortium chain or a private chain, and the consortium chain is preferred.
  • Blockchain nodes can include any terminals, such as computer terminals in various banks.
  • the consensus mechanism of the blockchain network can be any consensus mechanism, such as a workload proof mechanism, an equity proof mechanism, a designated consensus mechanism (DPOS), etc.
  • a consensus mechanism of share authorization proof is adopted.
  • the type of the specified data may be a type classified in any manner, such as specific data, production data, trade data, etc., of course, may also include data types classified in any different classification manner. Different types of designated data use different data formats.
  • an initial data template corresponding to the type of the specified data is retrieved from a plurality of preset data templates. Since different types of designated data use different data formats, by calling the initial data template corresponding to the type of the designated data from a plurality of preset data templates, the accurate data format can be obtained early, and the data formation rate can be improved. Speed, eliminating the need to form data from scratch. Further, the initial data template is composed of a data frame template and at least one data sub-template, so as to further utilize the characteristics of editable and groupable separated data to achieve higher efficiency and more accurate data generation.
  • the pre-prepared data is filled into the initial data template to obtain initial data. It can be seen from the foregoing that the initial data template is generated in a targeted manner. Therefore, the pre-prepared data matches the initial data template, and the pre-prepared data is filled into the initial data template to obtain the initial data.
  • the initial data is sent to a blockchain node with audit authority.
  • blockchain nodes with audit authority are also different. For example, when the consensus mechanism of share authorization certificate is adopted, the blockchain node with audit authority is the trusted blockchain node voted by all blockchain nodes. These blockchain nodes with audit authority audit the initial data, and then determine whether the initial data can be added to the blockchain network.
  • the feedback information of the blockchain node with audit authority is received, and it is determined whether the feedback information meets the preset data storage condition.
  • the feedback information may be any form of information that can reflect whether the initial data is approved or not.
  • the feedback information includes approval or failure.
  • the process of judging whether the feedback information satisfies the preset data storage condition includes: judging whether the number of the reviewed feedback information is greater than a preset number threshold; if the number of the reviewed feedback information is greater than the preset number Threshold, it is determined that the feedback information meets the preset data storage conditions.
  • the preset number threshold is, for example, half of the number of blockchain nodes with audit authority plus one.
  • the initial data is recorded into the blockchain network. If the feedback information meets the preset data storage conditions, it indicates that the initial data is correct and it is allowed to join the blockchain. Accordingly, the initial data is recorded into the blockchain network.
  • the initial data template is composed of a data frame template and at least one data sub-template
  • the initial data template retrieval unit 20 includes:
  • the data template obtaining subunit is configured to obtain multiple preset data frame templates and multiple data sub-templates according to the type of the specified data and the corresponding relationship between the preset data type and the template;
  • a data template combination subunit for obtaining the data frame template and the data sub-template selected by the data storage terminal, and combine the data frame template and the data sub-template selected by the data storage terminal into the initial data template;
  • the call subunit is used to call the initial data template.
  • the initial data template used in this embodiment is composed of a data frame template and at least one data sub-template, so that data can be formed by combining preset templates, making data generation faster and capable of targeted generation Appropriate data.
  • the format, layout (frame) and other aspects of the data are different.
  • the frame template and sub-template (detail part template) are designed in advance.
  • the data sub-template is, for example, the mortgage sub-template (including fields related to the mortgage, including the mortgage name field, the valuation field, the mortgage history field, etc.).
  • the blockchain network includes designated blockchain nodes
  • the initial data acquisition unit 30 includes:
  • the specific data receiving subunit is used to receive specific data sent from a designated blockchain node, where the specific data includes the identity information of the specific object, education experience, or information about whether it belongs to the blacklist;
  • the initial data acquisition subunit is used to fill the specific data into the initial data template to obtain initial data.
  • the pre-prepared data is filled into the initial data template to obtain the initial data.
  • This embodiment uses specific data sent from a designated blockchain node as the data, and will be added to the blockchain in the subsequent process, so as to use the data of the blockchain to be difficult to tamper with, to ensure that the specific data is true and effective, so that the specific data Related programs have real data to rely on.
  • the specific data includes the identity information, education experience, or blacklist information of the specific object, which can be called by processes such as specific operation approval.
  • Filling the specific data into the initial data template to obtain the initial data includes: extracting specific data sent from designated blockchain nodes to obtain data content corresponding to different fields; and filling the data content in In the corresponding fields of the initial data template, initial data is obtained.
  • the designated block chain node may be any block chain node, for example, a bank block chain node.
  • the blockchain network adopts a designated consensus mechanism
  • the data storage condition judgment unit 50 includes:
  • the feedback information receiving subunit is used to receive feedback information of multiple trusted blockchain nodes voted based on the designated consensus mechanism, wherein the trusted blockchain node has audit authority, and the feedback information includes approval Or the review failed;
  • the feedback information statistics subunit is used to count the number of approved feedback information, and determine whether the number of approved feedback information is greater than a preset number threshold;
  • the data saving condition determination subunit is configured to determine that the feedback information meets the preset data saving condition if the number of the feedback information passed through the review is greater than the preset number threshold.
  • the blockchain network in this embodiment adopts a consensus mechanism that specifies a consensus mechanism (such as a share authorization certification mechanism), thereby reducing the time required for review.
  • a consensus mechanism such as a share authorization certification mechanism
  • the share authorization proof mechanism is similar to the voting of the board of directors, that is, the blockchain nodes will vote to elect a certain number of nodes (trusted blockchain nodes), and the trusted blockchain nodes will act on behalf of all blockchain nodes. Verification and review work, which eliminates the need for verification and review of every blockchain node.
  • the feedback information includes approval or failure.
  • the specific number threshold can be set to, for example, half of the number of blockchain nodes with audit authority plus one.
  • the device includes:
  • the establishment of a genesis block unit is used to create a blockchain class in the data storage terminal in a designated language, and instantiate the blockchain class to establish a genesis block, wherein the genesis block will The hash value of the previous block is recorded as 0;
  • a block chain network unit is established, which is used to use a preset terminal as a block chain node to establish the block chain network.
  • the designated languages include any feasible languages such as JAVA, C++, Python, etc.
  • Class is the basis for information encapsulation in object-oriented programming.
  • a class is a user-defined type, also called a type. Each class contains data descriptions and a set of functions for manipulating data or passing messages.
  • the blockchain class is the class describing the blockchain. Instantiating the blockchain class is to declare an object of the blockchain type, thereby obtaining the genesis block (the first block before the block), and the previous block in the genesis block The hash value of can be set to 0. Based on the genesis block, other blocks are generated, where the other blocks include the hash value of the previous block, thereby forming a multi-block blockchain.
  • the terminal that agrees to the preset consensus mechanism of the blockchain (the preset terminal) is used as the blockchain node, thereby establishing the blockchain network.
  • the consensus mechanism is, for example, a workload proof mechanism, a rights proof mechanism, a designated consensus mechanism, and the like. Accordingly, the blockchain network is established.
  • the device includes:
  • a modification instruction receiving unit configured to receive a modification instruction to the designated data, wherein the modification instruction is accompanied by sub-data for replacement;
  • the replacement unit is configured to replace the sub-data to be modified in the designated data with the sub-data for replacement according to the modification instruction, and retain a modification record in the designated data, so as to obtain the modified data;
  • the modified data sending unit is configured to send the modified data to the blockchain node with audit authority
  • An audit information receiving unit configured to receive audit information of the modified data from the blockchain node with audit authority, and determine whether the audit information meets preset data storage conditions
  • the modified data adding unit is configured to add the modified data to the blockchain network if the audit information meets a preset data storage condition.
  • the modified data is realized.
  • the data of the designated data that has been added to the blockchain is difficult to tamper with, but there is an error when the data of the designated data is entered, so there is a need for modification.
  • the modified data is added to the blockchain network.
  • the preset data storage condition is, for example, that the number of approved blockchain nodes is greater than a preset threshold. Wherein, after the instruction data is successfully modified, the modified data will be marked as invalid as a reminder.
  • the device includes:
  • a specific operation approval instruction receiving unit configured to receive a specific operation approval instruction based on the specific data
  • a specific operation approval standard judging unit configured to retrieve the specific data from the blockchain and determine whether the specific data meets the preset specific operation approval standards
  • the execution specific operation unit is configured to execute a specific operation if the specific data meets the preset specific operation approval standard.
  • the specific data retrieved from the blockchain is more authentic and reliable than the specific data obtained by other technical means in the prior art, so the specific operation approval based on the specific data can avoid fraud caused by data tampering risk.
  • the specific data includes the identity information, educational experience, or blacklist information of the specific object, and the way to determine whether the specific data meets the preset specific operation approval criteria includes: determining whether the specific object’s identity information is consistent with the preset If the identity information is the same, determine whether the preset educational experience is the same as the educational experience of the specific object, and/or determine whether the specific object belongs to the blacklist.
  • the specific operation approval instruction is, for example, a loan approval instruction.
  • the blockchain-based data storage device of the present application receives a data storage instruction for designated data; fills the pre-prepared data into the initial data template to obtain the initial data; and sends the initial data to the district with review authority Blockchain node; receiving feedback information of the blockchain node with audit authority; if the feedback information meets a preset data storage condition, then recording the initial data into the blockchain network. This solves the problem of poor data security and poor direct use of data.
  • an embodiment of the present invention also provides a computer device.
  • the computer device may be a server, and its internal structure may be as shown in the figure.
  • the computer equipment includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the computer designed processor is used to provide calculation and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, a computer program, and a database.
  • the memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium.
  • the database of the computer equipment is used to store the data used in the blockchain-based data storage method.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the computer program is executed by the processor to realize a data storage method based on blockchain.
  • the processor executes the above-mentioned blockchain-based data storage method, applied to a data storage terminal, and includes: receiving a data storage instruction for specified data, wherein the data storage instruction records the type of the specified data, and the data storage terminal is A block chain node in the pre-built block chain network; call the initial data template corresponding to the specified data type from a plurality of preset data templates; fill the pre-prepared data into the initial data template In the data template, the initial data is obtained; the initial data is sent to the blockchain node with audit authority; the feedback information of the blockchain node with audit authority is received, and it is determined whether the feedback information meets the preset Data storage conditions; if the feedback information meets the preset data storage conditions, the initial data is recorded into the blockchain network.
  • the initial data template is composed of a data frame template and at least one data sub-template, and the step of invoking an initial data template corresponding to the type of the specified data from a plurality of preset data templates , Including: obtaining a plurality of preset data frame templates and a plurality of data sub-templates according to the type of the specified data and the corresponding relationship between the preset data type and the template; obtaining the data frame template selected by the data storage terminal And the data sub-template, and combine the data frame template and the data sub-template selected by the data storage terminal to form the initial data template; and retrieve the initial data template.
  • the blockchain network includes designated blockchain nodes, and the step of filling the pre-prepared data into the initial data template to obtain the initial data includes: receiving data from the designated blockchain The specific data sent by the node, where the specific data includes the identity information of the specific object, the educational experience, or the information about whether it belongs to the blacklist; the specific data is filled in the initial data template to obtain the initial data.
  • the blockchain network adopts a designated consensus mechanism, the step of receiving feedback information from the blockchain node with audit authority, and determining whether the feedback information meets preset data storage conditions , Including: receiving feedback information of multiple trusted blockchain nodes voted based on the designated consensus mechanism, wherein the trusted blockchain node has audit authority, and the feedback information includes audit passed or audit failed; Count the number of approved feedback information, and determine whether the number of approved feedback information is greater than the preset number threshold; if the number of approved feedback information is greater than the preset number threshold, determine that the feedback information satisfies Preset data storage conditions.
  • the data storage instruction for the specified data is received, wherein the data storage instruction records the type of the specified data
  • the data storage terminal is a blockchain node in a pre-built blockchain network
  • it includes: using a designated language to create a blockchain class in the data storage terminal, instantiating the blockchain class to establish a genesis block, wherein the genesis block will be the previous area
  • the hash value of the block is recorded as 0; based on the genesis block, other blocks are generated, where the other blocks include the hash value of the previous block; the preset terminal is used as the blockchain node to establish The blockchain network.
  • the step includes: receiving a modification instruction to the specified data , Wherein the modification instruction is accompanied by sub-data for replacement; according to the modification instruction, the sub-data to be modified in the designated data is replaced with the sub-data for replacement to obtain the modified data;
  • the data is sent to the blockchain node with audit authority; the audit information of the modified data from the blockchain node with audit authority is received, and it is determined whether the audit information meets the preset data storage conditions ; If the audit information meets the preset data storage conditions, the modified data is added to the blockchain network.
  • the step includes: receiving a specific operation based on the specific data Approval instructions; retrieve the specific data from the blockchain and determine whether the specific data meets the preset specific operation approval standards; if the specific data meets the preset specific operation approval standards, execute the specific operating.
  • the computer device of this application receives a data storage instruction for designated data; fills the pre-prepared data into the initial data template to obtain the initial data; sends the initial data to the blockchain node with audit authority; The feedback information of the blockchain node with audit authority; if the feedback information meets a preset data storage condition, the initial data is recorded into the blockchain network. This solves the problem of poor data security and poor direct use of data.
  • An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored.
  • a blockchain-based data storage method is implemented, which is applied to a data storage terminal and includes: The data storage instruction of the data, wherein the data storage instruction records the type of the specified data, the data storage terminal is a blockchain node in the pre-built blockchain network; it is called from multiple preset data templates Take the initial data template corresponding to the type of the specified data; fill the pre-prepared data into the initial data template to obtain the initial data; send the initial data to the blockchain node with audit authority; receive The feedback information of the blockchain node with audit authority, and determine whether the feedback information meets the preset data storage conditions; if the feedback information meets the preset data storage conditions, the initial data is recorded The blockchain network.
  • the computer-readable storage medium may be non-volatile or volatile.
  • the initial data template is composed of a data frame template and at least one data sub-template, and the step of invoking an initial data template corresponding to the type of the specified data from a plurality of preset data templates , Including: obtaining a plurality of preset data frame templates and a plurality of data sub-templates according to the type of the specified data and the corresponding relationship between the preset data type and the template; obtaining the data frame template selected by the data storage terminal And the data sub-template, and combine the data frame template and the data sub-template selected by the data storage terminal to form the initial data template; and retrieve the initial data template.
  • the blockchain network includes designated blockchain nodes, and the step of filling the pre-prepared data into the initial data template to obtain the initial data includes: receiving data from the designated blockchain The specific data sent by the node, where the specific data includes the identity information of the specific object, the educational experience, or the information about whether it belongs to the blacklist; the specific data is filled in the initial data template to obtain the initial data.
  • the blockchain network adopts a designated consensus mechanism, the step of receiving feedback information from the blockchain node with audit authority, and determining whether the feedback information meets preset data storage conditions , Including: receiving feedback information of multiple trusted blockchain nodes voted based on the designated consensus mechanism, wherein the trusted blockchain node has audit authority, and the feedback information includes audit passed or audit failed; Count the number of approved feedback information, and determine whether the number of approved feedback information is greater than the preset number threshold; if the number of approved feedback information is greater than the preset number threshold, determine that the feedback information satisfies Preset data storage conditions.
  • the data storage instruction for the specified data is received, wherein the data storage instruction records the type of the specified data, and the data storage terminal is a blockchain node in a pre-built blockchain network Before the step, it includes: creating a blockchain class in the data storage terminal in a designated language, instantiating the blockchain class to establish a genesis block, wherein the genesis block will be the previous area The hash value of the block is recorded as 0; based on the genesis block, other blocks are generated, where the other blocks include the hash value of the previous block; the preset terminal is used as the blockchain node to establish The blockchain network.
  • the step includes: receiving a modification instruction to the specified data , Wherein the modification instruction is accompanied by sub-data for replacement; according to the modification instruction, the sub-data to be modified in the designated data is replaced with the sub-data for replacement, so as to obtain the modified data; Send data to the blockchain node with audit authority; receive audit information of the modified data from the blockchain node with audit authority, and determine whether the audit information meets preset data storage conditions ; If the audit information meets the preset data storage conditions, the modified data is added to the blockchain network.
  • the step includes: receiving a specific operation based on the specific data Approval instructions; retrieve the specific data from the blockchain and determine whether the specific data meets the preset specific operation approval standards; if the specific data meets the preset specific operation approval standards, execute the specific operating.
  • the computer-readable storage medium of the present application receives data storage instructions for designated data; fills the pre-prepared data into the initial data template to obtain the initial data; sends the initial data to the blockchain node with audit authority ; Receive feedback information of the blockchain node with audit authority; if the feedback information meets a preset data storage condition, record the initial data into the blockchain network. This solves the problem of poor data security and poor direct use of data.
  • Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Storage Device Security (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请揭示了一种基于区块链的数据保存方法、装置、计算机设备和存储介质,所述方法包括:接收对指定数据的数据保存指令,其中所述数据保存指令记载了指定数据的类型,数据保存终端是预先搭建的区块链网络中的一个区块链节点;从预设的多个数据模板中调取与指定数据的类型对应的初始数据模板;将预先准备好的数据填入所述初始数据模板中,得到初始数据;将初始数据发送给具有审核权限的区块链节点;接收具有审核权限的区块链节点的反馈信息,并判断所述反馈信息是否满足预设的数据保存条件;若所述反馈信息满足预设的数据保存条件,则将所述初始数据记录入所述区块链网络。从而解决了数据安全性差、同时数据直接使用程度差的问题。

Description

基于区块链的数据保存方法、装置和计算机设备
本申请要求于2019年5月30日提交中国专利局、申请号为201910463894.0,发明名称为“基于区块链的数据保存方法、装置和计算机设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及区块链领域,特别是涉及到一种基于区块链的数据保存方法、装置、计算机设备和存储介质。
背景技术
当前的生产生活中,经常需要调用数据,可调用的数据是否真实,不可而知,调用的数据格式是否适用于当前环境,不可而知,从而出现数据可信度低、可用程度差(需要进行进一步转换格式等)等问题。发明人意识到,尤其在对数据真实性要求程度高的应用场景,例如贷款核批等场景中,现有技术一般是从数据库中调用相应数据,调用的数据仅以单一的形式呈现给调用方,不能适应不同的调用需求,同时数据库中的相应数据若被偷偷篡改,将导致调用方做出错误的结论。因此现有技术无法解决上述数据安全性差、同时数据直接使用程度差等问题。
技术问题
本申请的主要目的为提供一种基于区块链的数据保存方法、装置、计算机设备和存储介质,旨在解决了数据安全性差、同时数据直接使用程度差的问题。
技术解决方案
为了实现上述发明目的,本申请提出一种基于区块链的数据保存方法,应用于数据保存终端,包括:
接收对指定数据的数据保存指令,其中所述数据保存指令记载了指定数据的类型,所述数据保存终端是预先搭建的区块链网络中的一个区块链节点;
从预设的多个数据模板中调取与所述指定数据的类型对应的初始数据模板;
将预先准备好的数据填入所述初始数据模板中,得到初始数据;
将所述初始数据发送给具有审核权限的区块链节点;
接收所述具有审核权限的区块链节点的反馈信息,并判断所述反馈信息是否满足预设的数据保存条件;
若所述反馈信息满足预设的数据保存条件,则将所述初始数据记录入所述区块链网络。
本申请提供一种基于区块链的数据保存装置,应用于数据保存终端,包括:
数据保存指令接收单元,用于接收对指定数据的数据保存指令,其中所述数据保存指令记载了指定数据的类型,所述数据保存终端是预先搭建的区块链网络中的一个区块链节点;
初始数据模板调取单元,用于从预设的多个数据模板中调取与所述指定数据的类型对应的初始数据模板;
初始数据获取单元,用于将预先准备好的数据填入所述初始数据模板中,得到初始数据;
初始数据发送单元,用于将所述初始数据发送给具有审核权限的区块链节点;
数据保存条件判断单元,用于接收所述具有审核权限的区块链节点的反馈信息,并判断所述反馈信息是否满足预设的数据保存条件;
数据保存单元,用于若所述反馈信息满足预设的数据保存条件,则将所述初始数据记录入所述区块链网络。
本申请提供一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现上述任一项所述方法的步骤。
本申请提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述任一项所述的方法的步骤。
有益效果
本申请的基于区块链的数据保存方法、装置、计算机设备和存储介质,解决了数据安全性差、同时数据直接使用程度差的问题。
附图说明
图1 为本申请一实施例的基于区块链的数据保存方法的流程示意图;
图2 为本申请一实施例的基于区块链的数据保存装置的结构示意框图;
图3 为本申请一实施例的计算机设备的结构示意框图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
本发明的最佳实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
参照图1,本申请实施例提供一种基于区块链的数据保存方法,应用于数据保存终端,包括:
S1、接收对指定数据的数据保存指令,其中所述数据保存指令记载了指定数据的类型,所述数据保存终端是预先搭建的区块链网络中的一个区块链节点;
S2、从预设的多个数据模板中调取与所述指定数据的类型对应的初始数据模板;
S3、将预先准备好的数据填入所述初始数据模板中,得到初始数据;
S4、将所述初始数据发送给具有审核权限的区块链节点;
S5、接收所述具有审核权限的区块链节点的反馈信息,并判断所述反馈信息是否满足预设的数据保存条件;
S6、若所述反馈信息满足预设的数据保存条件,则将所述初始数据记录入所述区块链网络。
如上述步骤S1所述,接收对指定数据的数据保存指令,其中所述数据保存指令记载了指定数据的类型,所述数据保存终端是预先搭建的区块链网络中的一个区块链节点。本中指定数据可为任意数据,例如虚拟币交易、生产数据、贸易数据、金融数据、贷款审批数据、风控数据等数据。所述数据保存指令是指指示将所述指定数据记录在所述区块链中的指令。预先搭建的区块链网络可以是公有链、联盟链或者私有链,优选联盟链。区块链节点可包括任意终端,例如各银行中的计算机终端。所述区块链网络的共识机制可为任意共识机制,例如工作量证明机制、权益证明机制、指定共识机制(DPOS)等,优选采用股份授权证明的共识机制。其中,所述指定数据的类型可为任意方式分类的类型,例如为风控数据、生产数据、贸易数据等,当然,还可以包括任意不同分类方式分成的数据类型。不同类型的指定数据采用的数据格式不同。
如上述步骤S2所述,从预设的多个数据模板中调取与所述指定数据的类型对应的初始数据模板。由于不同类型的指定数据采用的数据格式不同,因此通过从预设的多个数据模板中调取与所述指定数据的类型对应的初始数据模板,可以及早获取准确的数据格式,提高形成数据的速度,免去了从零开始形成数据的步骤。进一步地,所述初始数据模板由数据框架模板和至少一个数据子模板构成,从而更进一步地利用可编辑可组的分离式数据的特性,达到更高效率生成更有准确的数据。
如上述步骤S3所述,将预先准备好的数据填入所述初始数据模板中,得到初始数据。由前述可知,初始数据模板是针对性生成的,因此预先准备好的数据是与初始数据模板相匹配的,将预先准备好的数据相应填入所述初始数据模板中,即可得到初始数据。
如上述步骤S4所述,将所述初始数据发送给具有审核权限的区块链节点。根据预先约定的不同,具有审核权限的区块链节点也不同。例如当采用股份授权证明的共识机制时,所述具有审核权限的区块链节点即为由所有区块链节点投选出的受托区块链节点。这些具有审核权限的区块链节点审核所述初始数据,进而决定所述初始数据能否加入所述区块链网络。
如上述步骤S5所述,接收所述具有审核权限的区块链节点的反馈信息,并判断所述反馈信息是否满足预设的数据保存条件。所述反馈信息可以是任意形式的能够反应初始数据是否审核通过的信息。例如,所述反馈信息包括审核通过或者审核未通过。判断所述反馈信息是否满足预设的数据保存条件的过程包括:判断所述审核通过的反馈信息的数量是否大于预设的数量阈值;若所述审核通过的反馈信息的数量大于预设的数量阈值,则判定反馈信息满足预设的数据保存条件。其中预设的数量阈值例如为所述具有审核权限的区块链节点数量的一半加一。
如上述步骤S6所述,若所述反馈信息满足预设的数据保存条件,则将所述初始数据记录入所述区块链网络。若所述反馈信息满足预设的数据保存条件,表明所述初始数据是正确的,是允许加入区块链的。据此,将所述初始数据记录入所述区块链网络。
在一个实施方式中,所述初始数据模板由数据框架模板和至少一个数据子模板构成,所述从预设的多个数据模板中调取与所述指定数据的类型对应的初始数据模板的步骤S2,包括:
S201、根据所述指定数据的类型,依据预设的数据类型与模板的对应关系,获取预设的多个数据框架模板与多个数据子模板;
S202、获取数据保存终端选择的数据框架模板与数据子模板,并将所述数据保存终端选择的数据框架模板与数据子模板组合成为所述初始数据模板;
S203、调取所述初始数据模板。
如上所述,实现了从预设的多个数据模板中调取与所述指定数据的类型对应的初始数据模板。本实施方式采用的所述初始数据模板由数据框架模板和至少一个数据子模板构成,从而使得数据可利用组合预设的模板的方式形成,使数据的生成更为快捷,并能针对性地生成适宜的数据。由于不同数据需要的具体要求不同,因此数据的格式、布局(框架)等各方面都不尽相同。通过将数据分解为框架和细节部分,再针对性地预先设计有框架模板与子模板(细节部分模板),当需要指定数据的模板时,只需从已有的框架模板与子模板中选择,再组合起来,即可形成所述初始数据模板。其中当指定数据为特定操作审批数据时,数据子模板例如为抵押物子模板(包括抵押物相关的字段,包括抵押物名称字段、估值字段、抵押历史字段等)。
在一个实施方式中,所述区块链网络包括指定区块链节点,所述将预先准备好的数据填入所述初始数据模板中,得到初始数据的步骤S3,包括:
S301、接收从指定区块链节点发送的特定数据,其中所述特定数据包括特定对象的身份信息、教育经历或者是否属于黑名单的信息;
S302、将所述特定数据填入所述初始数据模板中,得到初始数据。
如上所述,实现了将预先准备好的数据填入所述初始数据模板中,得到初始数据。本实施方式采用从指定区块链节点发送的特定数据作为数据,并将在后续流程中加入区块链中,从而利用区块链的数据难以篡改的特性,保证特定数据真实有效,以使特定相关的程序有真实的数据可依靠。其中所述特定数据包括特定对象的身份信息、教育经历或者是否属于黑名单的信息,可供特定操作审批等流程进行调用。将所述特定数据填入所述初始数据模板中,得到初始数据的方式包括:分别提取从指定区块链节点发送的特定数据,以得到不同字段对应的数据内容;将所述数据内容填入所述初始数据模板的相应字段中,得到初始数据。其中所述指定区块链节点可以为任意区块链节点,例如为银行区块链节点。其中所述特定数据例如为风控数据等。
在一个实施方式中,所述区块链网络采用指定共识机制,所述接收所述具有审核权限的区块链节点的反馈信息,并判断所述反馈信息是否满足预设的数据保存条件的步骤S5,包括:
S501、接收基于所述指定共识机制而投选出的多个受托区块链节点的反馈信息,其中所述受托区块链节点具有审核权限,所述反馈信息包括审核通过或者审核未通过;
S502、统计审核通过的反馈信息的数量,并判断所述审核通过的反馈信息的数量是否大于预设的数量阈值;
S503、若所述审核通过的反馈信息的数量大于预设的数量阈值,则判定反馈信息满足预设的数据保存条件。
如上所述,实现了接收所述具有审核权限的区块链节点的反馈信息,并判断所述反馈信息是否满足预设的数据保存条件。本实施方式中的区块链网络采用指定共识机制(例如股份授权证明机制)的共识机制,从而减少审核需要的时间。其中,股份授权证明机制类似于董事会投票,就是区块链节点会进行投票,从而投选出一部分数量的节点(受托区块链节点),所述受托区块链节点代理所有区块链节点进行验证审核工作,从而不需要每个区块链节点都进行验证审核。所述反馈信息包括审核通过或者审核未通过。通过统计审核通过的反馈信息的数量,并判断所述审核通过的反馈信息的数量是否大于预设的数量阈值,若所述审核通过的反馈信息的数量大于预设的数量阈值,则判定反馈信息满足预设的数据保存条件;若不大于预设的数量阈值,则判定反馈信息不满足预设的数据保存条件。具体的数量阈值例如可设为所述具有审核权限的区块链节点数量的一半加一。
在一个实施方式中,所述接收对指定数据的数据保存指令,其中所述数据保存指令记载了指定数据的类型,所述数据保存终端是预先搭建的区块链网络中的一个区块链节点的步骤S1之前,包括:
S01、采用指定语言在所述数据保存终端中创建区块链类,将所述区块链类实例化从而建立创世区块,其中所述创世区块中将前一区块的哈希值记为0;
S02、基于所述创世区块,生成其他区块,其中所述其他区块包括前一区块的哈希值;
S03、将预设终端作为区块链节点,从而建立所述区块链网络。
如上所述,实现了构建区块链网络。其中指定语言包括JAVA、C++、Python等任意可行语言。类(Class)是面向对象程序设计实现信息封装的基础。类是一种用户定义类型,也称类型。每个类包含数据说明和一组操作数据或传递消息的函数。所述区块链类即是描述区块链的类。将区块链类实例化,即是声明一个区块链类型的对象,从而获得了创世区块(没有区块前的第一个区块),其中创世区块中的前一区块的哈希值可设置为0。再基于所述创世区块,生成其他区块,其中所述其他区块包括前一区块的哈希值,从而构成了一条具有多区块的区块链。再将同意所述区块链的预设共识机制的终端(预设终端)作为区块链节点,从而建立所述区块链网络。其中,所述共识机制例如工作量证明机制、权益证明机制、指定共识机制等。据此,建立所述区块链网络。
在一个实施方式中,所述若所述反馈信息满足预设的数据保存条件,则将所述初始数据记录入所述区块链网络的步骤S6之后,包括:
S61、接收对所述指定数据的修改指令,其中所述修改指令附带有替换用子数据;
S62、根据所述修改指令,将所述指定数据中的待修改子数据替换为所述替换用子数据,并在所述指定数据中保留修改记录,从而得到修改后数据;
S63、将所述修改后数据发送给所述具有审核权限的区块链节点;
S64、接收所述具有审核权限的区块链节点的对所述修改后数据的审核信息,并判断所述审核信息是否满足预设的数据保存条件;
S65、若所述审核信息满足预设的数据保存条件,则将所述修改后数据加入所述区块链网络。
如上所述,实现了修改数据。已加入区块链的指定数据的数据难以篡改,但是当指定数据的数据在录入时存在错误,因此具有修改的需要。此时若要进行修改指定数据的数据,则应当经过具有审核权限的区块链节点进行审核,当所述具有审核权限的区块链节点的对所述修改后数据的审核信息满足预设的数据保存条件,则将所述修改后数据加入所述区块链网络。预设的数据保存条件例如为审核通过的区块链节点的数量大于预设的阈值。其中,对所述指令数据进行修改成功后,将对被修改的数据进行失效标记,以作提示。
在一个实施方式中,所述若所述反馈信息满足预设的数据保存条件,则将所述初始数据记录入所述区块链网络的步骤S6之后,包括:
S7、接收基于所述特定数据的特定操作审批指令;
S8、从所述区块链中调取所述特定数据,并判断所述特定数据是否符合预设的特定操作审批标准;
S9、若所述特定数据符合预设的特定操作审批标准,则执行特定操作。
如上所述,实现了执行特定操作。从所述区块链中调取的所述特定数据相较于现有技术的其他技术手段获取的特定数据要真实可靠,因此基于所述特定数据的特定操作审批可避免数据篡改而造成的欺诈风险。其中所述特定数据包括特定对象的身份信息、教育经历或者是否属于黑名单的信息,判断所述特定数据是否符合预设的特定操作审批标准的方式包括:判断特定对象的身份信息是否与预设的身份信息相同,判断预设的教育经历是否与特定对象的教育经历相同,和/或判断特定对象是否属于黑名单。从而利用了区块链网络中存储的特定数据,判断是否执行特定操作。其中所述特定操作审批指令例如为贷款审批指令等。
本申请的基于区块链的数据保存方法,接收对指定数据的数据保存指令;将预先准备好的数据填入初始数据模板中,得到初始数据;将所述初始数据发送给具有审核权限的区块链节点;接收所述具有审核权限的区块链节点的反馈信息;若所述反馈信息满足预设的数据保存条件,则将所述初始数据记录入所述区块链网络。从而解决了数据安全性差、同时数据直接使用程度差的问题。
参照图2,本申请实施例提供一种基于区块链的数据保存装置,应用于数据保存终端,包括:
数据保存指令接收单元10,用于接收对指定数据的数据保存指令,其中所述数据保存指令记载了指定数据的类型,所述数据保存终端是预先搭建的区块链网络中的一个区块链节点;
初始数据模板调取单元20,用于从预设的多个数据模板中调取与所述指定数据的类型对应的初始数据模板;
初始数据获取单元30,用于将预先准备好的数据填入所述初始数据模板中,得到初始数据;
初始数据发送单元40,用于将所述初始数据发送给具有审核权限的区块链节点;
数据保存条件判断单元50,用于接收所述具有审核权限的区块链节点的反馈信息,并判断所述反馈信息是否满足预设的数据保存条件;
数据保存单元60,用于若所述反馈信息满足预设的数据保存条件,则将所述初始数据记录入所述区块链网络。
如上述单元10所述,接收对指定数据的数据保存指令,其中所述数据保存指令记载了指定数据的类型,所述数据保存终端是预先搭建的区块链网络中的一个区块链节点。本中指定数据可为任意数据,例如虚拟币交易、生产数据、贸易数据、金融数据、特定操作审批数据、特定数据等数据。所述数据保存指令是指指示将所述指定数据记录在所述区块链中的指令。预先搭建的区块链网络可以是公有链、联盟链或者私有链,优选联盟链。区块链节点可包括任意终端,例如各银行中的计算机终端。所述区块链网络的共识机制可为任意共识机制,例如工作量证明机制、权益证明机制、指定共识机制(DPOS)等,优选采用股份授权证明的共识机制。其中,所述指定数据的类型可为任意方式分类的类型,例如为特定数据、生产数据、贸易数据等,当然,还可以包括任意不同分类方式分成的数据类型。不同类型的指定数据采用的数据格式不同。
如上述单元20所述,从预设的多个数据模板中调取与所述指定数据的类型对应的初始数据模板。由于不同类型的指定数据采用的数据格式不同,因此通过从预设的多个数据模板中调取与所述指定数据的类型对应的初始数据模板,可以及早获取准确的数据格式,提高形成数据的速度,免去了从零开始形成数据的步骤。进一步地,所述初始数据模板由数据框架模板和至少一个数据子模板构成,从而更进一步地利用可编辑可组的分离式数据的特性,达到更高效率生成更有准确的数据。
如上述单元30所述,将预先准备好的数据填入所述初始数据模板中,得到初始数据。由前述可知,初始数据模板是针对性生成的,因此预先准备好的数据是与初始数据模板相匹配的,将预先准备好的数据相应填入所述初始数据模板中,即可得到初始数据。
如上述单元40所述,将所述初始数据发送给具有审核权限的区块链节点。根据预先约定的不同,具有审核权限的区块链节点也不同。例如当采用股份授权证明的共识机制时,所述具有审核权限的区块链节点即为由所有区块链节点投选出的受托区块链节点。这些具有审核权限的区块链节点审核所述初始数据,进而决定所述初始数据能否加入所述区块链网络。
如上述单元50所述,接收所述具有审核权限的区块链节点的反馈信息,并判断所述反馈信息是否满足预设的数据保存条件。所述反馈信息可以是任意形式的能够反应初始数据是否审核通过的信息。例如,所述反馈信息包括审核通过或者审核未通过。判断所述反馈信息是否满足预设的数据保存条件的过程包括:判断所述审核通过的反馈信息的数量是否大于预设的数量阈值;若所述审核通过的反馈信息的数量大于预设的数量阈值,则判定反馈信息满足预设的数据保存条件。其中预设的数量阈值例如为所述具有审核权限的区块链节点数量的一半加一。
如上述单元60所述,若所述反馈信息满足预设的数据保存条件,则将所述初始数据记录入所述区块链网络。若所述反馈信息满足预设的数据保存条件,表明所述初始数据是正确的,是允许加入区块链的。据此,将所述初始数据记录入所述区块链网络。
在一个实施方式中,所述初始数据模板由数据框架模板和至少一个数据子模板构成,所述初始数据模板调取单元20,包括:
数据模板获取子单元,用于根据所述指定数据的类型,依据预设的数据类型与模板的对应关系,获取预设的多个数据框架模板与多个数据子模板;
数据模板组合子单元,用于获取数据保存终端选择的数据框架模板与数据子模板,并将所述数据保存终端选择的数据框架模板与数据子模板组合成为所述初始数据模板;
调取子单元,用于调取所述初始数据模板。
如上所述,实现了从预设的多个数据模板中调取与所述指定数据的类型对应的初始数据模板。本实施方式采用的所述初始数据模板由数据框架模板和至少一个数据子模板构成,从而使得数据可利用组合预设的模板的方式形成,使数据的生成更为快捷,并能针对性地生成适宜的数据。由于不同数据需要的具体要求不同,因此数据的格式、布局(框架)等各方面都不尽相同。通过将数据分解为框架和细节部分,再针对性地预先设计有框架模板与子模板(细节部分模板),当需要指定数据的模板时,只需从已有的框架模板与子模板中选择,再组合起来,即可形成所述初始数据模板。其中当指定数据为特定操作审批数据时,数据子模板例如为抵押物子模板(包括抵押物相关的字段,包括抵押物名称字段、估值字段、抵押历史字段等)。
在一个实施方式中,所述区块链网络包括指定区块链节点,所述初始数据获取单元30,包括:
特定数据接收子单元,用于接收从指定区块链节点发送的特定数据,其中所述特定数据包括特定对象的身份信息、教育经历或者是否属于黑名单的信息;
初始数据获取子单元,用于将所述特定数据填入所述初始数据模板中,得到初始数据。
如上所述,实现了将预先准备好的数据填入所述初始数据模板中,得到初始数据。本实施方式采用从指定区块链节点发送的特定数据作为数据,并将在后续流程中加入区块链中,从而利用区块链的数据难以篡改的特性,保证特定数据真实有效,以使特定相关的程序有真实的数据可依靠。其中所述特定数据包括特定对象的身份信息、教育经历或者是否属于黑名单的信息,可供特定操作审批等流程进行调用。将所述特定数据填入所述初始数据模板中,得到初始数据的方式包括:分别提取从指定区块链节点发送的特定数据,以得到不同字段对应的数据内容;将所述数据内容填入所述初始数据模板的相应字段中,得到初始数据。其中所述指定区块链节点可以为任意区块链节点,例如为银行区块链节点。
在一个实施方式中,所述区块链网络采用指定共识机制,所述数据保存条件判断单元50,包括:
反馈信息接收子单元,用于接收基于所述指定共识机制而投选出的多个受托区块链节点的反馈信息,其中所述受托区块链节点具有审核权限,所述反馈信息包括审核通过或者审核未通过;
反馈信息统计子单元,用于统计审核通过的反馈信息的数量,并判断所述审核通过的反馈信息的数量是否大于预设的数量阈值;
满足数据保存条件判定子单元,用于若所述审核通过的反馈信息的数量大于预设的数量阈值,则判定反馈信息满足预设的数据保存条件。
如上所述,实现了接收所述具有审核权限的区块链节点的反馈信息,并判断所述反馈信息是否满足预设的数据保存条件。本实施方式中的区块链网络采用指定共识机制(例如股份授权证明机制)的共识机制,从而减少审核需要的时间。其中,股份授权证明机制类似于董事会投票,就是区块链节点会进行投票,从而投选出一部分数量的节点(受托区块链节点),所述受托区块链节点代理所有区块链节点进行验证审核工作,从而不需要每个区块链节点都进行验证审核。所述反馈信息包括审核通过或者审核未通过。通过统计审核通过的反馈信息的数量,并判断所述审核通过的反馈信息的数量是否大于预设的数量阈值,若所述审核通过的反馈信息的数量大于预设的数量阈值,则判定反馈信息满足预设的数据保存条件;若不大于预设的数量阈值,则判定反馈信息不满足预设的数据保存条件。具体的数量阈值例如可设为所述具有审核权限的区块链节点数量的一半加一。
在一个实施方式中,所述装置,包括:
建立创世区块单元,用于采用指定语言在所述数据保存终端中创建区块链类,将所述区块链类实例化从而建立创世区块,其中所述创世区块中将前一区块的哈希值记为0;
生成其他区块单元,用于基于所述创世区块,生成其他区块,其中所述其他区块包括前一区块的哈希值;
建立区块链网络单元,用于将预设终端作为区块链节点,从而建立所述区块链网络。
如上所述,实现了构建区块链网络。其中指定语言包括JAVA、C++、Python等任意可行语言。类(Class)是面向对象程序设计实现信息封装的基础。类是一种用户定义类型,也称类型。每个类包含数据说明和一组操作数据或传递消息的函数。所述区块链类即是描述区块链的类。将区块链类实例化,即是声明一个区块链类型的对象,从而获得了创世区块(没有区块前的第一个区块),其中创世区块中的前一区块的哈希值可设置为0。再基于所述创世区块,生成其他区块,其中所述其他区块包括前一区块的哈希值,从而构成了一条具有多区块的区块链。再将同意所述区块链的预设共识机制的终端(预设终端)作为区块链节点,从而建立所述区块链网络。其中,所述共识机制例如工作量证明机制、权益证明机制、指定共识机制等。据此,建立所述区块链网络。
在一个实施方式中,所述装置,包括:
修改指令接收单元,用于接收对所述指定数据的修改指令,其中所述修改指令附带有替换用子数据;
替换单元,用于根据所述修改指令,将所述指定数据中的待修改子数据替换为所述替换用子数据,并在所述指定数据中保留修改记录,从而得到修改后数据;
修改后数据发送单元,用于将所述修改后数据发送给所述具有审核权限的区块链节点;
审核信息接收单元,用于接收所述具有审核权限的区块链节点的对所述修改后数据的审核信息,并判断所述审核信息是否满足预设的数据保存条件;
修改后数据加入单元,用于若所述审核信息满足预设的数据保存条件,则将所述修改后数据加入所述区块链网络。
如上所述,实现了修改数据。已加入区块链的指定数据的数据难以篡改,但是当指定数据的数据在录入时存在错误,因此具有修改的需要。此时若要进行修改指定数据的数据,则应当经过具有审核权限的区块链节点进行审核,当所述具有审核权限的区块链节点的对所述修改后数据的审核信息满足预设的数据保存条件,则将所述修改后数据加入所述区块链网络。预设的数据保存条件例如为审核通过的区块链节点的数量大于预设的阈值。其中,对所述指令数据进行修改成功后,将对被修改的数据进行失效标记,以作提示。
在一个实施方式中,所述装置,包括:
特定操作审批指令接收单元,用于接收基于所述特定数据的特定操作审批指令;
特定操作审批标准判断单元,用于从所述区块链中调取所述特定数据,并判断所述特定数据是否符合预设的特定操作审批标准;
执行特定操作单元,用于若所述特定数据符合预设的特定操作审批标准,则执行特定操作。
如上所述,实现了执行特定操作。从所述区块链中调取的所述特定数据相较于现有技术的其他技术手段获取的特定数据要真实可靠,因此基于所述特定数据的特定操作审批可避免数据篡改而造成的欺诈风险。其中所述特定数据包括特定对象的身份信息、教育经历或者是否属于黑名单的信息,判断所述特定数据是否符合预设的特定操作审批标准的方式包括:判断特定对象的身份信息是否与预设的身份信息相同,判断预设的教育经历是否与特定对象的教育经历相同,和/或判断特定对象是否属于黑名单。从而利用了区块链网络中存储的特定数据,判断是否执行特定操作。其中所述特定操作审批指令例如为贷款审批指令等。
本申请的基于区块链的数据保存装置,接收对指定数据的数据保存指令;将预先准备好的数据填入初始数据模板中,得到初始数据;将所述初始数据发送给具有审核权限的区块链节点;接收所述具有审核权限的区块链节点的反馈信息;若所述反馈信息满足预设的数据保存条件,则将所述初始数据记录入所述区块链网络。从而解决了数据安全性差、同时数据直接使用程度差的问题。
参照图3,本发明实施例中还提供一种计算机设备,该计算机设备可以是服务器,其内部结构可以如图所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设计的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储基于区块链的数据保存方法所用数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种基于区块链的数据保存方法。
上述处理器执行上述基于区块链的数据保存方法,应用于数据保存终端,包括:接收对指定数据的数据保存指令,其中所述数据保存指令记载了指定数据的类型,所述数据保存终端是预先搭建的区块链网络中的一个区块链节点;从预设的多个数据模板中调取与所述指定数据的类型对应的初始数据模板;将预先准备好的数据填入所述初始数据模板中,得到初始数据;将所述初始数据发送给具有审核权限的区块链节点;接收所述具有审核权限的区块链节点的反馈信息,并判断所述反馈信息是否满足预设的数据保存条件;若所述反馈信息满足预设的数据保存条件,则将所述初始数据记录入所述区块链网络。
在一个实施方式中,所述初始数据模板由数据框架模板和至少一个数据子模板构成,所述从预设的多个数据模板中调取与所述指定数据的类型对应的初始数据模板的步骤,包括:根据所述指定数据的类型,依据预设的数据类型与模板的对应关系,获取预设的多个数据框架模板与多个数据子模板;获取所述数据保存终端选择的数据框架模板与数据子模板,并将所述数据保存终端选择的数据框架模板与数据子模板组合成为所述初始数据模板;调取所述初始数据模板。
在一个实施方式中,所述区块链网络包括指定区块链节点,所述将预先准备好的数据填入所述初始数据模板中,得到初始数据的步骤,包括:接收从指定区块链节点发送的特定数据,其中所述特定数据包括特定对象的身份信息、教育经历或者是否属于黑名单的信息;将所述特定数据填入所述初始数据模板中,得到初始数据。
在一个实施方式中,所述区块链网络采用指定共识机制,所述接收所述具有审核权限的区块链节点的反馈信息,并判断所述反馈信息是否满足预设的数据保存条件的步骤,包括:接收基于所述指定共识机制而投选出的多个受托区块链节点的反馈信息,其中所述受托区块链节点具有审核权限,所述反馈信息包括审核通过或者审核未通过;统计审核通过的反馈信息的数量,并判断所述审核通过的反馈信息的数量是否大于预设的数量阈值;若所述审核通过的反馈信息的数量大于预设的数量阈值,则判定反馈信息满足预设的数据保存条件。
在一个实施方式中,所述接收对指定数据的数据保存指令,其中所述数据保存指令记载了指定数据的类型,所述数据保存终端是预先搭建的区块链网络中的一个区块链节点的步骤之前,包括:采用指定语言在所述数据保存终端中创建区块链类,将所述区块链类实例化从而建立创世区块,其中所述创世区块中将前一区块的哈希值记为0;基于所述创世区块,生成其他区块,其中所述其他区块包括前一区块的哈希值;将预设终端作为区块链节点,从而建立所述区块链网络。
在一个实施方式中,所述若所述反馈信息满足预设的数据保存条件,则将所述初始数据记录入所述区块链网络的步骤之后,包括:接收对所述指定数据的修改指令,其中所述修改指令附带有替换用子数据;根据所述修改指令,将所述指定数据中的待修改子数据替换为所述替换用子数据,从而得到修改后数据;将所述修改后数据发送给所述具有审核权限的区块链节点;接收所述具有审核权限的区块链节点的对所述修改后数据的审核信息,并判断所述审核信息是否满足预设的数据保存条件;若所述审核信息满足预设的数据保存条件,则将所述修改后数据加入所述区块链网络。
在一个实施方式中,所述若所述反馈信息满足预设的数据保存条件,则将所述初始数据记录入所述区块链网络的步骤之后,包括:接收基于所述特定数据的特定操作审批指令;从所述区块链中调取所述特定数据,并判断所述特定数据是否符合预设的特定操作审批标准;若所述特定数据符合预设的特定操作审批标准,则执行特定操作。
本领域技术人员可以理解,图中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定。
本申请的计算机设备,接收对指定数据的数据保存指令;将预先准备好的数据填入初始数据模板中,得到初始数据;将所述初始数据发送给具有审核权限的区块链节点;接收所述具有审核权限的区块链节点的反馈信息;若所述反馈信息满足预设的数据保存条件,则将所述初始数据记录入所述区块链网络。从而解决了数据安全性差、同时数据直接使用程度差的问题。
本申请一实施例还提供一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现基于区块链的数据保存方法,应用于数据保存终端,包括:接收对指定数据的数据保存指令,其中所述数据保存指令记载了指定数据的类型,所述数据保存终端是预先搭建的区块链网络中的一个区块链节点;从预设的多个数据模板中调取与所述指定数据的类型对应的初始数据模板;将预先准备好的数据填入所述初始数据模板中,得到初始数据;将所述初始数据发送给具有审核权限的区块链节点;接收所述具有审核权限的区块链节点的反馈信息,并判断所述反馈信息是否满足预设的数据保存条件;若所述反馈信息满足预设的数据保存条件,则将所述初始数据记录入所述区块链网络。该计算机可读存储介质可以是非易失性,也可以是易失性的。
在一个实施方式中,所述初始数据模板由数据框架模板和至少一个数据子模板构成,所述从预设的多个数据模板中调取与所述指定数据的类型对应的初始数据模板的步骤,包括:根据所述指定数据的类型,依据预设的数据类型与模板的对应关系,获取预设的多个数据框架模板与多个数据子模板;获取所述数据保存终端选择的数据框架模板与数据子模板,并将所述数据保存终端选择的数据框架模板与数据子模板组合成为所述初始数据模板;调取所述初始数据模板。
在一个实施方式中,所述区块链网络包括指定区块链节点,所述将预先准备好的数据填入所述初始数据模板中,得到初始数据的步骤,包括:接收从指定区块链节点发送的特定数据,其中所述特定数据包括特定对象的身份信息、教育经历或者是否属于黑名单的信息;将所述特定数据填入所述初始数据模板中,得到初始数据。
在一个实施方式中,所述区块链网络采用指定共识机制,所述接收所述具有审核权限的区块链节点的反馈信息,并判断所述反馈信息是否满足预设的数据保存条件的步骤,包括:接收基于所述指定共识机制而投选出的多个受托区块链节点的反馈信息,其中所述受托区块链节点具有审核权限,所述反馈信息包括审核通过或者审核未通过;统计审核通过的反馈信息的数量,并判断所述审核通过的反馈信息的数量是否大于预设的数量阈值;若所述审核通过的反馈信息的数量大于预设的数量阈值,则判定反馈信息满足预设的数据保存条件。
在一个实施方式中,所述接收对指定数据的数据保存指令,其中所述数据保存指令记载了指定数据的类型,所述数据保存终端是预先搭建的区块链网络中的一个区块链节点的步骤之前,包括:采用指定语言在所述数据保存终端中创建区块链类,将所述区块链类实例化从而建立创世区块,其中所述创世区块中将前一区块的哈希值记为0;基于所述创世区块,生成其他区块,其中所述其他区块包括前一区块的哈希值;将预设终端作为区块链节点,从而建立所述区块链网络。
在一个实施方式中,所述若所述反馈信息满足预设的数据保存条件,则将所述初始数据记录入所述区块链网络的步骤之后,包括:接收对所述指定数据的修改指令,其中所述修改指令附带有替换用子数据;根据所述修改指令,将所述指定数据中的待修改子数据替换为所述替换用子数据,从而得到修改后数据;将所述修改后数据发送给所述具有审核权限的区块链节点;接收所述具有审核权限的区块链节点的对所述修改后数据的审核信息,并判断所述审核信息是否满足预设的数据保存条件;若所述审核信息满足预设的数据保存条件,则将所述修改后数据加入所述区块链网络。
在一个实施方式中,所述若所述反馈信息满足预设的数据保存条件,则将所述初始数据记录入所述区块链网络的步骤之后,包括:接收基于所述特定数据的特定操作审批指令;从所述区块链中调取所述特定数据,并判断所述特定数据是否符合预设的特定操作审批标准;若所述特定数据符合预设的特定操作审批标准,则执行特定操作。
本申请的计算机可读存储介质,接收对指定数据的数据保存指令;将预先准备好的数据填入初始数据模板中,得到初始数据;将所述初始数据发送给具有审核权限的区块链节点;接收所述具有审核权限的区块链节点的反馈信息;若所述反馈信息满足预设的数据保存条件,则将所述初始数据记录入所述区块链网络。从而解决了数据安全性差、同时数据直接使用程度差的问题。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的和实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可以包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双速据率SDRAM(SSRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、装置、物品或者方法不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、装置、物品或者方法所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、装置、物品或者方法中还存在另外的相同要素。
以上所述仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种基于区块链的数据保存方法,应用于数据保存终端,其中,包括:
    接收对指定数据的数据保存指令,其中所述数据保存指令记载了指定数据的类型,所述数据保存终端是预先搭建的区块链网络中的一个区块链节点;
    从预设的多个数据模板中调取与所述指定数据的类型对应的初始数据模板;
    将预先准备好的数据填入所述初始数据模板中,得到初始数据;
    将所述初始数据发送给具有审核权限的区块链节点;
    接收所述具有审核权限的区块链节点的反馈信息,并判断所述反馈信息是否满足预设的数据保存条件;
    若所述反馈信息满足预设的数据保存条件,则将所述初始数据记录入所述区块链网络。
  2. 根据权利要求1所述的基于区块链的数据保存方法,其中,所述初始数据模板由数据框架模板和至少一个数据子模板构成,所述从预设的多个数据模板中调取与所述指定数据的类型对应的初始数据模板的步骤,包括:
    根据所述指定数据的类型,依据预设的数据类型与模板的对应关系,获取预设的多个数据框架模板与多个数据子模板;
    获取所述数据保存终端选择的数据框架模板与数据子模板,并将所述数据保存终端选择的数据框架模板与数据子模板组合成为所述初始数据模板;
    调取所述初始数据模板。
  3. 根据权利要求1所述的基于区块链的数据保存方法,其中,所述区块链网络包括指定区块链节点,所述将预先准备好的数据填入所述初始数据模板中,得到初始数据的步骤,包括:
    接收从指定区块链节点发送的特定数据,其中所述特定数据包括特定对象的身份信息、教育经历或者是否属于黑名单的信息;
    将所述特定数据填入所述初始数据模板中,得到初始数据。
  4. 根据权利要求1所述的基于区块链的数据保存方法,其中,所述区块链网络采用指定共识机制,所述接收所述具有审核权限的区块链节点的反馈信息,并判断所述反馈信息是否满足预设的数据保存条件的步骤,包括:
    接收基于所述指定共识机制而投选出的多个受托区块链节点的反馈信息,其中所述受托区块链节点具有审核权限,所述反馈信息包括审核通过或者审核未通过;
    统计审核通过的反馈信息的数量,并判断所述审核通过的反馈信息的数量是否大于预设的数量阈值;
    若所述审核通过的反馈信息的数量大于预设的数量阈值,则判定反馈信息满足预设的数据保存条件。
  5. 根据权利要求1所述的基于区块链的数据保存方法,其中,所述接收对指定数据的数据保存指令,其中所述数据保存指令记载了指定数据的类型,所述数据保存终端是预先搭建的区块链网络中的一个区块链节点的步骤之前,包括:
    采用指定语言在所述数据保存终端中创建区块链类,将所述区块链类实例化从而建立创世区块,其中所述创世区块中将前一区块的哈希值记为0;
    基于所述创世区块,生成其他区块,其中所述其他区块包括前一区块的哈希值;
    将预设终端作为区块链节点,从而建立所述区块链网络。
  6. 根据权利要求1所述的基于区块链的数据保存方法,其中,所述若所述反馈信息满足预设的数据保存条件,则将所述初始数据记录入所述区块链网络的步骤之后,包括:
    接收对所述指定数据的修改指令,其中所述修改指令附带有替换用子数据;
    根据所述修改指令,将所述指定数据中的待修改子数据替换为所述替换用子数据,从而得到修改后数据;
    将所述修改后数据发送给所述具有审核权限的区块链节点;
    接收所述具有审核权限的区块链节点的对所述修改后数据的审核信息,并判断所述审核信息是否满足预设的数据保存条件;
    若所述审核信息满足预设的数据保存条件,则将所述修改后数据加入所述区块链网络。
  7. 根据权利要求3所述的基于区块链的数据保存方法,其中,所述若所述反馈信息满足预设的数据保存条件,则将所述初始数据记录入所述区块链网络的步骤之后,包括:
    接收基于所述特定数据的特定操作审批指令;
    从所述区块链中调取所述特定数据,并判断所述特定数据是否符合预设的特定操作审批标准;
    若所述特定数据符合预设的特定操作审批标准,则执行特定操作。
  8. 一种基于区块链的数据保存装置,应用于数据保存终端,其中,包括:
    数据保存指令接收单元,用于接收对指定数据的数据保存指令,其中所述数据保存指令记载了指定数据的类型,所述数据保存终端是预先搭建的区块链网络中的一个区块链节点;
    初始数据模板调取单元,用于从预设的多个数据模板中调取与所述指定数据的类型对应的初始数据模板;
    初始数据获取单元,用于将预先准备好的数据填入所述初始数据模板中,得到初始数据;
    初始数据发送单元,用于将所述初始数据发送给具有审核权限的区块链节点;
    数据保存条件判断单元,用于接收所述具有审核权限的区块链节点的反馈信息,并判断所述反馈信息是否满足预设的数据保存条件;
    数据保存单元,用于若所述反馈信息满足预设的数据保存条件,则将所述初始数据记录入所述区块链网络。
  9. 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其中,所述处理器执行所述计算机程序时实现如下步骤:
    接收对指定数据的数据保存指令,其中所述数据保存指令记载了指定数据的类型,所述数据保存终端是预先搭建的区块链网络中的一个区块链节点;
    从预设的多个数据模板中调取与所述指定数据的类型对应的初始数据模板;
    将预先准备好的数据填入所述初始数据模板中,得到初始数据;
    将所述初始数据发送给具有审核权限的区块链节点;
    接收所述具有审核权限的区块链节点的反馈信息,并判断所述反馈信息是否满足预设的数据保存条件;
    若所述反馈信息满足预设的数据保存条件,则将所述初始数据记录入所述区块链网络。
  10. 如权利要求9所述的计算机设备,其中,所述处理器执行所述计算机程序时实现所述初始数据模板由数据框架模板和至少一个数据子模板构成,所述从预设的多个数据模板中调取与所述指定数据的类型对应的初始数据模板的步骤,包括:
    根据所述指定数据的类型,依据预设的数据类型与模板的对应关系,获取预设的多个数据框架模板与多个数据子模板;
    获取所述数据保存终端选择的数据框架模板与数据子模板,并将所述数据保存终端选择的数据框架模板与数据子模板组合成为所述初始数据模板;
    调取所述初始数据模板。
  11. 如权利要求9所述的计算机设备,其中,所述处理器执行所述计算机程序时实现所述区块链网络包括指定区块链节点,所述将预先准备好的数据填入所述初始数据模板中,得到初始数据的步骤,包括:
    接收从指定区块链节点发送的特定数据,其中所述特定数据包括特定对象的身份信息、教育经历或者是否属于黑名单的信息;
    将所述特定数据填入所述初始数据模板中,得到初始数据。
  12. 如权利要求9所述的计算机设备,其中,所述处理器执行所述计算机程序时实现所述区块链网络采用指定共识机制,所述接收所述具有审核权限的区块链节点的反馈信息,并判断所述反馈信息是否满足预设的数据保存条件的步骤,包括:
    接收基于所述指定共识机制而投选出的多个受托区块链节点的反馈信息,其中所述受托区块链节点具有审核权限,所述反馈信息包括审核通过或者审核未通过;
    统计审核通过的反馈信息的数量,并判断所述审核通过的反馈信息的数量是否大于预设的数量阈值;
    若所述审核通过的反馈信息的数量大于预设的数量阈值,则判定反馈信息满足预设的数据保存条件。
  13. 如权利要求9所述的计算机设备,其中,所述处理器执行所述计算机程序时实现所述接收对指定数据的数据保存指令,其中所述数据保存指令记载了指定数据的类型,所述数据保存终端是预先搭建的区块链网络中的一个区块链节点的步骤之前,还用于实现如下步骤:
    采用指定语言在所述数据保存终端中创建区块链类,将所述区块链类实例化从而建立创世区块,其中所述创世区块中将前一区块的哈希值记为0;
    基于所述创世区块,生成其他区块,其中所述其他区块包括前一区块的哈希值;
    将预设终端作为区块链节点,从而建立所述区块链网络。
  14. 如权利要求9所述的计算机设备,其中,所述处理器执行所述计算机程序时实现所述若所述反馈信息满足预设的数据保存条件,则将所述初始数据记录入所述区块链网络的步骤之后,还用于实现如下步骤:
    接收对所述指定数据的修改指令,其中所述修改指令附带有替换用子数据;
    根据所述修改指令,将所述指定数据中的待修改子数据替换为所述替换用子数据,从而得到修改后数据;
    将所述修改后数据发送给所述具有审核权限的区块链节点;
    接收所述具有审核权限的区块链节点的对所述修改后数据的审核信息,并判断所述审核信息是否满足预设的数据保存条件;
    若所述审核信息满足预设的数据保存条件,则将所述修改后数据加入所述区块链网络。
  15. 一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现如下步骤:
    接收对指定数据的数据保存指令,其中所述数据保存指令记载了指定数据的类型,所述数据保存终端是预先搭建的区块链网络中的一个区块链节点;
    从预设的多个数据模板中调取与所述指定数据的类型对应的初始数据模板;
    将预先准备好的数据填入所述初始数据模板中,得到初始数据;
    将所述初始数据发送给具有审核权限的区块链节点;
    接收所述具有审核权限的区块链节点的反馈信息,并判断所述反馈信息是否满足预设的数据保存条件;
    若所述反馈信息满足预设的数据保存条件,则将所述初始数据记录入所述区块链网络。
  16. 如权利要求15所述的存储介质,其中,所述计算机程序被处理器执行时实现所述初始数据模板由数据框架模板和至少一个数据子模板构成,所述从预设的多个数据模板中调取与所述指定数据的类型对应的初始数据模板的步骤,包括:
    根据所述指定数据的类型,依据预设的数据类型与模板的对应关系,获取预设的多个数据框架模板与多个数据子模板;
    获取所述数据保存终端选择的数据框架模板与数据子模板,并将所述数据保存终端选择的数据框架模板与数据子模板组合成为所述初始数据模板;
    调取所述初始数据模板。
  17. 如权利要求15所述的存储介质,其中,所述计算机程序被处理器执行时实现所述区块链网络包括指定区块链节点,所述将预先准备好的数据填入所述初始数据模板中,得到初始数据的步骤,包括:
    接收从指定区块链节点发送的特定数据,其中所述特定数据包括特定对象的身份信息、教育经历或者是否属于黑名单的信息;
    将所述特定数据填入所述初始数据模板中,得到初始数据。
  18. 如权利要求15所述的存储介质,其中,所述计算机程序被处理器执行时实现所述区块链网络采用指定共识机制,所述接收所述具有审核权限的区块链节点的反馈信息,并判断所述反馈信息是否满足预设的数据保存条件的步骤,包括:
    接收基于所述指定共识机制而投选出的多个受托区块链节点的反馈信息,其中所述受托区块链节点具有审核权限,所述反馈信息包括审核通过或者审核未通过;
    统计审核通过的反馈信息的数量,并判断所述审核通过的反馈信息的数量是否大于预设的数量阈值;
    若所述审核通过的反馈信息的数量大于预设的数量阈值,则判定反馈信息满足预设的数据保存条件。
  19. 如权利要求15所述的存储介质,其中,所述计算机程序被处理器执行时实现所述接收对指定数据的数据保存指令,其中所述数据保存指令记载了指定数据的类型,所述数据保存终端是预先搭建的区块链网络中的一个区块链节点的步骤之前,还用于执行如下步骤:
    采用指定语言在所述数据保存终端中创建区块链类,将所述区块链类实例化从而建立创世区块,其中所述创世区块中将前一区块的哈希值记为0;
    基于所述创世区块,生成其他区块,其中所述其他区块包括前一区块的哈希值;
    将预设终端作为区块链节点,从而建立所述区块链网络。
  20. 如权利要求15所述的存储介质,其中,所述计算机程序被处理器执行时实现所述若所述反馈信息满足预设的数据保存条件,则将所述初始数据记录入所述区块链网络的步骤之后,还用于实现如下步骤:
    接收对所述指定数据的修改指令,其中所述修改指令附带有替换用子数据;
    根据所述修改指令,将所述指定数据中的待修改子数据替换为所述替换用子数据,从而得到修改后数据;
    将所述修改后数据发送给所述具有审核权限的区块链节点;
    接收所述具有审核权限的区块链节点的对所述修改后数据的审核信息,并判断所述审核信息是否满足预设的数据保存条件;
    若所述审核信息满足预设的数据保存条件,则将所述修改后数据加入所述区块链网络。
PCT/CN2020/088011 2019-05-30 2020-04-30 基于区块链的数据保存方法、装置和计算机设备 Ceased WO2020238554A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910463894.0A CN110334536A (zh) 2019-05-30 2019-05-30 基于区块链的数据保存方法、装置和计算机设备
CN2019104638940 2019-05-30

Publications (1)

Publication Number Publication Date
WO2020238554A1 true WO2020238554A1 (zh) 2020-12-03

Family

ID=68140633

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/088011 Ceased WO2020238554A1 (zh) 2019-05-30 2020-04-30 基于区块链的数据保存方法、装置和计算机设备

Country Status (2)

Country Link
CN (1) CN110334536A (zh)
WO (1) WO2020238554A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113300889A (zh) * 2020-12-31 2021-08-24 恬家(上海)信息科技有限公司 链宽调节方法及区块链网络系统

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110334536A (zh) * 2019-05-30 2019-10-15 深圳壹账通智能科技有限公司 基于区块链的数据保存方法、装置和计算机设备
CN110852800A (zh) * 2019-11-07 2020-02-28 深圳前海点金保理有限公司 贸易信息的整合方法、终端设备以及存储介质
CN111553920B (zh) * 2020-05-14 2021-06-25 上海映城网络科技有限公司 区块链服务器文物还原数据保存平台
CN111913932A (zh) * 2020-05-29 2020-11-10 上海边界智能科技有限公司 一种基于区块链的数据建模方法及装置
CN112528334B (zh) * 2020-12-16 2024-01-23 海南博盈电子竞技有限公司 基于区块链网络的数据获取方法、装置以及计算机设备
CN115408685A (zh) * 2022-06-27 2022-11-29 中国银行股份有限公司 一种针对sql注入的数据检测方法、装置及设备

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109509108A (zh) * 2018-12-19 2019-03-22 中国平安财产保险股份有限公司 基于区块链技术的保险保单处理方法、装置和计算机设备
CN109711816A (zh) * 2019-01-02 2019-05-03 深圳壹账通智能科技有限公司 合作机构信息管理方法、装置、计算机设备和存储介质
CN110334536A (zh) * 2019-05-30 2019-10-15 深圳壹账通智能科技有限公司 基于区块链的数据保存方法、装置和计算机设备

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006185212A (ja) * 2004-12-28 2006-07-13 Ricoh Software Kk 情報管理システム、情報管理方法及びプログラム
US8700682B2 (en) * 2009-12-24 2014-04-15 Vertafore, Inc. Systems, methods and articles for template based generation of markup documents to access back office systems
CN102868712B (zh) * 2011-07-06 2015-03-18 阿里巴巴集团控股有限公司 一种数据传输方法及系统
US8997095B2 (en) * 2012-07-16 2015-03-31 International Business Machines Corporation Preprovisioning using mutated templates
EP2915057A4 (en) * 2012-10-31 2015-11-18 Ericsson Telefon Ab L M METHOD FOR CONFIGURING A COMMUNICATION DEVICE THROUGH A CONFIGURATION FILE LOCATION
US10810178B2 (en) * 2013-09-24 2020-10-20 QIikTech International AB Methods and systems for data management and analysis
CN105808375A (zh) * 2014-12-31 2016-07-27 航天信息软件技术有限公司 导入数据的方法和装置
CN107147950A (zh) * 2017-06-16 2017-09-08 环球智达科技(北京)有限公司 一种支持自定义模板数据添加的智能电视系统
CN109284108B (zh) * 2018-08-30 2022-10-21 百度在线网络技术(北京)有限公司 无人车数据存储方法、装置、电子设备及存储介质
CN109165856B (zh) * 2018-08-31 2023-08-08 平安科技(深圳)有限公司 审批链的动态配置方法、装置及存储介质
CN109615534A (zh) * 2018-10-29 2019-04-12 平安医疗健康管理股份有限公司 风控审核模型生成方法、装置、设备及可读存储介质
CN109525671B (zh) * 2018-11-26 2021-05-14 远光软件股份有限公司 基于区块链的数据存储方法、电子设备及存储介质
CN109816327B (zh) * 2018-12-14 2024-05-14 平安国际融资租赁有限公司 合同数据处理方法、装置、计算机设备和存储介质
CN109816563A (zh) * 2019-01-03 2019-05-28 深圳壹账通智能科技有限公司 电子合同模板流转方法、装置、计算机设备和存储介质

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109509108A (zh) * 2018-12-19 2019-03-22 中国平安财产保险股份有限公司 基于区块链技术的保险保单处理方法、装置和计算机设备
CN109711816A (zh) * 2019-01-02 2019-05-03 深圳壹账通智能科技有限公司 合作机构信息管理方法、装置、计算机设备和存储介质
CN110334536A (zh) * 2019-05-30 2019-10-15 深圳壹账通智能科技有限公司 基于区块链的数据保存方法、装置和计算机设备

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113300889A (zh) * 2020-12-31 2021-08-24 恬家(上海)信息科技有限公司 链宽调节方法及区块链网络系统

Also Published As

Publication number Publication date
CN110334536A (zh) 2019-10-15

Similar Documents

Publication Publication Date Title
WO2020238554A1 (zh) 基于区块链的数据保存方法、装置和计算机设备
US11563557B2 (en) Document transfer processing for blockchains
CN107231351B (zh) 电子证件的管理方法及相关设备
CN107911373B (zh) 一种区块链权限管理方法及系统
CN110533429A (zh) 区块链中的交易背书方法、装置和区块链网络
CN108964924A (zh) 数字证书校验方法、装置、计算机设备和存储介质
CN110851877B (zh) 一种数据处理方法、装置及区块链节点设备、存储介质
EP3619640A1 (en) Method and system for registering digital documents
CN108830602A (zh) 一种基于变色龙哈希函数的许可链构造及管控方法
CN108898475A (zh) 基于属性加密的联盟区块链实现信贷方法及系统
CN110598375B (zh) 一种数据处理方法、装置及存储介质
CN110941672B (zh) 户籍管理方法、装置、设备以及存储介质
DE102011003919A1 (de) Mobilfunkgerätbetriebenes Authentifizierugssystem unter Verwendung einer asymmetrischen Verschlüsselung
CN111339116A (zh) 一种基于区块链的用于开放银行数据共享的方式
CN111524009A (zh) 区块链系统的交易验证方法、装置及硬件设备
DE102021107512A1 (de) Verfahren und Vorrichtung zum Erzeugen, Bereitstellen und Weitergeben eines vertrauenswürdigen elektronischen Datensatzes oder Zertifikates basierend auf einem einen Nutzer betreffenden elektronischen Dokument
CN109509108A (zh) 基于区块链技术的保险保单处理方法、装置和计算机设备
CN120146852A (zh) 一种基于区块链和人工智能的金融交易验证方法及系统
CN112035896B (zh) 一种基于交易方式的电子合同存证系统
Guo et al. Antitampering scheme of evidence transfer information in judicial system based on blockchain
CN115292684A (zh) 基于区块链的询证函数据处理的方法和区块链系统
CN112422534A (zh) 电子证书的信用评估方法以及设备
CN120034343A (zh) 基于区块链的授权方法、装置、计算机及可读存储介质
CN121167748B (zh) 一种可信的模型上下文交互方法及装置
CN118842657B (zh) 一种智能计算中心的算力资源访问方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20815603

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20815603

Country of ref document: EP

Kind code of ref document: A1