Method and device for regulating power data access permission, electronic equipment and storage medium
By verifying the static identity of the access subject and power grid status indicators, and using smart contracts to calculate dynamic trust values to generate permission tokens, the limitations of static authorization in traditional power data access control are overcome, enabling dynamic control of power data access permissions and improving security and reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-03
- Publication Date
- 2026-06-09
AI Technical Summary
Traditional power data access control methods rely on static authorization, which cannot dynamically assess the real-time trustworthiness of the access subject and lacks the ability to coordinate and regulate with the real-time operation status of the power grid, resulting in security risks and insufficient reliability.
By responding to access requests, verifying digital certificates, and obtaining static identity attributes, device behavior attributes, and power grid status indicators of the accessing entity from the blockchain ledger, the system uses smart contracts to dynamically adjust adaptive weights to calculate dynamic trust values and generate permission tokens to achieve dynamic permission management.
It enables adaptive control of power data access permissions, reduces the risk of abnormal access and unauthorized operation, and improves the security and reliability of the power data access process.
Smart Images

Figure CN122179164A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power data access control technology, and in particular to a method, apparatus, electronic device, and storage medium for regulating power data access permissions. Background Technology
[0002] With the continuous improvement of the digitalization and informatization of the power system, the demand for sharing power data in business scenarios such as dispatching and operation, equipment maintenance, load management, and cross-agency collaboration is increasing. In this cross-domain environment, secure sharing and refined access control of power data are key prerequisites for ensuring the safe and stable operation of the power grid and maximizing the value of data.
[0003] However, traditional access control methods, such as role-based access control (RBAC) or attribute-based access control (ABAC), usually follow the design philosophy of "one-time authorization, long-term validity". That is, after the access subject is authenticated and granted the corresponding role or attribute, it will have fixed access rights for a period of time.
[0004] This type of permission allocation mechanism, based on static authorization, has significant technical limitations. On one hand, permission decisions rely primarily on static identity information formed during the registration or initialization phase, making it difficult to reflect real-time changes in the subject's behavior during access and to dynamically assess its current trustworthiness. For example, when legitimate devices exhibit abnormal access behavior due to security attacks, or maintenance accounts are illegally used, although their identity information remains unchanged, their actual trustworthiness is significantly reduced. The static permission system struggles to detect and respond promptly, allowing compromised subjects to still utilize existing permissions to perform high-risk operations. On the other hand, existing access control models typically operate independently of the real-time operating status of the power grid, lacking the ability to coordinate and regulate with the physical state of the power grid. For instance, permission policies remain unchanged regardless of whether the power grid is in stable operation or in high-risk / emergency states, failing to dynamically tighten or adjust access permissions according to power grid security needs. This can easily introduce additional security risks in critical operating scenarios, making it difficult to meet the high security and reliability requirements of the power system.
[0005] Therefore, how to overcome the limitations of the traditional static authorization model and achieve adaptive control of power data access permissions is a problem that urgently needs to be solved in this field. Summary of the Invention
[0006] This invention provides a method, apparatus, electronic device, and storage medium for regulating power data access permissions, which can solve at least one of the above-mentioned technical problems.
[0007] In a first aspect, embodiments of the present invention provide a method for regulating power data access permissions, comprising: In response to an access request from an accessing subject, wherein the access request includes a device identifier and a digital certificate; Verify the digital certificate, and if the verification result is successful, obtain the static identity attributes, device behavior attributes, power grid status indicators and historical cross-domain data corresponding to the access subject from the blockchain ledger based on the device identifier; Based on adaptive weights and the static identity attributes, power grid equipment data, power grid status indicators, and historical cross-domain data corresponding to the access subject, a dynamic trust value is calculated, wherein the adaptive weights are dynamically adjusted by the smart contract. Based on the dynamic trust value, the smart contract is invoked to generate an authorization token; The access token is issued to the access subject so that the access subject can access the power data according to the permissions in the access token.
[0008] In a second aspect, embodiments of the present invention provide a device for regulating power data access permissions, comprising: The request-response module is used to respond to the access request of the access subject, wherein the access request includes a device identifier and a digital certificate; The data acquisition module is used to verify the digital certificate, and if the verification result is successful, to obtain the static identity attributes, device behavior attributes, power grid status indicators and historical cross-domain data corresponding to the access subject from the blockchain ledger based on the device identifier; The dynamic trust value calculation module is used to calculate the dynamic trust value based on the adaptive weight and the static identity attributes, power grid equipment data, power grid status indicators and historical cross-domain data corresponding to the access subject. The adaptive weight is dynamically adjusted by the smart contract. The permission token generation module is used to generate a permission token by calling the smart contract based on the dynamic trust value; The data access module is used to issue the permission token to the access subject, so that the access subject can access power data according to the permissions in the permission token.
[0009] Thirdly, embodiments of the present invention also provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method described in any one of the embodiments of the present invention.
[0010] Fourthly, embodiments of the present invention also provide a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to perform the method described in any one of the embodiments of the present invention.
[0011] This invention responds to access requests from accessing entities and verifies the digital certificates within those requests. Upon successful verification, it retrieves the accessing entity's static identity attributes, device behavior attributes, power grid status indicators, and historical cross-domain data from the blockchain based on the device identifier in the access request. Building upon this, it utilizes adaptive weights dynamically adjusted by smart contracts to calculate a dynamic trust value reflecting the accessing entity's current overall trustworthiness. This allows permission assessment to move beyond relying on a single static identity information and adjust in real-time based on changes in the accessing entity's behavior, power grid operational status, and the evolution of cross-domain collaboration history. Furthermore, the dynamic trust value triggers the smart contract to generate and issue permission tokens, ensuring that the granted access permissions match the accessing entity's real-time trustworthiness. This achieves adaptive control of power data access permissions, reducing the risk of abnormal access and unauthorized operations, and improving the overall security and reliability of the power data access process.
[0012] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0013] The accompanying drawings are provided for a better understanding of this solution and do not constitute a limitation of the invention. Wherein: Figure 1 This is a flowchart of a method for controlling power data access permissions according to an embodiment of the present invention; Figure 2 This is a structural block diagram of a power data access control device according to an embodiment of the present invention; Figure 3 This is a schematic block diagram of an electronic device used to implement the methods of the embodiments of the present invention. Detailed Implementation
[0014] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0015] In a specific application scenario, the power data access permission control method of this invention is applied to a power data access permission platform. This platform includes a data layer, a network layer, a smart contract layer, and an application layer. The data layer is responsible for the trusted storage and encrypted protection of critical business data. Its stored content is at least divided into on-chain data (such as certificate hashes and permission token states) and off-chain data (such as device behavior logs), and data security is ensured through encryption mechanisms such as the State Cryptography Algorithms (SM) series of algorithms. The network layer is responsible for implementing a multi-trust domain consortium blockchain network composed of core nodes, edge nodes, and access nodes, and establishing multi-level trust relationships and secure communication channels through a hierarchical Certificate Authority (CA) system and cross-domain communication protocols. The smart contract layer deploys a series of smart contracts, including identity management contracts, permission management contracts, trust value contracts, and audit contracts, to automatically execute core logic such as identity authentication, permission calculation, and audit logging. The application layer encapsulates business function interfaces for end users, providing various business services, including unified identity authentication services, cross-domain access control services, and a dynamic permission management platform.
[0016] Access nodes submit access requests along with a device identifier (ID) and a digital certificate. Edge nodes and core nodes jointly verify identity and permissions. A smart contract generates a permission token based on the access subject's dynamic trust value; this token automatically expires upon its expiration or the end of the access period. Edge nodes continuously collect device behavior data and assess trust values; the smart contract can adjust permissions based on real-time changes. All identity operations, permission changes, and access events generate audit logs and are stored on the blockchain for traceability and compliance management.
[0017] The embodiments of this invention are applicable to scenarios such as cross-regional power grid dispatching, distributed energy access and collaborative control, temporary access management for third-party operation and maintenance personnel, power system security auditing and regulatory evidence collection, and power Internet of Things environments with multi-entity collaboration. Through hierarchical CA identity authentication, trust-value-driven dynamic access control, and smart contract management, secure, flexible, and traceable power data access permission control is achieved.
[0018] Figure 1 This is a flowchart of a method for regulating power data access permissions according to an embodiment of the present invention.
[0019] like Figure 1 As shown, the method for regulating access permissions to power data may include: S110, in response to an access request from the accessing subject, wherein the access request includes a device identifier and a digital certificate; S120 verifies the digital certificate and, if the verification result is successful, retrieves the static identity attributes, device behavior attributes, power grid status indicators, and historical cross-domain data corresponding to the access subject from the blockchain ledger based on the device identifier. S130, based on adaptive weights and the static identity attributes of the access subject, power grid equipment data, power grid status indicators and historical cross-domain data, calculates dynamic trust value, where adaptive weights are dynamically adjusted by smart contracts. S140, based on dynamic trust value, calls the smart contract to generate permission token; S150, issue an access token to the access subject so that the access subject can access the power data according to the permissions in the access token.
[0020] For example, the access subject could be a grid dispatcher requesting access to real-time power flow data for a certain area on a dispatch center workstation; a third-party operation and maintenance personnel requesting access to inverter control parameters of a distributed photovoltaic power station through a remote operation and maintenance terminal; an auditor from a power regulatory agency requesting to query the electricity generation data of a power generation company for the past month on a regulatory platform; or an ordinary electricity user.
[0021] In this example, firstly, the edge node of the target trust domain receives an access request on its network listening port. This request is initiated by the accessing entity and encapsulated within a secure transport layer protocol (such as Transport Layer Security (TLS) / Secure Sockets Layer (SSL)). Subsequently, the edge node's access gateway parses the request, extracting a standard-formatted request message. The message's data structure explicitly includes a unique device identifier to identify the accessing entity and a digital certificate issued by a Certificate Authority (CA) for authentication.
[0022] For example, verifying a digital certificate includes checking the certificate's validity period, checking its revocation status, and checking the certificate chain.
[0023] In this example, firstly, the edge node performs a series of rigorous verification procedures on the received digital certificate. This process includes at least the following: verifying the certificate chain level by level using the core CA's root certificate; checking if the certificate's validity period is within the current timeframe; and confirming that the certificate has not been revoked by querying the Online Certificate Status Protocol (OCSP) or the Certificate Revocation List (CRL). Once all the above verification items return a successful result, the system confirms the legitimacy of the access subject's identity. Next, the system uses the device identifier carried in the access request as the primary key to search the blockchain ledger and associated off-chain databases to obtain data on all trust assessment dimensions related to the access subject. This data includes: static identity attributes recording information such as device type and trust domain; device behavior attributes recording information such as historical access frequency and number of abnormal operations; power grid status indicators reflecting the current power grid security level obtained through oracles; and historical cross-domain data recording the subject's or its domain's historical cross-domain interaction performance.
[0024] For example, static identity attributes refer to identity-related attribute information that is determined during the registration or certificate issuance stage of the access subject and remains relatively stable during the certificate validity period, used to characterize the basic identity credibility of the access subject.
[0025] Static identity attributes may include: the type of the device or user (e.g., dispatch terminal, maintenance personnel terminal, third-party system); the organization or trusted domain identifier; the device model, device category, and manufacturer information; the digital certificate authority identifier and certificate level; the registration time and certificate validity period, etc.
[0026] For example, power grid equipment data refers to the set of data generated by various power grid devices in the power system during operation, reflecting the operating status and behavioral characteristics of the devices. For example, in the past 24 hours: continuous access rhythm characteristics: {access frequency: 1 time / minute, access interval standard deviation: 5 seconds}; number of unauthorized access attempts: 2; operation success rate: 99.8%; instruction feedback latency: {average: 50 milliseconds, peak: 200 ms}; statistical deviation of returned data: {daily electricity consumption fluctuation range: 250%}.
[0027] For example, power grid status indicators refer to situational awareness indicators used to comprehensively characterize the current overall operating environment, safety status, and risk level of the power grid. Examples include: power flow fluctuation indicators: power fluctuation rate at key section A: 15% (exceeding the 10% threshold); distributed energy prediction deviation: regional photovoltaic total output prediction deviation: -30% (actual output is far lower than predicted); network and equipment alarm indicators: the system received 3 transformer overload alarms in the past hour; load pressure indicators: system reserve capacity rate: 4.5% (below the 5% safety line).
[0028] For example, historical cross-domain data refers to historical access records and behavioral data generated by an accessing entity during cross-domain access in different trust domains or different management areas. It may include basic statistical data, time decay-related data, and path inference-related data.
[0029] Basic statistical data, such as the number of successful cross-domain collaborations, the number of failed or abnormal cross-domain collaborations, and the number of cross-domain collaboration violations. Time decay-related data, such as a list containing the timestamp and basic weight (+1 for success, -2 for failure, etc.) for each cross-domain collaboration event. Path reasoning-related data (from the cross-domain trust graph), such as the historical trustworthiness of a path to the target domain (e.g., A→B) being 0.95; and the trustworthiness of a path through an intermediate domain (e.g., A→B→C) being 0.81.
[0030] For example, dynamic trust value refers to a quantitative indicator that reflects the current trust level of the accessing subject in real time, calculated based on the static identity attributes of the accessing subject, power grid equipment data, power grid status indicators and historical cross-domain data, combined with an adaptive weight model.
[0031] According to the above implementation method, the identity of the accessing entity is reliably verified by using the device identifier and digital certificate when initiating the access request. After successful verification, multi-dimensional information related to the accessing entity is obtained from the blockchain ledger, including static identity attributes, device behavior attributes, power grid status indicators, and historical cross-domain data, thus providing a complete and reliable data foundation for permission decisions. Based on this, adaptive weights dynamically adjusted by smart contracts are used to comprehensively calculate the aforementioned multi-source information, obtaining a dynamic trust value that reflects the trustworthiness of the accessing entity in real time. Furthermore, a permission token is generated and issued based on this dynamic trust value, ensuring that the accessing entity can only access the corresponding power data within its current trust level. In this way, dynamic, refined, and context-aware control of power data access permissions can be achieved, effectively reducing the risks of abnormal access and unauthorized operations, and improving the security and controllability of power data sharing and access processes.
[0032] In one implementation, a dynamic trust value is calculated based on adaptive weights and the static identity attributes corresponding to the accessing subject, power grid equipment data, power grid status indicators, and historical cross-domain data. This includes: mapping each static attribute in the static identity attributes to an attribute score to obtain each attribute score; weighting and summing each attribute score based on a first weight coefficient in the adaptive weights to obtain a basic trust value; processing the power grid equipment data using a lightweight graph neural network model to obtain a behavioral credibility score; calculating each indicator value in the power grid status indicators based on a second weight coefficient in the adaptive weights to obtain a power grid status adjustment factor; calculating the historical cross-domain data based on a third weight coefficient in the adaptive weights to obtain a cross-domain credibility score; and weighting and summing the basic trust value, behavioral credibility score, power grid status adjustment factor, and cross-domain credibility score based on a fourth weight coefficient in the adaptive weights to obtain a dynamic trust value. The fourth weight coefficient includes the basic trust weight, credibility weight, adjustment factor weight, and cross-domain trust value weight.
[0033] For example, static attributes include device type (such as photovoltaic, energy storage, transformer, switchgear), domain (such as the power grid domain identifier), type of operation to be performed (such as reading, control, regulation), security level (such as the security level recorded in the device security level certificate issued by the CA), and digital certificate integrity (such as the digital certificate hash value, used to verify whether the certificate has been tampered with).
[0034] In this example, static identity attributes are generated by a hierarchical CA during the access subject registration phase and written to the blockchain ledger via a smart contract to form a set of trusted identity data that can be directly accessed. Static identity attributes include at least fields such as device type, domain, capability declaration, security level, and registration integrity. When performing static attribute scoring, the system calls the on-chain identity management contract to sequentially read each static attribute field and map each static attribute to its corresponding attribute score value according to a pre-defined static attribute scoring rule base.
[0035] It should be noted that categorical attributes (such as device type and trust domain) are mapped to discrete evaluation values, and numerical attributes (such as hardware security level) are normalized to facilitate subsequent calculation of the basic trust value.
[0036] For example, the first weight coefficient is a set of weight parameters used to characterize the relative importance of different static identity attributes in the basic trust assessment. This set of weight parameters is maintained by a strategy-type smart contract. It includes device type weight, domain weight, executable operation type weight, security level weight, and digital certificate integrity weight.
[0037] For example, the basic trust value refers to the initial trust assessment result obtained by weighting the static identity attribute scores of the access subject with the first weight coefficient, which is used to reflect the basic trustworthiness of the access subject without considering real-time behavior and environmental factors.
[0038] In this example, the process of calculating the base trust value by weighting and summing the scores of each attribute using the first weight coefficient in the adaptive weighting can be represented by the following function expression: In the formula, Basic trust value; Weights are assigned to different device types. The weight of the domain; Weights for executable operation types; Security level weights; Weights for digital certificate integrity; Rate the attributes corresponding to the device type; Rate the attributes corresponding to the domain; Rate the attributes corresponding to the executable operation type; Assign attribute scores corresponding to the security level; Score the attributes corresponding to the integrity of the digital certificate.
[0039] For example, temporal behavior vectors describing the dynamic behavior of an entity and cross-domain trust graphs depicting inter-domain trust relationships are used as inputs to a pre-trained Lightweight Graph Neural Network (GNN-lite) model. This model performs deep reasoning analysis on the input behavior patterns and collaborative relationships through its internal graph convolution and temporal feature learning layers to identify potential anomalous behavior patterns. After performing a complete forward propagation computation, the model generates a scalar value at its output that quantifies the trustworthiness of the entity's current behavior; this value is the behavior trustworthiness score.
[0040] For example, the second weighting coefficient refers to the weighting parameter used to adjust the proportion of the behavioral credibility score corresponding to the power grid equipment data in the overall trust assessment.
[0041] In this example, real-time values of various indicators from the power grid status index, such as power flow fluctuation and prediction deviation, are obtained, and these indicators with different dimensions are normalized. Then, a second weighting coefficient (i.e., the risk weight of each status indicator) controlled by a smart contract is obtained, and the normalized indicator values are weighted and summed to obtain a comprehensive power grid operation status index. Finally, this index is input into a preset nonlinear mapping function (such as a piecewise linear or exponentially decaying function) for transformation to generate the final power grid status adjustment factor. The value range of this factor is typically set to negative or less than 1 to suppress the overall trust value when the power grid is at high risk.
[0042] For example, the third weighting coefficient refers to the weighting parameter used to adjust the influence of the situation adjustment factor formed by the power grid situation indicators in the trust assessment.
[0043] In this example, firstly, a basic statistical credibility is calculated based on the statistics of successes, failures, and violations in historical cross-domain data. Secondly, a time decay function is introduced, and the weights of each historical collaboration are exponentially weighted according to their time intervals and summed to obtain the time decay credibility. Thirdly, in the absence of direct interaction history, the historical credibility of each segment on the path is multiplied together using a cross-domain credibility graph to obtain the cross-domain path credibility. Finally, the three credibility components are linearly weighted and summed using a third weight coefficient to obtain the final comprehensive cross-domain credibility score.
[0044] For example, the fourth weighting coefficient refers to a set of weighting parameters used to uniformly integrate the basic trust value, behavioral credibility score, power grid situation adjustment factor, and cross-domain credibility score. This includes the basic trust weight, credibility weight, adjustment factor weight, and cross-domain trust value weight, which are used to comprehensively control the contribution ratio of different trust dimensions in the dynamic trust value calculation.
[0045] In this example, the trust value contract is called to obtain the fourth weight coefficient parameter. The basic trust value, behavioral credibility score, situation adjustment factor and cross-domain credibility score are respectively fused with the corresponding weights in the fourth weight coefficient to calculate, and the calculation result is used as the final dynamic trust value output.
[0046] The calculation of dynamic trust value can be expressed by the following function expression: In the formula, This is a dynamic trust value; Basic trust weights; As a credibility weight; For adjusting factor weights; As a cross-domain trust value weight; Basic trust value; Score the credibility of the behavior; For power grid status adjustment factors; Scoring cross-domain credibility.
[0047] According to the above implementation method, static identity attributes are first quantified into comparable attribute scores to form a basic trust value, reflecting the prior credibility of the accessing entity. Simultaneously, a lightweight graph neural network model is used to analyze power grid equipment data, obtaining a behavioral credibility score that characterizes the real-time behavioral state of the equipment. Furthermore, power grid status indicators and historical cross-domain data are combined to introduce a power grid status adjustment factor and a cross-domain credibility score, reflecting the impact of changes in the power grid operating environment and historical cross-domain collaboration on trust assessment. Finally, under the unified control of adaptive weights, the above-mentioned multiple trust elements are weighted and summed to obtain a dynamic trust value. This allows for a more comprehensive and accurate reflection of the true credibility status of the accessing entity under different operating scenarios, providing a reliable basis for the subsequent refinement and dynamic control of access permissions, and improving the security and flexibility of power data access control.
[0048] In one implementation, a lightweight graph neural network model is used to process power grid equipment data to obtain a behavioral credibility score. This includes: acquiring power grid equipment data, which includes the device behavior attributes of the target device corresponding to the accessing subject within a preset time window, as well as the power grid domain, subdomain, and operating entity; constructing a time-series behavioral vector based on the device behavior attributes of the target device corresponding to the accessing subject within the preset time window, where the device behavior attributes include the number of consecutive accesses, the number of unauthorized access or illegal operation attempts, and the operation success rate; constructing a cross-domain trust graph by using the power grid domain, subdomain, and operating entity as nodes, relationships between domains that have undergone authorization or cooperation as edges, and the credibility weights between domains as edge weights; and using the time-series behavioral vector and the cross-domain trust graph as inputs to the lightweight graph neural network model to obtain the behavioral credibility score output by the lightweight graph neural network model.
[0049] For example, power grid equipment data refers to a set of data used within a preset time window to characterize the operational behavior of the target equipment corresponding to the accessing subject and its trust environment. Power grid equipment data includes at least two types of information: one is the equipment behavior attributes generated by the target equipment within the preset time window, which reflects the operational behavior and interaction characteristics of the target equipment during the access process; the other is the power grid domain, subdomain, and corresponding operating entity information to which the target equipment belongs, which characterizes the organizational affiliation and trust boundaries of the target equipment in cross-domain access scenarios.
[0050] Among them, device behavior attributes include the number of consecutive accesses, the number of unauthorized access or illegal operation attempts, and the operation success rate, which are used to quantitatively analyze the credibility of the access subject from a behavioral perspective.
[0051] In this example, firstly, based on the identifier of the accessing entity, the system queries and extracts all operation records of the accessing entity within a preset time window (e.g., the past seven days) from the off-chain log database or real-time monitoring system, and statistically aggregates these records to generate a series of quantified device behavior attributes. Simultaneously, the system queries and retrieves organizational structure information related to the accessing entity and its potential interaction objects from the member management contract or configuration library of the consortium blockchain. This information includes at least the grid domain, subdomain, and specific operating entity name to which they belong.
[0052] For example, a temporal behavior vector refers to a vectorized representation formed by constructing multi-dimensional behavioral features based on the device behavior attributes of the target device within a preset time window in chronological order, used to describe the behavioral change patterns of the accessing subject in the continuous time dimension.
[0053] In this example, the device behavior attributes aggregated over the entire time window are sliced and statistically analyzed at a finer time granularity (e.g., hourly). For each time slice, the system calculates metrics such as consecutive access counts, unauthorized access attempts, and operation success rate. Then, these metrics for each time slice are arranged in a fixed order (e.g., consecutive access counts, unauthorized access attempts, and operation success rate) to form a multi-dimensional numerical vector. Finally, the numerical vectors corresponding to all time slices within the entire time window are arranged in chronological order to form a two-dimensional matrix. This matrix represents the temporal behavior vector that reflects the dynamic evolution of the behavior.
[0054] For example, a cross-domain trust graph refers to a graph-structured trust representation constructed using power grid domains, subdomains, and operating entities as graph nodes, and using existing authorization or collaboration relationships between different domains or entities as graph edges. Each graph edge is accompanied by a credibility weight to characterize the degree of trust between domains or entities.
[0055] In this example, all acquired power grid domains, subdomains, and operational entities are first instantiated as independent nodes in a graph data structure. Then, the historical interaction database is queried, iterating through all recorded authorization or collaboration events between different entities. If any two entities are found to have had such a relationship, a directed or undirected edge is established between the two corresponding nodes. Finally, based on the frequency, success rate, and risk records of historical interactions, the trust weight corresponding to each edge is calculated, and this weight value is assigned to the edge as its edge weight. This complete graph structure, containing all entity nodes, collaboration relationship edges, and trust weights, constitutes the cross-domain trust graph.
[0056] When calculating edge weights, a simple linear model based on weighted counting can be used. Specifically, firstly, base scores are pre-set for different types of historical interaction events. A successful collaboration event corresponds to a positive score, a failed or abnormal collaboration event corresponds to a negative score, and a clear violation event corresponds to a negative score. Then, within a preset statistical period, the number of successful collaborations, failed or abnormal collaborations, and violations between any two entities are counted. The corresponding event counts are multiplied by their base scores and then summed with weights to obtain the original credibility score between the entity pair. After obtaining the original credibility score, it is normalized to serve as the final credibility weight, and this credibility weight is assigned to the corresponding edge as the edge weight.
[0057] For example, a successful collaboration (N_succ) earns +1 point; a failed or abnormal collaboration (N_fail) earns -2 points; and a clear violation (N_viol) earns -5 points. Suppose there are 50 successful collaborations, 1 failed collaboration, and 0 violations between "domain A" and "domain B". Then the original credibility score would be... = (1 50) + (-2 1) + (-5 0) = 48; the final credibility weight obtained after normalization is approximately 0.85.
[0058] For example, the temporal behavior vector and the cross-domain trust graph are both fed as input to a pre-trained lightweight graph neural network model. The model's internal graph convolutional layers utilize the structure and edge weights of the cross-domain trust graph to propagate and aggregate information about the domain node features related to the visiting entity, thereby learning its environmental risk. Simultaneously, the model's temporal processing layers (such as recurrent neural networks (RNNs) or transformer models (Transformers) analyze the temporal behavior vector. Finally, the model fuses these two pieces of information and, through an output layer, calculates a single scalar value that comprehensively reflects both individual behavior and environmental reputation. This value is the behavior credibility score output by the lightweight graph neural network model.
[0059] According to the above implementation method, power grid equipment data is acquired, including the equipment behavior attributes of the target equipment corresponding to the accessing subject within a preset time window, as well as information on the power grid domain, subdomain, and operating entity. A time-series behavior vector is constructed based on the equipment behavior attributes. Simultaneously, a cross-domain trust graph is constructed using the power grid domain, subdomain, and operating entity as nodes, and inter-domain authorization or cooperation relationships as edges, each assigned a trustworthiness weight. The time-series behavior vector and the cross-domain trust graph are input into a lightweight graph neural network model to calculate a behavior trustworthiness score. This enables a quantitative assessment of the reliability and security of equipment operation, improving the accuracy of abnormal behavior detection and cross-domain risk prevention capabilities.
[0060] In one implementation, a power grid status adjustment factor is obtained by calculating the values of various indicators in the power grid status indicators based on the second weighting coefficient in the adaptive weighting. This includes: obtaining the values of each indicator in the power flow stability indicator, distributed energy prediction deviation indicator, network and equipment alarm indicator, and load pressure indicator; normalizing each indicator value to obtain a normalized indicator value; calculating the power grid operation status index based on the second weighting coefficient in the adaptive weighting, wherein the second weighting coefficient includes power flow stability weight, prediction deviation weight, alarm weight, and load pressure weight; and using the power grid operation status index as input to a piecewise linear or exponential decay function to obtain the power grid status adjustment factor.
[0061] For example, the power flow stability index is a quantitative indicator used to characterize whether the power flow distribution of a power grid is in a stable and safe operating state within the current operating cycle. This index comprehensively reflects factors such as voltage deviation at each node in the power grid, line power flow margin, and stability of key nodes, and is used to assess the power grid's ability to maintain normal operation when subjected to disturbances or load fluctuations.
[0062] In this example, the power flow stability metric includes active power fluctuation: And reactive power fluctuation: In the formula, Active power fluctuation; The active power within sampling period i; The reactive power within sampling period i; The average active power over the entire sampling period; The average reactive power over the total sampling period; This refers to reactive power fluctuation.
[0063] For example, the distributed energy forecasting deviation index refers to an index used to quantify the degree of deviation between the forecast value and the actual value of distributed energy output, and is used to reflect the level of impact of distributed energy access on the uncertainty of grid operation.
[0064] In this example, the calculation process of the distributed energy prediction deviation index can be represented by the following function expression: In the formula, The index value of the distributed energy prediction deviation index; This represents the actual output value of distributed energy resources. Forecasted output values for distributed energy resources.
[0065] For example, network and equipment alarm indicators refer to comprehensive alarm indicators used to reflect the degree of abnormality in the status of power grid communication networks and the operating status of power equipment.
[0066] In this example, the calculation process for the network and device alarm metrics can be represented by the following function expression: In the formula, Here, M represents the indicator value of the alarm metric; M represents the total number of alarm levels. The weighting coefficient for alarm level j; This is the normalized value of the number of alarms corresponding to alarm level j.
[0067] For example, the load pressure index refers to an index used to characterize the relationship between the load level borne by the power grid under the current operating state and its safe carrying capacity, and is used to reflect the degree of operating pressure of the power grid in terms of supply and demand balance.
[0068] In this example, the calculation process of the load pressure index value can be represented by the following function expression: In the formula, This refers to the index value of the load pressure indicator; This represents the current actual load power. This refers to the equipment's design rated capacity or maximum load-bearing capacity.
[0069] For example, normalizing each indicator can be represented by the following function expression: In the formula, The normalized index value corresponding to index i; Let be the index value of index i; This represents the theoretical minimum value corresponding to index i; This represents the theoretical maximum value corresponding to index i.
[0070] For example, the second weighting coefficient refers to a set of weighting parameters used to adjust the relative influence of power flow stability indicators, distributed energy prediction deviation indicators, network and equipment alarm indicators, and load pressure indicators in the calculation of the power grid operation status index. The second weighting coefficient includes power flow stability weight, prediction deviation weight, alarm weight, and load pressure weight. Each weighting parameter is maintained by a strategy-type smart contract and can be dynamically adjusted according to the power grid operation stage, security strategy, or scheduling needs.
[0071] In this example, the calculation process of the power grid operation status index, based on the second weight coefficient in the adaptive weighting, for each normalized index value, can be expressed by the following function expression: In the formula, This is a power grid operation status index; The weight corresponding to the active power fluctuation; Active power fluctuation; The weight corresponding to reactive power fluctuation; This refers to reactive power fluctuation. Weights for prediction bias; The index value of the distributed energy prediction deviation index; Alarm weighting; The indicator value for the alarm indicator; Load pressure weighting; This refers to the index value of the load pressure indicator.
[0072] It should be noted that, and Together, they constitute the weight of current stability. Furthermore, , and Subject to dynamic regulation by smart contracts. For example, it increases when the proportion of new energy sources rises. Increase alert level when alarms occur frequently. Increase when the load approaches its limit. .
[0073] For example, a piecewise linear or exponential decay function is shown below: ; In the formula, For power grid status adjustment factors; This is a power grid operation status index; This is an adjustable parameter.
[0074] For example, the power grid operating status index can be calculated using linear or nonlinear functions to obtain the power grid status adjustment factor. The linear or nonlinear function can be expressed as: In the formula, For power grid status adjustment factors; These are adjustable parameters; This is a power grid operation status index.
[0075] For example, a discretization mapping method can also be used to map the power grid operation status index to a power grid status adjustment factor. The preset mapping table is shown in Table 1 below: Table 1 According to the above implementation method, power grid status indicators are obtained, including power flow stability indicators, distributed energy prediction deviation indicators, network and equipment alarm indicators, and load pressure indicators. The values of each indicator are then normalized to obtain normalized indicator values with unified dimensions. Subsequently, the normalized indicator values are weighted based on the second weight coefficient in the adaptive weighting to obtain a comprehensive power grid operation status index. This operation status index is then input into a piecewise linear or exponential decay function to generate a power grid status adjustment factor. This allows for an accurate reflection of the overall power grid operation status, improving the accuracy and controllability of operation status analysis, and providing a quantitative basis for dynamic scheduling and risk early warning.
[0076] In one implementation, a cross-domain credibility score is calculated based on the third weight coefficient in the adaptive weighting system, using historical cross-domain data. This includes: calculating a basic statistical credibility score based on the number of successes, failures, anomalies, and violations in the historical cross-domain data; determining the time interval between a cross-domain access event and an access request based on the difference between the access time corresponding to the cross-domain access event and the access time corresponding to the access request for each cross-domain access event in the historical cross-domain data; calculating the time interval based on a preset time decay function to obtain a time decay factor corresponding to the cross-domain access event; determining the decay weight corresponding to the cross-domain access event based on the product of the basic weight and the time decay factor; summing the decay weights corresponding to each cross-domain access event to obtain a time decay credibility score; multiplying the historical path credibility scores corresponding to each cross-domain segment path in the historical cross-domain data to obtain a cross-domain path credibility score, where the path formed by connecting the various cross-domain segment paths is the cross-domain access path corresponding to the access request; and calculating the basic statistical credibility score, the time decay credibility score, and the cross-domain path credibility score based on the third weight coefficient in the adaptive weighting system.
[0077] For example, basic statistical credibility refers to the initial credibility assessment result obtained by comprehensively calculating the number of successful cross-domain accesses, the number of failed or abnormal accesses, and the number of unauthorized accesses recorded in historical cross-domain data. It is used to reflect the overall compliance and stability of the accessing entity in the history of cross-domain access.
[0078] In this example, the calculation process of the basic statistical confidence level can be represented by the following function expression: In the formula, Based on the reliability of statistical data; The number of successful cross-domain transactions in historical data; This represents the number of failures or exceptions. Number of violations; The penalty factor corresponding to the number of failures or exceptions; The penalty factor corresponds to the number of violations; among which, Greater than .
[0079] For example, time decay credibility refers to the credibility index obtained by accumulating the decay weights corresponding to each cross-domain access event in historical cross-domain data, which is used to reflect the credibility of the cross-domain access behavior of the accessing subject in the time dimension.
[0080] In this example, the calculation process of time decay confidence can be represented by the following function expression: In the formula, For time decay reliability; The decay weight corresponding to cross-domain access event i; The base weight corresponding to cross-domain access event i; This is the time decay factor; The time interval between the cross-domain access event i and the access request; This is the time decay coefficient.
[0081] For example, a cross-domain segment path refers to the smallest cross-domain access unit formed between two adjacent power grid domains, subdomains, or operating entities in a cross-domain access path, used to describe the trust transfer relationship that occurs segment by segment during the cross-domain access process.
[0082] For example, historical path credibility refers to the credibility value calculated for a certain cross-domain segment path, which is used to reflect the stability and security of that segment in history.
[0083] For example, cross-domain path credibility refers to the comprehensive credibility result obtained by multiplying the historical path credibility corresponding to each cross-domain segment path that constitutes the complete cross-domain access path corresponding to the access request, and is used to reflect the overall trust level of the entire cross-domain access path.
[0084] In this example, the calculation process for cross-domain path credibility can be represented by the following function expression: In the formula, For cross-domain paths The corresponding cross-domain path credibility; This represents the path from domain i to domain j; The historical path reliability of the path from domain i to domain j.
[0085] It should be noted that the cross-domain access path corresponding to the access request is the access path from the source domain to the target domain. For example, the cross-domain access path corresponding to the access request is... Among them, cross-domain segment paths and cross-domain segment paths The connection forms the cross-domain access path corresponding to the access request. .
[0086] For example, the third weight coefficient refers to the set of weight parameters used to adjust the relative influence of different cross-domain trust assessment dimensions in the comprehensive calculation during the cross-domain credibility score calculation process.
[0087] For example, cross-domain credibility score refers to the final score result obtained by fusing basic statistical credibility, time decay credibility and cross-domain path credibility, and combining the third weight coefficient in the adaptive weight, which is used to quantify the overall credibility of the access subject in the cross-domain access dimension.
[0088] In this example, the calculation process for cross-domain credibility score can be represented by the following function expression: In the formula, Scoring cross-domain credibility; Based on the reliability of statistical data; For time decay reliability; For cross-domain path credibility; The weighting coefficients corresponding to the basic statistical credibility; The weighting coefficient corresponding to the time decay credibility; These are the weighting coefficients corresponding to the credibility of cross-domain paths. , and Together they constitute the third weighting coefficient.
[0089] According to the above implementation method, firstly, a basic statistical credibility is calculated based on the number of successful accesses, the number of failures or anomalies, and the number of violations. For each cross-domain access event, a time decay factor is calculated using a preset time decay function, combining the difference between the event access time and the access request time. This factor is then multiplied by the event's basic weight to obtain the decay weight. The time decay credibility is obtained by accumulating the decay weights of each event, and simultaneously, the cross-domain path credibility is obtained by multiplying the historical path credibility of each cross-domain segment path. Finally, the basic statistical credibility, time decay credibility, and cross-domain path credibility are comprehensively calculated using the third weight coefficient in the adaptive weighting to obtain a cross-domain credibility score. This allows for a more accurate quantification of the credibility of cross-domain access, improving the precision and reliability of cross-domain security management and risk control.
[0090] In one implementation, the adaptive weights are dynamically adjusted by the smart contract, including: when the validity period of the digital certificate corresponding to the accessing entity is less than a preset validity period threshold, reducing the first weight coefficient or the basic trust weight in the fourth weight coefficient; when the number of alarms in the power grid is greater than a preset alarm number threshold or the load of the power grid is greater than a preset load threshold, increasing the adjustment factor weight in the second weight coefficient or the fourth weight coefficient; when the number of unauthorized cross-domain accesses is greater than a preset unauthorized access number threshold, increasing the third weight coefficient or the cross-domain trust value weight in the fourth weight coefficient; and when a preset first control condition is met, increasing the weight in the fourth weight coefficient corresponding to the first control condition, wherein the first control condition includes an abnormal access number greater than or equal to a preset abnormal access number threshold, a power grid operation status index greater than or equal to a preset emergency state threshold, and the time during which the cross-domain cooperation state is in a stable state being less than a preset time threshold.
[0091] For example, suppose the preset validity period threshold is 30 days, and the digital certificate submitted by an access subject has only 7 days of remaining validity. In this case, the system considers the digital certificate to be about to expire, posing a risk of certificate invalidation, failure to be updated in time, or misuse. Therefore, when calculating the access subject's trust value, the system can reduce the weight of the corresponding static identity attribute in the first weight coefficient, or reduce the basic trust weight in the fourth weight coefficient, thereby weakening the initial trust influence of the access subject in the overall trust assessment.
[0092] For example, if, within a certain scheduling cycle, the cumulative number of network and equipment alarms generated on the power grid side reaches 120, exceeding the preset alarm threshold of 80, or the real-time load rate reaches 92%, exceeding the preset load threshold of 80%, the system determines that the current power grid operation is in a high-risk or high-pressure state. In this case, the alarm weight or load pressure weight in the second weighting coefficient is increased to amplify the impact of the power grid operation status index in the calculation process; or the adjustment factor weight in the fourth weighting coefficient is simultaneously increased, so that the power grid status adjustment factor has a stronger inhibitory effect on the final access decision, thereby tightening cross-domain access permissions when the power grid pressure is high.
[0093] For example, if a certain accessing entity has accumulated 5 unauthorized cross-domain access events in historical cross-domain data, exceeding the preset threshold of 3 unauthorized access events, the system determines that this accessing entity poses a high security risk during cross-domain collaboration. Therefore, when calculating the cross-domain credibility score, the weights corresponding to cross-domain path credibility or time decay credibility in the third weighting coefficient can be increased to further amplify the negative impact of unauthorized behavior on the final credibility score; alternatively, the weight of the cross-domain trust value in the fourth weighting coefficient can be increased to strengthen the constraint on cross-domain behavior from the overall decision-making level, thereby reducing the possibility of unauthorized entities obtaining high access privileges.
[0094] For example, within a unit time window, the number of abnormal accesses by the accessing entity reaches 10, exceeding the preset abnormal access threshold (the abnormal access threshold is set to 6, for example); the calculated power grid operation status index is 0.92, which is greater than or equal to the preset emergency state threshold of 0.9; and the duration of the cross-domain cooperation status in a stable state is only 15 minutes, which is less than the preset time threshold of 30 minutes. When the above first control condition is met, the weight parameter corresponding to the first control condition in the fourth weight coefficient is increased. For example, the weight of abnormal behavior, the weight of power grid emergency status, or the weight of cooperation stability is increased, so that the corresponding risk factors occupy a higher proportion in the comprehensive evaluation, thereby prompting the system to automatically adopt stricter access control and risk protection strategies in abnormal or emergency states.
[0095] According to the above implementation method, through the above-mentioned adaptive weight adjustment, real-time and dynamic control of power grid operation status, cross-domain access behavior and security events can be achieved, thereby improving the overall monitoring accuracy and system protection capability.
[0096] In one implementation, a smart contract is invoked to generate a permission token based on a dynamic trust value, including: matching the dynamic trust value with a preset permission policy threshold to obtain an access permission level; and invoking the smart contract to generate a permission token based on the access permission level, power grid operation status constraints, request context in the access request, target resource identifier, and operation type, wherein the permission token includes a device identifier, authorized operation type, authorized access data resource range, and permission validity timestamp.
[0097] For example, firstly, pre-configured multi-level permission policy threshold ranges are read from the access control policy library, with each permission policy threshold range corresponding to a different access permission level; then, the dynamic trust value corresponding to the current access request is compared with each permission policy threshold range to determine the target threshold range into which the dynamic trust value falls; finally, the access permission level corresponding to the access request is determined based on the permission level identifier bound to the target threshold range.
[0098] For example, preset permission policy thresholds include 0.0-0.4 corresponding to low permission level, 0.4-0.7 corresponding to medium permission level, and 0.7-1.0 corresponding to high permission level. When the dynamic trust value of a certain access subject is calculated to be 0.68, the system determines that it falls within the 0.4-0.7 range, thus determining that the access permission level corresponding to the access request is medium permission level.
[0099] For example, the smart contract first receives the access permission level, power grid operation status constraint parameters (e.g., power grid operation status index, power grid risk level identifier, emergency or alarm status identifier, and access convergence coefficient), access request context information (e.g., access subject identifier, device identifier, access timestamp, access source domain), target resource identifier (identification information used to uniquely identify the power data resource or power grid business resource to which the access request points), and operation type. The smart contract verifies whether the access subject has the basic permissions to execute the operation type based on the access permission level, and simultaneously determines whether the current power grid status allows the execution of the corresponding level of access operation based on the power grid operation status constraints. If the verification passes, the smart contract generates a permission token subject field based on the device identifier in the request context, determines the authorized operation type field based on the operation type, parses and limits the scope of accessible data resources based on the target resource identifier, and calculates the valid timestamp of the permission based on the access permission level and power grid operation status constraints. Finally, the smart contract encapsulates the permission token containing the device identifier, authorized operation type, authorized access data resource scope, and valid timestamp of the permission and returns it.
[0100] For example, when the access permission level is medium, the power grid is in normal operation, the device identifier in the request context is Device_A, the target resource is a historical load dataset of a substation, and the operation type is a read operation, the permission token generated by the smart contract restricts Device_A to only be able to perform a read operation on the historical load dataset within a preset valid time window, and does not have write or delete permissions.
[0101] According to the above implementation method, by matching dynamic trust values with preset permission policy thresholds, the permission level of the accessing subject is determined. Then, through a smart contract, a permission token is generated that includes a device identifier, authorized operation type, authorized data resource scope, and a valid permission timestamp, based on the access permission level, power grid operation constraints, request context, target resource identifier, and operation type. This achieves precise authorization and controllable management of access behavior, thereby improving the security, flexibility, and real-time performance of access control.
[0102] In one implementation, an access token is issued to the access subject, enabling the access subject to access power data according to the permissions specified in the token. Specifically, the generated access token is first sent to the terminal or gateway node corresponding to the device identifier bound to the access subject via a secure communication channel. The secure communication channel can use TLS or SSL encryption for transmission, and digital signatures are used to ensure the integrity and immutability of the access token during transmission. Subsequently, after receiving the access token, the access subject stores it in a local secure storage module or secure chip and includes the access token when initiating a power data access request. Upon receiving the access request and the access token, the smart contract or access node verifies the validity of the access token, including checking whether the access token has expired, whether the permission scope matches, whether the authorized operation type is consistent with the requested operation, and whether the device identifier corresponds to the access subject. After successful verification, the access subject can access the power data according to the authorized operation type, authorized data resource scope, and valid timestamp specified in the access token, thus achieving controlled access to the power data.
[0103] For example, when the accessing entity is an operation and maintenance terminal, and its permission token authorizes the operation type as read, the authorized data resource as the historical load dataset of the regional substation, and the validity period of the permission is 72 hours, the accessing entity can only perform read operations on the historical load dataset within 72 hours, and cannot perform write or delete operations. At the same time, the system records the access behavior through on-chain auditing to ensure the traceability and security of the entire access process.
[0104] Figure 2 This is a structural block diagram of a power data access control device according to an embodiment of the present invention.
[0105] like Figure 2 As shown, the device for controlling access to power data may include: The request-response module is used to respond to the access request of the access subject, wherein the access request includes a device identifier and a digital certificate; The data acquisition module is used to verify the digital certificate, and if the verification result is successful, to obtain the static identity attributes, device behavior attributes, power grid status indicators and historical cross-domain data corresponding to the access subject from the blockchain ledger based on the device identifier; The dynamic trust value calculation module is used to calculate the dynamic trust value based on the adaptive weight and the static identity attributes, power grid equipment data, power grid status indicators and historical cross-domain data corresponding to the access subject. The adaptive weight is dynamically adjusted by the smart contract. The permission token generation module is used to generate a permission token by calling the smart contract based on the dynamic trust value; The data access module is used to issue the permission token to the access subject, so that the access subject can access power data according to the permissions in the permission token.
[0106] In one embodiment, the dynamic trust value calculation module includes: The attribute mapping unit is used to map each static attribute in the static identity attribute to an attribute score, thereby obtaining each attribute score. The basic trust value calculation unit is used to perform a weighted summation of the scores of each attribute based on the first weight coefficient in the adaptive weights to obtain the basic trust value. The behavioral credibility score calculation unit is used to process the power grid equipment data through a lightweight graph neural network model to obtain a behavioral credibility score. The power grid situation adjustment factor calculation unit is used to calculate the values of each indicator in the power grid situation indicators based on the second weight coefficient in the adaptive weight to obtain the power grid situation adjustment factor. The cross-domain credibility score calculation unit is used to calculate the cross-domain credibility score based on the third weight coefficient in the adaptive weights. The weighted summation unit is used to perform a weighted summation of the basic trust value, the behavioral credibility score, the power grid situation adjustment factor, and the cross-domain credibility score based on the fourth weight coefficient in the adaptive weights to obtain the dynamic trust value. The fourth weight coefficient includes the basic trust weight, the credibility weight, the adjustment factor weight, and the cross-domain trust value weight.
[0107] In one embodiment, the behavioral credibility scoring calculation unit includes: The data acquisition subunit is used to acquire the power grid equipment data, wherein the power grid equipment data includes the device behavior attributes of the target device corresponding to the access subject within a preset time window, as well as the power grid domain, subdomain and operating entity; The temporal behavior vector construction subunit is used to construct a temporal behavior vector based on the device behavior attributes of the target device corresponding to the access subject within a preset time window. The device behavior attributes include the number of consecutive accesses, the number of unauthorized access or illegal operation attempts, and the operation success rate. A cross-domain trust graph construction subunit is used to construct a cross-domain trust graph by taking the power grid domain, the subdomain and the operating entity as nodes, the authorized or cooperative relationships between the domains as edges, and the trust weights between the domains as edge weights. The model processing subunit is used to take the temporal behavior vector and the cross-domain credibility graph as input to the lightweight graph neural network model to obtain the behavior credibility score output by the lightweight graph neural network model.
[0108] In one embodiment, the power grid status adjustment factor calculation unit includes: The indicator value acquisition subunit is used to acquire the indicator values of each of the power flow stability indicator, distributed energy prediction deviation indicator, network and equipment alarm indicator and load pressure indicator in the power grid status indicators. The normalization processing subunit is used to normalize each of the index values to obtain each normalized index value. The power grid operation status index calculation subunit is used to calculate the normalized index values based on the second weight coefficient in the adaptive weight to obtain the power grid operation status index. The second weight coefficient includes power flow stability weight, prediction deviation weight, alarm weight and load pressure weight. The function processing subunit is used to take the power grid operation status index as input to a piecewise linear or exponential decay function to obtain the power grid status adjustment factor.
[0109] In one embodiment, the cross-domain credibility scoring calculation unit includes: The basic statistical credibility calculation subunit is used to calculate the basic statistical credibility based on the number of successes, failures or anomalies, and violations in the historical cross-domain data. The attenuation weight calculation subunit is used to determine the time interval between the cross-domain access event and the access request based on the difference between the access time corresponding to the cross-domain access event and the access time corresponding to the access request for each cross-domain access event in the historical cross-domain data; calculate the time interval based on a preset time attenuation function to obtain the time attenuation factor corresponding to the cross-domain access event; and determine the attenuation weight corresponding to the cross-domain access event based on the product of the basic weight corresponding to the cross-domain access event and the time attenuation factor. The accumulation subunit is used to accumulate the decay weights corresponding to each of the cross-domain access events to obtain the time decay reliability. The multiplication operation subunit is used to perform a multiplication operation on the historical path credibility corresponding to each cross-domain segment path in the historical cross-domain data to obtain the cross-domain path credibility, wherein the path formed by connecting each of the cross-domain segment paths is the cross-domain access path corresponding to the access request. The credibility score calculation subunit is used to calculate the basic statistical credibility, the time decay credibility, and the cross-domain path credibility based on the third weight coefficient in the adaptive weights, so as to obtain the cross-domain credibility score.
[0110] In one implementation, the adaptive weight is dynamically adjusted by the smart contract, specifically for: If the validity period of the digital certificate corresponding to the access subject is less than the preset validity period threshold, then the first weight coefficient or the basic trust weight in the fourth weight coefficient is reduced. If the number of alarms in the power grid exceeds a preset alarm count threshold or the load of the power grid exceeds a preset load threshold, then the adjustment factor weight in the second weight coefficient or the fourth weight coefficient will be increased. If the number of cross-domain violations exceeds the preset threshold, the weight of the cross-domain trust value in the third weight coefficient or the fourth weight coefficient will be increased. When the preset first control condition is met, the weight of the fourth weight coefficient corresponding to the first control condition is increased. The first control condition includes the number of abnormal accesses being greater than or equal to a preset abnormal number threshold, the power grid operation status index being greater than or equal to a preset emergency state threshold, and the time that the cross-domain cooperation state is in a stable state being less than a preset time threshold.
[0111] In one implementation, the permission token generation module includes: The matching unit is used to match the dynamic trust value with a preset permission policy threshold to obtain the access permission level; The generation unit is used to call the smart contract to generate an access token based on the access permission level, power grid operation status constraints, request context in the access request, target resource identifier and operation type, wherein the access token includes the device identifier, authorized operation type, authorized access data resource range and access validity timestamp.
[0112] The specific functions and examples of each module and submodule of the system in this embodiment of the invention can be found in the relevant descriptions of the corresponding steps in the above method embodiments, and will not be repeated here.
[0113] The acquisition, storage, and application of user personal information involved in the technical solution of this invention all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0114] This invention also provides an electronic device, comprising: At least one processor; and a memory communicatively connected to said at least one processor; The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method described in any one of the embodiments of the present invention.
[0115] The beneficial effects of the electronic device in this embodiment of the invention are equivalent to the beneficial effects of the above-described method for regulating power data access permissions, and will not be repeated here.
[0116] This invention also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to perform the method described in any one of the embodiments of this invention.
[0117] The beneficial effects of the storage medium of the present invention are equivalent to the beneficial effects of the above-described method for regulating power data access permissions, and will not be elaborated here.
[0118] Figure 3 A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present invention is shown. Electronic device 800 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic device 800 may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0119] like Figure 3 As shown, the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. The RAM 803 may also store various programs and data required for the operation of the electronic device 800. The computing unit 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0120] Multiple components in electronic device 800 are connected to I / O interface 805, including: input unit 806, such as keyboard, mouse, etc.; output unit 807, such as various types of displays, speakers, etc.; storage unit 808, such as disk, optical disk, etc.; and communication unit 809, such as network card, modem, wireless transceiver, etc. Communication unit 809 allows electronic device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0121] The computing unit 801 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as the method for regulating power data access permissions. For example, in some embodiments, the method for regulating power data access permissions can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the method for regulating power data access permissions described above can be performed. Alternatively, in other embodiments, the computing unit 801 can be configured to perform the method for regulating power data access permissions by any other suitable means (e.g., by means of firmware).
[0122] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0123] The program code used to implement the methods of the present invention can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0124] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0125] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0126] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0127] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0128] It should be understood that the various forms of processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this invention can be achieved, and this is not limited herein.
[0129] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for controlling access permissions to power data, characterized in that, include: In response to an access request from an accessing subject, wherein the access request includes a device identifier and a digital certificate; Verify the digital certificate, and if the verification result is successful, obtain the static identity attributes, device behavior attributes, power grid status indicators and historical cross-domain data corresponding to the access subject from the blockchain ledger based on the device identifier; Based on adaptive weights and the static identity attributes, power grid equipment data, power grid status indicators, and historical cross-domain data corresponding to the access subject, a dynamic trust value is calculated, wherein the adaptive weights are dynamically adjusted by the smart contract. Based on the dynamic trust value, the smart contract is invoked to generate an authorization token; The access token is issued to the access subject so that the access subject can access the power data according to the permissions in the access token.
2. The method according to claim 1, characterized in that, The calculation of the dynamic trust value based on adaptive weights and the static identity attributes corresponding to the access subject, power grid equipment data, power grid status indicators, and historical cross-domain data includes: Each static attribute in the static identity attributes is mapped to an attribute score to obtain the attribute score; Based on the first weight coefficient in the adaptive weights, the scores of each attribute are weighted and summed to obtain the basic trust value. The data of the power grid equipment is processed using a lightweight graph neural network model to obtain a behavioral credibility score; Based on the second weight coefficient in the adaptive weight, the values of each indicator in the power grid status index are calculated to obtain the power grid status adjustment factor. Based on the third weight coefficient in the adaptive weight, the historical cross-domain data is calculated to obtain a cross-domain credibility score; Based on the fourth weight coefficient in the adaptive weights, the basic trust value, the behavioral credibility score, the power grid situation adjustment factor, and the cross-domain credibility score are weighted and summed to obtain the dynamic trust value. The fourth weight coefficient includes the basic trust weight, credibility weight, adjustment factor weight, and cross-domain trust value weight.
3. The method according to claim 2, characterized in that, The process of processing the power grid equipment data using a lightweight graph neural network model to obtain a behavioral credibility score includes: The power grid equipment data is obtained, wherein the power grid equipment data includes the device behavior attributes of the target device corresponding to the access subject within a preset time window, as well as the power grid domain, subdomain, and operating entity; Based on the device behavior attributes of the target device corresponding to the access subject within a preset time window, a time-series behavior vector is constructed, wherein the device behavior attributes include the number of consecutive accesses, the number of unauthorized access or illegal operation attempts, and the operation success rate. The power grid domain, the subdomain, and the operating entity are used as nodes, authorized or collaborative relationships between domains are used as edges, and the trust weights between domains are used as edge weights to construct a cross-domain trust graph. The temporal behavior vector and the cross-domain credibility graph are used as inputs to the lightweight graph neural network model to obtain the behavior credibility score output by the lightweight graph neural network model.
4. The method according to claim 2, characterized in that, The calculation of each index value in the power grid status index based on the second weight coefficient in the adaptive weights to obtain the power grid status adjustment factor includes: Obtain the index values of each of the following power grid status indicators: power flow stability index, distributed energy prediction deviation index, network and equipment alarm index, and load pressure index. The values of each indicator are normalized to obtain the normalized indicator values. Based on the second weight coefficient in the adaptive weight, the normalized index values are calculated to obtain the power grid operation status index, wherein the second weight coefficient includes power flow stability weight, prediction deviation weight, alarm weight and load pressure weight. The power grid operation status index is used as the input of a piecewise linear or exponential decay function to obtain the power grid status adjustment factor.
5. The method according to claim 2, characterized in that, The cross-domain credibility score is calculated based on the third weight coefficient in the adaptive weighting, using the historical cross-domain data, including: Based on the number of successes, failures or anomalies, and violations in the historical cross-domain data, the basic statistical credibility is calculated. For each cross-domain access event in the historical cross-domain data, the time interval between the cross-domain access event and the access request is determined based on the difference between the access time corresponding to the cross-domain access event and the access time corresponding to the access request; the time interval is calculated based on a preset time decay function to obtain the time decay factor corresponding to the cross-domain access event; the decay weight corresponding to the cross-domain access event is determined based on the product of the basic weight corresponding to the cross-domain access event and the time decay factor. The decay weights corresponding to each cross-domain access event are summed to obtain the time decay reliability. The credibility of the historical path corresponding to each cross-domain segment path in the historical cross-domain data is multiplied to obtain the cross-domain path credibility. The path formed by connecting each of the cross-domain segment paths is the cross-domain access path corresponding to the access request. Based on the third weight coefficient in the adaptive weights, the basic statistical credibility, the time decay credibility, and the cross-domain path credibility are calculated to obtain the cross-domain credibility score.
6. The method according to claim 2, characterized in that, The adaptive weights are dynamically adjusted by the smart contract, including: If the validity period of the digital certificate corresponding to the access subject is less than the preset validity period threshold, then the first weight coefficient or the basic trust weight in the fourth weight coefficient is reduced. If the number of alarms in the power grid exceeds a preset alarm count threshold or the load of the power grid exceeds a preset load threshold, then the adjustment factor weight in the second weight coefficient or the fourth weight coefficient will be increased. If the number of cross-domain violations exceeds the preset threshold, the weight of the cross-domain trust value in the third weight coefficient or the fourth weight coefficient will be increased. When the preset first control condition is met, the weight of the fourth weight coefficient corresponding to the first control condition is increased. The first control condition includes the number of abnormal accesses being greater than or equal to a preset abnormal number threshold, the power grid operation status index being greater than or equal to a preset emergency state threshold, and the time that the cross-domain cooperation state is in a stable state being less than a preset time threshold.
7. The method according to claim 1, characterized in that, The step of generating an authorization token by invoking the smart contract based on the dynamic trust value includes: The dynamic trust value is matched with a preset permission policy threshold to obtain the access permission level; The smart contract is invoked to generate an access token based on the access permission level, power grid operation status constraints, request context in the access request, target resource identifier, and operation type. The access token includes the device identifier, authorized operation type, authorized access data resource range, and access validity timestamp.
8. A device for controlling access permissions to power data, characterized in that, include: The request-response module is used to respond to the access request of the access subject, wherein the access request includes a device identifier and a digital certificate; The data acquisition module is used to verify the digital certificate, and if the verification result is successful, to obtain the static identity attributes, device behavior attributes, power grid status indicators and historical cross-domain data corresponding to the access subject from the blockchain ledger based on the device identifier; The dynamic trust value calculation module is used to calculate the dynamic trust value based on the adaptive weight and the static identity attributes, power grid equipment data, power grid status indicators and historical cross-domain data corresponding to the access subject. The adaptive weight is dynamically adjusted by the smart contract. The permission token generation module is used to generate a permission token by calling the smart contract based on the dynamic trust value; The data access module is used to issue the permission token to the access subject, so that the access subject can access power data according to the permissions in the permission token.
9. An electronic device, characterized in that, include: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-7.