CN114372293A - Block chain based data approval method, device, equipment and storage medium - Google Patents

Block chain based data approval method, device, equipment and storage medium Download PDF

Info

Publication number
CN114372293A
CN114372293A CN202111460570.5A CN202111460570A CN114372293A CN 114372293 A CN114372293 A CN 114372293A CN 202111460570 A CN202111460570 A CN 202111460570A CN 114372293 A CN114372293 A CN 114372293A
Authority
CN
China
Prior art keywords
data
approval
user
block chain
confirmation
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
CN202111460570.5A
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 Peersafe Technology Co ltd
Original Assignee
Beijing Peersafe 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 Peersafe Technology Co ltd filed Critical Beijing Peersafe Technology Co ltd
Priority to CN202111460570.5A priority Critical patent/CN114372293A/en
Publication of CN114372293A publication Critical patent/CN114372293A/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/21Design, administration or maintenance of databases
    • G06F16/215Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Quality & Reliability (AREA)
  • Computing Systems (AREA)
  • Storage Device Security (AREA)

Abstract

The application discloses a block chain-based data approval method, a block chain-based data approval device, equipment and a storage medium, wherein the method comprises the following steps: responding to a data insertion request for a block chain database table, and acquiring to-be-audited data and a type of the block chain database table; determining a corresponding approval processing strategy based on the type of the block chain database table to obtain an approval result of the to-be-approved data; the block chain database table type comprises a user data table and a data summary table, the user data table has an operation authority of a user side and is used for storing business data of users, and the data summary table has an operation authority of a management platform and is used for storing business data of all users; and inserting the approval record of the data to be approved into the data confirmation table corresponding to the database table type according to the approval result. According to the scheme, the data authority on the chain is clear, data isolation is achieved, the examination and approval process is operated on the chain, traceability and verification of data are guaranteed, and the credibility of all examination and approval processes is higher.

Description

Block chain based data approval method, device, equipment and storage medium
Technical Field
The present invention relates to the field of blockchain technologies, and in particular, to a method, an apparatus, a device, and a storage medium for data approval based on a blockchain.
Background
With the continuous development of computer technology, the digital industry business, which may include office automation approval processes, has been widely used in people's daily life. At present, a common office automation approval process includes: a financial examination and approval process, an administrative affair examination and approval process, a business-related examination and approval process and the like. In order to better realize office automation, it is very important to automatically process the approval process.
At present, the approval operation in the related art adopts a centralized approval process, and the generated approval process data are all stored in a central database, however, the central database may have hidden danger of being invaded and leaked or stolen by hackers, and meanwhile, the risk of tampering the transaction data is increased, so that the problem of untrustworthiness exists, and the fairness, transparency and validity of the transaction data cannot be guaranteed.
Disclosure of Invention
In view of at least one of the above-mentioned drawbacks or deficiencies in the prior art, it is desirable to provide a method, an apparatus, a device, and a storage medium for block chain based data approval.
In a first aspect, the present invention provides a data approval method based on a blockchain, including:
responding to a data insertion request for a block chain database table, and acquiring to-be-audited data and the type of the block chain database table;
determining a corresponding examination and approval processing strategy based on the type of the block chain database table to obtain an examination and approval result of the to-be-examined data; the block chain database table type comprises a user data table and a data summary table, the user data table has an operation authority of a user side and is used for storing the service data of the user, and the data summary table has an operation authority of a management platform and is used for storing the service data of all users;
and inserting the examination and approval records of the data to be examined into a data confirmation table corresponding to the type of the database table according to the examination and approval result.
In one embodiment, determining a corresponding approval processing policy based on the type of the blockchain database table to obtain an approval result of the to-be-approved data includes:
if the type of the block chain database table is a user data table, monitoring the user data table through an intelligent contract node, and synchronizing the data to be audited in the user data table to the data summary table to obtain a first auditing result;
and if the type of the block chain database table is a data summary table, monitoring the data summary table through an intelligent contract node, and synchronizing the data to be audited in the data summary table to the user data table to obtain a second audit result.
In one embodiment, synchronizing the to-be-approved data in the user data table to the data summary table to obtain a first approval result includes:
synchronizing the data to be examined in the user data table to the data summary table so that the management platform performs query and review processing on the data to be examined and determines a first examination result;
and acquiring the first approval result, wherein the first approval result is used for representing whether the data to be approved is wrong or not.
In one embodiment, synchronizing the to-be-approved data in the data summary table to the user data table to obtain a second approval result includes:
acquiring a user identifier corresponding to the to-be-audited data;
synchronizing the data to be examined in the data summary table to a user data table corresponding to the user identifier, so that the user end performs query and review processing on the data to be examined, and a second examination result is determined;
and acquiring the second approval result, wherein the second approval result is used for representing whether the data to be approved is wrong or not.
In one embodiment, inserting an approval record of the to-be-approved data into a data validation table corresponding to the type of the database table according to the approval result includes:
when the approval result is the first approval result and the first approval result is used for representing that the data to be approved are correct, determining a data confirmation table corresponding to the data summary table as a management confirmation table, and inserting a confirmation record into the management confirmation table;
and when the approval result is the first approval result and the first approval result is used for representing that the data to be approved are wrong, determining that the data confirmation table corresponding to the data summary table is a management confirmation table, and inserting a reject record into the management confirmation table.
In one embodiment, inserting an approval record of the to-be-approved data into a data validation table corresponding to the type of the database table according to the approval result includes:
when the approval result is the second approval result and the second approval result is used for representing that the data to be approved are correct, determining that a data confirmation table corresponding to the user data table is a user confirmation table, and inserting a confirmation record into the user confirmation table;
and when the approval result is the second approval result and the second approval result is used for representing that the data to be approved are wrong, determining that the data confirmation table corresponding to the user data table is a user confirmation table, and inserting a reject record into the user confirmation table.
In one embodiment, after inserting the approval record into the management confirmation table, the method further includes:
and monitoring the management confirmation table through an intelligent contract node, and updating the auditing states of the to-be-audited data in the data total table and the user data table.
In one embodiment, after inserting the approval record into the user confirmation table, the method further includes:
and monitoring the user confirmation table through an intelligent contract node, and updating the auditing states of the data to be audited in the data total table and the user data table.
In a second aspect, the present invention provides a block chain-based data approval apparatus, including:
the acquisition module is used for responding to a data insertion request of a block chain database table, and acquiring to-be-audited data and the type of the block chain database table;
the processing module is used for determining a corresponding approval processing strategy based on the type of the block chain database table to obtain an approval result of the to-be-approved data; the block chain database table type comprises a user data table and a data summary table, the user data table has operation authority through a user and is used for storing the service data of the user, and the data summary table has operation authority for a management platform and is used for storing the service data of all users;
and the inserting module is used for inserting the approval record of the data to be approved into the data confirmation table corresponding to the type of the database table according to the approval result.
In a third aspect, an embodiment of the present application provides a computer device, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the above data approval method based on a blockchain when executing the computer program.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the above-mentioned block chain-based data approval method.
In summary, according to the block chain-based data approval method, apparatus, device, and storage medium provided by the present application, the approval result of the data to be approved is obtained by responding to the data insertion request to the block chain database table, obtaining the data to be approved and the type of the block chain database table, and determining the corresponding approval processing policy based on the type of the block chain database table, where the type of the block chain database table includes a user data table and a data summary table, where the user data table has an operation authority of a user side for storing the business data of the user, and the data summary table has an operation authority of a management platform for storing the business data of all users, and then inserting the approval record of the data to be approved into the data confirmation table corresponding to the type of the database table according to the approval result. According to the technical scheme, the service approval process is combined with the block chain database table, the data authority on the chain is clear, data isolation is achieved, the service data of all users in the data summary table can be checked through the management platform, the users can only check own data at the user side, the approval process is completely operated on the chain, the approval records are recorded by using the data confirmation table, traceability and verification of the data are guaranteed, and due to the fact that the block chain cannot be tampered and the time stamp characteristic, the reliability of the whole approval process is higher.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
fig. 1 is a schematic structural diagram of a block chain-based data approval system according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a block chain-based data approval method according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of a block chain-based data approval method according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of a block chain-based data approval method according to another embodiment of the present invention
Fig. 5 is a schematic flowchart of a block chain-based data approval method according to an embodiment of the present invention
FIG. 6 is a schematic flow chart of a blockchain transaction auditing apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a computer system according to an embodiment of the present invention.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
As mentioned in the background art, with the continuous development of office business, it is necessary to improve the cooperative office ability through the approval process to achieve the ordered office work. The current common office automation approval process comprises the following steps: a financial examination and approval process, an administrative affair examination and approval process, a business-related examination and approval process and the like. The financial examination and approval process can comprise expense reimbursement, loan repayment examination and approval, work and money payment, money income examination and approval and the like; the administrative examination and approval process can comprise leave request business examination and approval, overtime examination and approval and the like; the business-related approval process may include, for example, an approval process of an order, a purchase approval process, a contract approval process, and the like.
At present, the approval operation in the related art adopts a centralized approval process, and the generated approval process data are all stored in a central database, however, the central database may have hidden danger of being invaded and leaked or stolen by hackers, and meanwhile, the risk of tampering the transaction data is increased, so that the problem of untrustworthiness exists, and the fairness, transparency and validity of the transaction data cannot be guaranteed.
Based on the defects, the application provides a data approval method, a device, equipment and a storage medium based on a block chain. Compared with the prior art, the technical scheme combines the business approval process with the block chain database table, the data authority on the chain is clear, data isolation is achieved, business data of all users in the data summary table can be checked through the management platform, the users can only check own data at the user side, the approval process is all chain operation, the approval records are recorded by using the data confirmation table, traceability and verifiability of the data are guaranteed, and due to the fact that the block chain cannot be tampered and the time stamp characteristic, the reliability of all the approval processes is higher.
It can be understood that the block chain-based data approval method provided by the present application can be applied to a block chain-based data approval system, for example, fig. 1 is a system structure diagram in an application scenario of the present application, and the system includes a user terminal 10, a management platform 20, and a block chain 30. The blockchain 30 communicates with the user terminal 10 and the management platform 20, respectively.
The user terminal 10 may be a client terminal used by an initiator of pending data in the business approval process, and the pending data may be reimbursement data, for example. The management platform 20 may be an executing party for managing service data of all users, may be a node in the blockchain network, or may not be a node in the blockchain network, and is in communication connection with each node in the blockchain network. The block chain 30 may be a ChainSQL chain, and records the user operation through a database table by building a table on the block chain.
It should be noted that the ChainSQL is a database application platform based on a block chain, and achieves consensus on a block chain network by performing operations on a database table in a transaction manner, and then stores the consensus on a block chain node and a local database, so that a plurality of data centers provide service functions at the same time, the data centers do not have a main backup function, each data center is a production center and is a "backup", which not only improves service efficiency of the data centers, but also ensures safe operation of the data centers.
The blockchain 30 includes a plurality of blockchain nodes, and the blockchain nodes may include intelligent contract nodes, and communication between every two blockchain nodes is possible. Optionally, the user terminal 10 and the management platform 20 may operate on a terminal device, where the terminal device may be a mobile portable terminal such as a laptop, a tablet computer, a desktop computer, and a smart phone, or the electronic device may be an intelligent wearable device such as smart glasses and a smart watch, and this embodiment does not specifically limit this. The block chain 30 may be a server, a server cluster composed of a plurality of servers, or a cloud computing service center.
The user terminal 10 is configured to send a data insertion request for the blockchain database to the blockchain 30, where the data insertion request includes a type of the blockchain database table, and is configured to perform query and review processing on data to be reviewed when synchronizing the data to be reviewed in the data summary table into the user data table.
The management platform 20 is configured to send a data insertion request for the blockchain database to the blockchain 30, where the data insertion request includes a type of the blockchain database table, and is configured to perform query and review processing on the to-be-reviewed data when synchronizing the to-be-reviewed data in the user data table into the data summary table.
The blockchain 30 is configured to, in response to a data insertion request of a blockchain database table, acquire pending data and a blockchain database table type, determine a corresponding approval processing policy based on the blockchain database table type, obtain an approval result of the pending data, and insert, according to the approval result, an approval record of the pending data in a data validation table corresponding to the database table type.
Optionally, the terminal device and the server may establish a communication connection through a wired or wireless network. Optionally, the wireless network or wired network described above uses standard communication techniques and/or protocols. The Network is typically the Internet, but may be any Network including, but not limited to, a Local Area Network (LAN), a Metropolitan Area Network (MAN), a Wide Area Network (WAN), a mobile, wireline or wireless Network, a private Network, or any combination of virtual private networks.
For convenience of understanding and explanation, a block chain-based data approval method, an apparatus, a device, and a storage medium according to an embodiment of the present application are described in detail below with reference to fig. 2 to 7.
Fig. 2 is a schematic flowchart of a block chain-based data approval method according to an embodiment of the present application, and as shown in fig. 2, the method may be applied to a node in a block chain network, and the method includes:
s101, responding to a data insertion request for the block chain database table, and acquiring to-be-audited data and the type of the block chain database table.
Specifically, when the user needs to perform the business process approval processing based on the blockchain, the user needs to perform registration processing on the management platform, a chain upper identity identifier can be generated at the user, where the chain upper identity identifier can be a wallet address, and then the system identity identifier and the chain upper identity identifier are bound through the management platform to activate the chain upper identity of the user, so that the registration processing of the user on the blockchain is realized.
After the registration process is completed, an uplink database table and a data validation table may be created for the user, where the database table may be a user data table and the corresponding data validation table may be a user validation table. The naming rule of the user data table is as follows: data _ user number; the user confirmation table naming rule is confirm _ user number. The user has the operation authority for operating the user confirmation table and the user data table, and the user can perform insertion operation on the user confirmation table and the user data table through the user end.
It should be noted that the user data table is used for storing service data of a user, and the user confirmation table is used for storing confirmation information of the user on the service data, where the confirmation information may include a key field in the service data and a data identifier of the service data. For example, when the service data is reimbursement data, the confirmation information may be reimbursement time, reimbursement amount, and the like.
It is understood that the above block chain may further include a data summary table and a management confirmation table, where the management platform has an operation right to operate the data summary table and the management confirmation table, and may perform an insert operation on the data summary table and the management confirmation table. The data summary table is used for storing service data of all users, and the management confirmation table is used for storing confirmation information of all users on the service data, wherein the confirmation information may include key fields in the service data of all users and data identifiers of the service data.
When a user needs to approve data to be approved, a data insertion request for a block chain database table can be sent to the block chain, wherein the data insertion request comprises the data to be approved, so that the block chain responds to the data insertion request for the block chain database table, and inserts the data to be approved into the user database table to obtain the data to be approved and the type of the block chain database table. The blockchain database table types may include a user data table and a summary data table. The data to be audited comprises a unique identity id, and the data to be audited is in an audited state.
Optionally, when the management platform needs to approve the approved data, a data insertion request for the blockchain database table may be sent to the blockchain, where the data insertion request includes the pending data, so that the blockchain inserts the pending data into the summary data table in response to the data insertion request for the blockchain database table, so as to obtain the pending data and the type of the blockchain database table.
In the step, the block chain database table, the user data table, the management confirmation table and the user confirmation table are created, namely, the data isolation is realized by creating the master table and the sub-tables, and the problem of authorized user limitation is solved, so that the data security is ensured.
S102, determining a corresponding approval processing strategy based on the type of the block chain database table to obtain an approval result of the data to be approved; the block chain database table type comprises a user data table and a data summary table, the user data table has an operation authority of a user side and is used for storing business data of users, and the data summary table has an operation authority of a management platform and is used for storing the business data of all users.
Specifically, when the type of the blockchain database table is determined, a corresponding approval processing policy may be determined according to the type of the blockchain database table, where the approval processing policy may include, for example, a first approval processing policy and a second approval processing policy, where the first approval processing policy is an approval processing policy corresponding to the user data table, and the second approval processing policy is an approval processing policy corresponding to the data summary table. The first and second approval policies are different.
And S103, inserting the approval record of the data to be approved into the data confirmation table corresponding to the database table type according to the approval result.
And after the corresponding approval processing strategy is determined, performing approval processing on the data to be approved so as to obtain an approval result. When the type of the block chain database table is a user data table, monitoring the user data table through an intelligent contract node, and synchronizing data to be audited in the user data table to a data summary table so as to obtain a first auditing result; and if the type of the block chain database table is the data summary table, monitoring the data summary table through the intelligent contract node, synchronizing the data to be audited in the data summary table to the user data table, and obtaining a second audit result.
Furthermore, according to the approval result, the approval record of the data to be approved can be inserted into the data confirmation table corresponding to the type of the database table. When the type of the database table is a user data table, the corresponding data confirmation table is a user confirmation table; and when the type of the database table is a data summary table, the corresponding data confirmation table is a management confirmation table. The approval result is used for representing whether the data to be approved is wrong or not. The approval record may include a confirmation record or a rejection record of the data to be approved.
In the step, row-level control and table-level control can be realized for the database table, and synchronous updating operation of the data approval records is realized, so that the adaptability is stronger, and the method is applied to different business scenes.
The row-level control refers to the capability of accurately controlling the access of the database to the row level of the data table so that the database achieves the row-level access control.
The block chain-based data approval method obtains data to be approved and a type of a block chain database table by responding to a data insertion request of the block chain database table, determines a corresponding approval processing strategy based on the type of the block chain database table, and obtains an approval result of the data to be approved, wherein the type of the block chain database table comprises a user database table and a data summary table, the user database table has an operation authority of a user side and is used for storing business data of users, the data summary table has an operation authority of a management platform and is used for storing the business data of all users, and then, according to the approval result, an approval record of the data to be approved is inserted into a data confirmation table corresponding to the type of the database table. According to the technical scheme, the service approval process is combined with the block chain database table, the data authority on the chain is clear, data isolation is achieved, the service data of all users in the data summary table can be checked through the management platform, the users can only check own data at the user side, the approval process is completely operated on the chain, the approval records are recorded by using the data confirmation table, traceability and verification of the data are guaranteed, and due to the fact that the block chain cannot be tampered and the time stamp characteristic, the reliability of the whole approval process is higher.
Optionally, as an implementation manner, fig. 3 is a schematic flowchart of a block chain-based data approval method provided in an embodiment of the present application. As shown in fig. 3, the method includes:
s201, if the type of the block chain database table is a user data table, monitoring the user data table through an intelligent contract node, and synchronizing the data to be audited in the user data table to a data summary table.
S202, the management platform conducts query and examination processing on the data to be examined and approved and determines a first examination and approval result.
S203, when the first approval result is used for representing that the data to be approved is not approved, determining the data confirmation table corresponding to the data summary table as a management confirmation table, and inserting a confirmation record into the management confirmation table.
And S204, when the first approval result is used for representing that the data to be approved has errors, determining a data confirmation table corresponding to the data summary table as a management confirmation table, and inserting a refusal record into the management confirmation table.
S205, monitoring the management confirmation table through the intelligent contract node, and updating the auditing states of the data to be audited in the data total table and the user data table.
Specifically, as shown in fig. 4, when a user side sends a data insertion request to a block chain database table, to obtain pending data and a type of the block chain database table, and then determines that the type of the block chain database table is a user data table, in response to the data insertion request, the pending data is inserted into the user data table, where the pending data has a unique identity and is in a pending review state, and then monitors the user data table through an intelligent contract node, synchronizes the pending data in the user data table to a data summary table, and the pending data is in the pending review state, and then performs a query and review process on the pending data through a management platform to query whether the pending data is wrong, so as to obtain a first review result.
When the first approval result is used for representing whether the data to be approved is available, the data confirmation table corresponding to the data summary table is determined to be the management confirmation table, and the approval record is inserted into the management confirmation table. And when the first approval result is used for representing that the data to be approved has errors, determining the data confirmation table corresponding to the data summary table as a management confirmation table, and inserting a reject record into the management confirmation table. And associating the confirmation record or the rejection record with the data identifier of the data to be reviewed. And then monitoring the management confirmation table through the intelligent contract node, updating the auditing state of the data to be audited in the data total table and the user data table, and updating the auditing state into the audited state.
It should be noted that the intelligent contract is a "computer transaction protocol for executing contract terms", all users on the blockchain can see the intelligent contract based on the blockchain, and the intelligent contract node is a node in the blockchain for executing the intelligent contract and is used for monitoring data changes in the blockchain database table and the data validation table. The intelligent contract is a special protocol which can be used when making contracts in a block chain, contains code functions and can also have the functions of interacting with other contracts, making decisions, storing data, sending Ethernet coins and the like.
In this embodiment, when the pending data is inserted into the user data table, the pending data in the user data table can be synchronized to the data summary table, and then the corresponding approval records are inserted into the corresponding management confirmation table, so that the state of the pending data is synchronously confirmed through the intelligent contract, and the approval processes are all operated on a chain, thereby achieving traceable and verifiable effects.
As another implementation manner, fig. 5 is a schematic flowchart of a block chain-based data approval method provided in this embodiment of the present application. As shown in fig. 5, the method includes:
s301, if the type of the block chain database table is a data summary table, monitoring the data summary table through an intelligent contract node, and synchronizing the data to be audited in the data summary table to a user data table.
S302, the user side carries out inquiry and verification processing on the data to be verified, and determines a second verification result.
And S303, when the second approval result is used for representing that the data to be approved is not correct, determining the data confirmation table corresponding to the user data table as a user confirmation table, and inserting a confirmation record into the user confirmation table.
S304, when the second approval result is used for representing that the data to be approved is wrong, determining the data confirmation table corresponding to the user data table as a user confirmation table, and inserting a rejection record into the user confirmation table.
S305, monitoring the user confirmation table through the intelligent contract node, and updating the auditing states of the data to be audited in the data sum table and the user data table.
Specifically, please refer to fig. 5 continuously, when the management platform sends a data insertion request to the blockchain database table, obtain the to-be-inspected data and the blockchain database table type, then determine that the blockchain database table type is a summary table, in response to the data insertion request, insert the to-be-inspected data into the summary table, where the to-be-inspected data has a unique identity and is in a to-be-inspected state, then monitor the summary table through an intelligent contract node, obtain a user identifier corresponding to the to-be-inspected data, synchronize the to-be-inspected data of the summary table to the user data table corresponding to the user identifier, where the to-be-inspected data is in the to-be-inspected state, and then perform query and audit processing on the to-be-inspected data through the user end to query whether the to-be-inspected data is incorrect, so as to obtain a second inspection result.
And when the second approval result is used for representing that the data to be approved is not approved, determining the data confirmation table corresponding to the user data table as a user confirmation table, and inserting a confirmation record into the user confirmation table. And when the second approval result is used for representing that the data to be approved is wrong, determining the data confirmation table corresponding to the user data table as a user confirmation table, and inserting a reject record into the user confirmation table. And associating the confirmation record or the rejection record with the data identifier of the data to be reviewed. And then monitoring the user confirmation table through the intelligent contract node, updating the audit state of the data to be audited in the data total table and the user data table, and updating the audit state into an audited state.
In this embodiment, when the to-be-inspected data is inserted into the data summary table, the to-be-inspected data in the data summary table can be synchronized to the user data table, and then the corresponding approval records are inserted into the corresponding user confirmation table, so that the state of the to-be-inspected data is synchronously confirmed through the intelligent contract, and the approval processes are all operated on a chain, so that the traceability and verification effects are realized, meanwhile, the method and the device can be applied to different business scenes, and have strong expansibility.
It should be noted that while the operations of the method of the present invention are depicted in the drawings in a particular order, this does not require or imply that the operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Rather, the steps depicted in the flowcharts may change the order of execution. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
On the other hand, fig. 6 is a schematic structural diagram of a block chain-based data approval apparatus according to an embodiment of the present application. As shown in fig. 6, the apparatus includes:
the acquiring module 10 is configured to respond to a data insertion request for a blockchain database table, and acquire to-be-audited data and a type of the blockchain database table;
the processing module 20 is configured to determine a corresponding approval processing policy based on the type of the block chain database table, and obtain an approval result of the to-be-approved data; the block chain database table type comprises a user data table and a data summary table, the user data table has operation authority through a user and is used for storing the service data of the user, and the data summary table has operation authority for the management platform and is used for storing the service data of all the users;
and the inserting module 30 is configured to insert an approval record of the to-be-approved data into the data validation table corresponding to the database table type according to the approval result.
Optionally, the processing module 20 is specifically configured to:
if the type of the block chain database table is a user data table, monitoring the user data table through an intelligent contract node, and synchronizing the data to be audited in the user data table to a data summary table to obtain a first auditing result;
and if the type of the block chain database table is the data summary table, monitoring the data summary table through the intelligent contract node, synchronizing the data to be audited in the data summary table to the user data table, and obtaining a second audit result.
Optionally, the processing module 20 is specifically configured to:
synchronizing the data to be examined in the user data table to a data summary table so that the management platform performs query and examination processing on the data to be examined and approved and determines a first examination and approval result;
and acquiring a first approval result, wherein the first approval result is used for representing whether the data to be approved is wrong or not.
Optionally, the processing module 20 is specifically configured to:
acquiring a user identifier corresponding to the data to be audited;
synchronizing the data to be examined in the data summary table to a user data table corresponding to the user identification so that the user end can perform inquiry, examination and verification processing on the data to be examined and determine a second examination and verification result;
and acquiring a second approval result, wherein the second approval result is used for representing whether the data to be approved are wrong or not.
Optionally, the insertion module 30 is specifically configured to:
when the approval result is a first approval result and the first approval result is used for representing that the data to be approved are correct, determining a data confirmation table corresponding to the data summary table as a management confirmation table, and inserting a confirmation record into the management confirmation table;
and when the approval result is the first approval result and the first approval result is used for representing that the data to be approved has errors, determining the data confirmation table corresponding to the data summary table as a management confirmation table, and inserting a reject record into the management confirmation table.
Optionally, the insertion module 30 is specifically configured to:
when the approval result is a second approval result and the second approval result is used for representing that the data to be approved are correct, determining a data confirmation table corresponding to the user data table as a user confirmation table, and inserting a confirmation record into the user confirmation table;
and when the approval result is a second approval result and the second approval result is used for representing that the data to be approved is wrong, determining the data confirmation table corresponding to the user data table as a user confirmation table, and inserting a reject record into the user confirmation table.
Optionally, the apparatus is further configured to:
and monitoring the management confirmation table through the intelligent contract node, and updating the auditing states of the data to be audited in the data total table and the user data table.
Optionally, the apparatus is further configured to:
and monitoring the user confirmation table through the intelligent contract node, and updating the auditing states of the data to be audited in the data sum table and the user data table.
The block chain-based data approval apparatus provided in this embodiment may implement the embodiments of the method, and the implementation principle and the technical effect are similar, which are not described herein again.
Referring now to FIG. 7, shown is a block diagram of a computer system 600, which may be implemented in a server, suitable for use in implementing embodiments of the present application.
As shown in fig. 7, the computer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 603 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU601, ROM602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, the process described above with reference to fig. 6 may be implemented as a computer software program according to embodiments of the blockchain-based data approval method disclosed herein. For example, embodiments of the master module disclosed herein include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing the methods of fig. 2-4. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 605 and/or installed from the removable medium 611.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of various computer systems, methods and computer program products according to the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present application may be implemented by software or hardware. The described units or modules may also be provided in a processor, and may be described as: a processor includes an acquisition module, a processing module, and an insertion module. Where the names of these units or modules do not in some way constitute a limitation on the units or modules themselves, for example, the retrieval module may also be described as "for retrieving the pending data and the blockchain database table type in response to a data insertion request to a blockchain database table".
As another aspect, the present application also provides a computer-readable storage medium, which may be the computer-readable storage medium included in the foregoing device in the foregoing embodiment; or it may be a separate computer readable storage medium not incorporated into the device. The computer readable storage medium stores one or more programs, which are used by one or more processors to execute the block chain-based data approval method described in the present application, and specifically executes:
responding to a data insertion request for a block chain database table, and acquiring to-be-audited data and the type of the block chain database table;
determining a corresponding examination and approval processing strategy based on the type of the block chain database table to obtain an examination and approval result of the to-be-examined data; the block chain database table type comprises a user data table and a data summary table, the user data table has an operation authority of a user side and is used for storing the service data of the user, and the data summary table has an operation authority of a management platform and is used for storing the service data of all users;
and inserting the examination and approval records of the data to be examined into a data confirmation table corresponding to the type of the database table according to the examination and approval result.
In summary, according to the block chain-based data approval method, apparatus, device, and storage medium provided by the present application, the approval result of the data to be approved is obtained by responding to the data insertion request to the block chain database table, obtaining the data to be approved and the type of the block chain database table, and determining the corresponding approval processing policy based on the type of the block chain database table, where the type of the block chain database table includes a user data table and a data summary table, where the user data table has an operation authority of a user side for storing the business data of the user, and the data summary table has an operation authority of a management platform for storing the business data of all users, and then inserting the approval record of the data to be approved into the data confirmation table corresponding to the type of the database table according to the approval result. According to the technical scheme, the service approval process is combined with the block chain database table, the data authority on the chain is clear, data isolation is achieved, the service data of all users in the data summary table can be checked through the management platform, the users can only check own data at the user side, the approval process is completely operated on the chain, the approval records are recorded by using the data confirmation table, traceability and verification of the data are guaranteed, and due to the fact that the block chain cannot be tampered and the time stamp characteristic, the reliability of the whole approval process is higher.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Moreover, although the steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that the steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc. Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware.

Claims (11)

1. A block chain-based data approval method is characterized by comprising the following steps:
responding to a data insertion request for a block chain database table, and acquiring to-be-audited data and the type of the block chain database table;
determining a corresponding examination and approval processing strategy based on the type of the block chain database table to obtain an examination and approval result of the to-be-examined data; the block chain database table type comprises a user data table and a data summary table, the user data table has an operation authority of a user side and is used for storing the service data of the user, and the data summary table has an operation authority of a management platform and is used for storing the service data of all users;
and inserting the examination and approval records of the data to be examined into a data confirmation table corresponding to the type of the database table according to the examination and approval result.
2. The method of claim 1, wherein determining a corresponding approval processing policy based on the blockchain database table type to obtain an approval result of the data to be approved comprises:
if the type of the block chain database table is a user data table, monitoring the user data table through an intelligent contract node, and synchronizing the data to be audited in the user data table to the data summary table to obtain a first auditing result;
and if the type of the block chain database table is a data summary table, monitoring the data summary table through an intelligent contract node, and synchronizing the data to be audited in the data summary table to the user data table to obtain a second audit result.
3. The method of claim 2, wherein synchronizing the pending data in the user data table to the data summary table to obtain a first approval result comprises:
synchronizing the data to be examined in the user data table to the data summary table so that the management platform performs query and review processing on the data to be examined and determines a first examination result;
and acquiring the first approval result, wherein the first approval result is used for representing whether the data to be approved is wrong or not.
4. The method of claim 2, wherein synchronizing the to-be-reviewed data in the data summary table to the user data table to obtain a second review result comprises:
acquiring a user identifier corresponding to the to-be-audited data;
synchronizing the data to be examined in the data summary table to a user data table corresponding to the user identifier, so that the user end performs query and review processing on the data to be examined, and a second examination result is determined;
and acquiring the second approval result, wherein the second approval result is used for representing whether the data to be approved is wrong or not.
5. The method of claim 3, wherein inserting the approval record of the data to be approved into the data validation table corresponding to the database table type according to the approval result comprises:
when the approval result is the first approval result and the first approval result is used for representing that the data to be approved are correct, determining a data confirmation table corresponding to the data summary table as a management confirmation table, and inserting a confirmation record into the management confirmation table;
and when the approval result is the first approval result and the first approval result is used for representing that the data to be approved are wrong, determining that the data confirmation table corresponding to the data summary table is a management confirmation table, and inserting a reject record into the management confirmation table.
6. The method of claim 4, wherein inserting the approval record of the data to be approved into the data validation table corresponding to the database table type according to the approval result comprises:
when the approval result is the second approval result and the second approval result is used for representing that the data to be approved are correct, determining that a data confirmation table corresponding to the user data table is a user confirmation table, and inserting a confirmation record into the user confirmation table;
and when the approval result is the second approval result and the second approval result is used for representing that the data to be approved are wrong, determining that the data confirmation table corresponding to the user data table is a user confirmation table, and inserting a reject record into the user confirmation table.
7. The method of claim 5, wherein after inserting an approval record into the administrative confirmation table, the method further comprises:
and monitoring the management confirmation table through an intelligent contract node, and updating the auditing states of the to-be-audited data in the data total table and the user data table.
8. The method of claim 6, wherein after inserting an approval record into the user confirmation table, the method further comprises:
and monitoring the user confirmation table through an intelligent contract node, and updating the auditing states of the data to be audited in the data total table and the user data table.
9. A block chain-based data approval apparatus, comprising:
the acquisition module is used for responding to a data insertion request of a block chain database table, and acquiring to-be-audited data and the type of the block chain database table;
the processing module is used for determining a corresponding approval processing strategy based on the type of the block chain database table to obtain an approval result of the to-be-approved data; the block chain database table type comprises a user data table and a data summary table, the user data table has operation authority through a user and is used for storing the service data of the user, and the data summary table has operation authority for a management platform and is used for storing the service data of all users;
and the inserting module is used for inserting the approval record of the data to be approved into the data confirmation table corresponding to the type of the database table according to the approval result.
10. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1-8 when executing the program.
11. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-8.
CN202111460570.5A 2021-12-01 2021-12-01 Block chain based data approval method, device, equipment and storage medium Pending CN114372293A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111460570.5A CN114372293A (en) 2021-12-01 2021-12-01 Block chain based data approval method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111460570.5A CN114372293A (en) 2021-12-01 2021-12-01 Block chain based data approval method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114372293A true CN114372293A (en) 2022-04-19

Family

ID=81140201

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111460570.5A Pending CN114372293A (en) 2021-12-01 2021-12-01 Block chain based data approval method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114372293A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115130136A (en) * 2022-07-05 2022-09-30 电子科技大学 Vacation general certification system and method based on improved block chain NFT protocol

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115130136A (en) * 2022-07-05 2022-09-30 电子科技大学 Vacation general certification system and method based on improved block chain NFT protocol
CN115130136B (en) * 2022-07-05 2023-03-28 电子科技大学 Vacation general certification system and method based on improved block chain NFT protocol

Similar Documents

Publication Publication Date Title
JP6940662B2 (en) Methods and systems for the protection and verification of identities and certificates via the blockchain
CN110121727B (en) Method and system for providing authenticated, auditable and immutable input for intelligent contracts
US10135609B2 (en) Managing a database management system using a blockchain database
US9569473B1 (en) Method of controlling whether an uncompleted transaction applied against a database goes forward using either synchronous or asynchronous replication, or using either encrypted replication or unencrypted replication
US10346620B2 (en) Systems and methods for authentication of access based on multi-data source information
CN109598147B (en) Data processing method and device based on block chain and electronic equipment
KR101876674B1 (en) Method of managing common account using block chain and system performing the same
CN109919758B (en) Method and system for social savings platform via blockchain
CN114363352B (en) Cross-chain interaction method of Internet of things system based on block chain
US10972269B2 (en) Systems and methods for token vault synchronization using a distributed ledger
US10296759B1 (en) Method of controlling whether an uncompleted transaction applied against a database goes forward or is aborted, and for modifying the uncompleted transaction so that it can go forward
CN111694852B (en) Data processing method, device, terminal and storage medium based on distributed transaction
CN110192212B (en) Digital asset platform
CN114372293A (en) Block chain based data approval method, device, equipment and storage medium
US10176243B1 (en) Method and apparatus for logging non-durable attributes of an uncompleted transaction so as to make such attributes durable
CN113612766A (en) Data management device, method, computer equipment and storage medium
US20230306443A1 (en) Method and system for establishing digital identity in international trade
US11997103B2 (en) Graduated accounts using assertions
CN111709857A (en) House resource sharing method and device and electronic equipment
CN107277108B (en) Method, device and system for processing messages at nodes of block chain
CN111177171A (en) Service data authentication and management method and system based on block chain
CN115640457A (en) Information management method, apparatus, device, medium, and program product
CN112035458A (en) Data isolation method, device and equipment
US20180089445A1 (en) Access control device, method and program
CN114997977B (en) Data processing method, device, electronic equipment and computer readable medium

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