Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present specification. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the specification, as detailed in the appended claims.
The terminology used in the description herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the description. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of the present specification. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
With the development of technology, more and more people plan personal assets through insurance business, and the form of insurance is more and more abundant. There is a form of insurance in the related art that is "single applicant-multiple policy beneficiaries".
For example, a basketball club enters a work contract with a star, and the club protects the star a player's personal risk of accident because the star's physical health can provide economic benefits to the club and the sponsor, the beneficiary of the insurance including the club itself, the star and the sponsors. In this form of insurance, agreements are typically made between the applicant (such as the club in the above example) and the insurance company, and the benefit amount, the proportion of claims, etc. of each beneficiary are determined by the applicant. In this case, each beneficiary may want to know the information related to himself/herself in the policy, but the applicant does not want to directly inform the beneficiary of the information as it is from the perspective of privacy protection.
The specification provides a policy information verification method based on zero knowledge proof, original information in the policy can not be directly disclosed to beneficiaries, but queries initiated by the beneficiaries can be answered through the generated zero knowledge proof, privacy of policemen is protected, and requirements of the beneficiaries are met.
Still by way of example, for a club, the benefit of each sponsor may relate to business secrets and may not be directly published. For the sponsor, who may only want to confirm whether or not he belongs to one of the beneficiaries, and to know whether or not his benefit amount satisfies the expected value, and does not care who the other beneficiaries are, what the amounts of the other beneficiaries are, the corresponding proof can be presented to the sponsor through a zero-knowledge proof, from which the beneficiaries can get an answer that does not reveal the true, original policy information.
The following describes a policy information verification method based on zero knowledge proof provided in this specification.
The method is applied to block chain nodes of insurance companies.
Referring to fig. 1, fig. 1 is a schematic flow chart of a policy information verification method based on zero knowledge certification according to an exemplary embodiment of the present disclosure, where the method includes the following steps:
102, receiving policy information verification transaction sent by a user, wherein a target policy and policy information to be verified are appointed in the policy information verification transaction;
step 104, responding to the policy information verification transaction, calling policy information acquisition logic in the intelligent contract to acquire encrypted real policy information corresponding to the policy information to be verified from the target policy stored on the block chain;
step 106, storing the encrypted real policy information and the policy information to be verified into a transaction log of the policy information verification transaction, so that an applicant of the target policy obtains the encrypted real policy information and the policy information to be verified from the transaction log, and generating a proof of the policy information to be verified based on the encrypted real policy information by adopting a zero knowledge proof technology;
step 108, the certification returned by the applicant is sent to the user, so that the user can verify the policy information to be verified based on the certification.
The above steps are explained in detail below.
The method described in this embodiment may be implemented based on a blockchain, for example, an applicant node, a user (e.g., beneficiary) node, and an insurance company node may participate in a blockchain network together to form a multi-party federation chain. Of course, the methods described herein are not limited to federation chains. The method is applied to the block chain node of the insurance company. For convenience of description, the user node will be referred to simply as the user and the applicant node will be referred to simply as the applicant.
In this embodiment, the user may want to verify the policy information related to the user in the target policy, for example, the user may want to verify whether the benefit amount range of the user in the target policy reaches the expected range, and then the user may send a policy information verification transaction to the block chain node of the insurance company, and specify the target policy and the policy information to be verified in the transaction. For example, the identity of the target policy and the benefit value range to be verified may be carried in the transaction.
After the block chain node of the insurance company receives the policy information to verify the transaction, the block chain node can respond to the transaction and call the intelligent contract to verify the transaction.
Wherein the intelligent contracts on the blockchain are contracts that can be executed by transaction triggering on the blockchain. An intelligent contract may be defined in the form of code. Taking an ether house as an example, the ether house serves as a programmable block chain, and supports a user to create and call some complex logic in an ether house network. The core of the system is an Ethernet Virtual Machine (EVM), and each Ethernet node can run the EVM. The EVM is a well-behaved virtual machine through which various complex logic can be implemented. In this embodiment, policy information acquisition logic may be added to the intelligent contract, and the corresponding real policy information in the target policy may be acquired through the policy information acquisition logic.
In this logic, it may be first found whether a target policy specified in the policy information verification transaction exists on the block chain, for example, whether a corresponding target policy exists may be found according to an identifier of the target policy. If the policy information does not exist, the message that the corresponding target policy is not found can be returned to the user, and the user can be reminded to initiate the policy information verification transaction again. If the policy information exists, the real policy information corresponding to the policy information to be verified can be obtained from the target policy.
The real policy information may be stored in an encrypted manner, for example, the real policy information may be encrypted by using a public key of the applicant, so that after the encrypted real policy information is obtained here, the encrypted real policy information may be shared with the applicant, and the applicant may decrypt the encrypted real policy information by using its own private key to obtain the real policy information. The adoption of the encryption processing method can avoid directly exposing the original policy information and improve the data security.
In this embodiment, the call result (including the intermediate result and the final call result) generated by the intelligent contract in the call process is usually recorded in the form of an Event (Event) to the transaction log (transaction logs) of the transaction that called the intelligent contract, and is stored in the storage space of the node device. And the entity outside the chain which needs to interact with the intelligent contract can acquire the calling result of the intelligent contract by monitoring the transaction log stored in the storage space of the node equipment.
Taking the policy information to be verified as the expected benefit amount range of the user as an example, the encrypted real benefit amount corresponding to the user can be found, then the encrypted real benefit amount and the policy information to be verified can be stored in a transaction log corresponding to the policy information verification transaction, and the applicant can monitor the transaction log to obtain the encrypted real policy information and the policy information to be verified, so as to generate a corresponding certificate based on the information. Of course, the applicant may also adopt other methods to obtain the above information, for example, the applicant may also adopt a method of analyzing blocks, which may refer to related technologies.
In one example, the applicant may generate the proof under the chain. That is, the applicant can decrypt the encrypted real policy information first, and then generate the proof of the policy information to be verified based on the real policy information by adopting a zero-knowledge proof technology.
In another example, the applicant may also generate proofs on the chain. For example, the applicant may also invoke policy information certification logic in the intelligent contract to decrypt the received encrypted real benefit amount and then generate a certification by using a zero-knowledge certification technique according to the real benefit amount and the benefit amount to be verified.
The Zero Knowledge proof technique may be bulletprox, zk-SNARKs (brief Non-interactive Zero Knowledge proof), zk-STARKs (Zero-Knowledge Transparent Knowledge proof of scalability), and the specific method for generating the proof may refer to related techniques, which is not limited in this embodiment.
After the applicant generates the proof, the proof may be sent to the block chain node of the insurance company. After receiving the proof, the block link point of the insurance company can send the proof to the user, and then the user can verify the policy information to be verified based on the proof. For example, when the policy information to be verified is the benefit amount expected by the user, the user may know whether the actual benefit amount of the user reaches the expectation based on the proof, if so, the user may obtain a "yes" verification result, and if not, the user may obtain a "no" verification result. Of course, this example is merely an exemplary illustration, the policy information to be verified may also be other information in practical application, and the verification result obtained by the user may also be in other forms.
As can be seen from the above description, in an embodiment of the present specification, after receiving a policy information verification transaction initiated by a user, a block chain node may, in response to the policy information verification transaction, invoke policy information acquisition logic in an intelligent contract to determine encrypted real policy information corresponding to policy information to be verified from target policies stored on a block chain, store the encrypted real policy information and the policy information to be verified in a transaction log, an applicant may obtain the encrypted real policy information and the policy information to be verified based on the transaction log, generate a zero-knowledge proof according to these information, and then may send the proof to the user, and the user may verify the policy information to be verified based on the proof.
By adopting the method, the proof corresponding to the policy information to be verified can be provided for the user based on the zero-knowledge proof technology on the basis of not exposing the real policy information to the user, so that the verification requirement of the user is met, and the real policy information is prevented from being leaked.
The policy information verification method based on the zero-knowledge proof provided by the present specification is described below in terms of policy storage, policy modification, and policy information verification.
One, insurance policy deposit certificate
The method for maintaining an insurance policy in this embodiment can be applied to a block chain node of an insurance company, please refer to fig. 2, and the method for maintaining an insurance policy can include the following steps:
step 202, receiving a policy deposit and certificate transaction initiated by an applicant, wherein the policy deposit and certificate transaction carries an encrypted policy total amount obtained by encryption based on a homomorphic encryption technology and encrypted benefit amounts of each policy beneficiary;
step 204, responding to the policy generation transaction, calling policy evidence storage logic in the intelligent contract to store the target policy;
wherein the policy deposit logic in the intelligent contract is configured to implement the steps of:
judging whether the sum of the encrypted beneficiary amounts of all the policy beneficiaries is equal to the total encrypted policy amount or not based on a homomorphic encryption technology;
and if so, generating a target policy based on the total encrypted policy amount and the encrypted benefit amount of each policy beneficiary, and issuing the target policy to a block chain deposit certificate.
The above steps are explained in detail below.
In this embodiment, the applicant may negotiate the total amount of the policy with the policy company in advance and sign an agreement, and the applicant may also specify in the agreement the policy beneficiary of the policy and the benefit amounts of each policy beneficiary. Of course, in other embodiments, the applicant may also specify the proportion of claims to be paid by each policy beneficiary, the type of each beneficiary, such as whether it is a first type of beneficiary, a second type of beneficiary, etc. (different priorities of claims for different types of beneficiaries), or may also negotiate policy terms information, etc. The benefit amount will be described below as an example.
The applicant can encrypt the total sum of the policy and the benefited sum of each beneficiary under the chain to improve the security and avoid privacy disclosure. The following description takes Paillier homomorphic encryption as an example, and of course, other encryption methods may be adopted in other embodiments, which is not limited in this embodiment.
In this embodiment, the applicant may arbitrarily select two large prime numbers p and q, calculate n = p × q, and then select oneRandom number g, requirement
. Then using n and g as encryption key
And (5) storing. The applicant may then calculate the decryption key using equations (1) and (2) below
:
Where lcm is the least common multiple, and modn is the result of the remainder of n.
Assuming that the total amount of the policy is M, the beneficiary of the policy benefits the amount of M
And i is an integer of 1 or more. The applicant may calculate the total amount of the encrypted policy C and the encrypted benefit amount of each policy beneficiary using the following equations (3) and (4)
。
The applicant may then send a policy deposit transaction to the block chain node of the insurance company and in which the policy deposit transaction is madeCarrying the total encrypted policy C and the encrypted benefit of each policy beneficiary
And n is an integer of 1 or more.
After the block chain link point of the insurance company receives the policy deposit evidence transaction, the policy deposit evidence logic in the intelligent contract can be called to deposit the policy. That is, based on the homomorphic encryption technology, it can be determined whether the sum of the encrypted benefit amounts of the beneficiaries is equal to the total amount of the encrypted policy, and if so, a target policy can be generated based on the encrypted benefit amounts of the beneficiaries and the total amount of the encrypted policy, and the target policy is issued to the block chain for deposit. The evidence-saving method is described in the related art, and the embodiment is not described herein. And the total amount of the encrypted insurance policy can be stored for subsequent policy modification.
Because the encrypted beneficiary amount and the total encrypted policy amount of each beneficiary are obtained by encrypting through the homomorphic encryption technology, the encrypted data can be directly calculated without being decrypted based on the principle of the homomorphic encryption technology, and the obtained result is the same as the result obtained through calculation after decryption. Therefore, the original and unencrypted data can not be revealed in the process of storing the certificate in the target insurance policy, the data security can be improved, and the privacy of the applicant can be protected.
It should be noted that the policy storage and verification logic may be written in the same intelligent contract as the policy information acquisition logic in the foregoing embodiment, or may be written in two different intelligent contracts, which is not limited specifically. The logic in the intelligent contracts mentioned later in this specification is similar to this, that is, the same intelligent contract may be written in, and different intelligent contracts may also be written in, which will not be described in detail later.
In this embodiment, in addition to storing the encrypted benefit amount and the total encrypted policy amount of each beneficiary, other information may also be stored, such as the claim settlement proportion of each beneficiary, the type of each beneficiary, and the specified terms in the target policy. The data may also be encrypted, and for data that needs to be verified by performing mathematical operations such as those described above, a homomorphic encryption method may be used, and for some data that does not need to be verified by performing mathematical operations, such as text-type policy clause information, other encryption methods may also be used, which is not limited in this embodiment.
Second, policy modification
The method for policy modification in this embodiment may be applied to a block chain node of an insurance company, please refer to fig. 3, and the method for policy modification may include the following steps:
step 302, receiving a policy modification transaction initiated by an applicant, wherein the policy modification transaction is assigned with a target policy and encrypted benefit amounts of all policy beneficiaries after modification;
step 304, in response to the policy modification transaction, invoking policy modification logic in the intelligent contract to modify the target policy;
wherein the policy modification logic is to implement the steps of:
judging whether the sum of the modified encrypted beneficiary amounts of all policy beneficiaries is equal to the total encrypted policy amount or not based on a homomorphic encryption technology;
and if so, updating the encrypted benefit amount of each policy beneficiary in the target policy to the modified encrypted benefit amount of each policy beneficiary.
In this embodiment, the applicant may want to modify the target policy, such as modifying the benefit amount, claim proportion, type of beneficiary, policy term information for each beneficiary in the target policy. In the scenario described in this embodiment, the total amount of the policy is that the applicant has agreed with the insurance company in advance, and is not modified generally, but the information related to each beneficiary and some information on terms of the policy can be modified freely by the applicant. Of course, in other embodiments, the total amount of the policy may be modified, such as where the applicant sends a request to the insurer to modify the total amount of the policy, the insurer may audit the request, and if the audit is passed, the total amount of the policy may be modified.
In this embodiment, the applicant may send a policy modification transaction to the block chain node of the insurance company, and specify the target policy to be modified and the policy information to be modified in the modification transaction.
For example, the applicant may wish to modify the benefit amount of a beneficiary, and the applicant may homomorphically encrypt the modified benefit amount of the beneficiary. Can be expressed by the following formula (5):
wherein,
for the beneficiary i modified benefit amount,
the modified encrypted benefit amount for the homomorphic encrypted beneficiary i. Of course, since the total amount of the policy is not changed, if the benefit amount of a certain beneficiary is modified, the benefit amounts of other beneficiaries need to be modified correspondingly. The applicant can encrypt the benefit amount modified by each beneficiary by adopting the method, and then send the encrypted benefit amount modified by each beneficiary to the block chain node of the insurance company.
After the policy modification transaction is received by the block chain node of the insurance company, policy modification logic in the intelligent contract can be invoked to modify the target policy in response to the policy modification transaction. That is, whether a corresponding target policy exists or not can be found according to the target policy identifier carried in the transaction, and if so, the modified policy information can be obtained from the transaction and modified.
For example, if the modified policy information is the encrypted benefit amount of each policy beneficiary, then it can be determined based on homomorphic encryption techniques whether the sum of the modified encrypted benefit amounts of each policy beneficiary is equal to the sum of the encrypted benefit amounts provided by the applicant at the time the target policy was depositedEncrypting the total amount of the policy to determine
Whether or not it is equal to C. If so, the encrypted benefit amounts of the various beneficiaries present in the target policy may be modified with the modified encrypted benefit amounts of the various beneficiaries. If not, a notification may be sent to the applicant that the modification is not allowed, and the applicant may also be prompted to re-provide the modified encrypted benefit amounts for the respective beneficiaries.
For another example, the modified policy information may also be the encrypted claim proportion of each policy beneficiary, and the modified encrypted claim proportion of each beneficiary may also be verified based on the above similar method, and modified if the verification is passed.
For another example, the modified policy information may also be the beneficiary type of the specified policy beneficiary and the specified policy term information, and the target policy may be modified accordingly by using the information.
In this embodiment, after the target policy is modified, the policy modification logic in the intelligent contract may also return a message that the modification is successful to the applicant.
Third, policy information verification
The policy information verification method can be applied to block chain nodes of insurance companies.
In this embodiment, the user may send policy information verification transaction to the block chain node of the insurance company, and after receiving the transaction, the block chain node may call the intelligent contract to execute corresponding logic for verification. Wherein the intelligent contract may include policy information acquisition logic and policy validation logic. The method of policy information verification is described below in conjunction with these two logics.
Referring to fig. 4, the method for policy information verification may include the following steps:
step 402, after receiving policy information verification transaction sent by a user, judging whether a certificate corresponding to the policy information to be verified is stored; if yes, go to step 404; if not, go to step 406.
Step 404, sending the found certification to the user.
In this embodiment, the above steps 402 and 404 may be implemented by policy validation logic in the intelligent contract. After receiving the policy information verification transaction sent by the user, obtaining the policy information to be verified from the verification transaction, then searching whether the block chain stores the certificate corresponding to the policy information to be verified, and if the certificate can be searched, directly sending the searched certificate to the user without making the applicant generate the corresponding certificate. This can improve the verification efficiency.
The stored certificates on the blockchain can be historically generated certificates, that is, after a policy information verification transaction sent by a user is received each time and a corresponding certificate sent by an applicant is received, the certificates can be stored on the blockchain. The details will be described in detail in the following steps.
Step 406, invoking policy information obtaining logic in the intelligent contract, and determining encrypted real policy information corresponding to the policy information to be verified from the target policy stored in the block chain.
In this embodiment, the policy information obtaining logic in the intelligent contract may also perform preliminary verification on policy information to be verified.
In one example, the condition of the preliminary verification is independent of the corresponding target policy, for example, it may be verified whether the number of policy information verification transactions initiated by the user reaches a threshold number of times, and if so, it is determined that the preliminary verification fails. Then the policy information to be verified may be initially verified before the corresponding target policy is looked up from the blockchain.
In another example, the conditions of the preliminary verification are related to the corresponding target policy. For example, the benefit value range of the user can be verified, and the verification conditions of different policy for the benefit value range can be different. Then, the corresponding target policy may be found from the block chain, and then the condition of the benefit amount range corresponding to the target policy is obtained, and the policy information to be verified is verified based on the condition.
For example, the condition of the benefit amount range may be that the difference between the upper and lower limits of the amount of the benefit amount range is less than a maximum difference threshold and/or greater than a minimum difference threshold. Wherein, the maximum difference threshold and the minimum difference threshold can be preset.
For example, assuming that the maximum difference threshold is 5000, the minimum difference threshold is 1000, and the benefit amount range to be verified sent by the user is 10000< x <12000, 12000 + 10000=2000 may be calculated, and then it is determined whether 2000 is smaller than the maximum difference threshold 5000, and if so, it is determined that the benefit amount range passes the preliminary verification. Alternatively, it may be determined 2000 whether the minimum difference threshold is 1000, and if so, it is determined that the benefit amount range passes the preliminary verification. Or, it may be determined whether 2000 is less than the maximum difference threshold 5000 and greater than the minimum difference threshold 1000, and if both are satisfied, it is determined that the benefit amount range passes the preliminary verification.
Of course, besides the above-mentioned preliminary verification of the number of policy information verification transactions and the benefit amount range initiated by the user, other information may be preliminarily verified, such as whether the user has the verification authority, the term information in the policy, the benefit ratio of the beneficiary, the type of the beneficiary, and the like.
Step 408, storing the encrypted real policy information and the policy information to be verified in a transaction log of the policy information verification transaction, so that the policyholder of the target policy obtains the encrypted real policy information and the policy information to be verified from the transaction, and generating a proof of the policy information to be verified based on the encrypted real policy information by adopting a zero knowledge proof technology.
Step 410, the certification returned by the applicant is sent to the user for the user to verify the policy information to be verified based on the certification.
In this embodiment, the block link point of the insurance company may store the encrypted real policy information and the policy information to be verified in the transaction log, and the applicant may monitor the transaction log to obtain the encrypted real policy information and the policy information to be verified. The applicant can then decrypt the encrypted real policy information to obtain real policy information, and then generate a proof of the policy information to be verified based on the real policy information by using a zero-knowledge proof tool.
For example, when the policy information to be verified is a benefit amount range, the generated proof may be a range expression of the true benefit amount. For example, the range of benefit amounts sent by the user may be 11000< x <12000, and assuming the user's true benefit amount is 15000, the applicant may generate a corresponding proof based on a zero-knowledge proof tool, which may be an expression such as: 13000< x < 15000. The applicant may send this proof to the policy company's blockchain node, which may send it to the user, who may then enter 11000< x <12000 into the expression 13000< x <15000 for proof, and the resulting verification may be "yes", i.e., the user may know that his actual benefit amount is within 11000< x <12000 for his expected range.
Of course, the above examples are merely illustrative, and 13000, 15000 in the certification expression are both illustrative examples and do not represent actually generated certifications. Moreover, for the convenience of understanding, the above-mentioned proof expression is described in a plaintext manner, but in practical cases, the above-mentioned proof expression is encrypted by a zero-knowledge proof tool and is not shown to the user in a plaintext form.
In addition, the benefit amount range to be verified provided by the user may be, in addition to the above-mentioned range including the upper and lower limits, also a range including only the upper limit or only the lower limit, such as x >10000 and x <13000, which is not necessarily described herein in this embodiment.
As another example, the policy information to be verified may also be the type of beneficiary. For example, the user may ask whether he or she belongs to the first type of beneficiary, or may ask whether he or she does not belong to the first type of beneficiary. Then the actual beneficiary type for that user may be obtained from the target policy and a corresponding proof may be generated. After receiving the proof, the user can also input the policy information to be verified into the proof to obtain a corresponding answer.
Step 412, saving the proof, and saving the corresponding relationship between the proof and the policy information to be verified.
In this embodiment, step 412 may be implemented by invoking policy validation logic in the intelligent contract. Further, step 412 may be executed after step 410, before step 410, or in parallel, which is not particularly limited.
In this embodiment, after receiving the certificate sent by the applicant, the certificate may be stored, and the correspondence between the certificate and the policy information to be verified may be stored.
For example, taking the policy information to be verified as the benefit amount range desired by the user as an example, assuming that the benefit amount range to be verified is 10000< x <11000 yuan, and the applicant can generate certification 14000< x <15000, 10000< x <11000, 14000< x <15000, and the corresponding relationship therebetween can be saved. Table 1 may be seen to show, by way of example, the correspondence between some ranges of benefit amounts to be verified and corresponding proofs. Of course, the numerical values appearing in table 1 are merely illustrative and do not represent practical situations.
Of course, besides the above table 1, in other examples, the corresponding relationship may also be in other forms, such as beneficiary identification, policy identification, and the like.
In this embodiment, since the specific value of the benefit amount to be verified is determined by the user, which may be personalized and various, for example, 10000< x <11000, 10001< x <12000, 10200< x <10300, and 10150< x <11300 … …, if the certificates corresponding to these benefit amount ranges are all stored, the number of certificates that need to be guaranteed may be too large, which both occupies a storage space and is not favorable for fast search, and then the correspondence stored in the block chain may be adjusted, for example, in the above example, if the benefit amount ranges are all within 10000 to 12000, then the certificates corresponding to all the benefit amount ranges to be verified within 10000 to 12000 may be determined as 13000< x < 14000. The following table 2 can be obtained:
benefit value range to be verified
|
Zero knowledge proof
|
10000<x<12000
|
14000<x<15000 |
TABLE 2
And then, after receiving the policy information verification transaction initiated by the user and obtaining the benefit amount range to be verified, judging whether the benefit amount range belongs to 10000-12000, and if the benefit amount range belongs to the range, sending a certificate of 14000< x <15000 to the user.
Of course, in addition to the above example, other methods may be used to obtain the correspondence between the benefit amount range to be verified and the zero knowledge proof, for example, the applicant may also estimate the policy information to be verified initiated by the user, determine some corresponding proofs, and send the proofs and the correspondence between the proofs and the policy information to be verified to the block link points of the insurance company for storage.
As can be seen from the above description, in an embodiment of the present specification, after receiving a policy information verification transaction sent by a user, the policy information to be verified and corresponding encrypted real policy information may be sent to an applicant, so that the applicant generates a certificate, and in addition, whether a corresponding certificate is already stored on a block chain may also be searched for, if yes, the searched certificate may be directly sent to the user without the applicant generating the certificate again, which may greatly improve verification efficiency.
In correspondence with the foregoing embodiments of the policy information verification method based on zero knowledge proof, the present specification also provides embodiments of a policy information verification apparatus based on zero knowledge proof.
The embodiment of the insurance policy information verification device based on zero knowledge proof in the specification can be applied to the electronic equipment. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. Taking a software implementation as an example, as a logical device, the device is formed by reading, by a processor of the electronic device where the device is located, a corresponding computer program instruction in the nonvolatile memory into the memory for operation. From a hardware aspect, as shown in fig. 5, the hardware structure diagram of the electronic device in which the policy information verification apparatus based on zero knowledge proof is located in this specification is shown, except for the processor, the memory, the network interface, and the nonvolatile memory shown in fig. 5, the electronic device in which the apparatus is located in the embodiment may also include other hardware according to the actual function of the electronic device, which is not described again.
Fig. 6 is a block diagram of a policy information verifying apparatus based on zero knowledge proof according to an exemplary embodiment of the present specification.
Referring to fig. 6, the policy information verifying apparatus based on zero knowledge proof can be applied to the electronic device shown in fig. 5. Wherein:
the verification transaction receiving unit 610 is used for receiving policy information verification transactions sent by users, wherein target policies and policy information to be verified are appointed in the policy information verification transactions;
the obtaining unit 640, in response to the policy information verification transaction, invokes policy information obtaining logic in the intelligent contract to obtain encrypted real policy information corresponding to the policy information to be verified from the target policy stored in the blockchain;
the storage unit 650 stores the encrypted real policy information and the policy information to be verified into a transaction log of the policy information verification transaction, so that the policyholder of the target policy obtains the encrypted real policy information and the policy information to be verified from the transaction log, and generates a proof of the policy information to be verified based on the encrypted real policy information by adopting a zero-knowledge proof technology;
a sending unit 660, configured to send the certification returned by the applicant to the user, so that the user can verify the policy information to be verified based on the certification.
Optionally, when the policy information to be verified is in the benefit amount range of the user, before the policy information obtaining logic obtains the encrypted real policy information corresponding to the policy information to be verified from the target policy stored in the block chain, the policy information obtaining logic is further configured to implement the following steps:
judging whether the difference value between the upper limit and the lower limit of the amount of money in the benefit amount range is smaller than a maximum difference threshold value and/or larger than a minimum difference threshold value;
and if so, acquiring encrypted real policy information corresponding to the policy information to be verified from the target policy stored in the block chain.
Optionally, the apparatus further comprises:
the deposit certificate transaction receiving unit 670 receives the deposit certificate transaction of the insurance policy initiated by the applicant, wherein the deposit certificate transaction carries the total amount of the encrypted insurance policy obtained by encryption based on the homomorphic encryption technology and the encrypted benefit amount of each insurance policy beneficiary;
the evidence storing unit 680 is used for responding to the policy and evidence storing transaction and calling policy and evidence storing logic in the intelligent contract to store the target policy;
wherein the policy deposit logic in the intelligent contract is configured to implement the steps of:
judging whether the sum of the encrypted beneficiary amounts of all the policy beneficiaries is equal to the total encrypted policy amount or not based on a homomorphic encryption technology;
and if so, generating a target policy based on the total encrypted policy amount and the encrypted benefit amount of each policy beneficiary, and issuing the target policy to a block chain deposit certificate.
Optionally, the apparatus further comprises:
a modified transaction receiving unit 690, receiving a policy modification transaction initiated by the applicant, wherein the policy modification transaction specifies a target policy and encrypted benefit amounts of each policy beneficiary after modification;
a modification unit 700 for invoking policy modification logic in the intelligent contract to modify the target policy in response to the policy modification transaction;
wherein the policy modification logic is to implement the steps of:
judging whether the sum of the modified encrypted beneficiary amounts of all policy beneficiaries is equal to the total encrypted policy amount or not based on a homomorphic encryption technology;
and if so, updating the encrypted benefit amount of each policy beneficiary in the policy to the encrypted benefit amount of each policy beneficiary after modification.
Optionally, the apparatus further comprises:
the storage unit 620 is used for issuing the certification and the corresponding relation between the certification and the policy information to be verified to a block chain storage certificate after receiving the certification sent by the applicant;
after the receiving the policy information verification transaction initiated by the user, the method further comprises:
the judging unit 630, in response to the policy information verification transaction, invokes a policy verification logic in the intelligent contract to judge whether a certificate corresponding to the policy information to be verified is stored; and if so, sending the found certificate to the user.
Optionally, the policy information to be verified includes one or more of the following:
a benefit amount range;
whether it is a policy beneficiary of a specified type;
whether it is not a policy beneficiary of the specified type;
specified clause information of the target policy.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution in the specification. One of ordinary skill in the art can understand and implement it without inventive effort.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
Corresponding to the embodiment of the policy information verification method based on zero knowledge proof, the specification also provides a policy information verification device based on zero knowledge proof, which comprises: a processor and a memory for storing machine executable instructions. Wherein the processor and the memory are typically interconnected by means of an internal bus. In other possible implementations, the device may also include an external interface to enable communication with other devices or components.
In this embodiment, the processor is caused to, by reading and executing machine-executable instructions stored by the memory that correspond to the zero-knowledge proof-based policy information validation logic:
receiving policy information verification transaction sent by a user, wherein a target policy and policy information to be verified are appointed in the policy information verification transaction;
responding to the policy information verification transaction, calling policy information acquisition logic in the intelligent contract to acquire encrypted real policy information corresponding to the policy information to be verified from the target policy stored on the block chain;
storing the encrypted real policy information and the policy information to be verified into a transaction log of the policy information verification transaction, so that an applicant of the target policy obtains the encrypted real policy information and the policy information to be verified from the transaction log, and generating a proof of the policy information to be verified based on the encrypted real policy information by adopting a zero-knowledge proof technology;
and sending the certification returned by the applicant to the user so that the user can verify the policy information to be verified based on the certification.
Optionally, when the policy information to be verified is in the benefit amount range of the user, before the policy information obtaining logic obtains the encrypted real policy information corresponding to the policy information to be verified from the target policy stored in the block chain, the policy information obtaining logic is further configured to implement the following steps:
judging whether the difference value between the upper limit and the lower limit of the amount of money in the benefit amount range is smaller than a maximum difference threshold value and/or larger than a minimum difference threshold value;
and if so, acquiring encrypted real policy information corresponding to the policy information to be verified from the target policy stored in the block chain.
Optionally, during the credentialing process of the target policy, the processor is caused to:
receiving a policy deposit certificate transaction initiated by an applicant, wherein the policy deposit certificate transaction carries an encrypted policy total amount obtained by encryption based on a homomorphic encryption technology and encrypted benefit amounts of all policy beneficiaries;
in response to the policy deposit transaction, invoking policy deposit logic in the intelligent contract to deposit the target policy;
wherein the policy deposit logic in the intelligent contract is configured to implement the steps of:
judging whether the sum of the encrypted beneficiary amounts of all the policy beneficiaries is equal to the total encrypted policy amount or not based on a homomorphic encryption technology;
and if so, generating a target policy based on the total encrypted policy amount and the encrypted benefit amount of each policy beneficiary, and issuing the target policy to a block chain deposit certificate.
Optionally, the processor is further caused to:
receiving a policy modification transaction initiated by an applicant, wherein the policy modification transaction is appointed with a target policy and encrypted benefit amounts of all policy beneficiaries after modification;
invoking policy modification logic in an intelligent contract to modify the target policy in response to the policy modification transaction;
wherein the policy modification logic is to implement the steps of:
judging whether the sum of the modified encrypted beneficiary amounts of all policy beneficiaries is equal to the total encrypted policy amount or not based on a homomorphic encryption technology;
and if so, updating the encrypted benefit amount of each policy beneficiary in the policy to the encrypted benefit amount of each policy beneficiary after modification.
Optionally, the processor is further caused to:
after receiving the certification sent by the applicant, issuing the certification and the corresponding relation between the certification and the policy information to be verified to a block chain deposit certificate;
after the receiving the policy information verification transaction initiated by the user, the method further comprises:
responding to the policy information verification transaction, calling policy verification logic in the intelligent contract to judge whether a certificate corresponding to the policy information to be verified is stored; and if so, sending the found certificate to the user.
Optionally, the policy information to be verified includes one or more of the following:
a benefit amount range;
whether it is a policy beneficiary of a specified type;
whether it is not a policy beneficiary of the specified type;
specified clause information of the target policy.
In correspondence with the aforementioned embodiments of the policy information verification method based on zero knowledge proof, the present specification also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of:
receiving policy information verification transaction sent by a user, wherein a target policy and policy information to be verified are appointed in the policy information verification transaction;
responding to the policy information verification transaction, calling policy information acquisition logic in the intelligent contract to acquire encrypted real policy information corresponding to the policy information to be verified from the target policy stored on the block chain;
storing the encrypted real policy information and the policy information to be verified into a transaction log of the policy information verification transaction, so that an applicant of the target policy obtains the encrypted real policy information and the policy information to be verified from the transaction log, and generating a proof of the policy information to be verified based on the encrypted real policy information by adopting a zero-knowledge proof technology;
and sending the certification returned by the applicant to the user so that the user can verify the policy information to be verified based on the certification.
Optionally, when the policy information to be verified is in the benefit amount range of the user, before the policy information obtaining logic obtains the encrypted real policy information corresponding to the policy information to be verified from the target policy stored in the block chain, the policy information obtaining logic is further configured to implement the following steps:
judging whether the difference value between the upper limit and the lower limit of the amount of money in the benefit amount range is smaller than a maximum difference threshold value and/or larger than a minimum difference threshold value;
and if so, acquiring encrypted real policy information corresponding to the policy information to be verified from the target policy stored in the block chain.
Optionally, the process of storing the target policy includes:
receiving a policy deposit certificate transaction initiated by an applicant, wherein the policy deposit certificate transaction carries an encrypted policy total amount obtained by encryption based on a homomorphic encryption technology and encrypted benefit amounts of all policy beneficiaries;
in response to the policy deposit transaction, invoking policy deposit logic in the intelligent contract to deposit the target policy;
wherein the policy deposit logic in the intelligent contract is configured to implement the steps of:
judging whether the sum of the encrypted beneficiary amounts of all the policy beneficiaries is equal to the total encrypted policy amount or not based on a homomorphic encryption technology;
and if so, generating a target policy based on the total encrypted policy amount and the encrypted benefit amount of each policy beneficiary, and issuing the target policy to a block chain deposit certificate.
Optionally, the method further includes:
receiving a policy modification transaction initiated by an applicant, wherein the policy modification transaction is appointed with a target policy and encrypted benefit amounts of all policy beneficiaries after modification;
invoking policy modification logic in an intelligent contract to modify the target policy in response to the policy modification transaction;
wherein the policy modification logic is to implement the steps of:
judging whether the sum of the modified encrypted beneficiary amounts of all policy beneficiaries is equal to the total encrypted policy amount or not based on a homomorphic encryption technology;
and if so, updating the encrypted benefit amount of each policy beneficiary in the policy to the encrypted benefit amount of each policy beneficiary after modification.
Optionally, the method further includes:
after receiving the certification sent by the applicant, issuing the certification and the corresponding relation between the certification and the policy information to be verified to a block chain deposit certificate;
after the receiving the policy information verification transaction initiated by the user, the method further comprises:
responding to the policy information verification transaction, calling policy verification logic in the intelligent contract to judge whether a certificate corresponding to the policy information to be verified is stored; and if so, sending the found certificate to the user.
Optionally, the policy information to be verified includes one or more of the following:
a benefit amount range;
whether it is a policy beneficiary of a specified type;
whether it is not a policy beneficiary of the specified type;
specified clause information of the target policy.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The above description is only a preferred embodiment of the present disclosure, and should not be taken as limiting the present disclosure, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.