Power grid data management method and device based on block chain database platform, and computer equipment
By electing consensus nodes and supervision nodes with high reputation value on the blockchain database platform, selecting execution nodes using the scoring model, and verifying the consistency of message replicas, data quality and security issues in power grid data governance are solved, and the efficiency and reliability of the consensus process are improved.
Patent Information
- Application Number
- CN202411738842.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-11-29
AI Technical Summary
The quality issues of power grid data, including data integrity, standardization, consistency and accuracy, affect the safe and stable operation and efficient management of the power grid, and there is room for optimization in the data governance process of blockchain technology.
The power grid data governance method based on the blockchain database platform is adopted, by determining the initial reputation value of the blockchain node, electing consensus nodes and supervision nodes, selecting execution nodes using the scoring model, and verifying the consistency of message replicas through the supervision nodes to ensure the security and reliability of the data.
It reduces the communication complexity of the consensus process, improves the effectiveness of consensus, enhances the security and reliability of power grid data, and is conducive to the collaborative management of multiple roles under the power grid's large data volume.
Smart Images

Figure CN119691065A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain technology, and in particular to a power grid data governance method, device, and computer equipment based on a blockchain database platform. Background Art
[0002] With the continuous advancement of grid informatization, various asset management systems have been built and put into use. However, with the deepening of system application, data quality issues have become increasingly prominent, including data integrity, standardization, consistency and accuracy, which pose challenges to the safe and stable operation and efficient management of the grid.
[0003] To meet this challenge, the power grid has introduced blockchain technology to achieve on-chain data storage, but there is still room for improvement in data governance. Summary of the invention
[0004] Based on this, it is necessary to provide a power grid data governance method, device, and computer equipment based on a blockchain database platform that is conducive to the collaborative management of multiple parties under large amounts of power grid data in response to the above-mentioned technical problems.
[0005] In a first aspect, the present application provides a power grid data governance method based on a blockchain database platform, the method comprising:
[0006] When an execution node election is required, determine the initial reputation values of multiple blockchain nodes involved in the blockchain database platform;
[0007] Based on the initial reputation value, the reputation value is sorted to determine the consensus node and the supervision node. The consensus node is the first K blockchain nodes with high reputation value, and the supervision node is the blockchain node with the largest number of support votes among all non-consensus nodes.
[0008] Each consensus node generates a random number, writes a message including the random number into a local log, copies the message to obtain a copy, and broadcasts the copy to the supervisory node;
[0009] The supervisory node accesses the local log of each consensus node and compares the received message copy with the locally stored message copy;
[0010] If the message copies of multiple consensus nodes are consistent, the consensus node with the highest score is determined as the execution node based on the following scoring model:
[0011] J = b*C*[a*(1 / T)]
[0012] Among them, T is the waiting time corresponding to the random number of the consensus node, C is the reputation value corresponding to the consensus node, b is the influence factor coefficient of the reputation value, a is the influence factor coefficient of the waiting time, and J is the score.
[0013] In one embodiment, determining the initial reputation values of multiple blockchain nodes involved in the blockchain database platform includes:
[0014] Obtain the historical behavior of each blockchain node, including the number of times it participated in consensus, the proportion of correct blocks submitted, and the number of complaints received;
[0015] According to the historical behavior of the blockchain node, the initial reputation value of the blockchain node is determined.
[0016] In one embodiment, after the supervisory node accesses the local log of each consensus node and compares the received message copy with the locally stored message copy, the process further includes:
[0017] If the comparison results are inconsistent, the consensus node is determined to be a malicious node and added to the malicious node set.
[0018] In one embodiment, the step of determining the scoring model includes:
[0019] Establishing initial scoring models corresponding to the influence factor coefficients of different reputation values and the influence factor coefficients of different waiting times;
[0020] Based on each initial scoring model, determine the execution node;
[0021] Based on the determined execution nodes, the power grid asset data is tested to obtain the performance test scoring results;
[0022] Based on the performance test scoring results, an initial scoring model with the highest performance test scoring result is determined as the scoring model.
[0023] In one embodiment, the step of determining the performance test scoring result includes:
[0024] Obtain historical power grid asset data and store it on the blockchain based on different initial scoring models;
[0025] Simulate data tampering attacks and determine and record the data integrity and confidentiality in the face of attacks under different initial scoring models;
[0026] The performance test score result is determined based on the data integrity and confidentiality. The initial value of the performance test score result is 100. 1 point will be deducted if incomplete data appears, and 1 point will be deducted if a data leak occurs.
[0027] In a second aspect, a power grid data management device based on a blockchain database platform is provided, the device comprising:
[0028] An initial reputation value determination module is used to determine the initial reputation values of multiple blockchain nodes involved in the blockchain database platform when an execution node election is required;
[0029] The consensus node and supervisory node determination module is used to sort the reputation values based on the initial reputation values and determine the consensus nodes and supervisory nodes, where the consensus nodes are the first K blockchain nodes with high reputation values, and the supervisory nodes are the blockchain nodes with the largest number of support votes among all non-consensus nodes;
[0030] The message copy sending module is used for each consensus node to generate a random number, write the message including the random number into the local log, copy the message to obtain a message copy and broadcast the message copy to the supervisory node;
[0031] The message copy comparison module is used to access the local log of each consensus node based on the supervisory node and compare the received message copy with the locally stored message copy;
[0032] The execution node determination module is used to determine the consensus node with the highest score as the execution node based on the following scoring model when the message copies of multiple consensus nodes are consistent:
[0033] J = b*C*[a*(1 / T)]
[0034] Among them, T is the waiting time corresponding to the random number of the consensus node, C is the reputation value corresponding to the consensus node, b is the influence factor coefficient of the reputation value, a is the influence factor coefficient of the waiting time, and J is the score.
[0035] In one embodiment, the initial reputation value determination module includes:
[0036] The historical behavior data acquisition unit is used to obtain the historical behavior of each blockchain node, including the number of times it participated in consensus, the proportion of correct blocks submitted, and the number of complaints received;
[0037] The initial reputation value determination unit is used to determine the initial reputation value of the blockchain node based on the historical behavior of the blockchain node.
[0038] In one embodiment, the above device further comprises:
[0039] The malicious node recording module is used to determine the consensus node as a malicious node and add it to the malicious node set when the comparison results are inconsistent.
[0040] In one embodiment, the above device further comprises:
[0041] An initial scoring model building module is used to build initial scoring models corresponding to different influence factor coefficients of reputation values and different influence factor coefficients of waiting time;
[0042] An initial scoring model execution module, used to determine an execution node based on each initial scoring model;
[0043] The scoring module is used to test the power grid asset data based on the determined execution nodes and obtain the performance test scoring results;
[0044] The scoring model determination module is used to determine the initial scoring model with the highest performance test score result as the scoring model based on the performance test scoring result.
[0045] In a third aspect, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0046] The above-mentioned power grid data governance method, device, and computer equipment based on the blockchain database platform. The method determines the initial reputation values of multiple blockchain nodes involved in the blockchain database platform when an execution node election is required; then sorts the reputation values based on the initial reputation values to determine the consensus node and the supervision node, wherein the consensus node is the first K blockchain nodes with high reputation values, and the supervision node is the blockchain node with the largest number of support votes among all non-consensus nodes; then compares the message copies received by the supervisory node accessing the local log of each consensus node with the message copies previously received from the consensus node. When there are multiple consensus node message copies that are consistent, the consensus node with the highest score is determined as the execution node based on the following scoring model: J=b*C*[a*(1 / T)], T is the waiting time corresponding to the random number of the consensus node, C is the reputation value corresponding to the consensus node, b is the influence factor coefficient of the reputation value, a is the influence factor coefficient of the waiting time, and J is the score. By increasing the number of supervisory nodes, improving the execution node selection method and building a node trust model, the communication complexity of the consensus process is reduced and the effectiveness of the consensus is improved while ensuring overall security, which is conducive to the collaborative management of multiple roles under large amounts of power grid data. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0048] Figure 1 A schematic diagram of a flow chart of a power grid data governance method based on a blockchain database platform in one embodiment;
[0049] Figure 2 A schematic diagram of a process flow for determining initial reputation values of multiple blockchain nodes involved in a blockchain database platform in one embodiment;
[0050] Figure 3 A schematic flow chart of the steps of determining a scoring model in one embodiment;
[0051] Figure 4 A schematic flow chart of the steps for determining the performance test scoring result in one embodiment;
[0052] Figure 5 It is a structural block diagram of a power grid data management device based on a blockchain database platform in one embodiment;
[0053] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0055] The blockchain database platform combines the high throughput, low latency, and high scalability of traditional database technology with the non-repudiation and non-tamperability of blockchain technology, providing a new and secure distributed multi-active database system for the data governance platform, enabling the data governance platform to have distributed trusted storage, anti-tampering, and trusted traceability capabilities in IT asset data management. The method provided in the embodiment of the present application is applied to the blockchain database platform.
[0056] In an exemplary embodiment, Figure 1 As shown, a first aspect is provided. The present application provides a power grid data governance method based on a blockchain database platform, the method comprising:
[0057] S101, when it is necessary to conduct an execution node election, determine the initial reputation values of multiple blockchain nodes involved in the blockchain database platform. The situations where an execution node election is required may include but is not limited to the situation where the blockchain network is started, updated, or the node configuration needs to be adjusted. For example, if a blockchain node is added or deleted, at this time, it is necessary to re-determine a trusted execution node to ensure the safe operation of the blockchain network after the node configuration.
[0058] S102, sort the reputation values based on the initial reputation values, and determine the consensus nodes and supervisory nodes, where the consensus nodes are the first K blockchain nodes with high reputation values, and the supervisory nodes are the blockchain nodes with the largest number of support votes among all non-consensus nodes. Where K is a value less than the total number of blockchain nodes. The smaller the K value, the more credible the execution nodes elected from it will be, and the fewer consensus nodes need to be verified to determine the execution nodes, and the faster the election. However, if the K value is set too small, there may be a consensus node that cannot be executed, that is, there are no multiple message copies that are consistent. Based on this, K can be dynamic. First, K is set to a relatively small value. If the message copies of multiple consensus nodes are not consistent when executing steps S103-step S105 based on a smaller K, then K is increased and step S103 is re-entered until the message copies of multiple consensus nodes are consistent. When the initial value of K is small and supports dynamic adjustment, the credibility and election speed of the execution node can be taken into account.
[0059] S103, each consensus node generates a random number, writes a message including the random number into a local log, and copies the message to obtain a copy and broadcasts the copy to the supervisory node. Other non-consensus nodes other than the consensus node vote, and the blockchain node with the largest number of votes is used as the supervisory node to verify multiple consensus nodes.
[0060] S104, the supervisory node accesses the local log of each consensus node and compares the received message copy with the locally stored message copy.
[0061] The supervisory node accesses the local log of each consensus node to obtain a copy of the message stored locally on the consensus node, and then compares the copy of the message with the supervisory node previously received from the consensus node based on broadcast. If they are consistent, it means that the consensus node is trustworthy. If they are inconsistent, it means that the consensus node is untrustworthy and can be determined as a malicious node.
[0062] S105: If the message copies of multiple consensus nodes are consistent, the consensus node with the highest score is determined as the execution node based on the following scoring model:
[0063] J = b*C*[a*(1 / T)]
[0064] Among them, T is the waiting time corresponding to the random number of the consensus node, C is the reputation value corresponding to the consensus node, b is the influence factor coefficient of the reputation value, a is the influence factor coefficient of the waiting time, and J is the score.
[0065] Among them, T represents the waiting time corresponding to the random number assigned or generated by the consensus node before or during the consensus process. A longer waiting time means that the node is more patient in the system or less susceptible to network attacks (such as denial of service attacks). The waiting time impact factor coefficient a is used to adjust the weight of the waiting time in the scoring model. The value of a can be adjusted according to specific needs. The larger the a value, the greater the impact of the waiting time on the score. At this time, the scoring model tends to select nodes with shorter waiting times to improve efficiency. The value of b can also be adjusted according to specific needs. The larger the b value, the greater the impact of the reputation value on the score. At this time, the scoring model tends to select nodes with higher reputation values to improve security. Based on the considerations of efficiency and security in the specific power grid asset data management scenario, a and b can be set.
[0066] Among the consensus nodes with consistent message copies, a consensus node with the highest score is selected as the execution node, taking into account the waiting time and reputation value of the node, and adjusting it through the impact factor coefficient to ensure that the selected execution node is both efficient and reliable, which helps to improve the overall performance and security of the blockchain network.
[0067] Specifically, when the election of execution nodes is required, the initial reputation values of multiple blockchain nodes involved in the blockchain database platform are determined; then the reputation values are sorted based on the initial reputation values to determine the consensus nodes and supervisory nodes, where the consensus nodes are the first K blockchain nodes with high reputation values, and the supervisory nodes are the blockchain nodes with the largest number of support votes among all non-consensus nodes; then the message copies received by the supervisory node when accessing the local logs of each consensus node are compared with the message copies previously received from the consensus node. When the message copies of multiple consensus nodes are consistent, the consensus node with the highest score is determined as the execution node based on the following scoring model: J=b*C*[a*(1 / T)], T is the waiting time corresponding to the random number of the consensus node, C is the reputation value corresponding to the consensus node, b is the influence factor coefficient of the reputation value, a is the influence factor coefficient of the waiting time, and J is the score. By increasing the supervisory node, improving the execution node selection method and building the node trust model, the communication complexity of the consensus process is reduced and the consensus effectiveness is improved under the premise of ensuring overall security, which is conducive to the collaborative management of multiple roles under large amounts of power grid data.
[0068] In one embodiment, after step S104, the method further includes:
[0069] If there is a consensus node whose message copies are consistent or there is no consensus node whose message copies are consistent, K is increased and the process goes to step S102.
[0070] If only one consensus node's message copies are consistent or no consensus node's message copies are consistent, it means that there are too few or no trusted nodes at this time, and the security and trustworthiness of the execution nodes cannot be guaranteed. Based on this, the K value is increased to generate more consensus nodes and conduct a secondary election.
[0071] In one embodiment, Figure 2 As shown, the initial reputation values of multiple blockchain nodes involved in the blockchain database platform are determined, including:
[0072] S201, obtaining the historical behavior of each blockchain node, including the number of times participating in consensus, the proportion of correct blocks submitted, and the number of complaints received.
[0073] S202, determining the initial reputation value of the blockchain node based on the historical behavior of the blockchain node.
[0074] Among them, the number of times participating in consensus reflects the activity and participation of the node in the blockchain network. Nodes that are active and frequently participate in consensus may be more responsible and more likely to maintain the stability of the system. Therefore, the more times they participate in consensus, the greater the initial reputation value.
[0075] The proportion of submitted correct blocks directly reflects the work quality and integrity of the node. A high proportion of correct blocks means that the node is strong and reliable in data processing and verification. Therefore, the greater the proportion of submitted correct blocks, the greater the initial reputation value.
[0076] The number of complaints refers to the number of times each node has been complained by other nodes or administrators for improper behavior (such as submitting wrong data, refusing to participate in consensus, attempting to conduct double-spending attacks, etc.). Nodes with many complaints may have malicious behavior or unstable factors, and their reputation value should be reduced accordingly. That is, the more complaints a node has, the lower its initial reputation value.
[0077] This data can be obtained through the blockchain network’s own logging, monitoring tools, or dedicated reputation management systems.
[0078] Specifically, the reputation score of each node is calculated by weighted summing up the historical behavior data of each node. For example, the number of times a node has participated in consensus can be multiplied by a positive weight, the proportion of correct blocks submitted can be multiplied by a higher positive weight, and the number of times a node has been complained about can be multiplied by a negative weight. Based on the calculated reputation score, an initial reputation value is assigned to each node. The initial reputation value can be a specific value (such as an integer or floating point number between 0 and 100) or a grade (such as A, B, C, etc.).
[0079] Optionally, the reputation value is dynamically adjusted as the node behavior changes, that is, the above method further includes:
[0080] Based on the current behavior (including the number of times participating in consensus, the proportion of correct blocks submitted, and the number of complaints), the reputation value of the blockchain node is adjusted to reflect the current status and reliability of the node.
[0081] In one embodiment, after the supervisory node accesses the local log of each consensus node and compares the received message copy with the locally stored message copy, the process further includes:
[0082] If the comparison results are inconsistent, the consensus node is determined to be a malicious node and added to the malicious node set.
[0083] By adding malicious nodes to the malicious node set, they can be effectively prevented from continuing to participate in the consensus process, thereby reducing the risk of malicious destruction or tampering of power grid asset data in the blockchain network, allowing the blockchain network to rely on more honest and reliable nodes to complete consensus, thereby improving the overall stability and reliability of the power grid asset data management process.
[0084] In addition, adding malicious nodes to the malicious node set makes it easier for system administrators or smart contracts to further process these nodes, such as restricting their access rights or permanently kicking them out of the system. This centralized management method improves processing efficiency and accuracy.
[0085] In one embodiment, Figure 3 As shown, the steps for determining the scoring model include:
[0086] S301, establishing an initial scoring model corresponding to the influence factor coefficients of different reputation values and the influence factor coefficients of different waiting times.
[0087] Each model contains two main influencing factors: the reputation value of the node and the waiting time of the node. These two factors reflect their respective importance in the corresponding scoring model through different coefficients. By adjusting the coefficients of these two influencing factors, multiple different scoring models can be generated.
[0088] S302, determining an execution node based on each initial scoring model. For each initial scoring model, executing the above steps S101 to S105, a corresponding execution node will be selected.
[0089] S303, based on the determined execution node, test the power grid asset data to obtain a performance test scoring result.
[0090] S304: Based on the performance test scoring results, determine an initial scoring model with the highest performance test scoring result as the scoring model.
[0091] As the blockchain-based database platform operates and grid asset data, logs, and other data are accumulated, the scoring model can be regularly re-evaluated and adjusted to adapt to new environments and needs.
[0092] Through the above steps, the blockchain database platform can more effectively elect execution nodes that have both credibility and security, improve the efficiency and quality of power grid asset data processing, and thus optimize the performance and stability of the entire blockchain database platform.
[0093] In one embodiment, the performance test scoring result determination step is as follows: Figure 4 As shown, including:
[0094] S401, obtain historical power grid asset data, and store the historical power grid asset data on the blockchain based on different initial scoring models. The historical power grid asset data may include operation records, maintenance history, fault reports and other information of power grid equipment. These historical power grid asset data are stored on the chain. Before storage, the historical power grid asset data may need to be pre-processed, such as data cleaning, formatting, encryption, etc., to ensure data consistency and security.
[0095] Optionally, a separate blockchain network or on-chain partition can be configured for each initial scoring model for subsequent analysis and comparison.
[0096] S402, simulating data tampering attacks, and determining and recording data integrity and confidentiality in the face of attacks under different initial scoring models.
[0097] Conduct simulated data tampering attacks on each blockchain network based on different initial scoring models. These attacks may include attempts to modify data blocks on the blockchain, forge transaction records, or bypass verification mechanisms. Record and evaluate the data integrity and confidentiality of different initial scoring models under each attack scenario. Optionally, use logging, monitoring tools, and alert systems to track the attack process and record key events and data changes.
[0098] S403, determining the performance test score result according to the data integrity and confidentiality, wherein the initial value of the performance test score result is 100, 1 point is deducted when an incomplete data appears, and 1 point is deducted when a data leak occurs.
[0099] According to the data integrity and confidentiality recorded in step S402, the performance test score results are calculated for each initial scoring model. The initial score is set to 100 points. For each incomplete data point or data leakage incident, 1 point is deducted from the total score. In this way, the performance of different scoring models in protecting the security of power grid asset data can be intuitively compared. The highest-scoring initial scoring model is used as the scoring model for electing the execution node, which can ensure the overall security of the blockchain database platform in the process of power grid asset data governance.
[0100] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages 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 to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0101] Based on the same inventive concept, the embodiment of the present application also provides a power grid data management device based on a blockchain database platform for implementing the power grid data management method based on a blockchain database platform. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more embodiments of the power grid data management device based on a blockchain database platform provided below can refer to the limitations of the power grid data management method based on a blockchain database platform above, and will not be repeated here.
[0102] In an exemplary embodiment, Figure 5 As shown, a power grid data governance device based on a blockchain database platform is provided, which includes: an initial reputation value determination module 501, a consensus node and a supervisory node determination module 502, a message copy sending module 503, a message copy comparison module 504, and an execution node determination module 505. Among them:
[0103] An initial reputation value determination module is used to determine the initial reputation values of multiple blockchain nodes involved in the blockchain database platform when an execution node election is required;
[0104] The consensus node and supervisory node determination module is used to sort the reputation values based on the initial reputation values and determine the consensus nodes and supervisory nodes, where the consensus nodes are the first K blockchain nodes with high reputation values, and the supervisory nodes are the blockchain nodes with the largest number of support votes among all non-consensus nodes;
[0105] The message copy sending module is used for each consensus node to generate a random number, write the message including the random number into the local log, copy the message to obtain a message copy and broadcast the message copy to the supervisory node;
[0106] The message copy comparison module is used to access the local log of each consensus node based on the supervisory node and compare the received message copy with the locally stored message copy;
[0107] The execution node determination module is used to determine the consensus node with the highest score as the execution node based on the following scoring model when the message copies of multiple consensus nodes are consistent:
[0108] J = b*C*[a*(1 / T)]
[0109] Among them, T is the waiting time corresponding to the random number of the consensus node, C is the reputation value corresponding to the consensus node, b is the influence factor coefficient of the reputation value, a is the influence factor coefficient of the waiting time, and J is the score.
[0110] In one embodiment, the initial reputation value determination module includes:
[0111] The historical behavior data acquisition unit is used to obtain the historical behavior of each blockchain node, including the number of times it participated in consensus, the proportion of correct blocks submitted, and the number of complaints received;
[0112] The initial reputation value determination unit is used to determine the initial reputation value of the blockchain node based on the historical behavior of the blockchain node.
[0113] In one embodiment, the above device further comprises:
[0114] The malicious node recording module is used to determine the consensus node as a malicious node and add it to the malicious node set when the comparison results are inconsistent.
[0115] In one embodiment, the above device further comprises:
[0116] An initial scoring model building module is used to build initial scoring models corresponding to different influence factor coefficients of reputation values and different influence factor coefficients of waiting time;
[0117] An initial scoring model execution module, used to determine an execution node based on each initial scoring model;
[0118] The scoring module is used to test the power grid asset data based on the determined execution nodes and obtain the performance test scoring results;
[0119] The scoring model determination module is used to determine the initial scoring model with the highest performance test score result as the scoring model based on the performance test score result. Each module in the above-mentioned power grid data governance device based on the blockchain database platform can be implemented in whole or in part through software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0120] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 6 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, 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. Among them, the processor of the computer device is used 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 operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as scoring models. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a power grid data governance method based on a blockchain database platform is implemented.
[0121] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0122] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the above-mentioned steps of power grid data governance based on the blockchain database platform when executing the computer program.
[0123] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned steps of power grid data governance based on the blockchain database platform are implemented.
[0124] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the above-mentioned steps of power grid data governance based on the blockchain database platform.
[0125] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the 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. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0126] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0127] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A power grid data governance method based on a blockchain database platform, characterized in that: The method comprises: When an execution node election is required, determine the initial reputation values of multiple blockchain nodes involved in the blockchain database platform; Based on the initial reputation value, reputation value ranking is performed to determine the consensus node and the supervision node, wherein the consensus node is the first K blockchain nodes with high reputation value, and the supervision node is the blockchain node with the largest number of support votes among all non-consensus nodes; Each of the consensus nodes generates a random number, writes a message including the random number into a local log, copies the message to obtain a message copy, and broadcasts the message copy to the supervisory node; The supervisory node accesses the local log of each consensus node and compares the received message copy with the locally stored message copy; If the message copies of multiple consensus nodes are consistent, the consensus node with the highest score is determined as the execution node based on the following scoring model: J = b*C*[a*(1 / T)] Among them, T is the waiting time corresponding to the random number of the consensus node, C is the reputation value corresponding to the consensus node, b is the influence factor coefficient of the reputation value, a is the influence factor coefficient of the waiting time, and J is the score.
2. The method according to claim 1, characterized in that Determining the initial reputation values of multiple blockchain nodes involved in the blockchain database platform includes: Obtain the historical behavior of each blockchain node, including the number of times it participated in consensus, the proportion of correct blocks submitted, and the number of complaints received; An initial reputation value of the blockchain node is determined based on the historical behavior of the blockchain node.
3. The method according to claim 1, characterized in that: After the step of the supervisory node accessing the local log of each consensus node and comparing the received message copy with the locally stored message copy, the process further includes: If the comparison results are inconsistent, the consensus node is determined to be a malicious node and added to the malicious node set.
4. The method according to claim 1, characterized in that The step of determining the scoring model includes: Establishing initial scoring models corresponding to the influence factor coefficients of different reputation values and the influence factor coefficients of different waiting times; Determining the execution node based on each initial scoring model; Based on the determined execution nodes, the power grid asset data is tested to obtain the performance test scoring results; Based on the performance test scoring results, an initial scoring model with the highest performance test scoring result is determined as the scoring model.
5. The method according to claim 1, characterized in that The step of determining the performance test scoring result includes: Obtaining historical power grid asset data, and storing the historical power grid asset data on the blockchain based on different initial scoring models; Simulate data tampering attacks and determine and record the data integrity and confidentiality in the face of the attacks under different initial scoring models; The performance test score result is determined based on the data integrity and confidentiality. The initial value of the performance test score result is 100. 1 point will be deducted if incomplete data appears, and 1 point will be deducted if a data leak occurs.
6. A power grid data management device based on a blockchain database platform, characterized in that: The device comprises: An initial reputation value determination module is used to determine the initial reputation values of multiple blockchain nodes involved in the blockchain database platform when an execution node election is required; A consensus node and supervisory node determination module, used to sort the reputation values based on the initial reputation values and determine the consensus nodes and supervisory nodes, wherein the consensus nodes are the first K blockchain nodes with high reputation values, and the supervisory nodes are the blockchain nodes with the largest number of support votes among all non-consensus nodes; A message copy sending module, used for each of the consensus nodes to generate a random number, write a message including the random number into a local log, copy the message to obtain a message copy and broadcast the message copy to the supervisory node; A message copy comparison module, used to access the local log of each consensus node based on the supervisory node, and compare the received message copy with the locally stored message copy; The execution node determination module is used to determine the consensus node with the highest score as the execution node based on the following scoring model when the message copies of multiple consensus nodes are consistent: J = b*C*[a*(1 / T)] Among them, T is the waiting time corresponding to the random number of the consensus node, C is the reputation value corresponding to the consensus node, b is the influence factor coefficient of the reputation value, a is the influence factor coefficient of the waiting time, and J is the score.
7. The device according to claim 6, characterized in that The initial reputation value determination module includes: A historical behavior data acquisition unit is used to acquire the historical behavior of each blockchain node, wherein the historical behavior includes the number of times the consensus was participated in, the proportion of correct blocks submitted, and the number of complaints received; An initial reputation value determination unit is used to determine the initial reputation value of the blockchain node based on the historical behavior of the blockchain node.
8. The device according to claim 6, characterized in that The device also includes: The malicious node recording module is used to determine that the consensus node is a malicious node and add it to the malicious node set when the comparison results are inconsistent.
9. The device according to claim 6, characterized in that Also includes: An initial scoring model building module is used to build initial scoring models corresponding to different influence factor coefficients of reputation values and different influence factor coefficients of waiting time; An initial scoring model execution module, used for determining the execution node based on each initial scoring model; The scoring module is used to test the power grid asset data based on the determined execution nodes and obtain the performance test scoring results; The scoring model determination module is used to determine, based on the performance test scoring results, an initial scoring model with the highest performance test scoring result as the scoring model.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Block chain consensus node determination method, consensus method, system and equipment
CN113301118A
Block chain consensus method, device and system and electronic equipment
CN115834579A
PBFT consensus method based on weight random election and grouping reputation
CN117896116A
Oracle machine node screening method and apparatus, and storage medium and electronic apparatus
WO2022267715A1