Power grid blockchain platform configuration method and device, computer device and readable storage medium
By configuring local clustering coefficients and performance evaluation, the blockchain platform model with the highest score is selected, which solves the compatibility problem of blockchain platforms in power grid data management and realizes efficient storage, querying and security management of power grid data.
Patent Information
- Application Number
- CN202411742061.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2044-11-29
AI Technical Summary
How to provide a blockchain platform that adapts to the needs of power grid data management, solves the differences among multiple business systems in the digital management of the power grid, and improves the compatibility between the blockchain platform and the power grid.
By configuring multiple different local clustering coefficients, deploying blockchain nodes, conducting performance evaluation tests, and selecting the blockchain platform model corresponding to the highest-scoring local clustering coefficient, the stability and security of the blockchain network are ensured by combining hardware and software design.
In the context of power grid data management, it is essential to ensure efficient data storage and retrieval, as well as network security, to achieve efficient management and tamper-proof traceability of power grid data.
Smart Images

Figure CN119691070B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of blockchains, in particular to a power grid blockchain platform configuration method and device, computer equipment and readable storage medium. BACKGROUND
[0002] With the development of power grid digitization, the processing of massive data has become a problem to be solved, and the development of blockchains provides a possibility for the digital management of power grids. Business scenarios or business index data involve multiple business systems, such as financial management systems, marketing management systems, asset management systems and human resource management systems, and there are differences in data management requirements in other scenarios. How to provide a blockchain platform that adapts to the data management requirements of power grids has become a problem to be solved. SUMMARY
[0003] Therefore, it is necessary to provide a power grid blockchain platform configuration method, device, computer equipment and readable storage medium that can improve the adaptability of a blockchain platform to a power grid to solve the above technical problems.
[0004] In a first aspect, the present application provides a power grid blockchain platform configuration method applied to a blockchain platform, wherein the blockchain platform includes a plurality of blockchain nodes, the plurality of blockchain node devices include a core device and a plurality of levels of peripheral devices, the core device is connected in communication with each level of peripheral devices, the core device is deployed in a core machine room, each level of peripheral devices is at least two, and each level of peripheral devices is connected with at least part of the peripheral devices of the next level, and the method comprises:
[0005] configuring a plurality of different local aggregation coefficients for the blockchain platform;
[0006] deploying corresponding blockchain nodes according to the set local aggregation coefficients to obtain different blockchain platform models;
[0007] obtaining key data of a power grid, wherein the key data includes power grid device information, operation data and user data;
[0008] under the condition that the communication between the blockchain nodes is normal, performing performance evaluation and testing on the blockchain platform models corresponding to different local aggregation coefficients based on the key data of the power grid, and obtaining a normalized weighted score result;
[0009] selecting the blockchain platform model corresponding to the local aggregation coefficient with the highest score as a target blockchain platform according to the normalized weighted score result.
[0010] In one embodiment, the performance evaluation and testing includes data storage testing, query efficiency testing, data interaction testing and network security testing.
[0011] In one of the embodiments, the network security test step includes:
[0012] Simulating a data tampering attack;
[0013] Evaluating the data integrity and confidentiality of different blockchain platform models in the face of the data tampering attack to determine a network security score value; wherein the initial value of the network security score value is 100, and each occurrence of incomplete data deducts 1 point, and each occurrence of data leakage deducts 2 points.
[0014] In one of the embodiments, the data storage test step includes:
[0015] Storing the critical data of the power grid into different blockchain platform models respectively;
[0016] Recording the storage time and storage space occupation indicators of each critical data;
[0017] Normalizing the storage time and the storage space occupation indicators according to the percentage system to obtain a data storage normalization result.
[0018] In one of the embodiments, the query efficiency test step includes:
[0019] Obtaining and determining the query operation for the critical data of the power grid according to the query records of the historical power grid data;
[0020] Executing the query operation for the critical data of the power grid in different blockchain platform models and recording the response time and accuracy of the query;
[0021] After normalizing the response time and the accuracy, performing weighted calculation to obtain a query efficiency test result.
[0022] In one of the embodiments, the performance evaluation test of the different local clustering coefficient corresponding blockchain platform models based on the critical data of the power grid is performed, and a normalized weighted score result is obtained, including:
[0023] Based on the data storage test and the corresponding weight, the query efficiency test and the corresponding weight, the data interaction test and the corresponding weight, and the network security test and the corresponding weight, the normalized weighted score result is determined, and the weight is determined based on neural network model training.
[0024] In one of the embodiments, the configuration step of the local clustering coefficient includes:
[0025] Starting from the initial coefficient 0.2, increase to 0.8 by steps of 0.1 to obtain a plurality of different local aggregation coefficients.
[0026] In a second aspect, a power grid blockchain platform configuration device is provided, applied to a blockchain platform, the blockchain platform comprising a plurality of blockchain nodes, wherein the plurality of blockchain node devices comprise a core device and a plurality of levels of peripheral devices, the core device being connected in communication with each level of peripheral devices, the core device being deployed in a core machine room, each level of peripheral devices being at least two, and each level of peripheral devices being connected with at least part of the peripheral devices of the next level, the device comprising:
[0027] A local aggregation coefficient module is configured to configure a plurality of different local aggregation coefficients for the blockchain platform.
[0028] A platform model building module is configured to deploy corresponding blockchain nodes according to the set local aggregation coefficients to obtain different blockchain platform models.
[0029] A data acquisition module is configured to acquire key data of the power grid, the key data comprising power grid device information, operation data and user data.
[0030] A test module is configured to, in the case that communication between the blockchain nodes is normal, perform performance evaluation testing on the blockchain platform models corresponding to different local aggregation coefficients based on the key data of the power grid, and obtain a normalized weighted score result.
[0031] A target blockchain platform determination module is configured to select, according to the normalized weighted score result, the blockchain platform model corresponding to the local aggregation coefficient with the highest score as the target blockchain platform.
[0032] In a third aspect, a computer device is provided, comprising a memory and a processor, the memory storing a computer program, and the processor realizing the steps of the above method when executing the computer program.
[0033] In a fourth aspect, a computer readable storage medium is provided, storing a computer program thereon, the computer program being executed by a processor to realize the steps of the above method.
[0034] The power grid blockchain platform configuration method, device, computer equipment and readable storage medium provided by the embodiment of the present application, the core node equipment of the power grid blockchain platform is installed in the core machine room, in addition, the node adopts a step-by-step communication connection mode, each non-core node is redundantly designed, and cross communication is performed with the next level non-core node, on the hardware, the high connectivity and stability between the blockchain nodes are maximized, and the entire network can still operate normally in the case of single node failure, in addition, each important blockchain node has a large local clustering coefficient. In addition, in the software aspect, by establishing a blockchain platform model with different local clustering coefficients, then performing multi-dimensional performance evaluation on the collected key data of the power grid under different blockchain platforms, to determine the influence of different local clustering coefficients on data storage, query efficiency, network security and other aspects in the power grid scenario. Based on the normalization and weighting processing of the multi-dimensional performance evaluation test results, the normalized and weighted score results are obtained, the corresponding blockchain platform model with the highest score is selected as the target blockchain platform, and the platform is used for blockchain data chaining, storage and other operations of the power grid data, which can ensure the efficiency and network security in the power grid data query, storage and other scenarios. That is, the power grid blockchain platform configuration method provided by the embodiment of the present application cooperates in the hardware architecture and the software aspect, provides a blockchain platform specially used for power grid business data management, and keeps excellent performance in all aspects in the power grid business data management scenario. BRIEF DESCRIPTION OF DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the description of the embodiments of the present application or the related art will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other related drawings can be obtained by those skilled in the art without creative labor.
[0036] Figure 1 The flowchart of the power grid blockchain platform configuration method in one embodiment;
[0037] Figure 2 The step flowchart of network security test in one embodiment;
[0038] Figure 3 The step flowchart of data storage test in one embodiment;
[0039] Figure 4 The step flowchart of query efficiency test in one embodiment;
[0040] Figure 5 The structure block diagram of the power grid blockchain platform configuration device in one embodiment;
[0041] Figure 6 This is an internal structural diagram of a computer device in one embodiment;
[0042] Figure 7 This is a diagram of the internal structure of a computer device in another embodiment. Detailed Implementation
[0043] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0044] In one exemplary embodiment, a power grid blockchain platform configuration method is provided, applied to a blockchain platform including multiple blockchain nodes, wherein the multiple blockchain node devices include core devices and multi-level peripheral devices, the core devices are connected to the peripheral devices at each level in a hierarchical manner, the core devices are deployed in a core computer room, each level has at least two peripheral devices, and each level of peripheral devices is connected to at least some of the peripheral devices at the next level.
[0045] Core equipment refers to blockchain nodes that play a crucial role in consensus or ledger recording. The core data center is equipped with access control; only users with administrative privileges exceeding those of the core equipment can enter. In terms of location, all core equipment nodes responsible for consensus or ledger recording should not be deployed in the same data center. The system's overall availability should be guaranteed even if a single node in the data center becomes unavailable. The configuration method provided in this application, executed under the aforementioned hardware architecture requirements, ensures that the failure of a single blockchain node will not affect the entire blockchain network.
[0046] In addition to peripheral device nodes, other nodes can be set up to store non-critical data in the power grid management process. These nodes have lower hardware costs. The storage capacity of core and peripheral devices is scalable. When devices and storage media are reused, scrapped, or replaced, the data they carry can be erased and is unrecoverable, preventing data leakage. Core and peripheral devices can also be cloud devices. For cloud deployment, cooperation with the cloud environment service provider should be provided to ensure that the cloud environment has a certain degree of heterogeneity.
[0047] To address the communication issues between blockchain nodes, authorized network access control is employed, and a Virtual Private Network (VPN) is built between participating distributed ledger nodes to reduce the harm caused by network attacks.
[0048] like Figure 1 As shown, the configuration method of this power grid blockchain platform includes:
[0049] S100, configure multiple different local clustering coefficients for the blockchain platform. In the blockchain platform, the local clustering coefficient of each blockchain node is an index for describing the tightness of the connection between the blockchain node and its direct neighbor blockchain nodes. Specifically, the local clustering coefficient measures the degree of mutual connection between the neighbor blockchain nodes of a blockchain node. A higher local clustering coefficient means that there are some relatively tight local communities in the blockchain network, which may weaken the degree of decentralization of the blockchain network to some extent. A higher local clustering coefficient can make some nodes in the network more vulnerable to attack, because attackers can more easily locate and attack these tightly connected nodes. A higher local clustering coefficient means that the blockchain network has higher stability when attacked or failed, because tightly connected nodes can support each other and reduce the impact of single-point failure. In a network with a higher local clustering coefficient, the efficiency of information propagation can be higher, because information can be more easily transmitted between tightly connected nodes. Therefore, in summary, considering the multi-dimensional performance such as security and data query efficiency, the local clustering coefficient is not the higher the better, and personalized settings need to be made according to the specific needs of the scene, so that the blockchain platform can play the best role in the data management process. In this case, multiple different local clustering coefficients are given for the corresponding blockchain platforms. It should be understood that the local clustering coefficients of different blockchain platform models here should be understood as a combination of different ones, that is, at least one of the local clustering coefficients of the multiple blockchain nodes is different, then the corresponding blockchain platform model is different.
[0050] S200, deploy corresponding blockchain nodes according to the set local clustering coefficient to obtain different blockchain platform models;
[0051] S300, obtain key data of the power grid, including power grid equipment information, operation data and user data. The key data of the power grid refers to the data involved in the digital management process of the power grid. The power grid equipment information, operation data and user data here are only examples and can not be limited to the data examples here. For example, it can include asset key information such as asset addition, asset warehousing, asset delivery, asset update, asset reimbursement, and information such as asset depreciation, asset amortization, project transfer, classification change, and scrap equipment; it also includes asset query, asset scrap and other information. This is not an exhaustive list.
[0052] S400, under the condition that the communication between the blockchain nodes is normal, performance evaluation test is performed on the blockchain platform models corresponding to different local clustering coefficients based on the key data of the power grid, and a normalized weighted score result is obtained.
[0053] To avoid false testing caused by abnormal communication between nodes, network communication testing needs to be performed before performance evaluation testing. For example, a Ping test can be performed between nodes to check whether the network connection is stable. Any node can send an ICMP echo request message to a target node based on a Ping command and receive a response, thereby verifying whether the network connection with the target node is smooth. A Traceroute test can also be performed using the Traceroute or Tracepath tool to track the path taken by a data packet from a source node to a target node to discover potential bottlenecks or failure points in the network. A test transaction can also be sent to the blockchain by Cleos, and it is observed whether the transaction is successfully packaged and confirmed to verify whether the nodes can normally process transactions and reach consensus. Other ways are not described here.
[0054] The process of performing performance evaluation testing mainly performs data chaining, querying, storage, and other operations on the key data of the power grid under the blockchain platform model to evaluate the performance of the blockchain platform model in different operation demand scenarios of the power grid data.
[0055] S500, according to the normalized weighted score result, selecting the blockchain platform model corresponding to the highest local clustering coefficient score as the target blockchain platform.
[0056] The blockchain platform model with the highest score indicates that it can maintain good performance in various operation scenarios of the power grid data, and selecting it as the target blockchain platform can ensure the performance in subsequent operation scenarios of the power grid data.
[0057] The power grid blockchain platform configuration method provided in the embodiments of the present application maximizes the connectivity and stability between blockchain nodes in hardware, ensures that the entire network can still operate normally in the case of a single node failure, and ensures that each important blockchain node has a large local clustering coefficient. In addition, in terms of software, a blockchain platform model with different local clustering coefficients is established, and then the collected key data of the power grid is subjected to multi-dimensional performance evaluation under different blockchain platforms to determine the influence of different local clustering coefficients on data storage, query efficiency, network security and the like in the power grid scenario. Based on the normalization and weighting processing of the multi-dimensional performance evaluation test results, a normalized and weighted score result is obtained, and the blockchain platform model corresponding to the local clustering coefficient with the highest score is selected as the target blockchain platform. Using this platform for blockchain data chaining, storage and other operations of power grid data can ensure the efficiency and network security in the power grid data query and storage scenarios. That is, the power grid blockchain platform configuration method provided in the embodiments of the present application cooperates in hardware architecture and software to provide a blockchain platform dedicated to power grid business data management, which maintains excellent performance in all aspects in the power grid business data management scenario.
[0058] In addition, the layout of each node on the blockchain network under the blockchain platform provided in the embodiments of the present application cooperates with the blockchain ledger structure and the smart contract to realize real management of power grid data, and realizes data tamper-proofing and traceability based on the combination of software and hardware.
[0059] In one of the embodiments, the performance evaluation test includes data storage test, query efficiency test, data interaction test and network security test.
[0060] The data storage test refers to a test process of storing the key data of the power grid based on different blockchain platform models. The query efficiency test refers to a test of data access and query based on the blockchain platform model after the key data of the power grid is chained. The data interaction test refers to a test of interactive operations such as data modification, addition, deletion and sharing. The network security test refers to the security performance test of the blockchain platform under different network security attacks.
[0061] In one of the embodiments, as shown in Figure 2 The network security test includes the following steps:
[0062] S201, simulate data tampering attacks; data tampering includes but is not limited to data abnormal deletion, abnormal addition, abnormal modification and other operations. For example, the key data of the power grid includes A, B and C, a data D can be generated, and the data D is requested to be chained, and a data abnormal addition attack is simulated. For another example, an abnormal modification operation of modifying B to an abnormal data B1 can be simulated. For another example, an operation of abnormally deleting data A can be simulated.
[0063] S202, evaluate the data integrity and confidentiality of different blockchain platform models in the face of the data tampering attacks to determine the network security score value; wherein the initial value of the network security score value is 100, and one incomplete data deducts 1 point, and one data leakage deducts 2 points.
[0064] The network security score value can be determined based on the data situation and the data leakage situation after data tampering, for example, the initial data is A, B and C, and the data after data tampering attack is A, B1, which indicates that C is abnormally deleted, and B is abnormally modified, 2 times of data incompleteness occurs, 100-2=98 points, if 1 time of data leakage is detected, then 2 points are deducted, that is, 98-2=96 points.
[0065] In one embodiment, as shown in Figure 3 The steps of the data storage test include:
[0066] S301, store the key data of the power grid into different blockchain platform models respectively. Here, the principle of controlling variables is adopted for data storage, that is, the same data is stored into different blockchain platform models.
[0067] S302, record the storage time and storage space occupation index of each key data. The storage time and storage space occupation index of each key data when stored in different blockchain platform models can be recorded respectively. For the storage time that is not monitored, it is considered that the chaining fails, and the data storage test result of the key data is excluded to avoid affecting the false judgment of the optimal target blockchain platform. The storage space occupation index of the blockchain refers to the storage space size required for storing the blockchain ledger and related data in the blockchain network. Due to the distributed characteristics of the blockchain, each node needs to store the complete blockchain ledger or part of the data, so the storage space occupation index becomes an important consideration factor.
[0068] S303, normalize the storage time and storage space occupation index according to the percentage system to obtain the data storage normalization result.
[0069] The normalization in percentage refers to converting the minimum storage time into 100, the maximum storage time into 1, and the intermediate storage time into a value between 1 and 100 in proportion. The minimum storage space occupation index is converted into 100, the maximum storage space occupation index is converted into 1, and other storage space occupation indexes within the maximum and minimum intervals are converted into values between 1 and 100 in proportion.
[0070] In one of the embodiments, as shown in FIG. 4, the step of query efficiency test includes:
[0071] S401, acquiring and determining, according to the query records of historical power grid data, the query operations on the key data of the power grid; the query operation includes which type of operation on which key data of the power grid. For example, the query on asset depreciation, asset amortization, project transfer, classification change, and scrapped equipment.
[0072] S402, performing the query operation on the key data of the power grid in different blockchain platform models, and recording the response time and accuracy of the query; the determination of the query accuracy can be based on the comparison result between the data obtained based on the blockchain platform model query and the originally stored key data of the power grid, and the accuracy can be obtained by dividing the amount of accurate data by the total amount of data. The response time of the query refers to the entire time from issuing the query request to receiving the response. Professional performance test tools such as Jmeter can be used to test the blockchain platform model, record and analyze the query response time.
[0073] S403, after normalizing the response time and accuracy, performing weighted calculation to obtain the query efficiency test result.
[0074] The normalization process of the response time and accuracy refers to normalizing them into one data dimension. For example, under the percentage scoring rule, the minimum response time is converted into 100 points, the maximum response time is converted into 1 point, and the response time between the maximum and minimum values is converted into a value between 1 and 100 in proportion. Similarly, the highest accuracy is converted into 100 points, the lowest accuracy is converted into 1 point, and the accuracy between the maximum and minimum values is converted into a value between 1 and 100 in proportion. The two dimensions of data are weighted calculated according to the preset weight:
[0075] a*T1+b*T2=T, where T1 is the normalized result of the response time, a is the weight of the normalized result of the response time, T2 is the normalized result of the accuracy, b is the weight of the normalized result of the accuracy, and T is the query efficiency test result.
[0076] In one of the embodiments, the key data of the power grid are used to test the performance of the blockchain platform models corresponding to different local aggregation coefficients, and normalized weighted score results are obtained, including:
[0077] Based on the data storage test and the corresponding weight, the query efficiency test and the corresponding weight, the data interaction test and the corresponding weight, and the network security test and the corresponding weight, the normalized weighted score result is determined. The weight is determined based on the neural network model training.
[0078] The determination process of the weight can be as follows:
[0079] The results of the data storage test, the results of the query efficiency test, the results of the data interaction test, and the results of the network security test are obtained, and data cleaning is performed. Cleaning data includes processing missing values, outliers, standardizing or normalizing features, etc.
[0080] The data after data cleaning is divided into training set, validation set and test set.
[0081] Select a neural network such as a fully connected neural network (DNN) or a recurrent neural network (RNN).
[0082] Determine the number of layers and the number of nodes in each layer of the neural network model. Specifically, the depth of the network and the width of each layer can be selected according to complexity.
[0083] Select any one of ReLU, Sigmoid and Tanh activation functions to increase the nonlinearity of the network.
[0084] Select a cross-entropy loss loss function to evaluate the difference between the predicted value and the true value of the model.
[0085] Select at least one of SGD, Adam, and RMSprop algorithms to update the weights during the training process to minimize the loss function.
[0086] Input the data of the training set into the neural network model to obtain the output value, and use the loss function to calculate the difference between the predicted value and the true value.
[0087] Calculate the gradient according to the loss function, and update the weights in the neural network through the backpropagation algorithm until the stopping condition is met. The stopping condition includes but is not limited to reaching the maximum number of iterations, the loss no longer significantly decreasing, etc.
[0088] Use the data in the validation set to evaluate the performance of the neural network model, and adjust the neural network model structure or hyperparameters to avoid overfitting.
[0089] Finally, the generalization ability of the neural network model is evaluated on the test set. The weights of the trained neural network model are applied to the performance test of the blockchain platform model of the power grid.
[0090] In one embodiment, the configuration step of the local aggregation coefficient includes:
[0091] Starting from the initial coefficient 0.2, increase by 0.1 to 0.8 to obtain a plurality of different local aggregation coefficients.
[0092] For each blockchain node, the configuration of the local aggregation coefficient can be based on the above steps, each blockchain node has 7 different local aggregation coefficients, then for N blockchain nodes, there are 7 N combinations, forming 7 N blockchain platform models to choose from.
[0093] In one embodiment, the blockchain platform system provided by the embodiment of the application can be managed based on the following blockchain ledger structure in the process of power grid data management:
[0094] The blockchain ledger structure under the interaction of multiple roles of the power grid includes a multi-party participating consortium chain structure and a hierarchical structure. The specific scheme is as follows:
[0095] Consortium chain structure: each power grid participant constructs a consortium chain, each member has certain permission to participate in transaction verification and block generation, ensuring data privacy and transaction efficiency.
[0096] Hierarchical structure: through the establishment of main chain and side chain, the data interaction between different roles is realized. The main chain is responsible for consensus and security, while the side chain realizes specific functions such as settlement, supervision, etc.
[0097] Using the ledger structure and time record, the rapid tracing of illegal tampering of power grid management data can be realized. Specifically, each piece of data is added with a time stamp when written into the ledger, ensuring that the data sequence is irreversible. In this process, the smart contract technology of the blockchain can be used to monitor the changes of the ledger data. Once data tampering is found, the smart contract will automatically trigger an alarm or lock the related account. For example, the data is encrypted by hash, and the hash value is recorded in the block. Once the data is tampered with, the hash value will be invalid, and the data can be traced back to whether it has been tampered with by comparing the hash value. Based on the comparison, if the data is found to be tampered with, it will be displayed on the front-end interface to remind the user. The user can click to view the operation history based on the prompt content on the front-end interface.
[0098] It should be understood that although the steps in the flowcharts involved in the embodiments described above are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the embodiments described above can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be alternately executed with other steps or steps or stages in other steps.
[0099] Based on the same inventive concept, the embodiments of the present application also provide a power grid blockchain platform configuration device for implementing the power grid blockchain platform configuration method described above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more power grid blockchain platform configuration device embodiments provided below can refer to the limitations of the power grid blockchain platform configuration method described above, which will not be repeated here.
[0100] In one exemplary embodiment, as shown in Figure 5 A power grid blockchain platform configuration device is provided, applied to a blockchain platform, the blockchain platform including a plurality of blockchain nodes, wherein the plurality of blockchain node devices include a core device and a plurality of levels of peripheral devices, the core device being connected in communication with each level of peripheral devices, the core device being deployed in a core machine room, each level of peripheral devices being at least two, and each level of peripheral devices being connected with at least part of the peripheral devices of the next level.
[0101] As shown in Figure 5 The power grid blockchain platform configuration device includes a local aggregation coefficient module 100, a platform model building module 200, a data acquisition module 300, a test module 400, and a target blockchain platform determination module 500.
[0102] The local aggregation coefficient module is configured to configure a plurality of different local aggregation coefficients for the blockchain platform.
[0103] The platform model building module is configured to deploy corresponding blockchain nodes according to the set local aggregation coefficients to obtain different blockchain platform models.
[0104] The data acquisition module is configured to acquire key data of the power grid, the key data including power grid device information, operation data, and user data.
[0105] The test module is configured to perform performance evaluation test on the blockchain platform models corresponding to different local aggregation coefficients based on the key data of the power grid under the condition that the communication between the blockchain nodes is normal, and obtain a normalized weighted score result.
[0106] The target blockchain platform determination module is configured to select the blockchain platform model corresponding to the local aggregation coefficient with the highest score as the target blockchain platform according to the normalized weighted score result.
[0107] The various modules in the power grid blockchain platform configuration apparatus can be realized by software, hardware and combinations thereof in whole or in part. The various modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to the various modules.
[0108] In an exemplary embodiment, a computer device, which can be a server, is provided, and an internal structure diagram of the computer device can be as shown in Figure 6 The computer device includes a processor, a memory, an input / output interface (I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium. The database of the computer device is configured to store data such as the blockchain platform model and the local aggregation coefficient. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to communicate with external terminals through a network connection. The computer program is executed by the processor to implement a power grid blockchain platform configuration method.
[0109] In an exemplary embodiment, a computer device, which can be a terminal, is provided, and an internal structure diagram of the computer device can be as shown in Figure 7As shown in the figure. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through the system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control ability. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner. The wireless manner can be realized through WIFI, mobile cellular network, near field communication (Near Field Communication, NFC) or other technologies. The computer program is executed by the processor to realize a power grid block chain platform configuration method.
[0110] Those skilled in the art can understand that, Figure 6-7 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0111] In one exemplary embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the above method embodiments.
[0112] In one embodiment, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to implement the steps of the above method embodiments.
[0113] In one embodiment, a computer program product is provided, including a computer program, and the computer program is executed by a processor to implement the steps of the above method embodiments.
[0114] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. The non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. The volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., without being limited thereto.
[0115] The above-mentioned method provided in the embodiments of the present application can determine a block chain platform adapted to the data management requirements of the power grid. When the platform is connected to the business system, the interface scheme implementation can be as follows:
[0116] With the principle of minimizing permission specification interface exposure, the details of the underlying ledger are maximally hidden, providing a simple calling method and interface specification document for the application layer. The interface design principle is simple and easy to use, providing complete functionality to complete transactions and maintain distributed ledger data, and has a perfect permission management mechanism. At the same time, extensibility and compatibility should be considered as much as possible. The specific interface scheme can include any of the following two:
[0117] 1. RESTful API interface scheme:
[0118] - Through the RESTful API interface, the business system can communicate with the blockchain platform to read and write data, and trigger smart contracts and other operations.
[0119] - The interface design can hide the details of the underlying ledger and provide high-level data abstraction to the outside world, so that the business system does not need to understand the specific storage and verification mechanism of the underlying ledger.
[0120] - In terms of permission specification, permission management can be achieved through OAuth and other authorization frameworks to ensure that only authorized applications can access the API of the blockchain platform and can perform fine-grained permission control.
[0121] 2. Messaging Queue interface scheme:
[0122] - Through the message queue (such as RabbitMQ, Kafka, etc.), the business system and the blockchain platform can communicate asynchronously through messages to realize event-driven data interaction.
[0123] - The business system can send data that needs to be written to the blockchain as a message to the message queue, and the blockchain platform subscribes to the message and processes it, and then returns the processing result to the business system.
[0124] This interface scheme can hide the details of the underlying ledger in the message processing logic, so that the business system only needs to care about the sending and receiving of messages, and does not need to concern about the structure and storage method of the underlying ledger.
[0125] In terms of permission specification, the permission control and authentication mechanism of the message queue can ensure that only authorized business systems can send messages to the blockchain platform, ensuring the security and reliability of the interface.
[0126] The above two interface schemes meet the principle of minimizing permission specification interface exposure, effectively hiding the details of the underlying ledger through high-level abstraction and permission management, while providing flexible, secure and efficient means for the integration of business systems and blockchain platforms.
[0127] Based on the security design of the hardware architecture, combined with the blockchain ledger structure and interface design, the data authenticity is guaranteed, and the alarm can be given when the data is illegally tampered with, and the rapid backtracking of data, especially the rapid backtracking of illegally tampered data, is supported.
[0128] The technical features of the above embodiments can be combined in any manner, and to make the description concise, all possible combinations of the technical features in the above embodiments are not described, but as long as the combinations of the technical features do not exist contradictory, they should be considered as the scope of the present application.
[0129] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the patent scope of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A method for configuring a power grid blockchain platform, characterized in that, The application is applied to a blockchain platform, the blockchain platform comprises a plurality of blockchain nodes, wherein the plurality of blockchain node devices comprise a core device and a plurality of levels of peripheral devices, the core device is connected with each level of peripheral devices in stages, the core device is deployed in a core machine room, each level of peripheral devices is at least two, and each level of peripheral devices is connected with at least part of peripheral devices of the next level, the method comprises: Configuring a plurality of different local aggregation coefficients for the blockchain platform; Deploying corresponding blockchain nodes according to the set local aggregation coefficients to obtain different blockchain platform models; Obtaining key data of a power grid, the key data comprising power grid device information, operation data and user data; In the case that the communication between the blockchain nodes is normal, performing performance evaluation test on the blockchain platform models corresponding to different local aggregation coefficients based on the key data of the power grid, and obtaining a normalized weighted score result; According to the normalized weighted score result, selecting the blockchain platform model corresponding to the local aggregation coefficient with the highest score as the target blockchain platform; Wherein, the local aggregation coefficient of each blockchain node is an index for describing the connection closeness between the blockchain node and its direct neighbor blockchain nodes, and the local aggregation coefficient measures the degree of mutual connection between the neighbor blockchain nodes of a blockchain node.
2. The method of claim 1, wherein, The performance evaluation test comprises data storage test, query efficiency test, data interaction test and network security test.
3. The method of claim 2, wherein, The steps of the network security test comprise: Simulating data tampering attack; Evaluating the data integrity and confidentiality of different blockchain platform models in the face of the data tampering attack to determine the network security score value; wherein the initial value of the network security score value is 100, one incomplete data deducts 1 point, and one data leakage deducts 2 points.
4. The method of claim 2, wherein, The steps of the data storage test comprise: Storing the key data of the power grid into different blockchain platform models respectively; Recording the storage time and storage space occupation index of each key data; Normalizing the storage time and the storage space occupation index according to the percentage system to obtain the data storage normalization result.
5. The method of claim 2, wherein, The steps of the query efficiency test comprise: Obtaining and determining the query operation for the key data of the power grid according to the query record of the historical power grid data; Executing the query operation for the key data of the power grid in different blockchain platform models, and recording the response time and accuracy of the query; After normalizing the response time and the accuracy, weighted calculation is performed to obtain the query efficiency test result.
6. The method according to any one of claims 2-5, characterized in that, The performance evaluation test on the blockchain platform models corresponding to different local aggregation coefficients based on the key data of the power grid, and obtaining the normalized weighted score result, comprises: Based on the data storage test and the corresponding weight, the query efficiency test and the corresponding weight, the data interaction test and the corresponding weight, and the network security test and the corresponding weight, the normalized weighted score result is determined, and the weight is determined based on neural network model training.
7. The method of claim 1, wherein, The configuring step of the local clustering coefficient comprises: Starting from an initial coefficient 0.2, gradually increasing to 0.8 by steps of 0.1 to obtain a plurality of different local clustering coefficients.
8. A power grid blockchain platform configuration apparatus, characterized by, The application is applied to a blockchain platform, and the blockchain platform comprises a plurality of blockchain nodes, wherein the plurality of blockchain node devices comprise a core device and a plurality of levels of peripheral devices, the core device is connected with each level of peripheral devices in stages, the core device is deployed in a core machine room, each level of peripheral devices is at least two, and each level of peripheral devices is connected with at least part of peripheral devices of a next level, and the device comprises: A local clustering coefficient module is configured to configure a plurality of different local clustering coefficients for the blockchain platform. A platform model building module is configured to deploy corresponding blockchain nodes according to the set local clustering coefficients to obtain different blockchain platform models. A data acquisition module is configured to acquire key data of a power grid, wherein the key data comprises power grid device information, operation data and user data. A test module is configured to perform performance evaluation tests on the blockchain platform models corresponding to the different local clustering coefficients based on the key data of the power grid under the condition that the communication between the blockchain nodes is normal, and to obtain a normalized weighted score result. A target blockchain platform determination module is configured to select the blockchain platform model corresponding to the local clustering coefficient with the highest score as the target blockchain platform according to the normalized weighted score result. The local clustering coefficient of each blockchain node is an index for describing the connection closeness between the blockchain node and its direct neighbor blockchain nodes, and the local clustering coefficient measures the degree of mutual connection between the neighbor blockchain nodes of a blockchain node. 9.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-8 when the computer program is executed by the processor. The processor executes the computer program to realize the steps of the method of any one of claims 1 to 7.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to realize the steps of the method of any one of claims 1 to 7.
Citation Information
Patent Citations
Internet of Things data processing method and device
CN110266807A
Intelligent service method of trusted electronic file platform based on block chain
CN115766795A