WO2021012911A1 - Blockchain-based resource forecast result auditing method, device, and computer apparatus - Google Patents

Blockchain-based resource forecast result auditing method, device, and computer apparatus Download PDF

Info

Publication number
WO2021012911A1
WO2021012911A1 PCT/CN2020/099436 CN2020099436W WO2021012911A1 WO 2021012911 A1 WO2021012911 A1 WO 2021012911A1 CN 2020099436 W CN2020099436 W CN 2020099436W WO 2021012911 A1 WO2021012911 A1 WO 2021012911A1
Authority
WO
WIPO (PCT)
Prior art keywords
resource
blockchain
preset
expected
expected result
Prior art date
Application number
PCT/CN2020/099436
Other languages
French (fr)
Chinese (zh)
Inventor
赵成龙
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021012911A1 publication Critical patent/WO2021012911A1/en

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

Definitions

  • This application relates to the computer field, in particular to a method, device, computer equipment and storage medium for reviewing expected results of resources based on blockchain.
  • the main purpose of this application is to provide a blockchain-based method, device, computer equipment and storage medium for reviewing expected results of resources, aiming to improve the efficiency, safety, reliability and transparency of the review process of expected results of resources.
  • this application proposes a method for reviewing expected results of resources based on blockchain, which is applied to designated terminals, including:
  • a block chain node the first block chain network includes at least a block chain node that provides resource expected calculation usage data, and the second block chain network at least includes a resource expected result review block chain node;
  • the second data change function, E(t) is the difference function of the function F(t) and the standard second data change function f(t), Is the differential function of the difference function with respect to time, min refers to the minimum value function, t is time, and m is the preset error parameter value greater than 0; when the function H(t) is not equal to m on the time axis
  • the expected result of the resource is recorded in the second blockchain network.
  • This application also provides a device for reviewing expected results of resources based on blockchain, which is applied to designated terminals, including:
  • the first data extraction unit is used to extract the first data from the preset first blockchain network, wherein the designated terminal is both a blockchain node of the first blockchain network constructed in advance, and it is also constructed in advance A blockchain node of the second blockchain network, the first blockchain network includes at least a blockchain node that provides expected calculation usage data of resources, and the second blockchain network includes at least an audit of expected results of resources Blockchain node;
  • the resource expected result obtaining unit is configured to obtain the second data of the resource collected in real time, and according to the formula:
  • the second data change function, E(t) is the difference function of the function F(t) and the standard second data change function f(t), Is the differential function of the difference function with respect to time, min refers to the minimum value function, t is time, and m is the preset error parameter value greater than 0; when the function H(t) is not equal to m on the time axis
  • the resource expected result sending unit is used to send the expected resource result to multiple resource expected result review blockchain nodes in the second blockchain network, and request multiple resource expected result review blockchain node pairs The expected results of the resources are reviewed;
  • the return information receiving unit is configured to receive return information from a plurality of resource expected result auditing blockchain nodes to audit the expected result of the resource, wherein the returned information includes the audit passed or the audit failed;
  • the block chain recording condition judgment unit is used to judge whether the returned information meets the preset block chain recording condition
  • the resource expected result recording unit is configured to record the resource expected result into the second blockchain network if the returned information meets a preset blockchain recording condition.
  • the present application also provides a computer device, including a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, a method for reviewing expected results of resources based on a blockchain is implemented;
  • the method of reviewing the expected results of blockchain resources is applied to designated terminals, including:
  • a block chain node the first block chain network includes at least a block chain node that provides resource expected calculation usage data, and the second block chain network at least includes a resource expected result review block chain node;
  • the second data change function, E(t) is the difference function of the function F(t) and the standard second data change function f(t), Is the differential function of the difference function with respect to time, min refers to the minimum value function, t is time, and m is the preset error parameter value greater than 0; when the function H(t) is not equal to m on the time axis
  • the expected result of the resource is recorded in the second blockchain network.
  • This application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, a method for reviewing the expected result of a blockchain-based resource; Results review methods, applied to designated terminals, including:
  • a block chain node the first block chain network includes at least a block chain node that provides resource expected calculation usage data, and the second block chain network at least includes a resource expected result review block chain node;
  • the second data change function, E(t) is the difference function of the function F(t) and the standard second data change function f(t), Is the differential function of the difference function with respect to time, min refers to the minimum value function, t is time, and m is the preset error parameter value greater than 0; when the function H(t) is not equal to m on the time axis
  • the expected result of the resource is recorded in the second blockchain network.
  • the blockchain-based resource expected result review method, device, computer equipment and storage medium of this application extract first data from a preset first blockchain network; acquire second data and determine whether the resource is based on the second data If it is normal, generate the expected result of the resource according to the first data; receive the return information of multiple resource expected result auditing blockchain nodes to review the expected result of the resource; if the returned information meets the preset blockchain Recording conditions, the expected result of the resource is recorded into the second blockchain network.
  • FIG. 1 is a schematic flowchart of a method for reviewing expected results of resources based on blockchain according to an embodiment of the application;
  • FIG. 2 is a schematic block diagram of the structure of a device for reviewing expected results of resources based on blockchain according to an embodiment of the application;
  • FIG. 3 is a schematic block diagram of the structure of a computer device according to an embodiment of the application.
  • an embodiment of the present application provides a method for reviewing expected results of resources based on blockchain, which is applied to a designated terminal and includes the following steps:
  • a block chain node of the network the first block chain network includes at least a block chain node that provides expected calculation usage data of resources
  • the second block chain network includes at least a block chain node that reviews expected results of resources
  • the second data change function, E(t) is the difference function of the function F(t) and the standard second data change function f(t), Is the differential function of the difference function with respect to time, min refers to the minimum value function, t is time, and m is the preset error parameter value greater than 0; when the function H(t) is not equal to m on the time axis
  • This application uses the design of the blockchain to set the designated terminal as the blockchain node of the first blockchain network and the second blockchain network at the same time, so that the first data that generates the expected result of the resource can be obtained from the first area Extract from the public ledger of the block chain network to ensure the reliability of the first data (using the characteristics of the data of the block chain that are not easily tampered with), and use the second block chain network to review and record the expected results of the resources, to ensure that the review process is transparent and improved Efficiency, further adopting the design of blockchain, separates the expected calculation and usage data of resources and the expected results of auditing resources, which is more conducive to hierarchical management and possible error traceability. And by processing the second data, it is determined whether the resource is abnormal or the data is forged, thereby improving the reliability of the expected result.
  • the first data is extracted from the preset first blockchain network, where the designated terminal is both a blockchain node of the first blockchain network constructed in advance, and it is also a pre-built blockchain node.
  • the resource is, for example, finance and finance, and the resource expectation is, for example, a budget.
  • the first block chain network and the second block chain network can be public chains, consortium chains or private chains.
  • the public ledger of the first blockchain network is used to store and provide resource expected calculation usage data, such as departmental expenditure plans formulated by the department.
  • the public ledger of the second blockchain network is used to store the expected results of resources that have passed the review. Since the designated terminal is in the first blockchain network and the second blockchain network at the same time, it has the public account book of the first blockchain network and the public account book of the second blockchain network at the same time, so that the first data -Generate expected results of resources-The data sources of the entire process of reviewing expected results of resources are authentic and credible, which improves information security. Among them, the blockchain node of the first blockchain network can record the data used to generate the expected result of the resource into the public ledger of the first blockchain network.
  • step S2 the second data of the resource collected in real time is acquired, and according to the formula:
  • the second data change function, E(t) is the difference function of the function F(t) and the standard second data change function f(t), Is the differential function of the difference function with respect to time, min refers to the minimum value function, t is time, and m is the preset error parameter value greater than 0; when the function H(t) is not equal to m on the time axis
  • the function H(t) is used to characterize the condition of the second data.
  • the value of the function H(t) is m, it means that the value of the second data is too large and is in an abnormal state; when the function H(t) takes a value
  • it is not m it means that the value of the second data is normal and in a normal state.
  • the proportion of normal time is calculated, and it is judged whether the proportion of normal time is greater than a preset threshold; if the proportion of normal time is greater than The preset proportion threshold is then based on the first data and the preset resource expectation algorithm is used to generate the expected result of the resource.
  • the first data is used to generate the expected result of the resource, so the expected result of the resource can be generated.
  • any method can be used to generate the expected result of the resource, for example: dividing income data and expenditure data from the first data; judging the income data and expenditure Whether the data is credible; if the income data and expenditure data are credible, they are recorded as credible income and credible expenditure respectively; statistics on the credible income and credible expenditure, so as to obtain credible total income and credible total expenditure ; Generate expected results of resources including the trusted total income and trusted total expenditure.
  • the first data and the second data may be related to each other or not.
  • the second data is used to laterally determine whether the data of the resource is abnormal or may be forged.
  • the second data can be determined in any manner, for example, the second data is obtained from a preset data table, wherein the data table records multiple data categories.
  • the method of obtaining the second data is, for example, random extraction.
  • the expected result of the resource is sent to multiple resource expected result auditing blockchain nodes in the second blockchain network, and multiple resource expected result auditing blockchain nodes are required
  • the expected results of the said resources are reviewed.
  • the resource expected result review blockchain node can be all the blockchain nodes in the second blockchain network, or part of the blockchain nodes.
  • the process includes: in the second blockchain network, obtaining a plurality of resource expected results auditing blockchain nodes selected according to a preset share authorization certification mechanism; reviewing blocks for all the resource expected results
  • the chain node sends an audit request, and requires the resource expected result audit blockchain node to send a reply message; receives the reply message sent by the resource expected result audit block chain node, and sets the reply message as a resource expectation willing to review
  • the result review block chain node is recorded as the final resource expected result review block chain node; the resource expected result is sent to a plurality of the final resource expected result review block chain nodes, and a plurality of the final resource expected result is required
  • the audit blockchain node audits the expected result of the resource.
  • step S4 receiving multiple return information from the resource expected result review blockchain node reviewing the expected result of the resource, wherein the return information includes the review passed or the review failed.
  • the expected results of different resources are not necessarily the same in reviewing blockchain nodes. Therefore, the results of the review may be different. They are either approved or failed.
  • this application receives the return information from multiple resource expected results auditing blockchain nodes to review the expected results of the resources, and comprehensively considers them to determine whether to record the expected results of the resources in the second blockchain network. In the public ledger.
  • the method of judging whether the returned information meets the preset blockchain recording condition can be any method, for example, when the number of audited returned information reaches a predetermined threshold condition, it is determined that the preset blockchain recording condition is satisfied; or , When the proportion of the number of returned messages that have passed the audit to the number of all returned messages is greater than the preset proportion threshold, it is determined that the preset blockchain recording conditions are met.
  • step S6 if the returned information meets the preset blockchain recording conditions, the expected result of the resource is recorded in the second blockchain network. If the returned information satisfies the preset blockchain recording conditions, it indicates that most of the audit blockchain nodes in the second blockchain network agree with the expected result of the resource, and therefore record the expected result of the resource in the In the second blockchain network. Therefore, the blockchain node in the second blockchain network can learn the expected result of the resource from the second blockchain network.
  • the resource is a resource of a designated object
  • the first data includes an estimated resource increase and an estimated resource loss of a plurality of sub-objects of the designated object, and according to the first data, use
  • the preset resource expectation algorithm, step S2 of generating the expected result of the resource includes:
  • the estimated resource consumption B 1 , B 2 ..., B n from the sub-object to the nth sub-object, and the importance parameter p 1 from the first sub-object to the n-th sub-object is obtained from the pre-stored sub-object importance relationship table , P 2 ..., p n ;
  • S203 Determine whether the sensitivity factor M is greater than a preset sensitivity threshold
  • S204 If the sensitivity factor M is not greater than a preset sensitivity threshold, generate an expected result of the resource, where the expected result of the resource includes at least an estimated resource increase and an estimated resource loss of multiple sub-objects.
  • the first data of this application includes, for example, the estimated departmental income and departmental estimated expenditures of multiple departments, and the expected results of resources can be generated based on the estimated departmental income and departmental estimated expenditures. Among them, due to the different importance of different departments, the corresponding department budget is also affected. Accordingly, this application adopts important degree parameters p 1 , p 2 ..., p n to indicate the importance of the department, and according to the formula: A sensitivity factor M is calculated, and if the sensitivity factor M is not greater than a preset sensitivity threshold, an expected result of the resource is generated, where the expected result of the resource includes at least the estimated departmental income and departmental estimated expenditures of the multiple departments.
  • the estimated income from the first department to the nth department are A 1 , A 2 ..., A n
  • the estimated expenditures from the first department to the nth department are B 1 , B 2 ..., B n . In this way, resource expectations are more targeted to ensure the resource expectations of important departments.
  • the expected result of the resource is sent to multiple resource expected result auditing blockchain nodes in the second blockchain network, and multiple resource expected result auditing blockchain node pairs are required
  • the step S3 of reviewing the expected result of the resource includes:
  • S302 Send an audit request to all the resource expected result audit blockchain nodes, and require the resource expected result audit blockchain node to send reply information;
  • This embodiment preferably adopts the share authorization certification mechanism as the consensus mechanism of the blockchain network.
  • the share authorization proof mechanism refers to that all blockchain nodes vote for multiple entrusted blockchain nodes, so that multiple entrusted blockchain nodes represent all blockchain node pairs whether to record data (such as transactions) in the public ledger Make judgments to avoid the shortcomings of slow operation of the blockchain when there are too many blockchain nodes. Accordingly, according to the expected results of multiple resources voted by the share authorization certification mechanism, the blockchain node can make a decision whether to add the expected results of the resources to the blockchain network.
  • this embodiment also uses pre-sending The method of audit request is to determine the audit blockchain nodes that are willing to audit, and record it as the final resource expected result audit blockchain node, and send the preset designated transfer route to multiple final audit blockchain nodes, This not only reduces unnecessary network overhead (the cost of sending audit requests is much less than the cost of sending resource expected results), but also ensures the accuracy of subsequent judgments (excluding nodes that cannot participate in the audit).
  • the step S5 of judging whether the returned information meets a preset blockchain recording condition includes:
  • S501 Count the return information, so as to obtain the total number of the return information received and the number of the return information passed the audit;
  • S502 Calculate the quotient of the number of returned messages that have passed the review divided by the total number of returned messages
  • S503 Determine whether the quotient is greater than a preset block chain record parameter threshold
  • This application uses the quotient of the number of returned messages that have passed the review divided by the total number of returned messages as a basis for judging whether the returned messages meet the preset blockchain recording conditions. If the quotient is greater than the preset block chain record parameter threshold, it indicates that the resource expected result audit blockchain node that recognizes the expected result of the resource has a large enough proportion of all resource expected result audit blockchain nodes, according to This determines that the returned information satisfies the preset blockchain recording conditions; if the quotient is not greater than the preset blockchain record parameter threshold, it indicates that the expected result of the resource is recognized by the expected result of the resource.
  • this application adopts the method of judging the quotient of the number of returned messages that have passed the review divided by the total number of return messages, which is more accurate than just the method of judging the number of returned messages that have passed the review, and can prevent A misjudgment caused when a large number of resources are expected to result in a failure of the audit blockchain node (for example, the communication interface between the audit blockchain node and the outside world is hijacked) and cannot participate in the audit.
  • the method includes:
  • this application also uses the return information to send a reason acquisition instruction to the resource expected result auditing blockchain node that has not passed the audit; receiving the resource expected result auditing block The reason for the failure of the audit sent by the chain node; generating a reminder message for the failure of the audit, and attaching the reason for the reason for the failure of the audit to the reminder message, so as to facilitate the correction of the expected result of the failed resource.
  • the first data is extracted from the preset first blockchain network, wherein the designated terminal is both a blockchain node of the first blockchain network constructed in advance, and it is also a pre-built blockchain node.
  • the language for creating the blockchain class can be any feasible language, such as JAVA, C++, Go language, etc. In this embodiment, C++ and Go are preferred to optimize the blockchain class.
  • the block chain class (class) is the definition of the block chain, and instantiating the block chain class is to determine the specific parameters of the block chain, so as to obtain the first block (the genesis block), thereby As the basis for the generation of other blocks. Since the genesis block is the first block, there is actually no previous block, so the hash value of the previous block is set to 0 in the genesis block.
  • the preset consensus mechanism of the second blockchain network can be any consensus mechanism, such as a workload certification mechanism, a equity certification mechanism, a Byzantine fault-tolerant mechanism, a share authorization certification mechanism, etc.
  • the preferred embodiment is a share authorization certification mechanism.
  • the method for building the first blockchain network may be the same as the method for building the second blockchain network, or may be different from the method for building the second blockchain network.
  • the designated terminal prestores a virtual machine image and a blockchain node container image, and the first data is extracted from a preset first blockchain network, wherein the designated terminal is both pre-built A block chain node of the first block chain network is also a block chain node of a pre-built second block chain network, and the first block chain network at least includes blocks that provide expected calculation usage data of resources A chain node, the second blockchain network includes at least resource expected results before step S1 of reviewing the blockchain node, including:
  • the use of virtual machine image and blockchain node container image to quickly deploy the second blockchain network is realized.
  • the virtual machine image is used to provide a basic operating environment, such as an environment for running a blockchain node container image, a programming language operating environment, or a basic toolkit.
  • the blockchain node container image saves data such as a public account book (for example, the existing approval record of the current approval system is converted to a public account book), which is used to enable the terminal to have the terminal after installing and starting the blockchain node container image Become a basic condition for a blockchain node (for example, it is necessary to obtain information such as the IP address of other blockchain nodes, and inform other blockchain nodes of the terminal's IP address and other information to complete joining the blockchain network).
  • the method for adding blockchain nodes to the first blockchain network may be the same as or different from that of the second blockchain network.
  • an embodiment of the present application provides a device for reviewing expected results of resources based on a blockchain, which is applied to a designated terminal, and includes:
  • the first data extraction unit 10 is configured to extract first data from a preset first blockchain network, where the designated terminal is both a blockchain node of the first blockchain network constructed in advance, and also a pre-built blockchain node.
  • the resource expected result obtaining unit 20 is configured to obtain the second data of the resource collected in real time, and according to the formula:
  • the second data change function, E(t) is the difference function of the function F(t) and the standard second data change function f(t), Is the differential function of the difference function with respect to time, min refers to the minimum value function, t is time, and m is the preset error parameter value greater than 0; when the function H(t) is not equal to m on the time axis
  • the resource expected result sending unit 30 is configured to send the expected resource result to multiple resource expected result review blockchain nodes in the second blockchain network, and request multiple resource expected result review blockchain nodes Review the expected results of the resources;
  • the return information receiving unit 40 is configured to receive return information from a plurality of resource expected result review blockchain nodes reviewing the resource expected result, wherein the return information includes the review passed or the review failed;
  • the block chain recording condition judging unit 50 is configured to judge whether the returned information meets the preset block chain recording condition
  • the resource expected result recording unit 60 is configured to record the resource expected result in the second blockchain network if the returned information meets a preset blockchain recording condition.
  • the resource is a resource of a designated object
  • the first data includes the estimated resource increase and the estimated resource loss of multiple sub-objects of the designated object
  • the resource expected result acquisition unit 20 includes :
  • Sensitivity factor M is used to calculate sub-units according to the formula: Calculate the sensitivity factor M;
  • the sensitivity threshold judgment subunit is used to judge whether the sensitivity factor M is greater than a preset sensitivity threshold
  • the resource expected result generation subunit is configured to generate an expected resource result if the sensitivity factor M is not greater than a preset sensitivity threshold, wherein the expected resource result includes at least the estimated resource increase and estimated resource loss of multiple sub-objects .
  • the resource expected result sending unit 30 includes:
  • the auditing block chain node obtaining subunit is used for obtaining expected results of multiple resources voted according to a preset consensus mechanism in the second block chain network, and auditing block chain nodes;
  • the audit request sending subunit is used to send an audit request to all the resource expected result audit blockchain nodes, and request the resource expected result audit blockchain node to send reply information;
  • the reply information receiving subunit is used to receive the reply information sent by the resource expected result review blockchain node, and record the reply information as the resource expected result review block chain node willing to review as the final resource expected result review area Block chain node;
  • the resource expected result sending subunit is used to send the expected result of the resource to a plurality of the expected result of the final resource review blockchain node, and request the expected result of the final resource to review the blockchain node for the resource The expected results are reviewed.
  • the block chain recording condition judging unit 50 includes:
  • the return information statistics subunit is used to count the return information, so as to obtain the total number of the return information received and the number of the return information passed the audit;
  • Quotient calculation subunit used to calculate the quotient of the number of returned messages that passed the review divided by the total number of returned messages
  • the parameter threshold judging subunit is used to judge whether the quotient is greater than a preset blockchain record parameter threshold
  • the condition satisfaction determination subunit is configured to determine that the returned information meets the preset blockchain recording condition if the quotient is greater than a preset blockchain recording parameter threshold.
  • the device includes:
  • the reason acquisition instruction sending unit is configured to, if the return information does not meet the preset blockchain recording conditions, send the reason acquisition instruction to the resource expected result auditing blockchain node whose return information is not passed, and the reason acquisition The instruction is used to instruct the resource expected result review blockchain node to send the reason for the failure of the review to the designated terminal;
  • the reason receiving unit is used to receive the reason for the failure of the audit sent by the resource expected result audit blockchain node
  • the reason list judgment unit is used to judge whether the reason for the failure of the review exists in the preset reason list
  • the recording unit is not allowed, which is used to if the reason for the failure of the audit is in the preset reason list, the expected result of the resource is not allowed to be recorded in the second blockchain network, and generates the failure of the audit And attach the reason for the failure of the review to the reminder message.
  • the device includes:
  • the block chain creation unit is used to create a block chain class by using the Go language, and assign parameters to the block chain class to obtain the genesis block, and to use the previous block in the genesis block
  • the hash value of is set to 0;
  • the other block generating unit is configured to generate other blocks based on the genesis block, wherein the other blocks record the hash value of the previous block;
  • the second blockchain network construction unit is configured to use a preset terminal as a blockchain node of the second blockchain network to build the second blockchain network.
  • the designated terminal prestores a virtual machine image and a blockchain node container image
  • the device includes:
  • the joining request receiving unit is configured to receive a request to join a second blockchain network sent by an application terminal, and the request to join the second blockchain network is attached with the identity information of the application terminal;
  • the allowed joining list judging unit is used to judge whether the identity information of the applying terminal is in the preset allowed joining list
  • An image sending unit configured to send the virtual machine image and the blockchain node container image to the application terminal if the identity information of the application terminal is in the preset allowable join list;
  • An IP address and communication port obtaining unit configured to obtain the IP address and communication port of the application terminal
  • the IP address and communication port sending unit is used to send the pre-stored IP address and communication port information of all blockchain nodes of the second blockchain network to the application terminal, and to all areas of the second blockchain network
  • the block chain node sends the IP address and communication port information of the application terminal, thereby adding the application terminal to the second blockchain network, wherein the application terminal has been installed in the virtual machine image and started all The image of the blockchain node container.
  • an embodiment of the present application also provides a computer device.
  • the computer device may be a server, and its internal structure may be as shown in the figure.
  • the computer equipment includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the computer designed processor is used to provide calculation and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, a computer program, and a database.
  • the memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium.
  • the database of the computer equipment is used to store the data used in the method of reviewing the expected results of resources based on the blockchain.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the processor executes the foregoing blockchain-based resource expected result review method, applied to a designated terminal, and includes: extracting first data from a preset first blockchain network, wherein the designated terminal is both a pre-built first A block chain node of the block chain network is also a block chain node of a pre-built second block chain network.
  • the first block chain network includes at least a block chain node that provides expected calculation usage data of resources
  • the second data change function, E(t) is the difference function of the function F(t) and the standard second data change function f(t), Is the differential function of the difference function with respect to time, min refers to the minimum value function, t is time, and m is the preset error parameter value greater than 0; when the function H(t) is not equal to m on the time axis
  • An embodiment of the present application also provides a computer-readable storage medium.
  • the computer-readable storage medium may be non-volatile or volatile, and has a computer program stored thereon, which is realized when the computer program is executed by a processor.
  • the method for reviewing the expected results of resources based on the blockchain, applied to a designated terminal includes: extracting first data from a preset first blockchain network, wherein the designated terminal is both a pre-built first blockchain network
  • a block chain node is also a block chain node of a second pre-built block chain network.
  • the first block chain network includes at least a block chain node that provides data on the expected computing usage of resources.
  • the second data change function, E(t) is the difference function of the function F(t) and the standard second data change function f(t), Is the differential function of the difference function with respect to time, min refers to the minimum value function, t is time, and m is the preset error parameter value greater than 0; when the function H(t) is not equal to m on the time axis

Abstract

The present application discloses a blockchain-based resource forecast result auditing method, a device, a computer apparatus, and a storage medium. The method comprises: extracting first data from a pre-determined first blockchain network; acquiring second data of a resource collected in a real-time manner, and acquiring a function H(t) according to formula (I); calculating a normal time ratio according to the following formula: normal time ratio = first time length/(first time length + second time length); if the normal time ratio is greater than a pre-determined ratio threshold, generating a resource forecast result; sending the resource forecast result to multiple auditing blockchain nodes; receiving return information relating to the resource forecast result audited by multiple resource forecast result-auditing blockchain nodes; and if a pre-determined blockchain logging condition is met, logging the resource forecast result in a second blockchain network. The invention improves efficiency, security, reliability, and auditing process transparency for resource forecast result auditing.

Description

基于区块链的资源预期结果审核方法、装置和计算机设备Method, device and computer equipment for reviewing expected results of resources based on blockchain
本申请要求于2019年7月22日提交中国专利局、申请号为201910662222.2,发明名称为“基于区块链的资源预期结果审核方法、装置和计算机设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed with the Chinese Patent Office on July 22, 2019, the application number is 201910662222.2, and the invention title is "Blockchain-based resource expected result review method, device and computer equipment". All of them The content is incorporated in this application by reference.
技术领域Technical field
本申请涉及到计算机领域,特别是涉及到一种基于区块链的资源预期结果审核方法、装置、计算机设备和存储介质。This application relates to the computer field, in particular to a method, device, computer equipment and storage medium for reviewing expected results of resources based on blockchain.
背景技术Background technique
资源预期例如预算是现代生产中经常使用的技术手段,用以预计将来一段时间的收入与支出。发明人意识到,传统技术中对于预算的生成与审核,一般采用人工手段进行制定预算计划与人工审核预算是否合适,在具体的预算的生成与审核过程中需要耗费大量的人力与物力,并且因为传统技术的方式不能实现信息的透明化、数据容易受到篡改。并且传统技术对于生成预算的对象没有有效地判断其数据是否正常,是否存在异常或者伪造数据的能力。因此传统技术具有效率低、过程不透明并且信息安全性低、可靠性低等缺陷。Resource expectations, such as budgets, are technical means often used in modern production to predict revenue and expenditure for a period of time in the future. The inventor realizes that in traditional technology for budget generation and review, manual methods are generally used to formulate budget plans and manually review whether the budget is appropriate. In the process of generating and reviewing specific budgets, it takes a lot of manpower and material resources, and because The method of traditional technology cannot realize the transparency of information, and the data is vulnerable to tampering. Moreover, the traditional technology does not have the ability to effectively judge whether the data is normal, whether there is abnormality or forged data for the object that generates the budget. Therefore, traditional technologies have disadvantages such as low efficiency, opaque processes, low information security, and low reliability.
技术问题technical problem
本申请的主要目的为提供一种基于区块链的资源预期结果审核方法、装置、计算机设备和存储介质,旨在提高资源预期结果审核的效率、安全性、可靠性和审核过程的透明性。The main purpose of this application is to provide a blockchain-based method, device, computer equipment and storage medium for reviewing expected results of resources, aiming to improve the efficiency, safety, reliability and transparency of the review process of expected results of resources.
技术解决方案Technical solutions
为了实现上述目的,本申请提出一种基于区块链的资源预期结果审核方法,应用于指定终端,包括:In order to achieve the above objectives, this application proposes a method for reviewing expected results of resources based on blockchain, which is applied to designated terminals, including:
从预设的第一区块链网络中提取第一数据,其中所述指定终端既是预先构建的第一区块链网络的一个区块链节点,又是预先构建的第二区块链网络的一个区块链节点,所述第一区块链网络至少包括提供资源预期计算使用数据的区块链节点,所述第二区块链网络至少包括资源预期结果审核区块链节点;Extract the first data from the preset first blockchain network, where the designated terminal is both a blockchain node of the pre-built first blockchain network and a pre-built second blockchain network A block chain node, the first block chain network includes at least a block chain node that provides resource expected calculation usage data, and the second block chain network at least includes a resource expected result review block chain node;
获取实时采集的所述资源的第二数据,并根据公式:Acquire the second data of the resource collected in real time, and according to the formula:
H(t)=min(G(t),m),其中
Figure PCTCN2020099436-appb-000001
E(t)=F(t)-f(t),获取函数H(t),其中F(t)为所述资源的第二数据随时间变化的函数,f(t)为预设的标准第二数据变化函数,E(t)为所述函数F(t)与所述标准第二数据变化函数f(t)的差值函数,
Figure PCTCN2020099436-appb-000002
为所述差值函数对时间的微分函数,min指最小值函数,t为时间,m为预设的大于0的误差参数值;获取所述函数H(t)在时间轴上不等于m时的第一时间长度和等于m时的第二时间长度,并根据公式:正常时间占比=所述第一时间长度/(所述第一时间长度+所述第二时间长度),计算出所述正常时间占比,并判断所述正常时间占比是否大于预设占比阈值;若所述正常时间占比大于预设占比阈值,则根据所述第一数据,利用预设的资源预期算法,生成资源预期结果;
H(t)=min(G(t),m), where
Figure PCTCN2020099436-appb-000001
E(t)=F(t)-f(t), get the function H(t), where F(t) is the function of the second data of the resource changing with time, f(t) is the preset standard The second data change function, E(t) is the difference function of the function F(t) and the standard second data change function f(t),
Figure PCTCN2020099436-appb-000002
Is the differential function of the difference function with respect to time, min refers to the minimum value function, t is time, and m is the preset error parameter value greater than 0; when the function H(t) is not equal to m on the time axis The first time length and the second time length when it is equal to m, and according to the formula: normal time ratio=the first time length/(the first time length+the second time length), calculate all The normal time ratio, and determine whether the normal time ratio is greater than the preset ratio threshold; if the normal time ratio is greater than the preset ratio threshold, use the preset resource expectation according to the first data Algorithm to generate expected results of resources;
将所述资源预期结果发送给所述第二区块链网络中的多个资源预期结果审核区块链节点,并要求多个资源预期结果审核区块链节点对所述资源预期结果进行审核;Sending the expected resource result to multiple resource expected result review blockchain nodes in the second blockchain network, and request multiple resource expected result review blockchain nodes to review the resource expected result;
接收多个资源预期结果审核区块链节点对所述资源预期结果进行审核的返回信息,其中所述返回信息包括审核通过或者审核未通过;Receiving a plurality of resource expected results reviewing the return information of the expected result of the resource by the blockchain node, where the return information includes the review passed or the review failed;
判断所述返回信息是否满足预设的区块链记录条件;Determine whether the returned information meets preset blockchain recording conditions;
若所述返回信息满足预设的区块链记录条件,则将所述资源预期结果记录入所述第二区块链网络中。If the returned information satisfies a preset blockchain recording condition, the expected result of the resource is recorded in the second blockchain network.
本申请还提供一种基于区块链的资源预期结果审核装置,应用于指定终端,包括:This application also provides a device for reviewing expected results of resources based on blockchain, which is applied to designated terminals, including:
第一数据提取单元,用于从预设的第一区块链网络中提取第一数据,其中所述指定终端既是预先构建的第一区块链网络的一个区块链节点,又是预先构建的第二区块链网络的一个区块链节点,所述第一区块链网络至少包括提供资源预期计算使用数据的区块链节点,所述第二区块链网络至少包括资源预期结果审核区块链节点;The first data extraction unit is used to extract the first data from the preset first blockchain network, wherein the designated terminal is both a blockchain node of the first blockchain network constructed in advance, and it is also constructed in advance A blockchain node of the second blockchain network, the first blockchain network includes at least a blockchain node that provides expected calculation usage data of resources, and the second blockchain network includes at least an audit of expected results of resources Blockchain node;
资源预期结果获取单元,用于获取实时采集的所述资源的第二数据,并根据公式:The resource expected result obtaining unit is configured to obtain the second data of the resource collected in real time, and according to the formula:
H(t)=min(G(t),m),其中
Figure PCTCN2020099436-appb-000003
E(t)=F(t)-f(t),获取函数H(t),其中F(t)为所述资源的第二数据随时间变化的函数,f(t)为预设的标准第二数据变化函数,E(t)为所述函数F(t)与所述标准第二数据变化函数f(t)的差值函数,
Figure PCTCN2020099436-appb-000004
为所述差值函数对时间的微分函数,min指最小值函数,t为时间,m为预设的大于0的误差参数值;获取所述函数H(t)在时间轴上不等于m时的第一时间长度和等于m时的第二时间长度,并根据公式:正常时间占比=所述第一时间长度/(所述第一时间长度+所述第二时间长度),计算出所述正常时间占比,并判断所述正常时间占比是否大于预设占比阈值;若所述正常时间占比大于预设占比阈值,则根据所述第一数据,利用预设的资源预期算法,生成资源预期结果;
H(t)=min(G(t),m), where
Figure PCTCN2020099436-appb-000003
E(t)=F(t)-f(t), get the function H(t), where F(t) is the function of the second data of the resource changing with time, f(t) is the preset standard The second data change function, E(t) is the difference function of the function F(t) and the standard second data change function f(t),
Figure PCTCN2020099436-appb-000004
Is the differential function of the difference function with respect to time, min refers to the minimum value function, t is time, and m is the preset error parameter value greater than 0; when the function H(t) is not equal to m on the time axis The first time length and the second time length when it is equal to m, and according to the formula: normal time ratio=the first time length/(the first time length+the second time length), calculate all The normal time ratio, and determine whether the normal time ratio is greater than the preset ratio threshold; if the normal time ratio is greater than the preset ratio threshold, use the preset resource expectation according to the first data Algorithm to generate expected results of resources;
资源预期结果发送单元,用于将所述资源预期结果发送给所述第二区块链网络中的多个资源预期结果审核区块链节点,并要求多个资源预期结果审核区块链节点对所述资源预期结果进行审核;The resource expected result sending unit is used to send the expected resource result to multiple resource expected result review blockchain nodes in the second blockchain network, and request multiple resource expected result review blockchain node pairs The expected results of the resources are reviewed;
返回信息接收单元,用于接收多个资源预期结果审核区块链节点对所述资源预期结果进行审核的返回信息,其中所述返回信息包括审核通过或者审核未通过;The return information receiving unit is configured to receive return information from a plurality of resource expected result auditing blockchain nodes to audit the expected result of the resource, wherein the returned information includes the audit passed or the audit failed;
区块链记录条件判断单元,用于判断所述返回信息是否满足预设的区块链记录条件;The block chain recording condition judgment unit is used to judge whether the returned information meets the preset block chain recording condition;
资源预期结果记录单元,用于若所述返回信息满足预设的区块链记录条件,则将所述资源预期结果记录入所述第二区块链网络中。The resource expected result recording unit is configured to record the resource expected result into the second blockchain network if the returned information meets a preset blockchain recording condition.
本申请还提供一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现一种基于区块链的资源预期结果审核方法;所述基于区块链的资源预期结果审核方法,应用于指定终端,包括:The present application also provides a computer device, including a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, a method for reviewing expected results of resources based on a blockchain is implemented; The method of reviewing the expected results of blockchain resources is applied to designated terminals, including:
从预设的第一区块链网络中提取第一数据,其中所述指定终端既是预先构建的第一区块链网络的一个区块链节点,又是预先构建的第二区块链网络的一个区块链节点,所述第一区块链网络至少包括提供资源预期计算使用数据的区块链节点,所述第二区块链网络至少包括资源预期结果审核区块链节点;Extract the first data from the preset first blockchain network, where the designated terminal is both a blockchain node of the pre-built first blockchain network and a pre-built second blockchain network A block chain node, the first block chain network includes at least a block chain node that provides resource expected calculation usage data, and the second block chain network at least includes a resource expected result review block chain node;
获取实时采集的所述资源的第二数据,并根据公式:Acquire the second data of the resource collected in real time, and according to the formula:
H(t)=min(G(t),m),其中
Figure PCTCN2020099436-appb-000005
E(t)=F(t)-f(t),获取函数H(t),其中F(t)为所述资源的第二数据随时间变化的函数,f(t)为预设的标准第二数据变化函数,E(t)为所述函数F(t)与所述标准第二数据变化函数f(t)的差值函数,
Figure PCTCN2020099436-appb-000006
为所述差值函数对时间的微分函数,min指最小值函数,t为时间,m为预设的大于0的误差参数值;获取所述函数H(t)在时间轴上不等于m时的第一时间长度和等于m时的第二时间长度,并根据公式:正常时间占比=所述第一时间长度/(所述第一时间长度+所述第二时间长度),计算出所述正常时间占比,并判断所述正常时间占比是否大于预设占比阈值;若所述正常时间占比大于预设占比阈值,则根据所述第一数据,利用预设的资源预期算法,生成资源预期结果;
H(t)=min(G(t),m), where
Figure PCTCN2020099436-appb-000005
E(t)=F(t)-f(t), get the function H(t), where F(t) is the function of the second data of the resource changing with time, f(t) is the preset standard The second data change function, E(t) is the difference function of the function F(t) and the standard second data change function f(t),
Figure PCTCN2020099436-appb-000006
Is the differential function of the difference function with respect to time, min refers to the minimum value function, t is time, and m is the preset error parameter value greater than 0; when the function H(t) is not equal to m on the time axis The first time length and the second time length when it is equal to m, and according to the formula: normal time ratio=the first time length/(the first time length+the second time length), calculate all The normal time ratio, and determine whether the normal time ratio is greater than the preset ratio threshold; if the normal time ratio is greater than the preset ratio threshold, use the preset resource expectation according to the first data Algorithm to generate expected results of resources;
将所述资源预期结果发送给所述第二区块链网络中的多个资源预期结果审核区块链节点,并要求多个资源预期结果审核区块链节点对所述资源预期结果进行审核;Sending the expected resource result to multiple resource expected result review blockchain nodes in the second blockchain network, and request multiple resource expected result review blockchain nodes to review the resource expected result;
接收多个资源预期结果审核区块链节点对所述资源预期结果进行审核的返回信息,其 中所述返回信息包括审核通过或者审核未通过;Receiving a plurality of resource expected results reviewing the return information of the expected result of the resource by the blockchain node, where the return information includes the review passed or the review failed;
判断所述返回信息是否满足预设的区块链记录条件;Determine whether the returned information meets preset blockchain recording conditions;
若所述返回信息满足预设的区块链记录条件,则将所述资源预期结果记录入所述第二区块链网络中。If the returned information satisfies a preset blockchain recording condition, the expected result of the resource is recorded in the second blockchain network.
本申请提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现一种基于区块链的资源预期结果审核方法;所述基于区块链的资源预期结果审核方法,应用于指定终端,包括:This application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, a method for reviewing the expected result of a blockchain-based resource; Results review methods, applied to designated terminals, including:
从预设的第一区块链网络中提取第一数据,其中所述指定终端既是预先构建的第一区块链网络的一个区块链节点,又是预先构建的第二区块链网络的一个区块链节点,所述第一区块链网络至少包括提供资源预期计算使用数据的区块链节点,所述第二区块链网络至少包括资源预期结果审核区块链节点;Extract the first data from the preset first blockchain network, where the designated terminal is both a blockchain node of the pre-built first blockchain network and a pre-built second blockchain network A block chain node, the first block chain network includes at least a block chain node that provides resource expected calculation usage data, and the second block chain network at least includes a resource expected result review block chain node;
获取实时采集的所述资源的第二数据,并根据公式:Acquire the second data of the resource collected in real time, and according to the formula:
H(t)=min(G(t),m),其中
Figure PCTCN2020099436-appb-000007
E(t)=F(t)-f(t),获取函数H(t),其中F(t)为所述资源的第二数据随时间变化的函数,f(t)为预设的标准第二数据变化函数,E(t)为所述函数F(t)与所述标准第二数据变化函数f(t)的差值函数,
Figure PCTCN2020099436-appb-000008
为所述差值函数对时间的微分函数,min指最小值函数,t为时间,m为预设的大于0的误差参数值;获取所述函数H(t)在时间轴上不等于m时的第一时间长度和等于m时的第二时间长度,并根据公式:正常时间占比=所述第一时间长度/(所述第一时间长度+所述第二时间长度),计算出所述正常时间占比,并判断所述正常时间占比是否大于预设占比阈值;若所述正常时间占比大于预设占比阈值,则根据所述第一数据,利用预设的资源预期算法,生成资源预期结果;
H(t)=min(G(t),m), where
Figure PCTCN2020099436-appb-000007
E(t)=F(t)-f(t), get the function H(t), where F(t) is the function of the second data of the resource changing with time, f(t) is the preset standard The second data change function, E(t) is the difference function of the function F(t) and the standard second data change function f(t),
Figure PCTCN2020099436-appb-000008
Is the differential function of the difference function with respect to time, min refers to the minimum value function, t is time, and m is the preset error parameter value greater than 0; when the function H(t) is not equal to m on the time axis The first time length and the second time length when it is equal to m, and according to the formula: normal time ratio=the first time length/(the first time length+the second time length), calculate all The normal time ratio, and determine whether the normal time ratio is greater than the preset ratio threshold; if the normal time ratio is greater than the preset ratio threshold, use the preset resource expectation according to the first data Algorithm to generate expected results of resources;
将所述资源预期结果发送给所述第二区块链网络中的多个资源预期结果审核区块链节点,并要求多个资源预期结果审核区块链节点对所述资源预期结果进行审核;Sending the expected resource result to multiple resource expected result review blockchain nodes in the second blockchain network, and request multiple resource expected result review blockchain nodes to review the resource expected result;
接收多个资源预期结果审核区块链节点对所述资源预期结果进行审核的返回信息,其中所述返回信息包括审核通过或者审核未通过;Receiving a plurality of resource expected results reviewing the return information of the expected result of the resource by the blockchain node, where the return information includes the review passed or the review failed;
判断所述返回信息是否满足预设的区块链记录条件;Determine whether the returned information meets preset blockchain recording conditions;
若所述返回信息满足预设的区块链记录条件,则将所述资源预期结果记录入所述第二区块链网络中。If the returned information satisfies a preset blockchain recording condition, the expected result of the resource is recorded in the second blockchain network.
有益效果Beneficial effect
本申请的基于区块链的资源预期结果审核方法、装置、计算机设备和存储介质,从预设的第一区块链网络中提取第一数据;获取第二数据并根据第二数据判断资源是否正常,再根据所述第一数据,生成资源预期结果;接收多个资源预期结果审核区块链节点对所述资源预期结果进行审核的返回信息;若所述返回信息满足预设的区块链记录条件,则将所述资源预期结果记录入所述第二区块链网络中。从而解决了传统技术效率低、过程不透明并且信息安全性低等缺陷。The blockchain-based resource expected result review method, device, computer equipment and storage medium of this application extract first data from a preset first blockchain network; acquire second data and determine whether the resource is based on the second data If it is normal, generate the expected result of the resource according to the first data; receive the return information of multiple resource expected result auditing blockchain nodes to review the expected result of the resource; if the returned information meets the preset blockchain Recording conditions, the expected result of the resource is recorded into the second blockchain network. This solves the shortcomings of traditional technology such as low efficiency, opaque processes and low information security.
附图说明Description of the drawings
图1为本申请一实施例的基于区块链的资源预期结果审核方法的流程示意图;FIG. 1 is a schematic flowchart of a method for reviewing expected results of resources based on blockchain according to an embodiment of the application;
图2为本申请一实施例的基于区块链的资源预期结果审核装置的结构示意框图;2 is a schematic block diagram of the structure of a device for reviewing expected results of resources based on blockchain according to an embodiment of the application;
图3为本申请一实施例的计算机设备的结构示意框图。FIG. 3 is a schematic block diagram of the structure of a computer device according to an embodiment of the application.
本申请的最佳实施方式The best implementation of this application
参照图1,本申请实施例提供一种基于区块链的资源预期结果审核方法,应用于指定终端,包括以下步骤:1, an embodiment of the present application provides a method for reviewing expected results of resources based on blockchain, which is applied to a designated terminal and includes the following steps:
S1、从预设的第一区块链网络中提取第一数据,其中所述指定终端既是预先构建的第 一区块链网络的一个区块链节点,又是预先构建的第二区块链网络的一个区块链节点,所述第一区块链网络至少包括提供资源预期计算使用数据的区块链节点,所述第二区块链网络至少包括资源预期结果审核区块链节点;S1. Extract the first data from the preset first blockchain network, where the designated terminal is both a blockchain node of the pre-built first blockchain network and the pre-built second blockchain A block chain node of the network, the first block chain network includes at least a block chain node that provides expected calculation usage data of resources, and the second block chain network includes at least a block chain node that reviews expected results of resources;
S2、获取实时采集的所述资源的第二数据,并根据公式:S2. Acquire the second data of the resource collected in real time, and according to the formula:
H(t)=min(G(t),m),其中
Figure PCTCN2020099436-appb-000009
E(t)=F(t)-f(t),获取函数H(t),其中F(t)为所述资源的第二数据随时间变化的函数,f(t)为预设的标准第二数据变化函数,E(t)为所述函数F(t)与所述标准第二数据变化函数f(t)的差值函数,
Figure PCTCN2020099436-appb-000010
为所述差值函数对时间的微分函数,min指最小值函数,t为时间,m为预设的大于0的误差参数值;获取所述函数H(t)在时间轴上不等于m时的第一时间长度和等于m时的第二时间长度,并根据公式:正常时间占比=所述第一时间长度/(所述第一时间长度+所述第二时间长度),计算出所述正常时间占比,并判断所述正常时间占比是否大于预设占比阈值;若所述正常时间占比大于预设占比阈值,则根据所述第一数据,利用预设的资源预期算法,生成资源预期结果;
H(t)=min(G(t),m), where
Figure PCTCN2020099436-appb-000009
E(t)=F(t)-f(t), get the function H(t), where F(t) is the function of the second data of the resource changing with time, f(t) is the preset standard The second data change function, E(t) is the difference function of the function F(t) and the standard second data change function f(t),
Figure PCTCN2020099436-appb-000010
Is the differential function of the difference function with respect to time, min refers to the minimum value function, t is time, and m is the preset error parameter value greater than 0; when the function H(t) is not equal to m on the time axis The first time length and the second time length when it is equal to m, and according to the formula: normal time ratio=the first time length/(the first time length+the second time length), calculate all The normal time ratio, and determine whether the normal time ratio is greater than the preset ratio threshold; if the normal time ratio is greater than the preset ratio threshold, use the preset resource expectation according to the first data Algorithm to generate expected results of resources;
S3、将所述资源预期结果发送给所述第二区块链网络中的多个资源预期结果审核区块链节点,并要求多个资源预期结果审核区块链节点对所述资源预期结果进行审核;S3. Send the expected result of the resource to multiple resource expected result review blockchain nodes in the second blockchain network, and require multiple resource expected result review blockchain nodes to perform the expected result of the resource Audit
S4、接收多个资源预期结果审核区块链节点对所述资源预期结果进行审核的返回信息,其中所述返回信息包括审核通过或者审核未通过;S4. Receiving multiple return information from a resource expected result review blockchain node reviewing the expected result of the resource, where the return information includes the review passed or the review failed;
S5、判断所述返回信息是否满足预设的区块链记录条件;S5. Determine whether the returned information meets the preset blockchain recording conditions;
S6、若所述返回信息满足预设的区块链记录条件,则将所述资源预期结果记录入所述第二区块链网络中。S6. If the returned information satisfies a preset blockchain recording condition, record the expected result of the resource into the second blockchain network.
本申请通过采用区块链的设计,将指定终端同时设置为第一区块链网络与第二区块链网络的区块链节点,从而使得生成资源预期结果的第一数据可以从第一区块链网络的公共账本中提取,保证第一数据的可靠性(利用区块链的数据不易篡改的特性),又利用第二区块链网络审核并记录资源预期结果,保证审核过程透明并提高效率,更进一步地采用区块链的设计,将提供资源预期计算使用数据与审核资源预期结果二者分割开来,更利于分级别地管理与可能的错误追溯。并且通过对第二数据的处理,以判断所述资源是否存在异常或者伪造数据的可能,从而提高了预期结果的可靠性。This application uses the design of the blockchain to set the designated terminal as the blockchain node of the first blockchain network and the second blockchain network at the same time, so that the first data that generates the expected result of the resource can be obtained from the first area Extract from the public ledger of the block chain network to ensure the reliability of the first data (using the characteristics of the data of the block chain that are not easily tampered with), and use the second block chain network to review and record the expected results of the resources, to ensure that the review process is transparent and improved Efficiency, further adopting the design of blockchain, separates the expected calculation and usage data of resources and the expected results of auditing resources, which is more conducive to hierarchical management and possible error traceability. And by processing the second data, it is determined whether the resource is abnormal or the data is forged, thereby improving the reliability of the expected result.
如上述步骤S1所述,从预设的第一区块链网络中提取第一数据,其中所述指定终端既是预先构建的第一区块链网络的一个区块链节点,又是预先构建的第二区块链网络的一个区块链节点,所述第一区块链网络至少包括提供资源预期计算使用数据的区块链节点,所述第二区块链网络至少包括资源预期结果审核区块链节点。其中所述资源例如为财务、金融,所述资源预期例如为预算。其中第一区块链网络和第二区块链网络可以为公有链、联盟链或者私有链。第一区块链网络的公共账本用于保存提供资源预期计算使用数据,例如部门制定的部门开支计划等。第二区块链网络的公共账本用于保存审核通过的资源预期结果。所述指定终端由于同时处于第一区块链网络和第二区块链网络中,因此同时具有第一区块链网络的公共账本和第二区块链网络的公共账本,从而使第一数据-生成资源预期结果-资源预期结果审核的整个流程的数据来源均真实可信,提高了信息安全性。其中,第一区块链网络的区块链节点可以将用于生成资源预期结果的数据记录入第一区块链网络的公共账本中。因此,在本申请的基于区块链的资源预期结果审核方法中,由于第一数据来源于第一区块链网络的公共账本,难以被篡改,从而克服了传统技术中数据可靠性待商榷的问题;并使资源预期结果的审核在第二区块链网络中实现并在第二区块链网络中记载,实现了资源预期结果可信、以及分级别地管理与可能的错误追溯的技术效果。As described in step S1 above, the first data is extracted from the preset first blockchain network, where the designated terminal is both a blockchain node of the first blockchain network constructed in advance, and it is also a pre-built blockchain node. A block chain node of the second block chain network, the first block chain network includes at least a block chain node that provides expected calculation usage data of resources, and the second block chain network includes at least a resource expected result review area Block chain node. The resource is, for example, finance and finance, and the resource expectation is, for example, a budget. The first block chain network and the second block chain network can be public chains, consortium chains or private chains. The public ledger of the first blockchain network is used to store and provide resource expected calculation usage data, such as departmental expenditure plans formulated by the department. The public ledger of the second blockchain network is used to store the expected results of resources that have passed the review. Since the designated terminal is in the first blockchain network and the second blockchain network at the same time, it has the public account book of the first blockchain network and the public account book of the second blockchain network at the same time, so that the first data -Generate expected results of resources-The data sources of the entire process of reviewing expected results of resources are authentic and credible, which improves information security. Among them, the blockchain node of the first blockchain network can record the data used to generate the expected result of the resource into the public ledger of the first blockchain network. Therefore, in the method for reviewing the expected results of resources based on the blockchain of this application, since the first data comes from the public ledger of the first blockchain network, it is difficult to be tampered with, thereby overcoming the questionable data reliability in the traditional technology. Problems; and make the review of the expected results of resources implemented in the second blockchain network and recorded in the second blockchain network, achieving the technical effects of credible expected results of resources, hierarchical management and possible error traceability .
如上述步骤S2所述,获取实时采集的所述资源的第二数据,并根据公式:As described in step S2 above, the second data of the resource collected in real time is acquired, and according to the formula:
H(t)=min(G(t),m),其中
Figure PCTCN2020099436-appb-000011
E(t)=F(t)-f(t),获取函数H(t),其中F(t)为所述资源的第二数据随时间变化的函数,f(t)为预设的标准第二数据变化函数,E(t)为所述函数F(t)与所述标准第二数据变化函数f(t)的差值函数,
Figure PCTCN2020099436-appb-000012
为所述差值函数对时间的微分函数,min指最小值函数,t为时间,m为预设的大于0的误差参数值;获取所述函数H(t)在时间轴上不等于m时的第一时间长度和等于m时的第二时间长度,并根据公式:正常时间占比=所述第一时间长度/(所述第一时间长度+所述第二时间长度),计算出所述正常时间占比,并判断所述正常时间占比是否大于预设占比阈值;若所述正常时间占比大于预设占比阈值,则根据所述第一数据,利用预设的资源预期算法,生成资源预期结果。其中函数H(t)用以表征所述第二数据的状况,当函数H(t)取值为m时,表示第二数据的数值过大,处于异常状态;当函数H(t)取值不为m时,表示第二数据的数值正常,处于正常状态,据此计算出所述正常时间占比,并判断所述正常时间占比是否大于预设阈值;若所述正常时间占比大于预设占比阈值,则根据所述第一数据,利用预设的资源预期算法,生成资源预期结果。其中第一数据是用于生成资源预期结果的,因此可以生成资源预期结果。其中根据所述第一数据,利用预设的资源预期算法,生成资源预期结果可采用任意方式,例如为:从所述第一数据中划分出收入数据与支出数据;判断所述收入数据与支出数据是否可信;若所述收入数据与支出数据可信,则分别记为可信收入与可信支出;统计所述可信收入与可信支出,从而得到可信总收入与可信总支出;生成包括所述可信总收入与可信总支出的资源预期结果。
H(t)=min(G(t),m), where
Figure PCTCN2020099436-appb-000011
E(t)=F(t)-f(t), get the function H(t), where F(t) is the function of the second data of the resource changing with time, f(t) is the preset standard The second data change function, E(t) is the difference function of the function F(t) and the standard second data change function f(t),
Figure PCTCN2020099436-appb-000012
Is the differential function of the difference function with respect to time, min refers to the minimum value function, t is time, and m is the preset error parameter value greater than 0; when the function H(t) is not equal to m on the time axis The first time length and the second time length when it is equal to m, and according to the formula: normal time ratio=the first time length/(the first time length+the second time length), calculate all The normal time ratio, and determine whether the normal time ratio is greater than the preset ratio threshold; if the normal time ratio is greater than the preset ratio threshold, use the preset resource expectation according to the first data Algorithm to generate expected results of resources. The function H(t) is used to characterize the condition of the second data. When the value of the function H(t) is m, it means that the value of the second data is too large and is in an abnormal state; when the function H(t) takes a value When it is not m, it means that the value of the second data is normal and in a normal state. Based on this, the proportion of normal time is calculated, and it is judged whether the proportion of normal time is greater than a preset threshold; if the proportion of normal time is greater than The preset proportion threshold is then based on the first data and the preset resource expectation algorithm is used to generate the expected result of the resource. The first data is used to generate the expected result of the resource, so the expected result of the resource can be generated. According to the first data, using a preset resource expectation algorithm, any method can be used to generate the expected result of the resource, for example: dividing income data and expenditure data from the first data; judging the income data and expenditure Whether the data is credible; if the income data and expenditure data are credible, they are recorded as credible income and credible expenditure respectively; statistics on the credible income and credible expenditure, so as to obtain credible total income and credible total expenditure ; Generate expected results of resources including the trusted total income and trusted total expenditure.
进一步地,所述第一数据与所述第二数据可以相互关联,也可以没有关系。所述第二数据用以侧面判断所述资源的数据是否存在异常或者伪造的可能。可以使用任意方式确定第二数据,例如从预设的数据表格中获取所述第二数据,其中所述数据表格记载有多个数据类别。获取所述第二数据的方式例如为随机提取等。Further, the first data and the second data may be related to each other or not. The second data is used to laterally determine whether the data of the resource is abnormal or may be forged. The second data can be determined in any manner, for example, the second data is obtained from a preset data table, wherein the data table records multiple data categories. The method of obtaining the second data is, for example, random extraction.
如上述步骤S3所述,将所述资源预期结果发送给所述第二区块链网络中的多个资源预期结果审核区块链节点,并要求多个资源预期结果审核区块链节点对所述资源预期结果进行审核。其中资源预期结果审核区块链节点可以是第二区块链网络中的所有区块链节点,也可以是部分区块链节点。将所述资源预期结果发送给所述第二区块链网络中的多个资源预期结果审核区块链节点,并要求多个资源预期结果审核区块链节点对所述资源预期结果进行审核的过程,例如包括:在所述第二区块链网络中,获取根据预设的股份授权证明机制投选出的多个资源预期结果审核区块链节点;向所有所述资源预期结果审核区块链节点发送审核请求,并要求所述资源预期结果审核区块链节点发送回复信息;接收所述资源预期结果审核区块链节点发送的回复信息,并将所述回复信息为愿意审核的资源预期结果审核区块链节点记为最终资源预期结果审核区块链节点;将所述资源预期结果发送给多个所述最终资源预期结果审核区块链节点,并要求多个所述最终资源预期结果审核区块链节点对所述资源预期结果进行审核。As described in step S3 above, the expected result of the resource is sent to multiple resource expected result auditing blockchain nodes in the second blockchain network, and multiple resource expected result auditing blockchain nodes are required The expected results of the said resources are reviewed. Among them, the resource expected result review blockchain node can be all the blockchain nodes in the second blockchain network, or part of the blockchain nodes. Send the expected result of the resource to multiple resource expected result review blockchain nodes in the second blockchain network, and request multiple resource expected result review blockchain nodes to review the expected result of the resource The process, for example, includes: in the second blockchain network, obtaining a plurality of resource expected results auditing blockchain nodes selected according to a preset share authorization certification mechanism; reviewing blocks for all the resource expected results The chain node sends an audit request, and requires the resource expected result audit blockchain node to send a reply message; receives the reply message sent by the resource expected result audit block chain node, and sets the reply message as a resource expectation willing to review The result review block chain node is recorded as the final resource expected result review block chain node; the resource expected result is sent to a plurality of the final resource expected result review block chain nodes, and a plurality of the final resource expected result is required The audit blockchain node audits the expected result of the resource.
如上述步骤S4所述,接收多个资源预期结果审核区块链节点对所述资源预期结果进行审核的返回信息,其中所述返回信息包括审核通过或者审核未通过。不同的资源预期结果审核区块链节点采用的审核方式不一定相同,因此审核结果可能不同,分别为审核通过或者审核未通过。为了避免误判,本申请接收多个资源预期结果审核区块链节点对所述资源预期结果进行审核的返回信息,并综合考虑,以确定是否将资源预期结果记录入第二区块链网络的公共账本中。As described in the above step S4, receiving multiple return information from the resource expected result review blockchain node reviewing the expected result of the resource, wherein the return information includes the review passed or the review failed. The expected results of different resources are not necessarily the same in reviewing blockchain nodes. Therefore, the results of the review may be different. They are either approved or failed. In order to avoid misjudgment, this application receives the return information from multiple resource expected results auditing blockchain nodes to review the expected results of the resources, and comprehensively considers them to determine whether to record the expected results of the resources in the second blockchain network. In the public ledger.
如上述步骤S5所述,判断所述返回信息是否满足预设的区块链记录条件。判断所述返回信息是否满足预设的区块链记录条件的方式可为任意方式,例如当审核通过的返回信息的数量达到预定阈值的条件,则判定满足预设的区块链记录条件;或者,当审核通过的返 回信息的数量占所有返回信息数量的占比值大于预设占比阈值时,则判定满足预设的区块链记录条件。As described in step S5 above, it is determined whether the returned information meets the preset blockchain recording conditions. The method of judging whether the returned information meets the preset blockchain recording condition can be any method, for example, when the number of audited returned information reaches a predetermined threshold condition, it is determined that the preset blockchain recording condition is satisfied; or , When the proportion of the number of returned messages that have passed the audit to the number of all returned messages is greater than the preset proportion threshold, it is determined that the preset blockchain recording conditions are met.
如上述步骤S6所述,若所述返回信息满足预设的区块链记录条件,则将所述资源预期结果记录入所述第二区块链网络中。若所述返回信息满足预设的区块链记录条件,表明第二区块链网络中的大部分审核区块链节点均认同所述资源预期结果,因此将所述资源预期结果记录入所述第二区块链网络中。从而第二区块链网络中的区块链节点可从所述第二区块链网络中获知所述资源预期结果。As described in step S6 above, if the returned information meets the preset blockchain recording conditions, the expected result of the resource is recorded in the second blockchain network. If the returned information satisfies the preset blockchain recording conditions, it indicates that most of the audit blockchain nodes in the second blockchain network agree with the expected result of the resource, and therefore record the expected result of the resource in the In the second blockchain network. Therefore, the blockchain node in the second blockchain network can learn the expected result of the resource from the second blockchain network.
在一个实施方式中,所述资源为指定对象的资源,所述第一数据包括所述指定对象的多个子对象的预计资源增加量与预计资源损耗量,所述根据所述第一数据,利用预设的资源预期算法,生成资源预期结果的步骤S2,包括:In one embodiment, the resource is a resource of a designated object, the first data includes an estimated resource increase and an estimated resource loss of a plurality of sub-objects of the designated object, and according to the first data, use The preset resource expectation algorithm, step S2 of generating the expected result of the resource, includes:
S201、统计多个所述子对象的预计资源增加量与预计资源损耗量,从而得到第一个子对象至第n个子对象的预计资源增加量A 1、A 2…、A n和第一个子对象至第n个子对象的预计资源损耗量B 1、B 2…、B n,并从预存的子对象重要程度关系表中获取第一个子对象至第n个子对象的重要程度参数p 1、p 2…、p nS201, the plurality of sub-objects statistics estimated amount of resources expected to increase the amount of loss of resources, thereby obtaining a first to n th sub-object is projected object to increases in A 1, A 2 ..., A n and a The estimated resource consumption B 1 , B 2 …, B n from the sub-object to the nth sub-object, and the importance parameter p 1 from the first sub-object to the n-th sub-object is obtained from the pre-stored sub-object importance relationship table , P 2 …, p n ;
S202、根据公式:
Figure PCTCN2020099436-appb-000013
计算出敏感因子M;
S202. According to the formula:
Figure PCTCN2020099436-appb-000013
Calculate the sensitivity factor M;
S203、判断所述敏感因子M是否大于预设的敏感阈值;S203: Determine whether the sensitivity factor M is greater than a preset sensitivity threshold;
S204、若所述敏感因子M不大于预设的敏感阈值,则生成资源预期结果,其中所述资源预期结果至少包括多个子对象的预计资源增加量与预计资源损耗量。S204: If the sensitivity factor M is not greater than a preset sensitivity threshold, generate an expected result of the resource, where the expected result of the resource includes at least an estimated resource increase and an estimated resource loss of multiple sub-objects.
如上所述,实现了生成资源预期结果。本申请的第一数据例如包括多个部门的部门预计收入与部门预计支出,根据部门预计收入与部门预计支出可以生成资源预期结果。其中,由于不同部门的重要性不同,相应的部门预算也因此受到影响。据此,本申请采用重要程度参数p 1、p 2…、p n以表示部门的重要程度,并根据公式:
Figure PCTCN2020099436-appb-000014
计算出敏感因子M,若所述敏感因子M不大于预设的敏感阈值,则生成资源预期结果,其中所述资源预期结果至少包括所述多个部门的部门预计收入与部门预计支出。其中第一个部门至第n个部门的预计收入为A 1、A 2…、A n,第一个部门至第n个部门的预计支出为B 1、B 2…、B n。从而使资源预期更有针对性,以便保证重要部门的资源预期。
As mentioned above, the expected result of generating resources is achieved. The first data of this application includes, for example, the estimated departmental income and departmental estimated expenditures of multiple departments, and the expected results of resources can be generated based on the estimated departmental income and departmental estimated expenditures. Among them, due to the different importance of different departments, the corresponding department budget is also affected. Accordingly, this application adopts important degree parameters p 1 , p 2 …, p n to indicate the importance of the department, and according to the formula:
Figure PCTCN2020099436-appb-000014
A sensitivity factor M is calculated, and if the sensitivity factor M is not greater than a preset sensitivity threshold, an expected result of the resource is generated, where the expected result of the resource includes at least the estimated departmental income and departmental estimated expenditures of the multiple departments. The estimated income from the first department to the nth department are A 1 , A 2 …, A n , and the estimated expenditures from the first department to the nth department are B 1 , B 2 …, B n . In this way, resource expectations are more targeted to ensure the resource expectations of important departments.
在一个实施方式中,所述将所述资源预期结果发送给所述第二区块链网络中的多个资源预期结果审核区块链节点,并要求多个资源预期结果审核区块链节点对所述资源预期结果进行审核的步骤S3,包括:In one embodiment, the expected result of the resource is sent to multiple resource expected result auditing blockchain nodes in the second blockchain network, and multiple resource expected result auditing blockchain node pairs are required The step S3 of reviewing the expected result of the resource includes:
S301、在所述第二区块链网络中,获取根据预设的共识机制投选出的多个资源预期结果审核区块链节点;S301. In the second blockchain network, obtain multiple resource expected results selected according to a preset consensus mechanism to review blockchain nodes;
S302、向所有所述资源预期结果审核区块链节点发送审核请求,并要求所述资源预期结果审核区块链节点发送回复信息;S302: Send an audit request to all the resource expected result audit blockchain nodes, and require the resource expected result audit blockchain node to send reply information;
S303、接收所述资源预期结果审核区块链节点发送的回复信息,并将所述回复信息为愿意审核的资源预期结果审核区块链节点记为最终资源预期结果审核区块链节点;S303. Receive the reply message sent by the resource expected result review blockchain node, and record the reply message as the resource expected result review blockchain node willing to review as the final resource expected result review blockchain node;
S304、将所述资源预期结果发送给多个所述最终资源预期结果审核区块链节点,并要求多个所述最终资源预期结果审核区块链节点对所述资源预期结果进行审核。S304. Send the expected result of the resource to a plurality of expected final resource result review blockchain nodes, and require a plurality of expected final resource result review blockchain nodes to review the expected result of the resource.
如上所述,实现了发送给多个审核区块链节点。本实施方式优选采用股份授权证明机制作为区块链网络的共识机制。其中股份授权证明机制是指,所有区块链节点投选出多个委托区块链节点,从而多个委托区块链节点代表所有区块链节点对是否将数据(例如交易)记录入公共账本做出判断,从而避免当区块链节点数量过多时区块链运作缓慢的缺点。据此,根据所述股份授权证明机制投选出的多个资源预期结果审核区块链节点能够做出是否 将所述资源预期结果加入区块链网络的决定。并且,为了防止部分资源预期结果审核区块链节点不能参与审核(例如部分资源预期结果审核区块链节点未开机,或者通讯故障等原因)而导致最终决定不准确,本实施方式还采用预先发送审核请求的方式,以确定愿意审核的审核区块链节点,并记为最终资源预期结果审核区块链节点,将预先设置的指定换乘路线发送给多个所述最终审核区块链节点,从而既减少了不必要的网络开销(发送审核请求的开销远小于发送资源预期结果的开销),又能保证后续判断的准确性(排除了不能参与审核的节点)。As mentioned above, it is sent to multiple audit blockchain nodes. This embodiment preferably adopts the share authorization certification mechanism as the consensus mechanism of the blockchain network. The share authorization proof mechanism refers to that all blockchain nodes vote for multiple entrusted blockchain nodes, so that multiple entrusted blockchain nodes represent all blockchain node pairs whether to record data (such as transactions) in the public ledger Make judgments to avoid the shortcomings of slow operation of the blockchain when there are too many blockchain nodes. Accordingly, according to the expected results of multiple resources voted by the share authorization certification mechanism, the blockchain node can make a decision whether to add the expected results of the resources to the blockchain network. In addition, in order to prevent the expected result of some resources from being audited by blockchain nodes that cannot participate in the audit (for example, the expected result of some resources is audited, the blockchain node is not powered on, or communication failures, etc.) resulting in inaccurate final decisions, this embodiment also uses pre-sending The method of audit request is to determine the audit blockchain nodes that are willing to audit, and record it as the final resource expected result audit blockchain node, and send the preset designated transfer route to multiple final audit blockchain nodes, This not only reduces unnecessary network overhead (the cost of sending audit requests is much less than the cost of sending resource expected results), but also ensures the accuracy of subsequent judgments (excluding nodes that cannot participate in the audit).
在一个实施方式中,所述判断所述返回信息是否满足预设的区块链记录条件的步骤S5,包括:In one embodiment, the step S5 of judging whether the returned information meets a preset blockchain recording condition includes:
S501、统计所述返回信息,从而得到接收到的所述返回信息的总数量,以及审核通过的返回信息的数量;S501: Count the return information, so as to obtain the total number of the return information received and the number of the return information passed the audit;
S502、计算所述审核通过的返回信息的数量除以所述返回信息的总数量的商值;S502: Calculate the quotient of the number of returned messages that have passed the review divided by the total number of returned messages;
S503、判断所述商值是否大于预设的区块链记录参数阈值;S503: Determine whether the quotient is greater than a preset block chain record parameter threshold;
S504、若所述商值大于预设的区块链记录参数阈值,则判定所述返回信息满足预设的区块链记录条件。S504: If the quotient is greater than a preset blockchain recording parameter threshold, determine that the returned information meets the preset blockchain recording condition.
如上所述,实现了判断所述返回信息是否满足预设的区块链记录条件。本申请采用所述审核通过的返回信息的数量除以所述返回信息的总数量的商值,作为判断所述返回信息是否满足预设的区块链记录条件的依据。若所述商值大于预设的区块链记录参数阈值,表明认可所述资源预期结果的资源预期结果审核区块链节点在所有资源预期结果审核区块链节点中的占比够大,据此判定所述返回信息满足预设的区块链记录条件;若所述商值不大于预设的区块链记录参数阈值,表明认可所述资源预期结果的资源预期结果审核区块链节点在所有资源预期结果审核区块链节点中的占比较少,据此判定所述返回信息不满足预设的区块链记录条件。而本申请采用判断所述审核通过的返回信息的数量除以所述返回信息的总数量的商值的方式,相较仅判断所述审核通过的返回信息的数量的方式,更准确,可以防止当大量资源预期结果审核区块链节点出现故障(例如审核区块链节点与外界的通讯接口被劫持)不能参与审核时造成的误判。As described above, it is possible to determine whether the returned information meets the preset blockchain recording conditions. This application uses the quotient of the number of returned messages that have passed the review divided by the total number of returned messages as a basis for judging whether the returned messages meet the preset blockchain recording conditions. If the quotient is greater than the preset block chain record parameter threshold, it indicates that the resource expected result audit blockchain node that recognizes the expected result of the resource has a large enough proportion of all resource expected result audit blockchain nodes, according to This determines that the returned information satisfies the preset blockchain recording conditions; if the quotient is not greater than the preset blockchain record parameter threshold, it indicates that the expected result of the resource is recognized by the expected result of the resource. The expected results of all resources audited blockchain nodes accounted for a relatively small proportion, and based on this, it was determined that the returned information did not meet the preset blockchain recording conditions. However, this application adopts the method of judging the quotient of the number of returned messages that have passed the review divided by the total number of return messages, which is more accurate than just the method of judging the number of returned messages that have passed the review, and can prevent A misjudgment caused when a large number of resources are expected to result in a failure of the audit blockchain node (for example, the communication interface between the audit blockchain node and the outside world is hijacked) and cannot participate in the audit.
在一个实施方式中,所述判断所述返回信息是否满足预设的区块链记录条件的步骤S5之后,包括:In one embodiment, after the step S5 of judging whether the returned information meets a preset blockchain recording condition, the method includes:
S51、若所述返回信息不满足预设的区块链记录条件,则向返回信息为审核未通过的资源预期结果审核区块链节点发送原因获取指令,所述原因获取指令用于指示所述资源预期结果审核区块链节点将审核未通过的原因发送给所述指定终端;S51. If the returned information does not meet the preset blockchain recording conditions, send a reason obtaining instruction to the resource expected result auditing blockchain node whose return information is that the audit failed, and the reason obtaining instruction is used to instruct the The resource expected result review blockchain node sends the reason for the failure of the review to the designated terminal;
S52、接收资源预期结果审核区块链节点发送的审核未通过的原因;S52. The reason for the failure of the audit sent by the receiving resource expected result audit blockchain node;
S53、判断所述审核未通过的原因是否存在于预设的原因列表中;S53. Determine whether the reason for the failure of the review exists in a preset reason list;
S54、若所述审核未通过的原因存在于预设的原因列表中,则不允许将所述资源预期结果记录入所述第二区块链网络中,并生成审核不通过的提醒信息,并在所述提醒信息中附上所述审核未通过的原因。S54. If the reason for the failure of the review exists in the preset reason list, the expected result of the resource is not allowed to be recorded in the second blockchain network, and a reminder message of the failure of the review is generated, and The reason for the failure of the review is attached to the reminder message.
如上所述,实现了不允许将所述资源预期结果记录入所述第二区块链网络中。若所述返回信息不满足预设的区块链记录条件,表明所述资源预期结果不被认可,不能记录入所述第二区块链网络中。但是,为了利用错误追溯,以明确不被通过的原因以及时纠正,本申请还采用向返回信息为审核未通过的资源预期结果审核区块链节点发送原因获取指令;接收资源预期结果审核区块链节点发送的审核未通过的原因;生成审核不通过的提醒信息,并在所述提醒信息中附上所述审核未通过的原因的方式,以利于纠正未通过的资源预期结果。As described above, it is realized that it is not allowed to record the expected result of the resource into the second blockchain network. If the returned information does not meet the preset blockchain recording conditions, it indicates that the expected result of the resource is not recognized and cannot be recorded in the second blockchain network. However, in order to use error traceability to clarify the reason for the failure to pass and correct it in a timely manner, this application also uses the return information to send a reason acquisition instruction to the resource expected result auditing blockchain node that has not passed the audit; receiving the resource expected result auditing block The reason for the failure of the audit sent by the chain node; generating a reminder message for the failure of the audit, and attaching the reason for the reason for the failure of the audit to the reminder message, so as to facilitate the correction of the expected result of the failed resource.
在一个实施方式中,所述从预设的第一区块链网络中提取第一数据,其中所述指定终端既是预先构建的第一区块链网络的一个区块链节点,又是预先构建的第二区块链网络的一个区块链节点,所述第一区块链网络至少包括提供资源预期计算使用数据的区块链节点, 所述第二区块链网络至少包括资源预期结果审核区块链节点的步骤S1之前,包括:In one embodiment, the first data is extracted from the preset first blockchain network, wherein the designated terminal is both a blockchain node of the first blockchain network constructed in advance, and it is also a pre-built blockchain node. A block chain node of the second block chain network, the first block chain network includes at least a block chain node that provides expected calculation usage data of resources, and the second block chain network includes at least a review of expected results of resources Before step S1 of the blockchain node, it includes:
S001、利用Go语言创建区块链类,并赋予所述区块链类指定参数,从而获得创世区块,并在所述创世区块中将前一区块的哈希值设为0;S001. Use the Go language to create a blockchain class, and assign designated parameters to the blockchain class to obtain a genesis block, and set the hash value of the previous block to 0 in the genesis block ;
S002、基于所述创世区块,生成其他区块,其中所述其他区块记载有前一区块的哈希值;S002. Generate other blocks based on the genesis block, where the other blocks record the hash value of the previous block;
S003、以预设终端作为第二区块链网络的区块链节点,从而搭建所述第二区块链网络。S003. Use a preset terminal as a blockchain node of the second blockchain network, so as to build the second blockchain network.
如上所述,实现了搭建所述区块链网络。其中创建区块链类的语言可以为任意可行语言,例如JAVA、C++、Go语言等,本实施方式优选C++、Go语言,从而优化区块链类。其中区块链类(class)是对区块链的定义,将所述区块链类实例化即是确定区块链的具体参数,从而获得第一个区块(创世区块),从而作为其他区块的生成依据。由于创世区块是第一个区块,实际上没有之前的区块,因此在创世区块中将前一区块的哈希值设置为0。并基于所述创世区块,生成其他区块,其中所述其他区块记载有前一区块的哈希值,从而所有区块紧密相连,防止数据被篡改。所述第二区块链网络的预设共识机制可为任意共识机制,例如为工作量证明机制、权益证明机制、拜占庭容错机制、股份授权证明机制等,本实施方式优选股份授权证明机制。进一步地,所述第一区块链网络的搭建方法可以与第二区块链网络的搭建方法相同,也可以与第二区块链网络的搭建方法不相同。As mentioned above, the construction of the blockchain network is realized. The language for creating the blockchain class can be any feasible language, such as JAVA, C++, Go language, etc. In this embodiment, C++ and Go are preferred to optimize the blockchain class. The block chain class (class) is the definition of the block chain, and instantiating the block chain class is to determine the specific parameters of the block chain, so as to obtain the first block (the genesis block), thereby As the basis for the generation of other blocks. Since the genesis block is the first block, there is actually no previous block, so the hash value of the previous block is set to 0 in the genesis block. Based on the genesis block, other blocks are generated, where the other blocks record the hash value of the previous block, so that all blocks are closely connected to prevent data from being tampered with. The preset consensus mechanism of the second blockchain network can be any consensus mechanism, such as a workload certification mechanism, a equity certification mechanism, a Byzantine fault-tolerant mechanism, a share authorization certification mechanism, etc. The preferred embodiment is a share authorization certification mechanism. Further, the method for building the first blockchain network may be the same as the method for building the second blockchain network, or may be different from the method for building the second blockchain network.
在一个实施方式中,所述指定终端预存有虚拟机镜像和区块链节点容器镜像,所述从预设的第一区块链网络中提取第一数据,其中所述指定终端既是预先构建的第一区块链网络的一个区块链节点,又是预先构建的第二区块链网络的一个区块链节点,所述第一区块链网络至少包括提供资源预期计算使用数据的区块链节点,所述第二区块链网络至少包括资源预期结果审核区块链节点的步骤S1之前,包括:In one embodiment, the designated terminal prestores a virtual machine image and a blockchain node container image, and the first data is extracted from a preset first blockchain network, wherein the designated terminal is both pre-built A block chain node of the first block chain network is also a block chain node of a pre-built second block chain network, and the first block chain network at least includes blocks that provide expected calculation usage data of resources A chain node, the second blockchain network includes at least resource expected results before step S1 of reviewing the blockchain node, including:
S011、接收申请终端发送的加入第二区块链网络的请求,所述加入第二区块链网络的请求附带有所述申请终端的身份信息;S011. Receive a request to join a second blockchain network sent by an applying terminal, where the request to join the second blockchain network is attached with the identity information of the applying terminal;
S012、判断所述申请终端的身份信息是否处于预设的允许加入列表中;S012: Judge whether the identity information of the application terminal is in a preset allowable join list;
S013、若所述申请终端的身份信息处于预设的允许加入列表中,则向所述申请终端发送所述虚拟机镜像和区块链节点容器镜像;S013: If the identity information of the application terminal is in the preset allowable join list, send the virtual machine image and the blockchain node container image to the application terminal;
S014、获取所述申请终端的IP地址与通信端口;S014: Obtain the IP address and communication port of the application terminal;
S015、向所述申请终端发送预存的第二区块链网络的所有区块链节点的IP地址和通信端口的信息,以及向第二区块链网络的所有区块链节点发送所述申请终端的IP地址和通信端口的信息,从而将所述申请终端加入所述第二区块链网络,其中所述申请终端已在所述虚拟机镜像中安装并启动所述区块链节点容器镜像。S015. Send the pre-stored information of the IP addresses and communication ports of all the blockchain nodes of the second blockchain network to the application terminal, and send the application terminal to all the blockchain nodes of the second blockchain network The application terminal is added to the second blockchain network, and the application terminal has been installed in the virtual machine image and started the blockchain node container image.
如上所述,实现了利用虚拟机镜像和区块链节点容器镜像,快速部署第二区块链网络。其中,虚拟机镜像用于提供基础运行环境,例如运行区块链节点容器镜像的环境、编程程序语言运行环境或者基础工具包等。区块链节点容器镜像保存有公共账本(例如将所述当前审批系统的已有审批记录转作为公共账本)等数据,用于在安装并启动区块链节点容器镜像后,使所述终端具有成为区块链节点的基础条件(例如还需要获取其他区块链节点的IP地址等信息,以及告知其他区块链节点本终端的IP地址等信息,才能完成加入所述区块链网络)。再将所述申请终端的IP地址与通信端口告知第二区块链网络的所有区块链节点,以及向第二区块链网络的所有区块链节点发送所述申请终端的IP地址和通信端口的信息,从而实现了快速将所述申请终端加入所述第二区块链网络。本申请通过预设虚拟机镜像和区块链节点容器镜像的方式,加快了节块链部署的速度,并维持了区块链的去中心化。进一步地,所述第一区块链网络新增区块链节点的方法可以与第二区块链网络相同,也可以与第二区块链网络不相同。As mentioned above, the use of virtual machine image and blockchain node container image to quickly deploy the second blockchain network is realized. Among them, the virtual machine image is used to provide a basic operating environment, such as an environment for running a blockchain node container image, a programming language operating environment, or a basic toolkit. The blockchain node container image saves data such as a public account book (for example, the existing approval record of the current approval system is converted to a public account book), which is used to enable the terminal to have the terminal after installing and starting the blockchain node container image Become a basic condition for a blockchain node (for example, it is necessary to obtain information such as the IP address of other blockchain nodes, and inform other blockchain nodes of the terminal's IP address and other information to complete joining the blockchain network). Then inform all the blockchain nodes of the second blockchain network of the IP address and communication port of the application terminal, and send the IP address and communication of the application terminal to all the blockchain nodes of the second blockchain network Port information, thereby realizing the rapid addition of the application terminal to the second blockchain network. This application speeds up the deployment of the block chain and maintains the decentralization of the block chain by pre-setting the virtual machine image and the blockchain node container image. Further, the method for adding blockchain nodes to the first blockchain network may be the same as or different from that of the second blockchain network.
参照图2,本申请实施例提供一种基于区块链的资源预期结果审核装置,应用于指定终端,包括:2, an embodiment of the present application provides a device for reviewing expected results of resources based on a blockchain, which is applied to a designated terminal, and includes:
第一数据提取单元10,用于从预设的第一区块链网络中提取第一数据,其中所述指定 终端既是预先构建的第一区块链网络的一个区块链节点,又是预先构建的第二区块链网络的一个区块链节点,所述第一区块链网络至少包括提供资源预期计算使用数据的区块链节点,所述第二区块链网络至少包括资源预期结果审核区块链节点;The first data extraction unit 10 is configured to extract first data from a preset first blockchain network, where the designated terminal is both a blockchain node of the first blockchain network constructed in advance, and also a pre-built blockchain node. A block chain node of a second block chain network constructed, the first block chain network includes at least block chain nodes that provide expected calculation usage data of resources, and the second block chain network includes at least expected results of resources Audit blockchain nodes;
资源预期结果获取单元20,用于获取实时采集的所述资源的第二数据,并根据公式:The resource expected result obtaining unit 20 is configured to obtain the second data of the resource collected in real time, and according to the formula:
H(t)=min(G(t),m),其中
Figure PCTCN2020099436-appb-000015
E(t)=F(t)-f(t),获取函数H(t),其中F(t)为所述资源的第二数据随时间变化的函数,f(t)为预设的标准第二数据变化函数,E(t)为所述函数F(t)与所述标准第二数据变化函数f(t)的差值函数,
Figure PCTCN2020099436-appb-000016
为所述差值函数对时间的微分函数,min指最小值函数,t为时间,m为预设的大于0的误差参数值;获取所述函数H(t)在时间轴上不等于m时的第一时间长度和等于m时的第二时间长度,并根据公式:正常时间占比=所述第一时间长度/(所述第一时间长度+所述第二时间长度),计算出所述正常时间占比,并判断所述正常时间占比是否大于预设占比阈值;若所述正常时间占比大于预设占比阈值,则根据所述第一数据,利用预设的资源预期算法,生成资源预期结果;
H(t)=min(G(t),m), where
Figure PCTCN2020099436-appb-000015
E(t)=F(t)-f(t), get the function H(t), where F(t) is the function of the second data of the resource changing with time, f(t) is the preset standard The second data change function, E(t) is the difference function of the function F(t) and the standard second data change function f(t),
Figure PCTCN2020099436-appb-000016
Is the differential function of the difference function with respect to time, min refers to the minimum value function, t is time, and m is the preset error parameter value greater than 0; when the function H(t) is not equal to m on the time axis The first time length and the second time length when it is equal to m, and according to the formula: normal time ratio=the first time length/(the first time length+the second time length), calculate all The normal time ratio, and determine whether the normal time ratio is greater than the preset ratio threshold; if the normal time ratio is greater than the preset ratio threshold, use the preset resource expectation according to the first data Algorithm to generate expected results of resources;
资源预期结果发送单元30,用于将所述资源预期结果发送给所述第二区块链网络中的多个资源预期结果审核区块链节点,并要求多个资源预期结果审核区块链节点对所述资源预期结果进行审核;The resource expected result sending unit 30 is configured to send the expected resource result to multiple resource expected result review blockchain nodes in the second blockchain network, and request multiple resource expected result review blockchain nodes Review the expected results of the resources;
返回信息接收单元40,用于接收多个资源预期结果审核区块链节点对所述资源预期结果进行审核的返回信息,其中所述返回信息包括审核通过或者审核未通过;The return information receiving unit 40 is configured to receive return information from a plurality of resource expected result review blockchain nodes reviewing the resource expected result, wherein the return information includes the review passed or the review failed;
区块链记录条件判断单元50,用于判断所述返回信息是否满足预设的区块链记录条件;The block chain recording condition judging unit 50 is configured to judge whether the returned information meets the preset block chain recording condition;
资源预期结果记录单元60,用于若所述返回信息满足预设的区块链记录条件,则将所述资源预期结果记录入所述第二区块链网络中。The resource expected result recording unit 60 is configured to record the resource expected result in the second blockchain network if the returned information meets a preset blockchain recording condition.
在一个实施方式中,所述资源为指定对象的资源,所述第一数据包括所述指定对象的多个子对象的预计资源增加量与预计资源损耗量,所述资源预期结果获取单元20,包括:In one embodiment, the resource is a resource of a designated object, the first data includes the estimated resource increase and the estimated resource loss of multiple sub-objects of the designated object, and the resource expected result acquisition unit 20 includes :
统计子单元,用于统计多个所述子对象的预计资源增加量与预计资源损耗量,从而得到第一个子对象至第n个子对象的预计资源增加量A 1、A 2…、A n和第一个子对象至第n个子对象的预计资源损耗量B 1、B 2…、B n,并从预存的子对象重要程度关系表中获取第一个子对象至第n个子对象的重要程度参数p 1、p 2…、p nExpected to increase the amount of resources estimated amount of wear resource statistics sub-unit, for counting a plurality of said sub-objects, whereby a first to n th sub-object is projected object to increases in A 1, A 2 ..., A n And the estimated resource consumption B 1 , B 2 …, B n from the first sub-object to the nth sub-object, and obtain the importance of the first sub-object to the n-th sub-object from the pre-stored sub-object importance relationship table Degree parameters p 1 , p 2 …, p n ;
敏感因子M计算子单元,用于根据公式:
Figure PCTCN2020099436-appb-000017
计算出敏感因子M;
Sensitivity factor M is used to calculate sub-units according to the formula:
Figure PCTCN2020099436-appb-000017
Calculate the sensitivity factor M;
敏感阈值判断子单元,用于判断所述敏感因子M是否大于预设的敏感阈值;The sensitivity threshold judgment subunit is used to judge whether the sensitivity factor M is greater than a preset sensitivity threshold;
资源预期结果生成子单元,用于若所述敏感因子M不大于预设的敏感阈值,则生成资源预期结果,其中所述资源预期结果至少包括多个子对象的预计资源增加量与预计资源损耗量。The resource expected result generation subunit is configured to generate an expected resource result if the sensitivity factor M is not greater than a preset sensitivity threshold, wherein the expected resource result includes at least the estimated resource increase and estimated resource loss of multiple sub-objects .
在一个实施方式中,所述资源预期结果发送单元30,包括:In an embodiment, the resource expected result sending unit 30 includes:
审核区块链节点获取子单元,用于在所述第二区块链网络中,获取根据预设的共识机制投选出的多个资源预期结果审核区块链节点;The auditing block chain node obtaining subunit is used for obtaining expected results of multiple resources voted according to a preset consensus mechanism in the second block chain network, and auditing block chain nodes;
审核请求发送子单元,用于向所有所述资源预期结果审核区块链节点发送审核请求,并要求所述资源预期结果审核区块链节点发送回复信息;The audit request sending subunit is used to send an audit request to all the resource expected result audit blockchain nodes, and request the resource expected result audit blockchain node to send reply information;
回复信息接收子单元,用于接收所述资源预期结果审核区块链节点发送的回复信息,并将所述回复信息为愿意审核的资源预期结果审核区块链节点记为最终资源预期结果审核区块链节点;The reply information receiving subunit is used to receive the reply information sent by the resource expected result review blockchain node, and record the reply information as the resource expected result review block chain node willing to review as the final resource expected result review area Block chain node;
资源预期结果发送子单元,用于将所述资源预期结果发送给多个所述最终资源预期结 果审核区块链节点,并要求多个所述最终资源预期结果审核区块链节点对所述资源预期结果进行审核。The resource expected result sending subunit is used to send the expected result of the resource to a plurality of the expected result of the final resource review blockchain node, and request the expected result of the final resource to review the blockchain node for the resource The expected results are reviewed.
在一个实施方式中,所述区块链记录条件判断单元50,包括:In one embodiment, the block chain recording condition judging unit 50 includes:
返回信息统计子单元,用于统计所述返回信息,从而得到接收到的所述返回信息的总数量,以及审核通过的返回信息的数量;The return information statistics subunit is used to count the return information, so as to obtain the total number of the return information received and the number of the return information passed the audit;
商值计算子单元,用于计算所述审核通过的返回信息的数量除以所述返回信息的总数量的商值;Quotient calculation subunit, used to calculate the quotient of the number of returned messages that passed the review divided by the total number of returned messages;
参数阈值判断子单元,用于判断所述商值是否大于预设的区块链记录参数阈值;The parameter threshold judging subunit is used to judge whether the quotient is greater than a preset blockchain record parameter threshold;
条件满足判定子单元,用于若所述商值大于预设的区块链记录参数阈值,则判定所述返回信息满足预设的区块链记录条件。The condition satisfaction determination subunit is configured to determine that the returned information meets the preset blockchain recording condition if the quotient is greater than a preset blockchain recording parameter threshold.
在一个实施方式中,所述装置,包括:In one embodiment, the device includes:
原因获取指令发送单元,用于若所述返回信息不满足预设的区块链记录条件,则向返回信息为审核未通过的资源预期结果审核区块链节点发送原因获取指令,所述原因获取指令用于指示所述资源预期结果审核区块链节点将审核未通过的原因发送给所述指定终端;The reason acquisition instruction sending unit is configured to, if the return information does not meet the preset blockchain recording conditions, send the reason acquisition instruction to the resource expected result auditing blockchain node whose return information is not passed, and the reason acquisition The instruction is used to instruct the resource expected result review blockchain node to send the reason for the failure of the review to the designated terminal;
原因接收单元,用于接收资源预期结果审核区块链节点发送的审核未通过的原因;The reason receiving unit is used to receive the reason for the failure of the audit sent by the resource expected result audit blockchain node;
原因列表判断单元,用于判断所述审核未通过的原因是否存在于预设的原因列表中;The reason list judgment unit is used to judge whether the reason for the failure of the review exists in the preset reason list;
不允许记录单元,用于若所述审核未通过的原因存在于预设的原因列表中,则不允许将所述资源预期结果记录入所述第二区块链网络中,并生成审核不通过的提醒信息,并在所述提醒信息中附上所述审核未通过的原因。The recording unit is not allowed, which is used to if the reason for the failure of the audit is in the preset reason list, the expected result of the resource is not allowed to be recorded in the second blockchain network, and generates the failure of the audit And attach the reason for the failure of the review to the reminder message.
在一个实施方式中,所述装置,包括:In one embodiment, the device includes:
区块链类创建单元,用于利用Go语言创建区块链类,并赋予所述区块链类指定参数,从而获得创世区块,并在所述创世区块中将前一区块的哈希值设为0;The block chain creation unit is used to create a block chain class by using the Go language, and assign parameters to the block chain class to obtain the genesis block, and to use the previous block in the genesis block The hash value of is set to 0;
其他区块生成单元,用于基于所述创世区块,生成其他区块,其中所述其他区块记载有前一区块的哈希值;The other block generating unit is configured to generate other blocks based on the genesis block, wherein the other blocks record the hash value of the previous block;
第二区块链网络搭建单元,用于以预设终端作为第二区块链网络的区块链节点,从而搭建所述第二区块链网络。The second blockchain network construction unit is configured to use a preset terminal as a blockchain node of the second blockchain network to build the second blockchain network.
在一个实施方式中,所述指定终端预存有虚拟机镜像和区块链节点容器镜像,所述装置,包括:In one embodiment, the designated terminal prestores a virtual machine image and a blockchain node container image, and the device includes:
加入请求接收单元,用于接收申请终端发送的加入第二区块链网络的请求,所述加入第二区块链网络的请求附带有所述申请终端的身份信息;The joining request receiving unit is configured to receive a request to join a second blockchain network sent by an application terminal, and the request to join the second blockchain network is attached with the identity information of the application terminal;
允许加入列表判断单元,用于判断所述申请终端的身份信息是否处于预设的允许加入列表中;The allowed joining list judging unit is used to judge whether the identity information of the applying terminal is in the preset allowed joining list;
镜像发送单元,用于若所述申请终端的身份信息处于预设的允许加入列表中,则向所述申请终端发送所述虚拟机镜像和区块链节点容器镜像;An image sending unit, configured to send the virtual machine image and the blockchain node container image to the application terminal if the identity information of the application terminal is in the preset allowable join list;
IP地址与通信端口获取单元,用于获取所述申请终端的IP地址与通信端口;An IP address and communication port obtaining unit, configured to obtain the IP address and communication port of the application terminal;
IP地址与通信端口发送单元,用于向所述申请终端发送预存的第二区块链网络的所有区块链节点的IP地址和通信端口的信息,以及向第二区块链网络的所有区块链节点发送所述申请终端的IP地址和通信端口的信息,从而将所述申请终端加入所述第二区块链网络,其中所述申请终端已在所述虚拟机镜像中安装并启动所述区块链节点容器镜像。The IP address and communication port sending unit is used to send the pre-stored IP address and communication port information of all blockchain nodes of the second blockchain network to the application terminal, and to all areas of the second blockchain network The block chain node sends the IP address and communication port information of the application terminal, thereby adding the application terminal to the second blockchain network, wherein the application terminal has been installed in the virtual machine image and started all The image of the blockchain node container.
其中,上述单元或子单元与前述基于区块链的资源预期结果审核方法中的步骤相同,在此不再赘述。Wherein, the above-mentioned units or sub-units are the same as the steps in the aforementioned blockchain-based resource expected result review method, and will not be repeated here.
参照图3,本申请实施例中还提供一种计算机设备,该计算机设备可以是服务器,其内部结构可以如图所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设计的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该 计算机设备的数据库用于存储基于区块链的资源预期结果审核方法所用数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种基于区块链的资源预期结果审核方法。3, an embodiment of the present application also provides a computer device. The computer device may be a server, and its internal structure may be as shown in the figure. The computer equipment includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the computer designed processor is used to provide calculation and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the computer equipment is used to store the data used in the method of reviewing the expected results of resources based on the blockchain. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for reviewing the expected results of resources based on the blockchain is realized.
上述处理器执行上述基于区块链的资源预期结果审核方法,应用于指定终端,包括:从预设的第一区块链网络中提取第一数据,其中所述指定终端既是预先构建的第一区块链网络的一个区块链节点,又是预先构建的第二区块链网络的一个区块链节点,所述第一区块链网络至少包括提供资源预期计算使用数据的区块链节点,所述第二区块链网络至少包括资源预期结果审核区块链节点;获取实时采集的所述资源的第二数据,并根据公式:H(t)=min(G(t),m),其中
Figure PCTCN2020099436-appb-000018
E(t)=F(t)-f(t),获取函数H(t),其中F(t)为所述资源的第二数据随时间变化的函数,f(t)为预设的标准第二数据变化函数,E(t)为所述函数F(t)与所述标准第二数据变化函数f(t)的差值函数,
Figure PCTCN2020099436-appb-000019
为所述差值函数对时间的微分函数,min指最小值函数,t为时间,m为预设的大于0的误差参数值;获取所述函数H(t)在时间轴上不等于m时的第一时间长度和等于m时的第二时间长度,并根据公式:正常时间占比=所述第一时间长度/(所述第一时间长度+所述第二时间长度),计算出所述正常时间占比,并判断所述正常时间占比是否大于预设占比阈值;若所述正常时间占比大于预设占比阈值,则根据所述第一数据,利用预设的资源预期算法,生成资源预期结果;将所述资源预期结果发送给所述第二区块链网络中的多个资源预期结果审核区块链节点,并要求多个资源预期结果审核区块链节点对所述资源预期结果进行审核;接收多个资源预期结果审核区块链节点对所述资源预期结果进行审核的返回信息,其中所述返回信息包括审核通过或者审核未通过;判断所述返回信息是否满足预设的区块链记录条件;若所述返回信息满足预设的区块链记录条件,则将所述资源预期结果记录入所述第二区块链网络中。
The processor executes the foregoing blockchain-based resource expected result review method, applied to a designated terminal, and includes: extracting first data from a preset first blockchain network, wherein the designated terminal is both a pre-built first A block chain node of the block chain network is also a block chain node of a pre-built second block chain network. The first block chain network includes at least a block chain node that provides expected calculation usage data of resources , The second blockchain network at least includes resource expected results reviewing blockchain nodes; acquiring the second data of the resource collected in real time, and according to the formula: H(t)=min(G(t),m) ,among them
Figure PCTCN2020099436-appb-000018
E(t)=F(t)-f(t), get the function H(t), where F(t) is the function of the second data of the resource changing with time, f(t) is the preset standard The second data change function, E(t) is the difference function of the function F(t) and the standard second data change function f(t),
Figure PCTCN2020099436-appb-000019
Is the differential function of the difference function with respect to time, min refers to the minimum value function, t is time, and m is the preset error parameter value greater than 0; when the function H(t) is not equal to m on the time axis The first time length and the second time length when it is equal to m, and according to the formula: normal time ratio=the first time length/(the first time length+the second time length), calculate all The normal time ratio, and determine whether the normal time ratio is greater than the preset ratio threshold; if the normal time ratio is greater than the preset ratio threshold, use the preset resource expectation according to the first data Algorithm to generate the expected result of the resource; send the expected result of the resource to multiple resource expected results auditing blockchain nodes in the second blockchain network, and request multiple resource expected results auditing blockchain nodes The expected result of the resource is reviewed; the expected result of the resource is received, and the returned information of the expected result of the resource is reviewed by the blockchain node, wherein the returned information includes the approved or failed audit; it is judged whether the returned information is satisfied The preset blockchain recording condition; if the returned information meets the preset blockchain recording condition, the expected result of the resource is recorded in the second blockchain network.
本申请一实施例还提供一种计算机可读存储介质,所述计算机可读存储介质可以是非易失性,也可以是易失性,其上存储有计算机程序,计算机程序被处理器执行时实现基于区块链的资源预期结果审核方法,应用于指定终端,包括:从预设的第一区块链网络中提取第一数据,其中所述指定终端既是预先构建的第一区块链网络的一个区块链节点,又是预先构建的第二区块链网络的一个区块链节点,所述第一区块链网络至少包括提供资源预期计算使用数据的区块链节点,所述第二区块链网络至少包括资源预期结果审核区块链节点;获取实时采集的所述资源的第二数据,并根据公式:H(t)=min(G(t),m),其中
Figure PCTCN2020099436-appb-000020
E(t)=F(t)-f(t),获取函数H(t),其中F(t)为所述资源的第二数据随时间变化的函数,f(t)为预设的标准第二数据变化函数,E(t)为所述函数F(t)与所述标准第二数据变化函数f(t)的差值函数,
Figure PCTCN2020099436-appb-000021
为所述差值函数对时间的微分函数,min指最小值函数,t为时间,m为预设的大于0的误差参数值;获取所述函数H(t)在时间轴上不等于m时的第一时间长度和等于m时的第二时间长度,并根据公式:正常时间占比=所述第一时间长度/(所述第一时间长度+所述第二时间长度),计算出所述正常时间占比,并判断所述正常时间占比是否大于预设占比阈值;若所述正常时间占比大于预设占比阈值,则根据所述第一数据,利用预设的资源预期算法,生成资源预期结果;将所述资源预期结果发送给所述第二区块链网络中的多个资源预期结果审核区块链节点,并要求多个资源预期结果审核区块链节点对所述资源预期结果进行审核;接收多个资源预期结果审核区块链节点对所述资源预期结果进行审核的返回信息,其中所述返回信息包括审核通过或者审核未通过;判断所述返回信息是否满足预设的区块链记录条件;若所述返回 信息满足预设的区块链记录条件,则将所述资源预期结果记录入所述第二区块链网络中。
An embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium may be non-volatile or volatile, and has a computer program stored thereon, which is realized when the computer program is executed by a processor. The method for reviewing the expected results of resources based on the blockchain, applied to a designated terminal, includes: extracting first data from a preset first blockchain network, wherein the designated terminal is both a pre-built first blockchain network A block chain node is also a block chain node of a second pre-built block chain network. The first block chain network includes at least a block chain node that provides data on the expected computing usage of resources. The blockchain network includes at least the expected results of the resource to review the blockchain node; obtain the second data of the resource collected in real time, and according to the formula: H(t)=min(G(t),m), where
Figure PCTCN2020099436-appb-000020
E(t)=F(t)-f(t), get the function H(t), where F(t) is the function of the second data of the resource changing with time, f(t) is the preset standard The second data change function, E(t) is the difference function of the function F(t) and the standard second data change function f(t),
Figure PCTCN2020099436-appb-000021
Is the differential function of the difference function with respect to time, min refers to the minimum value function, t is time, and m is the preset error parameter value greater than 0; when the function H(t) is not equal to m on the time axis The first time length and the second time length when it is equal to m, and according to the formula: normal time ratio=the first time length/(the first time length+the second time length), calculate all The normal time ratio, and determine whether the normal time ratio is greater than the preset ratio threshold; if the normal time ratio is greater than the preset ratio threshold, use the preset resource expectation according to the first data Algorithm to generate the expected result of the resource; send the expected result of the resource to multiple resource expected results auditing blockchain nodes in the second blockchain network, and request multiple resource expected results auditing blockchain nodes The expected result of the resource is reviewed; the expected result of the resource is received, and the returned information of the expected result of the resource is reviewed by the blockchain node, wherein the returned information includes the approved or failed audit; it is judged whether the returned information is satisfied The preset blockchain recording condition; if the returned information meets the preset blockchain recording condition, the expected result of the resource is recorded in the second blockchain network.

Claims (20)

  1. 一种基于区块链的资源预期结果审核方法,应用于指定终端,其中,包括:A method for reviewing expected results of resources based on blockchain, applied to designated terminals, including:
    从预设的第一区块链网络中提取第一数据,其中所述指定终端既是预先构建的第一区块链网络的一个区块链节点,又是预先构建的第二区块链网络的一个区块链节点,所述第一区块链网络至少包括提供资源预期计算使用数据的区块链节点,所述第二区块链网络至少包括资源预期结果审核区块链节点;Extract the first data from the preset first blockchain network, where the designated terminal is both a blockchain node of the pre-built first blockchain network and a pre-built second blockchain network A block chain node, the first block chain network includes at least a block chain node that provides resource expected calculation usage data, and the second block chain network at least includes a resource expected result review block chain node;
    获取实时采集的所述资源的第二数据,并根据公式:Acquire the second data of the resource collected in real time, and according to the formula:
    H(t)=min(G(t),m),其中
    Figure PCTCN2020099436-appb-100001
    E(t)=F(t)-f(t),获取函数H(t),其中F(t)为所述资源的第二数据随时间变化的函数,f(t)为预设的标准第二数据变化函数,E(t)为所述函数F(t)与所述标准第二数据变化函数f(t)的差值函数,
    Figure PCTCN2020099436-appb-100002
    为所述差值函数对时间的微分函数,min指最小值函数,t为时间,m为预设的大于0的误差参数值;获取所述函数H(t)在时间轴上不等于m时的第一时间长度和等于m时的第二时间长度,并根据公式:正常时间占比=所述第一时间长度/(所述第一时间长度+所述第二时间长度),计算出所述正常时间占比,并判断所述正常时间占比是否大于预设占比阈值;若所述正常时间占比大于预设占比阈值,则根据所述第一数据,利用预设的资源预期算法,生成资源预期结果;
    H(t)=min(G(t),m), where
    Figure PCTCN2020099436-appb-100001
    E(t)=F(t)-f(t), get the function H(t), where F(t) is the function of the second data of the resource changing with time, f(t) is the preset standard The second data change function, E(t) is the difference function of the function F(t) and the standard second data change function f(t),
    Figure PCTCN2020099436-appb-100002
    Is the differential function of the difference function with respect to time, min refers to the minimum value function, t is time, and m is the preset error parameter value greater than 0; when the function H(t) is not equal to m on the time axis The first time length and the second time length when it is equal to m, and according to the formula: normal time ratio=the first time length/(the first time length+the second time length), calculate all The normal time ratio, and determine whether the normal time ratio is greater than the preset ratio threshold; if the normal time ratio is greater than the preset ratio threshold, use the preset resource expectation according to the first data Algorithm to generate expected results of resources;
    将所述资源预期结果发送给所述第二区块链网络中的多个资源预期结果审核区块链节点,并要求多个资源预期结果审核区块链节点对所述资源预期结果进行审核;Sending the expected resource result to multiple resource expected result review blockchain nodes in the second blockchain network, and request multiple resource expected result review blockchain nodes to review the resource expected result;
    接收多个资源预期结果审核区块链节点对所述资源预期结果进行审核的返回信息,其中所述返回信息包括审核通过或者审核未通过;Receiving a plurality of resource expected results reviewing the return information of the expected result of the resource by the blockchain node, where the return information includes the review passed or the review failed;
    判断所述返回信息是否满足预设的区块链记录条件;Determine whether the returned information meets preset blockchain recording conditions;
    若所述返回信息满足预设的区块链记录条件,则将所述资源预期结果记录入所述第二区块链网络中。If the returned information satisfies a preset blockchain recording condition, the expected result of the resource is recorded in the second blockchain network.
  2. 根据权利要求1所述的基于区块链的资源预期结果审核方法,其中,所述资源为指定对象的资源,所述第一数据包括所述指定对象的多个子对象的预计资源增加量与预计资源损耗量,所述根据所述第一数据,利用预设的资源预期算法,生成资源预期结果的步骤,包括:The method for reviewing expected results of a blockchain-based resource according to claim 1, wherein the resource is a resource of a designated object, and the first data includes the estimated resource increase and estimated resource increase of multiple sub-objects of the designated object The amount of resource loss, the step of generating the expected result of the resource by using a preset resource expected algorithm according to the first data includes:
    统计多个所述子对象的预计资源增加量与预计资源损耗量,从而得到第一个子对象至第n个子对象的预计资源增加量A 1、A 2…、A n和第一个子对象至第n个子对象的预计资源损耗量B 1、B 2…、B n,并从预存的子对象重要程度关系表中获取第一个子对象至第n个子对象的重要程度参数p 1、p 2…、p nStatistics of the plurality of sub-objects is expected to increase the amount of resources estimated amount of loss of resources, thereby obtaining first to n-th sub-object is projected object to increases in A 1, A 2 ..., A n and the first child The estimated resource consumption of the nth sub-object B 1 , B 2 …, B n , and the importance parameters p 1 , p from the first sub-object to the n-th sub-object are obtained from the pre-stored sub-object importance relationship table 2 …, p n ;
    根据公式:
    Figure PCTCN2020099436-appb-100003
    计算出敏感因子M;
    According to the formula:
    Figure PCTCN2020099436-appb-100003
    Calculate the sensitivity factor M;
    判断所述敏感因子M是否大于预设的敏感阈值;Determine whether the sensitivity factor M is greater than a preset sensitivity threshold;
    若所述敏感因子M不大于预设的敏感阈值,则生成资源预期结果,其中所述资源预期结果至少包括多个子对象的预计资源增加量与预计资源损耗量。If the sensitivity factor M is not greater than the preset sensitivity threshold, an expected result of the resource is generated, where the expected result of the resource includes at least the estimated resource increase and the estimated resource loss of multiple sub-objects.
  3. 根据权利要求1所述的基于区块链的资源预期结果审核方法,其中,所述将所述资源预期结果发送给所述第二区块链网络中的多个资源预期结果审核区块链节点,并要求多个资源预期结果审核区块链节点对所述资源预期结果进行审核的步骤,包括:The method for reviewing expected results of resources based on blockchain according to claim 1, wherein said sending said expected results of resources to multiple resource expected results reviewing blockchain nodes in said second blockchain network , And require multiple resource expected results review. The steps for blockchain nodes to review the expected results of the resource include:
    在所述第二区块链网络中,获取根据预设的共识机制投选出的多个资源预期结果审核区块链节点;In the second blockchain network, obtaining expected results of multiple resources voted according to a preset consensus mechanism to review blockchain nodes;
    向所有所述资源预期结果审核区块链节点发送审核请求,并要求所述资源预期结果审核区块链节点发送回复信息;Send an audit request to all the resource expected result audit blockchain nodes, and require the resource expected result audit blockchain node to send a reply message;
    接收所述资源预期结果审核区块链节点发送的回复信息,并将所述回复信息为愿意审核的资源预期结果审核区块链节点记为最终资源预期结果审核区块链节点;Receiving the reply message sent by the resource expected result auditing blockchain node, and recording the replying information as the resource expected result auditing blockchain node willing to audit as the final resource expected result auditing blockchain node;
    将所述资源预期结果发送给多个所述最终资源预期结果审核区块链节点,并要求多个所述最终资源预期结果审核区块链节点对所述资源预期结果进行审核。The expected result of the resource is sent to a plurality of expected final resource result review blockchain nodes, and a plurality of expected final resource expected result review blockchain nodes are required to review the expected result of the resource.
  4. 根据权利要求1所述的基于区块链的资源预期结果审核方法,其中,所述判断所述返回信息是否满足预设的区块链记录条件的步骤,包括:The method for reviewing expected results of blockchain-based resources according to claim 1, wherein the step of judging whether the returned information meets a preset blockchain recording condition comprises:
    统计所述返回信息,从而得到接收到的所述返回信息的总数量,以及审核通过的返回信息的数量;Counting the return information, so as to obtain the total number of the return information received and the number of the return information passed the audit;
    计算所述审核通过的返回信息的数量除以所述返回信息的总数量的商值;Calculate the quotient of the number of returned messages that have passed the review divided by the total number of returned messages;
    判断所述商值是否大于预设的区块链记录参数阈值;Judging whether the quotient is greater than a preset block chain record parameter threshold;
    若所述商值大于预设的区块链记录参数阈值,则判定所述返回信息满足预设的区块链记录条件。If the quotient is greater than the preset blockchain recording parameter threshold, it is determined that the returned information satisfies the preset blockchain recording condition.
  5. 根据权利要求1所述的基于区块链的资源预期结果审核方法,其中,所述判断所述返回信息是否满足预设的区块链记录条件的步骤之后,包括:The method for reviewing expected results of blockchain-based resources according to claim 1, wherein after the step of judging whether the returned information meets a preset blockchain recording condition, the method comprises:
    若所述返回信息不满足预设的区块链记录条件,则向返回信息为审核未通过的资源预期结果审核区块链节点发送原因获取指令,所述原因获取指令用于指示所述资源预期结果审核区块链节点将审核未通过的原因发送给所述指定终端;If the returned information does not meet the preset blockchain recording conditions, send a reason acquisition instruction to the resource expected result auditing blockchain node whose return information is that the review failed. The reason acquisition instruction is used to indicate the resource expectation As a result, the audit blockchain node sends the reason for the failure of the audit to the designated terminal;
    接收资源预期结果审核区块链节点发送的审核未通过的原因;The reason for the failure of the audit sent by the receiving resource expected result audit blockchain node;
    判断所述审核未通过的原因是否存在于预设的原因列表中;Determine whether the reason for the failure of the review exists in the preset reason list;
    若所述审核未通过的原因存在于预设的原因列表中,则不允许将所述资源预期结果记录入所述第二区块链网络中,并生成审核不通过的提醒信息,并在所述提醒信息中附上所述审核未通过的原因。If the reason for the failure of the audit is in the preset reason list, the expected result of the resource is not allowed to be recorded in the second blockchain network, and a reminder message of the failure of the audit is generated and displayed The reason for the failure of the review is attached to the reminder message.
  6. 根据权利要求1所述的基于区块链的资源预期结果审核方法,其中,所述从预设的第一区块链网络中提取第一数据,其中所述指定终端既是预先构建的第一区块链网络的一个区块链节点,又是预先构建的第二区块链网络的一个区块链节点,所述第一区块链网络至少包括提供资源预期计算使用数据的区块链节点,所述第二区块链网络至少包括资源预期结果审核区块链节点的步骤之前,包括:The method for reviewing expected results of a blockchain-based resource according to claim 1, wherein said first data is extracted from a preset first blockchain network, wherein said designated terminal is both a pre-built first zone A block chain node of the block chain network is also a block chain node of a pre-built second block chain network. The first block chain network includes at least a block chain node that provides expected calculation usage data of resources, Before the second blockchain network at least includes the step of reviewing blockchain nodes for the expected results of resources, it includes:
    利用Go语言创建区块链类,并赋予所述区块链类指定参数,从而获得创世区块,并在所述创世区块中将前一区块的哈希值设为0;Use the Go language to create a blockchain class, and assign specified parameters to the blockchain class to obtain a genesis block, and set the hash value of the previous block to 0 in the genesis block;
    基于所述创世区块,生成其他区块,其中所述其他区块记载有前一区块的哈希值;Generate other blocks based on the genesis block, where the other blocks record the hash value of the previous block;
    以预设终端作为第二区块链网络的区块链节点,从而搭建所述第二区块链网络。The preset terminal is used as the block chain node of the second block chain network, so as to build the second block chain network.
  7. 根据权利要求1所述的基于区块链的资源预期结果审核方法,其中,所述指定终端预存有虚拟机镜像和区块链节点容器镜像,所述从预设的第一区块链网络中提取第一数据,其中所述指定终端既是预先构建的第一区块链网络的一个区块链节点,又是预先构建的第二区块链网络的一个区块链节点,所述第一区块链网络至少包括提供资源预期计算使用数据的区块链节点,所述第二区块链网络至少包括资源预期结果审核区块链节点的步骤之前,包括:The method for reviewing expected results of blockchain-based resources according to claim 1, wherein the designated terminal is pre-stored with a virtual machine image and a blockchain node container image, and the preset first blockchain network Extract the first data, where the designated terminal is both a block chain node of the pre-built first block chain network and a block chain node of the pre-built second block chain network. The first area The block chain network includes at least a block chain node that provides data for expected calculation and usage of resources, and the second block chain network includes at least the step of reviewing the block chain node for the expected result of the resource, including:
    接收申请终端发送的加入第二区块链网络的请求,所述加入第二区块链网络的请求附带有所述申请终端的身份信息;Receiving a request to join a second blockchain network sent by an application terminal, where the request to join the second blockchain network is attached with the identity information of the application terminal;
    判断所述申请终端的身份信息是否处于预设的允许加入列表中;Judging whether the identity information of the applying terminal is in a preset allowable join list;
    若所述申请终端的身份信息处于预设的允许加入列表中,则向所述申请终端发送所述虚拟机镜像和区块链节点容器镜像;If the identity information of the applying terminal is in the preset allowed join list, sending the virtual machine image and the blockchain node container image to the applying terminal;
    获取所述申请终端的IP地址与通信端口;Obtaining the IP address and communication port of the application terminal;
    向所述申请终端发送预存的第二区块链网络的所有区块链节点的IP地址和通信端口的信息,以及向第二区块链网络的所有区块链节点发送所述申请终端的IP地址和通信端口的信息,从而将所述申请终端加入所述第二区块链网络,其中所述申请终端已在所述虚拟机 镜像中安装并启动所述区块链节点容器镜像。Send the pre-stored information of the IP addresses and communication ports of all the blockchain nodes of the second blockchain network to the application terminal, and send the IP of the application terminal to all the blockchain nodes of the second blockchain network Address and communication port information, thereby adding the application terminal to the second blockchain network, wherein the application terminal has been installed in the virtual machine image and started the blockchain node container image.
  8. 一种基于区块链的资源预期结果审核装置,应用于指定终端,其中,包括:A device for reviewing expected results of resources based on blockchain, applied to designated terminals, including:
    第一数据提取单元,用于从预设的第一区块链网络中提取第一数据,其中所述指定终端既是预先构建的第一区块链网络的一个区块链节点,又是预先构建的第二区块链网络的一个区块链节点,所述第一区块链网络至少包括提供资源预期计算使用数据的区块链节点,所述第二区块链网络至少包括资源预期结果审核区块链节点;The first data extraction unit is used to extract the first data from the preset first blockchain network, wherein the designated terminal is both a blockchain node of the first blockchain network constructed in advance, and it is also constructed in advance A blockchain node of the second blockchain network, the first blockchain network includes at least a blockchain node that provides expected calculation usage data of resources, and the second blockchain network includes at least an audit of expected results of resources Blockchain node;
    资源预期结果获取单元,用于获取实时采集的所述资源的第二数据,并根据公式:The resource expected result obtaining unit is configured to obtain the second data of the resource collected in real time, and according to the formula:
    H(t)=min(G(t),m),其中
    Figure PCTCN2020099436-appb-100004
    E(t)=F(t)-f(t),获取函数H(t),其中F(t)为所述资源的第二数据随时间变化的函数,f(t)为预设的标准第二数据变化函数,E(t)为所述函数F(t)与所述标准第二数据变化函数f(t)的差值函数,
    Figure PCTCN2020099436-appb-100005
    为所述差值函数对时间的微分函数,min指最小值函数,t为时间,m为预设的大于0的误差参数值;获取所述函数H(t)在时间轴上不等于m时的第一时间长度和等于m时的第二时间长度,并根据公式:正常时间占比=所述第一时间长度/(所述第一时间长度+所述第二时间长度),计算出所述正常时间占比,并判断所述正常时间占比是否大于预设占比阈值;若所述正常时间占比大于预设占比阈值,则根据所述第一数据,利用预设的资源预期算法,生成资源预期结果;
    H(t)=min(G(t),m), where
    Figure PCTCN2020099436-appb-100004
    E(t)=F(t)-f(t), get the function H(t), where F(t) is the function of the second data of the resource changing with time, f(t) is the preset standard The second data change function, E(t) is the difference function of the function F(t) and the standard second data change function f(t),
    Figure PCTCN2020099436-appb-100005
    Is the differential function of the difference function with respect to time, min refers to the minimum value function, t is time, and m is the preset error parameter value greater than 0; when the function H(t) is not equal to m on the time axis The first time length and the second time length when it is equal to m, and according to the formula: normal time ratio=the first time length/(the first time length+the second time length), calculate all The normal time ratio, and determine whether the normal time ratio is greater than the preset ratio threshold; if the normal time ratio is greater than the preset ratio threshold, use the preset resource expectation according to the first data Algorithm to generate expected results of resources;
    资源预期结果发送单元,用于将所述资源预期结果发送给所述第二区块链网络中的多个资源预期结果审核区块链节点,并要求多个资源预期结果审核区块链节点对所述资源预期结果进行审核;The resource expected result sending unit is used to send the expected resource result to multiple resource expected result review blockchain nodes in the second blockchain network, and request multiple resource expected result review blockchain node pairs The expected results of the resources are reviewed;
    返回信息接收单元,用于接收多个资源预期结果审核区块链节点对所述资源预期结果进行审核的返回信息,其中所述返回信息包括审核通过或者审核未通过;The return information receiving unit is configured to receive return information from a plurality of resource expected result auditing blockchain nodes to audit the expected result of the resource, wherein the returned information includes the audit passed or the audit failed;
    区块链记录条件判断单元,用于判断所述返回信息是否满足预设的区块链记录条件;The block chain recording condition judgment unit is used to judge whether the returned information meets the preset block chain recording condition;
    资源预期结果记录单元,用于若所述返回信息满足预设的区块链记录条件,则将所述资源预期结果记录入所述第二区块链网络中。The resource expected result recording unit is configured to record the resource expected result into the second blockchain network if the returned information meets a preset blockchain recording condition.
  9. 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其中,所述处理器执行所述计算机程序时实现一种基于区块链的资源预期结果审核方法;所述基于区块链的资源预期结果审核方法,应用于指定终端,包括:A computer device includes a memory and a processor, the memory stores a computer program, wherein the processor implements a blockchain-based resource expected result review method when the processor executes the computer program; the block-based The method of reviewing expected results of chain resources, applied to designated terminals, including:
    从预设的第一区块链网络中提取第一数据,其中所述指定终端既是预先构建的第一区块链网络的一个区块链节点,又是预先构建的第二区块链网络的一个区块链节点,所述第一区块链网络至少包括提供资源预期计算使用数据的区块链节点,所述第二区块链网络至少包括资源预期结果审核区块链节点;Extract the first data from the preset first blockchain network, where the designated terminal is both a blockchain node of the pre-built first blockchain network and a pre-built second blockchain network A block chain node, the first block chain network includes at least a block chain node that provides resource expected calculation usage data, and the second block chain network at least includes a resource expected result review block chain node;
    获取实时采集的所述资源的第二数据,并根据公式:Acquire the second data of the resource collected in real time, and according to the formula:
    H(t)=min(G(t),m),其中
    Figure PCTCN2020099436-appb-100006
    E(t)=F(t)-f(t),获取函数H(t),其中F(t)为所述资源的第二数据随时间变化的函数,f(t)为预设的标准第二数据变化函数,E(t)为所述函数F(t)与所述标准第二数据变化函数f(t)的差值函数,
    Figure PCTCN2020099436-appb-100007
    为所述差值函数对时间的微分函数,min指最小值函数,t为时间,m为预设的大于0的误差参数值;获取所述函数H(t)在时间轴上不等于m时的第一时间长度和等于m时的第二时间长度,并根据公式:正常时间占比=所述第一时间长度/(所述第一时间长度+所述第二时间长度),计算出所述正常时间占比,并判断所述正常时间占比是否大于预设占比阈值;若所述正常时间占比大于预设占比阈值,则根据所述第一数据,利用预设的资源预期算法,生成资源预期结果;
    H(t)=min(G(t),m), where
    Figure PCTCN2020099436-appb-100006
    E(t)=F(t)-f(t), get the function H(t), where F(t) is the function of the second data of the resource changing with time, f(t) is the preset standard The second data change function, E(t) is the difference function of the function F(t) and the standard second data change function f(t),
    Figure PCTCN2020099436-appb-100007
    Is the differential function of the difference function with respect to time, min refers to the minimum value function, t is time, and m is the preset error parameter value greater than 0; when the function H(t) is not equal to m on the time axis The first time length and the second time length when it is equal to m, and according to the formula: normal time ratio=the first time length/(the first time length+the second time length), calculate all The normal time ratio, and determine whether the normal time ratio is greater than the preset ratio threshold; if the normal time ratio is greater than the preset ratio threshold, use the preset resource expectation according to the first data Algorithm to generate expected results of resources;
    将所述资源预期结果发送给所述第二区块链网络中的多个资源预期结果审核区块链节 点,并要求多个资源预期结果审核区块链节点对所述资源预期结果进行审核;Sending the expected result of the resource to multiple resource expected results reviewing blockchain nodes in the second blockchain network, and requesting multiple resource expected result reviewing blockchain nodes to review the expected resource result;
    接收多个资源预期结果审核区块链节点对所述资源预期结果进行审核的返回信息,其中所述返回信息包括审核通过或者审核未通过;Receiving a plurality of resource expected results reviewing the return information of the expected result of the resource by the blockchain node, where the return information includes the review passed or the review failed;
    判断所述返回信息是否满足预设的区块链记录条件;Determine whether the returned information meets preset blockchain recording conditions;
    若所述返回信息满足预设的区块链记录条件,则将所述资源预期结果记录入所述第二区块链网络中。If the returned information satisfies a preset blockchain recording condition, the expected result of the resource is recorded in the second blockchain network.
  10. 根据权利要求9所述的计算机设备,其中,所述资源为指定对象的资源,所述第一数据包括所述指定对象的多个子对象的预计资源增加量与预计资源损耗量,所述根据所述第一数据,利用预设的资源预期算法,生成资源预期结果的步骤,包括:The computer device according to claim 9, wherein the resource is a resource of a designated object, the first data includes an estimated resource increase and an estimated resource loss of a plurality of sub-objects of the designated object, and the estimated resource loss is based on the The first data, the step of generating the expected result of the resource by using the preset resource expectation algorithm, includes:
    统计多个所述子对象的预计资源增加量与预计资源损耗量,从而得到第一个子对象至第n个子对象的预计资源增加量A 1、A 2…、A n和第一个子对象至第n个子对象的预计资源损耗量B 1、B 2…、B n,并从预存的子对象重要程度关系表中获取第一个子对象至第n个子对象的重要程度参数p 1、p 2…、p nStatistics of the plurality of sub-objects is expected to increase the amount of resources estimated amount of loss of resources, thereby obtaining first to n-th sub-object is projected object to increases in A 1, A 2 ..., A n and the first child The estimated resource consumption of the nth sub-object B 1 , B 2 …, B n , and the importance parameters p 1 , p from the first sub-object to the n-th sub-object are obtained from the pre-stored sub-object importance relationship table 2 …, p n ;
    根据公式:
    Figure PCTCN2020099436-appb-100008
    计算出敏感因子M;
    According to the formula:
    Figure PCTCN2020099436-appb-100008
    Calculate the sensitivity factor M;
    判断所述敏感因子M是否大于预设的敏感阈值;Determine whether the sensitivity factor M is greater than a preset sensitivity threshold;
    若所述敏感因子M不大于预设的敏感阈值,则生成资源预期结果,其中所述资源预期结果至少包括多个子对象的预计资源增加量与预计资源损耗量。If the sensitivity factor M is not greater than the preset sensitivity threshold, an expected result of the resource is generated, where the expected result of the resource includes at least the estimated resource increase and the estimated resource loss of multiple sub-objects.
  11. 根据权利要求9所述的计算机设备,其中,所述将所述资源预期结果发送给所述第二区块链网络中的多个资源预期结果审核区块链节点,并要求多个资源预期结果审核区块链节点对所述资源预期结果进行审核的步骤,包括:The computer device according to claim 9, wherein said sending said resource expected result to a plurality of resource expected results auditing blockchain nodes in said second blockchain network, and requesting a plurality of resource expected results The steps of auditing the expected results of the resource by the blockchain node include:
    在所述第二区块链网络中,获取根据预设的共识机制投选出的多个资源预期结果审核区块链节点;In the second blockchain network, obtaining expected results of multiple resources voted according to a preset consensus mechanism to review blockchain nodes;
    向所有所述资源预期结果审核区块链节点发送审核请求,并要求所述资源预期结果审核区块链节点发送回复信息;Send an audit request to all the resource expected result audit blockchain nodes, and require the resource expected result audit blockchain node to send a reply message;
    接收所述资源预期结果审核区块链节点发送的回复信息,并将所述回复信息为愿意审核的资源预期结果审核区块链节点记为最终资源预期结果审核区块链节点;Receiving the reply message sent by the resource expected result auditing blockchain node, and recording the replying information as the resource expected result auditing blockchain node willing to audit as the final resource expected result auditing blockchain node;
    将所述资源预期结果发送给多个所述最终资源预期结果审核区块链节点,并要求多个所述最终资源预期结果审核区块链节点对所述资源预期结果进行审核。The expected result of the resource is sent to a plurality of expected final resource result review blockchain nodes, and a plurality of expected final resource expected result review blockchain nodes are required to review the expected result of the resource.
  12. 根据权利要求9所述的计算机设备,其中,所述判断所述返回信息是否满足预设的区块链记录条件的步骤,包括:The computer device according to claim 9, wherein the step of judging whether the returned information satisfies a preset blockchain recording condition comprises:
    统计所述返回信息,从而得到接收到的所述返回信息的总数量,以及审核通过的返回信息的数量;Counting the return information, so as to obtain the total number of the return information received and the number of the return information passed the audit;
    计算所述审核通过的返回信息的数量除以所述返回信息的总数量的商值;Calculate the quotient of the number of returned messages that have passed the review divided by the total number of returned messages;
    判断所述商值是否大于预设的区块链记录参数阈值;Judging whether the quotient is greater than a preset block chain record parameter threshold;
    若所述商值大于预设的区块链记录参数阈值,则判定所述返回信息满足预设的区块链记录条件。If the quotient is greater than the preset blockchain recording parameter threshold, it is determined that the returned information satisfies the preset blockchain recording condition.
  13. 根据权利要求9所述的计算机设备,其中,所述判断所述返回信息是否满足预设的区块链记录条件的步骤之后,包括:The computer device according to claim 9, wherein after the step of judging whether the returned information satisfies a preset blockchain recording condition, it comprises:
    若所述返回信息不满足预设的区块链记录条件,则向返回信息为审核未通过的资源预期结果审核区块链节点发送原因获取指令,所述原因获取指令用于指示所述资源预期结果审核区块链节点将审核未通过的原因发送给所述指定终端;If the returned information does not meet the preset blockchain recording conditions, send a reason acquisition instruction to the resource expected result auditing blockchain node whose return information is that the review failed. The reason acquisition instruction is used to indicate the resource expectation As a result, the audit blockchain node sends the reason for the failure of the audit to the designated terminal;
    接收资源预期结果审核区块链节点发送的审核未通过的原因;The reason for the failure of the audit sent by the receiving resource expected result audit blockchain node;
    判断所述审核未通过的原因是否存在于预设的原因列表中;Determine whether the reason for the failure of the review exists in the preset reason list;
    若所述审核未通过的原因存在于预设的原因列表中,则不允许将所述资源预期结果记 录入所述第二区块链网络中,并生成审核不通过的提醒信息,并在所述提醒信息中附上所述审核未通过的原因。If the reason for the failure of the audit is in the preset reason list, the expected result of the resource is not allowed to be recorded in the second blockchain network, and a reminder message of the failure of the audit is generated and displayed The reason for the failure of the review is attached to the reminder message.
  14. 根据权利要求9所述的计算机设备,其中,所述从预设的第一区块链网络中提取第一数据,其中所述指定终端既是预先构建的第一区块链网络的一个区块链节点,又是预先构建的第二区块链网络的一个区块链节点,所述第一区块链网络至少包括提供资源预期计算使用数据的区块链节点,所述第二区块链网络至少包括资源预期结果审核区块链节点的步骤之前,包括:The computer device according to claim 9, wherein the first data is extracted from the preset first blockchain network, and the designated terminal is both a blockchain of the first blockchain network constructed in advance The node is also a block chain node of a second block chain network constructed in advance. The first block chain network at least includes a block chain node that provides expected calculation usage data of resources, and the second block chain network Before including at least the steps of reviewing blockchain nodes for expected results of resources, including:
    利用Go语言创建区块链类,并赋予所述区块链类指定参数,从而获得创世区块,并在所述创世区块中将前一区块的哈希值设为0;Use the Go language to create a blockchain class, and assign specified parameters to the blockchain class to obtain a genesis block, and set the hash value of the previous block to 0 in the genesis block;
    基于所述创世区块,生成其他区块,其中所述其他区块记载有前一区块的哈希值;Generate other blocks based on the genesis block, where the other blocks record the hash value of the previous block;
    以预设终端作为第二区块链网络的区块链节点,从而搭建所述第二区块链网络。The preset terminal is used as the block chain node of the second block chain network, so as to build the second block chain network.
  15. 根据权利要求9所述的计算机设备,其中,所述指定终端预存有虚拟机镜像和区块链节点容器镜像,所述从预设的第一区块链网络中提取第一数据,其中所述指定终端既是预先构建的第一区块链网络的一个区块链节点,又是预先构建的第二区块链网络的一个区块链节点,所述第一区块链网络至少包括提供资源预期计算使用数据的区块链节点,所述第二区块链网络至少包括资源预期结果审核区块链节点的步骤之前,包括:The computer device according to claim 9, wherein the designated terminal has a virtual machine image and a blockchain node container image pre-stored, and the first data is extracted from a preset first blockchain network, wherein the The designated terminal is both a block chain node of the pre-built first block chain network and a block chain node of the pre-built second block chain network. The first block chain network includes at least the provision of resource expectations Calculating the blockchain node using the data, the second blockchain network at least includes the step of reviewing the blockchain node for the expected result of the resource, including:
    接收申请终端发送的加入第二区块链网络的请求,所述加入第二区块链网络的请求附带有所述申请终端的身份信息;Receiving a request to join a second blockchain network sent by an application terminal, where the request to join the second blockchain network is attached with the identity information of the application terminal;
    判断所述申请终端的身份信息是否处于预设的允许加入列表中;Judging whether the identity information of the applying terminal is in a preset allowable join list;
    若所述申请终端的身份信息处于预设的允许加入列表中,则向所述申请终端发送所述虚拟机镜像和区块链节点容器镜像;If the identity information of the applying terminal is in the preset allowed join list, sending the virtual machine image and the blockchain node container image to the applying terminal;
    获取所述申请终端的IP地址与通信端口;Obtaining the IP address and communication port of the application terminal;
    向所述申请终端发送预存的第二区块链网络的所有区块链节点的IP地址和通信端口的信息,以及向第二区块链网络的所有区块链节点发送所述申请终端的IP地址和通信端口的信息,从而将所述申请终端加入所述第二区块链网络,其中所述申请终端已在所述虚拟机镜像中安装并启动所述区块链节点容器镜像。Send the pre-stored information of the IP addresses and communication ports of all the blockchain nodes of the second blockchain network to the application terminal, and send the IP of the application terminal to all the blockchain nodes of the second blockchain network Address and communication port information, thereby adding the application terminal to the second blockchain network, wherein the application terminal has been installed in the virtual machine image and started the blockchain node container image.
  16. 一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现一种基于区块链的资源预期结果审核方法;所述基于区块链的资源预期结果审核方法,应用于指定终端,包括:A computer-readable storage medium on which a computer program is stored, wherein when the computer program is executed by a processor, a method for reviewing the expected result of a resource based on a blockchain is implemented; the expected result of a resource based on the blockchain Audit methods, applied to designated terminals, including:
    从预设的第一区块链网络中提取第一数据,其中所述指定终端既是预先构建的第一区块链网络的一个区块链节点,又是预先构建的第二区块链网络的一个区块链节点,所述第一区块链网络至少包括提供资源预期计算使用数据的区块链节点,所述第二区块链网络至少包括资源预期结果审核区块链节点;Extract the first data from the preset first blockchain network, where the designated terminal is both a blockchain node of the pre-built first blockchain network and a pre-built second blockchain network A block chain node, the first block chain network includes at least a block chain node that provides resource expected calculation usage data, and the second block chain network at least includes a resource expected result review block chain node;
    获取实时采集的所述资源的第二数据,并根据公式:Acquire the second data of the resource collected in real time, and according to the formula:
    H(t)=min(G(t),m),其中
    Figure PCTCN2020099436-appb-100009
    E(t)=F(t)-f(t),获取函数H(t),其中F(t)为所述资源的第二数据随时间变化的函数,f(t)为预设的标准第二数据变化函数,E(t)为所述函数F(t)与所述标准第二数据变化函数f(t)的差值函数,
    Figure PCTCN2020099436-appb-100010
    为所述差值函数对时间的微分函数,min指最小值函数,t为时间,m为预设的大于0的误差参数值;获取所述函数H(t)在时间轴上不等于m时的第一时间长度和等于m时的第二时间长度,并根据公式:正常时间占比=所述第一时间长度/(所述第一时间长度+所述第二时间长度),计算出所述正常时间占比,并判断所述正常时间占比是否大于预设占比阈值;若所述正常时间占比大于预设占比阈值,则根据所述第一数据,利用预设的资源预期算法,生成资源预期结果;
    H(t)=min(G(t),m), where
    Figure PCTCN2020099436-appb-100009
    E(t)=F(t)-f(t), get the function H(t), where F(t) is the function of the second data of the resource changing with time, f(t) is the preset standard The second data change function, E(t) is the difference function of the function F(t) and the standard second data change function f(t),
    Figure PCTCN2020099436-appb-100010
    Is the differential function of the difference function with respect to time, min refers to the minimum value function, t is time, and m is the preset error parameter value greater than 0; when the function H(t) is not equal to m on the time axis The first time length and the second time length when it is equal to m, and according to the formula: normal time ratio=the first time length/(the first time length+the second time length), calculate all The normal time ratio, and determine whether the normal time ratio is greater than the preset ratio threshold; if the normal time ratio is greater than the preset ratio threshold, use the preset resource expectation according to the first data Algorithm to generate expected results of resources;
    将所述资源预期结果发送给所述第二区块链网络中的多个资源预期结果审核区块链节 点,并要求多个资源预期结果审核区块链节点对所述资源预期结果进行审核;Sending the expected result of the resource to multiple resource expected results reviewing blockchain nodes in the second blockchain network, and requesting multiple resource expected result reviewing blockchain nodes to review the expected resource result;
    接收多个资源预期结果审核区块链节点对所述资源预期结果进行审核的返回信息,其中所述返回信息包括审核通过或者审核未通过;Receiving a plurality of resource expected results reviewing the return information of the expected result of the resource by the blockchain node, where the return information includes the review passed or the review failed;
    判断所述返回信息是否满足预设的区块链记录条件;Determine whether the returned information meets preset blockchain recording conditions;
    若所述返回信息满足预设的区块链记录条件,则将所述资源预期结果记录入所述第二区块链网络中。If the returned information satisfies a preset blockchain recording condition, the expected result of the resource is recorded in the second blockchain network.
  17. 根据权利要求16所述的计算机可读存储介质,其中,所述资源为指定对象的资源,所述第一数据包括所述指定对象的多个子对象的预计资源增加量与预计资源损耗量,所述根据所述第一数据,利用预设的资源预期算法,生成资源预期结果的步骤,包括:The computer-readable storage medium according to claim 16, wherein the resource is a resource of a specified object, and the first data includes an estimated resource increase and an estimated resource loss of a plurality of sub-objects of the specified object, so According to the first data, the step of using a preset resource expectation algorithm to generate a resource expectation result includes:
    统计多个所述子对象的预计资源增加量与预计资源损耗量,从而得到第一个子对象至第n个子对象的预计资源增加量A 1、A 2…、A n和第一个子对象至第n个子对象的预计资源损耗量B 1、B 2…、B n,并从预存的子对象重要程度关系表中获取第一个子对象至第n个子对象的重要程度参数p 1、p 2…、p nStatistics of the plurality of sub-objects is expected to increase the amount of resources estimated amount of loss of resources, thereby obtaining first to n-th sub-object is projected object to increases in A 1, A 2 ..., A n and the first child The estimated resource consumption of the nth sub-object B 1 , B 2 …, B n , and the importance parameters p 1 , p from the first sub-object to the n-th sub-object are obtained from the pre-stored sub-object importance relationship table 2 …, p n ;
    根据公式:
    Figure PCTCN2020099436-appb-100011
    计算出敏感因子M;
    According to the formula:
    Figure PCTCN2020099436-appb-100011
    Calculate the sensitivity factor M;
    判断所述敏感因子M是否大于预设的敏感阈值;Determine whether the sensitivity factor M is greater than a preset sensitivity threshold;
    若所述敏感因子M不大于预设的敏感阈值,则生成资源预期结果,其中所述资源预期结果至少包括多个子对象的预计资源增加量与预计资源损耗量。If the sensitivity factor M is not greater than the preset sensitivity threshold, an expected result of the resource is generated, where the expected result of the resource includes at least the estimated resource increase and the estimated resource loss of multiple sub-objects.
  18. 根据权利要求16所述的计算机可读存储介质,其中,所述将所述资源预期结果发送给所述第二区块链网络中的多个资源预期结果审核区块链节点,并要求多个资源预期结果审核区块链节点对所述资源预期结果进行审核的步骤,包括:The computer-readable storage medium according to claim 16, wherein the expected result of the resource is sent to a plurality of resource expected results in the second blockchain network to review the blockchain node, and a plurality of Resource Expected Results Review The steps for blockchain nodes to review the resource expected results include:
    在所述第二区块链网络中,获取根据预设的共识机制投选出的多个资源预期结果审核区块链节点;In the second blockchain network, obtaining expected results of multiple resources voted according to a preset consensus mechanism to review blockchain nodes;
    向所有所述资源预期结果审核区块链节点发送审核请求,并要求所述资源预期结果审核区块链节点发送回复信息;Send an audit request to all the resource expected result audit blockchain nodes, and require the resource expected result audit blockchain node to send a reply message;
    接收所述资源预期结果审核区块链节点发送的回复信息,并将所述回复信息为愿意审核的资源预期结果审核区块链节点记为最终资源预期结果审核区块链节点;Receiving the reply message sent by the resource expected result auditing blockchain node, and recording the replying information as the resource expected result auditing blockchain node willing to audit as the final resource expected result auditing blockchain node;
    将所述资源预期结果发送给多个所述最终资源预期结果审核区块链节点,并要求多个所述最终资源预期结果审核区块链节点对所述资源预期结果进行审核。The expected result of the resource is sent to a plurality of expected final resource result review blockchain nodes, and a plurality of expected final resource expected result review blockchain nodes are required to review the expected result of the resource.
  19. 根据权利要求16所述的计算机可读存储介质,其中,所述判断所述返回信息是否满足预设的区块链记录条件的步骤,包括:The computer-readable storage medium according to claim 16, wherein the step of judging whether the returned information satisfies a preset blockchain recording condition comprises:
    统计所述返回信息,从而得到接收到的所述返回信息的总数量,以及审核通过的返回信息的数量;Counting the return information, so as to obtain the total number of the return information received and the number of the return information passed the audit;
    计算所述审核通过的返回信息的数量除以所述返回信息的总数量的商值;Calculate the quotient of the number of returned messages that have passed the review divided by the total number of returned messages;
    判断所述商值是否大于预设的区块链记录参数阈值;Judging whether the quotient is greater than a preset block chain record parameter threshold;
    若所述商值大于预设的区块链记录参数阈值,则判定所述返回信息满足预设的区块链记录条件。If the quotient is greater than the preset blockchain recording parameter threshold, it is determined that the returned information satisfies the preset blockchain recording condition.
  20. 根据权利要求16所述的计算机可读存储介质,其中,所述判断所述返回信息是否满足预设的区块链记录条件的步骤之后,包括:The computer-readable storage medium according to claim 16, wherein after the step of determining whether the returned information meets a preset blockchain recording condition, the method comprises:
    若所述返回信息不满足预设的区块链记录条件,则向返回信息为审核未通过的资源预期结果审核区块链节点发送原因获取指令,所述原因获取指令用于指示所述资源预期结果审核区块链节点将审核未通过的原因发送给所述指定终端;If the return information does not meet the preset blockchain recording conditions, then the return information is the resource expected result auditing blockchain node whose return information has failed the review. The reason acquisition instruction is used to indicate the resource expectation. As a result, the audit blockchain node sends the reason for the failure of the audit to the designated terminal;
    接收资源预期结果审核区块链节点发送的审核未通过的原因;The reason for the failure of the audit sent by the receiving resource expected result audit blockchain node;
    判断所述审核未通过的原因是否存在于预设的原因列表中;Determine whether the reason for the failure of the review exists in the preset reason list;
    若所述审核未通过的原因存在于预设的原因列表中,则不允许将所述资源预期结果记 录入所述第二区块链网络中,并生成审核不通过的提醒信息,并在所述提醒信息中附上所述审核未通过的原因。If the reason for the failure of the audit is in the preset reason list, the expected result of the resource is not allowed to be recorded in the second blockchain network, and a reminder message of the failure of the audit is generated and displayed in all The reason for the failure of the review is attached to the reminder message.
PCT/CN2020/099436 2019-07-22 2020-06-30 Blockchain-based resource forecast result auditing method, device, and computer apparatus WO2021012911A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910662222.2A CN110555319B (en) 2019-07-22 2019-07-22 Resource expected result auditing method and device based on block chain and computer equipment
CN201910662222.2 2019-07-22

Publications (1)

Publication Number Publication Date
WO2021012911A1 true WO2021012911A1 (en) 2021-01-28

Family

ID=68735673

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/099436 WO2021012911A1 (en) 2019-07-22 2020-06-30 Blockchain-based resource forecast result auditing method, device, and computer apparatus

Country Status (2)

Country Link
CN (1) CN110555319B (en)
WO (1) WO2021012911A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110378691A (en) * 2019-06-18 2019-10-25 重庆金融资产交易所有限责任公司 Block chain dispositions method, device and computer equipment based on deployment center
CN110555319B (en) * 2019-07-22 2022-12-27 平安科技(深圳)有限公司 Resource expected result auditing method and device based on block chain and computer equipment
CN111399987B (en) * 2020-03-26 2023-04-18 海口海辰宇信息科技有限公司 Universal block chain sandbox supervision technology

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109284974A (en) * 2018-08-30 2019-01-29 西交利物浦大学 A kind of checking method based on block chain, device, audit equipment and storage medium
CN109325852A (en) * 2018-10-25 2019-02-12 平安科技(深圳)有限公司 Loan data processing method, device, equipment and storage medium based on block chain
US20190080118A1 (en) * 2016-11-17 2019-03-14 International Business Machines Corporation Container update system
CN110555319A (en) * 2019-07-22 2019-12-10 平安科技(深圳)有限公司 Resource expected result auditing method and device based on block chain and computer equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130036047A1 (en) * 2011-08-03 2013-02-07 Nxsystems, Inc. Method, system and process for centralized management and control of a budget and electronic mass distribution of funds
CN108876380B (en) * 2018-08-07 2021-03-23 创新先进技术有限公司 Transaction method and system based on centralized settlement and block chain deposit certificate
CN109493203A (en) * 2018-09-30 2019-03-19 咪咕文化科技有限公司 A kind of data calculate method, apparatus and storage medium
CN109481936B (en) * 2018-10-26 2022-04-29 咪咕文化科技有限公司 Block chain accounting node selection method and device and computer readable storage medium
CN109727040B (en) * 2019-01-28 2020-09-15 杭州复杂美科技有限公司 Data publishing method, data calling method, device and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190080118A1 (en) * 2016-11-17 2019-03-14 International Business Machines Corporation Container update system
CN109284974A (en) * 2018-08-30 2019-01-29 西交利物浦大学 A kind of checking method based on block chain, device, audit equipment and storage medium
CN109325852A (en) * 2018-10-25 2019-02-12 平安科技(深圳)有限公司 Loan data processing method, device, equipment and storage medium based on block chain
CN110555319A (en) * 2019-07-22 2019-12-10 平安科技(深圳)有限公司 Resource expected result auditing method and device based on block chain and computer equipment

Also Published As

Publication number Publication date
CN110555319A (en) 2019-12-10
CN110555319B (en) 2022-12-27

Similar Documents

Publication Publication Date Title
WO2021012911A1 (en) Blockchain-based resource forecast result auditing method, device, and computer apparatus
CN112348204B (en) Safe sharing method for marine Internet of things data under edge computing framework based on federal learning and block chain technology
US11010370B2 (en) System and method of decentralized management of multi-owner nodes using blockchain
US10678598B2 (en) Enforcing compute equity models in distributed blockchain
WO2021036545A1 (en) Smart contract-based data processing method, and device and storage medium
US11057225B2 (en) Enforcing compute equity models in distributed blockchain
US11562228B2 (en) Efficient verification of machine learning applications
US10609032B2 (en) Enforcing compute equity models in distributed blockchain
US20240113868A1 (en) Controlled cryptographic private key release
US11387979B2 (en) Partially-ordered blockchain
US20200394552A1 (en) Aggregated maching learning verification for database
US10749687B2 (en) Binding version stamp for smart contracts
CN111008402A (en) Block chain timestamp protocol
US20200394470A1 (en) Efficient verification of maching learning applications
WO2021184981A1 (en) Blockchain-based method, apparatus, and device for reviewing originality of work
CN112799708B (en) Method and system for jointly updating business model
US20240037252A1 (en) Methods and apparatuses for jointly updating service model
CN110851877B (en) Data processing method and device, block chain node equipment and storage medium
US11631061B2 (en) Method for creating and maintaining a distributed ledger of vehicle gas consumption and wear and tear information
US20210109776A1 (en) Free-riding node identification for blockchain
US20190108416A1 (en) Methods for more effectively moderating one or more images and devices thereof
CN113992526B (en) Coalition chain cross-chain data fusion method based on credibility calculation
CN113221163B (en) Model training method and system
Putra et al. Decentralised trustworthy collaborative intrusion detection system for IoT
US20220366513A1 (en) Method and apparatus for check fraud detection through check image analysis

Legal Events

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

Ref document number: 20844947

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20844947

Country of ref document: EP

Kind code of ref document: A1