Blockchain-based statin myotoxicity data trustable analysis system
Patent Information
- Application Number
- CN202610855083.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-14
- Publication Date
- 2026-08-18
AI Technical Summary
[0003]现有采用联邦学习结合区块链存证的汀类药物肌毒性数据分析方案存在核心技术问题,即缺乏对参与方上传特征梯度的有效性验证机制,恶意节点可通过注入伪造的肌毒性特征梯度实施投毒攻击,导致分析模型产生错误的肌毒性关联结论
1.本发明在区块链共识过程中执行链上梯度异常偏差度校验智能合约,基于汀类药物肌毒性特征在药物代谢周期内的自然渐变规律构建偏差度校验逻辑,计算各医疗参与节点提交的加密特征梯度与全局历史梯度的特征距离,识别并剔除特征距离超出安全阈值的恶意投毒梯度。该处理方式阻断了恶意节点通过注入伪造肌毒性特征梯度实施投毒攻击的路径,保障了联合分析模型收敛方向的真实性,解决了缺乏特征梯度有效性验证机制导致分析结果不可信的问题。
Smart Images

Figure CN122599102A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of blockchain, specifically relating to a blockchain-based trusted analysis system for myotoxicity data of statins. Background Technology
[0002] Existing cross-institutional collaborative analyses of statin myotoxicity data typically employ a federated learning architecture. Each medical institution trains an analysis model locally based on the myotoxicity dataset, extracts characteristic gradients of creatine kinase elevation and muscle damage, encrypts these gradients using homomorphic encryption, and then uploads the encrypted gradients to a centralized server or blockchain network for aggregation. The blockchain network acts as a distributed ledger in this process, recording the hash values of the encrypted gradients submitted by each node and the model parameter update records, thus achieving tamper-proof data storage and transfer records.
[0003] Existing data analysis schemes for statin myotoxicity using federated learning combined with blockchain notarization suffer from a core technical problem: the lack of a mechanism to verify the validity of feature gradients uploaded by participants. Malicious nodes can inject forged myotoxicity feature gradients to launch poisoning attacks, causing the analysis model to produce erroneous myotoxicity association conclusions. Current blockchains only perform on-chain data notarization and conventional hash verification; they cannot identify whether feature gradients in the encrypted state violate the metabolic patterns of statins in the human body. This allows forged gradients to pass consensus and participate in model parameter updates, undermining the credibility of the analysis results. Summary of the Invention
[0004] The purpose of this invention is to provide a blockchain-based trusted analysis system for myotoxicity data of statins, which can effectively solve the problems mentioned in the background art.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A blockchain-based trusted analysis system for myotoxicity data of statins includes multiple medical participants and blockchain verification nodes that communicate with each other. The medical participation node trains and analyzes a model locally based on a dataset of myotoxicity from statins, extracts the feature gradients of elevated creatine kinase and muscle damage, encrypts the feature gradients using homomorphic encryption, and then submits them to the blockchain network. After obtaining the encrypted feature gradient, the blockchain verification node executes the on-chain gradient anomaly deviation verification smart contract. Based on the natural gradual change law of the myotoxicity characteristics of tinea drugs in the drug metabolism cycle, the deviation verification logic is constructed. The feature distance between the encrypted feature gradient submitted by each medical participant node and the global historical gradient is calculated. Malicious poisoning gradients with feature distances exceeding the security threshold are identified and eliminated. The remaining secure encrypted feature gradients are aggregated in the blockchain network to update the global model parameters. The encrypted hash value of each gradient aggregation and the abnormal gradient filtering log are written to the blockchain ledger.
[0006] Preferably, the process by which the medical participation node trains an analysis model locally based on a dataset of myotoxicity from statins, extracts characteristic gradients of creatine kinase elevation and muscle damage, encrypts these characteristic gradients using homomorphic encryption, and then submits them to the blockchain network, specifically includes: The medical participation node constructs a drug metabolism time window based on the half-life and myotoxicity latency of statins in the human body. Within the drug metabolism time window, it extracts time-series correlated creatine kinase detection values and muscle damage assessment values, maps these values to a high-dimensional time-series physiological feature vector, encrypts the high-dimensional time-series physiological feature vector using a lattice-based homomorphic encryption algorithm, generates an encrypted feature gradient containing time-series labels, and broadcasts the encrypted feature gradient containing time-series labels to the blockchain network.
[0007] Preferably, the process of constructing the deviation verification logic based on the natural gradual change pattern of the myotoxicity characteristics of statins during the drug metabolism cycle is as follows: Based on the continuous gradual change characteristics of creatine kinase concentration during the continuous treatment period of statins and the decay characteristics after drug withdrawal, a benchmark gradual manifold space is constructed to represent the change of myotoxicity characteristics with the duration of drug use. The benchmark gradual manifold space includes the distribution range of legal feature gradients and the constraints on the evolution direction of different statin drugs at each time point. The benchmark gradual manifold space is embedded into the on-chain gradient anomaly deviation verification smart contract as a reference benchmark to measure whether the newly input encrypted feature gradient deviates from the physiological natural gradual change trajectory.
[0008] Preferably, the process of calculating the feature distance between the encrypted feature gradient submitted by each medical participant node and the global historical gradient, and identifying and eliminating malicious poisoning gradients whose feature distance exceeds the security threshold, specifically includes: Within the reference gradient manifold space, the Mahalanobis distance of the newly input encrypted feature gradient within the distribution interval of the legal feature gradient is calculated. Combined with the evolution direction constraint, the cosine value of the direction angle between the newly input encrypted feature gradient and the historical normal gradient is calculated. When the Mahalanobis distance exceeds the distance safety threshold or the cosine value of the direction angle is lower than the direction safety threshold, the corresponding encrypted feature gradient is determined to be a malicious poisoning gradient that violates the physiological gradient law of myotoxicity. The blockchain verification node refuses to include the malicious poisoning gradient in the subsequent aggregation operation.
[0009] Preferably, the process of aggregating the remaining security encryption feature gradients in the blockchain network to update the global model parameters specifically includes: The blockchain verification node performs a gradient aggregation operation based on homomorphic addition on the secure encrypted feature gradient that has not been determined to be a malicious poisoning gradient, generating an aggregated encrypted gradient. The aggregated encrypted gradient is then subjected to homomorphic multiplication and addition operations with the homomorphic encrypted representation of the current global model parameters to obtain updated encrypted global model parameters. The updated encrypted global model parameters are then broadcast to the medical participation node, which decrypts the updated encrypted global model parameters locally using its private key to update its local analysis model.
[0010] Preferably, the process of writing the cryptographic hash value of each gradient aggregation and the abnormal gradient filtering log into the blockchain ledger specifically includes: Extract the hash values of all secure encryption feature gradients participating in the current round of aggregation, the hash values of the removed malicious poisoning gradients, and the corresponding Mahalanobis distance and direction angle cosine values. Combine the hash values of the secure encryption feature gradients, the hash values of the malicious poisoning gradients, and the corresponding Mahalanobis distance and direction angle cosine values to generate an anomaly filtering log data structure. Perform hash operations on the anomaly filtering log data structure and the updated encrypted global model parameters. Write the operation results as block data into the blockchain ledger to establish an immutable association between the myotoxicity analysis model update process and the gradient verification process.
[0011] Preferably, the process of constructing a drug metabolism time window based on the half-life and myotoxicity latency of statins in the human body, and extracting time-correlated creatine kinase detection values and muscle damage assessment values within the drug metabolism time window, specifically includes: The pharmacokinetic parameters of statin drugs are collected. Based on the time to peak blood concentration and the delay time of myotoxicity onset in the pharmacokinetic parameters, the sliding step size of the feature extraction time window is determined. According to the sliding step size, the time series from the start of drug administration to the appearance of the peak creatine kinase in continuous medical test records is extracted. The creatine kinase detection value and muscle damage assessment value in the time series are interpolated and aligned to generate an equally spaced time-series physiological feature sequence.
[0012] Preferably, after embedding the benchmark gradient manifold space into the on-chain gradient anomaly deviation verification smart contract, the process further includes dynamic updating of the benchmark gradient manifold space: When the number of consecutively verified security encryption feature gradients in the blockchain network reaches the manifold update trigger condition, the legal feature gradient distribution interval and evolution direction constraint corresponding to each time node are recalculated on the chain using the consecutively verified security encryption feature gradients. Based on the recalculated legal feature gradient distribution interval and evolution direction constraint, the original parameters in the reference gradient manifold space are replaced, and the dynamic update of the reference gradient manifold space is completed.
[0013] Preferably, the process of calculating the cosine of the direction angle between the newly input encrypted feature gradient and the historical normal gradient, in conjunction with the evolution direction constraint, specifically involves: Obtain the historical normal gradient mean vector at the corresponding time node from the reference gradient manifold space, calculate the ratio of the inner product and the L2 norm product between the newly input encrypted feature gradient vector and the historical normal gradient mean vector, obtain the direction angle cosine value, and determine the encrypted feature gradient corresponding to the direction angle cosine value being lower than the direction security threshold as a sign-flip attack type malicious poisoning gradient.
[0014] Preferably, the process by which the blockchain verification node performs a gradient aggregation operation based on homomorphic addition on the secure encryption feature gradient that has not been determined to be a malicious poisoning gradient specifically involves: The blockchain verification node queries the blockchain ledger to record the number of times each medical participant node's malicious poisoning gradient was removed in historical rounds. Based on the number of removals, it calculates the credibility decay factor for each medical participant node and uses the credibility decay factor as the homomorphic addition aggregation weight of the corresponding security encryption feature gradient. On the chain, it performs homomorphic addition on the security encryption feature gradient multiplied by the homomorphic addition aggregation weight to obtain the weighted aggregated encryption gradient.
[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention executes an on-chain gradient anomaly deviation verification smart contract during the blockchain consensus process. Based on the natural gradual change pattern of myotoxicity characteristics of statins within the drug metabolism cycle, deviation verification logic is constructed. The feature distance between the encrypted feature gradients submitted by each medical participant node and the global historical gradients is calculated, identifying and eliminating malicious poisoning gradients whose feature distance exceeds a security threshold. This approach blocks the path for malicious nodes to launch poisoning attacks by injecting forged myotoxicity feature gradients, ensures the authenticity of the convergence direction of the joint analysis model, and solves the problem of unreliable analysis results due to the lack of a feature gradient validity verification mechanism.
[0016] 2. This invention uses homomorphic encryption to encrypt the feature gradients before submitting them to the blockchain network, and aggregates the remaining secure encrypted feature gradients on the chain to update the global model parameters, thus overcoming the privacy leakage defects caused by plaintext interaction of cross-institutional myotoxicity data; Writing the encrypted hash value of each gradient aggregation and the abnormal gradient filtering log to the blockchain ledger eliminates the risk of single point of failure of the centralized aggregation server and improves the anti-tampering ability and data traceability of the distributed medical analysis system in the joint modeling process. Attached Figure Description
[0017] Figure 1This is a flowchart illustrating the overall operation of the blockchain-based trusted analysis system for myotoxicity data of statins according to the present invention. Figure 2 This is a flowchart of the local feature gradient extraction and homomorphic encryption processing of medical participation nodes according to the present invention; Figure 3 This is a flowchart of the smart contract execution process for on-chain gradient anomaly deviation verification according to the present invention. Figure 4 This is a flowchart of the encrypted feature gradient weighted aggregation and global model update process of the present invention; Figure 5 This is a flowchart of the abnormal gradient filtering log generation and blockchain ledger writing process of the present invention; Figure 6 This is a flowchart illustrating the execution process of dynamic updating of the baseline gradient manifold space in this invention. Detailed Implementation
[0018] 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, not all, of the embodiments of the present invention. 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.
[0019] Please refer to Figure 1 This embodiment provides a blockchain-based trusted analysis system for statin myotoxicity data, comprising multiple communicating medical participant nodes and blockchain verification nodes. Medical participant nodes are deployed on local servers in various medical institutions and connect to the blockchain network via dedicated network interfaces. Blockchain verification nodes form a distributed consensus network, executing on-chain smart contracts and ledger maintenance operations. Medical participant nodes store statin myotoxicity datasets locally, including patient medication records, creatine kinase levels, clinical assessment results of muscle damage, and related physiological indicators. Based on the statin myotoxicity dataset, medical participant nodes train analysis models locally, extracting characteristic gradients of creatine kinase elevation and muscle damage. These characteristic gradients are then encrypted using homomorphic encryption before being submitted to the blockchain network. After obtaining the encrypted feature gradient, the blockchain verification node executes the on-chain gradient anomaly deviation verification smart contract. Based on the natural gradual change law of the myotoxicity characteristics of tinea drugs in the drug metabolism cycle, the deviation verification logic is constructed. The feature distance between the encrypted feature gradient submitted by each medical participant node and the global historical gradient is calculated. Malicious poisoning gradients with feature distances exceeding the security threshold are identified and eliminated. The remaining secure encrypted feature gradients are aggregated in the blockchain network to update the global model parameters. The encrypted hash value of each gradient aggregation and the abnormal gradient filtering log are written to the blockchain ledger.
[0020] Medical participants and blockchain verification nodes interact via a peer-to-peer communication protocol, with the communication process protected by transport layer security (TLS) encryption. Upon joining the blockchain network, medical participants must complete identity authentication and node registration, obtaining a unique node identifier and a public-private key pair. This public-private key pair is used for homomorphic encryption operations and digital signatures. Blockchain verification nodes confirm the legitimacy of the medical participants' identities by verifying the digital signatures. The blockchain network employs a practical Byzantine fault-tolerant consensus mechanism to ensure consistency of on-chain data among all verification nodes. When a new cryptographic feature gradient is submitted to the blockchain network, all blockchain verification nodes receive the gradient data and independently execute the gradient anomaly deviation verification smart contract. Only when more than two-thirds of the verification nodes determine that the gradient is safe will it be included in subsequent aggregation operations.
[0021] The analytical model trained locally by the medical intervention nodes employs a Long Short-Term Memory (LSTM) network structure, which effectively captures long-term dependencies in time-series physiological data. The input layer of the analytical model receives preprocessed myotoxicity data, the hidden layers contain multiple LSM units and fully connected layers, and the output layer outputs predicted creatine kinase elevation risk values and muscle damage severity assessment values. During model training, the backpropagation algorithm is used to calculate the gradient of the loss function relative to the model parameters; this gradient represents the gradient of creatine kinase elevation and muscle damage characteristics. The loss function is the mean squared error loss function, expressed as:
[0022] in, The value of the loss function. The number of training samples. For the first The true label of each sample For the first The model prediction value for each sample.
[0023] The feature gradient extraction process is achieved by calculating the partial derivatives of the loss function with respect to the parameters of each layer of the model. For any parameter in the model... Its corresponding feature gradient The expression is:
[0024] Combine the feature gradients corresponding to all model parameters into a feature gradient vector. ,in This represents the total number of model parameters. This feature gradient vector contains key feature information about elevated creatine kinase and muscle damage, reflecting the model's learning degree of different features during training.
[0025] Homomorphic encryption employs a homomorphic encryption algorithm based on the learning error problem. This algorithm supports addition and multiplication operations within the encrypted domain without requiring decryption of the encrypted data. The key generation process for homomorphic encryption includes two steps: private key generation and public key generation. Private key... It is a length of binary vector, public key By one matrix and a length of vector Composition, in which , It is an error vector that follows a discrete Gaussian distribution.
[0026] The encryption process of feature gradients is achieved through the following formula:
[0027] in, The feature gradient vector to be encrypted. This is the error vector introduced during the encryption process. This is the encrypted feature gradient. The encrypted feature gradient can only be accessed via the corresponding private key. To perform decryption, the expression for the decryption process is:
[0028] in, This represents the dot product operation of vectors. This indicates the rounding operation.
[0029] refer to Figure 3 The on-chain gradient anomaly deviation verification smart contract, executed by the blockchain verification node, is pre-deployed in the blockchain network, and its code and execution logic are open and transparent to all nodes. The smart contract stores parameters representing the natural gradual change in the myotoxicity characteristics of steroid drugs throughout their metabolic cycle. These parameters were derived by medical experts based on statistical analysis of extensive clinical data and have undergone multiple rounds of verification before being written into the smart contract. When the blockchain verification node receives the encrypted feature gradient submitted by the medical participant node, it automatically invokes the gradient anomaly deviation verification smart contract, passing the encrypted feature gradient as an input parameter.
[0030] The smart contract first extracts the time-series label from the encrypted feature gradient to determine the corresponding drug metabolism time point. Then, based on this time point, the smart contract retrieves the corresponding global historical gradient statistics from the stored gradient pattern parameters, including the mean vector and covariance matrix of the global historical gradient. The smart contract calculates the feature distance between the newly input encrypted feature gradient and the global historical gradient, using Mahalanobis distance as the metric. Mahalanobis distance takes into account the correlation between features, eliminates the influence of different feature dimensions, and more accurately measures the deviation between the sample and the distribution.
[0031] When the calculated feature distance exceeds a pre-set security threshold, the smart contract determines that the encrypted feature gradient is a malicious poisoning gradient, marks it as an invalid gradient, and records it in the abnormal gradient filtering log. When the feature distance is within the security threshold range, the smart contract determines that the encrypted feature gradient is a safe gradient and adds it to the gradient aggregation list. After all blockchain verification nodes have completed gradient verification, they perform the aggregation operation on the safe encrypted feature gradients in the gradient aggregation list.
[0032] The gradient aggregation operation employs homomorphic addition, directly summing the gradients of multiple secure cryptographic features within the cryptographic domain. The expression for homomorphic addition is:
[0033] in, for A security encryption feature gradient, This is the aggregated encrypted gradient. The aggregated encrypted gradient is then used in conjunction with the homomorphic encrypted representation of the current global model parameters to obtain the updated encrypted global model parameters.
[0034] The blockchain verification node writes the encrypted hash value of each gradient aggregation and the abnormal gradient filtering log to the blockchain ledger. The hash value is calculated using the secure hash algorithm 256, and its input includes all secure encrypted feature gradients participating in the aggregation, the malicious poisoning gradients that were removed, and the updated encrypted global model parameters. The abnormal gradient filtering log includes the node identifier of the removed gradient, the submission time, the feature distance value, and the judgment result. The blockchain ledger uses a chained structure for storage, with each block containing the hash value of the previous block, ensuring the immutability and traceability of the ledger data. The functional modules of the medical participation node and the blockchain verification node are compared in Table 1.
[0035] Table 1. Comparison of Functional Modules of Medical Participation Nodes and Blockchain Verification Nodes ; In this embodiment, medical participants complete model training and feature gradient extraction locally, avoiding cross-institutional transmission of raw medical data and protecting patient privacy. Blockchain verification nodes perform gradient anomaly deviation verification on-chain, identifying malicious poisoning gradients based on the natural gradual change patterns of steroid myotoxicity characteristics, ensuring the quality of training data for the joint analysis model. The application of homomorphic encryption technology enables gradient verification and aggregation operations to be completed within an encrypted domain, further enhancing the system's privacy protection capabilities. The immutability of the blockchain ledger ensures the traceability of the model update and gradient verification processes, providing technical assurance for the credibility of medical data analysis results.
[0036] In a preferred embodiment, reference Figure 2 The medical participation node constructs a drug metabolism time window based on the half-life and myotoxicity latency of tinea drugs in the human body. Within the drug metabolism time window, time-related creatine kinase detection values and muscle damage assessment values are extracted. The time-related creatine kinase detection values and muscle damage assessment values are mapped into a high-dimensional time-series physiological feature vector. The high-dimensional time-series physiological feature vector is encrypted using a lattice-based homomorphic encryption algorithm to generate an encrypted feature gradient containing time-series labels. The encrypted feature gradient containing time-series labels is then broadcast to the blockchain network.
[0037] The medical intervention node first collects the pharmacokinetic parameters of statins, including the drug's half-life, time to peak plasma concentration, clearance rate, and latency of myotoxicity. These pharmacokinetic parameters are derived from published clinical research literature and drug instructions; different statins have different pharmacokinetic parameters. The medical intervention node determines the sliding step size of the feature extraction time window based on the time to peak plasma concentration and the latency of myotoxicity onset from the pharmacokinetic parameters. The sliding step size must be set to ensure that the complete process of creatine kinase concentration rising from baseline to peak and then returning to baseline is captured.
[0038] The feature extraction time window starts at the time the patient begins taking statins and ends at the time when creatine kinase concentration returns to baseline levels after discontinuation of medication. For patients taking statins continuously, the time window length is set to 5 to 7 times the drug's half-life to ensure the drug reaches a steady-state concentration in vivo. Medical intervention nodes extract time series from continuous medical monitoring records, including the period from the start of medication to the peak creatine kinase level, using a sliding step size. Missing detection values in the time series are filled using linear interpolation to ensure continuity.
[0039] The medical intervention node interpolates and aligns creatine kinase detection values and muscle damage assessment values within a time series, generating equally spaced temporal physiological feature sequences. The interpolation and alignment process employs cubic spline interpolation to map detection and assessment values at different time points onto a unified time grid. The time grid interval is set according to the sliding step size, typically 12 hours or 24 hours. These equally spaced temporal physiological feature sequences provide standardized input data for subsequent model training, improving training efficiency and prediction accuracy.
[0040] Equally spaced temporal physiological feature sequences are mapped to high-dimensional temporal physiological feature vectors. These vectors contain not only the original creatine kinase detection values and muscle damage assessment values, but also statistical and variability features derived from these original values. Statistical features include the mean, variance, maximum, minimum, and median of creatine kinase detection values within the time series. Variation features include the difference, rate of change, and cumulative change of creatine kinase detection values between adjacent time points. The dimension of the high-dimensional temporal physiological feature vector is [dimension missing]. ,in The length of the time series. The number of features at each time point.
[0041] The expression for the high-dimensional temporal physiological feature vector is:
[0042] in, For the first Feature vectors at each time point For the first The first time point Each feature value.
[0043] A lattice-based homomorphic encryption algorithm is used to encrypt high-dimensional temporal physiological feature vectors. Lattice-based homomorphic encryption algorithms offer high security and computational efficiency, and are resistant to quantum computing attacks. The encryption process first encrypts the high-dimensional temporal physiological feature vectors... Convert to integer vector The conversion formula is:
[0044] in, This is the quantization precision parameter, used to convert floating-point feature values to integer feature values. The value of the quantization precision parameter needs to be adjusted according to the range of feature values and the required precision, and is usually set to 16 or 32.
[0045] Then, using the public key For integer vectors Encryption is performed to generate encrypted feature vectors. The expression for the encryption process is:
[0046] in, The error vector follows a discrete Gaussian distribution, and its standard deviation is set according to the security parameters of the encryption algorithm.
[0047] An encrypted feature gradient containing time-series labels is generated. The time-series label includes the drug metabolism time point corresponding to the feature gradient, the patient's medication duration, and drug type information. The time-series label is submitted to the blockchain network in plaintext along with the encrypted feature gradient, so that blockchain verification nodes can obtain the corresponding baseline gradient manifold space parameters based on the time-series label. The time-series label does not contain any information that could identify the patient, ensuring patient privacy is protected.
[0048] Healthcare participants broadcast a cryptographic feature gradient, including a time-series tag, to the blockchain network. The broadcast process uses a flooding protocol to ensure that all blockchain verification nodes receive the cryptographic feature gradient. Before broadcasting the cryptographic feature gradient, each healthcare participant digitally signs the gradient and the time-series tag using its private key to prevent data tampering during transmission. Upon receiving the cryptographic feature gradient, the blockchain verification nodes first verify the validity of the digital signature; only cryptographic feature gradients with valid digital signatures proceed to subsequent verification processes.
[0049] refer to Figure 4 The blockchain verification node performs a homomorphic addition-based gradient aggregation operation on the secure encryption feature gradients that have not been identified as malicious poisoning gradients, generating an aggregated encryption gradient. The blockchain verification node queries the blockchain ledger to record the number of times each medical participant's malicious poisoning gradient has been removed in historical rounds, and calculates the credibility decay factor for each medical participant based on the number of removals. The credibility decay factor ranges from 0 to 1, and its expression is:
[0050] in, For the first The credibility decay factor of each medical participation node The attenuation coefficient is... For the first The number of times a medical participant node was removed from the malicious poisoning gradient in historical rounds. Decay coefficient. This is used to control the rate at which credibility decays, and is typically set to 0.1.
[0051] Using the credibility decay factor as the homomorphic aggregation weight for the corresponding secure encryption feature gradient, a homomorphic addition operation is performed on the secure encryption feature gradient multiplied by the homomorphic aggregation weight on the chain to obtain the weighted aggregated encryption gradient. The expression for the weighted aggregated encryption gradient is:
[0052] in, For the first The security encryption feature gradient submitted by each medical participant node This represents the number of medical participants in the current round of aggregation.
[0053] The aggregated encrypted gradient is homomorphically multiplied and added to the homomorphic encrypted representation of the current global model parameters to obtain the updated encrypted global model parameters. (Homomorphic encrypted representation of the current global model parameters) Stored in the blockchain ledger, it was generated from the previous round of aggregation operations. The expression for updating the model parameters is:
[0054] in, For the updated encrypted global model parameters, For the current encryption global model parameters, This is the learning rate. The value of the learning rate is adjusted according to the training phase of the model. A larger learning rate is set in the early stage of training to speed up convergence, and a smaller learning rate is set in the later stage of training to improve the stability of the model.
[0055] The blockchain verification node broadcasts the updated encrypted global model parameters to all participating medical nodes. Each participating medical node decrypts the updated encrypted global model parameters locally using its private key, obtaining the plaintext global model parameters. The decryption process is expressed as follows:
[0056] in, The private key for the medical participation node. It is part of the public key.
[0057] Medical participating nodes update the parameters of their local analysis models using the decrypted global model parameters, and then continue to train the model locally based on new myotoxicity data, extracting new feature gradients and submitting them to the blockchain network. This process is iterated until the global model converges. The convergence criterion is that the change in the loss function value over multiple consecutive rounds is less than a pre-set threshold. Table 2 shows the comparison of pharmacokinetic parameters and time windows for different statins.
[0058] Table 2 Comparison of pharmacokinetic parameters and time windows for different statins ; In this embodiment, a drug metabolism time window is constructed based on the pharmacokinetic parameters of statins, which can accurately capture the changes in myotoxicity characteristics as the drug metabolism process progresses. The construction of high-dimensional time-series physiological feature vectors fully utilizes the statistical and change information in the time-series data, improving the analytical model's ability to identify myotoxicity risks. A weighted gradient aggregation mechanism based on a credibility decay factor reduces the contribution of nodes that have historically submitted malicious poisoning gradients, further enhancing the system's resistance to attacks. The full application of homomorphic encryption technology ensures that the original medical data and model parameters remain encrypted throughout the entire joint modeling process, effectively preventing privacy leaks.
[0059] In a preferred embodiment, a baseline gradient manifold space is constructed based on the continuous gradual change in creatine kinase concentration during a continuous course of statin therapy and its decay characteristics after discontinuation. This baseline gradient manifold space contains the distribution range and evolution direction constraints of the legitimate feature gradients of different statin drugs at each time point. The baseline gradient manifold space is embedded into an on-chain gradient anomaly deviation verification smart contract as a reference benchmark to measure whether the newly input encrypted feature gradient deviates from the natural physiological gradient trajectory.
[0060] During continuous use of statins, creatine kinase concentration exhibits a continuous and gradual change. Initially, creatine kinase concentration rises slowly, gradually reaching a peak with prolonged use, and then remaining at a relatively stable level. After discontinuation of the drug, creatine kinase concentration exhibits an exponential decay, gradually returning to baseline levels. This pattern of change in creatine kinase concentration is determined by the metabolic processes and myotoxic mechanisms of statins in the human body, and is universal and objective.
[0061] The baseline gradient manifold space is a high-dimensional Riemannian manifold, where each point corresponds to the myotoxicity feature gradient at a specific time point. The dimension of the manifold space is the same as the dimension of the feature gradient vector, both being [missing value]. The distance metric in the manifold space uses geodesic distance, which accurately reflects the similarity between feature gradients. The construction of the baseline gradually varying manifold space is based on a large amount of myotoxicity data from normal patients, and the mean vector and covariance matrix of feature gradients at different time points are obtained through statistical analysis.
[0062] For the The corresponding feature gradient mean vector at each time point is: The covariance matrix is The valid feature gradient distribution interval is defined as the interval with respect to the mean vector. Centered on the target, the Mahalanobis distance is less than or equal to the safety threshold. The region is defined mathematically as follows:
[0063] in, For the feature gradient vector, For the first The legal feature gradient distribution interval at each time point.
[0064] The evolution direction constraint is defined as the range of the angle between the mean vectors of feature gradients at adjacent time points. For the th The time node and the first At each time point, the evolution direction vector is: The newly input feature gradient vector In the The evolution direction at each time point should be consistent with To maintain consistency, the included angle should be less than or equal to the directional safety threshold. .
[0065] The baseline gradient manifold space is embedded into an on-chain gradient anomaly deviation verification smart contract. The embedding process involves using the mean vectors of different types of statins at different time points. Covariance matrix and evolution direction vector The parameters are stored in the state variables of the smart contract. The smart contract provides a query interface that allows blockchain verification nodes to obtain the corresponding manifold space parameters based on the drug type and time point.
[0066] Within the baseline gradually changing manifold space, calculate the Mahalanobis distance of the encrypted feature gradient of the new input within the valid feature gradient distribution interval. Since the feature gradient is in an encrypted state, the Mahalanobis distance calculation must be performed within the encrypted domain. The Mahalanobis distance calculation within the encrypted domain is implemented using addition and multiplication operations of the homomorphic encryption algorithm. For the encrypted feature gradient... The encrypted representation of its corresponding mean vector is: The encrypted representation of the inverse of the covariance matrix is: .
[0067] The calculation process for the square of the Mahalanobis distance within the encrypted domain is as follows:
[0068] in, This is the encrypted squared Mahalanobis distance value. Blockchain validator node pair. Decryption yields the squared Mahalanobis distance in plaintext form. Then calculate its square root to obtain the Mahalanobis distance. .
[0069] The cosine of the angle between the gradient of the newly input encrypted features and the historical normal gradients is calculated by incorporating the evolution direction constraint. The mean vector of the historical normal gradients at the corresponding time points is obtained from the baseline gradually changing manifold space. Calculate the gradient vector of the encrypted features of the new input. Compared with the historical normal gradient mean vector The cosine of the direction angle is obtained by comparing the inner product of the two elements with the product of their second norms. The expression for the cosine of the direction angle is:
[0070] in, For vectors and The inner product, and They are vectors and The 2-norm.
[0071] When the Mahal distance Exceeding the safe distance threshold Or the cosine value of the direction angle Below the directional safety threshold When the corresponding encrypted feature gradient is determined to be a malicious poisoning gradient that violates the physiological gradual change pattern of myotoxicity, it is considered a malicious poisoning gradient. A cosine value of the direction angle below the direction safety threshold indicates that the evolution direction of the feature gradient is opposite to the normal physiological gradual change direction, typically corresponding to a sign-flip attack-type malicious poisoning gradient. A sign-flip attack inverts the sign of the feature gradient, causing the model parameters to update in the wrong direction, leading to a decrease in model performance.
[0072] Blockchain validator nodes refuse to include maliciously poisoned gradients in subsequent aggregation operations and record relevant information about the maliciously poisoned gradients in the abnormal gradient filtering log. The abnormal gradient filtering log includes the node identifier of the removed gradient, the submission time, the Mahalanobis distance value, the cosine of the direction angle, and the judgment result. Blockchain validator nodes write the abnormal gradient filtering log along with the cryptographic hash value of the gradient aggregation into the blockchain ledger.
[0073] refer to Figure 5 The algorithm extracts the hash values of all secure encryption feature gradients participating in the current aggregation round, the hash values of the removed malicious poisoning gradients, and their corresponding Mahalanobis distance and direction angle cosine values. This information is then combined to generate an anomaly filtering log data structure. The anomaly filtering log data structure is organized using Extensible Markup Language (EXPLAIN) and includes a root node, a secure gradient list node, and a malicious gradient list node. The secure gradient list node contains the hash values of all secure encryption feature gradients participating in the aggregation, while the malicious gradient list node contains the hash values of all removed malicious poisoning gradients and their corresponding verification parameters.
[0074] A hash operation is performed on the anomaly filtering log data structure and the updated encrypted global model parameters. The result is then written into the blockchain ledger as block data. The hash operation uses the secure hash algorithm 256, whose expression is:
[0075] in, To filter out the binary representation of the log data structure for anomalies, The binary representation of the updated encrypted global model parameters. This represents a binary concatenation operation. This is the result of the hash operation.
[0076] refer to Figure 6 When the number of consecutively verified security cryptographic feature gradients in the blockchain network reaches the manifold update trigger condition, the baseline gradient manifold space is dynamically updated. The manifold update trigger condition is set to the number of consecutively verified security cryptographic feature gradients reaching... , The value of is adjusted according to the system size and data update frequency, and is usually set to 1000. The distribution range and evolution direction constraints of the legitimate feature gradients at each time point are recalculated on the chain using the continuously verified secure encryption feature gradients.
[0077] Recalculate the mean vector The expression is:
[0078] in, For the first Number of security encryption feature gradients at each time point For the first The first time node A security encryption feature gradient.
[0079] Recalculate the covariance matrix The expression is:
[0080] Recalculate the evolution direction vector The expression is:
[0081] The original parameters in the baseline gradient manifold space are replaced by the recalculated legal feature gradient distribution intervals and evolution direction constraints, thus completing the dynamic update of the baseline gradient manifold space. The dynamic update process is automatically executed by blockchain verification nodes through smart contracts, and the updated manifold space parameters will be applied to subsequent gradient verification operations. The dynamic update of the baseline gradient manifold space enables the system to adapt to changes in the distribution of myotoxicity data, continuously improving the accuracy of gradient verification. The legal feature gradient distribution intervals and evolution direction constraints at different time points are shown in Table 3.
[0082] Table 3. Distribution range and evolution direction constraints of legal feature gradients at different time points. ; In this embodiment, a baseline gradient manifold space is constructed based on the natural gradual change pattern of the myotoxicity characteristics of statins, providing an objective physiological basis for validating the encryption feature gradient. The combined use of Mahalanobis distance and the cosine of the direction angle can simultaneously detect anomalies in both the amplitude and direction of the feature gradient, effectively identifying various types of malicious poisoning attacks. The dynamic update mechanism of the baseline gradient manifold space enables the system to continuously learn new normal myotoxicity feature patterns, improving the system's adaptability and accuracy. Writing the abnormal gradient filtering log and model update hash value into the blockchain ledger establishes a complete and traceable chain for the myotoxicity analysis process, providing solid technical support for the credibility of medical data analysis results.
Claims
1. A blockchain-based trusted analysis system for myotoxicity data of statins, characterized in that, This includes multiple medical participant nodes and blockchain verification nodes that communicate with each other; The medical participation node trains and analyzes a model locally based on a dataset of myotoxicity from statins, extracts the feature gradients of elevated creatine kinase and muscle damage, encrypts the feature gradients using homomorphic encryption, and then submits them to the blockchain network. After obtaining the encrypted feature gradient, the blockchain verification node executes the on-chain gradient anomaly deviation verification smart contract. Based on the natural gradual change law of the myotoxicity characteristics of tinea drugs in the drug metabolism cycle, the deviation verification logic is constructed. The feature distance between the encrypted feature gradient submitted by each medical participant node and the global historical gradient is calculated. Malicious poisoning gradients with feature distances exceeding the security threshold are identified and eliminated. The remaining secure encrypted feature gradients are aggregated in the blockchain network to update the global model parameters. The encrypted hash value of each gradient aggregation and the abnormal gradient filtering log are written to the blockchain ledger.
2. The blockchain-based trusted analysis system for myotoxicity data of statins according to claim 1, characterized in that, The process by which the medical participation node trains and analyzes a model locally based on a dataset of myotoxicity from statins, extracts characteristic gradients of elevated creatine kinase and muscle damage, encrypts these characteristic gradients using homomorphic encryption, and then submits them to the blockchain network is as follows: The medical participation node constructs a drug metabolism time window based on the half-life and myotoxicity latency of statins in the human body. Within the drug metabolism time window, it extracts time-series correlated creatine kinase detection values and muscle damage assessment values, maps these values to a high-dimensional time-series physiological feature vector, encrypts the high-dimensional time-series physiological feature vector using a lattice-based homomorphic encryption algorithm, generates an encrypted feature gradient containing time-series labels, and broadcasts the encrypted feature gradient containing time-series labels to the blockchain network.
3. The blockchain-based trusted analysis system for myotoxicity data of statins according to claim 2, characterized in that, The process of constructing the deviation verification logic based on the natural gradual change pattern of the myotoxicity characteristics of statins during the drug metabolism cycle is as follows: Based on the continuous gradual change characteristics of creatine kinase concentration during the continuous treatment period of statins and the decay characteristics after drug withdrawal, a benchmark gradual manifold space is constructed to represent the change of myotoxicity characteristics with the duration of drug use. The benchmark gradual manifold space includes the distribution range of legal feature gradients and the constraints on the evolution direction of different statin drugs at each time point. The benchmark gradual manifold space is embedded into the on-chain gradient anomaly deviation verification smart contract as a reference benchmark to measure whether the newly input encrypted feature gradient deviates from the physiological natural gradual change trajectory.
4. The blockchain-based trusted analysis system for myotoxicity data of statins according to claim 3, characterized in that, The process of calculating the feature distance between the encrypted feature gradient submitted by each medical participant node and the global historical gradient, and identifying and eliminating malicious poisoning gradients whose feature distance exceeds the security threshold, is as follows: Within the reference gradient manifold space, the Mahalanobis distance of the newly input encrypted feature gradient within the distribution interval of the legal feature gradient is calculated. Combined with the evolution direction constraint, the cosine value of the direction angle between the newly input encrypted feature gradient and the historical normal gradient is calculated. When the Mahalanobis distance exceeds the distance safety threshold or the cosine value of the direction angle is lower than the direction safety threshold, the corresponding encrypted feature gradient is determined to be a malicious poisoning gradient that violates the physiological gradient law of myotoxicity. The blockchain verification node refuses to include the malicious poisoning gradient in the subsequent aggregation operation.
5. The blockchain-based trusted analysis system for myotoxicity data of statins according to claim 4, characterized in that, The process of aggregating the remaining security encryption feature gradients in the blockchain network to update the global model parameters is as follows: The blockchain verification node performs a gradient aggregation operation based on homomorphic addition on the secure encrypted feature gradient that has not been determined to be a malicious poisoning gradient, generating an aggregated encrypted gradient. The aggregated encrypted gradient is then subjected to homomorphic multiplication and addition operations with the homomorphic encrypted representation of the current global model parameters to obtain updated encrypted global model parameters. The updated encrypted global model parameters are then broadcast to the medical participation node, which decrypts the updated encrypted global model parameters locally using its private key to update its local analysis model.
6. The blockchain-based trusted analysis system for myotoxicity data of statins according to claim 5, characterized in that, The process of writing the encrypted hash value of each gradient aggregation and the abnormal gradient filtering log into the blockchain ledger is as follows: Extract the hash values of all secure encryption feature gradients participating in the current round of aggregation, the hash values of the removed malicious poisoning gradients, and the corresponding Mahalanobis distance and direction angle cosine values. Combine the hash values of the secure encryption feature gradients, the hash values of the malicious poisoning gradients, and the corresponding Mahalanobis distance and direction angle cosine values to generate an anomaly filtering log data structure. Perform hash operations on the anomaly filtering log data structure and the updated encrypted global model parameters. Write the operation results as block data into the blockchain ledger to establish an immutable association between the myotoxicity analysis model update process and the gradient verification process.
7. The blockchain-based trusted analysis system for myotoxicity data of statins according to claim 6, characterized in that, The process of constructing a drug metabolism time window based on the half-life and myotoxicity latency of statins in the human body, and extracting time-correlated creatine kinase detection values and muscle damage assessment values within the drug metabolism time window, specifically includes: The pharmacokinetic parameters of statin drugs are collected. Based on the time to peak blood concentration and the delay time of myotoxicity onset in the pharmacokinetic parameters, the sliding step size of the feature extraction time window is determined. According to the sliding step size, the time series from the start of drug administration to the appearance of the peak creatine kinase in continuous medical test records is extracted. The creatine kinase detection value and muscle damage assessment value in the time series are interpolated and aligned to generate an equally spaced time-series physiological feature sequence.
8. The blockchain-based trusted analysis system for myotoxicity data of statins according to claim 7, characterized in that, After embedding the benchmark gradient manifold space into the on-chain gradient anomaly deviation verification smart contract, the process also includes dynamic updates to the benchmark gradient manifold space: When the number of consecutively verified security encryption feature gradients in the blockchain network reaches the manifold update trigger condition, the legal feature gradient distribution interval and evolution direction constraint corresponding to each time node are recalculated on the chain using the consecutively verified security encryption feature gradients. Based on the recalculated legal feature gradient distribution interval and evolution direction constraint, the original parameters in the reference gradient manifold space are replaced, and the dynamic update of the reference gradient manifold space is completed.
9. The blockchain-based trusted analysis system for myotoxicity data of statins according to claim 8, characterized in that, The process of calculating the cosine of the angle between the direction of the newly input encrypted feature gradient and the historical normal gradient, combined with the aforementioned evolution direction constraint, is as follows: Obtain the historical normal gradient mean vector at the corresponding time node from the reference gradient manifold space, calculate the ratio of the inner product and the L2 norm product between the newly input encrypted feature gradient vector and the historical normal gradient mean vector, obtain the direction angle cosine value, and determine the encrypted feature gradient corresponding to the direction angle cosine value being lower than the direction security threshold as a sign-flip attack type malicious poisoning gradient.
10. The blockchain-based trusted analysis system for myotoxicity data of statins according to claim 9, characterized in that, The process by which the blockchain verification node performs a gradient aggregation operation based on homomorphic addition on the secure encrypted feature gradient that has not been determined to be a malicious poisoning gradient is as follows: The blockchain verification node queries the blockchain ledger to record the number of times each medical participant node's malicious poisoning gradient was removed in historical rounds. Based on the number of removals, it calculates the credibility decay factor for each medical participant node and uses the credibility decay factor as the homomorphic addition aggregation weight of the corresponding security encryption feature gradient. On the chain, it performs homomorphic addition on the security encryption feature gradient multiplied by the homomorphic addition aggregation weight to obtain the weighted aggregated encryption gradient.