WO2021036810A1 - 证据的验证方法、系统、装置、设备及可读存储介质 - Google Patents

证据的验证方法、系统、装置、设备及可读存储介质 Download PDF

Info

Publication number
WO2021036810A1
WO2021036810A1 PCT/CN2020/109044 CN2020109044W WO2021036810A1 WO 2021036810 A1 WO2021036810 A1 WO 2021036810A1 CN 2020109044 W CN2020109044 W CN 2020109044W WO 2021036810 A1 WO2021036810 A1 WO 2021036810A1
Authority
WO
WIPO (PCT)
Prior art keywords
hash
transaction
contract
evidence
verification
Prior art date
Application number
PCT/CN2020/109044
Other languages
English (en)
French (fr)
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 WO2021036810A1 publication Critical patent/WO2021036810A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Definitions

  • This application relates to the field of financial technology (Fintech) blockchain technology, and in particular to methods, systems, devices, equipment, and readable storage media for verifying evidence.
  • Financial technology Fetech
  • the main purpose of this application is to propose a method, system, device, device, and readable storage medium for verifying evidence, aiming to solve the technical problem of heavy communication and transmission burden in the current verification process.
  • this application provides a method for verifying evidence, which is applied to a verification platform, and the method for verifying evidence includes the following steps:
  • a verification request triggered based on evidence information is received, and the evidence information is obtained, where the evidence information includes: a contract collection and an on-chain address;
  • Root hash Perform a hash calculation on each transaction contract in the contract set to obtain the first hash value corresponding to each transaction contract, and process each of the first hash values according to the preset hash aggregation algorithm to obtain the first hash value.
  • the hash aggregation algorithm includes a first aggregation algorithm and a second aggregation algorithm
  • the step of processing each of the first hash values according to a preset hash aggregation algorithm to obtain a first root hash includes:
  • the first aggregation algorithm iteratively merge the first hash values according to the contract sequence to obtain the first root hash;
  • the first hash values are unified according to the contract sequence to obtain the first root hash.
  • the step of iteratively merging each of the first hash values according to the contract sequence according to the first aggregation algorithm to obtain the first root hash includes:
  • n is the number of contracts in the contract sequence
  • the first hash value corresponding to each transaction contract in the contract sequence is input into the array as an element, and the elements in the array are iterated to obtain the first root hash, where the number of iterations.
  • the step of uniformly merging each of the first hash values according to the contract sequence according to the second aggregation algorithm to obtain the first root hash includes:
  • the h0 represents the first root hash
  • the h1 represents the first hash value of the first transaction contract in the sequence of contracts
  • the h2 represents the second transaction contract in the sequence of contracts
  • the first hash value of, and so on, the hn represents the first hash value of the last transaction contract in the sequence of contracts.
  • the method for verifying evidence further includes:
  • each first hash value corresponding to the first root hash is obtained, and the second root is obtained Each second hash value corresponding to the hash;
  • the first hash value and the second hash value of the same transaction contract are compared, and the modified target transaction contract is obtained and output.
  • the step of comparing the first hash value and the second hash value of the same transaction contract to obtain and output the modified target transaction contract includes:
  • the preset hash aggregation algorithm is the first aggregation algorithm
  • the first hash value and the second hash value of the same transaction contract in the contract set are compared, and the first hash value and the second hash value are not
  • the same transaction contract is regarded as the modified target transaction contract, and the target transaction contract is output.
  • this application also provides a method for verifying evidence.
  • the method for verifying evidence is applied to a trading platform, and the method for verifying evidence includes the following steps:
  • the step of determining a hash aggregation algorithm according to the transaction identifier includes:
  • the preset first aggregation algorithm After determining that the comprehensive risk value is greater than or equal to the preset risk threshold, use the preset first aggregation algorithm as a hash aggregation algorithm; or
  • the preset second aggregation algorithm is used as the hash aggregation algorithm.
  • the proof verification system includes a transaction platform, a blockchain platform, and a verification platform that are communicatively connected.
  • the proof verification system implements the following steps:
  • the transaction platform receives the transaction certificate request, and the transaction platform obtains the transaction identifier corresponding to the transaction certificate request and the contract set corresponding to the transaction identifier;
  • the transaction platform determines a hash aggregation algorithm according to the transaction identifier, performs a hash calculation on each transaction contract in the contract set to obtain the second hash value corresponding to each transaction contract, and the transaction platform aggregates according to the hash
  • the algorithm processes each of the second hash values to obtain a second root hash
  • the trading platform uses each of the second hash value and the second root hash as the on-chain content, and the trading platform initiates an on-chain preservation request based on the on-chain content;
  • the blockchain platform receives the on-chain preservation request initiated by the trading platform, the blockchain platform saves the on-chain content, and sends the on-chain address guaranteed by the on-chain content to the trading platform;
  • the transaction platform When the transaction platform receives the on-chain address fed back by the blockchain platform, the transaction platform saves the on-chain address and the contract collection as evidence information;
  • the transaction platform When the transaction platform receives the verification request, the transaction platform obtains the evidence information corresponding to the verification request, and sends the evidence information to the verification platform;
  • the verification platform When the verification platform receives the verification request triggered based on the evidence information, the verification platform obtains the evidence information, where the evidence information includes: a contract set and an on-chain address;
  • the verification platform performs a hash calculation on each transaction contract in the contract set to obtain the first hash value corresponding to each transaction contract, and the verification platform processes each of the first hash values according to a preset hash aggregation algorithm , Get the first hash;
  • the verification platform obtains the pre-stored second root hash according to the on-chain address, and the verification platform compares the first root hash with the second root hash;
  • the verification platform After determining that the first root hash is the same as the second root hash, the verification platform determines that the proof verification is passed.
  • this application also provides an evidence verification device, the evidence verification device is set on a verification platform, and the evidence verification device includes:
  • the request receiving module is configured to receive a verification request triggered based on the evidence information, and obtain the evidence information, where the evidence information includes: a contract set and an address on the chain;
  • the hash processing module is configured to perform a hash calculation on each transaction contract in the contract set to obtain a first hash value corresponding to each transaction contract, and process each first hash value according to a preset hash aggregation algorithm Hash value, get the first root hash;
  • An obtaining and comparing module configured to obtain a pre-stored second root hash according to the on-chain address, and compare the first root hash with the second root hash;
  • the result output module is configured to determine that the proof verification is passed after determining that the first root hash is the same as the second root hash.
  • the present application also provides a verification device for evidence, the verification device for evidence is set on a transaction platform, and the verification device for evidence includes:
  • the first obtaining module is configured to receive a transaction certificate request, obtain a transaction identifier corresponding to the transaction certificate request, and a contract set corresponding to the transaction identifier;
  • the determination processing module is configured to determine a hash aggregation algorithm according to the transaction identifier, perform a hash calculation on each transaction contract in the contract set, to obtain a second hash value corresponding to each transaction contract, and follow the A hash aggregation algorithm processes each of the second hash values to obtain a second root hash;
  • the request module is configured to use each of the second hash value and the second root hash as the on-chain content, and initiate an on-chain preservation request based on the on-chain content, so that the blockchain platform saves the on-chain content;
  • a saving module configured to receive the on-chain address fed back by the blockchain platform, and save the on-chain address and the contract collection as evidence information;
  • the second obtaining module is configured to receive the verification request, obtain the evidence information corresponding to the verification request, and send the evidence information to the verification platform to verify the evidence information on the verification platform.
  • the present application also provides a verification device for evidence, which includes a memory, a processor, and verification of evidence that is stored on the memory and can run on the processor.
  • a program that implements the steps of the method for verifying evidence as described above when the program for verifying the evidence is executed by the processor.
  • the present application also provides a computer-readable storage medium with a verification program of evidence stored on the computer-readable storage medium, and the verification program of the evidence is executed by a processor to achieve the above Steps of the method of verification of evidence.
  • This application provides a method, system, device, device, and readable storage medium for verifying evidence.
  • the evidence information includes: contract collection and On-chain address; perform hash calculation on each transaction contract in the contract set to obtain the first hash value corresponding to each transaction contract, and process each of the first hash values according to a preset hash aggregation algorithm , Obtain the first root hash; obtain the pre-stored second root hash according to the address on the chain, and compare the first root hash with the second root hash; if the first root hash and If the second root hash is the same, it is determined that the proof verification is passed.
  • the method of hash aggregation is adopted to collect the evidence and upload it to the chain, which can reduce the burden of communication and transmission. When the verification platform needs to perform verification, rapid verification can be realized.
  • FIG. 1 is a schematic diagram of a device structure of a hardware operating environment involved in a solution of an embodiment of the present application
  • FIG. 2 is a schematic flowchart of the first embodiment of a method for verifying evidence of the application
  • FIG. 3 is a schematic flowchart of a third embodiment of a method for verifying evidence of the application
  • FIG. 4 is a schematic diagram of functional modules of an embodiment of an apparatus for verifying evidence of the application
  • Fig. 5 is a schematic diagram of functional modules of another embodiment of a device for verifying evidence in this application.
  • FIG. 1 is a schematic diagram of the device structure of the hardware operating environment involved in the solution of the embodiment of the present application.
  • the verification device of the evidence in the embodiment of the present application may be a terminal or a server.
  • the verification device of the evidence may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002.
  • the communication bus 1002 is used to implement connection and communication between these components.
  • the user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface.
  • the network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
  • the memory 1005 may be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as a magnetic disk memory.
  • the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
  • FIG. 1 does not constitute a limitation on the device, and may include more or fewer components than those shown in the figure, or a combination of certain components, or different component arrangements.
  • the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a verification program of evidence, that is, a computer program corresponding to verification of evidence.
  • the network interface 1004 is mainly used to connect to the back-end server and communicate with the back-end server; the user interface 1003 is mainly used to connect to the client (user side) and communicate with the client; and the processor 1001 can be used to call the verification program of the evidence stored in the memory 1005, and perform operations in the following evidence verification method.
  • the computer-readable storage medium of this application stores the verification program of the evidence, and the method implemented when it is executed can refer to the various embodiments of the evidence verification method of this application, which will not be repeated here.
  • FIG. 2 is a schematic flowchart of a first embodiment of a method for verifying evidence in this application, and the method includes:
  • Step S10 a verification request triggered based on evidence information is received, and the evidence information is obtained, where the evidence information includes: a contract collection and an address on the chain;
  • the verification method of evidence in this embodiment is applied to the verification device of the evidence.
  • the verification device of the evidence is the hardware carrier of the verification platform.
  • the verification platform receives the verification request.
  • the method of triggering the verification request is not specifically limited, that is, the verification request can be triggered actively. For example, the customer clicks "Verify" on the trading platform to actively trigger the verification request, and the trading platform sends the verification request to the verification platform; in addition, the verification request can also be triggered automatically, for example, the preset transaction failure in the trading platform automatically When a verification request is triggered, the trading platform automatically triggers a verification request when the transaction fails, and the trading platform sends the verification request to the verification platform.
  • the verification platform receives the verification request, and the verification platform obtains the evidence information corresponding to the verification request, where the evidence information includes the contract collection and the address on the chain.
  • Step S20 Perform a hash calculation on each transaction contract in the contract set to obtain a first hash value corresponding to each transaction contract, and process each of the first hash values according to a preset hash aggregation algorithm. Get the first hash.
  • the verification platform sorts the transaction contracts in the contract set.
  • the sorting method of the transaction contracts in this embodiment is not specifically limited, for example, sorting according to the size of the transaction contract, sorting according to the signing date of the transaction contract, etc.
  • the verification platform calculates the first hash value corresponding to each transaction contract after sorting, and the verification platform processes each first hash value according to the hash aggregation algorithm (the hash aggregation algorithm includes the first hash value). Aggregation algorithm and second aggregation algorithm) to obtain the first root hash; specifically, including:
  • Step a1 sorting the transaction contracts corresponding to each first hash value to form a contract sequence
  • Step a2 Iteratively merge each of the first hash values according to the contract sequence according to the first aggregation algorithm to obtain a first root hash (according to the first aggregation algorithm, initialize a An array of, where n is the number of contracts in the contract sequence; the first hash value corresponding to each transaction contract in the contract sequence is input as an element into the array, and the elements in the array are iterated , Get the first root hash, where, the number of iterations or,
  • the verification platform obtains each transaction contract in the contract set, sorts each transaction contract to form a contract sequence, and the verification platform calculates the first hash value of each transaction contract in the contract sequence, and then processes according to the contract sequence and the hash aggregation algorithm
  • Each first hash value obtains the first root hash, specifically:
  • Implementation method 1 When the hash aggregation algorithm is the first aggregation algorithm, the verification platform iteratively merges the first hash values to calculate the final first root hash. For example, for n files, Iterations. If you use a one-dimensional array to store, you need Elements. The element i is represented by node i , and its value is represented as hi (the subscript starts from 0). If you consider each iteration as a layer, then the first element of the l-th layer is The last element is (The number of layers starts from 1, and the first layer is node 0 ). The value of each element node i is calculated from the values of element node 2i+1 and element node 2i+2.
  • Step 1 Initialize an include An array of elements, the value is set to empty, the n files are sorted in descending order of size, and the hash value is calculated in turn, starting from the elements Start to fill in one by one, leave blank for unsatisfied ones, and set the number of remaining iterations
  • the first aggregation algorithm is used for aggregation calculation, which is convenient for evidence verification and traceability during verification. For example, corresponding to two arrays that need to be verified, the following operations are performed:
  • step b If h i ⁇ h′ i and Repeat the iteration of step b;
  • the second aggregation algorithm is used for aggregation calculation.
  • Step S30 Obtain a pre-stored second root hash according to the on-chain address, and compare the first root hash with the second root hash.
  • the verification platform obtains the pre-stored second root hash according to the address on the chain, that is, the verification platform queries the blockchain platform to obtain the second root hash stored in the address on the chain, and the verification platform compares the first root hash with the second root hash. Hope to determine whether the transaction contract in the contract collection has been modified.
  • Step S40 After determining that the first root hash is the same as the second root hash, it is determined that the proof verification is passed.
  • the verification platform After determining that the first root hash is the same as the second root hash, the verification platform determines that none of the transaction contracts in the contract set have been modified, and the verification platform determines that the evidence is verified as passed.
  • the method of hash aggregation is adopted to collect the evidence and upload it to the chain, which is applicable to the scenario where the arbitration chain has more writes and less reads. At the same time, it can reduce the communication and transmission burden of the arbitration chain. This can be achieved when the verification platform needs to verify Quick verification.
  • the combination of the first aggregation algorithm and the second aggregation algorithm is used, on the one hand, it makes the calculation and storage overhead have better performance, on the other hand, it ensures the efficiency of evidence retrospective verification.
  • This embodiment is a step after step S30 in the first embodiment.
  • the difference between this embodiment and the first embodiment lies in:
  • each first hash value corresponding to the first root hash is obtained, and the second root hash is obtained Each corresponding second hash value;
  • the first hash value and the second hash value of the same transaction contract are compared, and the modified target transaction contract is obtained and output.
  • the verification platform determines that the transaction contract in the contract set is modified, and the verification platform outputs a verification result that the verification fails.
  • the verification platform When the verification platform receives an analysis request triggered based on the verification result that the verification fails, the verification platform obtains each first hash value corresponding to the first root hash, and the verification platform obtains each second hash corresponding to the second root hash Value; the verification platform sequentially compares the first hash value and the second hash value corresponding to the same contract identifier.
  • the preset hash aggregation algorithm is the first aggregation algorithm
  • the hash value comparison is performed according to the iteration order of the first aggregation algorithm, and the transaction contract with the first hash value and the second hash value different is regarded as the modification And output the target transaction contract
  • the preset hash aggregation algorithm is the second aggregation algorithm, compare the first hash value and the second hash value of the same transaction contract in the contract set , Regard the transaction contract with the first hash value and the second hash value as the modified target transaction contract, and output the target transaction contract for the user to query.
  • the verification platform traces back according to the first root hash, each first hash value corresponding to the first root hash, the second root hash, and each second hash value corresponding to the second root hash. In order to quickly determine the modified transaction contract.
  • Fig. 3 is a schematic flowchart of a third embodiment of a method for verifying evidence in this application, and the method includes:
  • Step S50 A transaction certificate request is received, and a transaction ID corresponding to the transaction certificate request and a contract set corresponding to the transaction ID are obtained.
  • the method for verifying evidence in this embodiment is applied to the verification device of the evidence.
  • the verification device of the evidence is the hardware carrier of the transaction platform (or also called the deposit certificate platform).
  • the transaction platform receives the transaction deposit request and the trigger method of the transaction deposit request There is no specific limitation, that is, the transaction deposit request can be triggered actively, for example, the customer clicks "Save" on the terminal to automatically trigger the transaction deposit request, and the terminal sends the transaction deposit request to the trading platform; in addition, the transaction deposit request It can also be automatically triggered. For example, the transaction deposit request is automatically triggered when the transaction is updated in the trading platform, and the transaction deposit request is automatically triggered when the trading platform detects a transaction change.
  • the transaction platform When the transaction platform receives the transaction certificate request, the transaction platform obtains the transaction ID corresponding to the transaction certificate request (the transaction ID refers to the identification information that uniquely identifies the transaction, for example, the transaction number), and the contract collection corresponding to the transaction ID. Contract collection
  • the transaction ID refers to the identification information that uniquely identifies the transaction, for example, the transaction number
  • the contract collection corresponding to the transaction ID. Contract collection
  • the number of transaction contracts included in the document is multiple, and the specific number is not limited.
  • Step S60 Determine a hash aggregation algorithm according to the transaction identifier, perform hash calculation on each transaction contract in the contract set to obtain a second hash value corresponding to each transaction contract, and aggregate according to the hash The algorithm processes each of the second hash values to obtain a second root hash.
  • the trading platform determines the hash aggregation algorithm according to the transaction identification, for example, the preset transaction identification and aggregation algorithm mapping table in the trading platform, the trading platform queries the preset transaction identification and aggregation algorithm mapping table, and obtains the hash aggregation algorithm corresponding to the transaction identification;
  • the platform first performs a separate hash calculation on each transaction contract in the contract set to obtain the second hash value corresponding to each transaction contract.
  • the transaction platform processes each second hash value according to the hash aggregation algorithm to obtain the second root hash value. hope.
  • the transaction platform processes each second hash value according to the hash aggregation algorithm, and the specific implementation of obtaining the second root hash can refer to the first embodiment, which will not be repeated in this embodiment.
  • step S70 each of the second hash value and the second root hash is used as the on-chain content, and an on-chain preservation request is initiated based on the on-chain content, so that the blockchain platform saves the on-chain content.
  • the trading platform uses each second hash value and the second root hash as the content on the chain.
  • the trading platform initiates an on-chain preservation request based on the on-chain content, that is, the trading platform sends an on-chain preservation request to the blockchain platform to make the district.
  • the blockchain platform saves the content on the chain.
  • the blockchain platform receives the on-chain preservation request sent by the trading platform, the blockchain platform obtains the on-chain content corresponding to the on-chain preservation request and saves it, and the blockchain platform will save it when the upper-chain content is saved on the blockchain platform.
  • the on-chain address of is sent to the trading platform so that the trading platform can query the stored on-chain content according to the on-chain address.
  • the second hash value corresponding to each transaction contract and the second root hash obtained by aggregation are stored in the blockchain platform.
  • the judgment can be realized by saving the second root hash.
  • the second root hash can be saved instead of the second hash value corresponding to each transaction contract. In order to reduce the storage space occupied by the blockchain platform.
  • Step S80 receiving the on-chain address fed back by the blockchain platform, and storing the on-chain address and the contract collection as evidence information.
  • the transaction platform When the transaction platform receives the on-chain address fed back by the blockchain platform, the transaction platform saves the on-chain address and transaction identification so that when a verification request occurs, the on-chain address can be fed back to the verification platform.
  • the method of hash aggregation is adopted to collect the evidence and upload it to the chain, which is suitable for the scenario where the arbitration chain has more writes and less reads, and at the same time can reduce the communication and transmission burden of the arbitration chain. specifically:
  • step S90 the verification request is received, the evidence information corresponding to the verification request is obtained, and the evidence information is sent to the verification platform to verify the evidence information on the verification platform.
  • the transaction platform receives the verification request, and the triggering method of the verification request is not specifically limited.
  • the transaction platform obtains the evidence information corresponding to the verification request.
  • the evidence information includes the contract collection and the address on the chain; the transaction platform sends the evidence information to the verification platform to be Said verification platform for verification.
  • the transaction platform when the customer initiates a transaction operation, the transaction platform signs the relevant contract to initiate the deposit certificate, and guarantees the evidence information to the transaction platform and the blockchain platform.
  • the evidence information By effectively storing the evidence information, it is convenient for inquiries on the one hand, and on the other hand. Ensure fairness and openness of transactions.
  • This embodiment is a refinement of step S60 in the third embodiment.
  • a specific implementation method for determining a hash aggregation algorithm based on the transaction identifier including:
  • the transaction scenario information and transaction user information corresponding to the transaction identifier are acquired, and the transaction risk value corresponding to the transaction scenario information and the user risk value corresponding to the transaction user information are determined according to a preset risk assessment rule.
  • the sum of the transaction risk value and the user risk value is used as a comprehensive risk value, and the comprehensive risk value is compared with a preset risk threshold.
  • the first aggregation algorithm is used as a hash aggregation algorithm
  • the second aggregation algorithm is used as a hash aggregation algorithm.
  • the risk assessment rules are preset in the trading platform.
  • the risk assessment rules are used for transaction risk assessment.
  • the risk assessment rules can be flexibly set according to specific scenarios. For example, if the transaction amount is greater than 10w, the risk value is 1 point, and the user level is less than three. The level risk value is 1 point.
  • the transaction platform obtains transaction scenario information and transaction user information corresponding to the transaction identifier.
  • the transaction scenario information includes but is not limited to transaction amount, transaction type and transaction time;
  • transaction user information includes but is not limited to user name, user level, user rating, user Contact information and user accounts.
  • the trading platform determines the transaction risk value corresponding to the transaction scenario information and the user risk value corresponding to the transaction user information according to the preset risk assessment rules.
  • the trading platform takes the sum of the transaction risk value and the user risk value as the comprehensive risk value.
  • the trading platform compares the comprehensive risk value with the preset risk threshold.
  • the preset risk threshold refers to the preset risk assessment benchmark value. If the comprehensive risk If the value is greater than or equal to the preset risk threshold, it indicates that the risk of the transaction is greater. If the comprehensive risk value is less than the preset risk threshold, it indicates that the risk of the transaction is small.
  • the trading platform determines that the comprehensive risk value is greater than or equal to the preset risk threshold, the trading platform uses the first aggregation algorithm as the hash aggregation algorithm; the trading platform determines that the comprehensive risk value is less than the preset risk threshold, the trading platform uses the second aggregation algorithm as the hash Aggregation algorithm.
  • the comprehensive risk value is determined according to the transaction scenario information corresponding to the transaction identifier and the transaction user information, and the aggregation algorithm is determined according to the comprehensive risk value. If the comprehensive risk value is high, it means that verification is more likely to occur later.
  • the calculation and storage cost of the first aggregation algorithm will be larger than that of merge aggregation, but it will be better in terms of retrospective verification calculation, and it can support branch verification; if the comprehensive risk value is low, it indicates the possibility of verification later Smaller, using the second aggregation algorithm.
  • the second aggregation algorithm generates root hashes and operations are simpler and faster, and has a smaller storage footprint, but it will be slightly less efficient in retrospective verification calculations.
  • the corresponding hash aggregation algorithm is selected according to the risk value of the evaluated transaction.
  • the combination of the first aggregation algorithm and the second aggregation algorithm makes the calculation and storage costs better on the one hand, and on the other This ensures the efficiency of evidence retrospective verification.
  • This application also provides an embodiment of an evidence verification system.
  • the evidence verification system includes a communication platform, a blockchain platform, and a verification platform, and the evidence verification system implements the following steps:
  • the transaction platform receives the transaction certificate request, and the transaction platform obtains the transaction identifier corresponding to the transaction certificate request and the contract set corresponding to the transaction identifier;
  • the transaction platform determines a hash aggregation algorithm according to the transaction identifier, performs a hash calculation on each transaction contract in the contract set to obtain the second hash value corresponding to each transaction contract, and the transaction platform aggregates according to the hash
  • the algorithm processes each of the second hash values to obtain a second root hash
  • the trading platform uses each of the second hash value and the second root hash as the on-chain content, and the trading platform initiates an on-chain preservation request based on the on-chain content;
  • the blockchain platform receives the on-chain preservation request initiated by the trading platform, the blockchain platform saves the on-chain content, and sends the on-chain address guaranteed by the on-chain content to the trading platform;
  • the transaction platform When the transaction platform receives the on-chain address fed back by the blockchain platform, the transaction platform saves the on-chain address and the contract collection as evidence information;
  • the transaction platform When the transaction platform receives the verification request, the transaction platform obtains the evidence information corresponding to the verification request, and associates the evidence information with the verification request and sends it to the verification platform;
  • the verification platform When the verification platform receives the verification request, the verification platform obtains the evidence information corresponding to the verification request, where the evidence information includes: a contract set and an on-chain address;
  • the verification platform performs a hash calculation on each transaction contract in the contract set to obtain the first hash value corresponding to each transaction contract, and the verification platform processes each of the first hash values according to a preset hash aggregation algorithm , Get the first hash;
  • the verification platform obtains the pre-stored second root hash according to the on-chain address, and the verification platform compares the first root hash with the second root hash;
  • the verification platform determines that the evidence verification is passed.
  • an embodiment of the present application also provides an evidence verification device, the evidence verification device is set on a verification platform, and the evidence verification device includes:
  • the request receiving module 10 is configured to receive a verification request and obtain evidence information corresponding to the verification request, where the evidence information includes: a contract set and an address on the chain;
  • the hash processing module 20 is configured to perform a hash calculation on each transaction contract in the contract set to obtain the first hash value corresponding to each transaction contract, and process each of the first hash values according to a preset hash aggregation algorithm A hash value, get the first hash;
  • Obtaining and comparing module 30 configured to obtain a pre-stored second root hash according to the on-chain address, and compare the first root hash with the second root hash;
  • the result output module 40 is configured to determine that the proof verification is passed after determining that the first root hash is the same as the second root hash.
  • the hash processing module 20 includes:
  • a sorting calculation unit configured to sort the transaction contracts corresponding to each first hash value to form a contract sequence
  • the first aggregation unit is configured to iteratively merge the first hash values according to the contract sequence according to the first aggregation algorithm to obtain the first root hash; or,
  • the second aggregation unit is configured to uniformly merge the first hash values according to the contract sequence according to the second aggregation algorithm to obtain a first root hash.
  • the first aggregation unit is configured to:
  • n is the number of contracts in the contract sequence
  • the first hash value corresponding to each transaction contract in the contract sequence is input as an element into the array, and the elements in the array are iterated to obtain the first root hash, where the number of iterations
  • the second polymerization unit is configured to:
  • the h0 represents the first root hash
  • the h1 represents the first hash value of the first transaction contract in the sequence of contracts
  • the h2 represents the second transaction contract in the sequence of contracts
  • the first hash value of, and so on, the hn represents the first hash value of the last transaction contract in the sequence of contracts.
  • the proof verification device includes:
  • the second output module is configured to output a verification result that the verification fails after determining that the first root hash is different from the second root hash;
  • the result analysis module is configured to receive an analysis request triggered based on the verification result that the verification fails, obtain each first hash value corresponding to the first root hash, and obtain each first hash value corresponding to the second root hash. Second hash value;
  • the comparison output module is configured to compare the first hash value and the second hash value of the same transaction contract to obtain and output the modified target transaction contract.
  • the comparison output module includes:
  • the first comparison unit is configured to, after determining that the preset hash aggregation algorithm is the first aggregation algorithm, compare the hash values according to the iteration order of the first aggregation algorithm, and make the first hash value and the second hash value different As the modified target transaction contract, and output the target transaction contract;
  • the second comparing unit is configured to, after determining that the preset hash aggregation algorithm is the second aggregation algorithm, compare the first hash value and the second hash value of the same transaction contract in the contract set, and compare the first hash value
  • the transaction contract that is different from the second hash value is used as the modified target transaction contract, and the target transaction contract is output.
  • the embodiment of the present application also provides another proof verification device, the proof verification device is set on a transaction platform, and the proof verification device includes:
  • the first obtaining module 50 is configured to, upon receiving a transaction deposit request, obtain the transaction identifier corresponding to the transaction deposit request and the contract set corresponding to the transaction identifier;
  • the determination processing module 60 is configured to determine a hash aggregation algorithm according to the transaction identifier, perform a hash calculation on each transaction contract in the contract set, to obtain a second hash value corresponding to each transaction contract, and follow the The hash aggregation algorithm processes each of the second hash values to obtain a second root hash;
  • the request module 70 is configured to use each of the second hash value and the second root hash as the upper chain content, and initiate an upper chain preservation request based on the upper chain content, so that the blockchain platform saves the upper chain Chain content
  • the saving module 80 is configured to receive the on-chain address fed back by the blockchain platform, and save the on-chain address and the contract collection as evidence information;
  • the second obtaining module 90 is configured to receive a verification request, obtain evidence information corresponding to the verification request, and associate the evidence information with the verification request to send to a verification platform for verification on the verification platform; wherein ,
  • the evidence information includes the contract collection and the address on the chain.
  • the determination processing module includes:
  • the obtaining and determining unit is configured to obtain transaction scenario information and transaction user information corresponding to the transaction identifier, and determine the transaction risk value corresponding to the transaction scenario information and the user risk corresponding to the transaction user information according to preset risk assessment rules value;
  • the scoring comparison unit is configured to use the sum of the transaction risk value and the user risk value as a comprehensive risk value, and compare the comprehensive risk value with a preset risk threshold;
  • the first determining unit is configured to use the first aggregation algorithm as a hash aggregation algorithm after determining that the comprehensive risk value is greater than or equal to the preset risk threshold;
  • the second determining unit is configured to use the second aggregation algorithm as a hash aggregation algorithm after determining that the comprehensive risk value is less than the preset risk threshold.
  • the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM) as described above. , Magnetic disks, optical disks), including several instructions to make a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the method described in each embodiment of the present application.
  • a terminal device which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Engineering & Computer Science (AREA)
  • Finance (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Development Economics (AREA)
  • Technology Law (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Computer Security & Cryptography (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Storage Device Security (AREA)

Abstract

一种证据的验证方法、系统、装置、设备及可读存储介质,涉及金融科技技术领域,包括:在接收到验证请求时,获取所述验证请求对应的证据信息,其中,所述证据信息包括:合同集合和链上地址(S10);对所述合同集合中的各交易合同进行哈希计算,得到各所述交易合同对应的第一哈希值,根据预设的哈希聚合算法处理各所述第一哈希值,得到第一根哈希(S20);根据所述链上地址获取预存的第二根哈希,并比较所述第一根哈希和所述第二根哈希(S30);若所述第一根哈希与所述第二根哈希相同,则确定所述证据验证通过(S40)。

Description

证据的验证方法、系统、装置、设备及可读存储介质
本申请要求于2019年08月23日提交中国专利局、申请号为201910783390.7、发明名称为“证据的验证方法、系统、装置、设备及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。
技术领域
本申请涉及金融科技(Fintech)的区块链技术领域,尤其涉及证据的验证方法、系统、装置、设备及可读存储介质。
背景技术
随着计算机技术的发展,越来越多的技术(大数据、分布式、区块链Blockchain、人工智能等)应用在金融领域,传统金融业正在逐步向金融科技(Fintech)转变。
金融业务中用户在交易的时候,通常会将用户签署的合同进行上链保全,在发生仲裁纠纷的时候,根据需要在链上找到对应合同,由于区块链的不可篡改性,可以保证合同的有效完整性,验证平台(仲裁机构)根据合同对案件做出裁定;这种保存方式会对于每个证据做一次哈希保全,由于一个业务场景往往会有多个文件合同,分别对每个文件进行存储上链无疑会增加区块链平台的通信、存储负担,尤其是区块链平台因为无中心对等结构,每次写操作都要复杂的通信代价。
技术解决方案
本申请的主要目的在于提出一种证据的验证方法、系统、装置、设备及可读存储介质,旨在解决当前实现验证过程中,通信和传输负担较重的技术问题。
为实现上述目的,本申请提供一种证据的验证方法,所述证据的验证方法应用于验证平台,所述证据的验证方法包括如下步骤:
接收到基于证据信息触发的验证请求,获取所述证据信息,其中,所述证据信息包括:合同集合和链上地址;
对所述合同集合中的各交易合同进行哈希计算,得到各所述交易合同对应的第一哈希值,根据预设的哈希聚合算法处理各所述第一哈希值,得到第一根哈希;
根据所述链上地址获取预存的第二根哈希,并比较所述第一根哈希和所述第二根哈希;
确定所述第一根哈希与所述第二根哈希相同后,确定所述证据验证通过。
在一实施例中,所述哈希聚合算法包括第一聚合算法和第二聚合算法;
所述根据预设的哈希聚合算法处理各所述第一哈希值,得到第一根哈希的步骤,包括:
对各第一哈希值对应的所述交易合同进行排序形成合同序列;
根据所述第一聚合算法按照所述合同序列迭代合并各所述第一哈希值,得到第一根哈希;或,
根据所述第二聚合算法按照所述合同序列统一合并各所述第一哈希值,得到第一根哈希。
在一实施例中,所述根据所述第一聚合算法按照所述合同序列迭代合并各所述第一哈希值,得到第一根哈希的步骤包括:
根据所述第一聚合算法,初始化一个的数组,其中,所述n为合同序列中的合同数量;
将所述合同序列中各交易合同对应的第一哈希值作为元素输入到所述数组中,对所述数组中的元素进行迭代,得到第一根哈希,其中,迭代的次数。
在一实施例中,所述根据所述第二聚合算法按照所述合同序列统一合并各所述第一哈希值,得到第一根哈希的步骤包括:
获取所述合同序列中各交易合同的第一哈希值,将各所述第一哈希值按所述第二聚合算法进行处理得到第一根哈希;
其中,所述第二聚合算法为:h0=hash(h1||h2…||hn);
所述第二聚合算法中所述h0表示第一根哈希,所述h1表示合同序列中排序第一交易合同的第一哈希值;所述h2表示所述合同序列中排序第二交易合同的第一哈希值,依次类推所述hn表示合同序列中排序最后交易合同的第一哈希值。
在一实施例中,所述证据的验证方法,还包括:
确定所述第一根哈希与所述第二根哈希不同后,且确定接收到分析请求后,获取所述第一根哈希对应的各第一哈希值,获取所述第二根哈希对应的各第二哈希值;
比较同一交易合同的第一哈希值和第二哈希值,得到修改过的目标交易合同并输出。
在一实施例中,所述比较同一交易合同的第一哈希值和第二哈希值,得到修改过的目标交易合同并输出的步骤包括:
确定预设的哈希聚合算法为第一聚合算法后,按照第一聚合算法的迭代顺序进行哈希值比较,将第一哈希值和第二哈希值不相同的交易合同作为修改过的目标交易合同,并输出所述目标交易合同;
确定预设的哈希聚合算法为第二聚合算法后,比较所述合同集合中同一交易合同的第一哈希值和第二哈希值,将第一哈希值和第二哈希值不相同的交易合同作为修改过的目标交易合同,并输出所述目标交易合同。
此外,为实现上述目的,本申请还提供一种证据的验证方法,所述证据的验证方法应用于交易平台,所述证据的验证方法包括如下步骤:
接收到交易存证请求,获取所述交易存证请求对应的交易标识,和所述交易标识对应的合同集合;
根据所述交易标识确定哈希聚合算法,对所述合同集合中的各交易合同进行哈希计算,得到各所述交易合同对应的第二哈希值,并按照所述哈希聚合算法处理各所述第二哈希值,得到第二根哈希;
将各所述第二哈希值和所述第二根哈希作为上链内容,基于所述上链内容发起上链保全请求,以使区块链平台保存所述上链内容;
接收到所述区块链平台反馈的链上地址,将所述链上地址与所述合同集合作为证据信息进行保存;
接收到验证请求,获取所述验证请求对应的证据信息,并将所述证据信息发送至验证平台,以在所述验证平台验证所述证据信息。
在一实施例中,所述根据所述交易标识确定哈希聚合算法的步骤,包括:
获取所述交易标识对应的交易场景信息和交易用户信息,根据预设风险评估规则,确定所述交易场景信息对应的交易风险值,和所述交易用户信息对应的用户风险值;
将所述交易风险值和所述用户风险值之和作为综合风险值,比较所述综合风险值与预设风险阈值;及
确定所述综合风险值大于或等于所述预设风险阈值后,将预设的第一聚合算法作为哈希聚合算法;或
确定所述综合风险值小于所述预设风险阈值后,将预设的第二聚合算法作为哈希聚合算法。
此外,为实现上述目的,本申请还提供一种证据的验证系统,所述证据的验证系统包括通信连接的交易平台、区块链平台和验证平台,所述证据的验证系统实现以下步骤:
交易平台接收到交易存证请求,交易平台获取所述交易存证请求对应的交易标识,和所述交易标识对应的合同集合;
交易平台根据所述交易标识确定哈希聚合算法,对所述合同集合中的各交易合同进行哈希计算,得到各所述交易合同对应的第二哈希值,交易平台按照所述哈希聚合算法处理各所述第二哈希值,得到第二根哈希;
交易平台将各所述第二哈希值和所述第二根哈希作为上链内容,交易平台基于所述上链内容发起上链保全请求;
区块链平台接收交易平台发起的上链保全请求,区块链平台保存所述上链内容,并将所述上链内容保证的链上地址发送至交易平台;
交易平台在接收到所述区块链平台反馈的链上地址时,交易平台将所述链上地址与所述合同集合作为证据信息进行保存;
交易平台在接收到验证请求时,交易平台获取所述验证请求对应的证据信息,并将所述证据信息发送至验证平台;
验证平台在接收到基于证据信息触发的验证请求时,验证平台获取所述证据信息,其中,所述证据信息包括:合同集合和链上地址;
验证平台对所述合同集合中的各交易合同进行哈希计算,得到各所述交易合同对应的第一哈希值,验证平台根据预设的哈希聚合算法处理各所述第一哈希值,得到第一根哈希;
验证平台根据所述链上地址获取预存的第二根哈希,验证平台比较所述第一根哈希和所述第二根哈希;
确定所述第一根哈希与所述第二根哈希相同后,验证平台则确定所述证据验证通过。
此外,为实现上述目的,本申请还提供一种证据的验证装置,所述证据的验证装置设置于验证平台,所述证据的验证装置包括:
请求接收模块,配置为接收到基于证据信息触发的验证请求,获取所述证据信息,其中,所述证据信息包括:合同集合和链上地址;
哈希处理模块,配置为对所述合同集合中的各交易合同进行哈希计算,得到各所述交易合同对应的第一哈希值,根据预设的哈希聚合算法处理各所述第一哈希值,得到第一根哈希;
获取比较模块,配置为根据所述链上地址获取预存的第二根哈希,并比较所述第一根哈希和所述第二根哈希;
结果输出模块,配置为确定所述第一根哈希与所述第二根哈希相同后,则确定所述证据验证通过。
此外,为实现上述目的,本申请还提供一种证据的验证装置,所述证据的验证装置设置于交易平台,所述证据的验证装置包括:
第一获取模块,配置为接收到交易存证请求,获取所述交易存证请求对应的交易标识,和所述交易标识对应的合同集合;
确定处理模块,配置为根据所述交易标识确定哈希聚合算法,对所述合同集合中的各交易合同进行哈希计算,得到各所述交易合同对应的第二哈希值,并按照所述哈希聚合算法处理各所述第二哈希值,得到第二根哈希;
请求模块,配置为将各所述第二哈希值和所述第二根哈希作为上链内容,基于所述上链内容发起上链保全请求,以使区块链平台保存所述上链内容;
进行保存模块,配置为接收到所述区块链平台反馈的链上地址,将所述链上地址与所述合同集合作为证据信息进行保存;
第二获取模块,配置为接收到验证请求,获取所述验证请求对应的证据信息,并将所述证据信息发送至验证平台,以在所述验证平台验证所述证据信息。
此外,为实现上述目的,本申请还提供一种证据的验证设备,所述证据的验证设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的证据的验证程序,所述证据的验证程序被所述处理器执行时实现如上所述的证据的验证方法的步骤。
此外,为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有证据的验证程序,所述证据的验证程序被处理器执行时实现如上所述的证据的验证方法的步骤。
本申请提供了一种证据的验证方法、系统、装置、设备及可读存储介质,在接收到验证请求时,获取所述验证请求对应的证据信息,其中,所述证据信息包括:合同集合和链上地址;对所述合同集合中的各交易合同进行哈希计算,得到各所述交易合同对应的第一 哈希值,根据预设的哈希聚合算法处理各所述第一哈希值,得到第一根哈希;根据所述链上地址获取预存的第二根哈希,并比较所述第一根哈希和所述第二根哈希;若所述第一根哈希与所述第二根哈希相同,则确定所述证据验证通过。本申请实施例中采用哈希聚合的方式,对证据进行归集上链,同时可以减轻通信和传输负担,验证平台需要进行验证时,可以实现快速验证。
附图说明
图1是本申请实施例方案涉及的硬件运行环境的设备结构示意图;
图2为本申请证据的验证方法第一实施例的流程示意图;
图3为本申请证据的验证方法第三实施例的流程示意图;
图4为本申请证据的验证装置一实施例的功能模块示意图;
图5为本申请证据的验证装置另一实施例的功能模块示意图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
本申请的实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
如图1所示,图1是本申请实施例方案涉及的硬件运行环境的设备结构示意图。
本申请实施例证据的验证设备可以是终端或服务器,如图1所示,该证据的验证设备可以包括:处理器1001,例如CPU,网络接口1004,用户接口1003,存储器1005,通信总线1002。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。
本领域技术人员可以理解,图1中示出的设备结构并不构成对设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
如图1所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及证据的验证程序,即,证据的验证对应的计算机程序。
在图1所示的设备中,网络接口1004主要用于连接后台服务器,与后台服务器进行数据通信;用户接口1003主要用于连接客户端(用户端),与客户端进行数据通信;而处理器1001可以用于调用存储器1005中存储的证据的验证程序,并执行下述证据的验证方法中的操作。
本申请计算机可读存储介质上存储有证据的验证程序,被执行时所实现的方法可参照本申请证据的验证方法各个实施例,此处不再赘述。
基于上述硬件结构,提出本申请证据的验证方法实施例。
参照图2,图2为本申请证据的验证方法第一实施例的流程示意图,所述方法包括:
步骤S10,接收到基于证据信息触发的验证请求,获取所述证据信息,其中,所述证据信息包括:合同集合和链上地址;
本实施例中的证据的验证方法应用于证据的验证设备,证据的验证设备是验证平台的硬件载体,验证平台接收验证请求,验证请求的触发方式不作具体限定,即,验证请求可以是主动触发的,例如,客户在交易平台上点击“验证”主动触发验证请求,交易平台将验证请求发送至验证平台;此外,验证请求还可以是自动触发的,例如,交易平台中预设交易失败时自动触发验证请求,交易平台在检测交易失败时自动触发验证请求,交易平台将验证请求发送至验证平台。
验证平台接收到验证请求,验证平台获取验证请求对应的证据信息,其中,证据信息包括:合同集合和链上地址。
步骤S20,对所述合同集合中的各交易合同进行哈希计算,得到各所述交易合同对应 的第一哈希值,根据预设的哈希聚合算法处理各所述第一哈希值,得到第一根哈希。
验证平台对合同集合中的各交易合同进行排序,本实施例中的交易合同的排序方式不做具体限定,例如,按照交易合同的大小进行排序,按照交易合同的签约日期进行排序等等,在合同集合中的各交易合同排序完成之后,验证平台计算排序后各个交易合同对应的第一哈希值,验证平台将各第一哈希值按照哈希聚合算法处理(哈希聚合算法包括第一聚合算法和第二聚合算法),得到第一根哈希;具体地,包括:
步骤a1,对各第一哈希值对应的所述交易合同进行排序形成合同序列;
步骤a2,根据所述第一聚合算法按照所述合同序列迭代合并各所述第一哈希值,得到第一根哈希(根据所述第一聚合算法,初始化一个
Figure PCTCN2020109044-appb-000001
的数组,其中,所述n为合同序列中的合同数量;将所述合同序列中各交易合同对应的第一哈希值作为元素输入到所述数组中,对所述数组中的元素进行迭代,得到第一根哈希,其中,迭代的次数
Figure PCTCN2020109044-appb-000002
或,
步骤a3,根据所述第二聚合算法按照所述合同序列统一合并各所述第一哈希值,得到第一根哈希(获取所述合同序列中各交易合同的第一哈希值,将各所述第一哈希值按所述第二聚合算法进行处理得到第一根哈希;其中,所述第二聚合算法为:h0=hash(h1||h2…||hn);所述第二聚合算法中所述h0表示第一根哈希,所述h1表示合同序列中排序第一交易合同的第一哈希值;所述h2表示所述合同序列中排序第二交易合同的第一哈希值,依次类推所述hn表示合同序列中排序最后交易合同的第一哈希值)。
即,验证平台获取合同集合中的各交易合同,对各交易合同进行排序形成合同序列,验证平台计算合同序列中各交易合同的第一哈希值,然后,根据合同序列和哈希聚合算法处理各第一哈希值得到第一根哈希,具体地:
实现方式一:在哈希聚合算法为第一聚合算法时,验证平台对各第一哈希值进行迭代合并,计算出最后的第一根哈希。例如,对于n个文件,要进行
Figure PCTCN2020109044-appb-000003
次迭代。如果用一个一维数组存放,需要
Figure PCTCN2020109044-appb-000004
个元素。对于元素i用node i表示,其取值表示为hi(下标从0开始)。如果将每次迭代看为一层,那么其中第l层的第一个元素为
Figure PCTCN2020109044-appb-000005
最后一个元素为
Figure PCTCN2020109044-appb-000006
(层数从1开始,第一层是node 0),每个元素node i的取值由元素node 2i+1和元素node 2i+2的取值计算得来。
对于n个文件(n>=2),其具体聚合计算过程如下:
步骤1:初始化一个包含
Figure PCTCN2020109044-appb-000007
个元素的数组,值都置为空,将n个文件按大小降序排序,依次计算hash值,从元素
Figure PCTCN2020109044-appb-000008
开始依次填入,填不满的留空,设置剩余迭代次数
Figure PCTCN2020109044-appb-000009
步骤2:对l层进行计算,从节点
Figure PCTCN2020109044-appb-000010
到节点为
Figure PCTCN2020109044-appb-000011
对其中的每个节点node i依次执行如下操作:如果node 2i+1值非空且节点node 2i+2值非空:计算节点node i值h i=hash(h 2i+1||h 2i+2);如果node 2i+1值非空且节点node 2i+2值为空:计算节点node i值h i=hash(h 2i+1);如果node 2i+1值为空且节点node 2i+2值非空:计算节点node i值h i=hash(h 2i+2);如果node 2i+1值为空且节点node 2i+2值为空:设节点node i值h i为空。
步骤3:迭代次数l=l-1;如果l=0,输出结果:节点node 0的值;其他,跳回步骤2。
本实施例中采用第一聚合算法进行聚合计算,方便在进行验证时进行证据校验追溯,例如,对应给定的需要校验的两个数组,执行下面操作:
a、设置i=0,如果h i=h′ i,输出:验证通过,终止。
b、分别用2i+1,2i+2赋值给i进行如下判断:
如果h i≠h′ i并且
Figure PCTCN2020109044-appb-000012
输出:节点node i对应文件发生改变;
如果h i≠h′ i并且
Figure PCTCN2020109044-appb-000013
重新进行步骤b的迭代;
如果h i=h′ i,终止返回。
实现方式二:在哈希聚合算法为第二聚合算法时,对各个合同文件计算hash,再根据计算结果统一合并,计算出聚合结果h0=hash(h1||h2…||hn)。
本实施例中,采用第二聚合算法进行聚合计算,算法较为简单,但是不利于追溯,例如,对于对应给定的需要校验的两个数组,如果h0=h’0,验证通过;否则,进行遍历,依次比较其hash取值是否一致,不一致即为修改文件。
步骤S30,根据所述链上地址获取预存的第二根哈希,并比较所述第一根哈希和所述第二根哈希。
验证平台根据链上地址获取预存的第二根哈希,即,验证平台查询区块链平台,获取链上地址保存的第二根哈希,验证平台比较第一根哈希和第二根哈希,以判断合同集合中的交易合同是否被修改。
步骤S40,确定所述第一根哈希与所述第二根哈希相同后,确定所述证据验证通过。
确定第一根哈希与第二根哈希相同后,验证平台判定合同集合中的交易合同都没有被修改过,验证平台确定所述证据验证通过。本申请实施例中采用哈希聚合的方式,对证据进行归集上链,适用仲裁链多写少读的场景,同时可以减轻仲裁链的通信和传输负担,验证平台需要进行验证时,可以实现快速验证。
可以理解的是,本实施例中将第一聚合算法和第二聚合算法两种方法的结合使用,一方面使得计算、存储开销有较好的表现,另一方面保证了证据追溯验证的效率。
进一步地,基于本申请证据的验证方法第一实施例,提出本申请证据的验证方法第二实施例。
本实施例是第一实施例中步骤S30之后的步骤,本实施例与第一实施例的区别在于:
若所述第一根哈希与所述第二根哈希不同,在接收到分析请求时,获取所述第一根哈希对应的各第一哈希值,获取所述第二根哈希对应的各第二哈希值;
比较同一交易合同的第一哈希值和第二哈希值,得到修改过的目标交易合同并输出。
即,若第一根哈希与第二根哈希不同,验证平台判定合同集合中的交易合同被修改,验证平台输出验证不通过的验证结果。
验证平台在接收到基于验证不通过的验证结果触发的分析请求时,验证平台获取第一根哈希对应的各第一哈希值,验证平台获取第二根哈希对应的各第二哈希值;验证平台依次比较相同合同标识对应的第一哈希值和第二哈希值。即,若预设的哈希聚合算法为第一聚合算法,则按照第一聚合算法的迭代顺序进行哈希值比较,将第一哈希值和第二哈希值不相同的交易合同作为修改过的目标交易合同,并输出所述目标交易合同;若预设的哈希聚合算法为第二聚合算法,则比较所述合同集合中同一交易合同的第一哈希值和第二哈希值,将第一哈希值和第二哈希值不相同的交易合同作为修改过的目标交易合同,并输出所述目标交易合同,以供用户查询。
本实施例中,验证平台根据第一根哈希,第一根哈希对应的各第一哈希值,第二根哈希和第二根哈希对应的各第二哈希值进行追溯,以实现快速地确定被修改的交易合同。
进一步地,参照图3,图3为本申请证据的验证方法第三实施例的流程示意图,所述方法包括:
步骤S50,接收到交易存证请求,获取所述交易存证请求对应的交易标识,和所述交易标识对应的合同集合。
本实施例中的证据的验证方法应用于证据的验证设备,证据的验证设备是交易平台(或者又叫存证平台)的硬件载体,交易平台接收交易存证请求,交易存证请求的触发方式不作具体限定,即,交易存证请求可以是主动触发的,例如,客户在终端上点击“保存”主动触发交易存证请求,终端将交易存证请求发送至交易平台;此外,交易存证请求还可以是自动触发的,例如,交易平台中预设交易更新时自动触发交易存证请求,交易平台在检测交易变更时自动触发交易存证请求。
交易平台在接收到交易存证请求时,交易平台获取交易存证请求对应的交易标识(交易标识是指唯一识别交易的标识信息,例如,交易编号),和交易标识对应的合同集合,合同集合中包含的交易合同的数量为多个,具体并不作限定。
步骤S60,根据所述交易标识确定哈希聚合算法,对所述合同集合中的各交易合同进行哈希计算,得到各所述交易合同对应的第二哈希值,并按照所述哈希聚合算法处理各所述第二哈希值,得到第二根哈希。
交易平台根据交易标识确定哈希聚合算法,例如,交易平台中预设交易标识与聚合算法映射表,交易平台查询预设交易标识与聚合算法映射表,获取交易标识对应的哈希聚合算法;交易平台先对合同集合中的各交易合同进行单独哈希计算,得到各交易合同对应的第二哈希值,然后,交易平台按照哈希聚合算法处理各第二哈希值,得到第二根哈希。交易平台按照哈希聚合算法处理各第二哈希值,得到第二根哈希的具体实现方式可以参照第一实施例,本实施例中不作赘述。
步骤S70,将各所述第二哈希值和所述第二根哈希作为上链内容,基于所述上链内容发起上链保全请求,以使区块链平台保存所述上链内容。
交易平台将各第二哈希值和第二根哈希作为上链内容,交易平台基于上链内容发起上链保全请求,即,交易平台发送上链保全请求至区块链平台,以使区块链平台保存所述上链内容。
区块链平台接收交易平台发送的上链保全请求,区块链平台获取上链保全请求对应的上链内容并进行保存,区块链平台在上链内容保存完成时,区块链平台将保存的链上地址发送至交易平台,以使交易平台可以按照链上地址查询保存的上链内容。
可以理解的是,本实施例中在区块链平台中保存了各个交易合同对应的第二哈希值和聚合得到的第二根哈希,通常情况下保存第二根哈希就可以实现判断,但是保证各个交易合同对应的第二哈希值有助于追溯,若不需要追溯具体的交易合同,可以只保存第二根哈希,而不保存各个交易合同对应的第二哈希值,以减少区块链平台存储空间的占用。
步骤S80,接收到所述区块链平台反馈的链上地址,将所述链上地址与所述合同集合作为证据信息进行保存。
交易平台在接收到区块链平台反馈的链上地址时,交易平台将链上地址与交易标识进行保存,以在出现验证请求时,可以将链上地址反馈至验证平台,本申请实施例中采用哈希聚合的方式,对证据进行归集上链,适用仲裁链多写少读的场景,同时可以减轻仲裁链的通信和传输负担。具体地:
步骤S90,接收到验证请求,获取所述验证请求对应的证据信息,并将所述证据信息发送至验证平台,以在所述验证平台验证所述证据信息。
交易平台接收到验证请求,验证请求的触发方式不作具体限定,交易平台获取验证请求对应的证据信息,证据信息包括合同集合和链上地址;交易平台并将证据信息发送至验证平台,以在所述验证平台进行验证。
本实施例中交易平台在客户发起交易操作时,就签署相关合同发起存证,将证据信息保证至交易平台和区块链平台,通过有效地保存证据信息,一方面方便查询,另一方面可以保证交易的公平公开性。
进一步地,基于本申请证据的验证方法的第三实施例,提出本申请证据的验证方法第四实施例。
本实施例是第三实施例中步骤S60的细化,本实施例中给出了一种根据所述交易标识确定哈希聚合算法的具体实现方式,包括:
获取所述交易标识对应的交易场景信息和交易用户信息,根据预设风险评估规则,确定所述交易场景信息对应的交易风险值,和所述交易用户信息对应的用户风险值。
将所述交易风险值和所述用户风险值之和作为综合风险值,比较所述综合风险值与预设风险阈值。
若所述综合风险值大于或等于所述预设风险阈值,则将第一聚合算法作为哈希聚合算法;
若所述综合风险值小于所述预设风险阈值,则将第二聚合算法作为哈希聚合算法。
即,交易平台中预设风险评估规则,风险评估规则是用于交易风险评估的规则,风险评估规则可以根据具体场景灵活设置,例如,交易额度大于10w则风险值为1分,用户等级小于三级风险值为1分。
交易平台获取交易标识对应的交易场景信息和交易用户信息,其中,交易场景信息包括但不仅限于交易额度、交易类型和交易时间;交易用户信息包括但不仅限于用户名称、用户等级、用户评分、用户联系方式和用户账户。交易平台根据预设风险评估规则,确定交易场景信息对应的交易风险值,和交易用户信息对应的用户风险值。
交易平台将交易风险值和用户风险值之和作为综合风险值,交易平台比较综合风险值与预设风险阈值的大小,其中,预设风险阈值是指预先设置的风险评估基准值,若综合风险值大于或等于预设风险阈值,则说明交易的风险较大,若综合风险值小于预设风险阈值,则说明交易的风险较小。
交易平台确定综合风险值大于或等于预设风险阈值,交易平台则将第一聚合算法作为哈希聚合算法;交易平台确定综合风险值小于预设风险阈值,交易平台将第二聚合算法作为哈希聚合算法。
本实施例中根据交易标识对应的交易场景信息和交易用户信息,确定综合风险值,并根据综合风险值确定聚合算法,若综合风险值高,则说明后面出现验证的可能性较大,此时采用第一聚合算法,第一聚合算法在计算、存储开销会比归并聚合大,但追溯验证计算方面会更好,而且可以支持分支验证;若综合风险值低,则说明后面出现验证的可能性较小,采用第二聚合算法,第二聚合算法的生成根哈希、操作都更加简单、快捷,存储占用量更小,但在追溯验证计算方面会效率略差。
本实施例中,根据评估交易的风险值选择对应的哈希聚合算法,第一聚合算法和第二聚合算法两种方法的结合使用,一方面使得计算、存储开销有较好的表现,另一方面保证了证据追溯验证的效率。
本申请还提供一种证据的验证系统的一实施例。
所述证据的验证系统包括通信连接的交易平台、区块链平台和验证平台,所述证据的验证系统实现以下步骤:
交易平台接收到交易存证请求,交易平台获取所述交易存证请求对应的交易标识,和所述交易标识对应的合同集合;
交易平台根据所述交易标识确定哈希聚合算法,对所述合同集合中的各交易合同进行哈希计算,得到各所述交易合同对应的第二哈希值,交易平台按照所述哈希聚合算法处理各所述第二哈希值,得到第二根哈希;
交易平台将各所述第二哈希值和所述第二根哈希作为上链内容,交易平台基于所述上链内容发起上链保全请求;
区块链平台接收交易平台发起的上链保全请求,区块链平台保存所述上链内容,并将所述上链内容保证的链上地址发送至交易平台;
交易平台在接收到所述区块链平台反馈的链上地址时,交易平台将所述链上地址与所述合同集合作为证据信息进行保存;
交易平台在接收到验证请求时,交易平台获取所述验证请求对应的证据信息,并将所述证据信息与所述验证请求关联发送至验证平台;
验证平台在接收到验证请求时,验证平台获取所述验证请求对应的证据信息,其中,所述证据信息包括:合同集合和链上地址;
验证平台对所述合同集合中的各交易合同进行哈希计算,得到各所述交易合同对应的第一哈希值,验证平台根据预设的哈希聚合算法处理各所述第一哈希值,得到第一根哈希;
验证平台根据所述链上地址获取预存的第二根哈希,并验证平台比较所述第一根哈希和所述第二根哈希;
若所述第一根哈希与所述第二根哈希相同,验证平台则确定所述证据验证通过。
上述证据的验证系统所执行的方法可参照本申请证据的验证方法各个实施例,此处不再赘述。
参照图4,本申请实施例还提供一种证据的验证装置,所述证据的验证装置设置于验证平台,所述证据的验证装置包括:
请求接收模块10,配置为接收到验证请求,获取所述验证请求对应的证据信息,其中,所述证据信息包括:合同集合和链上地址;
哈希处理模块20,配置为对所述合同集合中的各交易合同进行哈希计算,得到各所述交易合同对应的第一哈希值,根据预设的哈希聚合算法处理各所述第一哈希值,得到第一根哈希;
获取比较模块30,配置为根据所述链上地址获取预存的第二根哈希,并比较所述第一根哈希和所述第二根哈希;
结果输出模块40,配置为确定所述第一根哈希与所述第二根哈希相同后,则确定所述证据验证通过。
在一实施例中,所述哈希处理模块20,包括:
排序计算单元,配置为对各第一哈希值对应的所述交易合同进行排序形成合同序列;
第一聚合单元,配置为根据所述第一聚合算法按照所述合同序列迭代合并各所述第一哈希值,得到第一根哈希;或,
第二聚合单元,配置为根据所述第二聚合算法按照所述合同序列统一合并各所述第一哈希值,得到第一根哈希。
在一实施例中,所述第一聚合单元,配置为:
根据所述第一聚合算法,初始化一个
Figure PCTCN2020109044-appb-000014
的数组,其中,所述n为合同序列中的合同数量;
将所述合同序列中各交易合同对应的第一哈希值作为元素输入到所述数组中,对所述数组中的元素进行迭代,得到第一根哈希,其中,迭代的次数
Figure PCTCN2020109044-appb-000015
在一实施例中,所述第二聚合单元,配置为:
获取所述合同序列中各交易合同的第一哈希值,将各所述第一哈希值按所述第二聚合算法进行处理得到第一根哈希;
其中,所述第二聚合算法为:h0=hash(h1||h2…||hn);
所述第二聚合算法中所述h0表示第一根哈希,所述h1表示合同序列中排序第一交易合同的第一哈希值;所述h2表示所述合同序列中排序第二交易合同的第一哈希值,依次类推所述hn表示合同序列中排序最后交易合同的第一哈希值。
在一实施例中,所述证据的验证装置,包括:
第二输出模块,配置为确定所述第一根哈希与所述第二根哈希不同后,输出验证不通过的验证结果;
结果分析模块,配置为接收到基于所述验证不通过的验证结果触发的分析请求,获取所述第一根哈希对应的各第一哈希值,获取所述第二根哈希对应的各第二哈希值;
比较输出模块,配置为比较同一交易合同的第一哈希值和第二哈希值,得到修改过的目标交易合同并输出。
在一实施例中,所述比较输出模块包括:
第一比较单元,配置为确定预设的哈希聚合算法为第一聚合算法后,按照第一聚合算法的迭代顺序进行哈希值比较,将第一哈希值和第二哈希值不相同的交易合同作为修改过的目标交易合同,并输出所述目标交易合同;
第二比较单元,配置为确定预设的哈希聚合算法为第二聚合算法后,比较所述合同集合中同一交易合同的第一哈希值和第二哈希值,将第一哈希值和第二哈希值不相同的交易合同作为修改过的目标交易合同,并输出所述目标交易合同。
上述各程序模块所执行的方法可参照本申请证据的验证方法各个实施例,此处不再赘述。
参照图5,本申请实施例还提供另一种证据的验证装置,所述证据的验证装置设置于交易平台,所述证据的验证装置包括:
第一获取模块50,配置为在接收到交易存证请求,获取所述交易存证请求对应的交易标识,和所述交易标识对应的合同集合;
确定处理模块60,配置为根据所述交易标识确定哈希聚合算法,对所述合同集合中的各交易合同进行哈希计算,得到各所述交易合同对应的第二哈希值,并按照所述哈希聚合算法处理各所述第二哈希值,得到第二根哈希;
请求模块70,配置为将各所述第二哈希值和所述第二根哈希作为上链内容,基于所述上链内容发起上链保全请求,以使区块链平台保存所述上链内容;
进行保存模块80,配置为接收到所述区块链平台反馈的链上地址,将所述链上地址与所述合同集合作为证据信息进行保存;
第二获取模块90,配置为接收到验证请求,获取所述验证请求对应的证据信息,并将所述证据信息与所述验证请求关联发送至验证平台,以在所述验证平台进行验证;其中,所述证据信息包括合同集合和链上地址。
在一实施例中,所述确定处理模块,包括:
获取确定单元,配置为获取所述交易标识对应的交易场景信息和交易用户信息,根据预设风险评估规则,确定所述交易场景信息对应的交易风险值,和所述交易用户信息对应的用户风险值;
评分比对单元,配置为将所述交易风险值和所述用户风险值之和作为综合风险值,比较所述综合风险值与预设风险阈值;
第一确定单元,配置为确定所述综合风险值大于或等于所述预设风险阈值后,将第一聚合算法作为哈希聚合算法;
第二确定单元,配置为确定所述综合风险值小于所述预设风险阈值后,将第二聚合算法作为哈希聚合算法。
上述各程序模块所执行的方法可参照本申请证据的验证方法各个实施例,此处不再赘述。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡 献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (13)

  1. 一种证据的验证方法,所述证据的验证方法应用于验证平台,所述证据的验证方法包括如下步骤:
    接收到基于证据信息触发的验证请求,获取所述证据信息,其中,所述证据信息包括:合同集合和链上地址;
    对所述合同集合中的各交易合同进行哈希计算,得到各所述交易合同对应的第一哈希值,根据预设的哈希聚合算法处理各所述第一哈希值,得到第一根哈希;
    根据所述链上地址获取预存的第二根哈希,并比较所述第一根哈希和所述第二根哈希;
    确定所述第一根哈希与所述第二根哈希相同后,确定所述证据验证通过。
  2. 如权利要求1所述的证据的验证方法,其中,所述哈希聚合算法包括第一聚合算法和第二聚合算法;
    所述根据预设的哈希聚合算法处理各所述第一哈希值,得到第一根哈希的步骤,包括:
    对各第一哈希值对应的所述交易合同进行排序形成合同序列;
    根据所述第一聚合算法按照所述合同序列迭代合并各所述第一哈希值,得到第一根哈希;或,
    根据所述第二聚合算法按照所述合同序列统一合并各所述第一哈希值,得到第一根哈希。
  3. 如权利要求2所述的证据的验证方法,其中,所述根据所述第一聚合算法按照所述合同序列迭代合并各所述第一哈希值,得到第一根哈希的步骤包括:
    根据所述第一聚合算法,初始化一个
    Figure PCTCN2020109044-appb-100001
    的数组,其中,所述n为合同序列中的合同数量;
    将所述合同序列中各交易合同对应的第一哈希值作为元素输入到所述数组中,对所述数组中的元素进行迭代,得到第一根哈希,其中,迭代的次数
    Figure PCTCN2020109044-appb-100002
  4. 如权利要求2所述的证据的验证方法,其中,所述根据所述第二聚合算法按照所述合同序列统一合并各所述第一哈希值,得到第一根哈希的步骤包括:
    获取所述合同序列中各交易合同的第一哈希值,将各所述第一哈希值按所述第二聚合算法进行处理得到第一根哈希;
    其中,所述第二聚合算法为:h0=hash(h1||h2…||hn);
    所述第二聚合算法中所述h0表示第一根哈希,所述h1表示合同序列中排序第一交易合同的第一哈希值;所述h2表示所述合同序列中排序第二交易合同的第一哈希值,依次,直至所述hn表示合同序列中排序最后交易合同的第一哈希值。
  5. 如权利要求1所述的证据的验证方法,其中,所述证据的验证方法,还包括:
    确定所述第一根哈希与所述第二根哈希不同后,且确定接收到分析请求后,获取所述第一根哈希对应的各第一哈希值,获取所述第二根哈希对应的各第二哈希值;
    比较同一交易合同的第一哈希值和第二哈希值,得到修改过的目标交易合同并输出。
  6. 如权利要求5所述的证据的验证方法,其中,所述比较同一交易合同的第一哈希值和第二哈希值,得到修改过的目标交易合同并输出的步骤包括:
    确定预设的哈希聚合算法为第一聚合算法后,按照第一聚合算法的迭代顺序进行哈希值比较,将第一哈希值和第二哈希值不相同的交易合同作为修改过的目标交易合同,并输 出所述目标交易合同;或者
    确定预设的哈希聚合算法为第二聚合算法后,比较所述合同集合中同一交易合同的第一哈希值和第二哈希值,将第一哈希值和第二哈希值不相同的交易合同作为修改过的目标交易合同,并输出所述目标交易合同。
  7. 一种证据的验证方法,所述证据的验证方法应用于交易平台,所述证据的验证方法包括如下步骤:
    接收到交易存证请求,获取所述交易存证请求对应的交易标识,和所述交易标识对应的合同集合;
    根据所述交易标识确定哈希聚合算法,对所述合同集合中的各交易合同进行哈希计算,得到各所述交易合同对应的第二哈希值,并按照所述哈希聚合算法处理各所述第二哈希值,得到第二根哈希;
    将各所述第二哈希值和所述第二根哈希作为上链内容,基于所述上链内容发起上链保全请求,以使区块链平台保存所述上链内容;
    接收到所述区块链平台反馈的链上地址,将所述链上地址与所述合同集合作为证据信息进行保存;
    接收到验证请求,获取所述验证请求对应的证据信息,并将所述证据信息发送至验证平台,以在所述验证平台验证所述证据信息。
  8. 如权利要求7所述的证据的验证方法,其中,所述根据所述交易标识确定哈希聚合算法的步骤,包括:
    获取所述交易标识对应的交易场景信息和交易用户信息,根据预设风险评估规则,确定所述交易场景信息对应的交易风险值,和所述交易用户信息对应的用户风险值;
    将所述交易风险值和所述用户风险值之和作为综合风险值,比较所述综合风险值与预设风险阈值;及
    确定所述综合风险值大于或等于所述预设风险阈值后,将预设的第一聚合算法作为哈希聚合算法;或
    确定所述综合风险值小于所述预设风险阈值后,将预设的第二聚合算法作为哈希聚合算法。
  9. 一种证据的验证系统,其中,所述证据的验证系统包括通信连接的交易平台、区块链平台和验证平台,所述证据的验证系统实现以下步骤:
    交易平台接收到交易存证请求,交易平台获取所述交易存证请求对应的交易标识,和所述交易标识对应的合同集合;
    交易平台根据所述交易标识确定哈希聚合算法,对所述合同集合中的各交易合同进行哈希计算,得到各所述交易合同对应的第二哈希值,交易平台按照所述哈希聚合算法处理各所述第二哈希值,得到第二根哈希;
    交易平台将各所述第二哈希值和所述第二根哈希作为上链内容,交易平台基于所述上链内容发起上链保全请求;
    区块链平台接收交易平台发起的上链保全请求,区块链平台保存所述上链内容,并将所述上链内容保证的链上地址发送至交易平台;
    交易平台在接收到所述区块链平台反馈的链上地址时,交易平台将所述链上地址与所述合同集合作为证据信息进行保存;
    交易平台接收到验证请求,交易平台获取所述验证请求对应的证据信息,并将所述证据信息发送至验证平台;
    验证平台接收到基于证据信息触发的验证请求,验证平台获取所述证据信息,其中, 所述证据信息包括:合同集合和链上地址;
    验证平台对所述合同集合中的各交易合同进行哈希计算,得到各所述交易合同对应的第一哈希值,验证平台根据预设的哈希聚合算法处理各所述第一哈希值,得到第一根哈希;
    验证平台根据所述链上地址获取预存的第二根哈希,验证平台比较所述第一根哈希和所述第二根哈希;
    验证平台确定所述第一根哈希与所述第二根哈希相同后,确定所述证据验证通过。
  10. 一种证据的验证装置,其中,所述证据的验证装置设置于验证平台,所述证据的验证装置包括:
    请求接收模块,配置为接收基于证据信息触发的验证请求,获取所述证据信息,其中,所述证据信息包括:合同集合和链上地址;
    哈希处理模块,配置为对所述合同集合中的各交易合同进行哈希计算,得到各所述交易合同对应的第一哈希值,根据预设的哈希聚合算法处理各所述第一哈希值,得到第一根哈希;
    获取比较模块,配置为根据所述链上地址获取预存的第二根哈希,并比较所述第一根哈希和所述第二根哈希;
    结果输出模块,配置为确定所述第一根哈希与所述第二根哈希相同后,则确定所述证据验证通过。
  11. 一种证据的验证装置,其中,所述证据的验证装置设置于交易平台,所述证据的验证装置包括:
    第一获取模块,配置为接收交易存证请求,获取所述交易存证请求对应的交易标识,和所述交易标识对应的合同集合;
    确定处理模块,配置为根据所述交易标识确定哈希聚合算法,对所述合同集合中的各交易合同进行哈希计算,得到各所述交易合同对应的第二哈希值,并按照所述哈希聚合算法处理各所述第二哈希值,得到第二根哈希;
    请求模块,配置为将各所述第二哈希值和所述第二根哈希作为上链内容,基于所述上链内容发起上链保全请求,以使区块链平台保存所述上链内容;
    进行保存模块,配置为接收所述区块链平台反馈的链上地址,将所述链上地址与所述合同集合作为证据信息进行保存;
    第二获取模块,配置为接收验证请求,获取所述验证请求对应的证据信息,并将所述证据信息发送至验证平台,以在所述验证平台验证所述证据信息。
  12. 一种证据的验证设备,其中,所述证据的验证设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的证据的验证程序,所述证据的验证程序被所述处理器执行时实现如权利要求1至8中任一项所述的证据的验证方法的步骤。
  13. 一种计算机可读存储介质,其中,所述计算机可读存储介质上存储有证据的验证程序,所述证据的验证程序被处理器执行时实现如权利要求1至8中任一项所述的证据的验证方法的步骤。
PCT/CN2020/109044 2019-08-23 2020-08-14 证据的验证方法、系统、装置、设备及可读存储介质 WO2021036810A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910783390.7A CN110490599A (zh) 2019-08-23 2019-08-23 证据的验证方法、系统、装置、设备及可读存储介质
CN201910783390.7 2019-08-23

Publications (1)

Publication Number Publication Date
WO2021036810A1 true WO2021036810A1 (zh) 2021-03-04

Family

ID=68553190

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/109044 WO2021036810A1 (zh) 2019-08-23 2020-08-14 证据的验证方法、系统、装置、设备及可读存储介质

Country Status (2)

Country Link
CN (1) CN110490599A (zh)
WO (1) WO2021036810A1 (zh)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110490599A (zh) * 2019-08-23 2019-11-22 深圳前海微众银行股份有限公司 证据的验证方法、系统、装置、设备及可读存储介质
CN112132576B (zh) * 2020-09-07 2021-08-06 易宝支付有限公司 基于区块链通信的支付信息处理方法及区块链信息平台
CN112506426A (zh) * 2020-11-20 2021-03-16 宜鼎国际股份有限公司 可将数据上链的数据储存装置
CN112417518A (zh) * 2020-11-24 2021-02-26 京东数科海益信息科技有限公司 一种文件的验证方法、装置、电子设备和计算机可读介质
CN112330256A (zh) * 2020-11-26 2021-02-05 欧冶云商股份有限公司 基于区块链的原料运输物流轨迹数据存证验证方法及系统
CN113824757B (zh) * 2020-12-23 2024-05-21 京东科技控股股份有限公司 数据获取方法、系统和计算机可读存储介质
CN114915636A (zh) * 2021-02-09 2022-08-16 宜鼎国际股份有限公司 数据上链系统及方法
CN112966288A (zh) * 2021-03-30 2021-06-15 建信金融科技有限责任公司 数据处理方法、装置、电子设备及存储介质
CN113129008B (zh) * 2021-05-19 2023-09-22 京东科技控股股份有限公司 数据处理方法、装置、计算机可读介质及电子设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080176713A1 (en) * 2006-12-05 2008-07-24 Pablo Olivera Brizzio Method and apparatus for selecting a condition of a fitness machine in relation to a user
CN105282165A (zh) * 2015-11-03 2016-01-27 浪潮(北京)电子信息产业有限公司 一种云计算下数据存储的方法及装置
CN108009810A (zh) * 2017-12-27 2018-05-08 光载无限(北京)科技有限公司 一种可信数字资产交易方法
CN109491965A (zh) * 2018-09-13 2019-03-19 远光软件股份有限公司 购售电合同的存储方法及其网络和电子设备
CN110490599A (zh) * 2019-08-23 2019-11-22 深圳前海微众银行股份有限公司 证据的验证方法、系统、装置、设备及可读存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080176713A1 (en) * 2006-12-05 2008-07-24 Pablo Olivera Brizzio Method and apparatus for selecting a condition of a fitness machine in relation to a user
CN105282165A (zh) * 2015-11-03 2016-01-27 浪潮(北京)电子信息产业有限公司 一种云计算下数据存储的方法及装置
CN108009810A (zh) * 2017-12-27 2018-05-08 光载无限(北京)科技有限公司 一种可信数字资产交易方法
CN109491965A (zh) * 2018-09-13 2019-03-19 远光软件股份有限公司 购售电合同的存储方法及其网络和电子设备
CN110490599A (zh) * 2019-08-23 2019-11-22 深圳前海微众银行股份有限公司 证据的验证方法、系统、装置、设备及可读存储介质

Also Published As

Publication number Publication date
CN110490599A (zh) 2019-11-22

Similar Documents

Publication Publication Date Title
WO2021036810A1 (zh) 证据的验证方法、系统、装置、设备及可读存储介质
WO2020186901A1 (zh) 基于区块链的数据核对系统、方法、计算设备及存储介质
US9116879B2 (en) Dynamic rule reordering for message classification
WO2020220764A1 (zh) 基于区块链的数据压缩、查询方法及装置和电子设备
WO2017124713A1 (zh) 一种数据模型的确定方法及装置
CN110457311B (zh) 自动生成对账文件的方法、服务器及存储介质
CN110225039B (zh) 权限模型获取、鉴权方法、网关、服务器以及存储介质
US20140214632A1 (en) Smart Crowd Sourcing On Product Classification
CN111753016A (zh) 数据处理方法、装置、系统及计算机可读存储介质
CN110213290B (zh) 数据获取方法、api网关以及存储介质
WO2021114025A1 (zh) 增量数据确定方法、确定装置、服务器及终端设备
CN109815112B (zh) 基于功能测试的数据调试方法、装置及终端设备
WO2022048359A1 (zh) 一种数据归档方法、装置、电子设备和存储介质
CN109669644A (zh) 一种数据存储的方法和装置
CN107133233B (zh) 一种配置数据查询的处理方法及装置
WO2022267769A1 (zh) 图数据生成的方法及装置
US11151088B2 (en) Systems and methods for verifying performance of a modification request in a database system
CN111445319A (zh) 一种凭证生成方法、装置、计算机设备及存储介质
WO2019061667A1 (zh) 电子装置、数据处理方法、系统及计算机可读存储介质
WO2021174882A1 (zh) 数据分片校验方法、装置、计算机设备及可读存储介质
CN112966054A (zh) 基于企业图谱节点间关系的族群划分方法和计算机设备
CN116401229A (zh) 数据库的数据校验方法、装置及设备
WO2023077815A1 (zh) 一种处理敏感数据的方法及装置
CN109409924B (zh) 账户评分系统、方法、服务器和计算机可读存储介质
CN107704557B (zh) 操作互斥数据的处理方法、装置、计算机设备和存储介质

Legal Events

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

Ref document number: 20857497

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: 20857497

Country of ref document: EP

Kind code of ref document: A1