Blockchain-based pharmaceutical marketing data sharing method and system

By compiling pharmaceutical marketing business rules into multi-port arithmetic circuits on the blockchain, pharmaceutical companies and medical institutions can generate zero-knowledge proofs locally, solving the problems of cross-entity data association verification and dynamic compliance judgment, and realizing trusted sharing and privacy protection that adapts to seasonal differences.

CN121233557BActive Publication Date: 2026-04-03JIANGXI UNIVERSITY OF TRADITIONAL CHINESE MEDICINE
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-24
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing technologies struggle to achieve cross-entity correlation verification and dynamic compliance determination between pharmaceutical company marketing data and medical institution drug usage data while ensuring data privacy, and traditional methods cannot meet the seasonal differences required for pharmaceutical marketing operations.

Method used

By compiling pharmaceutical marketing business rules into multi-port arithmetic circuits, generating verification keys, and deploying them in blockchain smart contracts, pharmaceutical companies and medical institutions can generate zero-knowledge proofs locally and use time-cycle identifiers and dynamic compliance thresholds for cross-entity verification.

Benefits of technology

It enables cross-entity compliance verification without exposing the original data, improves the adaptability of rule verification to seasonal fluctuations, and ensures the reliable execution of data privacy protection and cross-domain verification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121233557B_ABST
    Figure CN121233557B_ABST
Patent Text Reader

Abstract

This invention relates to the field of pharmaceutical marketing data sharing technology, specifically a blockchain-based method and system for sharing pharmaceutical marketing data. The method includes: compiling a plaintext description of pharmaceutical marketing business rules into an arithmetic circuit with a multi-port structure and generating a verification key, which is then deployed in a blockchain smart contract; a verification node initiating a verification request containing data type, business rule identifier, and time period identifier; pharmaceutical company nodes and medical institution nodes respectively loading their local privacy data into the input port and generating corresponding first and second zero-knowledge proofs; and the verification smart contract loading the verification key according to the time period identifier to collaboratively verify the two zero-knowledge proofs and generating a conclusion for on-chain storage. This invention achieves cross-entity correlation verification without aggregating original data and improves the accuracy and auditability of compliance determination through an adaptive time period threshold.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of pharmaceutical marketing data sharing technology, specifically a blockchain-based pharmaceutical marketing data sharing method and system. Background Technology

[0002] Currently, the regulation and compliance verification of pharmaceutical marketing data mainly relies on data flow between pharmaceutical companies, medical institutions, and regulatory authorities. However, although pharmaceutical companies' drug promotion investment data and medical institutions' prescription and medication data are closely related, they are difficult to share directly and centrally due to trade secrets and privacy protection issues.

[0003] Traditional centralized aggregation platforms require all parties to report raw data to a unified node for statistical analysis. This process not only increases the risk of data leakage and tampering but also fails to meet stringent data compliance requirements. While blockchain provides immutable evidence storage capabilities, it is limited to recording data from a single party and cannot achieve real-time verification of data relationships between cross-entity entities. Therefore, it cannot support the regulatory authorities' dynamic judgment of complex business rules. Furthermore, existing cross-domain verification methods based on zero-knowledge proofs typically only prove and verify static constraints, failing to consider the significant differences in the time dimension between pharmaceutical marketing and disease occurrence. For example, the prescription growth patterns of certain drugs differ drastically between flu season and non-flu season. If a fixed threshold is used for verification across different time periods, the results may be distorted, failing to accurately detect abnormal marketing behavior and potentially leading to misjudgments regarding the promotion of compliant drugs.

[0004] Therefore, there is an urgent need for a blockchain-based method and system for sharing pharmaceutical marketing data, which can achieve trusted verification and dynamic compliance determination of cross-entity data while ensuring privacy and compliance. Summary of the Invention

[0005] (1) Technical problems to be solved

[0006] The purpose of this invention is to provide a blockchain-based method and system for sharing pharmaceutical marketing data, in order to solve the problem in the prior art of making it difficult to perform cross-entity association verification and dynamic compliance determination of pharmaceutical company marketing data and medical institution drug use data while ensuring data privacy.

[0007] (2) Technical solution

[0008] To achieve the above objectives, in one aspect, the present invention provides a blockchain-based method for sharing pharmaceutical marketing data, the method comprising:

[0009] Step S1: Obtain the plaintext description of the pharmaceutical marketing business rules; compile the plaintext description to obtain an arithmetic circuit and its identifier, wherein the arithmetic circuit includes a first input port, a second input port and an output constraint; generate a verification key based on the arithmetic circuit; deploy the verification key in a verification smart contract on the blockchain.

[0010] Step S2: The verification node initiates a verification request to the blockchain network. The verification request includes the required data type, business rule identifier, and time period identifier. The blockchain network queries the pharmaceutical enterprise nodes holding drug marketing data and the medical institution nodes holding drug usage data according to the data type, and issues calculation task instructions to the pharmaceutical enterprise nodes and medical institution nodes.

[0011] Step S3: In a local privacy environment, the pharmaceutical company node loads the drug marketing data it holds into the first input port and executes the proof generation process according to the output constraints to obtain the first zero-knowledge proof; in a local privacy environment, the medical institution node loads the drug usage data it holds into the second input port and executes the proof generation process according to the output constraints to obtain the second zero-knowledge proof.

[0012] Step S4: The pharmaceutical company node and the medical institution node send the first zero-knowledge proof and the second zero-knowledge proof to the blockchain network; the verification smart contract selects the corresponding verification key according to the time period identifier to verify the first zero-knowledge proof and the second zero-knowledge proof and obtain the verification conclusion; the verification conclusion is written into the blockchain ledger.

[0013] Preferably, the method for compiling the plaintext description to obtain the arithmetic circuit and its identifier includes:

[0014] The plaintext description of pharmaceutical marketing business rules is parsed to extract the verification subject, target data object, and relationship operator; the relationship operator is then mapped to a verifiable function. ,in For pharmaceutical companies' marketing data variable set, For medical institutions to use the data variable set; the verifiable function Breaking down into pharmaceutical company marketing data variable sets X constraints, data variable sets used by medical institutions Y-constraints and a set of variables including pharmaceutical company marketing data With data variable set Interaction constraints .

[0015] pharmaceutical company marketing data variable set The fields are mapped to the first input port fields according to the field identifier and the index position of the first input port; the data variable set used by medical institutions is then used. The fields are mapped to the index position of the second input port according to the field identifier; the second input port field mapping relationship is established. The constraints are mapped and compiled into a first sub-circuit connected to the first input port; the Y-constraints are mapped and compiled into a second sub-circuit connected to the second input port; the interaction constraints are... Compile into an interactive sub-circuit connecting the first sub-circuit and the second sub-circuit.

[0016] Based on the statistical characteristics of the correlation between drug marketing data and drug usage data calculated over different time periods, a dynamic compliance threshold is generated, ranging from time period identifiers to threshold values. The compliance threshold mapping table is stored in the verification smart contract; from the verifiable function The judgment predicate is obtained from the data, and the dynamic compliance threshold is used to determine the dynamic compliance threshold. As the output constraint of the circuit; the identifier of the arithmetic circuit is obtained by hash operation based on the first sub-circuit, the second sub-circuit, the interactive sub-circuit and the output constraint.

[0017] Preferably, the step of mapping the association operator to a verifiable function... The methods include:

[0018] pharmaceutical company marketing data variable set Based on the mapping relationship of the first input port field, a predefined preprocessing function is used. The calculation yielded the intermediate result sequence from the pharmaceutical company's side. ; Set of data variables used by medical institutions Based on the mapping relationship of the second input port field, a predefined mapping function is used. The calculation yields the intermediate result sequence from the medical institution side. .

[0019] Intermediate result sequence on the pharmaceutical company side Weighted combination is used to obtain the scalar value of the tablets on the pharmaceutical company's side. ; Intermediate result sequence for medical institutions Weighted combination is used to obtain the medical institution side segment scalar. ; Set of marketing data variables from pharmaceutical companies Data variable sets used by medical institutions Substitute the corresponding fields of the interaction constraint into the interaction constraint. In this process, the intermediate quantities of the interaction are computed within the finite field required by the zero-knowledge proof protocol. .

[0020] According to the pharmaceutical company's side of the scalar quantity Medical institution side segmentation standard and Interactive Intermediate Quantity Constructing statistical verification functions And compute the statistical verification function within the finite domain. Get the result value ; Obtain time period identifier The time period identifier is obtained by querying the compliance threshold mapping table. Corresponding dynamic compliance threshold According to the result value and dynamic compliance thresholds Construct a verifiable function .

[0021] Preferably, the method by which the pharmaceutical company node loads its held drug marketing data into the first input port in a local privacy environment and executes a proof generation process according to the output constraints to obtain a first zero-knowledge proof; and the method by which the medical institution node loads its held drug usage data into the second input port in a local privacy environment and executes a proof generation process according to the output constraints to obtain a second zero-knowledge proof includes:

[0022] Obtain the common reference string bound to the identifier of the arithmetic circuit; parse the time period identifier from the verification request issued by the verification node. .

[0023] The pharmaceutical node uses the public reference string and the pharmaceutical-side fragment scalar. The first random parameter is calculated using a key derivation function; the first random parameter and the pharmaceutical company-side scalar are then mapped according to the mapping relationship of the first input port field. Loaded to the first input port of the arithmetic circuit and the time period is identified. As a common input, the first sub-circuit is processed by the zk-SNARK proof generation algorithm to obtain the first zero-knowledge proof.

[0024] The medical institution node is based on the public reference string and the medical institution-side sharding scalar. The second random parameter is calculated using a key derivation function; based on the mapping relationship of the second input port field, the second random parameter and the medical institution-side scalar are... The time period is then loaded onto the second input port of the arithmetic circuit and identified. As a common input, the second sub-circuit is processed by the zk-SNARK proof generation algorithm to obtain the second zero-knowledge proof.

[0025] Preferably, the method for verifying the smart contract by selecting a corresponding verification key based on the time period identifier to verify the first zero-knowledge proof and the second zero-knowledge proof and obtain a verification conclusion includes:

[0026] The verification smart contract uses the time period identifier carried in the verification request. The corresponding dynamic compliance threshold is obtained by querying the compliance threshold mapping table. The corresponding verification key is loaded; the first zero-knowledge proof is verified according to the verification key to obtain a first verification result; the second zero-knowledge proof is verified according to the verification key to obtain a second verification result.

[0027] Verify whether the hash values ​​of the public reference strings referenced by the first and second zero-knowledge proofs are consistent; verify whether the time period identifiers referenced by the first and second zero-knowledge proofs are consistent. Does it match the time period identifier in the verification request? If both the first and second verification results are valid, and the hash values ​​of the common reference strings are consistent, and the time period identifiers are consistent, then a verification conclusion that passes verification is generated; otherwise, a verification conclusion that fails verification is generated.

[0028] Based on the same inventive concept, this invention also provides a blockchain-based pharmaceutical marketing data sharing system, the system comprising:

[0029] A circuit generation module is used to obtain a plaintext description of pharmaceutical marketing business rules; compile the plaintext description to obtain an arithmetic circuit and its identifier, wherein the arithmetic circuit includes a first input port, a second input port and an output constraint; generate a verification key based on the arithmetic circuit; and deploy the verification key in a verification smart contract on the blockchain.

[0030] The task allocation module is used to verify that nodes initiate verification requests to the blockchain network. The verification requests include the required data type, business rule identifier, and time period identifier. The blockchain network queries pharmaceutical enterprise nodes that hold drug marketing data and medical institution nodes that hold drug usage data based on the data type, and issues calculation task instructions to the pharmaceutical enterprise nodes and medical institution nodes.

[0031] The proof generation module is used by pharmaceutical enterprise nodes in a local privacy environment to load the drug marketing data they hold into the first input port and execute the proof generation process according to the output constraints to obtain a first zero-knowledge proof; and by medical institution nodes in a local privacy environment to load the drug usage data they hold into the second input port and execute the proof generation process according to the output constraints to obtain a second zero-knowledge proof.

[0032] The on-chain verification module is used by pharmaceutical company nodes and medical institution nodes to send the first zero-knowledge proof and the second zero-knowledge proof to the blockchain network; the verification smart contract selects the corresponding verification key according to the time period identifier to verify the first zero-knowledge proof and the second zero-knowledge proof to obtain the verification conclusion; and the verification conclusion is written into the blockchain ledger.

[0033] Preferably, the circuit generation module includes:

[0034] The circuit compilation module is used to parse the plaintext description of pharmaceutical marketing business rules, extract the verification subject, target data object, and association operator; and map the association operator into verifiable functions. ,in For pharmaceutical companies' marketing data variable set, For medical institutions to use the data variable set; the verifiable function Breaking down into pharmaceutical company marketing data variable sets X constraints, data variable sets used by medical institutions Y-constraints and a set of variables including pharmaceutical company marketing data With data variable set Interaction constraints .

[0035] pharmaceutical company marketing data variable set The fields are mapped to the first input port fields according to the field identifier and the index position of the first input port; the data variable set used by medical institutions is then used. The fields are mapped to the index position of the second input port according to the field identifier; the second input port field mapping relationship is established. The constraints are mapped and compiled into a first sub-circuit connected to the first input port; the Y-constraints are mapped and compiled into a second sub-circuit connected to the second input port; the interaction constraints are... Compile into an interactive sub-circuit connecting the first sub-circuit and the second sub-circuit.

[0036] Based on the statistical characteristics of the correlation between drug marketing data and drug usage data calculated over different time periods, a dynamic compliance threshold is generated, ranging from time period identifiers to threshold values. The compliance threshold mapping table is stored in the verification smart contract; from the verifiable function The judgment predicate is obtained from the data, and the dynamic compliance threshold is used to determine the dynamic compliance threshold. As the output constraint of the circuit; the identifier of the arithmetic circuit is obtained by hash operation based on the first sub-circuit, the second sub-circuit, the interactive sub-circuit and the output constraint.

[0037] Preferably, the circuit compilation module includes:

[0038] The function mapping module is used to map pharmaceutical company marketing data variables. Based on the mapping relationship of the first input port field, a predefined preprocessing function is used. The calculation yielded the intermediate result sequence from the pharmaceutical company's side. ; Set of data variables used by medical institutions Based on the mapping relationship of the second input port field, a predefined mapping function is used. The calculation yields the intermediate result sequence from the medical institution side. .

[0039] Intermediate result sequence on the pharmaceutical company side Weighted combination is used to obtain the scalar value of the tablets on the pharmaceutical company's side. ; Intermediate result sequence for medical institutions Weighted combination is used to obtain the medical institution side segment scalar. ; Set of marketing data variables from pharmaceutical companies Data variable sets used by medical institutions Substitute the corresponding fields of the interaction constraint into the interaction constraint. In this process, the intermediate quantities of the interaction are computed within the finite field required by the zero-knowledge proof protocol. .

[0040] According to the pharmaceutical company's side of the scalar quantity Medical institution side segmentation standard and Interactive Intermediate Quantity Constructing statistical verification functions And compute the statistical verification function within the finite domain. Get the result value ; Obtain time period identifier The time period identifier is obtained by querying the compliance threshold mapping table. Corresponding dynamic compliance threshold According to the result value and dynamic compliance thresholds Construct a verifiable function .

[0041] Preferably, the proof generation module includes:

[0042] The parameter acquisition unit is used to acquire a common reference string bound to the identifier of the arithmetic circuit; and to parse the time period identifier from the verification request issued by the verification node. .

[0043] The first proof generation unit is used by the pharmaceutical enterprise node to generate proofs based on the public reference string and the pharmaceutical enterprise-side sharding scalar. The first random parameter is calculated using a key derivation function; the first random parameter and the pharmaceutical company-side scalar are then mapped according to the mapping relationship of the first input port field. Loaded to the first input port of the arithmetic circuit and the time period is identified. As a common input, the first sub-circuit is processed by the zk-SNARK proof generation algorithm to obtain the first zero-knowledge proof.

[0044] The second proof generation unit is used by the medical institution node to generate proofs based on the public reference string and the medical institution-side sharding scalar. The second random parameter is calculated using a key derivation function; based on the mapping relationship of the second input port field, the second random parameter and the medical institution-side scalar are... The time period is then loaded onto the second input port of the arithmetic circuit and identified. As a common input, the second sub-circuit is processed by the zk-SNARK proof generation algorithm to obtain the second zero-knowledge proof.

[0045] Preferably, the on-chain verification module includes:

[0046] The verification and determination unit is used to verify the smart contract based on the time period identifier carried in the verification request. The corresponding dynamic compliance threshold is obtained by querying the compliance threshold mapping table. The corresponding verification key is loaded; the first zero-knowledge proof is verified according to the verification key to obtain a first verification result; the second zero-knowledge proof is verified according to the verification key to obtain a second verification result.

[0047] Verify whether the hash values ​​of the public reference strings referenced by the first and second zero-knowledge proofs are consistent; verify whether the time period identifiers referenced by the first and second zero-knowledge proofs are consistent. Does it match the time period identifier in the verification request? If both the first and second verification results are valid, and the hash values ​​of the common reference strings are consistent, and the time period identifiers are consistent, then a verification conclusion that passes verification is generated; otherwise, a verification conclusion that fails verification is generated.

[0048] (3) Beneficial effects

[0049] Compared with the prior art, the beneficial effects of the present invention are:

[0050] This invention compiles pharmaceutical marketing business rules into an arithmetic circuit with multiple ports and output constraints, introduces time period identifiers and dynamic thresholds, enabling pharmaceutical companies and medical institutions to independently generate zero-knowledge proofs locally and submit them to a blockchain-based smart contract for verification. This mechanism achieves cross-entity compliance verification without exposing any raw data, and improves the adaptability of rule verification to seasonal fluctuations through dynamic thresholds, thereby simultaneously ensuring data privacy protection and reliable execution of cross-domain verification. Attached Figure Description

[0051] Figure 1 This is a flowchart of a blockchain-based pharmaceutical marketing data sharing method according to Embodiment 1 of the present invention;

[0052] Figure 2 This is a block diagram of the blockchain-based pharmaceutical marketing data sharing system according to Embodiment 2 of the present invention;

[0053] Figure 3 This is a schematic diagram of an arithmetic circuit structure provided in an embodiment of the present invention. Detailed Implementation

[0054] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0055] Before providing examples, it's necessary to explain the application scenarios of this invention. In pharmaceutical marketing, there's a natural business relationship between pharmaceutical companies' drug promotion investments, medical institutions' prescription issuance, retail pharmacy sales, and medical insurance department's settlement and reimbursement. Regulators and industry participants often need to verify the correlation between these cross-entity data to ensure the authenticity and compliance of marketing activities. However, due to data sensitivity, privacy concerns, and the "no unnecessary provision" compliance requirement, data cannot be centrally shared. Traditional centralized data aggregation platforms face the risk of leakage and tampering, while simple blockchain-based evidence storage only guarantees data immutability and cannot support cross-domain real-time verification. Furthermore, the pharmaceutical business exhibits significant seasonality, with substantial differences in disease incidence and drug demand across seasons. Ignoring the time dimension during verification can lead to distorted compliance assessments. For example, a surge in prescriptions for the same drug during flu season might be reasonable, but a similar increase during non-seasonal periods could indicate abnormal marketing behavior. Therefore, the verification method not only needs to achieve cross-entity data correlation verification, but also needs to introduce time factors and seasonal constraints to enable the verification process to dynamically adjust compliance thresholds and ensure that the judgment results conform to business rules. This invention is proposed based on the above scenario, aiming to compile pharmaceutical marketing business rules into an arithmetic circuit containing a time factor port, enabling different entities to generate zero-knowledge proofs locally and complete cross-entity verification and dynamic compliance judgment on the blockchain network. This achieves both data privacy protection and a reasonable consideration of trusted sharing and seasonal differences.

[0056] Example 1: As Figure 1 As shown in the figure, this embodiment provides a blockchain-based method for sharing pharmaceutical marketing data, the method comprising:

[0057] Step S1: Obtain the plaintext description of the pharmaceutical marketing business rules; compile the plaintext description into an arithmetic circuit and its identifier, the arithmetic circuit including a first input port, a second input port, and output constraints; generate a verification key based on the arithmetic circuit; deploy the verification key in a verification smart contract on the blockchain. First, obtain the plaintext description of the pharmaceutical marketing business rules from compliance documents or regulatory requirements. Then, use a circuit compilation engine to compile the above plaintext description into an arithmetic circuit. During the compilation process, based on the statistical characteristics of the correlation between drug marketing data and drug usage data calculated according to different time periods (such as quarterly or annually), generate a time period identifier. To the dynamic compliance threshold The compliance threshold mapping table. See also... Figure 3The arithmetic circuit adopts a multi-port isolated structure design, including: a first input port (101), configured to receive drug marketing data provided by pharmaceutical company nodes; a second input port (102), configured to receive drug usage data provided by medical institution nodes; a first sub-circuit (201), whose input end is electrically connected to the first input port (101), configured to perform format and range verification on the input pharmaceutical company marketing data; a second sub-circuit (202), whose input end is electrically connected to the second input port (102), configured to perform validity verification on the input medical institution usage data; an interaction sub-circuit (301), whose first input end is connected to the output end of the first sub-circuit (201), and whose second input end is connected to the output end of the second sub-circuit (202), configured to perform correlation calculation on the pharmaceutical company marketing data and the medical institution usage data; and an output constraint (401), whose input end is connected to the output end of the interaction sub-circuit (301), configured to perform correlation calculation based on the correlation calculation result and the time period identifier. Determined dynamic compliance thresholds The data is compared and the final verification conclusion is output. The data is input from the first input port (101) and the second input port (102) respectively. After preliminary processing by the first sub-circuit (201) and the second sub-circuit (202), the results are fed into the interaction sub-circuit (301) for correlation calculation. Finally, the output constraint (401) is combined with the current time period identifier. The compliance threshold mapping table generates a compliance determination result. During compilation, a corresponding verification key is generated based on the circuit structure. This verification key and the compliance threshold mapping table are ultimately deployed in the verification smart contract of the blockchain network. The circuit identifier uses the SHA-256 hash algorithm to generate a unique identifier for the circuit structure. It should be noted that... Figure 3 The specific logic functions of the first sub-circuit 201, the second sub-circuit 202, and the interactive sub-circuit 301 shown are determined by the pharmaceutical marketing business rules that need to be compiled. Figure 3 It demonstrates its general data flow and connection structure, rather than limiting the specific function of the circuit. The threshold referenced in the output constraint (401) is dynamic, which is the core difference between it and a fixed threshold circuit.

[0058] Step S2: The verification node initiates a verification request to the blockchain network. The verification request includes the required data type, business rule identifier, and time period identifier. The blockchain network queries pharmaceutical company nodes holding drug marketing data and medical institution nodes holding drug usage data based on the data type, and then issues computation task instructions to these nodes. The verification node can be a regulatory agency or auditor node. Its verification request includes the data type to be verified, a business rule identifier, and a key time period identifier t (e.g., "Q1 2024"). This identifier is used to determine the dynamic compliance threshold to be used in this verification. Based on the data type in the request, the blockchain network queries the node registry to find pharmaceutical company nodes holding relevant drug marketing data and medical institution nodes holding drug usage data. Then, through the blockchain event notification mechanism, it issues computation task instructions to these nodes. The instructions include the arithmetic circuit identifier to be executed and the time period identifier. And the address for obtaining the public reference string. It is understood that the solution described in this invention also supports multi-party verification. The arithmetic circuit can be extended to include multiple first-type input ports and / or multiple second-type input ports to support multiple pharmaceutical company nodes and / or multiple medical institution nodes participating in a verification task simultaneously. In this multi-party scenario, all participating nodes will use a unified time period identifier in the verification request. Each participant generates its own zero-knowledge proof. The verification smart contract will collaboratively verify the zero-knowledge proofs generated by all participants, check whether the time period identifiers referenced by all proofs are consistent, and finally output a unified verification conclusion.

[0059] Step S3: In a local privacy environment, the pharmaceutical company node loads its held drug marketing data into the first input port and executes the proof generation process according to the output constraints to obtain a first zero-knowledge proof; in a local privacy environment, the medical institution node loads its held drug usage data into the second input port and executes the proof generation process according to the output constraints to obtain a second zero-knowledge proof; the pharmaceutical company node loads its held drug marketing data in a local trusted execution environment. This data includes sensitive commercial data such as drug promotion expenses and marketing activity expenditures, and loads the data into the first input port of the arithmetic circuit according to the field mapping relationship of the first input port. Based on the time period identifier obtained from the computation task instruction... In accordance with the output constraints, the first zero-knowledge proof is generated using the zk-SNARK (Groth16 protocol) proof generation algorithm. When generating the zero-knowledge proof, pharmaceutical company nodes or medical institution nodes must include a time period identifier. Incorporating this crucial public input into the proof generation process not only ensures the uniqueness and timeliness of the generated proof, preventing replay attacks, but more importantly, it links the calculation of this proof to a specific dynamic compliance threshold. They are bound together. The medical institution node also operates in a local, privacy-focused environment, loading its usage data, such as prescription data and drug sales data, into the circuit via an index mapping on the second input port, and using the same time period identifier. As a common input, a second zero-knowledge proof is independently generated, ensuring that the original data never leaves the local environment.

[0060] Step S4: The pharmaceutical company node and the medical institution node send the first zero-knowledge proof and the second zero-knowledge proof to the blockchain network; the verification smart contract selects the corresponding verification key according to the time period identifier to verify the first zero-knowledge proof and the second zero-knowledge proof and obtain the verification conclusion; the verification conclusion is written into the blockchain ledger. The pharmaceutical company node and the medical institution node submit the generated first zero-knowledge proof and the second zero-knowledge proof to the network through blockchain transactions. The verification smart contract first uses the time period identifier carried in the verification request. The corresponding dynamic compliance threshold is obtained by querying the deployed compliance threshold mapping table. The system loads the verification key corresponding to the threshold and verifies the two proofs separately. The verification process includes: checking the mathematical completeness of each zero-knowledge proof using the verification key and bilinear pairing operations (i.e., verifying whether it was generated from real original data according to the correct circuit calculation); verifying whether the hash values ​​of the common reference strings referenced by the two proofs are consistent; and verifying the time period identifiers referenced in the two proofs. Does it match the information in this verification request? Complete consistency. The smart contract generates a "verification passed" conclusion if and only if both proofs are valid, the public reference strings are identical, and the time period identifiers are identical, indicating that the business relationship between the pharmaceutical company's marketing data and the medical institution's usage data within that time period conforms to the preset rules. If either proof is invalid, the public reference strings do not match, or the time period identifiers are inconsistent, a "verification failed" conclusion is generated, with the specific reason for failure noted in the conclusion. Finally, this conclusion, along with the verification timestamp, participating node identifiers, and the time period identifier used, is processed. and dynamic threshold Information such as these are written together into the blockchain ledger to form an immutable and traceable verification record.

[0061] The method for compiling the plaintext description to obtain the arithmetic circuit and its identifier includes:

[0062] The plaintext description of pharmaceutical marketing business rules is parsed to extract the verification subject, target data object, and relationship operator; the relationship operator is then mapped to a verifiable function. ,in For pharmaceutical companies' marketing data variable set, For medical institutions to use the data variable set; the verifiable function Breaking down into pharmaceutical company marketing data variable sets X constraints, data variable sets used by medical institutions Y-constraints and a set of variables including pharmaceutical company marketing data With data variable set Interaction constraints .

[0063] pharmaceutical company marketing data variable set The fields are mapped to the first input port fields according to the field identifier and the index position of the first input port; the data variable set used by medical institutions is then used. The fields are mapped to the index position of the second input port according to the field identifier; the second input port field mapping relationship is established. The constraints are mapped and compiled into a first sub-circuit connected to the first input port; the Y-constraints are mapped and compiled into a second sub-circuit connected to the second input port; the interaction constraints are... Compile into an interactive sub-circuit connecting the first sub-circuit and the second sub-circuit.

[0064] Based on the statistical characteristics of the correlation between drug marketing data and drug usage data calculated over different time periods, a dynamic compliance threshold is generated, ranging from time period identifiers to threshold values. The compliance threshold mapping table is stored in the verification smart contract; from the verifiable function The judgment predicate is obtained from the data, and the dynamic compliance threshold is used to determine the dynamic compliance threshold. As the output constraint of the circuit; the identifier of the arithmetic circuit is obtained by hash operation based on the first sub-circuit, the second sub-circuit, the interactive sub-circuit and the output constraint.

[0065] The plaintext descriptions of pharmaceutical marketing business rules are parsed using a rule engine or a domain-specific parser (DSL Parser). For example, predefined syntax templates (e.g., "[Data X of [Subject A] must not exceed the [Proportion Z] of [Data Y of [Subject B]]") are used to match the rule text, thereby automatically extracting the verification subjects (pharmaceutical companies, medical institutions), target data objects (promotion expenses, drug sales), and correlation operators (proportion calculation, inequality judgment). Subsequently, the compilation system accesses a historical data pool or external compliance database to analyze the historical statistical characteristics (e.g., mean, variance, quantiles) of the extracted target data objects at different time periods (e.g., quarterly, annual). Based on these time-domain statistical characteristics and the analyzed correlation operators (e.g., proportion Z), a series of time period identifiers are dynamically generated using a predefined threshold generation strategy (e.g., taking the upper limit of a specific confidence interval). To the dynamic compliance threshold The mapping relationship ultimately forms a compliance threshold mapping table. This mapping table defines the specific compliance standards for rules in different time contexts and serves as the dynamic basis for judgment in the output constraints.

[0066] The process of mapping the association operator to a verifiable function The methods include:

[0067] pharmaceutical company marketing data variable set Based on the mapping relationship of the first input port field, a predefined preprocessing function is used. The calculation yielded the intermediate result sequence from the pharmaceutical company's side. ; Set of data variables used by medical institutions Based on the mapping relationship of the second input port field, a predefined mapping function is used. The calculation yields the intermediate result sequence from the medical institution side. .

[0068] Intermediate result sequence on the pharmaceutical company side Weighted combination is used to obtain the scalar value of the tablets on the pharmaceutical company's side. ; Intermediate result sequence for medical institutions Weighted combination is used to obtain the medical institution side segment scalar. ; Set of marketing data variables from pharmaceutical companies Data variable sets used by medical institutions Substitute the corresponding fields of the interaction constraint into the interaction constraint. In this process, the intermediate quantities of the interaction are computed within the finite field required by the zero-knowledge proof protocol. .

[0069] According to the pharmaceutical company's side of the scalar quantity Medical institution side segmentation standard and Interactive Intermediate Quantity Constructing statistical verification functions And compute the statistical verification function within the finite domain. Get the result value ; Obtain time period identifier The time period identifier is obtained by querying the compliance threshold mapping table. Corresponding dynamic compliance threshold According to the result value and dynamic compliance thresholds Construct a verifiable function .

[0070] For example, let the current time period be identified as Promotional expenses entered by pharmaceutical companies Yuan, the amount of drug sales entered by the medical institution node. First, through constraint functions; Standardize to obtain Constraint functions ,get Pharmaceutical company-side tablet scalar The average value of the sequence is 1.0, which is the scalar value for the medical institution's segmentation. Version 4.0; Interactive intermediate quantity Construct a statistical verification function , obtain the result value Subsequently, based on the time period identifier Query the compliance threshold mapping table to obtain the corresponding dynamic compliance threshold for the current quarter. ;because Therefore, the function output can be verified. It was deemed compliant. If the time period becomes... The corresponding threshold in the mapping table may become The same data will yield the same result. The function will output The above values, constraint functions, and calculation processes are merely illustrative examples intended to clearly demonstrate how verifiable functions are combined with dynamic thresholds for computation, and are not intended to limit the scope of this invention. Specific parameters, function forms, and compliance threshold mappings in practical applications can be set according to different business rules and seasonal characteristics.

[0071] The pharmaceutical company node, in a local privacy environment, loads its drug marketing data to the first input port and executes a proof generation process according to the output constraints to obtain a first zero-knowledge proof; the medical institution node, in a local privacy environment, loads its drug usage data to the second input port and executes a proof generation process according to the output constraints to obtain a second zero-knowledge proof, including the following methods:

[0072] Obtain the common reference string bound to the identifier of the arithmetic circuit; parse the time period identifier from the verification request issued by the verification node. .

[0073] The pharmaceutical node uses the public reference string and the pharmaceutical-side fragment scalar. The first random parameter is calculated using a key derivation function; the first random parameter and the pharmaceutical company-side scalar are then mapped according to the mapping relationship of the first input port field. Loaded to the first input port of the arithmetic circuit and the time period is identified. As a common input, the first sub-circuit is processed by the zk-SNARK proof generation algorithm to obtain the first zero-knowledge proof.

[0074] The medical institution node is based on the public reference string and the medical institution-side sharding scalar. The second random parameter is calculated using a key derivation function; based on the mapping relationship of the second input port field, the second random parameter and the medical institution-side scalar are... The time period is then loaded onto the second input port of the arithmetic circuit and identified. As a common input, the second sub-circuit is processed by the zk-SNARK proof generation algorithm to obtain the second zero-knowledge proof.

[0075] The process of a pharmaceutical company node generating its first zero-knowledge proof in a local privacy environment first requires obtaining a public reference string bound to the arithmetic circuit identifier. This public reference string is a component of the proof and verification keys generated for a specific arithmetic circuit during the system initialization phase through a secure multi-party computation (MPC) ritual. After generation, it is bound to the circuit identifier and stored in the verification smart contract, allowing the node to access and use it when generating the proof, ensuring that all participants use the same initial parameters. Furthermore, the pharmaceutical company node parses the time period identifier of this verification task from the received computation task instructions. The pharmaceutical enterprise node is based on a common reference string and the pharmaceutical enterprise-side sharding scalar. The first random parameter is calculated using an HMAC-based key derivation function, specifically by generating a 16-byte random number as the salt value using the HKDF algorithm. Based on the mapping relationship of the first input port field, the first random parameter and the pharmaceutical company's scalar partitioning value are then... The data is loaded to the first input port of the arithmetic circuit, where promotion cost data is mapped to a specified index position of the port, and the time period is critically identified. As the public input of the circuit, the first sub-circuit is processed by a zk-SNARK proof generation algorithm based on the Groth16 protocol to generate a circuit operation trajectory with a specific time period. A strong binding, but without revealing the original data at all, a first zero-knowledge proof. Healthcare institution nodes execute the exact same process in a local secure environment, using the same time period identifiers. As public input, a second zero-knowledge proof is obtained. The entire proof generation process is completed in a trusted execution environment, ensuring that the original data is always encrypted and does not leave the local system. The generated proof only contains verifiable computation results and their time context, without exposing any original business data.

[0076] Compared to other zk-SNARK schemes (such as PLONK and Marlin), the Groth16 protocol has a significant advantage in verification efficiency. Its verification process requires only constant-level bilinear pairing operations, with minimal computational cost and gas consumption, making it particularly suitable for execution in computationally sensitive environments such as blockchain smart contracts. Although the Groth16 protocol requires a Trusted Setup for each arithmetic circuit, it generates the smallest proof size. Furthermore, in the application scenario of this scheme, the pharmaceutical marketing business rules are relatively stable and do not require frequent circuit updates. Therefore, Groth16's overall advantages are the most prominent.

[0077] The method for verifying the first zero-knowledge proof and the second zero-knowledge proof by selecting a corresponding verification key based on the time period identifier to obtain a verification conclusion includes:

[0078] The verification smart contract uses the time period identifier carried in the verification request. The corresponding dynamic compliance threshold is obtained by querying the compliance threshold mapping table. The corresponding verification key is loaded; the first zero-knowledge proof is verified according to the verification key to obtain a first verification result; the second zero-knowledge proof is verified according to the verification key to obtain a second verification result.

[0079] Verify whether the hash values ​​of the public reference strings referenced by the first and second zero-knowledge proofs are consistent; verify whether the time period identifiers referenced by the first and second zero-knowledge proofs are consistent. Does it match the time period identifier in the verification request? If both the first and second verification results are valid, and the hash values ​​of the common reference strings are consistent, and the time period identifiers are consistent, then a verification conclusion that passes verification is generated; otherwise, a verification conclusion that fails verification is generated.

[0080] When verifying the execution of a smart contract, the first step is to use the time period identifier carried in the received verification request. The dynamic compliance threshold for the current period is obtained by querying the deployed compliance threshold mapping table. The system loads a verification key bound to a specific threshold. Then, it uses this key to verify the first zero-knowledge proof, checking its mathematical completeness using a bilinear pairing operation with a zk-SNARK verification algorithm (such as the Groth16 protocol) to obtain a first verification result indicating the proof's validity. The same verification process is then performed synchronously on the second zero-knowledge proof, generating a second verification result. The smart contract verifies whether the hash values ​​of the public reference strings referenced by the two proofs match exactly, and verifies the time period identifiers referenced in the two proofs. Does it match the time period identifier in this verification request? Completely consistent. This verification ensures absolute consistency between the computational context of the proof and the verification context, and is a core mechanism to prevent the proof from being misused across cycles.

[0081] A smart contract generation demonstrates a business relationship between pharmaceutical company marketing data and medical institution usage data within a specific time period if and only if both proofs are valid, the public reference strings are identical, and the time period identifiers are identical. Internal conforms to dynamic rules The verification conclusion includes the verification timestamp, participant identifiers, and the verified time period. The dynamic threshold used The verification summary information is also included. If any verification result is invalid, or the public reference string does not match, or the time period identifier is inconsistent, a conclusion of failure is generated, and the specific reason for failure is marked in the conclusion (such as proof verification failure, reference string mismatch, or time period identifier mismatch). Finally, the complete verification conclusion, together with all log data generated during the verification process, is written into the blockchain ledger to form an immutable audit trail with a clear time dimension.

[0082] Example 2: Based on the same inventive concept, such as Figure 2 As shown, this embodiment also provides a blockchain-based pharmaceutical marketing data sharing system, the system comprising:

[0083] A circuit generation module is used to obtain a plaintext description of pharmaceutical marketing business rules; compile the plaintext description to obtain an arithmetic circuit and its identifier, wherein the arithmetic circuit includes a first input port, a second input port and an output constraint; generate a verification key based on the arithmetic circuit; and deploy the verification key in a verification smart contract on the blockchain.

[0084] The task allocation module is used to verify that nodes initiate verification requests to the blockchain network. The verification requests include the required data type, business rule identifier, and time period identifier. The blockchain network queries pharmaceutical enterprise nodes that hold drug marketing data and medical institution nodes that hold drug usage data based on the data type, and issues calculation task instructions to the pharmaceutical enterprise nodes and medical institution nodes.

[0085] The proof generation module is used by pharmaceutical enterprise nodes in a local privacy environment to load the drug marketing data they hold into the first input port and execute the proof generation process according to the output constraints to obtain a first zero-knowledge proof; and by medical institution nodes in a local privacy environment to load the drug usage data they hold into the second input port and execute the proof generation process according to the output constraints to obtain a second zero-knowledge proof.

[0086] The on-chain verification module is used by pharmaceutical company nodes and medical institution nodes to send the first zero-knowledge proof and the second zero-knowledge proof to the blockchain network; the verification smart contract selects the corresponding verification key according to the time period identifier to verify the first zero-knowledge proof and the second zero-knowledge proof to obtain the verification conclusion; and the verification conclusion is written into the blockchain ledger.

[0087] The circuit generation module includes:

[0088] The circuit compilation module is used to parse the plaintext description of pharmaceutical marketing business rules, extract the verification subject, target data object, and association operator; and map the association operator into verifiable functions. ,in For pharmaceutical companies' marketing data variable set, For medical institutions to use the data variable set; the verifiable function Breaking down into pharmaceutical company marketing data variable sets X constraints, data variable sets used by medical institutions Y-constraints and a set of variables including pharmaceutical company marketing data With data variable set Interaction constraints .

[0089] pharmaceutical company marketing data variable set The fields are mapped to the first input port fields according to the field identifier and the index position of the first input port; the data variable set used by medical institutions is then used. The fields are mapped to the index position of the second input port according to the field identifier; the second input port field mapping relationship is established. The constraints are mapped and compiled into a first sub-circuit connected to the first input port; the Y-constraints are mapped and compiled into a second sub-circuit connected to the second input port; the interaction constraints are... Compile into an interactive sub-circuit connecting the first sub-circuit and the second sub-circuit.

[0090] Based on the statistical characteristics of the correlation between drug marketing data and drug usage data calculated over different time periods, a dynamic compliance threshold is generated, ranging from time period identifiers to threshold values. The compliance threshold mapping table is stored in the verification smart contract; from the verifiable function The judgment predicate is obtained from the data, and the dynamic compliance threshold is used to determine the dynamic compliance threshold. As the output constraint of the circuit; the identifier of the arithmetic circuit is obtained by hash operation based on the first sub-circuit, the second sub-circuit, the interactive sub-circuit and the output constraint.

[0091] The circuit compilation module includes:

[0092] The function mapping module is used to map pharmaceutical company marketing data variables. Based on the mapping relationship of the first input port field, a predefined preprocessing function is used. The calculation yielded the intermediate result sequence from the pharmaceutical company's side. ; Set of data variables used by medical institutions Based on the mapping relationship of the second input port field, a predefined mapping function is used. The calculation yields the intermediate result sequence from the medical institution side. .

[0093] Intermediate result sequence on the pharmaceutical company side Weighted combination is used to obtain the scalar value of the tablets on the pharmaceutical company's side. ; Intermediate result sequence for medical institutions Weighted combination is used to obtain the medical institution side segment scalar. ; Set of marketing data variables from pharmaceutical companies Data variable sets used by medical institutions Substitute the corresponding fields of the interaction constraint into the interaction constraint. In this process, the intermediate quantities of the interaction are computed within the finite field required by the zero-knowledge proof protocol. .

[0094] According to the pharmaceutical company's side of the scalar quantity Medical institution side segmentation standard and Interactive Intermediate Quantity Constructing statistical verification functions And compute the statistical verification function within the finite domain. Get the result value ; Obtain time period identifier The time period identifier is obtained by querying the compliance threshold mapping table. Corresponding dynamic compliance threshold According to the result value and dynamic compliance thresholds Construct a verifiable function .

[0095] The proof generation module includes:

[0096] The parameter acquisition unit is used to acquire a common reference string bound to the identifier of the arithmetic circuit; and to parse the time period identifier from the verification request issued by the verification node. .

[0097] The first proof generation unit is used by the pharmaceutical enterprise node to generate proofs based on the public reference string and the pharmaceutical enterprise-side sharding scalar. The first random parameter is calculated using a key derivation function; the first random parameter and the pharmaceutical company-side scalar are then mapped according to the mapping relationship of the first input port field. Loaded to the first input port of the arithmetic circuit and the time period is identified. As a common input, the first sub-circuit is processed by the zk-SNARK proof generation algorithm to obtain the first zero-knowledge proof.

[0098] The second proof generation unit is used by the medical institution node to generate proofs based on the public reference string and the medical institution-side sharding scalar. The second random parameter is calculated using a key derivation function; based on the mapping relationship of the second input port field, the second random parameter and the medical institution-side scalar are... The time period is then loaded onto the second input port of the arithmetic circuit and identified. As a common input, the second sub-circuit is processed by the zk-SNARK proof generation algorithm to obtain the second zero-knowledge proof.

[0099] The on-chain verification module includes:

[0100] The verification and determination unit is used to verify the smart contract based on the time period identifier carried in the verification request. The corresponding dynamic compliance threshold is obtained by querying the compliance threshold mapping table. The corresponding verification key is loaded; the first zero-knowledge proof is verified according to the verification key to obtain a first verification result; the second zero-knowledge proof is verified according to the verification key to obtain a second verification result.

[0101] Verify whether the hash values ​​of the public reference strings referenced by the first and second zero-knowledge proofs are consistent; verify whether the time period identifiers referenced by the first and second zero-knowledge proofs are consistent. Does it match the time period identifier in the verification request? If both the first and second verification results are valid, and the hash values ​​of the common reference strings are consistent, and the time period identifiers are consistent, then a verification conclusion that passes verification is generated; otherwise, a verification conclusion that fails verification is generated.

[0102] It should be noted that the specific methods by which each module performs operations in the system described in the above embodiments have been described in detail in the embodiments related to the method, and will not be elaborated here.

[0103] Finally, it should be noted that although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A blockchain-based method for sharing pharmaceutical marketing data, characterized in that: The method includes: Obtain a plaintext description of the pharmaceutical marketing business rules; compile the plaintext description to obtain an arithmetic circuit and its identifier, the arithmetic circuit including a first input port, a second input port and an output constraint; generate a verification key based on the arithmetic circuit; deploy the verification key in a verification smart contract on the blockchain; The verification node initiates a verification request to the blockchain network. The verification request includes the required data type, business rule identifier, and time period identifier. The blockchain network queries the pharmaceutical enterprise nodes that hold drug marketing data and the medical institution nodes that hold drug usage data based on the data type, and issues computing task instructions to the pharmaceutical enterprise nodes and medical institution nodes. In a local privacy environment, the pharmaceutical company node loads the drug marketing data it holds onto the first input port and executes a proof generation process according to the output constraints to obtain a first zero-knowledge proof; in a local privacy environment, the medical institution node loads the drug usage data it holds onto the second input port and executes a proof generation process according to the output constraints to obtain a second zero-knowledge proof. Pharmaceutical company nodes and medical institution nodes send the first zero-knowledge proof and the second zero-knowledge proof to the blockchain network; the verification smart contract selects the corresponding verification key according to the time period identifier to verify the first zero-knowledge proof and the second zero-knowledge proof and obtain the verification conclusion; the verification conclusion is written into the blockchain ledger.

2. The blockchain-based pharmaceutical marketing data sharing method according to claim 1, characterized in that, The method for compiling the plaintext description to obtain the arithmetic circuit and its identifier includes: The plaintext description of pharmaceutical marketing business rules is parsed to extract the verification subject, target data object, and relationship operator; the relationship operator is then mapped to a verifiable function. ,in For pharmaceutical companies' marketing data variable set, For medical institutions to use the data variable set; the verifiable function Breaking down into pharmaceutical company marketing data variable sets X constraints, data variable sets used by medical institutions Y-constraints and a set of variables including pharmaceutical company marketing data With data variable set Interaction constraints ; pharmaceutical company marketing data variable set The fields are mapped to the first input port fields according to the field identifier and the index position of the first input port; the data variable set used by medical institutions is then used. The fields are mapped to the index positions of the second input ports according to the field identifiers; the X constraints are mapped and compiled into a first sub-circuit connected to the first input port; the Y constraints are mapped and compiled into a second sub-circuit connected to the second input port; the interaction constraints are... Compile into an interactive sub-circuit connecting the first sub-circuit and the second sub-circuit; Based on the statistical characteristics of the correlation between drug marketing data and drug usage data over different time periods, a dynamic compliance threshold is generated, from time period identifiers to threshold values. The compliance threshold mapping table is stored in the verification smart contract; from the verifiable function The judgment predicate is obtained from the data, and the dynamic compliance threshold is set as follows: As the output constraint of the circuit; the identifier of the arithmetic circuit is obtained by hash operation based on the first sub-circuit, the second sub-circuit, the interactive sub-circuit and the output constraint.

3. The blockchain-based pharmaceutical marketing data sharing method according to claim 2, characterized in that, The process of mapping the association operator to a verifiable function The methods include: pharmaceutical company marketing data variable set Based on the mapping relationship of the first input port field, a predefined preprocessing function is used. The calculation yielded the intermediate result sequence from the pharmaceutical company's side. ; Set of data variables used by medical institutions Based on the mapping relationship of the second input port field, a predefined mapping function is used. The calculation yields the intermediate result sequence from the medical institution side. ; Intermediate result sequence on the pharmaceutical company side Weighted combination is used to obtain the scalar value of the tablets on the pharmaceutical company's side. Intermediate result sequence for medical institutions Weighted combination is used to obtain the medical institution-side segment scalar. ; Set of marketing data variables from pharmaceutical companies Data variable sets used by medical institutions Substitute the corresponding fields of the interaction constraint into the interaction constraint. In this process, the intermediate quantities of the interaction are computed within the finite field required by the zero-knowledge proof protocol. ; According to the pharmaceutical company's side of the scalar quantity Medical institution side segmentation standard and Interactive Intermediate Quantity Constructing statistical verification functions And compute the statistical verification function within the finite domain. Get the result value ; Obtain time period identifier The time period identifier is obtained by querying the compliance threshold mapping table. Corresponding dynamic compliance threshold According to the result value and dynamic compliance thresholds Construct a verifiable function .

4. The blockchain-based pharmaceutical marketing data sharing method according to claim 3, characterized in that, In a local privacy environment, the pharmaceutical company node loads the drug marketing data it holds into the first input port and executes a proof generation process according to the output constraints to obtain a first zero-knowledge proof. The method by which a medical institution node, in a local privacy environment, loads its drug usage data to the second input port and executes a proof generation process according to the output constraints to obtain a second zero-knowledge proof includes: Obtain the common reference string bound to the identifier of the arithmetic circuit; parse the time period identifier from the verification request issued by the verification node. ; The pharmaceutical node uses the public reference string and the pharmaceutical-side fragment scalar. The first random parameter is calculated using a key derivation function; the first random parameter and the pharmaceutical company-side scalar are then mapped according to the mapping relationship of the first input port field. Loaded to the first input port of the arithmetic circuit and the time period is identified. As a common input, the first sub-circuit is processed by the zk-SNARK proof generation algorithm to obtain the first zero-knowledge proof; The medical institution node is based on the public reference string and the medical institution-side sharding scalar. The second random parameter is calculated using a key derivation function; based on the mapping relationship of the second input port field, the second random parameter and the medical institution-side scalar are... The time period is then loaded onto the second input port of the arithmetic circuit and identified. As a common input, the second sub-circuit is processed by the zk-SNARK proof generation algorithm to obtain the second zero-knowledge proof.

5. The blockchain-based pharmaceutical marketing data sharing method according to claim 4, characterized in that, The method for verifying the first zero-knowledge proof and the second zero-knowledge proof by selecting a corresponding verification key based on the time period identifier to obtain a verification conclusion includes: The verification smart contract uses the time period identifier carried in the verification request. The corresponding dynamic compliance threshold is obtained by querying the compliance threshold mapping table. The corresponding verification key is loaded; the first zero-knowledge proof is verified using the verification key to obtain a first verification result; the second zero-knowledge proof is verified using the verification key to obtain a second verification result. Verify whether the hash values ​​of the public reference strings referenced by the first and second zero-knowledge proofs are consistent; verify whether the time period identifiers referenced by the first and second zero-knowledge proofs are consistent. Does it match the time period identifier in the verification request? If both the first and second verification results are valid, and the hash values ​​of the common reference strings are consistent, and the time period identifiers are consistent, then a verification conclusion that passes verification is generated; otherwise, a verification conclusion that fails verification is generated.

6. A blockchain-based pharmaceutical marketing data sharing system, characterized in that: The system includes: A circuit generation module is used to obtain a plaintext description of pharmaceutical marketing business rules; compile the plaintext description to obtain an arithmetic circuit and its identifier, wherein the arithmetic circuit includes a first input port, a second input port, and an output constraint; generate a verification key based on the arithmetic circuit; and deploy the verification key in a verification smart contract on the blockchain. The task allocation module is used to verify that nodes initiate verification requests to the blockchain network. The verification requests include the required data type, business rule identifier, and time period identifier. The blockchain network queries pharmaceutical enterprise nodes that hold drug marketing data and medical institution nodes that hold drug usage data based on the data type, and issues calculation task instructions to the pharmaceutical enterprise nodes and medical institution nodes. The proof generation module is used by pharmaceutical enterprise nodes in a local privacy environment to load the drug marketing data they hold into the first input port and execute the proof generation process according to the output constraints to obtain a first zero-knowledge proof; and by medical institution nodes in a local privacy environment to load the drug usage data they hold into the second input port and execute the proof generation process according to the output constraints to obtain a second zero-knowledge proof. The on-chain verification module is used by pharmaceutical company nodes and medical institution nodes to send the first zero-knowledge proof and the second zero-knowledge proof to the blockchain network; the verification smart contract selects the corresponding verification key according to the time period identifier to verify the first zero-knowledge proof and the second zero-knowledge proof to obtain the verification conclusion; and the verification conclusion is written into the blockchain ledger.

7. The blockchain-based pharmaceutical marketing data sharing system according to claim 6, characterized in that, The circuit generation module includes: The circuit compilation module is used to parse the plaintext description of pharmaceutical marketing business rules, extract the verification subject, target data object, and association operator; and map the association operator into verifiable functions. ,in For pharmaceutical companies' marketing data variable set, For medical institutions to use the data variable set; the verifiable function Breaking down into pharmaceutical company marketing data variable sets X constraints, data variable sets used by medical institutions Y-constraints and a set of variables including pharmaceutical company marketing data With data variable set Interaction constraints ; pharmaceutical company marketing data variable set The fields are mapped to the first input port fields according to the field identifier and the index position of the first input port; the data variable set used by medical institutions is then used. The fields are mapped to the index positions of the second input ports according to the field identifiers; the X constraints are mapped and compiled into a first sub-circuit connected to the first input port; the Y constraints are mapped and compiled into a second sub-circuit connected to the second input port; the interaction constraints are... Compile into an interactive sub-circuit connecting the first sub-circuit and the second sub-circuit; Based on the statistical characteristics of the correlation between drug marketing data and drug usage data over different time periods, a dynamic compliance threshold is generated, from time period identifiers to threshold values. The compliance threshold mapping table is stored in the verification smart contract; from the verifiable function The judgment predicate is obtained from the data, and the dynamic compliance threshold is set as follows: As the output constraint of the circuit; the identifier of the arithmetic circuit is obtained by hash operation based on the first sub-circuit, the second sub-circuit, the interactive sub-circuit and the output constraint.

8. The blockchain-based pharmaceutical marketing data sharing system according to claim 7, characterized in that, The circuit compilation module includes: The function mapping module is used to map pharmaceutical company marketing data variables. Based on the mapping relationship of the first input port field, a predefined preprocessing function is used. The calculation yielded the intermediate result sequence from the pharmaceutical company's side. ; Set of data variables used by medical institutions Based on the mapping relationship of the second input port field, a predefined mapping function is used. The calculation yields the intermediate result sequence from the medical institution side. ; Intermediate result sequence on the pharmaceutical company side Weighted combination is used to obtain the scalar value of the tablets on the pharmaceutical company's side. Intermediate result sequence for medical institutions Weighted combination is used to obtain the medical institution-side segment scalar. ; Set of marketing data variables from pharmaceutical companies Data variable sets used by medical institutions Substitute the corresponding fields of the interaction constraint into the interaction constraint. In this process, the intermediate quantities of the interaction are computed within the finite field required by the zero-knowledge proof protocol. ; According to the pharmaceutical company's side of the scalar quantity Medical institution side segmentation standard and Interactive Intermediate Quantity Constructing statistical verification functions And compute the statistical verification function within the finite domain. Get the result value ; Obtain time period identifier The time period identifier is obtained by querying the compliance threshold mapping table. Corresponding dynamic compliance threshold According to the result value and dynamic compliance thresholds Construct a verifiable function .

9. The blockchain-based pharmaceutical marketing data sharing system according to claim 8, characterized in that, The proof generation module includes: The parameter acquisition unit is used to acquire a common reference string bound to the identifier of the arithmetic circuit; and to parse the time period identifier from the verification request issued by the verification node. ; The first proof generation unit is used by the pharmaceutical enterprise node to generate proofs based on the public reference string and the pharmaceutical enterprise-side sharding scalar. The first random parameter is calculated using a key derivation function; the first random parameter and the pharmaceutical company-side scalar are then mapped according to the mapping relationship of the first input port field. Loaded to the first input port of the arithmetic circuit and the time period is identified. As a common input, the first sub-circuit is processed by the zk-SNARK proof generation algorithm to obtain the first zero-knowledge proof; The second proof generation unit is used by the medical institution node to generate proofs based on the public reference string and the medical institution-side sharding scalar. The second random parameter is calculated using a key derivation function; based on the mapping relationship of the second input port field, the second random parameter and the medical institution-side scalar are... The time period is then loaded onto the second input port of the arithmetic circuit and identified. As a common input, the second sub-circuit is processed by the zk-SNARK proof generation algorithm to obtain the second zero-knowledge proof.

10. The blockchain-based pharmaceutical marketing data sharing system according to claim 9, characterized in that, The on-chain verification module includes: The verification and determination unit is used to verify the smart contract based on the time period identifier carried in the verification request. The corresponding dynamic compliance threshold is obtained by querying the compliance threshold mapping table. The corresponding verification key is loaded; the first zero-knowledge proof is verified using the verification key to obtain a first verification result; the second zero-knowledge proof is verified using the verification key to obtain a second verification result. Verify whether the hash values ​​of the public reference strings referenced by the first and second zero-knowledge proofs are consistent; verify whether the time period identifiers referenced by the first and second zero-knowledge proofs are consistent. Does it match the time period identifier in the verification request? If both the first and second verification results are valid, and the hash values ​​of the common reference strings are consistent, and the time period identifiers are consistent, then a verification conclusion that passes verification is generated; otherwise, a verification conclusion that fails verification is generated.

Citation Information

Patent Citations

  • Smart contract authentication data privacy protection method based on zero knowledge proof

    CN109614820A

  • Accounting block chain-based privacy protection smart contract implementation method capable of asking responsibility

    CN117290887A