Power data supervision method, device, equipment and medium based on blockchain

Through the blockchain-based power data supervision method, power data is received, stored, checked and processed, which solves the management difficulty, safety and accuracy problems in power data supervision, and achieves effective data supervision and security improvement.

CN115563216BActive Publication Date: 2024-11-26STATE GRID JIANGSU ELECTRIC POWER CO LTD TAIZHOU POWER SUPPLY BRANCH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211255128.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-13
Publication Date
2024-11-26
Estimated Expiration
2042-10-13

AI Technical Summary

Technical Problem

The prior art is difficult to effectively manage large amounts of power data in power data supervision, which poses security risks and is difficult to provide accurate data.

Method used

The blockchain-based power data supervision method is adopted to ensure the security and accuracy of the data by receiving and storing power data.

Benefits of technology

It realizes effective supervision of power data, improves data security and confidentiality, solves the problems of database management difficulties and data leakage, and provides accurate power data acquisition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115563216B_ABST
    Figure CN115563216B_ABST
Patent Text Reader

Abstract

The embodiments of the present disclosure disclose a blockchain-based power data supervision method, device, equipment and medium. A specific implementation of the method includes: receiving or regularly collecting power data generated by each power data source; storing the obtained power data in the power data blockchain; in response to receiving a power data acquisition request, performing a legality check on the power data acquisition request; in response to determining that the power data acquisition request passes the legality check, according to the request type of the power data acquisition request, performing data processing on the power data in the power data blockchain to obtain target power data; sending the target power data to the terminal that sent the power data acquisition request. This implementation achieves effective supervision of power data and improves the security and confidentiality of power data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of computer technology, and specifically to a blockchain-based power data supervision method, device, equipment and medium. Background Art

[0002] Power data supervision is a technology that uses certain technical means to supervise various power data generated in the power system. At present, when supervising power data, the commonly used method is to store and manage power data through ordinary databases.

[0003] However, when using the above method to monitor power data, the following technical problems often occur:

[0004] First, the amount of power data generated by the power system every day is huge and diverse. It is difficult to effectively supervise it using ordinary databases, and it increases the difficulty of database management.

[0005] Second, it is difficult to ensure the security of access to power data, which may cause power data leakage.

[0006] Third, when faced with requests for power data, it is difficult to provide accurate and effective power data. Summary of the invention

[0007] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.

[0008] Some embodiments of the present disclosure propose blockchain-based power data supervision methods, devices, equipment and media to solve one or more of the technical problems mentioned in the above background technology section.

[0009] In a first aspect, some embodiments of the present disclosure provide a blockchain-based power data supervision method, the method comprising: receiving or periodically collecting power data generated by various power data sources; storing the obtained power data in a power data blockchain; in response to receiving a power data acquisition request, performing a legitimacy check on the power data acquisition request; in response to determining that the power data acquisition request passes the legitimacy check, according to the request type of the power data acquisition request, performing data processing on the power data in the power data blockchain to obtain target power data; and sending the target power data to a terminal that sends the power data acquisition request.

[0010] In a second aspect, some embodiments of the present disclosure provide a blockchain-based power data supervision device, the device comprising: a receiving unit, configured to receive or periodically collect power data generated by various power data sources; a storage unit, configured to store the obtained power data in a power data blockchain; a verification unit, configured to, in response to receiving a power data acquisition request, perform a legality verification on the above-mentioned power data acquisition request; a processing unit, configured to, in response to determining that the above-mentioned power data acquisition request passes the legality verification, perform data processing on the power data in the above-mentioned power data blockchain according to the request type of the above-mentioned power data acquisition request to obtain target power data; a sending unit, configured to send the above-mentioned target power data to a terminal that sends the above-mentioned power data acquisition request.

[0011] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner of the above-mentioned first aspect.

[0012] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner of the above-mentioned first aspect is implemented.

[0013] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: through the power data supervision method based on blockchain of some embodiments of the present disclosure, effective supervision of power data can be achieved, and the security and confidentiality of power data can be improved. Specifically, the reason why power data is difficult to be effectively supervised, the difficulty of database management is increased, and the power data leakage is caused is that the power data is stored and managed through an ordinary database. Based on this, the power data supervision method based on blockchain of some embodiments of the present disclosure first receives or collects power data generated by each power data source at regular intervals. Then, the obtained power data is stored in the power data blockchain. Thus, the obtained power data is stored in the power data blockchain, and the power data is supervised by the power data blockchain, thereby, the power data is supervised by blockchain technology. Then, in response to receiving the power data acquisition request, the above power data acquisition request is subjected to a legality check. Then, in response to determining that the above power data acquisition request passes the legality check, the power data in the above power data blockchain is processed according to the request type of the above power data acquisition request to obtain the target power data. Thus, the security of power data is further strengthened through legality check. Finally, the target power data is sent to the terminal that sent the power data acquisition request. Thus, the method can effectively monitor the power data and improve the security and confidentiality of the power data. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.

[0015] Figure 1 is a flowchart of some embodiments of the blockchain-based power data supervision method according to the present disclosure;

[0016] Figure 2 It is a schematic diagram of the structure of some embodiments of the blockchain-based power data supervision device disclosed in the present invention;

[0017] Figure 3 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION

[0018] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0019] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.

[0020] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0021] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0022] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0023] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

[0024] refer to Figure 1 , shows a process 100 of some embodiments of the blockchain-based power data supervision method according to the present disclosure. The blockchain-based power data supervision method includes the following steps:

[0025] Step 101: Receive or periodically collect power data generated by various power data sources.

[0026] In some embodiments, the executor of the blockchain-based power data supervision method can receive or regularly collect power data generated by each power data source through a wired connection or a wireless connection. Among them, the above-mentioned power data acquisition request may include: user identification, target power data type. The above-mentioned target power data type may include a request type and a power data name. The above-mentioned user identification can be used to uniquely identify a user. The above-mentioned target power data type may be the type of power data requested by the above-mentioned power data acquisition request. In practice, the time interval for regularly collecting power data can be set according to actual needs, which is not limited here.

[0027] Step 102, storing the obtained power data in the power data blockchain.

[0028] In some embodiments, the execution entity may store the obtained power data in a power data blockchain, wherein the power data blockchain may be pre-established.

[0029] Step 103: in response to receiving the power data acquisition request, perform a validity check on the power data acquisition request.

[0030] In some embodiments, the execution subject may perform a validity check on the power data acquisition request in response to determining that the user identifier in the power data acquisition request is different from any abnormal user identifier in the abnormal user identifier set. The execution subject may perform the following steps:

[0031] The first step is to convert the user identifier in the above power data acquisition request into a user identifier hash value. The user identifier in the above power data acquisition request can be converted into a user identifier hash value using a hash function. The above hash function may include but is not limited to at least one of the following: MD (Message-Digest Algorithm) 5, MD4, SHA (Secure Hash Algorithm)-2, SHA-224, etc.

[0032] The second step is to generate random values.

[0033] Optionally, generating a random value includes the following steps:

[0034] The first sub-step is to convert the time point of receiving the above-mentioned power data acquisition request into seconds to obtain the number of seconds.

[0035] As an example, the time point when the power data acquisition request is received may be 02:46:34, which may be converted into 9994 seconds.

[0036] The second sub-step is to use the target logarithmic function to take the logarithm of the seconds to obtain a logarithmic value. The base of the target logarithmic function is updated at a preset time interval. The base of the target logarithmic function can be the average value of each random value generated in a time period with the previous value as the base.

[0037] In a third sub-step, a ratio of the number of power data acquisition requests received within a time period with the previous value as the base number to the number of abnormal user identifiers in the abnormal user identifier set is determined as a random ratio.

[0038] In a fourth sub-step, the random value is determined as the product of the sum of the logarithmic value and the random ratio and the preliminary random value.

[0039] The above preliminary random value is generated by the following steps:

[0040] First, any random value generation function is selected from a preset random value generation function set as a target random value generation function, and then a preliminary random value is generated using the target random value generation function.

[0041] As an example, the above-mentioned random value generation function set may include but is not limited to at least one of the following: Rand(), Randbetween().

[0042] The above-mentioned step of generating a random value is an inventive point of an embodiment of the present disclosure, which solves the technical problem 2 mentioned in the background technology, "it is difficult to ensure the access security of power data, which may cause power data leakage". The factors leading to the above-mentioned technical problems are often as follows: the random value generated by conventional means is easy to be cracked. If the above-mentioned factors are solved, the effect of improving the security of power data can be achieved. In order to achieve this effect, the present disclosure first converts the time point of receiving the above-mentioned power data acquisition request into seconds to obtain the number of seconds. Then, the target logarithmic function is used to take the logarithm of the above-mentioned seconds to obtain the logarithmic value. Among them, the base of the above-mentioned target logarithmic function is updated at a preset time interval. The base of the target logarithmic function can be the average value of each random value generated in the time period with the previous value as the base. Then, the ratio of the number of power data acquisition requests received in the time period with the previous value as the base to the number of abnormal user identifiers in the above-mentioned abnormal user identifier set is determined as a random ratio. Finally, any random value generation function is selected from the preset random value generation function set as the target random value generation function, and the target random value generation function is used to generate a preliminary random value. In this way, a random value can be generated by combining personalized values ​​that are difficult for the outside world to obtain. Therefore, the risk of the generated random value being easily cracked can be avoided to a certain extent, further improving the security of power data.

[0043] The third step is to combine the generated random value, the user identification hash value, and the verification value corresponding to the user identification hash value pre-stored in the power data blockchain in a random order to obtain a combined verification value.

[0044] The fourth step is to convert the above-mentioned combined verification value into a combined verification hash value. The above-mentioned combined verification value can be converted into a combined verification hash value by using a hash function.

[0045] The fifth step is to send the above-mentioned combined verification hash value to the terminal that sends the above-mentioned power data acquisition request.

[0046] Optionally, in response to determining that the user identifier in the power data acquisition request is different from any abnormal user identifier in the abnormal user identifier set, the execution subject verifies the legitimacy of the power data acquisition request, and may further include the following steps:

[0047] The first step is to, in response to receiving the user identification authentication information sent by the terminal, decrypt the user identification authentication information using the pre-generated public key to obtain a decrypted hash verification value. In practice, the public key and the corresponding private key can be set according to actual application needs, which is not limited here.

[0048] In a second step, in response to determining that the combined verification hash value is the same as the decrypted hash verification value, determining that the power data acquisition request passes the legality check.

[0049] In a third step, in response to determining that the combined verification hash value is different from the decrypted hash verification value, determining that the power data acquisition request fails to pass the legality check.

[0050] Optionally, the user identification authentication information is generated by the following steps:

[0051] In response to receiving the above-mentioned combined verification hash value, the above-mentioned combined verification hash value is encrypted using a pre-generated private key to generate user identification authentication information.

[0052] In some optional implementations of some embodiments, the above-mentioned execution subject may perform the following steps before performing a legality check on the power data acquisition request:

[0053] Determine whether the user identifier in the power data acquisition request is the same as any abnormal user identifier in the abnormal user identifier set.

[0054] The above-mentioned step of performing a legality check is an inventive point of an embodiment of the present disclosure, which further solves the second technical problem mentioned in the background technology, "it is difficult to ensure the access security of power data, which may cause power data leakage". The factors that lead to the above technical problems are often as follows: it is difficult to effectively identify some illegal power data acquisition requests, which may lead to the illegal acquisition of power data by slipping through the net, and illegal power data acquisition requests will also occupy too many resources. If the above factors are solved, the effect of further improving the security of power data and reducing resource waste can be achieved. In order to achieve this effect, the present disclosure first identifies the power data acquisition request, and then determines whether it is an abnormal power data acquisition request. If it is determined that it is an abnormal power data acquisition request, it will not be responded to directly. Thereby reducing the leakage of information and reducing the risk of the encryption mechanism being cracked. Then, when it is determined that the power data acquisition request is not an abnormal power data acquisition request, it is subjected to a legality check. Thereby, the occupation of legality verification resources by abnormal power data acquisition requests is avoided. At the same time, when verifying the legitimacy of the power data acquisition request, the random value, user identification hash value and the verification value corresponding to the above user identification hash value pre-stored in the above power data blockchain are combined for verification, which further improves the security of the verification information and thus prevents the power data from being illegally acquired.

[0055] Step 104, in response to determining that the power data acquisition request passes the legality check, the power data in the power data blockchain is processed according to the request type of the power data acquisition request to obtain the target power data.

[0056] In some embodiments, in response to determining that the power data acquisition request passes the legality check, the execution subject processes the power data in the power data blockchain according to the request type of the power data acquisition request to obtain the target power data, which may include the following steps:

[0057] The first step, in response to determining that the request type of the above-mentioned power data acquisition request is a traceability request, obtains the initial data, modification records, intermediate data and latest data of the power data corresponding to the power data name included in the above-mentioned target power data type from the above-mentioned power data blockchain to obtain a traceability data set.

[0058] The second step is to arrange the initial data, modification records, intermediate data and latest data in the above traceability data set in the chronological order of storage in the above power data blockchain to obtain a traceability data sequence.

[0059] The third step is to use the public key to encrypt the traceability data sequence to obtain the target power data.

[0060] The above-mentioned step of processing power data for the traceability request to obtain the target power data is an inventive point of the embodiment of the present disclosure, which solves the technical problem three mentioned in the background technology: "It is difficult to provide accurate and effective power data when facing the power data acquisition request". The factors that lead to the above technical problems are often as follows: It is difficult for traditional databases to accurately and effectively provide the requested power data when responding to the power data acquisition request. If the above factors are solved, the effect of providing accurate and effective power data can be achieved. In order to achieve this effect, the present disclosure uses blockchain to store each step of modification and data status of power data from joining the power data blockchain to the current time point, so that after determining that the request type of the power data acquisition request is a traceability request, the initial data, modification record, intermediate state data and latest state data of the power data corresponding to the power data name included in the above target power data type can be directly obtained from the above power data blockchain to obtain the traceability data set. Then, the data in the above traceability data set is processed to obtain the target power data. Furthermore, when facing the power data acquisition request, accurate and effective power data can be provided.

[0061] Optionally, in response to determining that the power data acquisition request passes the legality check, the execution subject processes the power data in the power data blockchain according to the request type of the power data acquisition request to obtain the target power data, and may further include the following steps:

[0062] In the first step, in response to determining that the request type of the power data acquisition request is a traceability request, the latest state data of the power data corresponding to the power data name included in the target power data type is obtained from the power data blockchain. The latest state data may be the power data most recently updated in the power data blockchain.

[0063] The second step is to use the public key to encrypt the latest data to obtain the target power data.

[0064] In some optional implementations of some embodiments, the above execution subject may further perform the following steps:

[0065] In the first step, in response to determining that the power data acquisition request fails the legality check, a verification failure prompt message is sent to the terminal that sent the power data acquisition request. In practice, the specific content of the verification failure prompt message can be set according to actual application needs, which is not limited here.

[0066] As an example, the specific content of the above verification failure prompt information may be "Prompt: Legality verification failed".

[0067] In the second step, the power data acquisition request is added as an abnormal power data acquisition request to an abnormal power data acquisition request set.

[0068] In a third step, in response to determining that the number of abnormal power data acquisition requests with the same user identifier in the above-mentioned abnormal power data acquisition request set has reached a preset number, the user identifiers in the abnormal power data acquisition requests with the same user identifier that have reached the above-mentioned preset number are added as abnormal user identifiers to the abnormal user identifier set.

[0069] As an example, the above preset number may be 3.

[0070] In the fourth step, each abnormal power data acquisition request whose number reaches the preset number and whose user identifier is the same is removed from the abnormal power data acquisition request set.

[0071] Step 105: Send the target power data to the terminal that sends the power data acquisition request.

[0072] In some embodiments, the execution entity may send the target power data to a terminal that sends the power data acquisition request.

[0073] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: through the power data supervision method based on blockchain of some embodiments of the present disclosure, effective supervision of power data can be achieved, and the security and confidentiality of power data can be improved. Specifically, the reason why power data is difficult to be effectively supervised, the difficulty of database management is increased, and the power data leakage is caused is that the power data is stored and managed through an ordinary database. Based on this, the power data supervision method based on blockchain of some embodiments of the present disclosure first receives or collects power data generated by each power data source at regular intervals. Then, the obtained power data is stored in the power data blockchain. Thus, the obtained power data is stored in the power data blockchain, and the power data is supervised by the power data blockchain, thereby, the power data is supervised by blockchain technology. Then, in response to receiving the power data acquisition request, the above power data acquisition request is subjected to a legality check. Then, in response to determining that the above power data acquisition request passes the legality check, the power data in the above power data blockchain is processed according to the request type of the above power data acquisition request to obtain the target power data. Thus, the security of power data is further strengthened through legality check. Finally, the target power data is sent to the terminal that sent the power data acquisition request. Thus, the method can effectively monitor the power data and improve the security and confidentiality of the power data.

[0074] Further references Figure 2As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a blockchain-based power data supervision device. These device embodiments are similar to Figure 1 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.

[0075] like Figure 2 As shown, the power data supervision device 200 based on blockchain of some embodiments includes: a receiving unit 201, a storage unit 202, a verification unit 203, a processing unit 204 and a sending unit 205. Among them, the receiving unit 201 is configured to receive or regularly collect power data generated by each power data source; the storage unit 202 is configured to store the obtained power data in the power data blockchain; the verification unit 203 is configured to perform a legality check on the power data acquisition request in response to receiving the power data acquisition request; the processing unit 204 is configured to perform data processing on the power data in the power data blockchain according to the request type of the power data acquisition request in response to determining that the power data acquisition request passes the legality check to obtain the target power data; the sending unit 205 is configured to send the target power data to the terminal that sends the power data acquisition request.

[0076] It can be understood that the units recorded in the blockchain-based power data supervision device 200 and the reference Figure 1 The various steps in the described method correspond to each other. Therefore, the operations, features and beneficial effects described above for the method are also applicable to the blockchain-based power data supervision device 200 and the units contained therein, and will not be repeated here.

[0077] Reference below Figure 3 , which shows a structural schematic diagram of an electronic device 300 suitable for implementing some embodiments of the present disclosure. Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0078] like Figure 3 As shown, the electronic device 300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 to a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0079] Typically, the following devices may be connected to the I / O interface 305: an input device 306 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; and a communication device 309. The communication device 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. Figure 3 The electronic device 300 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 3 Each block shown in the figure may represent one device, or may represent multiple devices as required.

[0080] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.

[0081] It should be noted that the computer-readable medium recorded in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0082] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0083] The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: receives or regularly collects power data generated by various power data sources; stores the obtained power data in the power data blockchain; in response to receiving a power data acquisition request, performs a legality check on the power data acquisition request; in response to determining that the power data acquisition request passes the legality check, according to the request type of the power data acquisition request, performs data processing on the power data in the power data blockchain to obtain target power data; and sends the target power data to the terminal that sends the power data acquisition request.

[0084] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0085] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0086] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The described units may also be provided in a processor, for example, may be described as: a processor includes a receiving unit, a storage unit, a verification unit, a processing unit and a sending unit. The names of these units do not constitute a limitation on the units themselves in some cases, for example, the storage unit may also be described as a "unit for storing power data".

[0087] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

Claims

1. A blockchain-based power data supervision method, include: Receive or regularly collect power data generated by various power data sources; The obtained power data is stored in the power data blockchain; In response to receiving a power data acquisition request, performing a legality check on the power data acquisition request, wherein the power data acquisition request includes: a user identifier and a target power data type; In response to determining that the power data acquisition request passes the legality check, according to the request type of the power data acquisition request, the power data in the power data blockchain is processed to obtain target power data; Sending the target power data to the terminal that sends the power data acquisition request; In response to determining that the power data acquisition request fails to pass the legality check, sending a verification failure prompt message to the terminal that sent the power data acquisition request; adding the power data acquisition request as an abnormal power data acquisition request to an abnormal power data acquisition request set; In response to determining that the number of abnormal power data acquisition requests with the same user identifier in the abnormal power data acquisition request set reaches a preset number, adding the user identifiers in the abnormal power data acquisition requests with the same user identifier that reaches the preset number as abnormal user identifiers to the abnormal user identifier set; removing the abnormal power data acquisition requests whose number reaches the preset number and whose user identifiers are the same from the abnormal power data acquisition request set; The step of performing a legality check on the power data acquisition request includes: In response to determining that the user identifier in the power data acquisition request is different from any abnormal user identifier in the abnormal user identifier set, performing a legality check on the power data acquisition request, including: Converting the user identifier in the power data acquisition request into a user identifier hash value; Generating a random value includes: converting the time point of receiving the power data acquisition request into seconds to obtain the seconds; taking the logarithm of the seconds using a target logarithmic function to obtain a logarithmic value; determining the ratio of the number of power data acquisition requests received within a time period with a previous value as the base to the number of abnormal user identifiers in the abnormal user identifier set as a random ratio; determining the product value of the sum of the logarithmic value and the random ratio and a preliminary random value as a random value, wherein the preliminary random value is generated by the following steps: selecting any one random value generation function from a preset random value generation function set as a target random value generation function; generating a preliminary random value using the target random value generation function; Combining the generated random value, the user identification hash value, and a verification value corresponding to the user identification hash value pre-stored in the power data blockchain in a random order to obtain a combined verification value; Converting the combined verification value into a combined verification hash value, wherein the combined verification value is converted into the combined verification hash value using a hash function; Sending the combined verification hash value to the terminal that sends the power data acquisition request; In response to receiving the user identification authentication information sent by the terminal, decrypting the user identification authentication information using a pre-generated public key to obtain a decrypted hash verification value; In response to determining that the combined verification hash value is the same as the decrypted hash verification value, determining that the power data acquisition request passes the legitimacy check; In response to determining that the combined verification hash value is the same as the decrypted hash verification value, it is determined that the power data acquisition request passes the legitimacy check.

2. The method according to claim 1, in, Before performing a legality check on the power data acquisition request, the method further includes: It is determined whether the user identifier in the power data acquisition request is the same as any abnormal user identifier in the abnormal user identifier set.

3. The method according to any one of claims 1 to 2, in, In response to determining that the power data acquisition request passes the legality check, according to the request type of the power data acquisition request, the power data in the power data blockchain is processed to obtain the target power data, including: In response to determining that the request type of the power data acquisition request is a traceability request, acquiring the latest state data of the power data corresponding to the power data name included in the target power data type from the power data blockchain; The latest state data is encrypted to obtain target power data.

4. A blockchain-based power data monitoring device, include: A receiving unit is configured to receive or regularly collect power data generated by various power data sources; A storage unit configured to store the obtained power data in a power data blockchain; A verification unit is configured to, in response to receiving a power data acquisition request, perform a legality verification on the power data acquisition request, wherein the power data acquisition request includes: a user identifier and a target power data type; a processing unit, configured to, in response to determining that the power data acquisition request passes the legality check, perform data processing on the power data in the power data blockchain according to the request type of the power data acquisition request to obtain target power data; a sending unit, configured to send the target power data to a terminal that sends the power data acquisition request; a verification failure prompt information sending unit, configured to send verification failure prompt information to the terminal that sent the power data acquisition request in response to determining that the power data acquisition request fails the legality verification; an adding unit, configured to add the power data acquisition request as an abnormal power data acquisition request to an abnormal power data acquisition request set; an abnormal user identification set adding unit, configured to, in response to determining that the number of each abnormal power data acquisition request with the same user identification in the abnormal power data acquisition request set reaches a preset number, add the user identifications in the abnormal power data acquisition requests with the same user identification that reach the preset number as abnormal user identifications to the abnormal user identification set; a removing unit configured to remove the abnormal power data acquisition requests whose number reaches the preset number and whose user identifiers are the same from the abnormal power data acquisition request set; The step of performing a legality check on the power data acquisition request includes: In response to determining that the user identifier in the power data acquisition request is different from any abnormal user identifier in the abnormal user identifier set, performing a legality check on the power data acquisition request, including: Converting the user identifier in the power data acquisition request into a user identifier hash value; Generating a random value includes: converting the time point of receiving the power data acquisition request into seconds to obtain the seconds; taking the logarithm of the seconds using a target logarithmic function to obtain a logarithmic value; determining the ratio of the number of power data acquisition requests received within a time period with a previous value as the base to the number of abnormal user identifiers in the abnormal user identifier set as a random ratio; determining the product value of the sum of the logarithmic value and the random ratio and a preliminary random value as a random value, wherein the preliminary random value is generated by the following steps: selecting any one random value generation function from a preset random value generation function set as a target random value generation function; generating a preliminary random value using the target random value generation function; Combining the generated random value, the user identification hash value, and a verification value corresponding to the user identification hash value pre-stored in the power data blockchain in a random order to obtain a combined verification value; Converting the combined verification value into a combined verification hash value, wherein the combined verification value is converted into the combined verification hash value using a hash function; Sending the combined verification hash value to the terminal that sends the power data acquisition request; In response to receiving the user identification authentication information sent by the terminal, decrypting the user identification authentication information using a pre-generated public key to obtain a decrypted hash verification value; In response to determining that the combined verification hash value is the same as the decrypted hash verification value, determining that the power data acquisition request passes the legitimacy check; In response to determining that the combined verification hash value is the same as the decrypted hash verification value, it is determined that the power data acquisition request passes the legitimacy check.

5. An electronic device, include: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 3.

6. A computer readable medium having a computer program stored thereon, in, When the program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.