Blockchain notarized bayesian inference method for charging station safety rating insurance actuarial method

By using blockchain notarization and Bayesian inference, the problems of data tampering and information asymmetry in charging site safety rating and premium calculation are solved, realizing dynamic assessment of charging site safety rating and real-time matching of premiums, thus improving the adaptability of the rating model and the accuracy of pricing.

CN122472907APending Publication Date: 2026-07-28SHENZHEN SAFE CITY EMERGENCY TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN SAFE CITY EMERGENCY TECHNOLOGY CO LTD
Filing Date
2026-04-22
Publication Date
2026-07-28

AI Technical Summary

Technical Problem

In existing technologies, there is a risk of data source tampering during the safety rating and premium calculation process for charging sites, and static rating methods cannot capture real-time changes in risk status, resulting in information asymmetry between actuarial pricing and actual safety risks, and making it impossible to achieve real-time dynamic matching between premiums and risks.

Method used

The method of blockchain-based evidence storage and Bayesian inference is adopted. Full-dimensional time-series data is acquired through edge acquisition terminals, and zero-knowledge proof protocol is used to ensure data integrity. A hierarchical Bayesian inference network is constructed and combined with real-time data for security rating. Differentiated premium pricing is generated through a non-life insurance actuarial reliability model, realizing full-link feature backtracking and iterative update of model parameters.

Benefits of technology

Ensuring the authenticity and completeness of rating data and dynamically outputting posterior probability safety rating results eliminates information asymmetry, improves the adaptability of the safety rating model and the accuracy of premium pricing, and achieves real-time dynamic matching between premiums and risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122472907A_ABST
    Figure CN122472907A_ABST
Patent Text Reader

Abstract

The present application relates to the field of blockchain storage and big data processing technology, and discloses a charging place safety rating insurance actuarial method based on blockchain storage Bayesian inference. The method collects full-dimensional time series data through edge terminals, and stores the data on the chain after zero-knowledge proof verification; a hierarchical Bayesian inference network is constructed, historical data and real-time data on the chain are fused for three-level iterative updating, and posterior probability safety rating is output; the rating is converted into a credibility factor and embedded into a non-life insurance actuarial model, and combined with historical claim data to generate differentiated premiums; through federal learning full-link backtracking, the model parameters are dynamically updated. The method realizes data credible storage, risk dynamic rating and accurate premium pricing, solves the problem of deviation between traditional pricing and actual risk, and improves the scientificity and safety of actuarial science.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of blockchain evidence storage and big data processing technology, and discloses a method for actuarial calculation of charging site safety rating based on Bayesian inference using blockchain evidence storage. Background Technology

[0002] Existing technologies typically acquire operational data from charging locations through periodic manual inspections or fixed sensor data collection. Safety ratings are then assigned based on preset static rules or simple thresholds. Insurance companies calculate premiums based on these ratings and historical claims data. Regarding data storage, some existing solutions upload the final rating report or claim records to the blockchain for storage, serving as evidence in subsequent dispute resolution. The rating and storage processes are independent, and actuarial models often employ fixed-rate calculation logic based on historical statistical data.

[0003] Existing technologies only use blockchain as a post-event evidence storage tool and do not introduce a data verification mechanism into the entire process of security rating and premium calculation. This leads to the risk that the intermediate data source on which the rating is based may be tampered with, and the static rating method cannot capture the real-time changes in the risk status. This results in an information asymmetry between insurance actuarial pricing and actual security risks, making it impossible to achieve real-time dynamic matching between premiums and risks. Summary of the Invention

[0004] The purpose of this invention is to provide a solution to the problems described in the background section.

[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A blockchain-based Bayesian inference-based actuarial method for safety rating insurance of charging stations includes the following steps: The edge acquisition terminal acquires full-dimensional time-series data of the charging site, and generates standardized data frames after preprocessing; Blockchain nodes verify the integrity of the data frame through a zero-knowledge proof protocol, generate a storage hash and feature index, and store it on-chain in a weighted and segmented manner according to the subject, risk type and time period. A hierarchical Bayesian inference network is constructed. Historical data stored on the blockchain is read as prior information and combined with standardized data frames collected in real time as likelihood samples. The network is iteratively updated at three levels: device layer, location layer, and region layer, and the posterior probability security rating result is output. Based on the non-life insurance actuarial reliability model, the posterior probability safety rating result is transformed into a reliability factor, embedded into the pure premium calculation model, and on-chain historical claims data is called for actuarial calibration to generate differentiated premium pricing results. The system performs full-link feature backtracking on on-chain evidence data, intermediate inference results, and pricing data, and dynamically updates the prior parameters of the hierarchical Bayesian inference network and the correction coefficients of the pure premium calculation model.

[0006] Preferably, the blockchain node performs integrity verification of the data frame using a zero-knowledge proof protocol, specifically including: Construct a multinomial commitment circuit to map risk feature values ​​in standardized data frames to multinomial coefficients, and use random challenge values ​​to generate zero-knowledge proof credentials; Without needing to obtain the original plaintext data, the verification end confirms the authenticity of the data by verifying the validity of the credentials, and simultaneously generates a Merkle root hash that uniquely corresponds to the original data as the evidence storage hash. When an incident trigger signal is detected, the corresponding data fragments are extracted based on the feature index, and the hash comparison is automatically performed through a smart contract to reconstruct the complete chain of evidence.

[0007] Preferably, the construction of the hierarchical Bayesian inference network for three-level iterative updates specifically includes: An attention mechanism is introduced to calculate the dynamic weights of each risk dimension in the standardized data frames collected in real time, and weighted preprocessing is performed on the likelihood samples. At the equipment level, variational inference algorithms are used to approximate the risk distribution parameters of a single device. At the location level, risk distributions of multiple devices are integrated to construct a Gaussian mixture model. At the region level, Markov chain Monte Carlo simulation method is used to globally optimize all parameters and output a probability distribution of safety rating with confidence intervals.

[0008] Preferably, the generation of differentiated premium pricing results based on the non-life insurance actuarial reliability model specifically includes: Construct a mapping function between safety rating and loss ratio, and calculate the reliability factor Z value corresponding to the posterior probability safety rating result; Deep reinforcement learning algorithms are used to simulate the game between insurance policyholders’ security investment and premium expenditure, and the weight coefficient of the reliability factor in the pure premium calculation model is dynamically adjusted. The adjusted weighting coefficients are coupled with the base rate to calculate a dynamic premium quote that fluctuates in real time with the security rating, and the quote logic hash is stored on the blockchain for evidence.

[0009] Preferably, the end-to-end feature backtracking specifically includes: The federated learning architecture is adopted, where each charging site acts as an independent node to train the model parameter gradient locally based on the stored data, and only the encrypted gradient is uploaded to the aggregation server. After the aggregation server performs global parameter aggregation, it issues updates, and without disclosing the original privacy data of each location, it collaboratively updates the prior distribution parameters of the hierarchical Bayesian inference network and synchronously corrects the trend correction coefficients in the pure premium calculation model.

[0010] Preferably, the on-chain weighted sharded storage specifically includes: Based on the heat prediction model of risk characteristics, the risk characteristic data with high frequency access is redundantly encoded and stored using erasure coding technology, and the low frequency archived data is cold-stored using compression algorithms. The smart contract automatically adjusts the sharding position based on the data access frequency, migrates high-frequency data to edge cache nodes to reduce verification latency, and periodically performs cross-chain data interaction to synchronize the security rating status between different blockchain nodes.

[0011] Preferably, before introducing the attention mechanism to calculate the dynamic weights, the method further includes: Construct a risk knowledge graph for charging sites, defining charging equipment, environmental sensors, and operators as graph nodes, and interactive behaviors as edges; By using graph neural network algorithms to mine implicit risk associations between nodes, high-order feature vectors are generated and embedded into the input layer of a hierarchical Bayesian inference network to capture the cascading risk propagation path caused by a single device failure.

[0012] Preferably, the reliability factor Z-value corresponding to the calculated posterior probability safety rating result further includes: A generative adversarial network is constructed, which uses a generator to simulate the security rating distribution under normal conditions and a discriminator to identify abnormal perturbations in the input data. When the discriminator detects that the security rating data is forged or abnormally drifted, it triggers the circuit breaker mechanism to suspend the premium pricing process and calls on-chain historical evidence data for traceability and comparison.

[0013] Preferably, after the aggregation server performs global parameter aggregation, it further includes: The contribution of each charging location to the uploaded gradient is calculated based on the Shapley value, and the contribution proof is recorded on the blockchain. The weight of each venue's voice in the update of prior parameters at the regional level is dynamically adjusted based on its contribution, and fed back to the actuarial model to give additional premium discount coefficients to entities with high contribution and low risk.

[0014] Preferably, after generating the higher-order feature vector, the process further includes: A digital twin model is constructed, based on a fusion of physical mechanisms and data-driven methods, to simulate the evolution of charging sites under different extreme conditions; By using Bayesian structured time series algorithms to predict future safety rating trends, the prediction results are introduced as forward-looking factors into non-life insurance actuarial reliability models to achieve preventative premium adjustments for potential risks.

[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention uses a zero-knowledge proof protocol to verify and store edge-collected time-series data on-chain, ensuring the authenticity and integrity of the rating data source. It then utilizes a hierarchical Bayesian inference network to combine historical data with real-time data, outputting a dynamic posterior probability safety rating. By embedding this dynamic rating result as a reliability factor into a non-life insurance actuarial model, a quantitative correlation is established between safety risk status and premium pricing, eliminating information asymmetry in the actuarial process and resolving the technical problem of deviation between pricing results and actual risk.

[0016] 2. This invention employs a full-link feature backtracking mechanism, utilizing on-chain evidence data, intermediate inference results, and pricing data to iteratively update the prior parameters of the Bayesian network and the correction coefficients of the actuarial model. This closed-loop iterative mechanism enables the system to autonomously learn and correct model parameters based on historical evolution patterns, improving the adaptability of the safety rating model to new risks and the accuracy of premium pricing. Attached Figure Description

[0017] Figure 1 This is a flowchart of the multi-source time-series data acquisition and standardization process of the present invention; Figure 2 This is a flowchart of the blockchain-based evidence storage and zero-knowledge proof verification process of the present invention; Figure 3 This is a flowchart of the hierarchical Bayesian inference security rating process of the present invention; Figure 4 This is a flowchart illustrating the differentiated premium pricing process of the present invention; Figure 5 This is a flowchart of the end-to-end feature backtracking and model update process of the present invention; Figure 6 This is a flowchart illustrating the overall process of actuarial calculation for the safety rating of charging locations according to the present invention. Detailed Implementation

[0018] This invention relates to the fields of blockchain evidence storage, power safety monitoring, and actuarial science, and particularly to an actuarial method for safety rating of charging stations using blockchain evidence storage and Bayesian inference. The system upon which this method relies includes an edge acquisition terminal cluster, a blockchain node cluster, a hierarchical Bayesian inference computation unit, an actuarial computation unit, and a federated learning aggregation server. These units are coupled and connected via wired or wireless communication networks to collaboratively implement the entire process of this method.

[0019] Example 1: Please refer to the appendix Figure 1The edge acquisition terminal acquires full-dimensional time-series data of the charging site and generates standardized data frames after preprocessing. The edge acquisition terminal is deployed within the target charging site and includes a charging pile operation status acquisition terminal, an environmental sensor terminal, a personnel operation acquisition terminal, and a fire monitoring terminal. The charging pile operation status acquisition terminal collects millisecond-level time-series sampling data for charging voltage, charging current, power factor, insulation resistance, module temperature, nozzle lock status, and emergency stop trigger status. The environmental sensor terminal collects second-level time-series sampling data for ambient temperature, ambient humidity, smoke concentration, combustible gas concentration, and dust concentration. The personnel operation acquisition terminal collects time-series data for operator identification, operation time, operation sequence, and violation records. The fire monitoring terminal collects time-series data for fire equipment status, temperature and smoke detector trigger status, and sprinkler system status.

[0020] The preprocessing process includes time alignment, outlier removal, missing value completion, normalization, and data frame encapsulation, as detailed below: Timing alignment uses a unified timestamp as a reference, resampling time-series data with different sampling frequencies to generate data with a unified time granularity. Time series, Configurable to In this embodiment =500ms; Outlier removal uses The criterion removes outliers from single-dimensional time series. Calculate its mean μ and standard deviation σ. Then determine These are outliers and should be removed. Missing value imputation addresses missing values ​​generated after outlier removal, using linear interpolation. For sequences with 3 or fewer consecutive missing points, the imputation formula is:

[0021] Where n is the number of consecutive missing points. The valid values ​​before the missing segment. The valid value after the missing segment; The normalization process uses the min-max normalization method to map the data of each dimension to the [0,1] interval. The calculation formula is as follows:

[0022] in, This represents the minimum value of the time-series data for this dimension within a preset statistical period. This represents the maximum value of the time-series data for this dimension within a preset statistical period. This is the normalized time series data; Data frame encapsulation encapsulates all normalized time-series data within the same time period and the same charging location into standardized data frames according to a preset field structure. The standardized data frame includes a unique data frame identifier, a data acquisition entity identifier, a time period identifier, a risk dimension field, a normalized time-series data array, and a data check code. Each data frame corresponds to a unique charging location and time period.

[0023] Blockchain nodes verify the integrity of the data frame using a zero-knowledge proof protocol, generating a storage hash and feature index, and storing it on-chain in a weighted, sharded manner according to the subject, risk type, and time period. The blockchain node consortium includes charging operator nodes, insurance institution nodes, regulatory agency nodes, and third-party notary nodes. All nodes jointly maintain the consortium blockchain, employing the PBFT consensus mechanism. The zero-knowledge proof protocol uses the Groth16 protocol to verify the integrity of standardized data frames. Upon successful verification, a storage hash uniquely corresponding to the data frame is generated. The storage hash is generated using the SHA-256 hash algorithm, and the calculation formula is as follows:

[0024] Where D is the complete binary data of the standardized data frame, and H is the evidence hash.

[0025] Risk features are extracted from standardized data frames synchronously to generate feature indexes, which include subject identifier indexes, risk type indexes, and time period indexes. Each index entry corresponds to a unique evidence hash and data shard storage address. The on-chain decentralized shard storage shards data according to subject identifier, risk type, and time period, with different access permissions configured for different shards. Specifically, charging operator nodes can only access all shard data corresponding to their own subject, insurance institution nodes can only access risk type shard data of authorized subjects, and regulatory agency nodes can access all de-identified shard data, thus achieving decentralized control.

[0026] A hierarchical Bayesian inference network is constructed, reading historical data stored on the blockchain as prior information and combining it with standardized data frames collected in real time as likelihood samples. Three-level iterative updates are performed at the device, location, and region layers, outputting a posterior probability security rating result. The hierarchical Bayesian inference network has a three-level structure, from top to bottom: region layer, location layer, and device layer. The parameters of each layer follow a corresponding probability distribution. Lower-level parameters serve as likelihood samples for upper-level parameters, and upper-level parameters serve as prior information for lower-level parameters, forming a hierarchical Bayesian update structure.

[0027] The prior information acquisition process is as follows: On-chain evidence data for a preset historical period is read from blockchain nodes, historical risk features at each level are extracted, and a prior distribution is constructed. For the device layer, the prior distribution is a Beta distribution of the probability of risk occurrence for a single device; for the location layer, the prior distribution is a Gaussian mixture distribution of risks from multiple devices within the location; for the region layer, the prior distribution is a normal-inverse gamma distribution of risks from multiple locations within the region. The likelihood sample acquisition process is as follows: Standardized data frames collected in real time are split according to the device dimension to generate real-time risk feature sequences corresponding to each device, which serve as the likelihood samples for the device layer.

[0028] The specific process of the three-level iterative update is as follows: Device-level iterative updates: For a single charging device, the probability of risk occurrence is defined as follows: d is the unique identifier of the device; the prior distribution is a Beta distribution, i.e. ,in , These are prior shape parameters obtained statistically from on-chain historical data. This represents the number of historical risk occurrences. Historical number of normal operation times; the likelihood function follows a binomial distribution, i.e., the number of risk events occurring within the real-time sampling period. Follows binomial distribution ,in This represents the number of valid sampling points within the real-time sampling period; according to Bayes' theorem, the posterior distribution of the device layer is:

[0029] The posterior distribution is approximated using a variational inference algorithm to obtain the posterior mean of the risk probability of a single device. Posterior variance Complete the iterative update of the device layer; Location-level iterative update: For a single charging location, the location risk distribution is defined as a Gaussian mixture model, where the mixture components correspond to the risk distribution of each device within the location, i.e., the location risk probability. The distribution is as follows:

[0030] Where M represents the total number of charging devices in the venue. This represents the weighting coefficient of a single device in the site risk. , The output of each device is a normal distribution; the posterior mean of each device is calculated from the output of the device layer. Posterior variance Substituting into the Gaussian mixture model, we obtain the posterior risk distribution of the location layer and calculate the posterior mean of the location risk probability. With posterior variance Complete the iterative update of the venue layer; Regional layer iterative update: For a preset geographical region, define the regional risk hyperparameter as follows: , , , It follows a normal-inverse gamma distribution, that is:

[0031]

[0032] in, , , , The prior hyperparameters are statistically obtained from historical data of on-chain regions; the posterior mean of each location output by the location layer is... As likelihood samples, the Markov chain Monte Carlo simulation method, specifically the Metropolis-Hastings algorithm, is used to globally optimize the hyperparameters of the region layer. The number of iterations is set to 10,000, and the burn-in period is set to 2,000 to obtain the posterior distribution of the hyperparameters of the region layer. At the same time, the parameters of the location layer and equipment layer are corrected twice, and finally the posterior probability safety rating result of the charging location is output. The safety rating result includes the safety level, the posterior probability of the corresponding level, and the 95% confidence interval. The safety levels are divided into Level I to Level V, with Level I being the lowest risk and Level V being the highest risk.

[0033] Based on the non-life insurance actuarial reliability model, the posterior probability safety rating result is transformed into a reliability factor, embedded into the pure premium calculation model, and actuarial calibration is performed using on-chain historical claims data to generate differentiated premium pricing results. The non-life insurance actuarial reliability model adopts the Bühlmann reliability model, and the pure premium calculation model is as follows:

[0034] Where P is the differentiated net premium, Z is the reliability factor, and R is the individual risk rate based on real-time safety rating results. This is the regional benchmark risk rate.

[0035] The formula for calculating the reliability factor Z is:

[0036] Where n is the number of valid observation periods for the insured entity, and K is the structural parameter of the reliability model. , For the risk variance at the location level, This represents the risk variance at the regional level.

[0037] The calculation process for the individual risk premium R is as follows: A mapping function is constructed between the safety rating and the loss ratio. In this embodiment, the mapping function is a linear mapping, i.e. ,in The base rate is γ, the risk coefficient is S, and the risk score corresponding to the safety rating is S. S is positively correlated with the posterior probability. The higher the risk level, the larger the S value.

[0038] The actuarial calibration process is as follows: read the historical accident data of the insured entity on the blockchain node, as well as the historical accident data and compensation data of similar charging places in the region, calculate the historical loss ratio, calibrate the risk coefficient γ and structural parameter K in the pure premium calculation model, substitute the calibrated parameters into the pure premium calculation model, and generate the final differentiated premium pricing result. The pricing result includes the pure premium, the additional premium, and the total premium quote.

[0039] A full-link feature backtracking process is performed on the on-chain evidence storage data, intermediate inference results, and pricing data, dynamically updating the prior parameters of the hierarchical Bayesian inference network and the correction coefficients of the pure premium calculation model. The period of the full-link feature backtracking can be configured to be daily, weekly, or monthly. This embodiment uses weekly backtracking, and the specific process is as follows: Data backtracking and extraction: Extract the full amount of on-chain evidence data, intermediate parameter results of the device / location / regional layers of the hierarchical Bayesian inference network, premium pricing data, and actual claim data from blockchain nodes within the backtracking period; Feature correlation analysis: Pearson correlation coefficient analysis is used to calculate the correlation coefficient between each risk feature and the actual accident and compensation amount. Core risk features with an absolute value of correlation coefficient greater than a preset threshold are selected as the basis for parameter updates. In this embodiment, the threshold is set to 0.3. Parameter Iterative Update: Based on the core risk characteristics and actual incident data within the backtracking period, update the prior distribution parameters of the equipment layer, location layer, and region layer in the hierarchical Bayesian inference network, including the Beta distribution. , The weighting coefficients of the Gaussian mixture model Prior hyperparameters of the normal-inverse gamma distribution , , , Simultaneously, the correction coefficients in the pure premium calculation model are updated, including the risk coefficient γ, structural parameter K, and regional benchmark risk rate. This completes the closed-loop iterative update.

[0040] As a preferred embodiment, refer to the appendix. Figure 2 The specific process by which blockchain nodes verify the integrity of the data frame using the zero-knowledge proof protocol is as follows: A multinomial commitment circuit is constructed, employing the KZG multinomial commitment scheme to map risk feature values ​​in standardized data frames to multinomial coefficients; specifically, the N risk feature values ​​in the standardized data frame are arranged into a vector according to a preset order. Construct polynomials of degree less than N :

[0041] in, Let X be the i-th risk characteristic value, and let X be the polynomial independent variable. Generate polynomial commitments Where τ is the secret value generated by the trusted setting. , Let G1 and G2 be the generators of the elliptic curve groups respectively, and e be a bilinear mapping. Generating zero-knowledge proof credentials using random challenge values: The verification end generates random challenge values. , For a finite field, the proof is calculated. The value of , and the proof ,Will π is sent to the verification end as a zero-knowledge proof credential; The verification end confirms the authenticity of the data by verifying the validity of the credentials without needing to obtain the original plaintext data. The verification formula is as follows:

[0042] If the equation holds true, it proves that the voucher is valid, the integrity and authenticity of the standardized data frame are verified, and there is no need to disclose the original plaintext data. After verification, a Merkel root hash uniquely corresponding to the original data is generated synchronously as the evidence hash: the standardized data frame is split into fixed-size data blocks, the SHA-256 hash is calculated for each data block, Merkel leaf nodes are generated, the hash is calculated layer by layer upwards, and finally the Merkel root hash is generated as the evidence hash of the data frame and recorded in the blockchain ledger. When an incident trigger signal is detected, the corresponding data fragment is extracted based on the feature index, and a hash comparison is automatically performed by the smart contract to reconstruct a complete chain of evidence. The incident trigger signals include fire alarm signals, equipment failure trigger signals, and claims application signals. After receiving the incident trigger signal, the smart contract extracts the hash value of the target data block from the corresponding fragment based on the subject identifier, risk type, and time period in the feature index, and compares it with the Merkle root hash stored on the chain. If the comparison is consistent, it confirms that the data has not been tampered with. All data fragments that meet the conditions are spliced ​​together in chronological order to reconstruct a complete chain of evidence for the incident, which is then automatically output to the claims process.

[0043] The optimization process for on-chain weighted sharded storage is as follows: The heat prediction model based on risk characteristics uses erasure coding technology for redundant encoding and storage of high-frequency access risk characteristic data, and uses compression algorithms for cold storage of low-frequency archived data. The heat prediction model adopts an LSTM time series prediction model. The input is the historical access frequency time series data of each risk characteristic segment, and the output is the access heat prediction value within a preset period. The segment with the access heat prediction value greater than a preset threshold is defined as a high-frequency access segment, and the rest are low-frequency archived segments. For high-frequency access fragments, RS erasure coding technology is used for redundancy coding, splitting the data fragments into k data blocks and generating m check blocks, which can tolerate the corruption of up to m data blocks. In this embodiment, k=8, m=4, and the redundancy rate is 50%. For low-frequency archiving fragments, LZ4 lossless compression algorithm is used for compression and then stored in cold storage nodes. The cold storage nodes are only woken up when an authorized access request is received. The smart contract automatically adjusts the shard location based on data access frequency, migrating high-frequency data to edge cache nodes to reduce verification latency: The smart contract counts the actual access frequency of each shard in real time. When the actual access frequency of a shard is higher than the high-frequency threshold for three consecutive statistical periods, the shard is automatically migrated from the cold storage node to the edge cache node, which is deployed at the network edge close to the blockchain verification node; when the actual access frequency of a shard is lower than the low-frequency threshold for six consecutive statistical periods, the shard is automatically migrated from the edge cache node to the cold storage node. Regularly perform cross-chain data interaction to synchronize the security rating status between different blockchain nodes: adopt a cross-chain relay chain architecture, with a preset cross-chain synchronization cycle of 24 hours. Through the relay chain, the security rating results and evidence hash of this consortium chain are synchronized to the regulatory chain corresponding to the regulatory agency and the industry consortium chain corresponding to the insurance industry, to ensure that the security rating status between different blockchain nodes is consistent.

[0044] As a preferred embodiment, refer to the appendix. Figure 3 and attached Figure 4 Before introducing the attention mechanism to calculate the dynamic weights, the following process is performed: A risk knowledge graph for charging sites is constructed, defining charging equipment, environmental sensors, operators, and fire-fighting equipment as nodes. Node attributes include equipment model, rated parameters, installation location, personnel qualifications, and equipment operating status. The interaction behaviors between nodes are defined as edges, and the attributes of edges include electrical connection relationships, spatial location associations, operation sequence associations, and risk transmission probability. Using a graph neural network algorithm, specifically a graph attention network, we can uncover the implicit association risks between nodes and generate high-order feature vectors. The input to the graph attention network is the initial feature vector of each node. A multi-head attention mechanism is used to calculate the attention weights between nodes and update the node features. The calculation formula is as follows:

[0045] in, Let K be the updated output feature vector of node i, K be the number of attention heads, and σ be the activation function. Let i be the set of adjacent nodes of node i. Let be the attention weight of node j to node i in the k-th attention head. Let be the trainable weight matrix for the k-th attention head. Let be the initial feature vector of node j. For splicing operations; The high-order feature vectors of nodes output by the graph attention network are aggregated according to the device dimension and the location dimension to generate high-order feature vectors of the corresponding dimensions. These vectors are then embedded into the input layer of the hierarchical Bayesian inference network to capture the cascading risk propagation path caused by a single device failure.

[0046] An attention mechanism is introduced to calculate the dynamic weights of each risk dimension in the standardized data frame acquired in real time. Weighted preprocessing is performed on the likelihood samples. Specifically, a multi-head self-attention mechanism is adopted, with the input being the temporal feature sequences of each risk dimension in the standardized data frame. M represents the total number of risk dimensions. The dynamic weight of each risk dimension is calculated using the following formula:

[0047] Where Q, K, and V are the query matrix, key matrix, and value matrix, respectively, obtained from the input feature sequence through linear transformation. Let be the dimension of the key matrix; The dynamic weights of each risk dimension are calculated using a self-attention mechanism. ,satisfy The likelihood samples for each risk dimension are weighted, and the weighted likelihood samples are... The weighted likelihood samples are then input into the device layer of the hierarchical Bayesian inference network.

[0048] During the three-level iterative update process, the device layer uses a mean-field variational inference algorithm to approximate the risk distribution parameters of a single device. It decomposes the posterior distribution into a product of independent marginal distributions and approximates the true posterior distribution by minimizing the KL divergence. The formula for calculating the KL divergence is:

[0049] in, It is a variational distribution. D represents the observed data and is the true posterior distribution. By iteratively optimizing the variational parameters and minimizing the KL divergence, the optimal variational distribution is obtained and used as the posterior distribution of single-device risk. The site layer integrates the risk distributions of multiple devices to construct a Gaussian mixture model, and the region layer uses the Markov chain Monte Carlo simulation method to globally optimize all parameters, finally outputting a safety rating probability distribution with confidence intervals.

[0050] This embodiment also includes a forward-looking risk prediction and optimization process: A digital twin model is constructed, based on a fusion of physical mechanisms and data-driven methods, to simulate the evolution of charging sites under different extreme conditions. The physical mechanism component of the digital twin model is based on circuit theory, heat conduction theory, and combustion theory, constructing an electrical-thermal coupling model of the charging equipment and an environmental fire spread model. The data-driven component uses on-chain stored historical operating data and incident data, employing machine learning algorithms to correct the parameters of the mechanism model, achieving real-time mapping between the physical entity and the digital twin model. Through the digital twin model, the evolution process under extreme conditions is simulated, including charging equipment short circuits, overcharging, overheating, sudden rise in ambient temperature, flammable gas leakage, and personnel violations, simulating the risk evolution path, risk occurrence probability, and accident impact range under different conditions. Using a Bayesian structured time series algorithm, the trend of security ratings in future cycles is predicted. The inputs to the Bayesian structured time series algorithm are historical security rating time series data, risk evolution characteristics output by a digital twin model, and regional macroeconomic risk characteristics. The model includes trend terms, cycle terms, and regression terms, and the state-space equation is:

[0051]

[0052] in, Let t be the safety rating score. For state vectors, For the observation matrix, Here is the state transition matrix. Choose a matrix for the error. To observe the noise, This is state noise, and all of it follows a normal distribution. The parameters of the Bayesian structured time series model are estimated using the Markov chain Monte Carlo method, and the predicted safety rating trend for the future preset period is output, including the predicted safety level, probability of risk occurrence, and confidence interval. This prediction result is introduced as a forward-looking factor into the non-life insurance actuarial reliability model to adjust the pure premium calculation model, thereby achieving preventive premium adjustments for potential risks.

[0053] As a preferred embodiment, the following procedure is performed before calculating the reliability factor Z value corresponding to the posterior probability safety rating result: A generative adversarial network (GAN) is constructed, comprising a generator and a discriminator, both of which employ a fully connected neural network structure. The generator's input is a random noise vector, and its output is a security rating distribution sample under normal conditions. The discriminator's input consists of the sample output by the generator and the real-time input security rating data, and its output is the probability that the input sample is a real normal sample. The generator is trained to generate samples that are as close as possible to the true normal security rating distribution, while minimizing the loss function.

[0054] Where z is a random noise vector. Let G be the prior distribution of noise, D be the generator, and denoted by ... The training objective of the discriminator is to accurately distinguish between generated samples and real normal samples, minimizing the loss function:

[0055] Where x represents a real, normal safety rating sample. This represents the distribution of real, normal samples; The generative adversarial network (GAN) is pre-trained using historical, normal security rating data stored on the blockchain. After training, the real-time calculated posterior probability security rating data is input into the discriminator, which outputs the probability value that the data is a normal sample. When the discriminator detects that the security rating data is forged or has an abnormal drift (i.e., the probability value is lower than a preset threshold, which is 0.05 in this embodiment), a circuit breaker mechanism is triggered to suspend the premium pricing process, and historical, stored data on the blockchain is called for source tracing and comparison. The source tracing and comparison process includes extracting the original data frame storage hash corresponding to the security rating data and comparing it with the hash stored on the blockchain to verify whether the data has been tampered with; extracting the inference intermediate parameters corresponding to the security rating data and comparing them with the historical normal parameter distribution to locate the source of the anomaly; the premium pricing process can only be resumed after the anomaly investigation is completed.

[0056] The specific process for generating differentiated premium pricing results based on the non-life insurance actuarial reliability model is as follows: A mapping function between safety rating and payout ratio is constructed. In this embodiment, the mapping function adopts a nonlinear polynomial fitting function, which is obtained by fitting historical on-chain accident data and payout data. The mapping function is as follows:

[0057] Where LR is the loss ratio and S is the risk score corresponding to the safety rating. , , , The polynomial coefficients obtained from the fitting; individual risk premium rate. Calculate the reliability factor Z value corresponding to the posterior probability safety rating result; A deep reinforcement learning algorithm is used to simulate the game between insurance policyholders' safety investment and premium expenditure, dynamically adjusting the weight coefficient of the reliability factor in the pure premium calculation model. The deep reinforcement learning algorithm employs a deep Q-network, with the agent being the actuarial system and the environment representing the insurance policyholder's safety investment decisions and risk status changes. The state space includes the policyholder's current safety rating, historical safety investment amount, historical premium expenditure, historical claims records, and regional benchmark premium rate. The action space represents the adjustment amount of the reliability factor's weight coefficient in the pure premium calculation model, with an adjustment range of [-0.2, 0.2]. The reward function is:

[0058] in, , , The reward weighting coefficient is the ratio of the actual compensation amount paid to the insured to the premium income, the renewal rate is the proportion of the insured's continuous insurance period, and the risk deviation is the difference between the risk predicted by the safety rating and the actual risk of loss. Through iterative training using a deep Q-network algorithm, the agent learns the optimal weight adjustment strategy, simulating the game between insurance policyholders' investment in safety and premium expenditure, and outputs the adjusted weight coefficients ω. ; The adjusted weighting coefficients are coupled with the base premium rate to calculate a dynamic premium quote that fluctuates in real time with the safety rating. The pure premium calculation model is optimized as follows:

[0059] The calculated dynamic premium quote, along with the corresponding quote logic, including the confidence factor calculation logic, weight adjustment logic, and rate mapping logic, is generated into a quote logic hash using the SHA-256 hash algorithm and uploaded to a blockchain node for storage.

[0060] As a preferred embodiment, refer to the appendix. Figure 5 and attached Figure 6The end-to-end feature backtracking adopts a federated learning architecture, and the specific process is as follows: The federated learning architecture is a horizontal federated learning architecture, where each charging site acts as an independent local node, deploying a local training environment, and the aggregation server is deployed on the supervisory node of the blockchain consortium. Each local node and the aggregation server are connected through an encrypted communication channel. Each charging location acts as an independent node, training the model parameter gradient locally based on on-chain evidence data: local nodes read the on-chain evidence historical data, inference intermediate results, pricing data, and accident compensation data of their location to construct a local training dataset; based on the local training dataset, the gradient of the prior distribution parameters of the hierarchical Bayesian inference network and the gradient of the correction coefficient of the pure premium calculation model are calculated; a homomorphic encryption algorithm is used to encrypt the calculated local gradients, and only the encrypted gradients are uploaded to the aggregation server; After aggregating global parameters, the aggregation server issues an update: Upon receiving the encrypted gradients uploaded by each local node, the aggregation server uses a federated averaging algorithm to aggregate global parameters. The aggregation formula is as follows:

[0061] in, Here, N represents the global aggregated gradient, and N is the total number of local nodes participating in federated learning. Let be the number of local training samples for the i-th local node. The total number of training samples across all local nodes. The encryption gradient uploaded by the i-th local node; After aggregation is completed, the aggregation server distributes the encrypted global aggregation gradient to each local node. Each local node decrypts the global gradient and updates the prior distribution parameters of its local hierarchical Bayesian inference network, as well as the correction coefficients of the pure premium calculation model. Without leaking the original privacy data of each location, the nodes work together to complete the global update of the model parameters.

[0062] After the aggregation server performs global parameter aggregation, it also executes the following process: The contribution of the uploaded gradient at each charging location is calculated based on the Shapley value. The formula for calculating the Shapley value of the i-th local node is as follows:

[0063] Where N is the set of all local nodes participating in federated learning, and S is a subset of N. The performance index value of the global model when nodes in subset S participate in training is the weighted sum of the accuracy of safety rating and the deviation rate of premium pricing in this embodiment. By calculating the Shapley value of each local node, the contribution of the gradient uploaded by each charging location to the global model is obtained, and the contribution proof is recorded to the blockchain node. The discourse power weight in the update of the prior parameters of each location at the regional level is dynamically adjusted based on the contribution: the discourse power weight is positively correlated with the Shapley value, and the discourse power weight of the i-th node is... In the Markov chain Monte Carlo global optimization process at the regional level, the parameter contributions of each location are weighted according to the discourse power weight; The contribution results are fed back into the actuarial model, and additional premium discount coefficients are given to entities with high contribution and low risk: a contribution threshold and a risk level threshold are set, and when the Shapley contribution of the charging site is higher than the contribution threshold and the safety rating is Level I or Level II, an additional premium discount coefficient δ is given. Final premium , where P is the premium calculated using the differentiated pure premium.

[0064] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any simple modifications, equivalent changes, and alterations made to the above embodiments based on the technical essence of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A safety rating and insurance actuarial method for charging stations based on blockchain-based evidence storage and Bayesian inference, characterized in that... Includes the following steps: The edge acquisition terminal acquires full-dimensional time-series data of the charging site, and generates standardized data frames after preprocessing; Blockchain nodes verify the integrity of the data frame through a zero-knowledge proof protocol, generate a storage hash and feature index, and store it on-chain in a weighted and segmented manner according to the subject, risk type and time period. A hierarchical Bayesian inference network is constructed. Historical data stored on the blockchain is read as prior information and combined with standardized data frames collected in real time as likelihood samples. The network is iteratively updated at three levels: device layer, location layer, and region layer, and the posterior probability security rating result is output. Based on the non-life insurance actuarial reliability model, the posterior probability safety rating result is transformed into a reliability factor, embedded into the pure premium calculation model, and on-chain historical claims data is called for actuarial calibration to generate differentiated premium pricing results. The system performs full-link feature backtracking on on-chain evidence data, intermediate inference results, and pricing data, and dynamically updates the prior parameters of the hierarchical Bayesian inference network and the correction coefficients of the pure premium calculation model.

2. The method according to claim 1, characterized in that, The blockchain node performs integrity verification on the data frame using a zero-knowledge proof protocol, specifically including: Construct a multinomial commitment circuit to map risk feature values ​​in standardized data frames to multinomial coefficients, and use random challenge values ​​to generate zero-knowledge proof credentials; Without needing to obtain the original plaintext data, the verification end confirms the authenticity of the data by verifying the validity of the credentials, and simultaneously generates a Merkle root hash that uniquely corresponds to the original data as the evidence storage hash. When an incident trigger signal is detected, the corresponding data fragments are extracted based on the feature index, and the hash comparison is automatically performed through a smart contract to reconstruct the complete chain of evidence.

3. The method according to claim 1, characterized in that, The construction of a hierarchical Bayesian inference network for three-level iterative updates specifically includes: An attention mechanism is introduced to calculate the dynamic weights of each risk dimension in the standardized data frames collected in real time, and weighted preprocessing is performed on the likelihood samples. At the equipment level, variational inference algorithms are used to approximate the risk distribution parameters of a single device. At the location level, risk distributions of multiple devices are integrated to construct a Gaussian mixture model. At the region level, Markov chain Monte Carlo simulation method is used to globally optimize all parameters and output a probability distribution of safety rating with confidence intervals.

4. The method according to claim 1, characterized in that, The specific details of generating differentiated premium pricing results based on the non-life insurance actuarial reliability model include: Construct a mapping function between safety rating and loss ratio, and calculate the reliability factor Z value corresponding to the posterior probability safety rating result; Deep reinforcement learning algorithms are used to simulate the game between insurance policyholders’ security investment and premium expenditure, and the weight coefficient of the reliability factor in the pure premium calculation model is dynamically adjusted. The adjusted weighting coefficients are coupled with the base rate to calculate a dynamic premium quote that fluctuates in real time with the security rating, and the quote logic hash is stored on the blockchain for evidence.

5. The method according to claim 1, characterized in that, The full-link feature backtracking specifically includes: The federated learning architecture is adopted, where each charging site acts as an independent node to train the model parameter gradient locally based on the stored data, and only the encrypted gradient is uploaded to the aggregation server. After the aggregation server performs global parameter aggregation, it issues updates, and without disclosing the original privacy data of each location, it collaboratively updates the prior distribution parameters of the hierarchical Bayesian inference network and synchronously corrects the trend correction coefficients in the pure premium calculation model.

6. The method according to claim 2, characterized in that, The on-chain weighted sharded storage specifically includes: Based on the heat prediction model of risk characteristics, the risk characteristic data with high frequency access is redundantly encoded and stored using erasure coding technology, and the low frequency archived data is cold-stored using compression algorithms. The smart contract automatically adjusts the sharding position based on the data access frequency, migrates high-frequency data to edge cache nodes to reduce verification latency, and periodically performs cross-chain data interaction to synchronize the security rating status between different blockchain nodes.

7. The method according to claim 3, characterized in that, Before the introduction of the attention mechanism to calculate dynamic weights, the following also includes: Construct a risk knowledge graph for charging sites, defining charging equipment, environmental sensors, and operators as graph nodes, and interactive behaviors as edges; By using graph neural network algorithms to mine implicit risk associations between nodes, high-order feature vectors are generated and embedded into the input layer of a hierarchical Bayesian inference network to capture the cascading risk propagation path caused by a single device failure.

8. The method according to claim 4, characterized in that, The reliability factor Z value corresponding to the calculated posterior probability security rating result also includes: A generative adversarial network is constructed, which uses a generator to simulate the security rating distribution under normal conditions and a discriminator to identify abnormal perturbations in the input data. When the discriminator detects that the security rating data is forged or abnormally drifted, it triggers the circuit breaker mechanism to suspend the premium pricing process and calls on-chain historical evidence data for traceability and comparison.

9. The method according to claim 5, characterized in that, After performing global parameter aggregation, the aggregation server also includes: The contribution of each charging location to the uploaded gradient is calculated based on the Shapley value, and the contribution proof is recorded on the blockchain. The weight of each venue's voice in the update of prior parameters at the regional level is dynamically adjusted based on its contribution, and fed back to the actuarial model to give additional premium discount coefficients to entities with high contribution and low risk.

10. The method according to claim 7, characterized in that, After generating the higher-order feature vector, the process also includes: A digital twin model is constructed, based on a fusion of physical mechanisms and data-driven methods, to simulate the evolution of charging sites under different extreme conditions; We use a Bayesian structured time series algorithm to predict the safety rating trend for future periods, and then introduce the prediction results as a forward-looking factor into the non-life insurance actuarial reliability model.