CN114372293A - Blockchain-based data approval method, device, equipment and storage medium - Google Patents
Blockchain-based data approval method, device, equipment and storage medium Download PDFInfo
- 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
- approved
- user
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 89
- 238000012790 confirmation Methods 0.000 claims abstract description 134
- 238000012545 processing Methods 0.000 claims abstract description 45
- 238000003780 insertion Methods 0.000 claims abstract description 30
- 230000037431 insertion Effects 0.000 claims abstract description 30
- 238000012552 review Methods 0.000 claims description 26
- 238000004590 computer program Methods 0.000 claims description 12
- 230000004044 response Effects 0.000 claims description 10
- 230000001360 synchronised effect Effects 0.000 claims description 8
- 238000007726 management method Methods 0.000 abstract description 55
- 230000008569 process Effects 0.000 abstract description 42
- 238000002955 isolation Methods 0.000 abstract description 6
- 238000013524 data verification Methods 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 9
- 230000006870 function Effects 0.000 description 8
- 238000004891 communication Methods 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- RTZKZFJDLAIYFH-UHFFFAOYSA-N Diethyl ether Chemical compound CCOCC RTZKZFJDLAIYFH-UHFFFAOYSA-N 0.000 description 2
- 230000009471 action Effects 0.000 description 2
- 230000007547 defect Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 239000003999 initiator Substances 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000004984 smart glass Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/64—Protecting data integrity, e.g. using checksums, certificates or signatures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
- G06F16/215—Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, 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
Description
技术领域technical field
本发明一般涉及区块链技术领域,具体涉及一种基于区块链的数据审批方法、装置、设备及存储介质。The present invention generally relates to the technical field of blockchain, and specifically relates to a method, device, device and storage medium for data approval based on blockchain.
背景技术Background technique
随着计算机技术的不断发展,数字化办工业务已经广泛地应用在人们的日常生活中,其中,该数字化办工业务可以包括办公自动化审批流程。目前,常见的办公自动化审批流程包括:财务类审批流程、行政事务类审批流程、业务相关类审批流程等。为了更好地实现办公自动化,对审批流程的自动化处理显得尤为重要。With the continuous development of computer technology, digital office business has been widely used in people's daily life, wherein the digital office business may include an office automation approval process. At present, common office automation approval processes include: financial approval processes, administrative affairs approval processes, and business-related approval processes. In order to better realize office automation, it is particularly important to automate the approval process.
目前,相关技术中的审批操作采用中心化审批流程,产生的审批流程数据均保存在中心数据库中,然而该中心数据库可能存在被黑客入侵泄漏或盗取的隐患,同时增加了交易数据被篡改的风险,存在不可信任的问题,无法保证交易数据的公平、透明和有效性。At present, the approval operation in related technologies adopts a centralized approval process, and the generated approval process data is stored in a central database. However, the central database may be hacked, leaked or stolen, which increases the risk of transaction data being tampered with. Risk, there is a problem of untrustworthiness, and the fairness, transparency and validity of transaction data cannot be guaranteed.
发明内容SUMMARY OF THE INVENTION
鉴于现有技术中的上述缺陷或不足的至少之一,期望提供一种基于区块链的数据审批方法、装置、设备及存储介质。In view of at least one of the above-mentioned defects or deficiencies in the prior art, it is desirable to provide a blockchain-based data approval method, apparatus, device and storage medium.
第一方面,本发明提供了一种基于区块链的数据审批方法,该方法包括:In a first aspect, the present invention provides a blockchain-based data approval method, the method comprising:
响应于对区块链数据库表的数据插入请求,获取待审批数据和所述区块链数据库表类型;In response to a data insertion request to the blockchain database table, obtain the data to be approved and the type of the blockchain database table;
基于所述区块链数据库表类型,确定对应的审批处理策略,得到所述待审批数据的审批结果;所述区块链数据库表类型包括用户数据表和数据总表,所述用户数据表具有用户端的操作权限,用于存储所述用户的业务数据,所述数据总表具有管理平台的操作权限,用于存储所有用户的业务数据;Based on the block chain database table type, a corresponding approval processing strategy is determined, and the approval result of the data to be approved is obtained; the block chain database table type includes a user data table and a data summary table, and the user data table has The operation authority of the user terminal is used to store the business data of the user, and the data summary table has the operation authority of the management platform, and is used to store the business data of all users;
根据所述审批结果,在与所述数据库表类型对应的数据确认表中插入所述待审批数据的审批记录。According to the approval result, the approval record of the data to be approved is inserted into the data confirmation table corresponding to the database table type.
在其中一个实施例中,基于所述区块链数据库表类型,确定对应的审批处理策略,得到所述待审批数据的审批结果,包括:In one embodiment, a corresponding approval processing strategy is determined based on the block chain database table type, and an approval result of the data to be approved is obtained, including:
若所述区块链数据库表类型为用户数据表,则通过智能合约节点监听所述用户数据表,将所述用户数据表中的待审批数据同步至所述数据总表,得到第一审批结果;If the type of the blockchain database table is a user data table, the smart contract node monitors the user data table, synchronizes the pending data in the user data table to the data master table, and obtains the first approval result ;
若所述区块链数据库表类型为数据总表,则通过智能合约节点监听所述数据总表,将所述数据总表中的待审批数据同步至所述用户数据表,得到第二审批结果。If the type of the blockchain database table is a data summary table, the smart contract node monitors the data summary table, synchronizes the data to be approved in the data summary table to the user data table, and obtains a second approval result .
在其中一个实施例中,将所述用户数据表中的待审批数据同步至所述数据总表,得到第一审批结果,包括:In one embodiment, the data to be approved in the user data table is synchronized to the data summary table to obtain a first approval result, including:
将所述用户数据表中的待审批数据同步至所述数据总表,以使得所述管理平台对所述待审批数据进行查询审核处理,确定第一审批结果;Synchronizing the data to be approved in the user data table to the general data table, so that the management platform performs query and review processing on the data to be approved, and determines the first approval result;
获取所述第一审批结果,所述第一审批结果用于表征所述待审批数据是否有误。The first approval result is acquired, where the first approval result is used to represent whether the data to be approved is incorrect.
在其中一个实施例中,将所述数据总表中的待审批数据同步至所述用户数据表,得到第二审批结果,包括:In one embodiment, the data to be approved in the general data table is synchronized to the user data table to obtain a second approval result, including:
获取所述待审批数据对应的用户标识;obtaining the user ID corresponding to the data to be approved;
将所述数据总表中的待审批数据同步至与所述用户标识对应的用户数据表,以使得所述用户端对所述待审批数据进行查询审核处理,确定第二审批结果;Synchronizing the data to be approved in the general data table to the user data table corresponding to the user identifier, so that the user terminal performs query and review processing on the data to be approved, and determines a second approval result;
获取所述第二审批结果,所述第二审批结果用于表征所述待审批数据是否有误。The second approval result is obtained, where the second approval result is used to represent whether the data to be approved is incorrect.
在其中一个实施例中,根据所述审批结果,在与所述数据库表类型对应的数据确认表中插入所述待审批数据的审批记录,包括:In one embodiment, according to the approval result, inserting the approval record of the data to be approved in the data confirmation table corresponding to the database table type, including:
当所述审批结果为所述第一审批结果且所述第一审批结果用于表征所述待审批数据无误时,确定与所述数据总表对应的数据确认表为管理确认表,且向所述管理确认表中插入确认记录;When the approval result is the first approval result and the first approval result is used to indicate that the data to be approved is correct, determine that the data confirmation table corresponding to the data summary table is the management confirmation table, and report to all Insert a confirmation record into the management confirmation form described above;
当所述审批结果为所述第一审批结果且所述第一审批结果用于表征所述待审批数据有误时,确定与所述数据总表对应的数据确认表为管理确认表,且向所述管理确认表中插入驳回记录。When the approval result is the first approval result and the first approval result is used to indicate that the data to be approved is incorrect, determine that the data confirmation table corresponding to the data summary table is the management confirmation table, and send it to the management confirmation table. A rejection record is inserted into the management confirmation form.
在其中一个实施例中,根据所述审批结果,在与所述数据库表类型对应的数据确认表中插入所述待审批数据的审批记录,包括:In one embodiment, according to the approval result, inserting the approval record of the data to be approved in the data confirmation table corresponding to the database table type, including:
当所述审批结果为所述第二审批结果且所述第二审批结果用于表征所述待审批数据无误时,确定与所述用户数据表对应的数据确认表为用户确认表,且向所述用户确认表中插入确认记录;When the approval result is the second approval result and the second approval result is used to indicate that the data to be approved is correct, determine that the data confirmation table corresponding to the user data table is the user confirmation table, and report to all Insert a confirmation record into the user confirmation form described above;
当所述审批结果为所述第二审批结果且所述第二审批结果用于表征所述待审批数据有误时,确定与所述用户数据表对应的数据确认表为用户确认表,且向所述用户确认表中插入驳回记录。When the approval result is the second approval result and the second approval result is used to indicate that the data to be approved is incorrect, it is determined that the data confirmation table corresponding to the user data table is the user confirmation table, and sent to A rejection record is inserted into the user confirmation form.
在其中一个实施例中,在向所述管理确认表中插入审批记录后,所述方法还包括:In one embodiment, after inserting the approval record into the management confirmation form, the method further includes:
通过智能合约节点监听所述管理确认表,更新所述数据总表和所述用户数据表中所述待审批数据的审核状态。Monitor the management confirmation table through the smart contract node, and update the review status of the data to be approved in the data summary table and the user data table.
在其中一个实施例中,在向所述用户确认表中插入审批记录后,所述方法还包括:In one embodiment, after inserting the approval record into the user confirmation form, the method further includes:
通过智能合约节点监听所述用户确认表,更新所述数据总表和所述用户数据表中所述待审批数据的审核状态。Monitor the user confirmation table through the smart contract node, and update the review status of the data to be approved in the data summary table and the user data table.
第二方面,本发明提供了一种基于区块链的数据审批装置,该装置包括:In a second aspect, the present invention provides a block chain-based data approval device, the device comprising:
获取模块,用于响应于对区块链数据库表的数据插入请求,获取待审批数据和所述区块链数据库表类型;an acquisition module, configured to acquire the data to be approved and the type of the block chain database table in response to a data insertion request to the block chain database table;
处理模块,用于基于所述区块链数据库表类型,确定对应的审批处理策略,得到所述待审批数据的审批结果;所述区块链数据库表类型包括用户数据表和数据总表,所述用户数据表通过用户具有操作权限,用于存储所述用户的业务数据,所述数据总表为管理平台具有操作权限,用于存储所有用户的业务数据;The processing module is used to determine the corresponding approval processing strategy based on the block chain database table type, and obtain the approval result of the data to be approved; the block chain database table type includes a user data table and a data summary table. The user data table has the operation authority through the user, and is used to store the business data of the user, and the data summary table has the operation authority for the management platform, and is used to store the business data of all users;
插入模块,用于根据所述审批结果,在与所述数据库表类型对应的数据确认表中插入所述待审批数据的审批记录。The inserting module is configured to insert 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.
第三方面,本申请实施例提供了一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现上述所述基于区块链的数据审批方法。In a third aspect, an embodiment of the present application provides a computer device, including a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned blockchain-based data approval when executing the computer program method.
第四方面,本申请实施例提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述所述基于区块链的数据审批方法。In a fourth aspect, embodiments of the present application provide a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned blockchain-based data approval method is implemented.
综上所述,本申请提供的一种基于区块链的数据审批方法、装置、设备及存储介质,通过响应于对区块链数据库表的数据插入请求,获取待审批数据和区块链数据库表类型,并基于区块链数据库表类型,确定对应的审批处理策略,得到待审批数据的审批结果,该区块链数据库表类型包括用户数据表和数据总表,其中,用户数据表具有用户端的操作权限,用于存储用户的业务数据,数据总表具有管理平台的操作权限,用于存储所有用户的业务数据,然后根据审批结果,在与数据库表类型对应的数据确认表中插入待审批数据的审批记录。该技术方案中通过将业务审批流程与区块链数据库表相结合,其链上数据权限清晰,实现了数据隔离,可以通过管理平台查看数据总表中所有用户的业务数据,用户只能在用户端查看自己的数据,并且审批流程处理全部为链上操作,使用数据确认表记录审批记录,保证了数据的可追溯和可验证,由于区块链的不可篡改和时间戳特性,使得全部审批流程可信度更高。To sum up, a blockchain-based data approval method, device, equipment and storage medium provided by this application can obtain the data to be approved and the blockchain database by responding to the data insertion request to the blockchain database table Table type, and based on the block chain database table type, determine the corresponding approval processing strategy, and obtain the approval result of the data to be approved. The block chain database table type includes user data table and data summary table, wherein the user data table has user data The operation authority of the terminal is used to store the user's business data. The data master table has the operation authority of the management platform to store the business data of all users. Then, according to the approval result, insert the pending approval into the data confirmation table corresponding to the database table type. Data approval records. In this technical solution, by combining the business approval process with the blockchain database table, the data authority on the chain is clear and data isolation is realized. The business data of all users in the data summary table can be viewed through the management platform. The terminal checks its own data, and the approval process is all processed on the chain. The data confirmation table is used to record the approval record, which ensures the traceability and verifiability of the data. Due to the immutability and timestamp characteristics of the blockchain, the entire approval process is More credibility.
附图说明Description of drawings
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本申请的其它特征、目的和优点将会变得更明显:Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
图1为本发明实施例提供的基于区块链的数据审批系统结构示意图;1 is a schematic structural diagram of a blockchain-based data approval system provided by an embodiment of the present invention;
图2为本发明实施例提供的基于区块链的数据审批方法的流程示意图;2 is a schematic flowchart of a blockchain-based data approval method provided by an embodiment of the present invention;
图3为本发明实施例提供的基于区块链的数据审批方法的流程示意图;3 is a schematic flowchart of a blockchain-based data approval method provided by an embodiment of the present invention;
图4为本发明另一个实施例提供的基于区块链的数据审批方法的流程示意图4 is a schematic flowchart of a blockchain-based data approval method provided by another embodiment of the present invention
图5为本发明实施例提供的基于区块链的数据审批方法的流程示意图FIG. 5 is a schematic flowchart of a blockchain-based data approval method provided by an embodiment of the present invention
图6为本发明实施例提供的区块链交易审计装置的流程示意图;6 is a schematic flowchart of a blockchain transaction auditing device provided by an embodiment of the present invention;
图7为本发明实施例提供的计算机系统的结构示意图。FIG. 7 is a schematic structural diagram of a computer system according to an embodiment of the present invention.
具体实施方式Detailed ways
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释相关发明,而非对该发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与发明相关的部分。The present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the related invention, but not to limit the invention. In addition, it should be noted that, for the convenience of description, only the parts related to the invention are shown in the drawings.
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。It should be noted that the embodiments in the present application and the features of the embodiments may be combined with each other in the case of no conflict. The present application will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
如背景技术中提到的,随着办公业务的不断发展,需要通过审批流程提高协同办公能力,以实现秩序化办公。目前常见的办公自动化审批流程包括:财务类审批流程、行政事务类审批流程、业务相关类审批流程等。其中,财务类审批流程可以包括费用报销、借款还款审批、工作和款项支付、款项收入审批等;行政类审批流程可以包括请假出差审批、加班审批等;业务相关审批流程例如可以包括订单的审批流程、采购审批流程、合同审批流程等。As mentioned in the background art, with the continuous development of the office business, it is necessary to improve the collaborative office ability through the approval process, so as to realize the orderly office. At present, common office automation approval processes include: financial approval process, administrative affairs approval process, business-related approval process, etc. Among them, the financial approval process may include expense reimbursement, loan repayment approval, work and payment, payment income approval, etc.; administrative approval process may include leave, business trip approval, overtime approval, etc.; business-related approval processes may include, for example, order approval. process, procurement approval process, contract approval process, etc.
目前,相关技术中的审批操作采用中心化审批流程,产生的审批流程数据均保存在中心数据库中,然而该中心数据库可能存在被黑客入侵泄漏或盗取的隐患,同时增加了交易数据被篡改的风险,存在不可信任的问题,无法保证交易数据的公平、透明和有效性。At present, the approval operation in related technologies adopts a centralized approval process, and the generated approval process data is stored in a central database. However, the central database may be hacked, leaked or stolen, which increases the risk of transaction data being tampered with. Risk, there is a problem of untrustworthiness, and the fairness, transparency and validity of transaction data cannot be guaranteed.
基于上述缺陷,本申请提供了一种基于区块链的数据审批方法、装置、设备及存储介质。与现有技术相比,该技术方案中通过将业务审批流程与区块链数据库表相结合,该链上数据权限清晰,实现了数据隔离,可以通过管理平台查看数据总表中所有用户的业务数据,用户只能在用户端查看自己的数据,并且审批流程处理全部为链上操作,使用数据确认表记录审批记录,保证了数据的可追溯和可验证,由于区块链的不可篡改和时间戳特性,使得全部审批流程可信度更高。Based on the above defects, the present application provides a blockchain-based data approval method, device, device and storage medium. Compared with the existing technology, in this technical solution, by combining the business approval process with the blockchain database table, the data authority on the chain is clear, and data isolation is realized, and the business of all users in the data summary table can be viewed through the management platform. For data, users can only view their own data on the client side, and the approval process is all on-chain operations. The data confirmation table is used to record the approval records, which ensures the traceability and verifiability of the data. Due to the immutability and time constraints of the blockchain The stamp feature makes the entire approval process more credible.
可以理解,本申请提供的基于区块链的数据审批方法可以应用于基于区块链的数据审批系统中,如图1为本申请应用场景下的系统结构图,该系统包括用户端10、管理平台20和区块链30。其中,区块链30分别与所述用户端10、管理平台20之间进行通信。It can be understood that the blockchain-based data approval method provided in this application can be applied to a blockchain-based data approval system. Figure 1 is a system structure diagram under the application scenario of the application.
上述用户端10可以是业务审批流程中待审批数据发起方使用的客户端,该待审批数据例如可以是报销数据。上述管理平台20可以为管理所有用户的业务数据的执行方,可以为区块链网络中的节点,也可以不是区块链网络中的节点,其与区块链网络中的每一节点进行通信连接。上述区块链30可以是ChainSQL链,通过在区块链上建表的方式,对用户的操作通过数据库表进行记录。The above-mentioned
需要说明的是,上述ChainSQL是基于区块链的数据库应用平台,通过将数据库表的操作以交易的方式在区块链网络上达成共识,然后存储在区块链节点和本地数据库上,实现多个数据中心同时提供服务功能,数据中心将不再有主备之分,每个数据中心均为生产中心,并互为“备份”,既提升了数据中心的服务效率,又保证了数据中心的安全运行。It should be noted that the above-mentioned ChainSQL is a database application platform based on blockchain. The operation of database tables is reached on the blockchain network in the form of transactions, and then stored on the blockchain nodes and the local database. Each data center provides service functions at the same time, and the data center will no longer be divided into active and standby data centers. Each data center is a production center and "backup" for each other, which not only improves the service efficiency of the data center, but also ensures the data center. safe operation.
上述区块链30包括多个区块链节点,该区块链节点可以包括智能合约节点,每两个区块链节点之间可以进行通信。可选的,上述用户端10、管理平台20可以运行在终端设备上,该终端设备可以是笔记本电脑、平板电脑、台式电脑、智能手机等移动式便携终端,或者该电子设备可以是智能眼镜、智能手表等智能可穿戴设备,本实施例对此不进行具体限定。上述区块链30可以是服务器,也可以是由多台服务器组成的服务器集群,或者是一个云计算服务中心。The above-mentioned
用户端10用于向区块链30发送对区块链数据库的数据插入请求,该数据插入请求包括区块链数据库表类型,以及用于当将数据总表中的待审批数据同步至用户数据表中时,对待审批数据进行查询审核处理。The
管理平台20用于向区块链30发送对区块链数据库的数据插入请求,该数据插入请求包括区块链数据库表类型,以及用于当将用户数据表中的待审批数据同步至数据总表中时,对待审批数据进行查询审核处理。The
区块链30用于响应于区块链数据库表的数据插入请求,获取待审批数据和区块链数据库表类型,并基于区块链数据库表类型,确定对应的审批处理策略,得到待审批数据的审批结果,以及用于根据审批结果,在与数据库表类型对应的数据确认表中插入待审批数据的审批记录。The
可选的,终端设备与服务器之间可以通过有线或无线网络建立通信连接。可选的,上述的无线网络或有线网络使用标准通信技术和/或协议。网络通常为因特网、但也可以是任何网络,包括但不限于局域网(Local Area Network,LAN)、城域网(Metropolitan AreaNetwork,MAN)、广域网(Wide Area Network,WAN)、移动、有线或者无线网络、专用网络或者虚拟专用网络的任何组合。Optionally, a communication connection may be established between the terminal device and the server through a wired or wireless network. Optionally, the above-mentioned wireless network or wired network uses standard communication technologies and/or protocols. The network is usually the Internet, but can be any network, including but not limited to Local Area Network (LAN), Metropolitan Area Network (MAN), Wide Area Network (WAN), mobile, wired or wireless network , private network, or any combination of virtual private networks.
为了便于理解和说明,下面通过图2至图7详细说明本申请实施例提供的基于区块链的数据审批方法、装置、设备及存储介质。For ease of understanding and description, the block chain-based data approval method, apparatus, device, and storage medium provided by the embodiments of the present application are described in detail below with reference to FIG. 2 to FIG. 7 .
图2为本申请实施例提供的基于区块链的数据审批方法的流程示意图,如图2所示,该方法可以应用于区块链网络中的节点,该方法包括:FIG. 2 is a schematic flowchart of a blockchain-based data approval method provided by an embodiment of the present application. As shown in FIG. 2 , the method can be applied to nodes in a blockchain network, and the method includes:
S101、响应于对区块链数据库表的数据插入请求,获取待审批数据和区块链数据库表类型。S101. Acquire the data to be approved and the type of the blockchain database table in response to the data insertion request to the blockchain database table.
具体地,当用户端需要基于区块链进行业务流程审批处理时,需要先在管理平台进行注册处理,可以在用户端生成链上身份标识,该链上身份标识可以是钱包地址,然后通过管理平台将系统身份标识与链上身份标识进行绑定处理,以激活用户的链上身份,从而实现用户在区块链上的注册处理。Specifically, when the client needs to conduct business process approval processing based on the blockchain, it needs to register on the management platform first, and an on-chain identity can be generated on the client. The on-chain identity can be a wallet address, and then through the management The platform binds the system identity to the on-chain identity to activate the user's on-chain identity, thereby realizing the user's registration on the blockchain.
在完成注册处理后,可以对该用户创建链上数据库表和数据确认表,该数据库表可以为用户数据表,对应的数据确认表可以为用户确认表。其中,用户数据表的命名规则为:data_用户编号;用户确认表命名规则为cofirm_用户编号。用户具有对该用户确认表和用户数据表进行操作的操作权限,可以通过用户端对这该用户确认表和用户数据表执行插入操作。After the registration process is completed, an on-chain database table and a data confirmation table may be created for the user, the database table may be a user data table, and the corresponding data confirmation table may be a user confirmation table. Among them, the naming rule of the user data table is: data_user number; the naming rule of the user confirmation table is confirm_user number. The user has the operation authority to operate the user confirmation table and the user data table, and can perform the insert operation on the user confirmation table and the user data table through the user terminal.
需要说明的是,上述用户数据表用于存储用户的业务数据,用户确认表用于存储用户对业务数据的确认信息,该确认信息可以包括业务数据中的关键字段和业务数据的数据标识。例如当业务数据为报销数据时,该确认信息可以是报销时间和报销金额等。It should be noted that the above user data table is used to store the user's service data, and the user confirmation table is used to store the user's confirmation information for the service data, and the confirmation information may include key fields in the service data and data identifiers of the service data. For example, when the business data is reimbursement data, the confirmation information may be reimbursement time and reimbursement amount.
可以理解的是,上述区块链中还可以包括数据总表和管理确认表,其中,管理平台具有对该数据总表和管理确认表进行操作的操作权限,可以通过对这该数据总表和管理确认表执行插入操作。上述数据总表用于存储所有用户的业务数据,管理确认表用于存储所有用户对业务数据的确认信息,该确认信息可以包括所有用户的业务数据中的关键字段和业务数据的数据标识。It can be understood that the above-mentioned blockchain may also include a data summary table and a management confirmation table, wherein the management platform has the operation authority to operate the data summary table and the management confirmation table. The management confirmation table performs the insert operation. The above-mentioned data summary table is used to store the business data of all users, and the management confirmation table is used to store the confirmation information of all users on the business data, and the confirmation information may include key fields in the business data of all users and data identifiers of the business data.
当用户需要对待审批数据进行审批处理时,可以向区块链发送对区块链数据库表的数据插入请求,该数据插入请求包括待审批数据,使得区块链响应于对区块链数据库表的数据插入请求,向用户数据表中插入待审批数据,以获取待审批数据和区块链数据库表类型。该区块链数据库表类型可以包括用户数据表和数据总表。其中,该待审批数据包括唯一的身份标识id,且该待审批数据为待审核状态。When the user needs to approve the data to be approved, he can send a data insertion request to the blockchain database table to the blockchain, the data insertion request includes the data to be approved, so that the blockchain responds Data insertion request, insert pending approval data into the user data table to obtain pending approval data and blockchain database table type. The block chain database table type may include user data table and data summary table. Wherein, the data to be approved includes a unique identification id, and the data to be approved is in a state of to be reviewed.
可选的,当管理平台需要对审批数据进行审批处理时,可以向区块链发送对区块链数据库表的数据插入请求,该数据插入请求包括待审批数据,使得区块链响应于对区块链数据库表的数据插入请求,向数据总表中插入待审批数据,以获取待审批数据和区块链数据库表类型。Optionally, when the management platform needs to perform approval processing on the approval data, it can send a data insertion request to the blockchain database table to the blockchain, where the data insertion request includes the data to be approved, so that the blockchain responds to the request to the blockchain. The data insertion request of the block chain database table, insert the pending data into the data master table to obtain the pending data and the block chain database table type.
本步骤中通过创建区块链数据库表、用户数据表、管理确认表和用户确认表,即通过创建总表和分表的方式实现了数据隔离,解决了授权用户限制问题,从而保证了数据的安全性。In this step, by creating a blockchain database table, user data table, management confirmation table and user confirmation table, that is, by creating a total table and sub-tables, data isolation is achieved, the problem of authorized user restrictions is solved, and the data integrity is ensured. safety.
S102、基于区块链数据库表类型,确定对应的审批处理策略,得到待审批数据的审批结果;区块链数据库表类型包括用户数据表和数据总表,用户数据表具有用户端的操作权限,用于存储用户的业务数据,数据总表具有管理平台的操作权限,用于存储所有用户的业务数据。S102. Determine the corresponding approval processing strategy based on the block chain database table type, and obtain the approval result of the data to be approved; the block chain database table type includes a user data table and a data summary table. In order to store the user's business data, the data summary table has the operation authority of the management platform and is used to store the business data of all users.
具体地,在确定出区块链数据库表类型时,可以根据区块链数据库表类型,确定对应的审批处理策略,该审批处理策略例如可以包括第一审批处理策略和第二审批处理策略,其中,该第一审批处理策略是用户数据表对应的审批处理策略,该第二审批处理策略是数据总表对应的审批处理策略。第一审批处理策略和第二审批处理策略不同。Specifically, when the block chain database table type is determined, a corresponding approval processing strategy can be determined according to the block chain database table type. For example, the approval processing strategy can include a first approval processing strategy and a second approval processing strategy, wherein , the first approval processing strategy is the approval processing strategy corresponding to the user data table, and the second approval processing strategy is the approval processing strategy corresponding to the data master table. The first approval processing strategy and the second approval processing strategy are different.
S103、根据审批结果,在与数据库表类型对应的数据确认表中插入待审批数据的审批记录。S103 , according to the approval result, insert the approval record of the data to be approved in the data confirmation table corresponding to the database table type.
在确定出对应的审批处理策略后,对待审批数据进行审批处理,从而得到审批结果。其中,当区块链数据库表类型为用户数据表,则通过智能合约节点监听用户数据表,将用户数据表中的待审批数据同步至数据总表,从而得到第一审批结果;若区块链数据库表类型为数据总表,则通过智能合约节点监听数据总表,将数据总表中的待审批数据同步至用户数据表,得到第二审批结果。After the corresponding approval processing strategy is determined, the approval processing is performed on the data to be approved, thereby obtaining the approval result. Among them, when the blockchain database table type is user data table, the smart contract node monitors the user data table, and synchronizes the pending data in the user data table to the data master table, so as to obtain the first approval result; if the blockchain If the database table type is the data summary table, the smart contract node monitors the data summary table, synchronizes the pending approval data in the data summary table to the user data table, and obtains the second approval result.
进一步地,可以根据审批结果,在数据库表类型对应的数据确认表中插入待审批数据的审批记录。其中,当数据库表类型为用户数据表时,对应的数据确认表为用户确认表;当数据库表类型为数据总表时,对应的数据确认表为管理确认表。上述审批结果用于表征待审批数据是否有误。该审批记录可以包括对待审批数据的确认记录或者驳回记录。Further, 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 database table type. Wherein, when the database table type is a user data table, the corresponding data confirmation table is a user confirmation table; when the database table type is a data summary table, the corresponding data confirmation table is a management confirmation table. The above approval result is used to indicate whether the data to be approved is incorrect. The approval record may include a confirmation record or a rejection record of the data to be approved.
本步骤中能够对数据库表实现行级控制和表级控制,且实现了数据审批记录的同步更新操作,使得适配性更强,应用于不同的业务场景。In this step, row-level control and table-level control can be implemented for database tables, and a synchronous update operation of data approval records is implemented, which makes it more adaptable and applicable to different business scenarios.
其中,行级控制是指将数据库访问控制精确到数据表行级别使数据库达到行级访问控制的能力。Among them, row-level control refers to the ability of database access control to be precise to the row-level of the data table so that the database can achieve row-level access control.
本申请提供的基于区块链的数据审批方法,通过响应于对区块链数据库表的数据插入请求,获取待审批数据和区块链数据库表类型,并基于区块链数据库表类型,确定对应的审批处理策略,得到待审批数据的审批结果,该区块链数据库表类型包括用户数据表和数据总表,其中,用户数据表具有用户端的操作权限,用于存储用户的业务数据,数据总表具有管理平台的操作权限,用于存储所有用户的业务数据,然后根据审批结果,在与数据库表类型对应的数据确认表中插入待审批数据的审批记录。该技术方案中通过将业务审批流程与区块链数据库表相结合,该链上数据权限清晰,实现了数据隔离,可以通过管理平台查看数据总表中所有用户的业务数据,用户只能在用户端查看自己的数据,并且审批流程处理全部为链上操作,使用数据确认表记录审批记录,保证了数据的可追溯和可验证,由于区块链的不可篡改和时间戳特性,使得全部审批流程可信度更高。The blockchain-based data approval method provided by this application obtains the data to be approved and the type of the blockchain database table by responding to a data insertion request to the blockchain database table, and determines the corresponding data based on the type of the blockchain database table. Approval processing strategy, get the approval result of the data to be approved, the block chain database table types include user data table and data summary table, where the user data table has the operation authority of the user side, and is used to store the user's business data. The table has the operation authority of the management platform and is used to store the business data of all users. Then, according to the approval result, the approval record of the data to be approved is inserted into the data confirmation table corresponding to the database table type. In this technical solution, by combining the business approval process with the blockchain database table, the data authority on the chain is clear and data isolation is realized. The business data of all users in the data summary table can be viewed through the management platform. The terminal checks its own data, and the approval process is all processed on the chain. The data confirmation table is used to record the approval records, which ensures the traceability and verifiability of the data. Due to the immutability and timestamp characteristics of the blockchain, all approval processes are More credibility.
可选地,作为一种可实现方式,图3为本申请实施例提供的基于区块链的数据审批方法的流程示意图。如图3所示,该方法包括:Optionally, as an implementable manner, FIG. 3 is a schematic flowchart of the blockchain-based data approval method provided by the embodiment of the present application. As shown in Figure 3, the method includes:
S201、若区块链数据库表类型为用户数据表,则通过智能合约节点监听用户数据表,将用户数据表中的待审批数据同步至数据总表。S201. If the block chain database table type is a user data table, monitor the user data table through the smart contract node, and synchronize the pending data in the user data table to the data master table.
S202、管理平台对待审批数据进行查询审核处理,确定第一审批结果。S202, the management platform performs query and review processing on the data to be approved, and determines the first approval result.
S203、当第一审批结果用于表征待审批数据无误时,确定与数据总表对应的数据确认表为管理确认表,且向管理确认表中插入确认记录。S203. When the first approval result is used to indicate that the data to be approved is correct, determine the data confirmation table corresponding to the data summary table as the management confirmation table, and insert a confirmation record into the management confirmation table.
S204、当第一审批结果用于表征待审批数据有误时,确定与数据总表对应的数据确认表为管理确认表,且向管理确认表中插入驳回记录。S204. When the first approval result is used to indicate that the data to be approved is incorrect, determine the data confirmation table corresponding to the data summary table as the management confirmation table, and insert a rejection record into the management confirmation table.
S205、通过智能合约节点监听管理确认表,更新数据总表和用户数据表中待审批数据的审核状态。S205, monitor the management confirmation table through the smart contract node, and update the review status of the data to be approved in the data master table and the user data table.
具体地,请参见图4所示,当用户端发送对区块链数据库表的数据插入请求,获取待审批数据和区块链数据库表类型,然后确定出区块链数据库表类型为用户数据表,响应于该数据插入请求,将待审批数据插入用户数据表中,该待审批数据具有唯一的身份标识,且状态为待审核状态,然后通过智能合约节点监听用户数据表,将用户数据表中的待审批数据同步至数据总表,且该待审批数据为待审核状态,然后通过管理平台对该待审批数据进行查询审核处理,以查询待审批数据是否有误,以得到第一审批结果。Specifically, as shown in Figure 4, when the client sends a data insertion request to the blockchain database table, obtains the data to be approved and the blockchain database table type, and then determines that the blockchain database table type is the user data table , in response to the data insertion request, insert the data to be approved into the user data table, the data to be approved has a unique identity, and the status is to be reviewed, and then monitor the user data table through the smart contract node, and put the user data table in the user data table. The data to be approved is synchronized to the data master table, and the data to be approved is in the state to be reviewed, and then the management platform is used to query and review the data to be approved to check whether the data to be approved is incorrect, so as to obtain the first approval result.
其中,当第一审批结果用于表征待审批数据无误时,确定与数据总表对应的数据确认表为管理确认表,且向管理确认表中插入审批记录。当第一审批结果用于表征待审批数据有误时,确定与数据总表对应的数据确认表为管理确认表,且向管理确认表中插入驳回记录。且将该确认记录或者驳回记录与待审批数据的数据标识进行关联。然后通过智能合约节点监听管理确认表,更新数据总表和用户数据表中待审批数据的审核状态,可以将审核状态更新为已审核状态。Wherein, when the first approval result is used to represent that the data to be approved is correct, the data confirmation table corresponding to the data summary table is determined as the management confirmation table, and the approval record is inserted into the management confirmation table. When the first approval result is used to indicate that the data to be approved is incorrect, the data confirmation table corresponding to the data summary table is determined as the management confirmation table, and a rejection record is inserted into the management confirmation table. And the confirmation record or rejection record is associated with the data identifier of the data to be approved. Then monitor the management confirmation table through the smart contract node, update the review status of the pending data in the data master table and the user data table, and update the review status to the reviewed status.
需要说明的是,智能合约是“执行合约条款的计算机交易协议”,区块链上的所有用户都可以看到基于区块链的智能合约,智能合约节点是区块链中执行智能合约的节点,用于监听区块链数据库表和数据确认表中的数据变化。智能合约是一种特殊协议,在区块链内制定合约时可以使用,当中内含了代码函数,亦能与其他合约进行交互、做决策、存储资料以及发送以太币等功能。It should be noted that a smart contract is a "computer transaction agreement that executes the terms of the contract", all users on the blockchain can see the smart contract based on the blockchain, and the smart contract node is the node in the blockchain that executes the smart contract , which is used to monitor data changes in the blockchain database table and data confirmation table. A smart contract is a special protocol that can be used when formulating contracts in the blockchain. It contains code functions, and can also interact with other contracts, make decisions, store data, and send ether.
本实施例中当在用户数据表中插入待审批数据时,能够将用户数据表中的待审批数据同步至数据总表,进而将对应的审批记录插入对应的管理确认表中,从而实现了通过智能合约同步确认待审批数据的状态,且审批流程全部为链上操作,实现了可追溯和可验证的效果。In this embodiment, when the data to be approved is inserted into the user data table, the data to be approved in the user data table can be synchronized to the data master table, and then the corresponding approval record is inserted into the corresponding management confirmation table, thereby realizing the The smart contract synchronously confirms the status of the data to be approved, and the approval process is all operated on the chain, achieving traceable and verifiable effects.
作为另一种可实现方式,图5为本申请实施例提供的基于区块链的数据审批方法的流程示意图。如图5所示,该方法包括:As another achievable manner, FIG. 5 is a schematic flowchart of the blockchain-based data approval method provided by the embodiment of the present application. As shown in Figure 5, the method includes:
S301、若区块链数据库表类型为数据总表,则通过智能合约节点监听数据总表,将数据总表中的待审批数据同步至用户数据表。S301. If the block chain database table type is a data summary table, monitor the data summary table through the smart contract node, and synchronize the data to be approved in the data summary table to the user data table.
S302、用户端对待审批数据进行查询审核处理,确定第二审批结果。S302. The client performs query and review processing on the data to be approved, and determines a second approval result.
S303、当第二审批结果用于表征待审批数据无误时,确定与用户数据表对应的数据确认表为用户确认表,且向用户确认表中插入确认记录。S303. When the second approval result is used to indicate that the data to be approved is correct, determine the data confirmation table corresponding to the user data table as the user confirmation table, and insert a confirmation record into the user confirmation table.
S304、当第二审批结果用于表征待审批数据有误时,确定与用户数据表对应的数据确认表为用户确认表,且向用户确认表中插入驳回记录。S304. When the second approval result is used to indicate that the data to be approved is incorrect, determine the data confirmation table corresponding to the user data table as the user confirmation table, and insert a rejection record into the user confirmation table.
S305、通过智能合约节点监听用户确认表,更新数据总表和用户数据表中待审批数据的审核状态。S305. Monitor the user confirmation table through the smart contract node, and update the review status of the data to be approved in the data summary table and the user data table.
具体地,请继续参见图5所示,当管理平台发送对区块链数据库表的数据插入请求,获取待审批数据和区块链数据库表类型,然后确定出区块链数据库表类型为数据总表,响应于该数据插入请求,将待审批数据插入数据总表中,该待审批数据具有唯一的身份标识,且状态为待审核状态,然后通过智能合约节点监听数据总表,获取待审批数据对应的用户标识,将数据总表的待审批数据同步至与用户标识对应的用户数据表,且该待审批数据为待审核状态,然后通过用户端对该待审批数据进行查询审核处理,以查询待审批数据是否有误,以得到第二审批结果。Specifically, please continue to refer to Figure 5. When the management platform sends a data insertion request to the blockchain database table, obtains the data to be approved and the blockchain database table type, and then determines that the blockchain database table type is the data total table, in response to the data insertion request, insert the data to be approved into the data summary table, the data to be approved has a unique identity, and the status is pending review, and then monitor the data summary table through the smart contract node to obtain the data to be approved For the corresponding user ID, synchronize the data to be approved in the data master table to the user data table corresponding to the user ID, and the data to be approved is in the pending review state, and then query and review the data to be approved through the client to query Check whether the data to be approved is incorrect to obtain the second approval result.
其中,当第二审批结果用于表征待审批数据无误时,确定与用户数据表对应的数据确认表为用户确认表,且向用户确认表中插入确认记录。当第二审批结果用于表征待审批数据有误时,确定与用户数据表对应的数据确认表为用户确认表,且向用户确认表中插入驳回记录。且将该确认记录或者驳回记录与待审批数据的数据标识进行关联。然后通过智能合约节点监听用户确认表,更新数据总表和用户数据表中待审批数据的审核状态,可以将审核状态更新为已审核状态。Wherein, when the second approval result is used to indicate that the data to be approved is correct, the data confirmation table corresponding to the user data table is determined as the user confirmation table, and a confirmation record is inserted into the user confirmation table. When the second approval result is used to indicate that the data to be approved is incorrect, the data confirmation table corresponding to the user data table is determined as the user confirmation table, and a rejection record is inserted into the user confirmation table. And the confirmation record or rejection record is associated with the data identifier of the data to be approved. Then monitor the user confirmation table through the smart contract node, update the review status of the data to be approved in the data summary table and the user data table, and update the review status to the reviewed status.
本实施例中当数据总表中插入待审批数据时,能够将数据总表中中的待审批数据同步至用户数据表,进而将对应的审批记录插入对应的用户确认表中,从而实现了通过智能合约同步确认待审批数据的状态,且审批流程全部为链上操作,实现了可追溯和可验证的效果,同时可以适用于不同的业务场景,扩展性强。In this embodiment, when the data to be approved is inserted into the data summary table, the pending data in the data summary table can be synchronized to the user data table, and then the corresponding approval record is inserted into the corresponding user confirmation table, thereby realizing the The smart contract synchronously confirms the status of the data to be approved, and the approval process is all operated on the chain, which achieves traceable and verifiable effects, and can be applied to different business scenarios with strong scalability.
应当注意,尽管在附图中以特定顺序描述了本发明方法的操作,但是,这并非要求或者暗示必须按照该特定顺序来执行这些操作,或是必须执行全部所示的操作才能实现期望的结果。相反,流程图中描绘的步骤可以改变执行顺序。附加地或备选地,可以省略某些步骤,将多个步骤合并为一个步骤执行,和/或将一个步骤分解为多个步骤执行。It should be noted that although the operations of the methods of the present invention are depicted in the figures in a particular order, this does not require or imply that the operations must be performed in that particular order, or that all 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 may be combined to be performed as one step, and/or one step may be decomposed into multiple steps to be performed.
另一方面,图6为本申请实施例提供的基于区块链的数据审批装置的结构示意图。如图6所示,该装置包括:On the other hand, FIG. 6 is a schematic structural diagram of a blockchain-based data approval apparatus provided by an embodiment of the present application. As shown in Figure 6, the device includes:
获取模块10,用于响应于对区块链数据库表的数据插入请求,获取待审批数据和区块链数据库表类型;The obtaining
处理模块20,用于基于区块链数据库表类型,确定对应的审批处理策略,得到待审批数据的审批结果;区块链数据库表类型包括用户数据表和数据总表,用户数据表通过用户具有操作权限,用于存储用户的业务数据,数据总表为管理平台具有操作权限,用于存储所有用户的业务数据;The
插入模块30,用于根据审批结果,在与数据库表类型对应的数据确认表中插入待审批数据的审批记录。The inserting
可选地,上述处理模块20,具体用于:Optionally, the above-mentioned
若区块链数据库表类型为用户数据表,则通过智能合约节点监听用户数据表,将用户数据表中的待审批数据同步至数据总表,得到第一审批结果;If the block chain database table type is user data table, monitor the user data table through the smart contract node, synchronize the pending data in the user data table to the data master table, and obtain the first approval result;
若区块链数据库表类型为数据总表,则通过智能合约节点监听数据总表,将数据总表中的待审批数据同步至用户数据表,得到第二审批结果。If the block chain database table type is the data summary table, the smart contract node monitors the data summary table, synchronizes the pending data in the data summary table to the user data table, and obtains the second approval result.
可选地,上述处理模块20,具体用于:Optionally, the above-mentioned
将用户数据表中的待审批数据同步至数据总表,以使得管理平台对待审批数据进行查询审核处理,确定第一审批结果;Synchronize the data to be approved in the user data table to the data master table, so that the management platform performs query and review processing on the data to be approved, and determines the first approval result;
获取第一审批结果,第一审批结果用于表征待审批数据是否有误。The first approval result is obtained, and the first approval result is used to represent whether the data to be approved is incorrect.
可选地,上述处理模块20,具体用于:Optionally, the above-mentioned
获取待审批数据对应的用户标识;Obtain the user ID corresponding to the data to be approved;
将数据总表中的待审批数据同步至与用户标识对应的用户数据表,以使得用户端对待审批数据进行查询审核处理,确定第二审批结果;Synchronizing the to-be-approved data in the data master table to the user data table corresponding to the user ID, so that the user terminal performs query and review processing on the to-be-approved data, and determines the second approval result;
获取第二审批结果,第二审批结果用于表征待审批数据是否有误。The second approval result is obtained, and the second approval result is used to represent whether the data to be approved is incorrect.
可选地,上述插入模块30,具体用于:Optionally, the above-mentioned
当审批结果为第一审批结果且第一审批结果用于表征待审批数据无误时,确定与数据总表对应的数据确认表为管理确认表,且向管理确认表中插入确认记录;When the approval result is the first approval result and the first approval result is used to indicate that the data to be approved is correct, determine the data confirmation table corresponding to the data summary table as the management confirmation table, and insert the confirmation record into the management confirmation table;
当审批结果为第一审批结果且第一审批结果用于表征待审批数据有误时,确定与数据总表对应的数据确认表为管理确认表,且向管理确认表中插入驳回记录。When the approval result is the first approval result and the first approval result is used to indicate that the data to be approved is incorrect, the data confirmation table corresponding to the data summary table is determined as the management confirmation table, and a rejection record is inserted into the management confirmation table.
可选地,上述插入模块30,具体用于:Optionally, the above-mentioned
当审批结果为第二审批结果且第二审批结果用于表征待审批数据无误时,确定与用户数据表对应的数据确认表为用户确认表,且向用户确认表中插入确认记录;When the approval result is the second approval result and the second approval result is used to represent that the data to be approved is correct, determine that the data confirmation table corresponding to the user data table is the user confirmation table, and insert a confirmation record into the user confirmation table;
当审批结果为第二审批结果且第二审批结果用于表征待审批数据有误时,确定与用户数据表对应的数据确认表为用户确认表,且向用户确认表中插入驳回记录。When the approval result is the second approval result and the second approval result is used to indicate that the data to be approved is incorrect, the data confirmation table corresponding to the user data table is determined as the user confirmation table, and a rejection record is inserted into the user confirmation table.
可选地,上述装置,还用于:Optionally, the above device is also used for:
通过智能合约节点监听管理确认表,更新数据总表和用户数据表中待审批数据的审核状态。Monitor the management confirmation table through smart contract nodes, and update the review status of the data to be approved in the data master table and user data table.
可选地,上述装置,还用于:Optionally, the above device is also used for:
通过智能合约节点监听用户确认表,更新数据总表和用户数据表中待审批数据的审核状态。Monitor the user confirmation table through the smart contract node, and update the review status of the data to be approved in the data summary table and the user data table.
本实施例提供的基于区块链的数据审批装置,可以执行上述方法的实施例,其实现原理和技术效果类似,在此不再赘述。The blockchain-based data approval device provided in this embodiment can execute the embodiments of the above method, and the implementation principle and technical effect thereof are similar, and are not repeated here.
下面参考图7,其示出了适于用来实现本申请实施例的的计算机系统600的结构示意图,该计算机系统可以应用于服务器。Referring next to FIG. 7 , it shows a schematic structural diagram of a
如图7所示,计算机系统600包括中央处理单元(CPU)601,其可以根据存储在只读存储器(ROM)602中的程序或者从存储部分603加载到随机访问存储器(RAM)603中的程序而执行各种适当的动作和处理。在RAM 603中,还存储有系统600操作所需的各种程序和数据。CPU601、ROM602以及RAM 603通过总线604彼此相连。输入/输出(I/O)接口605也连接至总线604。As shown in FIG. 7 , the
以下部件连接至I/O接口605:包括键盘、鼠标等的输入部分606;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分607;包括硬盘等的存储部分608;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分609。通信部分609经由诸如因特网的网络执行通信处理。驱动器610也根据需要连接至I/O接口605。可拆卸介质611,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器610上,以便于从其上读出的计算机程序根据需要被安装入存储部分608。The following components are connected to the I/O interface 605: an
特别地,根据本申请公开的基于区块链的数据审批方法的实施例,上文参考图6描述的过程可以被实现为计算机软件程序。例如,本申请公开的主控模块的实施例包括一种计算机程序产品,其包括有形地包含在机器可读介质上的计算机程序,该计算机程序包含用于执行图2-图4的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分605从网络上被下载和安装,和/或从可拆卸介质611被安装。In particular, according to an embodiment of the blockchain-based data approval method disclosed in the present application, the process described above with reference to FIG. 6 may be implemented as a computer software program. For example, embodiments of the master control module disclosed herein include a computer program product including a computer program tangibly embodied on a machine-readable medium, the computer program including a program for performing the methods of FIGS. 2-4 code. In such an embodiment, the computer program may be downloaded and installed from the network via the
需要说明的是,本发明所示的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本申请中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above. More specific examples of computer readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), fiber optics, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing. In this application, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
而在本申请中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、RF等等,或者上述的任意合适的组合。In this application, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device . Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, wireless, wireline, optical fiber 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 in accordance with the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more functions for implementing the specified logical function(s) executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the blocks 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 is also noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented in dedicated hardware-based systems that perform the specified functions or operations , or can be implemented in a combination of dedicated hardware and computer instructions.
描述于本申请实施例中所涉及到的单元或模块可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元或模块也可以设置在处理器中,例如,可以描述为:一种处理器包括获取模块、处理模块及插入模块。其中,这些单元或模块的名称在某种情况下并不构成对该单元或模块本身的限定,例如,获取模块还可以被描述为“用于响应于对区块链数据库表的数据插入请求,获取待审批数据和所述区块链数据库表类型”。The units or modules involved in the embodiments of the present application may be implemented in a software manner, and may also be implemented in a hardware manner. The described unit or module can also be provided in the processor, for example, it can be described as: a processor includes an acquisition module, a processing module and an insertion module. Among them, the names of these units or modules do not constitute a limitation on the unit or module itself, for example, the acquisition module can also be described as "used to respond to a data insertion request to a blockchain database table, Obtain pending data and the type of the blockchain database table".
作为另一方面,本申请还提供了一种计算机可读存储介质,该计算机可读存储介质可以是上述实施例中前述装置中所包含的计算机可读存储介质;也可以是单独存在,未装配入设备中的计算机可读存储介质。计算机可读存储介质存储有一个或者一个以上程序,前述程序被一个或者一个以上的处理器用来执行描述于本申请的基于区块链的数据审批方法,具体执行:As another aspect, the present application also provides a computer-readable storage medium, and the computer-readable storage medium may be the computer-readable storage medium included in the aforementioned apparatus in the foregoing embodiment; computer-readable storage medium in the device. The computer-readable storage medium stores one or more programs, and the aforementioned programs are used by one or more processors to execute the blockchain-based data approval method described in this application, and specifically execute:
响应于对区块链数据库表的数据插入请求,获取待审批数据和所述区块链数据库表类型;In response to a data insertion request to the blockchain database table, obtain the data to be approved and the type of the blockchain database table;
基于所述区块链数据库表类型,确定对应的审批处理策略,得到所述待审批数据的审批结果;所述区块链数据库表类型包括用户数据表和数据总表,所述用户数据表具有用户端的操作权限,用于存储所述用户的业务数据,所述数据总表具有管理平台的操作权限,用于存储所有用户的业务数据;Based on the block chain database table type, a corresponding approval processing strategy is determined, and the approval result of the data to be approved is obtained; the block chain database table type includes a user data table and a data summary table, and the user data table has The operation authority of the user terminal is used to store the business data of the user, and the data summary table has the operation authority of the management platform, and is used to store the business data of all users;
根据所述审批结果,在与所述数据库表类型对应的数据确认表中插入所述待审批数据的审批记录。According to the approval result, the approval record of the data to be approved is inserted into the data confirmation table corresponding to the database table type.
综上所述,本申请提供的一种基于区块链的数据审批方法、装置、设备及存储介质,通过响应于对区块链数据库表的数据插入请求,获取待审批数据和区块链数据库表类型,并基于区块链数据库表类型,确定对应的审批处理策略,得到待审批数据的审批结果,该区块链数据库表类型包括用户数据表和数据总表,其中,用户数据表具有用户端的操作权限,用于存储用户的业务数据,数据总表具有管理平台的操作权限,用于存储所有用户的业务数据,然后根据审批结果,在与数据库表类型对应的数据确认表中插入待审批数据的审批记录。该技术方案中通过将业务审批流程与区块链数据库表相结合,该链上数据权限清晰,实现了数据隔离,可以通过管理平台查看数据总表中所有用户的业务数据,用户只能在用户端查看自己的数据,并且审批流程处理全部为链上操作,使用数据确认表记录审批记录,保证了数据的可追溯和可验证,由于区块链的不可篡改和时间戳特性,使得全部审批流程可信度更高。To sum up, a blockchain-based data approval method, device, equipment and storage medium provided by this application can obtain the data to be approved and the blockchain database by responding to the data insertion request to the blockchain database table Table type, and based on the block chain database table type, determine the corresponding approval processing strategy, and obtain the approval result of the data to be approved. The block chain database table type includes user data table and data summary table, wherein the user data table has user data The operation authority of the terminal is used to store the user's business data. The data summary table has the operation authority of the management platform to store the business data of all users. Then, according to the approval result, insert the pending approval into the data confirmation table corresponding to the database table type. Data approval records. In this technical solution, by combining the business approval process with the blockchain database table, the data authority on the chain is clear and data isolation is realized. The business data of all users in the data summary table can be viewed through the management platform. The terminal checks its own data, and the approval process is all processed on the chain. The data confirmation table is used to record the approval records, which ensures the traceability and verifiability of the data. Due to the immutability and timestamp characteristics of the blockchain, all approval processes are More credibility.
应当注意,尽管在上文详细描述中提及了用于动作执行的设备的若干模块或者单元,但是这种划分并非强制性的。实际上,根据本公开的实施方式,上文描述的两个或更多模块或者单元的特征和功能可以在一个模块或者单元中具体化。反之,上文描述的一个模块或者单元的特征和功能可以进一步划分为由多个模块或者单元来具体化。It should be noted that although several modules or units of the apparatus for action performance are mentioned in the above detailed description, this division is not mandatory. Indeed, according to embodiments of the present disclosure, the features and functions of two or more modules or units described above may be embodied in one module or unit. Conversely, the features and functions of one module or unit described above may be further divided into multiple modules or units to be embodied.
此外,尽管在附图中以特定顺序描述了本公开中方法的各个步骤,但是,这并非要求或者暗示必须按照该特定顺序来执行这些步骤,或是必须执行全部所示的步骤才能实现期望的结果。附加的或备选地,可以省略某些步骤,将多个步骤合并为一个步骤执行,以及/或者将一个步骤分解为多个步骤执行等。通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。Additionally, although the various steps of the methods of the present disclosure are depicted in the figures in a particular order, this does not require or imply that the steps must be performed in the particular order or that all illustrated steps must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step for execution, and/or one step may be decomposed into multiple steps for execution, and the like. From the description of the above embodiments, those skilled in the art can easily understand that the exemplary embodiments described herein may be implemented by software, or may be implemented by software combined with necessary hardware.
Claims (11)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111460570.5A CN114372293A (en) | 2021-12-01 | 2021-12-01 | Blockchain-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 | Blockchain-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 | Blockchain-based data approval method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114372293A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115130136A (en) * | 2022-07-05 | 2022-09-30 | 电子科技大学 | Holiday tokenization system and method based on improved blockchain NFT protocol |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107886299A (en) * | 2017-11-06 | 2018-04-06 | 北京锐安科技有限公司 | A kind of the operation flow measures and procedures for the examination and approval and system |
WO2020056975A1 (en) * | 2018-09-19 | 2020-03-26 | 平安科技(深圳)有限公司 | Loan operation method and system based on blockchain, server and storage medium |
CN111598544A (en) * | 2020-05-18 | 2020-08-28 | 北京海益同展信息科技有限公司 | Method and apparatus for processing information |
CN112163131A (en) * | 2020-11-10 | 2021-01-01 | 平安普惠企业管理有限公司 | Configuration method and device of business data query platform, computer equipment and medium |
-
2021
- 2021-12-01 CN CN202111460570.5A patent/CN114372293A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107886299A (en) * | 2017-11-06 | 2018-04-06 | 北京锐安科技有限公司 | A kind of the operation flow measures and procedures for the examination and approval and system |
WO2020056975A1 (en) * | 2018-09-19 | 2020-03-26 | 平安科技(深圳)有限公司 | Loan operation method and system based on blockchain, server and storage medium |
CN111598544A (en) * | 2020-05-18 | 2020-08-28 | 北京海益同展信息科技有限公司 | Method and apparatus for processing information |
CN112163131A (en) * | 2020-11-10 | 2021-01-01 | 平安普惠企业管理有限公司 | Configuration method and device of business data query platform, computer equipment and medium |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115130136A (en) * | 2022-07-05 | 2022-09-30 | 电子科技大学 | Holiday tokenization system and method based on improved blockchain 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 |
---|---|---|
CN109791591B (en) | Method and system for identity and credential protection and verification via blockchain | |
US10678597B2 (en) | Event-driven blockchain workflow processing | |
KR102738475B1 (en) | Extracting data from blockchain networks | |
CN110659907B (en) | Method and device for executing intelligent contracts | |
TW202022744A (en) | Data isolation in a blockchain network | |
CN111427971B (en) | Business modeling method, device, system and medium for computer system | |
CN112291372B (en) | Asynchronous posting method, device, medium and electronic equipment for block chain | |
WO2021004058A1 (en) | Blockchain-based data processing method and device | |
CN111930833A (en) | Credit asset block chain construction method and system | |
US11961039B2 (en) | Linked blockchain structures for accelerated multi-chain verification | |
CN113807960A (en) | Cross-link processing method, device and system between heterogeneous chains and electronic equipment | |
US20200342455A1 (en) | Providing a financial/clinical data interchange | |
US20250173713A1 (en) | Method and system for privately managed digital assets on an enterprise blockchain | |
WO2020216053A1 (en) | Distributed data processing method, device, apparatus and medium | |
KR20240022462A (en) | Method and system for brokered cross-ledger stablecoin atomic swap using hashlock | |
CN114372293A (en) | Blockchain-based data approval method, device, equipment and storage medium | |
CN111274255A (en) | Business data monitoring method and system, monitoring architecture, equipment, and storage medium | |
US11477279B1 (en) | Digital assets exchange coordination | |
CN114328731A (en) | Information processing method, device, electronic equipment and storage medium | |
US20240028398A1 (en) | System, Method, And Device for Ingesting Data into Remote Computing Environments | |
CN119398779A (en) | Method, device, equipment and computer-readable medium for processing business data | |
CN118349607A (en) | Data synchronization method, system, device, equipment, storage medium and product | |
TWM650097U (en) | Long-term care trust management system | |
CN116860766A (en) | Service request processing method, device, electronic equipment and computer readable medium | |
CN119003581A (en) | Data processing method, device, equipment and storage 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 |