WO2023020428A1 - Data verification method and apparatus, and storage medium - Google Patents

Data verification method and apparatus, and storage medium Download PDF

Info

Publication number
WO2023020428A1
WO2023020428A1 PCT/CN2022/112485 CN2022112485W WO2023020428A1 WO 2023020428 A1 WO2023020428 A1 WO 2023020428A1 CN 2022112485 W CN2022112485 W CN 2022112485W WO 2023020428 A1 WO2023020428 A1 WO 2023020428A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
subset
server
hash value
user
Prior art date
Application number
PCT/CN2022/112485
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 WO2023020428A1 publication Critical patent/WO2023020428A1/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
    • 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
    • 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
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Definitions

  • the present disclosure relates to the field of data processing, and in particular to a data verification method, device and storage medium.
  • the present disclosure proposes a data verification method, device and storage medium.
  • a data verification method includes:
  • the first data includes the hash value of at least one first subset, the first subset includes at least one second subset, the first data is the transaction that the first server wants to entrust The data;
  • the second data is verified according to the returned information and the hash value of at least one first subset included in the second data, and the hash value of the at least one first subset included in the second data is based on the at least one hash value included in the first data
  • the hash value of the first subset is determined;
  • the content of at least one first subset included in the second data, or the contents of at least one first subset and at least one second subset included in the second data are obtained according to the returned information, so as to determine whether Accept the entrustment of the first server.
  • the data to be entrusted for transaction into at least one first subset, and dividing the first subset into at least one second subset, it can meet the sampling requirements of different data volumes, and the first Subsets, or, the first subset and the second subset are subjected to sampling inspection to realize a more detailed and targeted entrusted transaction sampling inspection process.
  • the first data include at least one hash value of the first subset, while simplifying the sampling process, it can meet the sampling requirements of different data volumes and improve the efficiency of sampling.
  • the second server cannot obtain the original data of the first data.
  • the first server cannot determine the second data that will be sampled, so it cannot select data with better quality in advance as the data to be sampled to deceive the second server.
  • Sending the first data first, and then performing random inspection can prevent the first server from intentionally falsifying data in the returned information to cover up the original data, making the sampling inspection process random, credible, and controllable.
  • the second data when the number of first subsets included in the first data is greater than a predetermined threshold, the second data includes at least one first subset and at least one second subset.
  • the first server in the case of a large amount of data, it is possible to prevent the first server from concealing data content or providing incomplete data, resulting in missed detection and false detection, and to achieve more detailed and targeted sampling inspection process.
  • the returned information includes third data
  • the second data is verified according to the returned information and the hash value of at least one first subset included in the second data, including:
  • the second data is verified according to the judgment result.
  • the entrusting party cannot obtain the original data of the data that has not been sampled in the first data, which can prevent the original data of the first data from being leaked.
  • the first data includes an encrypted first subset and an encrypted second subset
  • the returned information includes a key corresponding to the second data.
  • At least one hash value of the first subset, for verifying the second data includes:
  • the second data is verified according to the fourth data and the hash value of the at least one first subset included in the second data.
  • the fourth data is obtained, and the fourth data is judged Whether the hash value of the hash value is consistent with the hash value of the second data can determine whether the first server has provided the data specified in the sampling request, preventing the first server from providing false data.
  • verifying the second data according to the fourth data and a hash value of at least one first subset included in the second data includes:
  • the second data is verified according to the judgment result.
  • the key includes at least one key corresponding to the first subset and/or the second subset in the second data, and different keys corresponding to the first subset and the second subset The keys are different.
  • the sampling request includes at least one data location
  • the data location is used to indicate the location of the first subset included in the second data in the first data, and/or, the first subset included in the second data The position of the second subset in the first subset.
  • the arrangement order of each first subset in the first data can be determined, and/or the arrangement order of the second subset in the first subset can be determined. If the original data is obtained during the subsequent transaction, it can be checked whether the hash value of the data at the selected data position is consistent with the hash value of the corresponding position in the first data initially provided by the first server, so as to prevent the first server from Part or all of the data in the first data is replaced before and after the random inspection, so that the first server cannot provide false data during the commissioning process to cope with the random inspection.
  • the second data includes at least one second subset
  • the method further includes:
  • the content of at least one second subset included in the second data is obtained according to the returned information, so as to determine whether to accept the entrustment of the first server.
  • the second server when the amount of data that the first server intends to entrust with the transaction is small, the second server performs sampling inspection on the second subset, which can simplify the data verification process when the amount of data is small, and improve Data Validation Efficiency. And in this process, the second server cannot obtain the original data of the first server, making the process random, credible, and controllable.
  • the method further includes:
  • the information published in the database can be used to trace the source of the relevant process, so that a traceable data verification process can be realized.
  • a data verification method includes:
  • the first data includes the hash value of at least one first subset, the first subset includes at least one second subset, and the first data is the transaction that the first server wants to entrust data;
  • the return information is used by the second server to verify the second data according to the return information and the hash value of at least one first subset included in the second data, the second The hash value of at least one first subset included in the second data is determined according to the hash value of at least one first subset included in the first data, and if the verification is passed, the returned information is used by the second server according to the returned information Obtain the content of at least one first subset included in the second data, or the contents of at least one first subset and at least one second subset included in the second data, so as to determine whether to accept the entrustment of the first server.
  • the data to be entrusted for transaction into at least one first subset, and dividing the first subset into at least one second subset, it can meet the sampling requirements of different data volumes, and the first Subsets, or, the first subset and the second subset are subjected to sampling inspection to realize a more detailed and targeted entrusted transaction sampling inspection process.
  • the first data include at least one hash value of the first subset, while simplifying the sampling process, it can meet the sampling requirements of different data volumes and improve the efficiency of sampling.
  • the second server cannot obtain the original data of the first data.
  • the first server cannot determine the second data that will be sampled, so it cannot select data with better quality in advance as the data to be sampled to deceive the second server.
  • Sending the first data first, and then performing random inspection can prevent the first server from intentionally falsifying data in the returned information to cover up the original data, making the sampling inspection process random, credible, and controllable.
  • the second data when the number of first subsets included in the first data is greater than a predetermined threshold, the second data includes at least one first subset and at least one second subset.
  • the first server in the case of a large amount of data, it is possible to prevent the first server from concealing data content or providing incomplete data, resulting in missed detection and false detection, and to achieve more detailed and targeted sampling inspection process.
  • the returned information includes third data
  • the second server verifies the second data according to the returned information and the hash value of at least one first subset included in the second data, including:
  • the second server determines whether the hash value of the third data is consistent with the hash value of at least one first subset included in the second data when the number of first subsets included in the first data is greater than a predetermined threshold;
  • the second server verifies the second data according to the judgment result.
  • the entrusting party cannot obtain the original data of the data that has not been sampled in the first data, which can prevent the original data of the first data from being leaked.
  • the first data includes an encrypted first subset and an encrypted second subset
  • the returned information includes a key corresponding to the second data
  • the second server uses the returned information and the encrypted second
  • the second data includes at least one hash value of the first subset, and the second data is verified, including:
  • the second server decrypts the encrypted second data in the encrypted first subset and the encrypted second subset according to the key to obtain fourth data;
  • the second server verifies the second data according to the fourth data and the hash value of at least one first subset included in the second data.
  • the fourth data is obtained, and the fourth data is judged Whether the hash value of the hash value is consistent with the hash value of the second data can determine whether the first server has provided the data specified in the sampling request, preventing the first server from providing false data.
  • the second server verifies the second data according to the fourth data and the hash value of at least one first subset included in the second data, including:
  • the second server determines whether the hash value of the fourth data is consistent with the hash value of at least one first subset included in the second data
  • the second server verifies the second data according to the judgment result.
  • the key includes at least one key corresponding to the first subset and/or the second subset in the second data, and different keys corresponding to the first subset and the second subset The keys are different.
  • the sampling request includes at least one data location
  • the data location is used to indicate the location of the first subset included in the second data in the first data, and/or, the first subset included in the second data The position of the second subset in the first subset.
  • the arrangement order of each first subset in the first data can be determined, and/or the arrangement order of the second subset in the first subset can be determined. If the original data is obtained during the subsequent transaction, it can be checked whether the hash value of the data at the selected data position is consistent with the hash value of the corresponding position in the first data initially provided by the first server, so as to prevent the first server from Part or all of the data in the first data is replaced before and after the random inspection, so that the first server cannot provide false data during the commissioning process to cope with the random inspection.
  • the second data includes at least one second subset
  • the returned information is also used by the second server to obtain the content of the at least one second subset included in the second data according to the returned information, so as to determine whether Accept the entrustment of the first server.
  • the second server when the amount of data that the first server intends to entrust with the transaction is small, the second server performs sampling inspection on the second subset, which can simplify the data verification process when the amount of data is small, and improve Data Validation Efficiency. And in this process, the second server cannot obtain the original data of the first server, making the process random, credible, and controllable.
  • a data verification device includes:
  • the first receiving module is configured to receive the first data sent by the first server, the first data includes a hash value of at least one first subset, the first subset includes at least one second subset, and the first data is the hash value of the first subset 1.
  • the first sending module is configured to send a sampling request for the second data to the first server, the second data includes at least one first subset, or the second data includes at least one first subset and at least one second subset set;
  • the second receiving module is configured to receive the return information sent by the first server in response to the sampling request
  • a verification module configured to verify the second data according to the returned information and the hash value of at least one first subset included in the second data.
  • the hash value of the at least one first subset included in the second data is based on the first data A hash value determination of the at least one first subset included.
  • the first determination module is configured to obtain the content of at least one first subset included in the second data, or at least one first subset and at least one second subset included in the second data according to the returned information when the verification is passed. Set content to determine whether to accept the commission from the first server.
  • the second data when the number of first subsets included in the first data is greater than a predetermined threshold, the second data includes at least one first subset and at least one second subset.
  • the returned information includes third data, a verification module, configured to:
  • the second data is verified according to the judgment result.
  • the first data includes an encrypted first subset and an encrypted second subset
  • the returned information includes a key corresponding to the second data
  • the verification module is configured to:
  • the second data is verified according to the fourth data and the hash value of the at least one first subset included in the second data.
  • verifying the second data according to the fourth data and the hash value of at least one first subset included in the second data includes:
  • the second data is verified according to the judgment result.
  • the key includes at least one key corresponding to the first subset and/or the second subset in the second data, and different keys corresponding to the first subset and the second subset The keys are different.
  • the sampling request includes at least one data location
  • the data location is used to indicate the location of the first subset included in the second data in the first data, and/or, the first subset included in the second data The position of the second subset in the first subset.
  • the second data includes at least one second subset
  • the device further includes:
  • the second determining module is configured to obtain the content of at least one second subset included in the second data according to the returned information, so as to determine whether to accept the commission from the first server.
  • the device also includes:
  • a publishing module configured to publish one or more of the following into the non-modifiable database: the hash value of the first subset included in the first data, the encrypted first subset included in the first data, the first subset included in the first data, the A data includes the encrypted second subset, a sampling request.
  • a data verification device includes:
  • the second sending module is configured to send the first data to the second server, the first data includes a hash value of at least one first subset, the first subset includes at least one second subset, and the first data is the first The data that the server wants to entrust for transactions;
  • the third receiving module is configured to receive a sampling request for the second data sent by the second server, the second data includes at least one first subset, or the second data includes at least one first subset and at least one second Subset;
  • the sending module is configured to send return information to the second server in response to the sampling request, and the return information is used for the second server to send the hash value of at least one first subset included in the return information and the second data to the second server.
  • the data is verified, and the hash value of at least one first subset included in the second data is determined according to the hash value of at least one first subset included in the first data. If the verification is passed, the returned information is used for the second
  • the server obtains the content of at least one first subset included in the second data, or the content of at least one first subset and at least one second subset included in the second data according to the returned information, so as to determine whether to accept the content of the first server. entrust.
  • the second data when the number of first subsets included in the first data is greater than a predetermined threshold, the second data includes at least one first subset and at least one second subset.
  • the returned information includes third data
  • the second server verifies the second data according to the returned information and the hash value of at least one first subset included in the second data, including:
  • the second server determines whether the hash value of the third data is consistent with the hash value of at least one first subset included in the second data when the number of first subsets included in the first data is greater than a predetermined threshold;
  • the second server verifies the second data according to the judgment result.
  • the first data includes an encrypted first subset and an encrypted second subset
  • the returned information includes a key corresponding to the second data
  • the second server uses the returned information and the encrypted second
  • the second data includes at least one hash value of the first subset, and the second data is verified, including:
  • the second server decrypts the encrypted second data in the encrypted first subset and the encrypted second subset according to the key to obtain fourth data;
  • the second server verifies the second data according to the fourth data and the hash value of at least one first subset included in the second data.
  • the second server verifies the second data according to the fourth data and the hash value of at least one first subset included in the second data, including:
  • the second server determines whether the hash value of the fourth data is consistent with the hash value of at least one first subset included in the second data
  • the second server verifies the second data according to the judgment result.
  • the key includes at least one key corresponding to the first subset and/or the second subset in the second data, and different keys corresponding to the first subset and the second subset The keys are different.
  • the sampling request includes at least one data location
  • the data location is used to indicate the location of the first subset included in the second data in the first data, and/or, the first subset included in the second data The position of the second subset in the first subset.
  • the second data includes at least one second subset
  • the returned information is also used by the second server to obtain the content of the at least one second subset included in the second data according to the returned information, so as to determine whether Accept the entrustment of the first server.
  • a data verification device including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions stored in the memory , to implement the above method.
  • a non-volatile computer-readable storage medium on which computer program instructions are stored, wherein the computer program instructions implement the above method when executed by a processor.
  • a computer program product including computer readable codes, or a non-volatile computer readable storage medium carrying computer readable codes, when the computer readable codes are stored in an electronic device
  • the processor in the electronic device executes the above method.
  • Fig. 1 shows a schematic diagram of an application scenario according to an embodiment of the present application.
  • Fig. 2 shows a flowchart of a data verification method according to an embodiment of the present application.
  • Fig. 3 shows a flowchart of a data verification method according to an embodiment of the present application.
  • Fig. 4 shows a structural diagram of a data verification device according to an embodiment of the present application.
  • Fig. 5 shows a structural diagram of a data verification device according to an embodiment of the present application.
  • Fig. 6 is a block diagram of an apparatus 1900 for data verification according to an exemplary embodiment.
  • the present application provides a data verification method, in which the first user (that is, the owner of the data) can divide the data to be entrusted for transaction into at least one first subset, wherein the first subset At least one second subset may be included.
  • the trustee of the data (which may be referred to as the second user) can conduct spot checks on some of the first data (that is, the second data), by receiving the return information sent by the first user in response to the spot check request , the returned information can be used to verify the second data, so as to prevent the first user from concealing data or providing incomplete data, so as to determine whether to accept the entrustment of the first user.
  • the first user cannot forge the data to pass the random inspection, and the second user cannot obtain the original data of the other data in the first data except the second data, which prevents the data from being resold and abused, making this process possible Trustworthy and manageable.
  • Fig. 1 shows a schematic diagram of an application scenario according to an embodiment of the present application.
  • the data verification method provided by the embodiment of the present application can be used in the scenario where the first user wants to entrust the data owned by the second user to conduct data transactions.
  • the first user can be understood as the party who owns the data to be entrusted for transaction (the original data of the first data), and the second user can be understood as the party who wants to verify the data to be entrusted for transaction to determine whether to accept the entrustment.
  • the second user can be a data trust platform or other third-party organizations, which is not limited in this application.
  • This application does not limit the specific types of data to be entrusted for transactions, for example, it can be labeled data sets (ie, a collection of labeled data, which can be used in scenarios such as model training), algorithm model codes, etc.
  • an unmodifiable database which may be set on a platform operated by a second user, or the platform may be operated by another second user other than the first user and the second user. operated by three parties.
  • the database can be used to publish relevant information uploaded by the first user or the second user through the platform.
  • the information may include relevant information when verifying data during the delegation process and information in other related processes (such as transactions), and the information may also be a hash value of the original information.
  • the platform can regularly sign the above-mentioned uploaded information, so as to ensure that its content cannot be tampered with once uploaded, and its source can be traced.
  • the database may be a blockchain-based database.
  • the first user and the second user can also have their own public key and private key.
  • the public key and private key of the first user and the second user can be authenticated by a legal third party and obtain corresponding certificates, and the first user,
  • the authenticated public key and corresponding certificate information of the second user may also be published in the above-mentioned database.
  • the public keys of the first user and the second user can be used to verify the files signed with the private key respectively, and in the process of entrusting data transactions, the first user and the second user can also use their respective private keys Sign the relevant operation content to prevent others from tampering, and make it impossible for the first user and the second user to deny their own operation content.
  • FIG. 2 shows a flow chart of the data verification method according to an embodiment of the present application.
  • the method can be used in a second server, and the second server can be applied to the above-mentioned second user, for example, the second user can implement the method in this embodiment through a terminal device or a server.
  • the method includes:
  • Step S201 receiving first data sent by a first server.
  • the first data sent by the first user may be received by the second user (ie the second server end).
  • the first data may include hash values of at least one first subset, and the first subset includes at least one second subset.
  • the first data may be the data that the first user intends to entrust for the transaction.
  • the data that the first user wants to entrust to conduct transactions (may be called D) can be split into k subsets (that is, the first subset), and any first subset after splitting D can be called Doc i , i may represent the sequence number of the corresponding first subset, then the data set corresponding to D after splitting may include the first subsets Doc 1 , Doc 2 , Doc 3 . . . Dock .
  • the present application does not limit the number k of the split first subsets.
  • any second subset obtained after splitting the first subset of each item may be called Item ij , where i may represent the sequence number of the first subset corresponding to the second subset , j can represent the sequence number of the second subset, after splitting, Doc 1 can include, for example, the second subset Item 11 , Item 12 ...Item 1n1 , and Doc 2 can include, for example, the second subset Item 21 , Item 22 ... Item 2n2 , Dock k may include, for example, second subsets Item k1 , Item k2 . . . Item knk , wherein n1, n2 .
  • each item of the second subset may represent a minimum unit of the corresponding data D, that is, the second subset cannot be further divided.
  • Each first subset in the data D to be entrusted for transaction may be compressed with a hash function to obtain each hash value corresponding to each first subset.
  • H( Dock ) may represent the hash value of the first subset Dock . It is also possible to compress the complete data D to be entrusted for transactions using a hash function to obtain H(D), and the second user may also receive the hash value H(D) of the data to be entrusted for transactions sent by the first user.
  • each first subset and each second subset in D may also be encrypted respectively to obtain a corresponding encrypted data set.
  • E( Dock ) may represent the encrypted first subset Dock
  • E(Item ij ) may represent the encrypted second subset Item ij .
  • the method for encrypting each subset in the data D may be that the first user creates a master key MK, and uses MK to respectively determine the key corresponding to each subset.
  • the encryption method is introduced by taking the encryption of the first subset as an example:
  • the first user can first determine (can be randomly generated) a key K(Doc 1 ) corresponding to the first subset Doc 1 , then K(Doc i+1 ) can be the pair K(Doc i ) It is determined after encryption, so that the keys corresponding to all the first subsets can be determined.
  • the first user may first determine the hash value H(Doc i ) corresponding to each first subset, and then the key K(Doc i ) corresponding to the first subset Doc i may use the master key MK to correspond to H(Doc i ) is determined after being encrypted, so that the keys corresponding to all the first subsets can be determined.
  • the above only uses two examples to illustrate the method of using MK to determine the key K(Doc i ) corresponding to the first subset.
  • This application does not limit the method of using MK to determine the key corresponding to the first subset. or other very few keys can determine the keys corresponding to all the first subsets, and even if others know the keys corresponding to the first subset with any number of items, they cannot infer the keys corresponding to other first subsets That's it.
  • the manner of encrypting the second subset is the same.
  • Step S202 sending a sampling request for the second data to the first server.
  • the second data includes at least one first subset, or, the second data may include at least one first subset and at least one second subset.
  • the second data may include at least one first subset set and at least one second subset, that is to say, the first subset and the second subset can be sampled separately.
  • the sampling request may further include a first sampling request and a second sampling request.
  • the second data corresponding to the first sampling request may include at least one second subset
  • the second data corresponding to the second sampling request may include at least one first subset.
  • the second user may first send a first sampling request to the first user, and the second user may determine the first subset included in the second data corresponding to the second sampling request according to the information returned by the first user.
  • the importance of each first subset corresponding to the second subset can be evaluated, and a predetermined number of first subsets can be selected according to the importance of each first subset.
  • the subset is used as the content included in the second data in the second sampling request, and then the second sampling request is sent to the first user. As a result, more detailed and purposeful sampling of data can be achieved.
  • first send the second sampling request to the first user determine the first sampling request according to the information returned by the first user, and then send the first sampling request to the first user, which is not limited in this application.
  • the second data may further include only the first subset, that is, the second user may only conduct random inspection on at least one first subset.
  • the second data may only include the second Subsets, that is, the second user can only perform random checks on at least one second subset in the first subset.
  • the second data may include a subset of a predetermined proportion in the first subset, or include a subset of a predetermined proportion in the first subset and a subset of a predetermined proportion in the second subset. In a possible implementation manner, the second data The second data may also include a predetermined proportion of the second subset. The ratio can be pre-agreed by the second user and the first user. The spot check request may be posted to the above-mentioned database.
  • the first user divides the data into a subset of 300 items (for example, the first subset and the second subset total 300 items, or the first subset is 300 items, or the second subset is 300 items), of which there are 30 items (10%) is false data, if the second user selects 10% of the data (that is, a subset of 30 items, for example, the first subset and the second subset total 30 items, or the first subset has 30 items, or the second subset Subset 30 items) are checked, and the probability that the data provided by the first user is falsified without being discovered is only about 3%.
  • the sampling request includes at least one data location, which can be used to indicate the location of the first subset included in the second data in the first data, and/or, the first subset included in the second data The position of the second subset in the first subset.
  • step S201 the arrangement order of the first subset and/or the second subset corresponding to the data in the first data received by the second user may be consistent with the arrangement order of the subsets in the original data.
  • the selected data positions may be (a1, a2...am), which may respectively represent the positions of the m-item subsets in the k-item first subset.
  • the selected data position can be (bi1, bi2...bip), which can respectively represent the p-item subsets in the second subset corresponding to the first subset with the sequence number i in the first subset position (p is less than the total number of subsets included in the second subset).
  • the selected data location and the hash values of the subsets corresponding to the data location may also be published in the above database.
  • the arrangement order of each first subset in the first data can be made, and/or, the arrangement order of the second subset in the first subset can be determined. If the original data is obtained in the subsequent process, it can be Check whether the hash value of the data at the selected data location is consistent with the hash value of the corresponding location received by the second user in step S201, thereby preventing the first user from replacing part or all of the first data before and after sampling, This makes it impossible for the first user to provide false data to deceive the second user during the sampling process.
  • Step S203 receiving the return information sent by the first server in response to the sampling request.
  • the return information sent by the first user may be received by the second user.
  • the returned information may include the third data or a key corresponding to the second data, and details may be referred to in step S204.
  • Step S204 verifying the second data according to the returned information and the hash value of at least one first subset included in the second data.
  • the hash value of at least one first subset included in the second data may be determined according to the hash value of at least one first subset included in the first data.
  • the returned information may include third data, and this step S204 may include:
  • the third data may refer to the data corresponding to the sampling request returned by the first user.
  • the data may be original data
  • the hash value of the second data may be each hash value corresponding to the second data in the first data received by the second user in step S201. Therefore, the second user can calculate the hash value of the third data according to the third data, and judge whether the hash value of the third data is consistent with the hash value of the second data, so as to determine whether the first user provides Data specified in the sampling request.
  • the sampling request may only perform sampling on part of the second subset in the first subset.
  • part of the first subset in the data to be entrusted for transaction and part of the second subset in the corresponding first subset can also be sampled. For example, you can first Sampling inspection is performed on the second subset, and then random inspection is performed on the first subset according to the obtained content of the second subset, so that multi-step inspection can be performed. During this process, when the first subset is randomly checked, it may be verified as a whole whether the hash value of the first subset in the third data is consistent with the hash value received by the second user in step S201.
  • the first data sent by the first user in step S201 may include the encrypted first subset and the encrypted second subset, and the returned information includes the key corresponding to the second data , the step S204 may include:
  • the hash value of the set is used to verify the second data.
  • the key may include at least one key corresponding to the first subset and/or the second subset in the second data, and keys corresponding to different first subsets and second subsets are different.
  • the sampling request may include, for example, the second user chooses to view the data content of the second subset E (Item IJ ), and the return information sent by the first user
  • the key K (Item IJ ) corresponding to the second subset E (Item IJ ) can be included, and the second user can use the key to open the encrypted second subset and view the data content in the second subset Item IJ , namely The fourth data is obtained, so that the second data can be verified according to the fourth data to determine whether to accept the entrustment of the first user.
  • verifying the second data according to the fourth data and the hash value of at least one first subset included in the second data may further include:
  • the number of the first subset included in the first data is greater than a predetermined threshold, it is judged whether the hash value of the fourth data is consistent with the hash value of at least one first subset included in the second data; The second data is verified.
  • part of the first subset in the first data and part of the second subset in the corresponding first subset can also be sampled. For example, you can first Sampling inspection is performed on the second subset, and then random inspection is performed on the first subset according to the obtained content of the second subset, so that multi-step inspection can be performed.
  • a first sampling request and a second sampling request may be included, and the first sampling request may include, for example, that the second user chooses to view the second subset For the data content of E(Item IJ ), the return information sent by the first user can include the encrypted key K(Item IJ ) corresponding to the second subset E(Item IJ ), and the second user can use the key to open the encryption For the second subset, view the data content in the second subset Item IJ , and determine the second sampling request according to the data content in the second subset Item IJ .
  • the second sampling request may include that the second user chooses to view the data content of the first subset E(Doc I ), and the return information sent by the first user may include the encrypted password corresponding to the first subset E(Doc I ) after encryption.
  • key K((Doc I ) the second user can use the key to open the encrypted first subset, check the data content in the first subset Doc I , and obtain the fourth data, so that the hash of the fourth data can be judged whether the hash value of the hash value and the second data are consistent to determine whether the first user provides the data specified in the sampling request.
  • the sampling request Can only carry out spot check to the part second subset in the first subset.Can integrally verify whether the hash value of the first subset in the 4th data is the same as the hash value of the second set in step S201 when the first subset is carried out spot check in this process.
  • the hash value received by the user matches, and a more detailed and purposeful inspection can be carried out during random inspection.
  • Step S205 if the verification is passed, obtain the content of at least one first subset included in the second data, or the content of at least one first subset and at least one second subset included in the second data according to the returned information, to determine whether to accept the entrustment of the first server.
  • a random check may be performed on part of the first subset and part of the second subset, and if the verification is passed, the returned information may be The content of the first subset and the second subset sampled is obtained, and whether to accept the entrustment of the first user is determined according to the content of the data.
  • Sampling may be performed on part of the first subset, and if the verification is passed, the content of the first subset to be sampled may be obtained according to the returned information, and whether to accept the entrustment of the first user may be determined according to the content of the data. For example, it may be determined whether to accept the entrustment of the first user according to whether the data indicated in the returned information is legal and compliant, the economic value of the data, and the like.
  • the data to be entrusted for transaction into at least one first subset, and dividing the first subset into at least one second subset, it can meet the sampling requirements of different data volumes, and the first Subsets, or, the first subset and the second subset are subjected to sampling inspection to realize a more detailed and targeted entrusted transaction sampling inspection process.
  • the first data include at least one hash value of the first subset, while simplifying the sampling process, it can meet the sampling requirements of different data volumes and improve the efficiency of sampling.
  • the second user cannot obtain the original data of the first data.
  • the first user cannot determine the second data that will be sampled, so that the data with better quality cannot be selected in advance as the data to be sampled to deceive the second user.
  • the random inspection of the data can prevent the first user from intentionally falsifying the data in the returned information to cover up the original data, making the random inspection process random, credible, and controllable.
  • the second data may further include at least one second subset, and the method further includes:
  • the content of at least one second subset included in the second data is obtained according to the returned information, so as to determine whether to accept the entrustment of the first user.
  • step S204 when the number of the first subsets included in the first data is less than the predetermined threshold, according to step S204, part of the second subsets can be sampled, and if the verification is passed, the first subset of the samples can be obtained according to the returned information.
  • the content of the second subset determines whether to accept the entrustment of the first user according to the content of the data. For example, it may be determined whether to accept the entrustment of the first user according to whether the data indicated in the returned information is legal and compliant, the economic value of the data, and the like.
  • the data verification process when the amount of data is small can be simplified and the efficiency of data verification can be improved. And in this process, the second user cannot obtain the original data of the first user, making the process random, credible, and controllable.
  • the method further includes:
  • Step S206 publish one or more of the following to the unmodifiable database: the hash value of the first subset included in the first data, the encrypted first subset included in the first data, the first data Included encrypted second subset, sampling request.
  • the above-mentioned content may be published by the second user in the non-modifiable database, or may be published by the first user, which is not limited in this application.
  • the database can also be a blockchain-based database.
  • the information published in the database can be used to trace the source of the relevant process, so that a traceable data verification process can be realized.
  • FIG. 3 it shows a flowchart of a data verification method according to an embodiment of the present application.
  • the method can be applied to a first server, and the first server can be applied to the above-mentioned first user, for example, the first user can implement the method in this embodiment through a terminal device.
  • the method includes:
  • Step S301 sending first data to a second server.
  • the first data may include hash values of at least one first subset, and the first subset may include at least one second subset.
  • the first data may be the data that the first user intends to entrust for the transaction.
  • the data that the first user wants to entrust to conduct transactions (may be called D) can be split into k subsets (that is, the first subset), and any first subset after splitting D can be called Doc i , i may represent the sequence number of the corresponding first subset, then the data set corresponding to D after splitting may include the first subsets Doc 1 , Doc 2 , Doc 3 . . . Dock .
  • the present application does not limit the number k of the split first subsets.
  • any second subset obtained after splitting the first subset of each item may be called Item ij , where i may represent the sequence number of the first subset corresponding to the second subset , j can represent the sequence number of the second subset, after splitting, Doc 1 can include, for example, the second subset Item 11 , Item 12 ...Item 1n1 , and Doc 2 can include, for example, the second subset Item 21 , Item 22 ... Item 2n2 , Dock k may include, for example, second subsets Item k1 , Item k2 . . . Item knk , wherein n1, n2 .
  • each item of the second subset may represent a minimum unit of the corresponding data D, that is, the second subset cannot be further divided.
  • Each first subset in the data D to be entrusted for transaction may be compressed with a hash function to obtain each hash value corresponding to each first subset.
  • H( Dock ) may represent the hash value of the first subset Dock . It is also possible to compress the complete data D to be entrusted for transactions using a hash function to obtain H(D), and the second user may also receive the hash value H(D) of the data to be entrusted for transactions sent by the first user.
  • each first subset and each second subset in D may also be encrypted respectively to obtain a corresponding encrypted data set.
  • E( Dock ) may represent the encrypted first subset Dock
  • E(Item ij ) may represent the encrypted second subset Item ij .
  • the method for encrypting each subset in the data D may be that the first user creates a master key MK, and uses MK to respectively determine the key corresponding to each subset.
  • the encryption method is introduced by taking the encryption of the first subset as an example:
  • the first user can first determine (can be randomly generated) a key K(Doc 1 ) corresponding to the first subset Doc 1 , then K(Doc i+1 ) can be the pair K(Doc i ) It is determined after encryption, so that the keys corresponding to all the first subsets can be determined.
  • the first user may first determine the hash value H(Doc i ) corresponding to each first subset, and then the key K(Doc i ) corresponding to the first subset Doc i may use the master key MK to correspond to H(Doc i ) is determined after being encrypted, so that the keys corresponding to all the first subsets can be determined.
  • the above only uses two examples to illustrate the method of using MK to determine the key K(Doc i ) corresponding to the first subset.
  • This application does not limit the method of using MK to determine the key corresponding to the first subset. or other very few keys can determine the keys corresponding to all the first subsets, and even if others know the keys corresponding to the first subset with any number of items, they cannot infer the keys corresponding to other first subsets That's it.
  • the manner of encrypting the second subset is the same.
  • Step S302 receiving a sampling request for the second data sent by the second server.
  • the second data may include at least one first subset, or, the second data may include at least one first subset and at least one second subset.
  • the second data may include at least one first subset set and at least one second subset, that is to say, the first subset and the second subset can be sampled separately.
  • the sampling request may further include a first sampling request and a second sampling request.
  • the second data corresponding to the first sampling request may include at least one second subset
  • the second data corresponding to the second sampling request may include at least one first subset.
  • the second user may first send a first sampling request to the first user, and the second user may determine the first subset included in the second data corresponding to the second sampling request according to the information returned by the first user.
  • the importance of each first subset corresponding to the second subset can be evaluated, and a predetermined number of first subsets can be selected according to the importance of each first subset.
  • the subset is used as the content included in the second data in the second sampling request, and then the second sampling request is sent to the first user. As a result, more detailed and purposeful sampling of data can be achieved.
  • first send the second sampling request to the first user determine the first sampling request according to the information returned by the first user, and then send the first sampling request to the first user, which is not limited in this application.
  • the second data may further include only the first subset, that is, the second user may only conduct random inspection on at least one first subset.
  • the second data may only include the second Subsets, that is, the second user can only perform random checks on at least one second subset in the first subset.
  • the second data may include a subset of a predetermined proportion in the first subset, or include a subset of a predetermined proportion in the first subset and a subset of a predetermined proportion in the second subset. In a possible implementation manner, the second data The second data may also include a predetermined proportion of the second subset. The ratio can be pre-agreed by the second user and the first user. The spot check request may be posted to the above-mentioned database.
  • the first user divides the data into a subset of 300 items (for example, the first subset and the second subset total 300 items, or the first subset is 300 items, or the second subset is 300 items), of which there are 30 items (10%) is false data, if the second user selects 10% of the data (that is, a subset of 30 items, for example, the first subset and the second subset total 30 items, or the first subset has 30 items, or the second subset Subset 30 items) are checked, and the probability that the data provided by the first user is falsified without being discovered is only about 3%.
  • the sampling request includes at least one data location, which can be used to indicate the location of the first subset included in the second data in the first data, and/or, the first subset included in the second data The position of the second subset in the first subset.
  • step S301 the arrangement order of the first subset and/or the second subset corresponding to the data in the first data sent by the first user may be consistent with the arrangement order of the subsets in the original data.
  • the selected data positions may be (a1, a2...am), which may respectively represent the positions of the m-item subsets in the k-item first subset.
  • the selected data position can be (bi1, bi2...bip), which can respectively represent the p-item subsets in the second subset corresponding to the first subset with the sequence number i in the first subset position (p is less than the total number of subsets included in the second subset).
  • the selected data location and the hash values of the subsets corresponding to the data location may also be published in the above database.
  • the arrangement order of each first subset in the first data can be made, and/or, the arrangement order of the second subset in the first subset can be determined. If the original data is obtained in the subsequent process, it can be Check whether the hash value of the data at the selected data location is consistent with the hash value of the corresponding location sent by the first user in step S301, thereby preventing the first user from replacing some or all of the data in the first data before and after sampling, This makes it impossible for the first user to provide false data to deceive the second user during the sampling process.
  • Step S303 sending return information to the second server in response to the sampling request.
  • the returned information is used by the second server to verify the second data according to the returned information and the hash value of at least one first subset included in the second data, and the hash value of at least one first subset included in the second data
  • the hash value can be determined according to the hash value of at least one first subset included in the first data. If the verification is passed, the returned information can be used by the second server to obtain at least one first subset included in the second data according to the returned information.
  • the content of the set, or the content of at least one first subset and at least one second subset included in the second data to determine whether to accept the entrustment of the first user.
  • the returned information may include third data, and this step S303 may include:
  • the second server determines whether the hash value of the third data is consistent with the hash value of at least one first subset included in the second data when the number of first subsets included in the first data is greater than a predetermined threshold; The second server verifies the second data according to the judgment result.
  • the third data may refer to the data corresponding to the sampling request returned by the first user.
  • the data may be original data
  • the hash value of the second data may be each hash value corresponding to the second data in the first data sent by the first user in step S301. Therefore, the second user can calculate the hash value of the third data according to the third data, and judge whether the hash value of the third data is consistent with the hash value of the second data, so as to determine whether the first user provides Data specified in the sampling request.
  • the sampling request may only perform sampling on part of the second subset in the first subset.
  • part of the first subset in the data to be entrusted for transaction and part of the second subset in the corresponding first subset can also be sampled. For example, you can first Sampling inspection is performed on the second subset, and then random inspection is performed on the first subset according to the obtained content of the second subset, so that multi-step inspection can be performed. During this process, when the first subset is randomly checked, it may be verified whether the hash value of the first subset in the third data is consistent with the hash value sent by the first user in step S301.
  • the first data sent by the first user in step S301 may include the encrypted first subset and the encrypted second subset, and the returned information includes the key corresponding to the second data , the step S303 may include:
  • the second server decrypts the encrypted second data in the encrypted first subset and the encrypted second subset to obtain the fourth data; the second server decrypts the encrypted second data according to the fourth data and the second The data includes at least a hash value of the first subset, and the second data is verified.
  • the key may include at least one key corresponding to the first subset and/or the second subset in the second data, and keys corresponding to different first subsets and second subsets are different.
  • the sampling request may include, for example, the second user chooses to view the data content of the second subset E (Item IJ ), and the return information sent by the first user
  • the key K (Item IJ ) corresponding to the second subset E (Item IJ ) can be included, and the second user can use the key to open the encrypted second subset and view the data content in the second subset Item IJ , namely The fourth data is obtained, so that the second data can be verified according to the fourth data to determine whether to accept the entrustment of the first user.
  • the second server verifies the second data according to the fourth data and the hash value of at least one first subset included in the second data, including:
  • the second server determines whether the hash value of the fourth data is consistent with the hash value of at least one first subset included in the second data; The second server verifies the second data according to the judgment result.
  • part of the first subset in the first data and part of the second subset in the corresponding first subset can also be sampled. For example, you can first Sampling inspection is performed on the second subset, and then random inspection is performed on the first subset according to the obtained content of the second subset, so that multi-step inspection can be performed.
  • a first sampling request and a second sampling request may be included, and the first sampling request may include, for example, that the second user chooses to view the second subset For the data content of E(Item IJ ), the return information sent by the first user can include the encrypted key K(Item IJ ) corresponding to the second subset E(Item IJ ), and the second user can use the key to open the encryption For the second subset, view the data content in the second subset Item IJ , and determine the second sampling request according to the data content in the second subset Item IJ .
  • the second sampling request may include that the second user chooses to view the data content of the first subset E(Doc I ), and the return information sent by the first user may include the encrypted password corresponding to the first subset E(Doc I ) after encryption.
  • key K((Doc I ) the second user can use the key to open the encrypted first subset, view the data content in the first subset Doc I , and obtain the fourth data, so that the hash of the fourth data can be judged whether the hash value of the hash value and the second data are consistent to determine whether the first user provides the data specified in the sampling request.
  • the sampling request Can only carry out spot check to the part second subset in the first subset.Can integrally verify whether the hash value of the first subset in the fourth data is the same as that of the first subset in step S301 when the first subset is spot checked in this process.
  • the hash value sent by the user matches, and a more detailed and purposeful inspection can be carried out during random inspection.
  • the second user can perform spot check on part of the first subset and part of the second subset, and if the verification is passed, it can be obtained according to the returned information
  • the contents of the first subset and the second subset are sampled, and it is determined whether to accept the entrustment of the first user according to the contents of the data. Part of the first subset can be randomly checked. If the verification is passed, the content of the first subset can be obtained according to the returned information, and whether to accept the entrustment of the first user can be determined according to the content of the data. For example, it may be determined whether to accept the entrustment of the first user according to whether the data indicated in the returned information is legal and compliant, the economic value of the data, and the like.
  • the data to be entrusted for transaction into at least one first subset, and dividing the first subset into at least one second subset, it can meet the sampling requirements of different data volumes, and the first Subsets, or, the first subset and the second subset are subjected to sampling inspection to realize a more detailed and targeted entrusted transaction sampling inspection process.
  • the first data include at least one hash value of the first subset, while simplifying the sampling process, it can meet the sampling requirements of different data volumes and improve the efficiency of sampling.
  • the second user cannot obtain the original data of the first data.
  • the first user cannot determine the second data that will be sampled, so that the data with better quality cannot be selected in advance as the data to be sampled to deceive the second user.
  • the random inspection of the data can prevent the first user from intentionally falsifying the data in the returned information to cover up the original data, making the random inspection process random, credible, and controllable.
  • the second data may further include at least one second subset
  • the returned information is also used by the second server to obtain the content of the at least one second subset included in the second data according to the returned information, so as to Determine whether to accept the entrustment of the first user.
  • the second user can perform random inspection on some of the second subsets, and if the verification is passed, the second user can obtain the second subset of the random inspection according to the returned information.
  • Content of the subset determine whether to accept the entrustment of the first user according to the content of the data. For example, it may be determined whether to accept the entrustment of the first user according to whether the data indicated in the returned information is legal and compliant, the economic value of the data, and the like.
  • the second user when the amount of data that the first user intends to entrust for a transaction is small, the second user conducts random inspection on the second subset, which can simplify the data verification process when the amount of data is small, and improve data verification. s efficiency. And in this process, the second user cannot obtain the original data of the first user, making the process random, credible, and controllable.
  • Fig. 4 shows a structural diagram of a data verification device according to an embodiment of the present application.
  • the apparatus can be used for a second server, and the second server can be applied to the above-mentioned second user, for example, the second user can realize the apparatus of this embodiment through a terminal device or a server.
  • the device includes:
  • the first receiving module 401 is configured to receive the first data sent by the first server, the first data includes a hash value of at least one first subset, the first subset includes at least one second subset, and the first data is The data to be entrusted by the first server to carry out the transaction;
  • the first sending module 402 is configured to send a sampling request for the second data to the first server, the second data includes at least one first subset, or the second data includes at least one first subset and at least one second Subset;
  • the second receiving module 403 is configured to receive the return information sent by the first server in response to the sampling request;
  • the verification module 404 is configured to verify the second data according to the returned information and the hash value of the at least one first subset included in the second data, and the hash value of the at least one first subset included in the second data is based on the first A hash value determination of at least a first subset of the data;
  • the first determination module 405 is configured to obtain the content of at least one first subset included in the second data, or at least one first subset included in the second data and at least one second subset included in the second data according to the returned information when the verification is passed. Subset content to determine whether to accept the commission from the first server.
  • the data to be entrusted for transaction into at least one first subset, and dividing the first subset into at least one second subset, it can meet the sampling requirements of different data volumes, and the first Subsets, or, the first subset and the second subset are subjected to sampling inspection to realize a more detailed and targeted entrusted transaction sampling inspection process.
  • the first data include at least one hash value of the first subset, while simplifying the sampling process, it can meet the sampling requirements of different data volumes and improve the efficiency of sampling.
  • the second server cannot obtain the original data of the first data.
  • the first server cannot determine the second data that will be sampled, so it cannot select data with better quality in advance as the data to be sampled to deceive the second server.
  • Sending the first data first, and then performing random inspection can prevent the first server from intentionally falsifying data in the returned information to cover up the original data, making the sampling inspection process random, credible, and controllable.
  • the second data when the number of first subsets included in the first data is greater than a predetermined threshold, the second data includes at least one first subset and at least one second subset.
  • the first server in the case of a large amount of data, it is possible to prevent the first server from concealing data content or providing incomplete data, resulting in missed detection and false detection, and to achieve more detailed and targeted sampling inspection process.
  • the returned information includes third data
  • the verification module 404 is configured to:
  • the second data is verified according to the judgment result.
  • the entrusting party cannot obtain the original data of the data that has not been sampled in the first data, which can prevent the original data of the first data from being leaked.
  • the first data includes an encrypted first subset and an encrypted second subset
  • the returned information includes a key corresponding to the second data
  • the verification module 404 is configured to:
  • the second data is verified according to the fourth data and the hash value of the at least one first subset included in the second data.
  • the fourth data is obtained, and the fourth data is judged Whether the hash value of the hash value is consistent with the hash value of the second data can determine whether the first server has provided the data specified in the sampling request, preventing the first server from providing false data.
  • verifying the second data according to the fourth data and a hash value of at least one first subset included in the second data includes:
  • the second data is verified according to the judgment result.
  • the key includes at least one key corresponding to the first subset and/or the second subset in the second data, and different keys corresponding to the first subset and the second subset The keys are different.
  • the sampling request includes at least one data location
  • the data location is used to indicate the location of the first subset included in the second data in the first data, and/or, the first subset included in the second data The position of the second subset in the first subset.
  • the arrangement order of each first subset in the first data can be determined, and/or the arrangement order of the second subset in the first subset can be determined. If the original data is obtained during the subsequent transaction, it can be checked whether the hash value of the data at the selected data position is consistent with the hash value of the corresponding position in the first data initially provided by the first server, so as to prevent the first server from Part or all of the data in the first data is replaced before and after the random inspection, so that the first server cannot provide false data during the commissioning process to cope with the random inspection.
  • the second data includes at least one second subset
  • the device further includes:
  • the second determining module is configured to obtain the content of at least one second subset included in the second data according to the returned information, so as to determine whether to accept the commission from the first server.
  • the second server when the amount of data that the first server intends to entrust with the transaction is small, the second server performs sampling inspection on the second subset, which can simplify the data verification process when the amount of data is small, and improve Data Validation Efficiency. And in this process, the second server cannot obtain the original data of the first server, making the process random, credible, and controllable.
  • the device also includes:
  • a publishing module configured to publish one or more of the following into the non-modifiable database: the hash value of the first subset included in the first data, the encrypted first subset included in the first data, the first subset included in the first data, the A data includes the encrypted second subset, a sampling request.
  • the information published in the database can be used to trace the source of the relevant process, so that a traceable data verification process can be realized.
  • Fig. 5 shows a structural diagram of a data verification device according to an embodiment of the present application.
  • the apparatus can be used for a first server, and the first server is applied to the above-mentioned first user, for example, the first user can realize the apparatus of this embodiment through a terminal device.
  • the device includes:
  • the second sending module 501 is configured to send the first data to the second server, the first data includes a hash value of at least one first subset, the first subset includes at least one second subset, and the first data is the hash value of the first subset 1.
  • the third receiving module 502 is configured to receive a sampling request for the second data sent by the second server, the second data includes at least one first subset, or the second data includes at least one first subset and at least one first subset two subsets;
  • the third sending module 503 is configured to send return information to the second server in response to the sampling request, and the return information is used for the hash value of at least one first subset included by the second server according to the return information and the second data, Verifying the second data, the hash value of at least one first subset included in the second data is determined according to the hash value of at least one first subset included in the first data, and if the verification is passed, return the information with The second server obtains the content of at least one first subset included in the second data according to the returned information, or the content of at least one first subset and at least one second subset included in the second data, so as to determine whether to accept the first subset A server-side delegation.
  • the data to be entrusted for transaction into at least one first subset, and dividing the first subset into at least one second subset, it can meet the sampling requirements of different data volumes, and the first Subsets, or, the first subset and the second subset are subjected to sampling inspection to realize a more detailed and targeted entrusted transaction sampling inspection process.
  • the first data include at least one hash value of the first subset, while simplifying the sampling process, it can meet the sampling requirements of different data volumes and improve the efficiency of sampling.
  • the second server cannot obtain the original data of the first data.
  • the first server cannot determine the second data that will be sampled, so it cannot select data with better quality in advance as the data to be sampled to deceive the second server.
  • Sending the first data first, and then performing random inspection can prevent the first server from intentionally falsifying data in the returned information to cover up the original data, making the sampling inspection process random, credible, and controllable.
  • the second data when the number of first subsets included in the first data is greater than a predetermined threshold, the second data includes at least one first subset and at least one second subset.
  • the first server in the case of a large amount of data, it is possible to prevent the first server from concealing data content or providing incomplete data, resulting in missed detection and false detection, and to achieve more detailed and targeted sampling inspection process.
  • the returned information includes third data
  • the second server verifies the second data according to the returned information and the hash value of at least one first subset included in the second data, including:
  • the second server determines whether the hash value of the third data is consistent with the hash value of at least one first subset included in the second data when the number of first subsets included in the first data is greater than a predetermined threshold;
  • the second server verifies the second data according to the judgment result.
  • the entrusting party cannot obtain the original data of the data that has not been sampled in the first data, which can prevent the original data of the first data from being leaked.
  • the first data includes an encrypted first subset and an encrypted second subset
  • the returned information includes a key corresponding to the second data
  • the second server uses the returned information and the encrypted second
  • the second data includes at least one hash value of the first subset, and the second data is verified, including:
  • the second server decrypts the encrypted second data in the encrypted first subset and the encrypted second subset according to the key to obtain fourth data;
  • the second server verifies the second data according to the fourth data and the hash value of at least one first subset included in the second data.
  • the fourth data is obtained, and the fourth data is judged Whether the hash value of the hash value is consistent with the hash value of the second data can determine whether the first server has provided the data specified in the sampling request, preventing the first server from providing false data.
  • the second server verifies the second data according to the fourth data and the hash value of at least one first subset included in the second data, including:
  • the second server judges whether the hash value of the fourth data is consistent with the hash value of at least one first subset included in the second data when the number of the first subset included in the first data is greater than a predetermined threshold;
  • the second server verifies the second data according to the judgment result.
  • the key includes at least one key corresponding to the first subset and/or the second subset in the second data, and different keys corresponding to the first subset and the second subset The keys are different.
  • the sampling request includes at least one data location
  • the data location is used to indicate the location of the first subset included in the second data in the first data, and/or, the first subset included in the second data The position of the second subset in the first subset.
  • the arrangement order of each first subset in the first data can be determined, and/or the arrangement order of the second subset in the first subset can be determined. If the original data is obtained during the subsequent transaction, it can be checked whether the hash value of the data at the selected data position is consistent with the hash value of the corresponding position in the first data initially provided by the first server, so as to prevent the first server from Part or all of the data in the first data is replaced before and after the random inspection, so that the first server cannot provide false data during the commissioning process to cope with the random inspection.
  • the second data includes at least one second subset
  • the returned information is also used by the second server to obtain the content of the at least one second subset included in the second data according to the returned information, so as to determine whether Accept the entrustment of the first server.
  • the second server when the amount of data that the first server intends to entrust with the transaction is small, the second server performs sampling inspection on the second subset, which can simplify the data verification process when the amount of data is small, and improve Data Validation Efficiency. And in this process, the second server cannot obtain the original data of the first server, making the process random, credible, and controllable.
  • the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the methods described in the method embodiments above, and its specific implementation can refer to the description of the method embodiments above. For brevity, here No longer.
  • Embodiments of the present disclosure also provide a computer-readable storage medium, on which computer program instructions are stored, and the above-mentioned method is implemented when the computer program instructions are executed by a processor.
  • Computer readable storage media may be volatile or nonvolatile computer readable storage media.
  • An embodiment of the present disclosure also proposes an electronic device, including: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to implement the above method when executing the instructions stored in the memory.
  • An embodiment of the present disclosure also provides a computer program product, including computer-readable codes, or a non-volatile computer-readable storage medium carrying computer-readable codes, when the computer-readable codes are stored in a processor of an electronic device When running in the electronic device, the processor in the electronic device executes the above method.
  • Fig. 6 is a block diagram of an apparatus 1900 for data verification according to an exemplary embodiment.
  • the apparatus 1900 may be provided as a server or a terminal device.
  • apparatus 1900 includes processing component 1922, which further includes one or more processors, and memory resources represented by memory 1932 for storing instructions executable by processing component 1922, such as application programs.
  • the application programs stored in memory 1932 may include one or more modules each corresponding to a set of instructions.
  • the processing component 1922 is configured to execute instructions to perform the above method.
  • Device 1900 may also include a power component 1926 configured to perform power management of device 1900 , a wired or wireless network interface 1950 configured to connect device 1900 to a network, and an input-output (I/O) interface 1958 .
  • the device 1900 can operate based on an operating system stored in the memory 1932, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or the like.
  • a non-transitory computer-readable storage medium such as the memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the apparatus 1900 to implement the above-mentioned method.
  • the present disclosure can be a system, method and/or computer program product.
  • a computer program product may include a computer readable storage medium having computer readable program instructions thereon for causing a processor to implement various aspects of the present disclosure.
  • a computer readable storage medium may be a tangible device that can retain and store instructions for use by an instruction execution device.
  • a computer readable storage medium may be, for example, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
  • Computer-readable storage media include: portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or flash memory), static random access memory (SRAM), compact disc read only memory (CD-ROM), digital versatile disc (DVD), memory stick, floppy disk, mechanically encoded device, such as a printer with instructions stored thereon A hole card or a raised structure in a groove, and any suitable combination of the above.
  • RAM random access memory
  • ROM read-only memory
  • EPROM erasable programmable read-only memory
  • flash memory static random access memory
  • SRAM static random access memory
  • CD-ROM compact disc read only memory
  • DVD digital versatile disc
  • memory stick floppy disk
  • mechanically encoded device such as a printer with instructions stored thereon
  • a hole card or a raised structure in a groove and any suitable combination of the above.
  • computer-readable storage media are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., pulses of light through fiber optic cables), or transmitted electrical signals.
  • Computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or downloaded to an external computer or external storage device over a network, such as the Internet, a local area network, a wide area network, and/or a wireless network.
  • the network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • a network adapter card or a network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
  • Computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or Source or object code written in any combination, including object-oriented programming languages—such as Smalltalk, C++, etc., and conventional procedural programming languages—such as the “C” language or similar programming languages.
  • Computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement.
  • the remote computer can be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as via the Internet using an Internet service provider). connect).
  • LAN local area network
  • WAN wide area network
  • an electronic circuit such as a programmable logic circuit, field programmable gate array (FPGA), or programmable logic array (PLA)
  • FPGA field programmable gate array
  • PDA programmable logic array
  • These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine such that when executed by the processor of the computer or other programmable data processing apparatus , producing an apparatus for realizing the functions/actions specified in one or more blocks in the flowchart and/or block diagram.
  • These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause computers, programmable data processing devices and/or other devices to work in a specific way, so that the computer-readable medium storing instructions includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks in flowcharts and/or block diagrams.
  • each block in a flowchart or block diagram may represent a module, a portion of a program segment, or an instruction that includes one or more Executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented by a dedicated hardware-based system that performs the specified function or action , or may be implemented by a combination of dedicated hardware and computer instructions.

Abstract

The present disclosure relates to a data verification method and apparatus, and a storage medium. The method comprises: a second server receiving first data that is sent by a first server, wherein the first data comprises a hash value of at least one first subset, and the first subset comprises at least one second subset; sending to the first server a random inspection request for second data, wherein the second data comprises at least one first subset, or at least one first subset and at least one second subset; receiving return information that is sent by the first server in response to the random inspection request; and according to the return information and the hash value of the at least one first subset comprised in the second data, verifying the second data, and when the verification is passed, according to the return information, obtaining content comprised in the second data, so as to determine whether to accept the delegation of the first server. Therefore, original data of first data can be prevented from being leaked, and the data verification process is made to be randomized, trustworthy and controllable.

Description

数据验证方法、装置和存储介质Data verification method, device and storage medium 技术领域technical field
本公开涉及数据处理领域,尤其涉及一种数据验证方法、装置和存储介质。The present disclosure relates to the field of data processing, and in particular to a data verification method, device and storage medium.
背景技术Background technique
当前需要进行数据流通和交易的场景越来越多,而数据的所有者往往没有精力直接进行数据交易,因而需要把数据委托给受托方进行交易,受托方因而代替数据所有者进行交易,并参与收益分配。At present, there are more and more scenarios that require data circulation and transactions, and data owners often do not have the energy to conduct data transactions directly, so they need to entrust the data to the entrusted party for transactions, and the entrusted party replaces the data owner to conduct transactions and participate in Income Distribution.
由于数字商品不同于一般的商品,其具有易复制、交易前不可知等的特殊性,当前的技术手段下,并没有委托方和受托方都信任的委托方式,无法杜绝委托方造假数据或受托方对数字商品的转售、滥用等行为,因此亟需可信的、可管控的新型技术手段。Because digital goods are different from ordinary goods, they are easy to copy and unknowable before the transaction. Under the current technical means, there is no entrustment method that both the entrusting party and the entrusting party trust, and it is impossible to prevent the entrusting party from falsifying data or entrusting Therefore, there is an urgent need for credible and controllable new technical means.
发明内容Contents of the invention
有鉴于此,本公开提出了一种数据验证方法、装置和存储介质。In view of this, the present disclosure proposes a data verification method, device and storage medium.
根据本公开的一方面,提供了一种数据验证方法。该方法包括:According to an aspect of the present disclosure, a data verification method is provided. The method includes:
接收第一服务端发送的第一数据,第一数据包括至少一个第一子集的哈希值,第一子集包括至少一个第二子集,第一数据为第一服务端欲委托进行交易的数据;Receive the first data sent by the first server, the first data includes the hash value of at least one first subset, the first subset includes at least one second subset, the first data is the transaction that the first server wants to entrust The data;
向第一服务端发送针对第二数据的抽检请求,第二数据包括至少一个第一子集,或者,第二数据包括至少一个第一子集和至少一个第二子集;sending a sampling request for the second data to the first server, where the second data includes at least one first subset, or the second data includes at least one first subset and at least one second subset;
接收第一服务端响应于抽检请求发送的返回信息;receiving the return information sent by the first server in response to the sampling request;
根据返回信息和第二数据包括的至少一个第一子集的哈希值,对第二数据进行验证,第二数据包括的至少一个第一子集的哈希值根据第一数据包括的至少一个第一子集的哈希值确定;The second data is verified according to the returned information and the hash value of at least one first subset included in the second data, and the hash value of the at least one first subset included in the second data is based on the at least one hash value included in the first data The hash value of the first subset is determined;
在验证通过的情况下,根据返回信息得到第二数据包括的至少一个第一子集的内容,或者第二数据包括的至少一个第一子集和至少一个第二子集的内容,以确定是否接受第一服务端的委托。If the verification is passed, the content of at least one first subset included in the second data, or the contents of at least one first subset and at least one second subset included in the second data are obtained according to the returned information, so as to determine whether Accept the entrustment of the first server.
根据本申请实施例,通过将欲委托进行交易的数据分为至少一个第一子集,并将第一子集分为至少一个第二子集,可以适应不同数据量的抽检需求,对第一子集,或者,第一子集和第二子集进行抽检,实现更详细、更有针对性的委托交易抽检过程。通过使得第一数据包括至少一个第一子集的哈希值,可以实现在简化抽检流程的同时,适应不同数据量的抽检需求,提高抽检的效率。在抽检过程中第二服务端也无法得到第一数据的原始数据。由于是由第二服务端提出抽检请求,第一服务端无法确定会被抽样的第二数据,从而无法提前挑选质量更优数据作为被抽检的数据欺骗第二服务端,由于由第一服务端先发送第一数据,再进行抽检,可以防止第一服务端在返回信息中故意伪造数据从而掩盖原本的数据,使得该抽检过程随机化、可信、可管控。According to the embodiment of the present application, by dividing the data to be entrusted for transaction into at least one first subset, and dividing the first subset into at least one second subset, it can meet the sampling requirements of different data volumes, and the first Subsets, or, the first subset and the second subset are subjected to sampling inspection to realize a more detailed and targeted entrusted transaction sampling inspection process. By making the first data include at least one hash value of the first subset, while simplifying the sampling process, it can meet the sampling requirements of different data volumes and improve the efficiency of sampling. During the sampling process, the second server cannot obtain the original data of the first data. Since the sampling request is made by the second server, the first server cannot determine the second data that will be sampled, so it cannot select data with better quality in advance as the data to be sampled to deceive the second server. Sending the first data first, and then performing random inspection can prevent the first server from intentionally falsifying data in the returned information to cover up the original data, making the sampling inspection process random, credible, and controllable.
在一种可能的实现方式中,在第一数据包括的第一子集的数量大于预定阈值的情况下,第二数据包括至少一个第一子集和至少一个第二子集。In a possible implementation manner, when the number of first subsets included in the first data is greater than a predetermined threshold, the second data includes at least one first subset and at least one second subset.
根据本申请实施例,可以实现在数据量较大的情况下,防止第一服务端隐瞒数据内容或提供不完整的数据时导致的漏检、误检,实现更详细、更有针对性的抽检过程。According to the embodiment of the present application, in the case of a large amount of data, it is possible to prevent the first server from concealing data content or providing incomplete data, resulting in missed detection and false detection, and to achieve more detailed and targeted sampling inspection process.
在一种可能的实现方式中,该返回信息包括第三数据,根据返回信息和第二数据包括的至少一个第一子集的哈希值,对第二数据进行验证,包括:In a possible implementation manner, the returned information includes third data, and the second data is verified according to the returned information and the hash value of at least one first subset included in the second data, including:
在第一数据包括的第一子集的数量大于预定阈值的情况下,判断第三数据的哈希值和第二数据包括的至少一个第一子集的哈希值是否一致;When the number of first subsets included in the first data is greater than a predetermined threshold, judging whether the hash value of the third data is consistent with the hash value of at least one first subset included in the second data;
根据判断结果对第二数据进行验证。The second data is verified according to the judgment result.
根据本申请实施例,通过判断返回信息包括的第三数据的哈希值和第二数据的哈希值是否一致,可以确定第一服务端是否提供了抽检请求中指定的数据,防止第一服务端提供虚假的数据。且上述过程中委托方无法获得第一数据中未被抽检到的数据的原始数据,可以防止第一数据的原始数据被泄露。According to the embodiment of this application, by judging whether the hash value of the third data included in the returned information is consistent with the hash value of the second data, it can be determined whether the first server has provided the data specified in the sampling request, preventing the first server from end provides false data. Moreover, in the above process, the entrusting party cannot obtain the original data of the data that has not been sampled in the first data, which can prevent the original data of the first data from being leaked.
在一种可能的实现方式中,第一数据包括加密后的第一子集和加密后的第二子集,返回信息包括与第二数据对应的密钥,根据返回信息和第二数据包括的至少一个第一子集的哈希值,对第二数据进行验证,包括:In a possible implementation manner, the first data includes an encrypted first subset and an encrypted second subset, and the returned information includes a key corresponding to the second data. At least one hash value of the first subset, for verifying the second data, includes:
根据密钥,对与加密后的第一子集和加密后的第二子集中加密后的第二数据进行解密,得到第四数据;Decrypting the encrypted second data in the encrypted first subset and the encrypted second subset according to the key to obtain fourth data;
根据第四数据和第二数据包括的至少一个第一子集的哈希值,对第二数据进行验证。The second data is verified according to the fourth data and the hash value of the at least one first subset included in the second data.
根据本申请实施例,通过根据返回信息中的密钥,对加密后的第一子集和加密后的第二子集中加密后的第二数据进行解密,得到第四数据,并判断第四数据的哈希值和第二数据的哈希值是否一致,可以确定第一服务端是否提供了抽检请求中指定的数据,防止第一服务端提供虚假的数据。According to the embodiment of the present application, by decrypting the encrypted second data in the encrypted first subset and the encrypted second subset according to the key in the returned information, the fourth data is obtained, and the fourth data is judged Whether the hash value of the hash value is consistent with the hash value of the second data can determine whether the first server has provided the data specified in the sampling request, preventing the first server from providing false data.
在一种可能的实现方式中,根据第四数据和第二数据包括的至少一个第一子集的哈希值,对第二数据进行验证,包括:In a possible implementation manner, verifying the second data according to the fourth data and a hash value of at least one first subset included in the second data includes:
在第一数据包括的第一子集的数量大于预定阈值的情况下,判断第四数据的哈希值和第二数据包括的至少一个第一子集的哈希值是否一致;When the number of first subsets included in the first data is greater than a predetermined threshold, judging whether the hash value of the fourth data is consistent with the hash value of at least one first subset included in the second data;
根据判断结果对第二数据进行验证。The second data is verified according to the judgment result.
由此,可以在欲委托进行交易的数据的数据量较大的情况下,防止仅进行一步检查而导致的漏检、误检的情况,实现对待审计的数据更为详细更有目的性的检查。As a result, when the amount of data to be entrusted for transactions is large, it is possible to prevent missed or false detections caused by only one-step inspection, and to achieve more detailed and purposeful inspection of the data to be audited .
在一种可能的实现方式中,该密钥包括与第二数据中的第一子集和/或第二子集对应的至少一个密钥,不同的第一子集和第二子集对应的密钥不同。In a possible implementation manner, the key includes at least one key corresponding to the first subset and/or the second subset in the second data, and different keys corresponding to the first subset and the second subset The keys are different.
根据本申请实施例,通过使得不同的子集对应的密钥不同,可以实现在抽检的过程中委托方无法获得第一数据中未被抽检到的数据的原始数据,防止第一数据的原始数据被泄露。According to the embodiment of this application, by making the keys corresponding to different subsets different, it can be realized that the entrusting party cannot obtain the original data of the data that has not been sampled in the first data during the random inspection process, preventing the original data of the first data was leaked.
在一种可能的实现方式中,该抽检请求包括至少一个数据位置,数据位置用于指示第二数据包括的第一子集在第一数据中的位置,和/或,第二数据包括的第二子集在第一子集中的位置。In a possible implementation manner, the sampling request includes at least one data location, and the data location is used to indicate the location of the first subset included in the second data in the first data, and/or, the first subset included in the second data The position of the second subset in the first subset.
根据本申请实施例,通过在抽检请求中包括数据位置,可以使得各第一子集在第一数据中的排列顺序,和/或,第二子集在第一子集中的排列顺序确定,在后续交易过程中 若得到了原始数据,可核对选取数据位置的数据的哈希值与第一服务端最初提供的第一数据中、对应位置的哈希值是否一致,从而可以防止第一服务端在抽检前后对第一数据中的部分或全部数据进行替换,使得第一服务端无法在委托过程中提供虚假数据以应对抽检。According to the embodiment of the present application, by including the data position in the sampling request, the arrangement order of each first subset in the first data can be determined, and/or the arrangement order of the second subset in the first subset can be determined. If the original data is obtained during the subsequent transaction, it can be checked whether the hash value of the data at the selected data position is consistent with the hash value of the corresponding position in the first data initially provided by the first server, so as to prevent the first server from Part or all of the data in the first data is replaced before and after the random inspection, so that the first server cannot provide false data during the commissioning process to cope with the random inspection.
在一种可能的实现方式中,第二数据包括至少一个第二子集,该方法还包括:In a possible implementation manner, the second data includes at least one second subset, and the method further includes:
根据返回信息得到第二数据包括的至少一个第二子集的内容,以确定是否接受第一服务端的委托。The content of at least one second subset included in the second data is obtained according to the returned information, so as to determine whether to accept the entrustment of the first server.
根据本申请实施例,通过第二服务端在第一服务端欲委托进行交易的数据量较小的情况下,对第二子集进行抽检,可以简化在数据量较小时的数据验证流程,提高数据验证的效率。且在此过程中可以第二服务端无法得到第一服务端的原始数据,使得该过程随机化、可信、可管控。According to the embodiment of the present application, when the amount of data that the first server intends to entrust with the transaction is small, the second server performs sampling inspection on the second subset, which can simplify the data verification process when the amount of data is small, and improve Data Validation Efficiency. And in this process, the second server cannot obtain the original data of the first server, making the process random, credible, and controllable.
在一种可能的实现方式中,该方法还包括:In a possible implementation, the method further includes:
将以下中的一项或多项公布至不可修改的数据库中:第一数据包括的第一子集的哈希值、第一数据包括的加密后的第一子集、第一数据包括的加密后的第二子集、抽检请求。Publishing to the non-modifiable database one or more of: the hash value of the first subset included in the first data, the encrypted first subset included in the first data, the encrypted After the second subset, sampling requests.
由此,在出现争议时可以利用公布至数据库中的信息对相关过程进行溯源,从而可以实现可溯源的数据验证过程。Therefore, when a dispute arises, the information published in the database can be used to trace the source of the relevant process, so that a traceable data verification process can be realized.
根据本公开的另一方面,提供了一种数据验证方法。该方法包括:According to another aspect of the present disclosure, a data verification method is provided. The method includes:
向第二服务端发送第一数据,第一数据包括至少一个第一子集的哈希值,第一子集包括至少一个第二子集,第一数据为第一服务端欲委托进行交易的数据;Send the first data to the second server, the first data includes the hash value of at least one first subset, the first subset includes at least one second subset, and the first data is the transaction that the first server wants to entrust data;
接收第二服务端发送的针对第二数据的抽检请求,第二数据包括至少一个第一子集,或者,第二数据包括至少一个第一子集和至少一个第二子集;Receive a sampling request for the second data sent by the second server, where the second data includes at least one first subset, or the second data includes at least one first subset and at least one second subset;
响应于抽检请求,向第二服务端发送返回信息,返回信息用于第二服务端根据返回信息和第二数据包括的至少一个第一子集的哈希值,对第二数据进行验证,第二数据包括的至少一个第一子集的哈希值根据第一数据包括的至少一个第一子集的哈希值确定,在验证通过的情况下,返回信息用于第二服务端根据返回信息得到第二数据包括的至少一个第一子集的内容,或者第二数据包括的至少一个第一子集和至少一个第二子集的内容,以确定是否接受第一服务端的委托。In response to the sampling request, send return information to the second server, the return information is used by the second server to verify the second data according to the return information and the hash value of at least one first subset included in the second data, the second The hash value of at least one first subset included in the second data is determined according to the hash value of at least one first subset included in the first data, and if the verification is passed, the returned information is used by the second server according to the returned information Obtain the content of at least one first subset included in the second data, or the contents of at least one first subset and at least one second subset included in the second data, so as to determine whether to accept the entrustment of the first server.
根据本申请实施例,通过将欲委托进行交易的数据分为至少一个第一子集,并将第一子集分为至少一个第二子集,可以适应不同数据量的抽检需求,对第一子集,或者,第一子集和第二子集进行抽检,实现更详细、更有针对性的委托交易抽检过程。通过使得第一数据包括至少一个第一子集的哈希值,可以实现在简化抽检流程的同时,适应不同数据量的抽检需求,提高抽检的效率。在抽检过程中第二服务端也无法得到第一数据的原始数据。由于是由第二服务端提出抽检请求,第一服务端无法确定会被抽样的第二数据,从而无法提前挑选质量更优数据作为被抽检的数据欺骗第二服务端,由于由第一服务端先发送第一数据,再进行抽检,可以防止第一服务端在返回信息中故意伪造数据从而掩盖原本的数据,使得该抽检过程随机化、可信、可管控。According to the embodiment of the present application, by dividing the data to be entrusted for transaction into at least one first subset, and dividing the first subset into at least one second subset, it can meet the sampling requirements of different data volumes, and the first Subsets, or, the first subset and the second subset are subjected to sampling inspection to realize a more detailed and targeted entrusted transaction sampling inspection process. By making the first data include at least one hash value of the first subset, while simplifying the sampling process, it can meet the sampling requirements of different data volumes and improve the efficiency of sampling. During the sampling process, the second server cannot obtain the original data of the first data. Since the sampling request is made by the second server, the first server cannot determine the second data that will be sampled, so it cannot select data with better quality in advance as the data to be sampled to deceive the second server. Sending the first data first, and then performing random inspection can prevent the first server from intentionally falsifying data in the returned information to cover up the original data, making the sampling inspection process random, credible, and controllable.
在一种可能的实现方式中,在第一数据包括的第一子集的数量大于预定阈值的情况 下,第二数据包括至少一个第一子集和至少一个第二子集。In a possible implementation manner, when the number of first subsets included in the first data is greater than a predetermined threshold, the second data includes at least one first subset and at least one second subset.
根据本申请实施例,可以实现在数据量较大的情况下,防止第一服务端隐瞒数据内容或提供不完整的数据时导致的漏检、误检,实现更详细、更有针对性的抽检过程。According to the embodiment of the present application, in the case of a large amount of data, it is possible to prevent the first server from concealing data content or providing incomplete data, resulting in missed detection and false detection, and to achieve more detailed and targeted sampling inspection process.
在一种可能的实现方式中,该返回信息包括第三数据,第二服务端根据返回信息和第二数据包括的至少一个第一子集的哈希值,对第二数据进行验证,包括:In a possible implementation manner, the returned information includes third data, and the second server verifies the second data according to the returned information and the hash value of at least one first subset included in the second data, including:
第二服务端在第一数据包括的第一子集的数量大于预定阈值的情况下,判断第三数据的哈希值和第二数据包括的至少一个第一子集的哈希值是否一致;The second server determines whether the hash value of the third data is consistent with the hash value of at least one first subset included in the second data when the number of first subsets included in the first data is greater than a predetermined threshold;
第二服务端根据判断结果对第二数据进行验证。The second server verifies the second data according to the judgment result.
根据本申请实施例,通过判断返回信息包括的第三数据的哈希值和第二数据的哈希值是否一致,可以确定第一服务端是否提供了抽检请求中指定的数据,防止第一服务端提供虚假的数据。且上述过程中委托方无法获得第一数据中未被抽检到的数据的原始数据,可以防止第一数据的原始数据被泄露。According to the embodiment of this application, by judging whether the hash value of the third data included in the returned information is consistent with the hash value of the second data, it can be determined whether the first server has provided the data specified in the sampling request, preventing the first server from end provides false data. Moreover, in the above process, the entrusting party cannot obtain the original data of the data that has not been sampled in the first data, which can prevent the original data of the first data from being leaked.
在一种可能的实现方式中,第一数据包括加密后的第一子集和加密后的第二子集,返回信息包括与第二数据对应的密钥,第二服务端根据返回信息和第二数据包括的至少一个第一子集的哈希值,对第二数据进行验证,包括:In a possible implementation manner, the first data includes an encrypted first subset and an encrypted second subset, the returned information includes a key corresponding to the second data, and the second server uses the returned information and the encrypted second The second data includes at least one hash value of the first subset, and the second data is verified, including:
第二服务端根据密钥,对与加密后的第一子集和加密后的第二子集中加密后的第二数据进行解密,得到第四数据;The second server decrypts the encrypted second data in the encrypted first subset and the encrypted second subset according to the key to obtain fourth data;
第二服务端根据第四数据和第二数据包括的至少一个第一子集的哈希值,对第二数据进行验证。The second server verifies the second data according to the fourth data and the hash value of at least one first subset included in the second data.
根据本申请实施例,通过根据返回信息中的密钥,对加密后的第一子集和加密后的第二子集中加密后的第二数据进行解密,得到第四数据,并判断第四数据的哈希值和第二数据的哈希值是否一致,可以确定第一服务端是否提供了抽检请求中指定的数据,防止第一服务端提供虚假的数据。According to the embodiment of the present application, by decrypting the encrypted second data in the encrypted first subset and the encrypted second subset according to the key in the returned information, the fourth data is obtained, and the fourth data is judged Whether the hash value of the hash value is consistent with the hash value of the second data can determine whether the first server has provided the data specified in the sampling request, preventing the first server from providing false data.
在一种可能的实现方式中,第二服务端根据第四数据和第二数据包括的至少一个第一子集的哈希值,对第二数据进行验证,包括:In a possible implementation manner, the second server verifies the second data according to the fourth data and the hash value of at least one first subset included in the second data, including:
第二服务端在第一数据包括的第一子集的数量大于预定阈值的情况下,判断第四数据的哈希值和第二数据包括的至少一个第一子集的哈希值是否一致;When the number of first subsets included in the first data is greater than a predetermined threshold, the second server determines whether the hash value of the fourth data is consistent with the hash value of at least one first subset included in the second data;
第二服务端根据判断结果对第二数据进行验证。The second server verifies the second data according to the judgment result.
由此,可以在欲委托进行交易的数据的数据量较大的情况下,防止仅进行一步检查而导致的漏检、误检的情况,实现对待审计的数据更为详细更有目的性的检查。As a result, when the amount of data to be entrusted for transactions is large, it is possible to prevent missed or false detections caused by only one-step inspection, and to achieve more detailed and purposeful inspection of the data to be audited .
在一种可能的实现方式中,该密钥包括与第二数据中的第一子集和/或第二子集对应的至少一个密钥,不同的第一子集和第二子集对应的密钥不同。In a possible implementation manner, the key includes at least one key corresponding to the first subset and/or the second subset in the second data, and different keys corresponding to the first subset and the second subset The keys are different.
根据本申请实施例,通过使得不同的子集对应的密钥不同,可以实现在抽检的过程中委托方无法获得第一数据中未被抽检到的数据的原始数据,防止第一数据的原始数据被泄露。According to the embodiment of this application, by making the keys corresponding to different subsets different, it can be realized that the entrusting party cannot obtain the original data of the data that has not been sampled in the first data during the random inspection process, preventing the original data of the first data was leaked.
在一种可能的实现方式中,该抽检请求包括至少一个数据位置,数据位置用于指示第二数据包括的第一子集在第一数据中的位置,和/或,第二数据包括的第二子集在第一子集中的位置。In a possible implementation manner, the sampling request includes at least one data location, and the data location is used to indicate the location of the first subset included in the second data in the first data, and/or, the first subset included in the second data The position of the second subset in the first subset.
根据本申请实施例,通过在抽检请求中包括数据位置,可以使得各第一子集在第一数据中的排列顺序,和/或,第二子集在第一子集中的排列顺序确定,在后续交易过程中若得到了原始数据,可核对选取数据位置的数据的哈希值与第一服务端最初提供的第一数据中、对应位置的哈希值是否一致,从而可以防止第一服务端在抽检前后对第一数据中的部分或全部数据进行替换,使得第一服务端无法在委托过程中提供虚假数据以应对抽检。According to the embodiment of the present application, by including the data position in the sampling request, the arrangement order of each first subset in the first data can be determined, and/or the arrangement order of the second subset in the first subset can be determined. If the original data is obtained during the subsequent transaction, it can be checked whether the hash value of the data at the selected data position is consistent with the hash value of the corresponding position in the first data initially provided by the first server, so as to prevent the first server from Part or all of the data in the first data is replaced before and after the random inspection, so that the first server cannot provide false data during the commissioning process to cope with the random inspection.
在一种可能的实现方式中,第二数据包括至少一个第二子集,返回信息还用于第二服务端根据返回信息得到第二数据包括的至少一个第二子集的内容,以确定是否接受第一服务端的委托。In a possible implementation manner, the second data includes at least one second subset, and the returned information is also used by the second server to obtain the content of the at least one second subset included in the second data according to the returned information, so as to determine whether Accept the entrustment of the first server.
根据本申请实施例,通过第二服务端在第一服务端欲委托进行交易的数据量较小的情况下,对第二子集进行抽检,可以简化在数据量较小时的数据验证流程,提高数据验证的效率。且在此过程中可以第二服务端无法得到第一服务端的原始数据,使得该过程随机化、可信、可管控。According to the embodiment of the present application, when the amount of data that the first server intends to entrust with the transaction is small, the second server performs sampling inspection on the second subset, which can simplify the data verification process when the amount of data is small, and improve Data Validation Efficiency. And in this process, the second server cannot obtain the original data of the first server, making the process random, credible, and controllable.
根据本公开的一方面,提供了一种数据验证装置。该装置包括:According to an aspect of the present disclosure, a data verification device is provided. The unit includes:
第一接收模块,用于接收第一服务端发送的第一数据,第一数据包括至少一个第一子集的哈希值,第一子集包括至少一个第二子集,第一数据为第一服务端欲委托进行交易的数据;The first receiving module is configured to receive the first data sent by the first server, the first data includes a hash value of at least one first subset, the first subset includes at least one second subset, and the first data is the hash value of the first subset 1. The data that the server wants to entrust to conduct transactions;
第一发送模块,用于向第一服务端发送针对第二数据的抽检请求,第二数据包括至少一个第一子集,或者,第二数据包括至少一个第一子集和至少一个第二子集;The first sending module is configured to send a sampling request for the second data to the first server, the second data includes at least one first subset, or the second data includes at least one first subset and at least one second subset set;
第二接收模块,用于接收第一服务端响应于抽检请求发送的返回信息;The second receiving module is configured to receive the return information sent by the first server in response to the sampling request;
验证模块,用于根据返回信息和第二数据包括的至少一个第一子集的哈希值,对第二数据进行验证第二数据包括的至少一个第一子集的哈希值根据第一数据包括的至少一个第一子集的哈希值确定。A verification module, configured to verify the second data according to the returned information and the hash value of at least one first subset included in the second data. The hash value of the at least one first subset included in the second data is based on the first data A hash value determination of the at least one first subset included.
第一确定模块,用于在验证通过的情况下,根据返回信息得到第二数据包括的至少一个第一子集的内容,或者第二数据包括的至少一个第一子集和至少一个第二子集的内容,以确定是否接受第一服务端的委托。The first determination module is configured to obtain the content of at least one first subset included in the second data, or at least one first subset and at least one second subset included in the second data according to the returned information when the verification is passed. Set content to determine whether to accept the commission from the first server.
在一种可能的实现方式中,在第一数据包括的第一子集的数量大于预定阈值的情况下,第二数据包括至少一个第一子集和至少一个第二子集。In a possible implementation manner, when the number of first subsets included in the first data is greater than a predetermined threshold, the second data includes at least one first subset and at least one second subset.
在一种可能的实现方式中,该返回信息包括第三数据,验证模块,用于:In a possible implementation manner, the returned information includes third data, a verification module, configured to:
在第一数据包括的第一子集的数量大于预定阈值的情况下,判断第三数据的哈希值和第二数据包括的至少一个第一子集的哈希值是否一致;When the number of first subsets included in the first data is greater than a predetermined threshold, judging whether the hash value of the third data is consistent with the hash value of at least one first subset included in the second data;
根据判断结果对第二数据进行验证。The second data is verified according to the judgment result.
在一种可能的实现方式中,第一数据包括加密后的第一子集和加密后的第二子集,返回信息包括与第二数据对应的密钥,验证模块,用于:In a possible implementation manner, the first data includes an encrypted first subset and an encrypted second subset, the returned information includes a key corresponding to the second data, and the verification module is configured to:
根据密钥,对与加密后的第一子集和加密后的第二子集中加密后的第二数据进行解密,得到第四数据;Decrypting the encrypted second data in the encrypted first subset and the encrypted second subset according to the key to obtain fourth data;
根据第四数据和第二数据包括的至少一个第一子集的哈希值,对第二数据进行验证。The second data is verified according to the fourth data and the hash value of the at least one first subset included in the second data.
在一种可能的实现方式中,根据第四数据和第二数据包括的至少一个第一子集的哈 希值,对第二数据进行验证,包括:In a possible implementation manner, verifying the second data according to the fourth data and the hash value of at least one first subset included in the second data includes:
在第一数据包括的第一子集的数量大于预定阈值的情况下,判断第四数据的哈希值和第二数据包括的至少一个第一子集的哈希值是否一致;When the number of first subsets included in the first data is greater than a predetermined threshold, judging whether the hash value of the fourth data is consistent with the hash value of at least one first subset included in the second data;
根据判断结果对第二数据进行验证。The second data is verified according to the judgment result.
在一种可能的实现方式中,该密钥包括与第二数据中的第一子集和/或第二子集对应的至少一个密钥,不同的第一子集和第二子集对应的密钥不同。In a possible implementation manner, the key includes at least one key corresponding to the first subset and/or the second subset in the second data, and different keys corresponding to the first subset and the second subset The keys are different.
在一种可能的实现方式中,该抽检请求包括至少一个数据位置,数据位置用于指示第二数据包括的第一子集在第一数据中的位置,和/或,第二数据包括的第二子集在第一子集中的位置。In a possible implementation manner, the sampling request includes at least one data location, and the data location is used to indicate the location of the first subset included in the second data in the first data, and/or, the first subset included in the second data The position of the second subset in the first subset.
在一种可能的实现方式中,第二数据包括至少一个第二子集,该装置还包括:In a possible implementation manner, the second data includes at least one second subset, and the device further includes:
第二确定模块,用于根据返回信息得到第二数据包括的至少一个第二子集的内容,以确定是否接受第一服务端的委托。The second determining module is configured to obtain the content of at least one second subset included in the second data according to the returned information, so as to determine whether to accept the commission from the first server.
在一种可能的实现方式中,该装置还包括:In a possible implementation manner, the device also includes:
公布模块,用于将以下中的一项或多项公布至不可修改的数据库中:第一数据包括的第一子集的哈希值、第一数据包括的加密后的第一子集、第一数据包括的加密后的第二子集、抽检请求。A publishing module, configured to publish one or more of the following into the non-modifiable database: the hash value of the first subset included in the first data, the encrypted first subset included in the first data, the first subset included in the first data, the A data includes the encrypted second subset, a sampling request.
根据本公开的另一方面,提供了一种数据验证装置。该装置包括:According to another aspect of the present disclosure, a data verification device is provided. The unit includes:
第二发送模块,用于向第二服务端发送第一数据,第一数据包括至少一个第一子集的哈希值,第一子集包括至少一个第二子集,第一数据为第一服务端欲委托进行交易的数据;The second sending module is configured to send the first data to the second server, the first data includes a hash value of at least one first subset, the first subset includes at least one second subset, and the first data is the first The data that the server wants to entrust for transactions;
第三接收模块,用于接收第二服务端发送的针对第二数据的抽检请求,第二数据包括至少一个第一子集,或者,第二数据包括至少一个第一子集和至少一个第二子集;The third receiving module is configured to receive a sampling request for the second data sent by the second server, the second data includes at least one first subset, or the second data includes at least one first subset and at least one second Subset;
发送模块,用于响应于抽检请求,向第二服务端发送返回信息,返回信息用于第二服务端根据返回信息和第二数据包括的至少一个第一子集的哈希值,对第二数据进行验证,第二数据包括的至少一个第一子集的哈希值根据第一数据包括的至少一个第一子集的哈希值确定,在验证通过的情况下,返回信息用于第二服务端根据返回信息得到第二数据包括的至少一个第一子集的内容,或者第二数据包括的至少一个第一子集和至少一个第二子集的内容,以确定是否接受第一服务端的委托。The sending module is configured to send return information to the second server in response to the sampling request, and the return information is used for the second server to send the hash value of at least one first subset included in the return information and the second data to the second server. The data is verified, and the hash value of at least one first subset included in the second data is determined according to the hash value of at least one first subset included in the first data. If the verification is passed, the returned information is used for the second The server obtains the content of at least one first subset included in the second data, or the content of at least one first subset and at least one second subset included in the second data according to the returned information, so as to determine whether to accept the content of the first server. entrust.
在一种可能的实现方式中,在第一数据包括的第一子集的数量大于预定阈值的情况下,第二数据包括至少一个第一子集和至少一个第二子集。In a possible implementation manner, when the number of first subsets included in the first data is greater than a predetermined threshold, the second data includes at least one first subset and at least one second subset.
在一种可能的实现方式中,该返回信息包括第三数据,第二服务端根据返回信息和第二数据包括的至少一个第一子集的哈希值,对第二数据进行验证,包括:In a possible implementation manner, the returned information includes third data, and the second server verifies the second data according to the returned information and the hash value of at least one first subset included in the second data, including:
第二服务端在第一数据包括的第一子集的数量大于预定阈值的情况下,判断第三数据的哈希值和第二数据包括的至少一个第一子集的哈希值是否一致;The second server determines whether the hash value of the third data is consistent with the hash value of at least one first subset included in the second data when the number of first subsets included in the first data is greater than a predetermined threshold;
第二服务端根据判断结果对第二数据进行验证。The second server verifies the second data according to the judgment result.
在一种可能的实现方式中,第一数据包括加密后的第一子集和加密后的第二子集,返回信息包括与第二数据对应的密钥,第二服务端根据返回信息和第二数据包括的至少一个第一子集的哈希值,对第二数据进行验证,包括:In a possible implementation manner, the first data includes an encrypted first subset and an encrypted second subset, the returned information includes a key corresponding to the second data, and the second server uses the returned information and the encrypted second The second data includes at least one hash value of the first subset, and the second data is verified, including:
第二服务端根据密钥,对与加密后的第一子集和加密后的第二子集中加密后的第二数据进行解密,得到第四数据;The second server decrypts the encrypted second data in the encrypted first subset and the encrypted second subset according to the key to obtain fourth data;
第二服务端根据第四数据和第二数据包括的至少一个第一子集的哈希值,对第二数据进行验证。The second server verifies the second data according to the fourth data and the hash value of at least one first subset included in the second data.
在一种可能的实现方式中,第二服务端根据第四数据和第二数据包括的至少一个第一子集的哈希值,对第二数据进行验证,包括:In a possible implementation manner, the second server verifies the second data according to the fourth data and the hash value of at least one first subset included in the second data, including:
第二服务端在第一数据包括的第一子集的数量大于预定阈值的情况下,判断第四数据的哈希值和第二数据包括的至少一个第一子集的哈希值是否一致;When the number of first subsets included in the first data is greater than a predetermined threshold, the second server determines whether the hash value of the fourth data is consistent with the hash value of at least one first subset included in the second data;
第二服务端根据判断结果对第二数据进行验证。The second server verifies the second data according to the judgment result.
在一种可能的实现方式中,该密钥包括与第二数据中的第一子集和/或第二子集对应的至少一个密钥,不同的第一子集和第二子集对应的密钥不同。In a possible implementation manner, the key includes at least one key corresponding to the first subset and/or the second subset in the second data, and different keys corresponding to the first subset and the second subset The keys are different.
在一种可能的实现方式中,该抽检请求包括至少一个数据位置,数据位置用于指示第二数据包括的第一子集在第一数据中的位置,和/或,第二数据包括的第二子集在第一子集中的位置。In a possible implementation manner, the sampling request includes at least one data location, and the data location is used to indicate the location of the first subset included in the second data in the first data, and/or, the first subset included in the second data The position of the second subset in the first subset.
在一种可能的实现方式中,第二数据包括至少一个第二子集,返回信息还用于第二服务端根据返回信息得到第二数据包括的至少一个第二子集的内容,以确定是否接受第一服务端的委托。In a possible implementation manner, the second data includes at least one second subset, and the returned information is also used by the second server to obtain the content of the at least one second subset included in the second data according to the returned information, so as to determine whether Accept the entrustment of the first server.
根据本公开的另一方面,提供了一种数据验证装置,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为在执行所述存储器存储的指令时,实现上述方法。According to another aspect of the present disclosure, there is provided a data verification device, including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions stored in the memory , to implement the above method.
根据本公开的另一方面,提供了一种非易失性计算机可读存储介质,其上存储有计算机程序指令,其中,所述计算机程序指令被处理器执行时实现上述方法。According to another aspect of the present disclosure, there is provided a non-volatile computer-readable storage medium on which computer program instructions are stored, wherein the computer program instructions implement the above method when executed by a processor.
根据本公开的另一方面,提供了一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,当所述计算机可读代码在电子设备的处理器中运行时,所述电子设备中的处理器执行上述方法。According to another aspect of the present disclosure, a computer program product is provided, including computer readable codes, or a non-volatile computer readable storage medium carrying computer readable codes, when the computer readable codes are stored in an electronic device When running in the processor of the electronic device, the processor in the electronic device executes the above method.
根据下面参考附图对示例性实施例的详细说明,本公开的其它特征及方面将变得清楚。Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the accompanying drawings.
附图说明Description of drawings
包含在说明书中并且构成说明书的一部分的附图与说明书一起示出了本公开的示例性实施例、特征和方面,并且用于解释本公开的原理。The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the specification, serve to explain the principles of the disclosure.
图1示出根据本申请一实施例的应用场景的示意图。Fig. 1 shows a schematic diagram of an application scenario according to an embodiment of the present application.
图2示出根据本申请一实施例的数据验证方法的流程图。Fig. 2 shows a flowchart of a data verification method according to an embodiment of the present application.
图3示出根据本申请一实施例的数据验证方法的流程图。Fig. 3 shows a flowchart of a data verification method according to an embodiment of the present application.
图4示出根据本申请一实施例的数据验证装置的结构图。Fig. 4 shows a structural diagram of a data verification device according to an embodiment of the present application.
图5示出根据本申请一实施例的数据验证装置的结构图。Fig. 5 shows a structural diagram of a data verification device according to an embodiment of the present application.
图6是根据一示例性实施例示出的一种用于数据验证的装置1900的框图。Fig. 6 is a block diagram of an apparatus 1900 for data verification according to an exemplary embodiment.
具体实施方式Detailed ways
以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。Various exemplary embodiments, features, and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numbers in the figures indicate functionally identical or similar elements. While various aspects of the embodiments are shown in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration." Any embodiment described herein as "exemplary" is not necessarily to be construed as superior or better than other embodiments.
另外,为了更好的说明本公开,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开的主旨。In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific implementation manners. It will be understood by those skilled in the art that the present disclosure may be practiced without some of the specific details. In some instances, methods, means, components and circuits that are well known to those skilled in the art have not been described in detail so as to obscure the gist of the present disclosure.
当前需要进行数据流通和交易的场景越来越多,而数据的所有者往往没有精力直接进行数据交易,因而需要把数据委托给受托方进行交易,受托方因而代替数据所有者进行交易,并参与收益分配。由于数字商品不同于一般的商品,其具有易复制、交易前不可知等的特殊性,当前的技术手段下,并没有委托方和受托方都信任的委托方式,无法杜绝委托方造假数据或受托方对数字商品的转售、滥用等行为,因此亟需可信的、可管控的新型技术手段。At present, there are more and more scenarios that require data circulation and transactions, and data owners often do not have the energy to conduct data transactions directly, so they need to entrust the data to the entrusted party for transactions, and the entrusted party replaces the data owner to conduct transactions and participate in Income Distribution. Because digital goods are different from ordinary goods, they are easy to copy and unknowable before the transaction. Under the current technical means, there is no entrustment method that both the entrusting party and the entrusting party trust, and it is impossible to prevent the entrusting party from falsifying data or entrusting Therefore, there is an urgent need for credible and controllable new technical means.
鉴于此,本申请提供了一种数据验证方法,在该方法中,第一用户(即数据的拥有方)可以将欲委托进行交易的数据分为至少一个第一子集,其中第一子集可包括至少一个第二子集。适应于不同的数据量,数据的信托方(可以称为第二用户)可以对第一数据中的部分数据(即第二数据)进行抽检,通过接收第一用户响应于抽检请求发送的返回信息,可以利用该返回信息,对第二数据进行验证,以防止第一用户隐瞒数据或提供不完整的数据,从而可以确定是否接受第一用户的委托。在此过程中,第一用户无法伪造数据以通过抽检,第二用户也无法获取第一数据中除第二数据以外的其他数据的原始数据,防止了数据被转售、滥用,使得该过程可信、可管控。In view of this, the present application provides a data verification method, in which the first user (that is, the owner of the data) can divide the data to be entrusted for transaction into at least one first subset, wherein the first subset At least one second subset may be included. Adapting to different data volumes, the trustee of the data (which may be referred to as the second user) can conduct spot checks on some of the first data (that is, the second data), by receiving the return information sent by the first user in response to the spot check request , the returned information can be used to verify the second data, so as to prevent the first user from concealing data or providing incomplete data, so as to determine whether to accept the entrustment of the first user. During this process, the first user cannot forge the data to pass the random inspection, and the second user cannot obtain the original data of the other data in the first data except the second data, which prevents the data from being resold and abused, making this process possible Trustworthy and manageable.
图1示出根据本申请一实施例的应用场景的示意图。如图1所示,本申请实施例提供的数据验证方法可以用在第一用户欲将其拥有的数据委托第二用户进行数据交易的场景中。第一用户可以理解为拥有欲委托进行交易的数据(第一数据的原始数据)的一方,第二用户可以理解为欲对该欲委托进行交易的数据进行验证以确定是否接受委托的一方,第二用户可以是数据信托平台,也可以是其他第三方机构,本申请对此不作限制。本申请对于欲委托进行交易的数据的具体类型也不作限制,例如可以是标注数据集(即带标注的数据的集合,可用于模型训练等场景)、算法模型代码等。Fig. 1 shows a schematic diagram of an application scenario according to an embodiment of the present application. As shown in Figure 1, the data verification method provided by the embodiment of the present application can be used in the scenario where the first user wants to entrust the data owned by the second user to conduct data transactions. The first user can be understood as the party who owns the data to be entrusted for transaction (the original data of the first data), and the second user can be understood as the party who wants to verify the data to be entrusted for transaction to determine whether to accept the entrustment. The second user can be a data trust platform or other third-party organizations, which is not limited in this application. This application does not limit the specific types of data to be entrusted for transactions, for example, it can be labeled data sets (ie, a collection of labeled data, which can be used in scenarios such as model training), algorithm model codes, etc.
在一种可能的实现方式中,还可以存在不可修改的数据库,该数据库可以设置在由第二用户运营的平台上,该平台也可以是由除第一用户、第二用户外的另一第三方运营的。该数据库可用于公布第一用户或第二用户通过平台上传的相关信息。该信息可以包括委托过程中验证数据时的相关信息以及其他相关过程(例如交易)中的信息,该信息也可以是原信息的哈希值。平台可定时对上述上传的信息进行签名,从而保证其内容一经上传不可篡改,且可溯源。在一种可能的实现方式中,该数据库可以是基于区块链的 数据库。In a possible implementation, there may also be an unmodifiable database, which may be set on a platform operated by a second user, or the platform may be operated by another second user other than the first user and the second user. operated by three parties. The database can be used to publish relevant information uploaded by the first user or the second user through the platform. The information may include relevant information when verifying data during the delegation process and information in other related processes (such as transactions), and the information may also be a hash value of the original information. The platform can regularly sign the above-mentioned uploaded information, so as to ensure that its content cannot be tampered with once uploaded, and its source can be traced. In one possible implementation, the database may be a blockchain-based database.
第一用户和第二用户还可以拥有自己的公钥和私钥,第一用户、第二用户的公钥和私钥可经过一合法第三方的认证并获得相应的证书,且第一用户、第二用户的认证后的公钥以及相应的证书信息也可被公布在上述数据库中。其中,第一用户和第二用户的公钥可以分别用于对用私钥签名过的文件进行验证,在进行数据委托交易的过程中,第一用户、第二用户也可以利用各自的私钥对相关操作内容进行签名,以防他人篡改,并使得第一用户、第二用户对自身的操作内容不能抵赖。The first user and the second user can also have their own public key and private key. The public key and private key of the first user and the second user can be authenticated by a legal third party and obtain corresponding certificates, and the first user, The authenticated public key and corresponding certificate information of the second user may also be published in the above-mentioned database. Among them, the public keys of the first user and the second user can be used to verify the files signed with the private key respectively, and in the process of entrusting data transactions, the first user and the second user can also use their respective private keys Sign the relevant operation content to prevent others from tampering, and make it impossible for the first user and the second user to deny their own operation content.
由此,可以保证对欲委托进行交易的数据进行验证的过程、以及进行数据委托交易的过程可信、可溯源。In this way, the process of verifying the data to be entrusted for transactions and the process of entrusting data transactions can be guaranteed to be credible and traceable.
以下,在图1的基础上对本申请实施例的数据验证方法进行详细的介绍,参见图2,图2示出根据本申请一实施例的数据验证方法的流程图。该方法可用于第二服务端,该第二服务端可应用于上述第二用户,例如第二用户可通过终端设备或服务器实现本实施例的方法。如图2所示,该方法包括:Hereinafter, the data verification method of the embodiment of the present application will be described in detail on the basis of FIG. 1 . Referring to FIG. 2 , FIG. 2 shows a flow chart of the data verification method according to an embodiment of the present application. The method can be used in a second server, and the second server can be applied to the above-mentioned second user, for example, the second user can implement the method in this embodiment through a terminal device or a server. As shown in Figure 2, the method includes:
步骤S201,接收第一服务端发送的第一数据。Step S201, receiving first data sent by a first server.
可以由第二用户(即第二服务端)接收第一用户(即第一服务端)发送的第一数据。其中,第一数据可包括至少一个第一子集的哈希值,第一子集包括至少一个第二子集。第一数据可以是第一用户欲委托进行交易的数据。The first data sent by the first user (ie the first server end) may be received by the second user (ie the second server end). Wherein, the first data may include hash values of at least one first subset, and the first subset includes at least one second subset. The first data may be the data that the first user intends to entrust for the transaction.
例如,第一用户欲委托进行交易的数据(可称为D)可以被拆分成k项子集(即第一子集),将D拆分后的任一第一子集可以称为Doc i,i可以表示对应的第一子集的序号,则拆分后D对应的数据集合中可以包括第一子集Doc 1、Doc 2、Doc 3……Doc k。本申请对于拆分后的第一子集的数量k不作限定。 For example, the data that the first user wants to entrust to conduct transactions (may be called D) can be split into k subsets (that is, the first subset), and any first subset after splitting D can be called Doc i , i may represent the sequence number of the corresponding first subset, then the data set corresponding to D after splitting may include the first subsets Doc 1 , Doc 2 , Doc 3 . . . Dock . The present application does not limit the number k of the split first subsets.
还可以对这些第一子集进行进一步分层,以便后续委托方(即第二用户)抽检。在一种可能的实现方式中,将各项第一子集拆分后得到的任一第二子集可以称为Item ij,其中i可表示该第二子集对应的第一子集的序号,j可以表示该第二子集的序号,拆分后Doc 1例如可以包括第二子集Item 11、Item 12……Item 1n1,Doc 2例如可以包括第二子集Item 21、Item 22……Item 2n2,Doc k例如可以包括第二子集Item k1、Item k2……Item knk,其中,n1、n2……nk可以表示对应的第一子集中包括的第二子集的数量。在一种可能的实现方式中,每一项第二子集可以表示对应数据D的最小单位,即该第二子集不可再被拆分。 These first subsets can also be further stratified, so as to be randomly checked by the entrusting party (ie, the second user) subsequently. In a possible implementation manner, any second subset obtained after splitting the first subset of each item may be called Item ij , where i may represent the sequence number of the first subset corresponding to the second subset , j can represent the sequence number of the second subset, after splitting, Doc 1 can include, for example, the second subset Item 11 , Item 12 ...Item 1n1 , and Doc 2 can include, for example, the second subset Item 21 , Item 22 ... Item 2n2 , Dock k may include, for example, second subsets Item k1 , Item k2 . . . Item knk , wherein n1, n2 . In a possible implementation manner, each item of the second subset may represent a minimum unit of the corresponding data D, that is, the second subset cannot be further divided.
可以对欲委托进行交易的数据D中的各第一子集用哈希函数进行压缩,得到各第一子集对应的各哈希值。例如,H(Doc k)可以表示第一子集Doc k的哈希值。还可以对完整的欲委托进行交易的数据D利用哈希函数进行压缩得到H(D),第二用户还可以接收第一用户发送的欲委托进行交易的数据的哈希值H(D)。 Each first subset in the data D to be entrusted for transaction may be compressed with a hash function to obtain each hash value corresponding to each first subset. For example, H( Dock ) may represent the hash value of the first subset Dock . It is also possible to compress the complete data D to be entrusted for transactions using a hash function to obtain H(D), and the second user may also receive the hash value H(D) of the data to be entrusted for transactions sent by the first user.
在一种可能的实现方式中,还可以分别对D中的各第一子集和各第二子集进行加密,得到对应的加密后的数据集合。例如,E(Doc k)可以表示被加密后的第一子集Doc k,E(Item ij)可以表示被加密后的第二子集Item ijIn a possible implementation manner, each first subset and each second subset in D may also be encrypted respectively to obtain a corresponding encrypted data set. For example, E( Dock ) may represent the encrypted first subset Dock , and E(Item ij ) may represent the encrypted second subset Item ij .
其中,对数据D中的各子集进行加密的方法可以是由第一用户创建一个主密钥MK,并利用MK分别确定各子集对应的密钥。以下,以对第一子集进行加密为例介绍进行加密的方式:Wherein, the method for encrypting each subset in the data D may be that the first user creates a master key MK, and uses MK to respectively determine the key corresponding to each subset. In the following, the encryption method is introduced by taking the encryption of the first subset as an example:
例如,第一用户可以首先确定(可以是随机生成)一个对应第一子集Doc 1的密钥K(Doc 1),则K(Doc i+1)可以是利用主密钥MK对K(Doc i)进行加密后确定的,由此可以确定全部第一子集对应的密钥。 For example, the first user can first determine (can be randomly generated) a key K(Doc 1 ) corresponding to the first subset Doc 1 , then K(Doc i+1 ) can be the pair K(Doc i ) It is determined after encryption, so that the keys corresponding to all the first subsets can be determined.
又例如,第一用户可以先确定各第一子集对应的哈希值H(Doc i),则第一子集Doc i对应的密钥K(Doc i)可以是利用主密钥MK对对应的H(Doc i)进行加密后确定的,由此可以确定全部第一子集对应的密钥。 For another example, the first user may first determine the hash value H(Doc i ) corresponding to each first subset, and then the key K(Doc i ) corresponding to the first subset Doc i may use the master key MK to correspond to H(Doc i ) is determined after being encrypted, so that the keys corresponding to all the first subsets can be determined.
上述仅以两个例子对利用MK确定第一子集对应的密钥K(Doc i)的方式进行说明,本申请对于利用MK确定第一子集对应的密钥的方式不作限制,只要根据MK或其他很少量的密钥即可确定全部第一子集对应的密钥,且他人即使知道任意项数第一子集对应的密钥,也无法推理出其他第一子集对应的密钥即可。对第二子集进行加密的方式同理。 The above only uses two examples to illustrate the method of using MK to determine the key K(Doc i ) corresponding to the first subset. This application does not limit the method of using MK to determine the key corresponding to the first subset. or other very few keys can determine the keys corresponding to all the first subsets, and even if others know the keys corresponding to the first subset with any number of items, they cannot infer the keys corresponding to other first subsets That's it. The manner of encrypting the second subset is the same.
由此,可以实现各项子集对应的密钥之间的相对独立性,即第二用户即使后续在抽检过程中得到了抽检部分的子集的密钥,也无法解密除抽检部分之外其他子集的数据,从而可以有效地防止数据泄露。Thus, the relative independence between the keys corresponding to each subset can be achieved, that is, even if the second user obtains the key of the subset of the sampling part in the subsequent sampling process, he cannot decrypt other keys except the sampling part. Subset data, which can effectively prevent data leakage.
步骤S202,向第一服务端发送针对第二数据的抽检请求。Step S202, sending a sampling request for the second data to the first server.
其中,第二数据包括至少一个第一子集,或者,第二数据可以包括至少一个第一子集和至少一个第二子集。Wherein, the second data includes at least one first subset, or, the second data may include at least one first subset and at least one second subset.
在一种可能的实现方式中,在第一数据包括的第一子集的数量大于预定阈值的情况下(即第一数据的数据量较大时),第二数据可以包括至少一个第一子集和至少一个第二子集,也就是说,可以分别对第一子集和第二子集进行抽检。In a possible implementation, when the number of first subsets included in the first data is greater than a predetermined threshold (that is, when the data volume of the first data is large), the second data may include at least one first subset set and at least one second subset, that is to say, the first subset and the second subset can be sampled separately.
在一种可能的实现方式中,在第一数据包括的第一子集的数量大于预定阈值的情况下,抽检请求还可以包括第一抽检请求和第二抽检请求。其中,第一抽检请求对应的第二数据可包括至少一个第二子集,第二抽检请求对应的第二数据可包括至少一个第一子集。第二用户可先向第一用户发送第一抽检请求,第二用户可根据第一用户的返回信息,确定第二抽检请求对应的第二数据包括的第一子集。例如,可以根据第一用户返回的第二子集的内容,评估第二子集对应的各第一子集的重要程度,并根据各第一子集的重要程度,选择其中预定数量的第一子集作为第二抽检请求中第二数据包括的内容,再向第一用户发送第二抽检请求。由此,可以实现对数据更为详细、更有目的性的抽检。In a possible implementation manner, when the number of first subsets included in the first data is greater than a predetermined threshold, the sampling request may further include a first sampling request and a second sampling request. Wherein, the second data corresponding to the first sampling request may include at least one second subset, and the second data corresponding to the second sampling request may include at least one first subset. The second user may first send a first sampling request to the first user, and the second user may determine the first subset included in the second data corresponding to the second sampling request according to the information returned by the first user. For example, according to the content of the second subset returned by the first user, the importance of each first subset corresponding to the second subset can be evaluated, and a predetermined number of first subsets can be selected according to the importance of each first subset. The subset is used as the content included in the second data in the second sampling request, and then the second sampling request is sent to the first user. As a result, more detailed and purposeful sampling of data can be achieved.
需要说明的是,也可以先向第一用户发送第二抽检请求,根据第一用户的返回信息,确定第一抽检请求,再向第一用户发送第一抽检请求,本申请对此不作限制。It should be noted that it is also possible to first send the second sampling request to the first user, determine the first sampling request according to the information returned by the first user, and then send the first sampling request to the first user, which is not limited in this application.
在一种可能的实现方式中,第二数据还可以包括仅包括第一子集,即第二用户可仅对至少一个第一子集进行抽检。In a possible implementation manner, the second data may further include only the first subset, that is, the second user may only conduct random inspection on at least one first subset.
在第一数据包括的第一子集的数量小于预定阈值的情况下,例如第一数据中仅包括一个第一子集或包括较少的第一子集时,第二数据可以仅包括第二子集,即第二用户可仅对第一子集中的至少一个第二子集进行抽检。When the number of first subsets included in the first data is less than a predetermined threshold, for example, only one first subset or fewer first subsets are included in the first data, the second data may only include the second Subsets, that is, the second user can only perform random checks on at least one second subset in the first subset.
第二数据可以包括第一子集中的预定比例子集,或者,包括第一子集中的预定比例的子集和第二子集中的预定比例的子集,在一种可能的实现方式中,第二数据也可以包括第二子集中的预定比例子集。该比例可由第二用户与第一用户预先约定。该抽检请求可以被公布至上述数据库中。The second data may include a subset of a predetermined proportion in the first subset, or include a subset of a predetermined proportion in the first subset and a subset of a predetermined proportion in the second subset. In a possible implementation manner, the second data The second data may also include a predetermined proportion of the second subset. The ratio can be pre-agreed by the second user and the first user. The spot check request may be posted to the above-mentioned database.
需要说明的是,该预定比例越大,第一用户提供的数据造假的可能性就越小。假定第一用户把数据分为300项子集(例如第一子集和第二子集共计300项,或者第一子集为300项,或者第二子集为300项),其中有30项(10%)为造假数据,如果第二用户选择10%的数据(即其中30项子集,例如第一子集和第二子集共计30项,或者第一子集30项,或者第二子集30项)进行检查,第一用户提供的数据造假而不被发现的概率只有大约3%。It should be noted that, the larger the predetermined ratio is, the less likely the data provided by the first user is to be falsified. Assume that the first user divides the data into a subset of 300 items (for example, the first subset and the second subset total 300 items, or the first subset is 300 items, or the second subset is 300 items), of which there are 30 items (10%) is false data, if the second user selects 10% of the data (that is, a subset of 30 items, for example, the first subset and the second subset total 30 items, or the first subset has 30 items, or the second subset Subset 30 items) are checked, and the probability that the data provided by the first user is falsified without being discovered is only about 3%.
在一种可能的实现方式中,该抽检请求包括至少一个数据位置,数据位置可用于指示第二数据包括的第一子集在第一数据中的位置,和/或,第二数据包括的第二子集在第一子集中的位置。In a possible implementation manner, the sampling request includes at least one data location, which can be used to indicate the location of the first subset included in the second data in the first data, and/or, the first subset included in the second data The position of the second subset in the first subset.
在这种情况下,在步骤S201中,第二用户接收的第一数据中数据对应的第一子集和/或第二子集的排列顺序可以与原始数据中子集的排列顺序一致。In this case, in step S201, the arrangement order of the first subset and/or the second subset corresponding to the data in the first data received by the second user may be consistent with the arrangement order of the subsets in the original data.
对于第一子集,选取的数据位置可以是(a1,a2……am),可以分别表示k项第一子集中的m项子集的位置。对于第二子集,选取的数据位置可以是(bi1,bi2……bip),可以分别表示序号为i的第一子集对应的第二子集中的p项子集在该第一子集中的位置(p小于该第二子集中包括的子集的总数)。For the first subset, the selected data positions may be (a1, a2...am), which may respectively represent the positions of the m-item subsets in the k-item first subset. For the second subset, the selected data position can be (bi1, bi2...bip), which can respectively represent the p-item subsets in the second subset corresponding to the first subset with the sequence number i in the first subset position (p is less than the total number of subsets included in the second subset).
在一种可能的实现方式中,第二用户在提出抽样请求时还可以将选取的数据位置和该数据位置对应的各子集的哈希值公布在上述数据库中。In a possible implementation manner, when the second user submits a sampling request, the selected data location and the hash values of the subsets corresponding to the data location may also be published in the above database.
通过选取数据位置,可以使得各第一子集在第一数据中的排列顺序,和/或,第二子集在第一子集中的排列顺序确定,在后续过程中若得到了原始数据,可核对选取数据位置的数据的哈希值与步骤S201中第二用户接收的对应位置的哈希值是否一致,从而可以防止第一用户在抽检前后对第一数据中的部分或全部数据进行替换,使得第一用户无法在抽检过程中提供虚假数据以欺骗第二用户。By selecting the data position, the arrangement order of each first subset in the first data can be made, and/or, the arrangement order of the second subset in the first subset can be determined. If the original data is obtained in the subsequent process, it can be Check whether the hash value of the data at the selected data location is consistent with the hash value of the corresponding location received by the second user in step S201, thereby preventing the first user from replacing part or all of the first data before and after sampling, This makes it impossible for the first user to provide false data to deceive the second user during the sampling process.
步骤S203,接收第一服务端响应于抽检请求发送的返回信息。Step S203, receiving the return information sent by the first server in response to the sampling request.
可以由第二用户接收第一用户发送的返回信息。该返回信息可以包括第三数据或与第二数据对应的密钥,可参见步骤S204中的详细叙述。The return information sent by the first user may be received by the second user. The returned information may include the third data or a key corresponding to the second data, and details may be referred to in step S204.
步骤S204,根据返回信息和第二数据包括的至少一个第一子集的哈希值,对第二数据进行验证。Step S204, verifying the second data according to the returned information and the hash value of at least one first subset included in the second data.
其中,第二数据包括的至少一个第一子集的哈希值可以根据第一数据包括的至少一个第一子集的哈希值确定。在一种可能的实现方式中,该返回信息可包括第三数据,该步骤S204,可包括:Wherein, the hash value of at least one first subset included in the second data may be determined according to the hash value of at least one first subset included in the first data. In a possible implementation manner, the returned information may include third data, and this step S204 may include:
在第一数据包括的第一子集的数量大于预定阈值的情况下,判断第三数据的哈希值和第二数据包括的至少一个第一子集的哈希值是否一致;根据判断结果对第二数据进行验证。When the number of first subsets included in the first data is greater than a predetermined threshold, determine whether the hash value of the third data is consistent with the hash value of at least one first subset included in the second data; The second data is verified.
其中,第三数据可以是指第一用户返回的与抽样请求相对应的数据。该数据可以是原始数据,第二数据的哈希值可以是步骤S201中第二用户接收的第一数据中、与第二数据相对应的各哈希值。从而,第二用户可以根据第三数据计算出该第三数据的哈希值,并判断该第三数据的哈希值和第二数据的哈希值是否一致,以确定第一用户是否提供了抽检请求中指定的数据。在第一数据中第一子集的数量不大于预定阈值的情况下,抽检请求中可以仅对第一子集中的部分第二子集进行抽检。在数据量较大(即第一子集的数 量大于预定阈值)的情况下,若仅抽检第一子集中的部分第二子集,第一用户若提供了不完整的数据或隐瞒了数据内容,可能会被漏检、误检,因此抽检请求中还可以分别对欲委托进行交易的数据中的部分第一子集以及对应第一子集中的部分第二子集进行抽检,例如,可以先对第二子集进行抽检,再根据得到的第二子集的内容,对第一子集进行抽检,从而可以进行多步检查。在此过程中对第一子集进行抽检时可以整体验证第三数据中第一子集的哈希值是否与步骤S201中第二用户接收的哈希值相符。Wherein, the third data may refer to the data corresponding to the sampling request returned by the first user. The data may be original data, and the hash value of the second data may be each hash value corresponding to the second data in the first data received by the second user in step S201. Therefore, the second user can calculate the hash value of the third data according to the third data, and judge whether the hash value of the third data is consistent with the hash value of the second data, so as to determine whether the first user provides Data specified in the sampling request. In the case that the quantity of the first subset in the first data is not greater than the predetermined threshold, the sampling request may only perform sampling on part of the second subset in the first subset. In the case of a large amount of data (that is, the number of the first subset is greater than a predetermined threshold), if only part of the second subset in the first subset is sampled, if the first user provides incomplete data or conceals the data content , may be missed or falsely detected. Therefore, in the sampling request, part of the first subset in the data to be entrusted for transaction and part of the second subset in the corresponding first subset can also be sampled. For example, you can first Sampling inspection is performed on the second subset, and then random inspection is performed on the first subset according to the obtained content of the second subset, so that multi-step inspection can be performed. During this process, when the first subset is randomly checked, it may be verified as a whole whether the hash value of the first subset in the third data is consistent with the hash value received by the second user in step S201.
在一种可能的实现方式中,在步骤S201中第一用户发送的第一数据可以包括加密后的第一子集和加密后的第二子集,返回信息包括与第二数据对应的密钥,该步骤S204,可包括:In a possible implementation, the first data sent by the first user in step S201 may include the encrypted first subset and the encrypted second subset, and the returned information includes the key corresponding to the second data , the step S204 may include:
根据密钥,对与加密后的第一子集和加密后的第二子集中加密后的第二数据进行解密,得到第四数据;根据第四数据和第二数据包括的至少一个第一子集的哈希值,对第二数据进行验证。According to the key, decrypt the encrypted second data in the encrypted first subset and the encrypted second subset to obtain fourth data; according to at least one first subset included in the fourth data and the second data The hash value of the set is used to verify the second data.
其中,该密钥可包括与第二数据中的第一子集和/或第二子集对应的至少一个密钥,不同的第一子集和第二子集对应的密钥不同。Wherein, the key may include at least one key corresponding to the first subset and/or the second subset in the second data, and keys corresponding to different first subsets and second subsets are different.
在第一数据包括的第一子集的数量小于预定阈值的情况下,抽检请求中例如可以包括第二用户选择查看第二子集E(Item IJ)的数据内容,第一用户发送的返回信息可以包括第二子集E(Item IJ)对应的密钥K(Item IJ),第二用户则可以利用密钥打开加密的第二子集,查看第二子集Item IJ里的数据内容,即得到第四数据,从而可以根据第四数据对第二数据进行验证,以确定是否接收第一用户的委托。 In the case that the number of the first subset included in the first data is less than the predetermined threshold, the sampling request may include, for example, the second user chooses to view the data content of the second subset E (Item IJ ), and the return information sent by the first user The key K (Item IJ ) corresponding to the second subset E (Item IJ ) can be included, and the second user can use the key to open the encrypted second subset and view the data content in the second subset Item IJ , namely The fourth data is obtained, so that the second data can be verified according to the fourth data to determine whether to accept the entrustment of the first user.
可选地,根据第四数据和第二数据包括的至少一个第一子集的哈希值,对第二数据进行验证,还可以包括:Optionally, verifying the second data according to the fourth data and the hash value of at least one first subset included in the second data may further include:
在第一数据包括的第一子集的数量大于预定阈值的情况下,判断第四数据的哈希值和第二数据包括的至少一个第一子集的哈希值是否一致;根据判断结果对第二数据进行验证。When the number of the first subset included in the first data is greater than a predetermined threshold, it is judged whether the hash value of the fourth data is consistent with the hash value of at least one first subset included in the second data; The second data is verified.
在数据量较大(即第一子集的数量大于预定阈值)的情况下,第二用户若仅抽检第一子集中的部分第二子集,第一用户若提供了不完整的数据或隐瞒了数据内容,可能会被漏检、误检,因此抽检请求中还可以分别对第一数据中的部分第一子集以及对应第一子集中的部分第二子集进行抽检,例如,可以先对第二子集进行抽检,再根据得到的第二子集的内容,对第一子集进行抽检,从而可以进行多步检查。In the case of a large amount of data (that is, the number of the first subset is greater than a predetermined threshold), if the second user only samples a part of the second subset in the first subset, if the first user provides incomplete data or conceals If the content of the data is not known, it may be missed or falsely detected. Therefore, in the sampling request, part of the first subset in the first data and part of the second subset in the corresponding first subset can also be sampled. For example, you can first Sampling inspection is performed on the second subset, and then random inspection is performed on the first subset according to the obtained content of the second subset, so that multi-step inspection can be performed.
例如,在第一数据包括的第一子集的数量大于预定阈值的情况下,可以包括第一抽检请求和第二抽检请求,第一抽检请求中例如可以包括第二用户选择查看第二子集E(Item IJ)的数据内容,第一用户发送的返回信息可以包括加密后的第二子集E(Item IJ)对应的密钥K(Item IJ),第二用户则可以利用密钥打开加密的第二子集,查看第二子集Item IJ里的数据内容,可以根据第二子集Item IJ里的数据内容确定第二抽检请求。第二抽检请求中例如可以包括第二用户选择查看第一子集E(Doc I)的数据内容,第一用户发送的返回信息可以包括加密后的第一子集E(Doc I)对应的密钥K((Doc I),第二用户则可以利用密钥打开加密的第一子集,查看第一子集Doc I里的数据内容,即得到第四数据,从而可以判断第四数据的哈希值和第二数据的哈希值是否一致,以确定第一用户是否提供了抽检请求中 指定的数据。在第一数据中第一子集的数量不大于预定阈值的情况下,抽检请求中可以仅对第一子集中的部分第二子集进行抽检。在此过程中对第一子集进行抽检时可以整体验证第四数据中第一子集的哈希值是否与步骤S201中第二用户接收的哈希值相符,在进行抽检时可以进行更为详细更有目的性的检查。 For example, when the number of the first subset included in the first data is greater than a predetermined threshold, a first sampling request and a second sampling request may be included, and the first sampling request may include, for example, that the second user chooses to view the second subset For the data content of E(Item IJ ), the return information sent by the first user can include the encrypted key K(Item IJ ) corresponding to the second subset E(Item IJ ), and the second user can use the key to open the encryption For the second subset, view the data content in the second subset Item IJ , and determine the second sampling request according to the data content in the second subset Item IJ . For example, the second sampling request may include that the second user chooses to view the data content of the first subset E(Doc I ), and the return information sent by the first user may include the encrypted password corresponding to the first subset E(Doc I ) after encryption. key K((Doc I ), the second user can use the key to open the encrypted first subset, check the data content in the first subset Doc I , and obtain the fourth data, so that the hash of the fourth data can be judged whether the hash value of the hash value and the second data are consistent to determine whether the first user provides the data specified in the sampling request. In the case that the number of the first subset in the first data is not greater than the predetermined threshold, the sampling request Can only carry out spot check to the part second subset in the first subset.Can integrally verify whether the hash value of the first subset in the 4th data is the same as the hash value of the second set in step S201 when the first subset is carried out spot check in this process. The hash value received by the user matches, and a more detailed and purposeful inspection can be carried out during random inspection.
步骤S205,在验证通过的情况下,根据返回信息得到第二数据包括的至少一个第一子集的内容,或者第二数据包括的至少一个第一子集和至少一个第二子集的内容,以确定是否接受第一服务端的委托。Step S205, if the verification is passed, obtain the content of at least one first subset included in the second data, or the content of at least one first subset and at least one second subset included in the second data according to the returned information, to determine whether to accept the entrustment of the first server.
在第一数据包括的第一子集的数量大于预定阈值的情况下,根据步骤S204,可以对部分第一子集和部分第二子集进行抽检,在验证通过的情况下,可以根据返回信息得到抽检的第一子集和第二子集的内容,根据数据的内容确定是否接受第一用户的委托。可以对部分第一子集进行抽检,在验证通过的情况下,可以根据返回信息得到抽检的第一子集的内容,根据数据的内容确定是否接受第一用户的委托。例如,可以根据返回信息中指示的数据是否合法合规、数据的经济价值大小等,确定是否接收第一用户的委托。When the number of first subsets included in the first data is greater than the predetermined threshold, according to step S204, a random check may be performed on part of the first subset and part of the second subset, and if the verification is passed, the returned information may be The content of the first subset and the second subset sampled is obtained, and whether to accept the entrustment of the first user is determined according to the content of the data. Sampling may be performed on part of the first subset, and if the verification is passed, the content of the first subset to be sampled may be obtained according to the returned information, and whether to accept the entrustment of the first user may be determined according to the content of the data. For example, it may be determined whether to accept the entrustment of the first user according to whether the data indicated in the returned information is legal and compliant, the economic value of the data, and the like.
根据本申请实施例,通过将欲委托进行交易的数据分为至少一个第一子集,并将第一子集分为至少一个第二子集,可以适应不同数据量的抽检需求,对第一子集,或者,第一子集和第二子集进行抽检,实现更详细、更有针对性的委托交易抽检过程。通过使得第一数据包括至少一个第一子集的哈希值,可以实现在简化抽检流程的同时,适应不同数据量的抽检需求,提高抽检的效率。在抽检过程中第二用户也无法得到第一数据的原始数据。由于是由第二用户提出抽检请求,第一用户无法确定会被抽样的第二数据,从而无法提前挑选质量更优数据作为被抽检的数据欺骗第二用户,由于由第一用户先发送第一数据,再进行抽检,可以防止第一用户在返回信息中故意伪造数据从而掩盖原本的数据,使得该抽检过程随机化、可信、可管控。According to the embodiment of the present application, by dividing the data to be entrusted for transaction into at least one first subset, and dividing the first subset into at least one second subset, it can meet the sampling requirements of different data volumes, and the first Subsets, or, the first subset and the second subset are subjected to sampling inspection to realize a more detailed and targeted entrusted transaction sampling inspection process. By making the first data include at least one hash value of the first subset, while simplifying the sampling process, it can meet the sampling requirements of different data volumes and improve the efficiency of sampling. During the sampling process, the second user cannot obtain the original data of the first data. Since the sampling request is made by the second user, the first user cannot determine the second data that will be sampled, so that the data with better quality cannot be selected in advance as the data to be sampled to deceive the second user. The random inspection of the data can prevent the first user from intentionally falsifying the data in the returned information to cover up the original data, making the random inspection process random, credible, and controllable.
在一种可能的实现方式中,第二数据还可以包括至少一个第二子集,该方法还包括:In a possible implementation manner, the second data may further include at least one second subset, and the method further includes:
根据返回信息得到第二数据包括的至少一个第二子集的内容,以确定是否接述第一用户的委托。The content of at least one second subset included in the second data is obtained according to the returned information, so as to determine whether to accept the entrustment of the first user.
其中,在第一数据包括的第一子集的数量小于预定阈值的情况下,根据步骤S204,可以对部分第二子集进行抽检,在验证通过的情况下,可以根据返回信息得到抽检的第二子集的内容,根据数据的内容确定是否接受第一用户的委托。例如,可以根据返回信息中指示的数据是否合法合规、数据的经济价值大小等,确定是否接收第一用户的委托。Wherein, when the number of the first subsets included in the first data is less than the predetermined threshold, according to step S204, part of the second subsets can be sampled, and if the verification is passed, the first subset of the samples can be obtained according to the returned information. The content of the second subset determines whether to accept the entrustment of the first user according to the content of the data. For example, it may be determined whether to accept the entrustment of the first user according to whether the data indicated in the returned information is legal and compliant, the economic value of the data, and the like.
根据本申请实施例,通过在第一用户欲委托进行交易的数据量较小的情况下,对第二子集进行抽检,可以简化在数据量较小时的数据验证流程,提高数据验证的效率。且在此过程中可以第二用户无法得到第一用户的原始数据,使得该过程随机化、可信、可管控。According to the embodiment of the present application, by sampling the second subset when the amount of data that the first user intends to entrust for a transaction is small, the data verification process when the amount of data is small can be simplified and the efficiency of data verification can be improved. And in this process, the second user cannot obtain the original data of the first user, making the process random, credible, and controllable.
在一种可能的实现方式中,该方法还包括:In a possible implementation, the method further includes:
步骤S206,将以下中的一项或多项公布至不可修改的数据库中:第一数据包括的第一子集的哈希值、第一数据包括的加密后的第一子集、第一数据包括的加密后的第二子集、抽检请求。Step S206, publish one or more of the following to the unmodifiable database: the hash value of the first subset included in the first data, the encrypted first subset included in the first data, the first data Included encrypted second subset, sampling request.
其中,可以由第二用户将上述内容公布至不可修改的数据库中,也可以由第一用户 公布,本申请对此不作限制。该数据库也可以是基于区块链的数据库。Wherein, the above-mentioned content may be published by the second user in the non-modifiable database, or may be published by the first user, which is not limited in this application. The database can also be a blockchain-based database.
除上述内容以外,还可以将委托交易过程中的其他数据公布至数据库中,本申请对此也不作限制。In addition to the above content, other data in the entrusted transaction process can also be published in the database, and this application does not limit this.
由此,在出现争议时可以利用公布至数据库中的信息对相关过程进行溯源,从而可以实现可溯源的数据验证过程。Therefore, when a dispute arises, the information published in the database can be used to trace the source of the relevant process, so that a traceable data verification process can be realized.
参见图3,示出根据本申请一实施例的数据验证方法的流程图。该方法可用于第一服务端,该第一服务端可以应用于上述第一用户,例如第一用户可通过终端设备实现该实施例的方法。如图3所示,该方法包括:Referring to FIG. 3 , it shows a flowchart of a data verification method according to an embodiment of the present application. The method can be applied to a first server, and the first server can be applied to the above-mentioned first user, for example, the first user can implement the method in this embodiment through a terminal device. As shown in Figure 3, the method includes:
步骤S301,向第二服务端发送第一数据。Step S301, sending first data to a second server.
其中,第一数据可包括至少一个第一子集的哈希值,第一子集可包括至少一个第二子集。第一数据可以是第一用户欲委托进行交易的数据。Wherein, the first data may include hash values of at least one first subset, and the first subset may include at least one second subset. The first data may be the data that the first user intends to entrust for the transaction.
例如,第一用户欲委托进行交易的数据(可称为D)可以被拆分成k项子集(即第一子集),将D拆分后的任一第一子集可以称为Doc i,i可以表示对应的第一子集的序号,则拆分后D对应的数据集合中可以包括第一子集Doc 1、Doc 2、Doc 3……Doc k。本申请对于拆分后的第一子集的数量k不作限定。 For example, the data that the first user wants to entrust to conduct transactions (may be called D) can be split into k subsets (that is, the first subset), and any first subset after splitting D can be called Doc i , i may represent the sequence number of the corresponding first subset, then the data set corresponding to D after splitting may include the first subsets Doc 1 , Doc 2 , Doc 3 . . . Dock . The present application does not limit the number k of the split first subsets.
还可以对这些第一子集进行进一步分层,以便后续委托方(即第二用户)抽检。在一种可能的实现方式中,将各项第一子集拆分后得到的任一第二子集可以称为Item ij,其中i可表示该第二子集对应的第一子集的序号,j可以表示该第二子集的序号,拆分后Doc 1例如可以包括第二子集Item 11、Item 12……Item 1n1,Doc 2例如可以包括第二子集Item 21、Item 22……Item 2n2,Doc k例如可以包括第二子集Item k1、Item k2……Item knk,其中,n1、n2……nk可以表示对应的第一子集中包括的第二子集的数量。在一种可能的实现方式中,每一项第二子集可以表示对应数据D的最小单位,即该第二子集不可再被拆分。 These first subsets can also be further stratified, so as to be randomly checked by the entrusting party (ie, the second user) subsequently. In a possible implementation manner, any second subset obtained after splitting the first subset of each item may be called Item ij , where i may represent the sequence number of the first subset corresponding to the second subset , j can represent the sequence number of the second subset, after splitting, Doc 1 can include, for example, the second subset Item 11 , Item 12 ...Item 1n1 , and Doc 2 can include, for example, the second subset Item 21 , Item 22 ... Item 2n2 , Dock k may include, for example, second subsets Item k1 , Item k2 . . . Item knk , wherein n1, n2 . In a possible implementation manner, each item of the second subset may represent a minimum unit of the corresponding data D, that is, the second subset cannot be further divided.
可以对欲委托进行交易的数据D中的各第一子集用哈希函数进行压缩,得到各第一子集对应的各哈希值。例如,H(Doc k)可以表示第一子集Doc k的哈希值。还可以对完整的欲委托进行交易的数据D利用哈希函数进行压缩得到H(D),第二用户还可以接收第一用户发送的欲委托进行交易的数据的哈希值H(D)。 Each first subset in the data D to be entrusted for transaction may be compressed with a hash function to obtain each hash value corresponding to each first subset. For example, H( Dock ) may represent the hash value of the first subset Dock . It is also possible to compress the complete data D to be entrusted for transactions using a hash function to obtain H(D), and the second user may also receive the hash value H(D) of the data to be entrusted for transactions sent by the first user.
在一种可能的实现方式中,还可以分别对D中的各第一子集和各第二子集进行加密,得到对应的加密后的数据集合。例如,E(Doc k)可以表示被加密后的第一子集Doc k,E(Item ij)可以表示被加密后的第二子集Item ijIn a possible implementation manner, each first subset and each second subset in D may also be encrypted respectively to obtain a corresponding encrypted data set. For example, E( Dock ) may represent the encrypted first subset Dock , and E(Item ij ) may represent the encrypted second subset Item ij .
其中,对数据D中的各子集进行加密的方法可以是由第一用户创建一个主密钥MK,并利用MK分别确定各子集对应的密钥。以下,以对第一子集进行加密为例介绍进行加密的方式:Wherein, the method for encrypting each subset in the data D may be that the first user creates a master key MK, and uses MK to respectively determine the key corresponding to each subset. In the following, the encryption method is introduced by taking the encryption of the first subset as an example:
例如,第一用户可以首先确定(可以是随机生成)一个对应第一子集Doc 1的密钥K(Doc 1),则K(Doc i+1)可以是利用主密钥MK对K(Doc i)进行加密后确定的,由此可以确定全部第一子集对应的密钥。 For example, the first user can first determine (can be randomly generated) a key K(Doc 1 ) corresponding to the first subset Doc 1 , then K(Doc i+1 ) can be the pair K(Doc i ) It is determined after encryption, so that the keys corresponding to all the first subsets can be determined.
又例如,第一用户可以先确定各第一子集对应的哈希值H(Doc i),则第一子集Doc i对应的密钥K(Doc i)可以是利用主密钥MK对对应的H(Doc i)进行加密后确定的,由此可以确定全部第一子集对应的密钥。 For another example, the first user may first determine the hash value H(Doc i ) corresponding to each first subset, and then the key K(Doc i ) corresponding to the first subset Doc i may use the master key MK to correspond to H(Doc i ) is determined after being encrypted, so that the keys corresponding to all the first subsets can be determined.
上述仅以两个例子对利用MK确定第一子集对应的密钥K(Doc i)的方式进行说明,本申请对于利用MK确定第一子集对应的密钥的方式不作限制,只要根据MK或其他很少量的密钥即可确定全部第一子集对应的密钥,且他人即使知道任意项数第一子集对应的密钥,也无法推理出其他第一子集对应的密钥即可。对第二子集进行加密的方式同理。 The above only uses two examples to illustrate the method of using MK to determine the key K(Doc i ) corresponding to the first subset. This application does not limit the method of using MK to determine the key corresponding to the first subset. or other very few keys can determine the keys corresponding to all the first subsets, and even if others know the keys corresponding to the first subset with any number of items, they cannot infer the keys corresponding to other first subsets That's it. The manner of encrypting the second subset is the same.
由此,可以实现各项子集对应的密钥之间的相对独立性,即第二用户即使后续在抽检过程中得到了抽检部分的子集的密钥,也无法解密除抽检部分之外其他子集的数据,从而可以有效地防止数据泄露。Thus, the relative independence between the keys corresponding to each subset can be achieved, that is, even if the second user obtains the key of the subset of the sampling part in the subsequent sampling process, he cannot decrypt other keys except the sampling part. Subset data, which can effectively prevent data leakage.
步骤S302,接收第二服务端发送的针对第二数据的抽检请求。Step S302, receiving a sampling request for the second data sent by the second server.
其中,第二数据可包括至少一个第一子集,或者,第二数据包括至少一个第一子集和至少一个第二子集。Wherein, the second data may include at least one first subset, or, the second data may include at least one first subset and at least one second subset.
在一种可能的实现方式中,在第一数据包括的第一子集的数量大于预定阈值的情况下(即第一数据的数据量较大时),第二数据可以包括至少一个第一子集和至少一个第二子集,也就是说,可以分别对第一子集和第二子集进行抽检。In a possible implementation, when the number of first subsets included in the first data is greater than a predetermined threshold (that is, when the data volume of the first data is large), the second data may include at least one first subset set and at least one second subset, that is to say, the first subset and the second subset can be sampled separately.
在一种可能的实现方式中,在第一数据包括的第一子集的数量大于预定阈值的情况下,抽检请求还可以包括第一抽检请求和第二抽检请求。其中,第一抽检请求对应的第二数据可包括至少一个第二子集,第二抽检请求对应的第二数据可包括至少一个第一子集。第二用户可先向第一用户发送第一抽检请求,第二用户可根据第一用户的返回信息,确定第二抽检请求对应的第二数据包括的第一子集。例如,可以根据第一用户返回的第二子集的内容,评估第二子集对应的各第一子集的重要程度,并根据各第一子集的重要程度,选择其中预定数量的第一子集作为第二抽检请求中第二数据包括的内容,再向第一用户发送第二抽检请求。由此,可以实现对数据更为详细、更有目的性的抽检。In a possible implementation manner, when the number of first subsets included in the first data is greater than a predetermined threshold, the sampling request may further include a first sampling request and a second sampling request. Wherein, the second data corresponding to the first sampling request may include at least one second subset, and the second data corresponding to the second sampling request may include at least one first subset. The second user may first send a first sampling request to the first user, and the second user may determine the first subset included in the second data corresponding to the second sampling request according to the information returned by the first user. For example, according to the content of the second subset returned by the first user, the importance of each first subset corresponding to the second subset can be evaluated, and a predetermined number of first subsets can be selected according to the importance of each first subset. The subset is used as the content included in the second data in the second sampling request, and then the second sampling request is sent to the first user. As a result, more detailed and purposeful sampling of data can be achieved.
需要说明的是,也可以先向第一用户发送第二抽检请求,根据第一用户的返回信息,确定第一抽检请求,再向第一用户发送第一抽检请求,本申请对此不作限制。It should be noted that it is also possible to first send the second sampling request to the first user, determine the first sampling request according to the information returned by the first user, and then send the first sampling request to the first user, which is not limited in this application.
在一种可能的实现方式中,第二数据还可以包括仅包括第一子集,即第二用户可仅对至少一个第一子集进行抽检。In a possible implementation manner, the second data may further include only the first subset, that is, the second user may only conduct random inspection on at least one first subset.
在第一数据包括的第一子集的数量小于预定阈值的情况下,例如第一数据中仅包括一个第一子集或包括较少的第一子集时,第二数据可以仅包括第二子集,即第二用户可仅对第一子集中的至少一个第二子集进行抽检。When the number of first subsets included in the first data is less than a predetermined threshold, for example, only one first subset or fewer first subsets are included in the first data, the second data may only include the second Subsets, that is, the second user can only perform random checks on at least one second subset in the first subset.
第二数据可以包括第一子集中的预定比例子集,或者,包括第一子集中的预定比例的子集和第二子集中的预定比例的子集,在一种可能的实现方式中,第二数据也可以包括第二子集中的预定比例子集。该比例可由第二用户与第一用户预先约定。该抽检请求可以被公布至上述数据库中。The second data may include a subset of a predetermined proportion in the first subset, or include a subset of a predetermined proportion in the first subset and a subset of a predetermined proportion in the second subset. In a possible implementation manner, the second data The second data may also include a predetermined proportion of the second subset. The ratio can be pre-agreed by the second user and the first user. The spot check request may be posted to the above-mentioned database.
需要说明的是,该预定比例越大,第一用户提供的数据造假的可能性就越小。假定第一用户把数据分为300项子集(例如第一子集和第二子集共计300项,或者第一子集为300项,或者第二子集为300项),其中有30项(10%)为造假数据,如果第二用户选择10%的数据(即其中30项子集,例如第一子集和第二子集共计30项,或者第一子集30项,或者第二子集30项)进行检查,第一用户提供的数据造假而不被发现的概率只有大约3%。It should be noted that, the larger the predetermined ratio is, the less likely the data provided by the first user is to be falsified. Assume that the first user divides the data into a subset of 300 items (for example, the first subset and the second subset total 300 items, or the first subset is 300 items, or the second subset is 300 items), of which there are 30 items (10%) is false data, if the second user selects 10% of the data (that is, a subset of 30 items, for example, the first subset and the second subset total 30 items, or the first subset has 30 items, or the second subset Subset 30 items) are checked, and the probability that the data provided by the first user is falsified without being discovered is only about 3%.
在一种可能的实现方式中,该抽检请求包括至少一个数据位置,数据位置可用于指 示第二数据包括的第一子集在第一数据中的位置,和/或,第二数据包括的第二子集在第一子集中的位置。In a possible implementation manner, the sampling request includes at least one data location, which can be used to indicate the location of the first subset included in the second data in the first data, and/or, the first subset included in the second data The position of the second subset in the first subset.
在这种情况下,在步骤S301中,第一用户发送的第一数据中数据对应的第一子集和/或第二子集的排列顺序可以与原始数据中子集的排列顺序一致。In this case, in step S301, the arrangement order of the first subset and/or the second subset corresponding to the data in the first data sent by the first user may be consistent with the arrangement order of the subsets in the original data.
对于第一子集,选取的数据位置可以是(a1,a2……am),可以分别表示k项第一子集中的m项子集的位置。对于第二子集,选取的数据位置可以是(bi1,bi2……bip),可以分别表示序号为i的第一子集对应的第二子集中的p项子集在该第一子集中的位置(p小于该第二子集中包括的子集的总数)。For the first subset, the selected data positions may be (a1, a2...am), which may respectively represent the positions of the m-item subsets in the k-item first subset. For the second subset, the selected data position can be (bi1, bi2...bip), which can respectively represent the p-item subsets in the second subset corresponding to the first subset with the sequence number i in the first subset position (p is less than the total number of subsets included in the second subset).
在一种可能的实现方式中,第二用户在提出抽样请求时还可以将选取的数据位置和该数据位置对应的各子集的哈希值公布在上述数据库中。In a possible implementation manner, when the second user submits a sampling request, the selected data location and the hash values of the subsets corresponding to the data location may also be published in the above database.
通过选取数据位置,可以使得各第一子集在第一数据中的排列顺序,和/或,第二子集在第一子集中的排列顺序确定,在后续过程中若得到了原始数据,可核对选取数据位置的数据的哈希值与步骤S301中第一用户发送的对应位置的哈希值是否一致,从而可以防止第一用户在抽检前后对第一数据中的部分或全部数据进行替换,使得第一用户无法在抽检过程中提供虚假数据以欺骗第二用户。By selecting the data position, the arrangement order of each first subset in the first data can be made, and/or, the arrangement order of the second subset in the first subset can be determined. If the original data is obtained in the subsequent process, it can be Check whether the hash value of the data at the selected data location is consistent with the hash value of the corresponding location sent by the first user in step S301, thereby preventing the first user from replacing some or all of the data in the first data before and after sampling, This makes it impossible for the first user to provide false data to deceive the second user during the sampling process.
步骤S303,响应于抽检请求,向第二服务端发送返回信息。Step S303, sending return information to the second server in response to the sampling request.
其中,返回信息用于第二服务端根据返回信息和第二数据包括的至少一个第一子集的哈希值,对第二数据进行验证,第二数据包括的至少一个第一子集的哈希值可以根据第一数据包括的至少一个第一子集的哈希值确定,在验证通过的情况下,返回信息可用于第二服务端根据返回信息得到第二数据包括的至少一个第一子集的内容,或者第二数据包括的至少一个第一子集和至少一个第二子集的内容,以确定是否接受第一用户的委托。在一种可能的实现方式中,该返回信息可包括第三数据,该步骤S303,可包括:Wherein, the returned information is used by the second server to verify the second data according to the returned information and the hash value of at least one first subset included in the second data, and the hash value of at least one first subset included in the second data The hash value can be determined according to the hash value of at least one first subset included in the first data. If the verification is passed, the returned information can be used by the second server to obtain at least one first subset included in the second data according to the returned information. The content of the set, or the content of at least one first subset and at least one second subset included in the second data, to determine whether to accept the entrustment of the first user. In a possible implementation manner, the returned information may include third data, and this step S303 may include:
第二服务端在第一数据包括的第一子集的数量大于预定阈值的情况下,判断第三数据的哈希值和第二数据包括的至少一个第一子集的哈希值是否一致;第二服务端根据判断结果对第二数据进行验证。The second server determines whether the hash value of the third data is consistent with the hash value of at least one first subset included in the second data when the number of first subsets included in the first data is greater than a predetermined threshold; The second server verifies the second data according to the judgment result.
其中,第三数据可以是指第一用户返回的与抽样请求相对应的数据。该数据可以是原始数据,第二数据的哈希值可以是步骤S301中第一用户发送的第一数据中、与第二数据相对应的各哈希值。从而,第二用户可以根据第三数据计算出该第三数据的哈希值,并判断该第三数据的哈希值和第二数据的哈希值是否一致,以确定第一用户是否提供了抽检请求中指定的数据。在第一数据中第一子集的数量不大于预定阈值的情况下,抽检请求中可以仅对第一子集中的部分第二子集进行抽检。在数据量较大(即第一子集的数量大于预定阈值)的情况下,若仅抽检第一子集中的部分第二子集,第一用户若提供了不完整的数据或隐瞒了数据内容,可能会被漏检、误检,因此抽检请求中还可以分别对欲委托进行交易的数据中的部分第一子集以及对应第一子集中的部分第二子集进行抽检,例如,可以先对第二子集进行抽检,再根据得到的第二子集的内容,对第一子集进行抽检,从而可以进行多步检查。在此过程中对第一子集进行抽检时可以整体验证第三数据中第一子集的哈希值是否与步骤S301中第一用户发送的哈希值相符。Wherein, the third data may refer to the data corresponding to the sampling request returned by the first user. The data may be original data, and the hash value of the second data may be each hash value corresponding to the second data in the first data sent by the first user in step S301. Therefore, the second user can calculate the hash value of the third data according to the third data, and judge whether the hash value of the third data is consistent with the hash value of the second data, so as to determine whether the first user provides Data specified in the sampling request. In the case that the quantity of the first subset in the first data is not greater than the predetermined threshold, the sampling request may only perform sampling on part of the second subset in the first subset. In the case of a large amount of data (that is, the number of the first subset is greater than a predetermined threshold), if only part of the second subset in the first subset is sampled, if the first user provides incomplete data or conceals the data content , may be missed or falsely detected. Therefore, in the sampling request, part of the first subset in the data to be entrusted for transaction and part of the second subset in the corresponding first subset can also be sampled. For example, you can first Sampling inspection is performed on the second subset, and then random inspection is performed on the first subset according to the obtained content of the second subset, so that multi-step inspection can be performed. During this process, when the first subset is randomly checked, it may be verified whether the hash value of the first subset in the third data is consistent with the hash value sent by the first user in step S301.
在一种可能的实现方式中,在步骤S301中第一用户发送的第一数据可以包括加密后 的第一子集和加密后的第二子集,返回信息包括与第二数据对应的密钥,该步骤S303,可包括:In a possible implementation, the first data sent by the first user in step S301 may include the encrypted first subset and the encrypted second subset, and the returned information includes the key corresponding to the second data , the step S303 may include:
第二服务端根据密钥,对与加密后的第一子集和加密后的第二子集中加密后的第二数据进行解密,得到第四数据;第二服务端根据第四数据和第二数据包括的至少一个第一子集的哈希值,对第二数据进行验证。According to the key, the second server decrypts the encrypted second data in the encrypted first subset and the encrypted second subset to obtain the fourth data; the second server decrypts the encrypted second data according to the fourth data and the second The data includes at least a hash value of the first subset, and the second data is verified.
其中,该密钥可包括与第二数据中的第一子集和/或第二子集对应的至少一个密钥,不同的第一子集和第二子集对应的密钥不同。Wherein, the key may include at least one key corresponding to the first subset and/or the second subset in the second data, and keys corresponding to different first subsets and second subsets are different.
在第一数据包括的第一子集的数量小于预定阈值的情况下,抽检请求中例如可以包括第二用户选择查看第二子集E(Item IJ)的数据内容,第一用户发送的返回信息可以包括第二子集E(Item IJ)对应的密钥K(Item IJ),第二用户则可以利用密钥打开加密的第二子集,查看第二子集Item IJ里的数据内容,即得到第四数据,从而可以根据第四数据对第二数据进行验证,以确定是否接收第一用户的委托。 In the case that the number of the first subset included in the first data is less than the predetermined threshold, the sampling request may include, for example, the second user chooses to view the data content of the second subset E (Item IJ ), and the return information sent by the first user The key K (Item IJ ) corresponding to the second subset E (Item IJ ) can be included, and the second user can use the key to open the encrypted second subset and view the data content in the second subset Item IJ , namely The fourth data is obtained, so that the second data can be verified according to the fourth data to determine whether to accept the entrustment of the first user.
可选地,第二服务端根据第四数据和第二数据包括的至少一个第一子集的哈希值,对第二数据进行验证,包括:Optionally, the second server verifies the second data according to the fourth data and the hash value of at least one first subset included in the second data, including:
第二服务端在第一数据包括的第一子集的数量大于预定阈值的情况下,判断第四数据的哈希值和第二数据包括的至少一个第一子集的哈希值是否一致;第二服务端根据判断结果对第二数据进行验证。When the number of first subsets included in the first data is greater than a predetermined threshold, the second server determines whether the hash value of the fourth data is consistent with the hash value of at least one first subset included in the second data; The second server verifies the second data according to the judgment result.
在数据量较大(即第一子集的数量大于预定阈值)的情况下,第二用户若仅抽检第一子集中的部分第二子集,第一用户若提供了不完整的数据或隐瞒了数据内容,可能会被漏检、误检,因此抽检请求中还可以分别对第一数据中的部分第一子集以及对应第一子集中的部分第二子集进行抽检,例如,可以先对第二子集进行抽检,再根据得到的第二子集的内容,对第一子集进行抽检,从而可以进行多步检查。In the case of a large amount of data (that is, the number of the first subset is greater than a predetermined threshold), if the second user only samples a part of the second subset in the first subset, if the first user provides incomplete data or conceals If the content of the data is not known, it may be missed or falsely detected. Therefore, in the sampling request, part of the first subset in the first data and part of the second subset in the corresponding first subset can also be sampled. For example, you can first Sampling inspection is performed on the second subset, and then random inspection is performed on the first subset according to the obtained content of the second subset, so that multi-step inspection can be performed.
例如,在第一数据包括的第一子集的数量大于预定阈值的情况下,可以包括第一抽检请求和第二抽检请求,第一抽检请求中例如可以包括第二用户选择查看第二子集E(Item IJ)的数据内容,第一用户发送的返回信息可以包括加密后的第二子集E(Item IJ)对应的密钥K(Item IJ),第二用户则可以利用密钥打开加密的第二子集,查看第二子集Item IJ里的数据内容,可以根据第二子集Item IJ里的数据内容确定第二抽检请求。第二抽检请求中例如可以包括第二用户选择查看第一子集E(Doc I)的数据内容,第一用户发送的返回信息可以包括加密后的第一子集E(Doc I)对应的密钥K((Doc I),第二用户则可以利用密钥打开加密的第一子集,查看第一子集Doc I里的数据内容,即得到第四数据,从而可以判断第四数据的哈希值和第二数据的哈希值是否一致,以确定第一用户是否提供了抽检请求中指定的数据。在第一数据中第一子集的数量不大于预定阈值的情况下,抽检请求中可以仅对第一子集中的部分第二子集进行抽检。在此过程中对第一子集进行抽检时可以整体验证第四数据中第一子集的哈希值是否与步骤S301中第一用户发送的哈希值相符,在进行抽检时可以进行更为详细更有目的性的检查。 For example, when the number of the first subset included in the first data is greater than a predetermined threshold, a first sampling request and a second sampling request may be included, and the first sampling request may include, for example, that the second user chooses to view the second subset For the data content of E(Item IJ ), the return information sent by the first user can include the encrypted key K(Item IJ ) corresponding to the second subset E(Item IJ ), and the second user can use the key to open the encryption For the second subset, view the data content in the second subset Item IJ , and determine the second sampling request according to the data content in the second subset Item IJ . For example, the second sampling request may include that the second user chooses to view the data content of the first subset E(Doc I ), and the return information sent by the first user may include the encrypted password corresponding to the first subset E(Doc I ) after encryption. key K((Doc I ), the second user can use the key to open the encrypted first subset, view the data content in the first subset Doc I , and obtain the fourth data, so that the hash of the fourth data can be judged whether the hash value of the hash value and the second data are consistent to determine whether the first user provides the data specified in the sampling request. In the case that the number of the first subset in the first data is not greater than the predetermined threshold, the sampling request Can only carry out spot check to the part second subset in the first subset.Can integrally verify whether the hash value of the first subset in the fourth data is the same as that of the first subset in step S301 when the first subset is spot checked in this process. The hash value sent by the user matches, and a more detailed and purposeful inspection can be carried out during random inspection.
在第一数据包括的第一子集的数量大于预定阈值的情况下,第二用户可以对部分第一子集和部分第二子集进行抽检,在验证通过的情况下,可以根据返回信息得到抽检的第一子集和第二子集的内容,根据数据的内容确定是否接受第一用户的委托。可以对部 分第一子集进行抽检,在验证通过的情况下,可以根据返回信息得到抽检的第一子集的内容,根据数据的内容确定是否接受第一用户的委托。例如,可以根据返回信息中指示的数据是否合法合规、数据的经济价值大小等,确定是否接收第一用户的委托。In the case that the number of the first subset included in the first data is greater than the predetermined threshold, the second user can perform spot check on part of the first subset and part of the second subset, and if the verification is passed, it can be obtained according to the returned information The contents of the first subset and the second subset are sampled, and it is determined whether to accept the entrustment of the first user according to the contents of the data. Part of the first subset can be randomly checked. If the verification is passed, the content of the first subset can be obtained according to the returned information, and whether to accept the entrustment of the first user can be determined according to the content of the data. For example, it may be determined whether to accept the entrustment of the first user according to whether the data indicated in the returned information is legal and compliant, the economic value of the data, and the like.
根据本申请实施例,通过将欲委托进行交易的数据分为至少一个第一子集,并将第一子集分为至少一个第二子集,可以适应不同数据量的抽检需求,对第一子集,或者,第一子集和第二子集进行抽检,实现更详细、更有针对性的委托交易抽检过程。通过使得第一数据包括至少一个第一子集的哈希值,可以实现在简化抽检流程的同时,适应不同数据量的抽检需求,提高抽检的效率。在抽检过程中第二用户也无法得到第一数据的原始数据。由于是由第二用户提出抽检请求,第一用户无法确定会被抽样的第二数据,从而无法提前挑选质量更优数据作为被抽检的数据欺骗第二用户,由于由第一用户先发送第一数据,再进行抽检,可以防止第一用户在返回信息中故意伪造数据从而掩盖原本的数据,使得该抽检过程随机化、可信、可管控。According to the embodiment of the present application, by dividing the data to be entrusted for transaction into at least one first subset, and dividing the first subset into at least one second subset, it can meet the sampling requirements of different data volumes, and the first Subsets, or, the first subset and the second subset are subjected to sampling inspection to realize a more detailed and targeted entrusted transaction sampling inspection process. By making the first data include at least one hash value of the first subset, while simplifying the sampling process, it can meet the sampling requirements of different data volumes and improve the efficiency of sampling. During the sampling process, the second user cannot obtain the original data of the first data. Since the sampling request is made by the second user, the first user cannot determine the second data that will be sampled, so that the data with better quality cannot be selected in advance as the data to be sampled to deceive the second user. The random inspection of the data can prevent the first user from intentionally falsifying the data in the returned information to cover up the original data, making the random inspection process random, credible, and controllable.
在一种可能的实现方式中,第二数据还可以包括至少一个第二子集,返回信息还用于第二服务端根据返回信息得到第二数据包括的至少一个第二子集的内容,以确定是否接受第一用户的委托。In a possible implementation manner, the second data may further include at least one second subset, and the returned information is also used by the second server to obtain the content of the at least one second subset included in the second data according to the returned information, so as to Determine whether to accept the entrustment of the first user.
其中,在第一数据包括的第一子集的数量小于预定阈值的情况下,第二用户可以对部分第二子集进行抽检,在验证通过的情况下,可以根据返回信息得到抽检的第二子集的内容,根据数据的内容确定是否接受第一用户的委托。例如,可以根据返回信息中指示的数据是否合法合规、数据的经济价值大小等,确定是否接收第一用户的委托。Wherein, when the number of the first subsets included in the first data is less than the predetermined threshold, the second user can perform random inspection on some of the second subsets, and if the verification is passed, the second user can obtain the second subset of the random inspection according to the returned information. Content of the subset, determine whether to accept the entrustment of the first user according to the content of the data. For example, it may be determined whether to accept the entrustment of the first user according to whether the data indicated in the returned information is legal and compliant, the economic value of the data, and the like.
根据本申请实施例,通过第二用户在第一用户欲委托进行交易的数据量较小的情况下,对第二子集进行抽检,可以简化在数据量较小时的数据验证流程,提高数据验证的效率。且在此过程中可以第二用户无法得到第一用户的原始数据,使得该过程随机化、可信、可管控。According to the embodiment of the present application, when the amount of data that the first user intends to entrust for a transaction is small, the second user conducts random inspection on the second subset, which can simplify the data verification process when the amount of data is small, and improve data verification. s efficiency. And in this process, the second user cannot obtain the original data of the first user, making the process random, credible, and controllable.
图4示出根据本申请一实施例的数据验证装置的结构图。该装置可用于第二服务端,该第二服务端可应用于上述第二用户,例如第二用户可通过终端设备或服务器实现本实施例的装置。如图4所示,该装置包括:Fig. 4 shows a structural diagram of a data verification device according to an embodiment of the present application. The apparatus can be used for a second server, and the second server can be applied to the above-mentioned second user, for example, the second user can realize the apparatus of this embodiment through a terminal device or a server. As shown in Figure 4, the device includes:
第一接收模块401,用于接收第一服务端发送的第一数据,第一数据包括至少一个第一子集的哈希值,第一子集包括至少一个第二子集,第一数据为第一服务端欲委托进行交易的数据;The first receiving module 401 is configured to receive the first data sent by the first server, the first data includes a hash value of at least one first subset, the first subset includes at least one second subset, and the first data is The data to be entrusted by the first server to carry out the transaction;
第一发送模块402,用于向第一服务端发送针对第二数据的抽检请求,第二数据包括至少一个第一子集,或者,第二数据包括至少一个第一子集和至少一个第二子集;The first sending module 402 is configured to send a sampling request for the second data to the first server, the second data includes at least one first subset, or the second data includes at least one first subset and at least one second Subset;
第二接收模块403,用于接收第一服务端响应于抽检请求发送的返回信息;The second receiving module 403 is configured to receive the return information sent by the first server in response to the sampling request;
验证模块404,用于根据返回信息和第二数据包括的至少一个第一子集的哈希值,对第二数据进行验证,第二数据包括的至少一个第一子集的哈希值根据第一数据包括的至少一个第一子集的哈希值确定;The verification module 404 is configured to verify the second data according to the returned information and the hash value of the at least one first subset included in the second data, and the hash value of the at least one first subset included in the second data is based on the first A hash value determination of at least a first subset of the data;
第一确定模块405,用于在验证通过的情况下,根据返回信息得到第二数据包括的至少一个第一子集的内容,或者第二数据包括的至少一个第一子集和至少一个第二子集的内容,以确定是否接受第一服务端的委托。The first determination module 405 is configured to obtain the content of at least one first subset included in the second data, or at least one first subset included in the second data and at least one second subset included in the second data according to the returned information when the verification is passed. Subset content to determine whether to accept the commission from the first server.
根据本申请实施例,通过将欲委托进行交易的数据分为至少一个第一子集,并将第一子集分为至少一个第二子集,可以适应不同数据量的抽检需求,对第一子集,或者,第一子集和第二子集进行抽检,实现更详细、更有针对性的委托交易抽检过程。通过使得第一数据包括至少一个第一子集的哈希值,可以实现在简化抽检流程的同时,适应不同数据量的抽检需求,提高抽检的效率。在抽检过程中第二服务端也无法得到第一数据的原始数据。由于是由第二服务端提出抽检请求,第一服务端无法确定会被抽样的第二数据,从而无法提前挑选质量更优数据作为被抽检的数据欺骗第二服务端,由于由第一服务端先发送第一数据,再进行抽检,可以防止第一服务端在返回信息中故意伪造数据从而掩盖原本的数据,使得该抽检过程随机化、可信、可管控。According to the embodiment of the present application, by dividing the data to be entrusted for transaction into at least one first subset, and dividing the first subset into at least one second subset, it can meet the sampling requirements of different data volumes, and the first Subsets, or, the first subset and the second subset are subjected to sampling inspection to realize a more detailed and targeted entrusted transaction sampling inspection process. By making the first data include at least one hash value of the first subset, while simplifying the sampling process, it can meet the sampling requirements of different data volumes and improve the efficiency of sampling. During the sampling process, the second server cannot obtain the original data of the first data. Since the sampling request is made by the second server, the first server cannot determine the second data that will be sampled, so it cannot select data with better quality in advance as the data to be sampled to deceive the second server. Sending the first data first, and then performing random inspection can prevent the first server from intentionally falsifying data in the returned information to cover up the original data, making the sampling inspection process random, credible, and controllable.
在一种可能的实现方式中,在第一数据包括的第一子集的数量大于预定阈值的情况下,第二数据包括至少一个第一子集和至少一个第二子集。In a possible implementation manner, when the number of first subsets included in the first data is greater than a predetermined threshold, the second data includes at least one first subset and at least one second subset.
根据本申请实施例,可以实现在数据量较大的情况下,防止第一服务端隐瞒数据内容或提供不完整的数据时导致的漏检、误检,实现更详细、更有针对性的抽检过程。According to the embodiment of the present application, in the case of a large amount of data, it is possible to prevent the first server from concealing data content or providing incomplete data, resulting in missed detection and false detection, and to achieve more detailed and targeted sampling inspection process.
在一种可能的实现方式中,该返回信息包括第三数据,验证模块404,用于:In a possible implementation manner, the returned information includes third data, and the verification module 404 is configured to:
在第一数据包括的第一子集的数量大于预定阈值的情况下,判断第三数据的哈希值和第二数据包括的至少一个第一子集的哈希值是否一致;When the number of first subsets included in the first data is greater than a predetermined threshold, judging whether the hash value of the third data is consistent with the hash value of at least one first subset included in the second data;
根据判断结果对第二数据进行验证。The second data is verified according to the judgment result.
根据本申请实施例,通过判断返回信息包括的第三数据的哈希值和第二数据的哈希值是否一致,可以确定第一服务端是否提供了抽检请求中指定的数据,防止第一服务端提供虚假的数据。且上述过程中委托方无法获得第一数据中未被抽检到的数据的原始数据,可以防止第一数据的原始数据被泄露。According to the embodiment of this application, by judging whether the hash value of the third data included in the returned information is consistent with the hash value of the second data, it can be determined whether the first server has provided the data specified in the sampling request, preventing the first server from end provides false data. Moreover, in the above process, the entrusting party cannot obtain the original data of the data that has not been sampled in the first data, which can prevent the original data of the first data from being leaked.
在一种可能的实现方式中,第一数据包括加密后的第一子集和加密后的第二子集,返回信息包括与第二数据对应的密钥,验证模块404,用于:In a possible implementation manner, the first data includes an encrypted first subset and an encrypted second subset, the returned information includes a key corresponding to the second data, and the verification module 404 is configured to:
根据密钥,对与加密后的第一子集和加密后的第二子集中加密后的第二数据进行解密,得到第四数据;Decrypting the encrypted second data in the encrypted first subset and the encrypted second subset according to the key to obtain fourth data;
根据第四数据和第二数据包括的至少一个第一子集的哈希值,对第二数据进行验证。The second data is verified according to the fourth data and the hash value of the at least one first subset included in the second data.
根据本申请实施例,通过根据返回信息中的密钥,对加密后的第一子集和加密后的第二子集中加密后的第二数据进行解密,得到第四数据,并判断第四数据的哈希值和第二数据的哈希值是否一致,可以确定第一服务端是否提供了抽检请求中指定的数据,防止第一服务端提供虚假的数据。According to the embodiment of the present application, by decrypting the encrypted second data in the encrypted first subset and the encrypted second subset according to the key in the returned information, the fourth data is obtained, and the fourth data is judged Whether the hash value of the hash value is consistent with the hash value of the second data can determine whether the first server has provided the data specified in the sampling request, preventing the first server from providing false data.
在一种可能的实现方式中,根据第四数据和第二数据包括的至少一个第一子集的哈希值,对第二数据进行验证,包括:In a possible implementation manner, verifying the second data according to the fourth data and a hash value of at least one first subset included in the second data includes:
在第一数据包括的第一子集的数量大于预定阈值的情况下,判断第四数据的哈希值和第二数据包括的至少一个第一子集的哈希值是否一致;When the number of first subsets included in the first data is greater than a predetermined threshold, judging whether the hash value of the fourth data is consistent with the hash value of at least one first subset included in the second data;
根据判断结果对第二数据进行验证。The second data is verified according to the judgment result.
由此,可以在欲委托进行交易的数据的数据量较大的情况下,防止仅进行一步检查而导致的漏检、误检的情况,实现对待审计的数据更为详细更有目的性的检查。As a result, when the amount of data to be entrusted for transactions is large, it is possible to prevent missed or false detections caused by only one-step inspection, and to achieve more detailed and purposeful inspection of the data to be audited .
在一种可能的实现方式中,该密钥包括与第二数据中的第一子集和/或第二子集对应 的至少一个密钥,不同的第一子集和第二子集对应的密钥不同。In a possible implementation manner, the key includes at least one key corresponding to the first subset and/or the second subset in the second data, and different keys corresponding to the first subset and the second subset The keys are different.
根据本申请实施例,通过使得不同的子集对应的密钥不同,可以实现在抽检的过程中委托方无法获得第一数据中未被抽检到的数据的原始数据,防止第一数据的原始数据被泄露。According to the embodiment of this application, by making the keys corresponding to different subsets different, it can be realized that the entrusting party cannot obtain the original data of the data that has not been sampled in the first data during the random inspection process, preventing the original data of the first data was leaked.
在一种可能的实现方式中,该抽检请求包括至少一个数据位置,数据位置用于指示第二数据包括的第一子集在第一数据中的位置,和/或,第二数据包括的第二子集在第一子集中的位置。In a possible implementation manner, the sampling request includes at least one data location, and the data location is used to indicate the location of the first subset included in the second data in the first data, and/or, the first subset included in the second data The position of the second subset in the first subset.
根据本申请实施例,通过在抽检请求中包括数据位置,可以使得各第一子集在第一数据中的排列顺序,和/或,第二子集在第一子集中的排列顺序确定,在后续交易过程中若得到了原始数据,可核对选取数据位置的数据的哈希值与第一服务端最初提供的第一数据中、对应位置的哈希值是否一致,从而可以防止第一服务端在抽检前后对第一数据中的部分或全部数据进行替换,使得第一服务端无法在委托过程中提供虚假数据以应对抽检。According to the embodiment of the present application, by including the data position in the sampling request, the arrangement order of each first subset in the first data can be determined, and/or the arrangement order of the second subset in the first subset can be determined. If the original data is obtained during the subsequent transaction, it can be checked whether the hash value of the data at the selected data position is consistent with the hash value of the corresponding position in the first data initially provided by the first server, so as to prevent the first server from Part or all of the data in the first data is replaced before and after the random inspection, so that the first server cannot provide false data during the commissioning process to cope with the random inspection.
在一种可能的实现方式中,第二数据包括至少一个第二子集,该装置还包括:In a possible implementation manner, the second data includes at least one second subset, and the device further includes:
第二确定模块,用于根据返回信息得到第二数据包括的至少一个第二子集的内容,以确定是否接受第一服务端的委托。The second determining module is configured to obtain the content of at least one second subset included in the second data according to the returned information, so as to determine whether to accept the commission from the first server.
根据本申请实施例,通过第二服务端在第一服务端欲委托进行交易的数据量较小的情况下,对第二子集进行抽检,可以简化在数据量较小时的数据验证流程,提高数据验证的效率。且在此过程中可以第二服务端无法得到第一服务端的原始数据,使得该过程随机化、可信、可管控。According to the embodiment of the present application, when the amount of data that the first server intends to entrust with the transaction is small, the second server performs sampling inspection on the second subset, which can simplify the data verification process when the amount of data is small, and improve Data Validation Efficiency. And in this process, the second server cannot obtain the original data of the first server, making the process random, credible, and controllable.
在一种可能的实现方式中,该装置还包括:In a possible implementation manner, the device also includes:
公布模块,用于将以下中的一项或多项公布至不可修改的数据库中:第一数据包括的第一子集的哈希值、第一数据包括的加密后的第一子集、第一数据包括的加密后的第二子集、抽检请求。A publishing module, configured to publish one or more of the following into the non-modifiable database: the hash value of the first subset included in the first data, the encrypted first subset included in the first data, the first subset included in the first data, the A data includes the encrypted second subset, a sampling request.
由此,在出现争议时可以利用公布至数据库中的信息对相关过程进行溯源,从而可以实现可溯源的数据验证过程。Therefore, when a dispute arises, the information published in the database can be used to trace the source of the relevant process, so that a traceable data verification process can be realized.
图5示出根据本申请一实施例的数据验证装置的结构图。该装置可用于第一服务端,该第一服务端应用于上述第一用户,例如第一用户可通过终端设备实现该实施例的装置。如图5所示,该装置包括:Fig. 5 shows a structural diagram of a data verification device according to an embodiment of the present application. The apparatus can be used for a first server, and the first server is applied to the above-mentioned first user, for example, the first user can realize the apparatus of this embodiment through a terminal device. As shown in Figure 5, the device includes:
第二发送模块501,用于向第二服务端发送第一数据,第一数据包括至少一个第一子集的哈希值,第一子集包括至少一个第二子集,第一数据为第一服务端欲委托进行交易的数据;The second sending module 501 is configured to send the first data to the second server, the first data includes a hash value of at least one first subset, the first subset includes at least one second subset, and the first data is the hash value of the first subset 1. The data that the server wants to entrust to conduct transactions;
第三接收模块502,用于接收第二服务端发送的针对第二数据的抽检请求,第二数据包括至少一个第一子集,或者,第二数据包括至少一个第一子集和至少一个第二子集;The third receiving module 502 is configured to receive a sampling request for the second data sent by the second server, the second data includes at least one first subset, or the second data includes at least one first subset and at least one first subset two subsets;
第三发送模块503,用于响应于抽检请求,向第二服务端发送返回信息,返回信息用于第二服务端根据返回信息和第二数据包括的至少一个第一子集的哈希值,对第二数据进行验证,第二数据包括的至少一个第一子集的哈希值根据第一数据包括的至少一个第一子集的哈希值确定,在验证通过的情况下,返回信息用于第二服务端根据返回信息得 到第二数据包括的至少一个第一子集的内容,或者第二数据包括的至少一个第一子集和至少一个第二子集的内容,以确定是否接受第一服务端的委托。The third sending module 503 is configured to send return information to the second server in response to the sampling request, and the return information is used for the hash value of at least one first subset included by the second server according to the return information and the second data, Verifying the second data, the hash value of at least one first subset included in the second data is determined according to the hash value of at least one first subset included in the first data, and if the verification is passed, return the information with The second server obtains the content of at least one first subset included in the second data according to the returned information, or the content of at least one first subset and at least one second subset included in the second data, so as to determine whether to accept the first subset A server-side delegation.
根据本申请实施例,通过将欲委托进行交易的数据分为至少一个第一子集,并将第一子集分为至少一个第二子集,可以适应不同数据量的抽检需求,对第一子集,或者,第一子集和第二子集进行抽检,实现更详细、更有针对性的委托交易抽检过程。通过使得第一数据包括至少一个第一子集的哈希值,可以实现在简化抽检流程的同时,适应不同数据量的抽检需求,提高抽检的效率。在抽检过程中第二服务端也无法得到第一数据的原始数据。由于是由第二服务端提出抽检请求,第一服务端无法确定会被抽样的第二数据,从而无法提前挑选质量更优数据作为被抽检的数据欺骗第二服务端,由于由第一服务端先发送第一数据,再进行抽检,可以防止第一服务端在返回信息中故意伪造数据从而掩盖原本的数据,使得该抽检过程随机化、可信、可管控。According to the embodiment of the present application, by dividing the data to be entrusted for transaction into at least one first subset, and dividing the first subset into at least one second subset, it can meet the sampling requirements of different data volumes, and the first Subsets, or, the first subset and the second subset are subjected to sampling inspection to realize a more detailed and targeted entrusted transaction sampling inspection process. By making the first data include at least one hash value of the first subset, while simplifying the sampling process, it can meet the sampling requirements of different data volumes and improve the efficiency of sampling. During the sampling process, the second server cannot obtain the original data of the first data. Since the sampling request is made by the second server, the first server cannot determine the second data that will be sampled, so it cannot select data with better quality in advance as the data to be sampled to deceive the second server. Sending the first data first, and then performing random inspection can prevent the first server from intentionally falsifying data in the returned information to cover up the original data, making the sampling inspection process random, credible, and controllable.
在一种可能的实现方式中,在第一数据包括的第一子集的数量大于预定阈值的情况下,第二数据包括至少一个第一子集和至少一个第二子集。In a possible implementation manner, when the number of first subsets included in the first data is greater than a predetermined threshold, the second data includes at least one first subset and at least one second subset.
根据本申请实施例,可以实现在数据量较大的情况下,防止第一服务端隐瞒数据内容或提供不完整的数据时导致的漏检、误检,实现更详细、更有针对性的抽检过程。According to the embodiment of the present application, in the case of a large amount of data, it is possible to prevent the first server from concealing data content or providing incomplete data, resulting in missed detection and false detection, and to achieve more detailed and targeted sampling inspection process.
在一种可能的实现方式中,该返回信息包括第三数据,第二服务端根据返回信息和第二数据包括的至少一个第一子集的哈希值,对第二数据进行验证,包括:In a possible implementation manner, the returned information includes third data, and the second server verifies the second data according to the returned information and the hash value of at least one first subset included in the second data, including:
第二服务端在第一数据包括的第一子集的数量大于预定阈值的情况下,判断第三数据的哈希值和第二数据包括的至少一个第一子集的哈希值是否一致;The second server determines whether the hash value of the third data is consistent with the hash value of at least one first subset included in the second data when the number of first subsets included in the first data is greater than a predetermined threshold;
第二服务端根据判断结果对第二数据进行验证。The second server verifies the second data according to the judgment result.
根据本申请实施例,通过判断返回信息包括的第三数据的哈希值和第二数据的哈希值是否一致,可以确定第一服务端是否提供了抽检请求中指定的数据,防止第一服务端提供虚假的数据。且上述过程中委托方无法获得第一数据中未被抽检到的数据的原始数据,可以防止第一数据的原始数据被泄露。According to the embodiment of this application, by judging whether the hash value of the third data included in the returned information is consistent with the hash value of the second data, it can be determined whether the first server has provided the data specified in the sampling request, preventing the first server from end provides false data. Moreover, in the above process, the entrusting party cannot obtain the original data of the data that has not been sampled in the first data, which can prevent the original data of the first data from being leaked.
在一种可能的实现方式中,第一数据包括加密后的第一子集和加密后的第二子集,返回信息包括与第二数据对应的密钥,第二服务端根据返回信息和第二数据包括的至少一个第一子集的哈希值,对第二数据进行验证,包括:In a possible implementation manner, the first data includes an encrypted first subset and an encrypted second subset, the returned information includes a key corresponding to the second data, and the second server uses the returned information and the encrypted second The second data includes at least one hash value of the first subset, and the second data is verified, including:
第二服务端根据密钥,对与加密后的第一子集和加密后的第二子集中加密后的第二数据进行解密,得到第四数据;The second server decrypts the encrypted second data in the encrypted first subset and the encrypted second subset according to the key to obtain fourth data;
第二服务端根据第四数据和第二数据包括的至少一个第一子集的哈希值,对第二数据进行验证。The second server verifies the second data according to the fourth data and the hash value of at least one first subset included in the second data.
根据本申请实施例,通过根据返回信息中的密钥,对加密后的第一子集和加密后的第二子集中加密后的第二数据进行解密,得到第四数据,并判断第四数据的哈希值和第二数据的哈希值是否一致,可以确定第一服务端是否提供了抽检请求中指定的数据,防止第一服务端提供虚假的数据。According to the embodiment of the present application, by decrypting the encrypted second data in the encrypted first subset and the encrypted second subset according to the key in the returned information, the fourth data is obtained, and the fourth data is judged Whether the hash value of the hash value is consistent with the hash value of the second data can determine whether the first server has provided the data specified in the sampling request, preventing the first server from providing false data.
在一种可能的实现方式中,第二服务端根据第四数据和第二数据包括的至少一个第一子集的哈希值,对第二数据进行验证,包括:In a possible implementation manner, the second server verifies the second data according to the fourth data and the hash value of at least one first subset included in the second data, including:
第二服务端在第一数据包括的第一子集的数量大于预定阈值的情况下,判断第四数 据的哈希值和第二数据包括的至少一个第一子集的哈希值是否一致;The second server judges whether the hash value of the fourth data is consistent with the hash value of at least one first subset included in the second data when the number of the first subset included in the first data is greater than a predetermined threshold;
第二服务端根据判断结果对第二数据进行验证。The second server verifies the second data according to the judgment result.
由此,可以在欲委托进行交易的数据的数据量较大的情况下,防止仅进行一步检查而导致的漏检、误检的情况,实现对待审计的数据更为详细更有目的性的检查。As a result, when the amount of data to be entrusted for transactions is large, it is possible to prevent missed or false detections caused by only one-step inspection, and to achieve more detailed and purposeful inspection of the data to be audited .
在一种可能的实现方式中,该密钥包括与第二数据中的第一子集和/或第二子集对应的至少一个密钥,不同的第一子集和第二子集对应的密钥不同。In a possible implementation manner, the key includes at least one key corresponding to the first subset and/or the second subset in the second data, and different keys corresponding to the first subset and the second subset The keys are different.
根据本申请实施例,通过使得不同的子集对应的密钥不同,可以实现在抽检的过程中委托方无法获得第一数据中未被抽检到的数据的原始数据,防止第一数据的原始数据被泄露。According to the embodiment of this application, by making the keys corresponding to different subsets different, it can be realized that the entrusting party cannot obtain the original data of the data that has not been sampled in the first data during the random inspection process, preventing the original data of the first data was leaked.
在一种可能的实现方式中,该抽检请求包括至少一个数据位置,数据位置用于指示第二数据包括的第一子集在第一数据中的位置,和/或,第二数据包括的第二子集在第一子集中的位置。In a possible implementation manner, the sampling request includes at least one data location, and the data location is used to indicate the location of the first subset included in the second data in the first data, and/or, the first subset included in the second data The position of the second subset in the first subset.
根据本申请实施例,通过在抽检请求中包括数据位置,可以使得各第一子集在第一数据中的排列顺序,和/或,第二子集在第一子集中的排列顺序确定,在后续交易过程中若得到了原始数据,可核对选取数据位置的数据的哈希值与第一服务端最初提供的第一数据中、对应位置的哈希值是否一致,从而可以防止第一服务端在抽检前后对第一数据中的部分或全部数据进行替换,使得第一服务端无法在委托过程中提供虚假数据以应对抽检。According to the embodiment of the present application, by including the data position in the sampling request, the arrangement order of each first subset in the first data can be determined, and/or the arrangement order of the second subset in the first subset can be determined. If the original data is obtained during the subsequent transaction, it can be checked whether the hash value of the data at the selected data position is consistent with the hash value of the corresponding position in the first data initially provided by the first server, so as to prevent the first server from Part or all of the data in the first data is replaced before and after the random inspection, so that the first server cannot provide false data during the commissioning process to cope with the random inspection.
在一种可能的实现方式中,第二数据包括至少一个第二子集,返回信息还用于第二服务端根据返回信息得到第二数据包括的至少一个第二子集的内容,以确定是否接受第一服务端的委托。In a possible implementation manner, the second data includes at least one second subset, and the returned information is also used by the second server to obtain the content of the at least one second subset included in the second data according to the returned information, so as to determine whether Accept the entrustment of the first server.
根据本申请实施例,通过第二服务端在第一服务端欲委托进行交易的数据量较小的情况下,对第二子集进行抽检,可以简化在数据量较小时的数据验证流程,提高数据验证的效率。且在此过程中可以第二服务端无法得到第一服务端的原始数据,使得该过程随机化、可信、可管控。According to the embodiment of the present application, when the amount of data that the first server intends to entrust with the transaction is small, the second server performs sampling inspection on the second subset, which can simplify the data verification process when the amount of data is small, and improve Data Validation Efficiency. And in this process, the second server cannot obtain the original data of the first server, making the process random, credible, and controllable.
在一些实施例中,本公开实施例提供的装置具有的功能或包含的模块可以用于执行上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描述,为了简洁,这里不再赘述。In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the methods described in the method embodiments above, and its specific implementation can refer to the description of the method embodiments above. For brevity, here No longer.
本公开实施例还提出一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。计算机可读存储介质可以是易失性或非易失性计算机可读存储介质。Embodiments of the present disclosure also provide a computer-readable storage medium, on which computer program instructions are stored, and the above-mentioned method is implemented when the computer program instructions are executed by a processor. Computer readable storage media may be volatile or nonvolatile computer readable storage media.
本公开实施例还提出一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为在执行所述存储器存储的指令时,实现上述方法。An embodiment of the present disclosure also proposes an electronic device, including: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to implement the above method when executing the instructions stored in the memory.
本公开实施例还提供了一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,当所述计算机可读代码在电子设备的处理器中运行时,所述电子设备中的处理器执行上述方法。An embodiment of the present disclosure also provides a computer program product, including computer-readable codes, or a non-volatile computer-readable storage medium carrying computer-readable codes, when the computer-readable codes are stored in a processor of an electronic device When running in the electronic device, the processor in the electronic device executes the above method.
图6是根据一示例性实施例示出的一种用于数据验证的装置1900的框图。例如,装置1900可以被提供为一服务器或终端设备。参照图6,装置1900包括处理组件1922,其进一 步包括一个或多个处理器,以及由存储器1932所代表的存储器资源,用于存储可由处理组件1922的执行的指令,例如应用程序。存储器1932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1922被配置为执行指令,以执行上述方法。Fig. 6 is a block diagram of an apparatus 1900 for data verification according to an exemplary embodiment. For example, the apparatus 1900 may be provided as a server or a terminal device. 6, apparatus 1900 includes processing component 1922, which further includes one or more processors, and memory resources represented by memory 1932 for storing instructions executable by processing component 1922, such as application programs. The application programs stored in memory 1932 may include one or more modules each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.
装置1900还可以包括一个电源组件1926被配置为执行装置1900的电源管理,一个有线或无线网络接口1950被配置为将装置1900连接到网络,和一个输入输出(I/O)接口1958。装置1900可以操作基于存储在存储器1932的操作系统,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM或类似。 Device 1900 may also include a power component 1926 configured to perform power management of device 1900 , a wired or wireless network interface 1950 configured to connect device 1900 to a network, and an input-output (I/O) interface 1958 . The device 1900 can operate based on an operating system stored in the memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器1932,上述计算机程序指令可由装置1900的处理组件1922执行以完成上述方法。In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium, such as the memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the apparatus 1900 to implement the above-mentioned method.
本公开可以是系统、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开的各个方面的计算机可读程序指令。The present disclosure can be a system, method and/or computer program product. A computer program product may include a computer readable storage medium having computer readable program instructions thereon for causing a processor to implement various aspects of the present disclosure.
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。A computer readable storage medium may be a tangible device that can retain and store instructions for use by an instruction execution device. A computer readable storage medium may be, for example, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or flash memory), static random access memory (SRAM), compact disc read only memory (CD-ROM), digital versatile disc (DVD), memory stick, floppy disk, mechanically encoded device, such as a printer with instructions stored thereon A hole card or a raised structure in a groove, and any suitable combination of the above. As used herein, computer-readable storage media are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., pulses of light through fiber optic cables), or transmitted electrical signals.
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。Computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or downloaded to an external computer or external storage device over a network, such as the Internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers. A network adapter card or a network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用 计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。Computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or Source or object code written in any combination, including object-oriented programming languages—such as Smalltalk, C++, etc., and conventional procedural programming languages—such as the “C” language or similar programming languages. Computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement. In cases involving a remote computer, the remote computer can be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as via the Internet using an Internet service provider). connect). In some embodiments, an electronic circuit, such as a programmable logic circuit, field programmable gate array (FPGA), or programmable logic array (PLA), can be customized by utilizing state information of computer-readable program instructions, which can Various aspects of the present disclosure are implemented by executing computer readable program instructions.
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。Aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It should be understood that each block of the flowcharts and/or block diagrams, and combinations of blocks in the flowcharts and/or block diagrams, can be implemented by computer-readable program instructions.
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine such that when executed by the processor of the computer or other programmable data processing apparatus , producing an apparatus for realizing the functions/actions specified in one or more blocks in the flowchart and/or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause computers, programmable data processing devices and/or other devices to work in a specific way, so that the computer-readable medium storing instructions includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks in flowcharts and/or block diagrams.
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。It is also possible to load computer-readable program instructions into a computer, other programmable data processing device, or other equipment, so that a series of operational steps are performed on the computer, other programmable data processing device, or other equipment to produce a computer-implemented process , so that instructions executed on computers, other programmable data processing devices, or other devices implement the functions/actions specified in one or more blocks in the flowcharts and/or block diagrams.
附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, a portion of a program segment, or an instruction that includes one or more Executable instructions. In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified function or action , or may be implemented by a combination of dedicated hardware and computer instructions.
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。Having described various embodiments of the present disclosure above, the foregoing description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and alterations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principle of each embodiment, practical application or technical improvement in the market, or to enable other ordinary skilled in the art to understand each embodiment disclosed herein.

Claims (21)

  1. 一种数据验证方法,其特征在于,所述方法包括:A data verification method, characterized in that the method comprises:
    接收第一服务端发送的第一数据,所述第一数据包括至少一个第一子集的哈希值,所述第一子集包括至少一个第二子集,所述第一数据为所述第一服务端欲委托进行交易的数据;receiving first data sent by the first server, the first data includes a hash value of at least one first subset, the first subset includes at least one second subset, the first data is the The data to be entrusted by the first server to carry out the transaction;
    向所述第一服务端发送针对第二数据的抽检请求,所述第二数据包括至少一个第一子集,或者,所述第二数据包括至少一个第一子集和至少一个第二子集;sending a sampling request for second data to the first server, the second data including at least one first subset, or the second data including at least one first subset and at least one second subset ;
    接收第一服务端响应于所述抽检请求发送的返回信息;receiving return information sent by the first server in response to the sampling request;
    根据所述返回信息和所述第二数据包括的至少一个第一子集的哈希值,对所述第二数据进行验证,所述第二数据包括的至少一个第一子集的哈希值根据所述第一数据包括的至少一个第一子集的哈希值确定;Verifying the second data according to the returned information and the hash value of at least one first subset included in the second data, the hash value of at least one first subset included in the second data determined according to a hash value of at least one first subset included in the first data;
    在验证通过的情况下,根据所述返回信息得到所述第二数据包括的至少一个第一子集的内容,或者所述第二数据包括的至少一个第一子集和至少一个第二子集的内容,以确定是否接受所述第一服务端的委托。If the verification is passed, the content of at least one first subset included in the second data, or the at least one first subset and at least one second subset included in the second data are obtained according to the returned information to determine whether to accept the entrustment from the first server.
  2. 根据权利要求1所述的方法,其特征在于,在所述第一数据包括的第一子集的数量大于预定阈值的情况下,所述第二数据包括至少一个第一子集和至少一个第二子集。The method according to claim 1, wherein when the number of first subsets included in the first data is greater than a predetermined threshold, the second data includes at least one first subset and at least one first subset Two subsets.
  3. 根据权利要求2所述的方法,其特征在于,所述返回信息包括第三数据,所述根据所述返回信息和所述第二数据包括的至少一个第一子集的哈希值,对所述第二数据进行验证,包括:The method according to claim 2, wherein the returned information includes third data, and according to the hash value of at least one first subset included in the returned information and the second data, the The above-mentioned second data is verified, including:
    在所述第一数据包括的第一子集的数量大于预定阈值的情况下,判断所述第三数据的哈希值和所述第二数据包括的至少一个第一子集的哈希值是否一致;If the number of first subsets included in the first data is greater than a predetermined threshold, determine whether the hash value of the third data and the hash value of at least one first subset included in the second data are consistent;
    根据判断结果对所述第二数据进行验证。The second data is verified according to the judgment result.
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述第一数据包括加密后的第一子集和加密后的第二子集,所述返回信息包括与所述第二数据对应的密钥,所述根据 所述返回信息和所述第二数据包括的至少一个第一子集的哈希值,对所述第二数据进行验证,包括:The method according to any one of claims 1-3, wherein the first data includes an encrypted first subset and an encrypted second subset, and the return information includes information related to the second The key corresponding to the data, and verifying the second data according to the returned information and the hash value of at least one first subset included in the second data, includes:
    根据所述密钥,对与所述加密后的第一子集和加密后的第二子集中加密后的第二数据进行解密,得到第四数据;Decrypting the encrypted second data in the encrypted first subset and the encrypted second subset according to the key to obtain fourth data;
    根据所述第四数据和所述第二数据包括的至少一个第一子集的哈希值,对所述第二数据进行验证。The second data is verified according to the fourth data and a hash value of at least one first subset included in the second data.
  5. 根据权利要求4所述的方法,其特征在于,所述根据所述第四数据和所述第二数据包括的至少一个第一子集的哈希值,对所述第二数据进行验证,包括:The method according to claim 4, wherein said verifying said second data according to said fourth data and a hash value of at least one first subset included in said second data includes :
    在所述第一数据包括的第一子集的数量大于预定阈值的情况下,判断所述第四数据的哈希值和所述第二数据包括的至少一个第一子集的哈希值是否一致;If the number of first subsets included in the first data is greater than a predetermined threshold, determine whether the hash value of the fourth data and the hash value of at least one first subset included in the second data are consistent;
    根据判断结果对所述第二数据进行验证。The second data is verified according to the judgment result.
  6. 根据权利要求4或5所述的方法,其特征在于,所述密钥包括与第二数据中的第一子集和/或第二子集对应的至少一个密钥,不同的第一子集和第二子集对应的密钥不同。The method according to claim 4 or 5, wherein the key comprises at least one key corresponding to the first subset and/or the second subset in the second data, and the different first subset is different from the key corresponding to the second subset.
  7. 根据权利要求1-6任一项所述的方法,其特征在于,所述第二数据包括至少一个第二子集,所述方法还包括:The method according to any one of claims 1-6, wherein the second data includes at least one second subset, and the method further comprises:
    根据所述返回信息得到所述第二数据包括的至少一个第二子集的内容,以确定是否接受所述第一服务端的委托。The content of at least one second subset included in the second data is obtained according to the returned information, so as to determine whether to accept the entrustment of the first server.
  8. 根据权利要求1-7任一项所述的方法,其特征在于,所述抽检请求包括至少一个数据位置,所述数据位置用于指示所述第二数据包括的第一子集在所述第一数据中的位置,和/或,所述第二数据包括的第二子集在第一子集中的位置。The method according to any one of claims 1-7, wherein the sampling request includes at least one data location, and the data location is used to indicate that the first subset included in the second data is in the A position in the data, and/or a position in the first subset of the second subset included in the second data.
  9. 根据权利要求1-8任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-8, wherein the method further comprises:
    将以下中的一项或多项公布至不可修改的数据库中:所述第一数据包括的第一子集的哈希值、所述第一数据包括的加密后的第一子集、所述第一数据包括的加密后的第二子集、所述抽检请求。publishing one or more of the following to the non-modifiable database: the hash value of the first subset included in the first data, the encrypted first subset included in the first data, the The encrypted second subset included in the first data, the sampling request.
  10. 一种数据验证方法,其特征在于,所述方法包括:A data verification method, characterized in that the method comprises:
    向第二服务端发送第一数据,所述第一数据包括至少一个第一子集的哈希值,所述第一子集包括至少一个第二子集,所述第一数据为第一服务端欲委托进行交易的数据;sending first data to a second server, the first data includes a hash value of at least one first subset, the first subset includes at least one second subset, and the first data is the hash value of the first service The data that the client wants to entrust to conduct transactions;
    接收所述第二服务端发送的针对第二数据的抽检请求,所述第二数据包括至少一个第一子集,或者,所述第二数据包括至少一个第一子集和至少一个第二子集;receiving a sampling request for second data sent by the second server, the second data including at least one first subset, or the second data including at least one first subset and at least one second subset set;
    响应于所述抽检请求,向所述第二服务端发送返回信息,所述返回信息用于所述第二服务端根据所述返回信息和所述第二数据包括的至少一个第一子集的哈希值,对所述第二数据进行验证,所述第二数据包括的至少一个第一子集的哈希值根据所述第一数据包括的至少一个第一子集的哈希值确定,在验证通过的情况下,所述返回信息用于所述第二服务端根据所述返回信息得到所述第二数据包括的至少一个第一子集的内容,或者所述第二数据包括的至少一个第一子集和至少一个第二子集的内容,以确定是否接受所述第一服务端的委托。In response to the sampling request, sending return information to the second server, where the return information is used for at least one first subset included by the second server according to the return information and the second data. hash value, verifying the second data, the hash value of at least one first subset included in the second data is determined according to the hash value of at least one first subset included in the first data, If the verification is passed, the return information is used by the second server to obtain the content of at least one first subset included in the second data according to the return information, or at least one of the first subset included in the second data Contents of a first subset and at least one second subset to determine whether to accept the commission from the first server.
  11. 根据权利要求10所述的方法,其特征在于,在所述第一数据包括的第一子集的数量大于预定阈值的情况下,所述第二数据包括至少一个第一子集和至少一个第二子集。The method according to claim 10, wherein when the number of first subsets included in the first data is greater than a predetermined threshold, the second data includes at least one first subset and at least one first subset Two subsets.
  12. 根据权利要求11所述的方法,其特征在于,所述返回信息包括第三数据,所述第二服务端根据所述返回信息和所述第二数据包括的至少一个第一子集的哈希值,对所述第二数据进行验证,包括:The method according to claim 11, wherein the returned information includes third data, and the second server uses the hash of at least one first subset included in the returned information and the second data value, verifying the second data, including:
    所述第二服务端在所述第一数据包括的第一子集的数量大于预定阈值的情况下,判断所述第三数据的哈希值和所述第二数据包括的至少一个第一子集的哈希值是否一致;When the number of first subsets included in the first data is greater than a predetermined threshold, the second server determines whether the hash value of the third data and at least one first subset included in the second data Whether the hash value of the set is consistent;
    所述第二服务端根据判断结果对所述第二数据进行验证。The second server verifies the second data according to the judgment result.
  13. 根据权利要求10-12任一项所述的方法,其特征在于,所述第一数据包括加密后的第一子集和加密后的第二子集,所述返回信息包括与所述第二数据对应的密钥,所述第二服务端根据所述返回信息和所述第二数据包括的至少一个第一子集的哈希值,对所述第二数据进行验证,包括:The method according to any one of claims 10-12, wherein the first data includes an encrypted first subset and an encrypted second subset, and the returned information includes information related to the second The key corresponding to the data, the second server verifies the second data according to the returned information and the hash value of at least one first subset included in the second data, including:
    所述第二服务端根据所述密钥,对与所述加密后的第一子集和加密后的第二子集中加密后的第二数据进行解密,得到第四数据;The second server decrypts the encrypted second data in the encrypted first subset and the encrypted second subset according to the key to obtain fourth data;
    所述第二服务端根据所述第四数据和所述第二数据包括的至少一个第一子集的哈希值,对所述第二数据进行验证。The second server verifies the second data according to the fourth data and a hash value of at least one first subset included in the second data.
  14. 根据权利要求13所述的方法,其特征在于,所述第二服务端根据所述第四数据和所述第二数据包括的至少一个第一子集的哈希值,对所述第二数据进行验证,包括:The method according to claim 13, characterized in that, the second server calculates the second data according to the hash value of at least one first subset included in the fourth data and the second data Verify, including:
    所述第二服务端在所述第一数据包括的第一子集的数量大于预定阈值的情况下,判断所述第四数据的哈希值和所述第二数据包括的至少一个第一子集的哈希值是否一致;When the number of first subsets included in the first data is greater than a predetermined threshold, the second server determines whether the hash value of the fourth data and at least one first subset included in the second data Whether the hash value of the set is consistent;
    所述第二服务端根据判断结果对所述第二数据进行验证。The second server verifies the second data according to the judgment result.
  15. 根据权利要求13或14所述的方法,其特征在于,所述密钥包括与第二数据中的第一子集和/或第二子集对应的至少一个密钥,不同的第一子集和第二子集对应的密钥不同。The method according to claim 13 or 14, wherein the key comprises at least one key corresponding to the first subset and/or the second subset in the second data, and the different first subset is different from the key corresponding to the second subset.
  16. 根据权利要求10-15任一项所述的方法,其特征在于,所述第二数据包括至少一个第二子集,所述返回信息还用于所述第二服务端根据所述返回信息得到所述第二数据包括的至少一个第二子集的内容,以确定是否接受所述第一服务端的委托。The method according to any one of claims 10-15, wherein the second data includes at least one second subset, and the returned information is also used by the second server to obtain The second data includes content of at least one second subset to determine whether to accept the entrustment of the first server.
  17. 根据权利要求10-16任一项所述的方法,其特征在于,所述抽检请求包括至少一个数据位置,所述数据位置用于指示所述第二数据包括的第一子集在所述第一数据中的位置,和/或,所述第二数据包括的第二子集在第一子集中的位置。The method according to any one of claims 10-16, wherein the sampling request includes at least one data location, and the data location is used to indicate that the first subset included in the second data is in the A position in the data, and/or a position in the first subset of the second subset included in the second data.
  18. 一种数据验证装置,其特征在于,所述装置包括:A data verification device, characterized in that the device comprises:
    第一接收模块,用于接收第一服务端发送的第一数据,所述第一数据包括至少一个第一子集的哈希值,所述第一子集包括至少一个第二子集,所述第一数据为所述第一服务端欲委托进行交易的数据;The first receiving module is configured to receive the first data sent by the first server, the first data includes a hash value of at least one first subset, and the first subset includes at least one second subset, so The first data is the data that the first server wants to entrust to carry out the transaction;
    第一发送模块,用于向所述第一服务端发送针对第二数据的抽检请求,所述第二数据包括至少一个第一子集,或者,所述第二数据包括至少一个第一子集和至少一个第二子集;A first sending module, configured to send a sampling request for second data to the first server, the second data includes at least one first subset, or the second data includes at least one first subset and at least one second subset;
    第二接收模块,用于接收第一服务端响应于所述抽检请求发送的返回信息;The second receiving module is configured to receive the return information sent by the first server in response to the sampling request;
    验证模块,用于根据所述返回信息和所述第二数据包括的至少一个第一子集的哈希值,对所述第二数据进行验证,所述第二数据包括的至少一个第一子集的哈希值根据所述第一数据包括的至少一个第一子集的哈希值确定;A verification module, configured to verify the second data according to the returned information and the hash value of at least one first subset included in the second data, and the at least one first subset included in the second data The hash value of the set is determined according to the hash value of at least one first subset included in the first data;
    第一确定模块,用于在验证通过的情况下,根据所述返回信息得到所述第二数据包括的至少一个第一子集的内容,或者所述第二数据包括的至少一个第一子集和至少一个第二子集的内容,以确定是否接受所述第一服务端的委托。The first determination module is configured to obtain the content of at least one first subset included in the second data or at least one first subset included in the second data according to the returned information when the verification is passed. and the content of at least one second subset to determine whether to accept the commission from the first server.
  19. 一种数据验证装置,其特征在于,所述装置包括:A data verification device, characterized in that the device comprises:
    第二发送模块,用于向第二服务端发送第一数据,所述第一数据包括至少一个第一子集的哈希值,所述第一子集包括至少一个第二子集,所述第一数据为第一服务端欲委托进行交易的数据;A second sending module, configured to send first data to a second server, the first data includes a hash value of at least one first subset, the first subset includes at least one second subset, the The first data is the data that the first server wants to entrust to conduct transactions;
    第三接收模块,用于接收所述第二服务端发送的针对第二数据的抽检请求,所述第二数据包括至少一个第一子集,或者,所述第二数据包括至少一个第一子集和至少一个第二子集;The third receiving module is configured to receive a sampling request for the second data sent by the second server, the second data includes at least one first subset, or the second data includes at least one first subset set and at least one second subset;
    第三发送模块,用于响应于所述抽检请求,向所述第二服务端发送返回信息,所述返回信息用于所述第二服务端根据所述返回信息和所述第二数据包括的至少一个第一子集的哈希值,对所述第二数据进行验证,所述第二数据包括的至少一个第一子集的哈希值根据所述第一数据包括的至少一个第一子集的哈希值确定,在验证通过的情况下,所述返回信息用于所述第二服务端根据所述返回信息得到所述第二数据包括的至少一个第 一子集的内容,或者所述第二数据包括的至少一个第一子集和至少一个第二子集的内容,以确定是否接受所述第一服务端的委托。A third sending module, configured to send return information to the second server in response to the sampling request, the return information is used by the second server according to the return information and the second data included The hash value of at least one first subset is used to verify the second data, the hash value of the at least one first subset included in the second data is based on the at least one first subset included in the first data The hash value of the set is determined. If the verification is passed, the return information is used for the second server to obtain the content of at least one first subset included in the second data according to the return information, or the Contents of at least one first subset and at least one second subset included in the second data to determine whether to accept the entrustment of the first server.
  20. 一种数据验证装置,其特征在于,包括:A data verification device is characterized in that it comprises:
    处理器;processor;
    用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;
    其中,所述处理器被配置为在执行所述存储器存储的指令时,实现权利要求1至9中任意一项所述的方法,或者,实现权利要求10至17中任意一项所述的方法。Wherein, the processor is configured to implement the method described in any one of claims 1 to 9 when executing the instructions stored in the memory, or to implement the method described in any one of claims 10 to 17 .
  21. 一种非易失性计算机可读存储介质,其上存储有计算机程序指令,其特征在于,所述计算机程序指令被处理器执行时实现权利要求1至9中任意一项所述的方法,或者,实现权利要求10至17中任意一项所述的方法。A non-volatile computer-readable storage medium on which computer program instructions are stored, wherein the computer program instructions implement the method according to any one of claims 1 to 9 when executed by a processor, or , realizing the method described in any one of claims 10 to 17.
PCT/CN2022/112485 2021-08-20 2022-08-15 Data verification method and apparatus, and storage medium WO2023020428A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202110961364.6 2021-08-20
CN202110961364 2021-08-20
CN202210955876.6A CN115708340A (en) 2021-08-20 2022-08-10 Data verification method, device and storage medium
CN202210955876.6 2022-08-10

Publications (1)

Publication Number Publication Date
WO2023020428A1 true WO2023020428A1 (en) 2023-02-23

Family

ID=85212939

Family Applications (2)

Application Number Title Priority Date Filing Date
PCT/CN2022/112485 WO2023020428A1 (en) 2021-08-20 2022-08-15 Data verification method and apparatus, and storage medium
PCT/CN2022/112611 WO2023020448A1 (en) 2021-08-20 2022-08-15 Data processing method and apparatus, and storage medium

Family Applications After (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/112611 WO2023020448A1 (en) 2021-08-20 2022-08-15 Data processing method and apparatus, and storage medium

Country Status (2)

Country Link
CN (3) CN115708339B (en)
WO (2) WO2023020428A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116882847A (en) * 2023-09-07 2023-10-13 山东盛日电力集团有限公司 Installation quality detection method and system for photovoltaic module

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016009497A1 (en) * 2014-07-15 2016-01-21 株式会社あいびし Data falsification detection device, network service providing device, data falsification detection method, network service providing method, and program
CN105959115A (en) * 2016-07-19 2016-09-21 贵州大学 Multi-party fault-tolerant authorization oriented public verifiable big data transaction method
WO2019071131A1 (en) * 2017-10-06 2019-04-11 Stealthpath, Inc. Methods for internet communication security
JP2020024376A (en) * 2018-08-08 2020-02-13 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America Data protection method, authentication server, data protection system, and data structure
CN111294379A (en) * 2018-12-10 2020-06-16 北京沃东天骏信息技术有限公司 Block chain network service platform, authority hosting method thereof and storage medium
CN111435349A (en) * 2019-01-15 2020-07-21 费希尔-罗斯蒙特系统公司 Automated architecture network security based on blockchains
CN112100178A (en) * 2020-09-08 2020-12-18 中国联合网络通信集团有限公司 Delegation authorization verification method and system

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001010076A2 (en) * 1999-07-29 2001-02-08 Intertrust Technologies Corp. Systems and methods for protecting secure and insecure computing environments using cryptography
CN106301789B (en) * 2016-08-16 2019-07-09 电子科技大学 Using the dynamic verification method of the cloud storage data of the linear homomorphism signature based on lattice
US10284568B2 (en) * 2016-08-23 2019-05-07 Guardtime Ip Holdings Limited System and method for secure transmission of streamed data frames
CN108009842A (en) * 2017-10-23 2018-05-08 清华大学 The consumer price index based on online data determines system
CN108550039A (en) * 2018-04-24 2018-09-18 北京罗格数据科技有限公司 A kind of method of commerce based on block chain structure data
CN109347878B (en) * 2018-11-30 2020-06-05 西安电子科技大学 Decentralized data verification and data security transaction system and method
US11188913B2 (en) * 2019-01-11 2021-11-30 Capital One Services, Llc Systems and methods for securely verifying a subset of personally identifiable information
CN110113167B (en) * 2019-04-01 2021-10-22 广州杰赛科技股份有限公司 Information protection method and system of intelligent terminal and readable storage medium
US11165560B2 (en) * 2019-05-20 2021-11-02 The Quantum Group, Inc. Secure transmission of electronic health records via blockchain
CN113076375B (en) * 2021-03-29 2023-07-25 湖北央中巨石信息技术有限公司 Multi-party synchronous sampling consensus method, system and device based on block chain and medium
CN113269570B (en) * 2021-06-11 2024-04-09 深圳番多拉信息科技有限公司 Extraction result verification method and related device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016009497A1 (en) * 2014-07-15 2016-01-21 株式会社あいびし Data falsification detection device, network service providing device, data falsification detection method, network service providing method, and program
CN105959115A (en) * 2016-07-19 2016-09-21 贵州大学 Multi-party fault-tolerant authorization oriented public verifiable big data transaction method
WO2019071131A1 (en) * 2017-10-06 2019-04-11 Stealthpath, Inc. Methods for internet communication security
JP2020024376A (en) * 2018-08-08 2020-02-13 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America Data protection method, authentication server, data protection system, and data structure
CN111294379A (en) * 2018-12-10 2020-06-16 北京沃东天骏信息技术有限公司 Block chain network service platform, authority hosting method thereof and storage medium
CN111435349A (en) * 2019-01-15 2020-07-21 费希尔-罗斯蒙特系统公司 Automated architecture network security based on blockchains
CN112100178A (en) * 2020-09-08 2020-12-18 中国联合网络通信集团有限公司 Delegation authorization verification method and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116882847A (en) * 2023-09-07 2023-10-13 山东盛日电力集团有限公司 Installation quality detection method and system for photovoltaic module
CN116882847B (en) * 2023-09-07 2023-12-01 山东盛日电力集团有限公司 Installation quality detection method and system for photovoltaic module

Also Published As

Publication number Publication date
CN115708340A (en) 2023-02-21
CN115708339A (en) 2023-02-21
WO2023020448A1 (en) 2023-02-23
CN115906109A (en) 2023-04-04
CN115708339B (en) 2024-03-12

Similar Documents

Publication Publication Date Title
CN110414268B (en) Access control method, device, equipment and storage medium
CN111147255B (en) Data security service system, method and computer readable storage medium
EP3241129B1 (en) User terminal, service providing apparatus, driving method of user terminal, driving method of service providing apparatus, and encryption indexing-based search system
KR102037160B1 (en) Data security operations with expectations
CN106991298B (en) Access method of application program to interface, authorization request method and device
US20210152545A1 (en) Systems and methods for authenticating device through iot cloud using hardware security module
JP6678457B2 (en) Data security services
US9553855B2 (en) Storing a key to an encrypted file in kernel memory
US10541816B2 (en) Controlling execution of software by combining secure boot and trusted boot features
KR102133606B1 (en) Detection of invalid escrow keys
US11133942B1 (en) Systems and methods of ring usage certificate extension
US9461986B2 (en) Single sign-on for disparate servers
WO2023020428A1 (en) Data verification method and apparatus, and storage medium
CN110737905B (en) Data authorization method, data authorization device and computer storage medium
CN110889131A (en) File sharing system
US9276943B2 (en) Authorizing a change within a computer system
CN109522683B (en) Software tracing method, system, computer equipment and storage medium
KR102199967B1 (en) Method for preventing falsification data from being stored in network and system performing the method
CN114172663B (en) Business right determining method and device based on block chain, storage medium and electronic equipment
WO2023020429A1 (en) Data auditing method and apparatus, and storage medium
WO2017020449A1 (en) Fingerprint reading method and user equipment
US20060212699A1 (en) Method and apparatus for certifying a design of a software computer program
CN113961970B (en) Cross-network-segment network disk login identity authentication method and device, network disk and storage medium
US11632251B1 (en) Commit signing service
CN117834103A (en) Multimedia data sharing method, system and related equipment based on block chain

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

Country of ref document: EP

Kind code of ref document: A1