CN112560052A - Energy storage data management method based on block chain and related device - Google Patents

Energy storage data management method based on block chain and related device Download PDF

Info

Publication number
CN112560052A
CN112560052A CN202011374871.1A CN202011374871A CN112560052A CN 112560052 A CN112560052 A CN 112560052A CN 202011374871 A CN202011374871 A CN 202011374871A CN 112560052 A CN112560052 A CN 112560052A
Authority
CN
China
Prior art keywords
energy storage
data
storage data
block chain
encrypted
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011374871.1A
Other languages
Chinese (zh)
Inventor
范越
方保民
王亦婷
王茂春
李红志
周炜
徐有蕊
李剑
陈春萌
王莲芳
李兵
李延和
朱浩冰
商庆一
刘萍
吕伟康
万威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
WEALEDGER NETWORK TECHNOLOGIES Co.,Ltd.
State Grid Qinghai Electric Power Co Ltd
Original Assignee
Wealedger Network Technologies Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wealedger Network Technologies Co ltd filed Critical Wealedger Network Technologies Co ltd
Priority to CN202011374871.1A priority Critical patent/CN112560052A/en
Publication of CN112560052A publication Critical patent/CN112560052A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Finance (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Accounting & Taxation (AREA)
  • Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Technology Law (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application provides an energy storage data management method and a related device based on a block chain, and relates to the technical field of the block chain, wherein the energy storage data management method comprises the following steps: acquiring energy storage data to be linked; storing energy storage data to be linked into a first database of the middleware; performing chain winding operation on the energy storage data to be chain wound so as to store the energy storage data to be chain wound into the block chain and obtain a corresponding transaction ID; based on the obtained transaction ID, corresponding data are obtained from the block chain and stored in a second database of the middleware, so that a user can compare the energy storage data to be linked with the obtained corresponding data to judge whether the obtained corresponding data are changed compared with the energy storage data to be linked, whether the energy storage data on the block chain have errors is further determined, and the reliability of energy storage data management based on the block chain can be effectively improved.

Description

Energy storage data management method based on block chain and related device
Technical Field
The present disclosure relates to the field of block chain technologies, and in particular, to a block chain-based energy storage data management method and a related apparatus.
Background
With the development of the times, the scale of renewable energy sources in China is continuously enlarged, the trading volume of an energy market is also increased, and a block chain technology is usually introduced to manage data (such as energy storage data) related to the energy market in order to ensure the public confidence of the energy market.
Research shows that unexpected changes of energy storage data in the process of uploading a block chain (namely, an uplink process) may occur for some reason, and thus the energy storage data after uplink has errors from the beginning. At present, there is no better method for a user to detect whether the energy storage data on the block chain changes more before uplink, which seriously affects the reliability of energy storage data management based on the block chain technology.
Disclosure of Invention
The application provides an energy storage data management method and a related device based on a block chain, which can effectively improve the reliability of energy storage data management based on the block chain.
In order to achieve the above technical effect, a first aspect of the present application provides an energy storage data management method based on a block chain, including:
acquiring energy storage data to be linked;
storing the energy storage data to be linked into a first database of the middleware;
performing chain linking operation on the energy storage data to be chain linked so as to store the energy storage data to be chain linked into a block chain and obtain a corresponding transaction ID;
and acquiring corresponding data from the block chain based on the acquired transaction ID and storing the corresponding data into a second database of the middleware.
Based on the first aspect of the present application, in a first possible implementation manner, the acquiring the to-be-uplink energy storage data includes:
identifying the input energy storage data to determine data needing encryption and data needing no encryption;
encrypting the data to be encrypted;
and taking the data which needs to be encrypted and the data which does not need to be encrypted after encryption processing as the energy storage data to be linked.
Based on the first possible implementation manner of the first aspect of the present application, in a second possible implementation manner, the identifying the input energy storage data to determine the data to be encrypted and the data not to be encrypted includes:
identifying a target field of the input energy storage data;
and determining data to be encrypted in the input energy storage data based on the target field identified in the input energy storage data.
Based on the second possible implementation manner of the first aspect of the present application, in a third possible implementation manner, the target field includes more than one type of field;
the encrypting the data to be encrypted includes:
determining the importance of each part of data in the data to be encrypted based on the fields of more than one category;
and encrypting each part of data based on an encryption method corresponding to the importance of each part of data.
Based on the first aspect of the present application or the first, second, or third possible implementation manner of the first aspect of the present application, in a fourth possible implementation manner, the energy storage data management method further includes:
when a block chain energy storage data request instruction is received, judging whether a user sending the block chain energy storage data request instruction has corresponding authority;
if the user has the corresponding authority, outputting corresponding decrypted energy storage data to the user based on the energy storage data requested by the block chain energy storage data request instruction;
and if the user does not have the corresponding authority, prompting that the user does not have the corresponding authority.
Based on the first aspect of the present application or the first, second, or third possible implementation manner of the first aspect of the present application, in a fifth possible implementation manner, after the obtaining, based on the obtained transaction ID, corresponding data from the block chain and storing the data in the second database of the middleware, the energy storage data management method further includes:
judging whether the energy storage data to be linked in the first database is consistent with the acquired corresponding data;
and if the energy storage data to be linked in the first database is inconsistent with the acquired corresponding data, outputting abnormal prompt information.
The second aspect of the present application provides an energy storage data management apparatus based on a block chain, including:
the acquiring unit is used for acquiring energy storage data to be linked;
the first storage unit is used for storing the energy storage data to be linked into a first database of the middleware;
the uplink unit is used for performing uplink operation on the energy storage data to be uplink so as to store the energy storage data to be uplink into a block chain and obtain a corresponding transaction ID;
and the second storage unit is used for acquiring corresponding data from the block chain and storing the corresponding data into a second database of the middleware based on the acquired transaction ID.
Based on the second aspect of the present application, in a first possible implementation manner, the obtaining unit is specifically configured to:
identifying the input energy storage data to determine data needing encryption and data needing no encryption;
encrypting the data to be encrypted;
and taking the data which needs to be encrypted and the data which does not need to be encrypted after encryption processing as the energy storage data to be linked.
A third aspect of the present application provides an energy storage data management apparatus based on a block chain, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the steps of the energy storage data management method mentioned in the first aspect or any possible implementation manner of the first aspect when executing the computer program.
A fourth aspect of the present application provides a computer-readable storage medium having a computer program, where the computer program, when executed by a processor, implements the steps of the energy storage data management method according to the first aspect or any of the possible implementation manners of the first aspect.
As can be seen from the above, in the technical scheme of the application, energy storage data to be linked are acquired; storing energy storage data to be linked into a first database of the middleware; performing chain winding operation on the energy storage data to be chain wound so as to store the energy storage data to be chain wound into the block chain and obtain a corresponding transaction ID; based on the obtained transaction ID, corresponding data are obtained from the block chain and stored in a second database of the middleware, so that a user can compare the energy storage data to be linked with the obtained corresponding data to judge whether the obtained corresponding data are changed compared with the energy storage data to be linked, whether the energy storage data on the block chain have errors is further determined, and the reliability of energy storage data management based on the block chain can be effectively improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic flowchart of an embodiment of a block chain-based energy storage data management method provided in the present application;
fig. 2 is a schematic structural diagram of an embodiment of an energy storage data management apparatus based on a block chain according to the present application;
fig. 3 is a schematic structural diagram of another embodiment of the energy storage data management apparatus based on a block chain according to the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. However, it will be apparent to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
The technical solutions in the embodiments of the present application are clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application, but the present application may be practiced in other ways than those described herein, and it will be apparent to those of ordinary skill in the art that the present application is not limited by the specific embodiments disclosed below.
Example one
The application provides an energy storage data management method based on a block chain, as shown in fig. 1, including:
step 101, acquiring energy storage data to be linked;
in the embodiment of the application, energy storage data input by a user is received, and then the energy storage data can be further processed by identification and/or encryption and the like, so that energy storage data to be linked can be obtained.
Optionally, the acquiring the to-be-uplink energy storage data includes:
identifying the input energy storage data to determine data needing encryption and data needing no encryption;
encrypting the data to be encrypted;
and taking the data which needs to be encrypted and the data which does not need to be encrypted after encryption processing as the energy storage data to be linked.
In an application scenario, an interface for uploading energy storage data is preset, and when a user inputs the energy storage data, the user can input corresponding energy storage data or specify an encryption mode by calling the corresponding interface. For example, the interfaces shown in table 1 may be preset:
TABLE 1
Figure BDA0002807922220000071
Figure BDA0002807922220000081
The user can input corresponding data to the interfaces shown in table 1 as required, and the data input from different interfaces will be subjected to corresponding data processing.
In another application scenario, when a user inputs energy storage data, each data in the energy storage data may be divided to determine data that needs to be encrypted and data that does not need to be encrypted in the energy storage data, for example: the energy storage data input by the user comprises a first part of data and a second part of data, the user can divide the first part of data into data which does not need to be encrypted and attach a corresponding label (such as a label indicating that encryption is not needed) according to the self requirement, and divide the second part of data into data which needs to be encrypted and attach a corresponding label (such as a label indicating that encryption is needed) so as to identify and/or encrypt the corresponding data of the energy storage data input by the user in the following process, and the energy storage data to be linked can be obtained.
Further, the tag may be embodied as a specific field, and the identifying the input energy storage data to determine the data to be encrypted and the data not to be encrypted includes:
identifying a target field of the input energy storage data;
and determining data to be encrypted in the input energy storage data based on the target field identified in the input energy storage data.
Specifically, the data containing the target field may be determined as data to be encrypted, and the data not containing the target field may be determined as data not to be encrypted; data containing one type of target field can also be determined as data needing encryption, and data containing another type of target field can also be determined as data needing no encryption.
Further, the target field comprises more than one type of field;
the encrypting the data to be encrypted includes:
determining the importance of each part of data in the data to be encrypted based on the fields of more than one category;
and encrypting each part of data based on an encryption method corresponding to the importance of each part of data.
Specifically, partial data corresponding to different fields in the target field can be preset, and the importance of different sizes is achieved; when encrypting each part of data, the encryption algorithm with high complexity can be adopted to encrypt the part of data with the importance degree higher than the preset value, and the encryption algorithm with low complexity is adopted to encrypt the part of data with the importance degree not higher than the preset value, so that the encrypted part of data with the importance degree higher than the preset value is more difficult to be broken by outsiders, and the encrypted part of data with the importance degree not higher than the preset value is more convenient for a user to decrypt;
the target field may be one or more fields in date, energy storage ID, time point number, energy storage actual active value, energy storage charging power upper limit, and other types of data, and may be specifically set according to the requirement of the user, and the importance of different fields may also be set according to the requirement of the user, which is not limited herein; the encryption method may be any one of an AES encryption algorithm, a DES encryption algorithm, and other types of encryption algorithms, and is not limited herein.
Optionally, after the encrypted data to be encrypted and the encrypted data not to be encrypted are used as the to-be-uplink energy storage data, the energy storage data management method further includes:
and compressing the energy storage data to be subjected to chain winding so as to accelerate the speed of storing the energy storage data to be subjected to chain winding into the block chain subsequently and save the storage space of the block chain.
Specifically, the compressing the to-be-cochain energy storage data includes:
compressing the to-be-uplink stored energy data based on a preset compression algorithm, and then encoding the compressed to-be-uplink stored energy data based on a preset encoding algorithm, wherein the preset compression algorithm is a lossless compression algorithm or other types of compression algorithms, and the preset encoding algorithm may be a base64 encoding algorithm or other types of encoding algorithms, which are not limited herein.
Step 102, storing the energy storage data to be linked into a first database of the middleware;
in the embodiment of the application, the to-be-uplink energy storage data acquired in step 101 is stored in the first database of the middleware, and then the certificate ID returned after the middleware stores the to-be-uplink energy storage data is acquired and sent to the user, where the certificate ID is used for the user to use when the user queries the corresponding to-be-uplink energy storage data in the middleware.
103, performing a chain winding operation on the energy storage data to be chain wound so as to store the energy storage data to be chain wound into a block chain and obtain a corresponding transaction ID;
in this embodiment of the application, the to-be-uplink energy storage data obtained in step 101 is subjected to an uplink operation, that is, the to-be-uplink energy storage data is stored in the block chain, and a transaction ID returned after the block chain stores the to-be-uplink energy storage data is obtained, where the transaction ID is data unique to each to-be-uplink energy storage data and having an identification function, and the transaction IDs of different to-be-uplink energy storage data are different, and in addition, the transaction ID may be data included in the to-be-uplink energy storage data or data generated by the block chain according to the to-be-uplink energy storage data.
And 104, acquiring corresponding data from the block chain based on the acquired transaction ID and storing the corresponding data into a second database of the middleware.
In this embodiment, the transaction ID may be queried in the blockchain to obtain corresponding data, and after the corresponding data is found, the corresponding data is subjected to a downlink operation, that is, the corresponding data is obtained from the blockchain, and then the corresponding data is stored in the second database of the middleware, so that a user may compare the to-be-uplink energy storage data in the first database with the corresponding data in the second database (the corresponding data is data corresponding to the to-be-uplink energy storage data obtained from the blockchain based on the transaction ID), and further determine whether the energy storage data on the blockchain has an error.
Optionally, after the obtaining the corresponding data from the block chain based on the obtained transaction ID and storing the corresponding data in the second database of the middleware, the energy storage data management method further includes:
judging whether the energy storage data to be linked in the first database is consistent with the acquired corresponding data;
and if the energy storage data to be linked in the first database is inconsistent with the acquired corresponding data, outputting abnormal prompt information.
Specifically, the query may be performed on the blockchain based on the transaction ID to determine whether the data corresponding to the transaction ID is stored in the blockchain;
if the data corresponding to the transaction ID is not stored in the block chain, the step is ended;
if the data corresponding to the transaction ID is stored in the block chain, judging whether the type of the data corresponding to the transaction ID is one of preset specified types, if not, ending the step, if so, analyzing the data corresponding to the transaction ID, then extracting the data corresponding to the analyzed transaction ID, the data corresponding to the to-be-chain stored energy data, and storing the data corresponding to the to-be-chain stored energy data into a second database of the middleware; it should be noted that the data obtained after analyzing the data corresponding to the transaction ID includes not only the data corresponding to the to-be-linked energy storage data, but also some information (for example, various label information convenient to manage or associated intelligent contract information) automatically added to the information by the blockchain, so that the data corresponding to the analyzed transaction ID needs to be extracted to obtain the data corresponding to the to-be-linked energy storage data.
The querying on the blockchain based on the transaction ID to determine whether the data corresponding to the transaction ID is stored in the blockchain may include:
determining a designated block height based on the transaction ID, and then determining a target block based on a hash value included in a block having the designated block height;
and detecting whether the transaction ID list of the target block contains the transaction ID, if so, determining that the data corresponding to the transaction ID is stored in the block chain, and if not, determining that the data corresponding to the transaction ID is not stored in the block chain.
Specifically, after the corresponding data is obtained from the blockchain based on the obtained transaction ID and the corresponding data are stored in the second database of the middleware, a corresponding prompt is output to inform a user that the energy storage data to be linked and the corresponding data of the transaction ID obtained after the energy storage data to be linked are stored in the blockchain are stored in the first database and the second database respectively.
Optionally, the energy storage data management method further includes:
when a block chain energy storage data request instruction is received, judging whether a user sending the block chain energy storage data request instruction has corresponding authority;
if the user has the corresponding authority, outputting corresponding decrypted energy storage data to the user based on the energy storage data requested by the block chain energy storage data request instruction;
and if the user does not have the corresponding authority, prompting that the user does not have the corresponding authority.
Specifically, a user who stores energy storage data to be linked to a block chain has the corresponding authority of the highest level, the user who has the corresponding authority of the highest level can arbitrarily perform full authorization, partial authorization or permission removal on any other user, the user is fully authorized, that is, the user is granted the corresponding authority to acquire all data of the corresponding data, the user is partially authorized, that is, the user is granted the corresponding authority to acquire partial data of the corresponding data, and the user is granted the corresponding authority to retrieve the user, that is, the corresponding authority to be granted to the user is withdrawn, for example: the energy storage center uploads energy storage data to be linked to the block chain, and the energy storage center can perform the complete authorization, partial authorization or permission removal on nodes or users such as a transaction center, a financial department, a credit department and the like, wherein the complete authorization can be to directly send the transaction ID to a corresponding user, so that the user obtaining the transaction ID can obtain corresponding data from the block chain.
Specifically, the outputting of the decrypted corresponding energy storage data to the user based on the energy storage data requested by the block chain energy storage data request instruction is specifically:
and inquiring and acquiring corresponding block chain energy storage data from the block chain based on the block chain energy storage data request instruction, decrypting the block chain energy storage data, and outputting the decrypted block chain energy storage data to the user.
As can be seen from the above, in the technical scheme of the application, energy storage data to be linked are acquired; storing energy storage data to be linked into a first database of the middleware; performing chain winding operation on the energy storage data to be chain wound so as to store the energy storage data to be chain wound into the block chain and obtain a corresponding transaction ID; based on the obtained transaction ID, corresponding data are obtained from the block chain and stored in a second database of the middleware, so that a user can compare the energy storage data to be linked with the obtained corresponding data to judge whether the obtained corresponding data are changed compared with the energy storage data to be linked, whether the energy storage data on the block chain have errors is further determined, and the reliability of energy storage data management based on the block chain can be effectively improved.
Example two
The present application provides an energy storage data management apparatus based on a block chain, as shown in fig. 2, the energy storage data management apparatus 20 includes:
an obtaining unit 201, configured to obtain energy storage data to be linked;
a first storage unit 202, configured to store the to-be-uplink energy storage data in a first database of the middleware;
an uplink unit 203, configured to perform an uplink operation on the to-be-uplink energy storage data, so as to store the to-be-uplink energy storage data into a block chain and obtain a corresponding transaction ID;
a second storage unit 204, configured to obtain corresponding data from the blockchain based on the obtained transaction ID, and store the corresponding data in a second database of the middleware.
Optionally, the obtaining unit 201 is specifically configured to:
identifying the input energy storage data to determine data needing encryption and data needing no encryption;
encrypting the data to be encrypted;
and taking the data which needs to be encrypted and the data which does not need to be encrypted after encryption processing as the energy storage data to be linked.
Further, the obtaining unit 201 is further specifically configured to:
identifying a target field of the input energy storage data;
and determining data to be encrypted in the input energy storage data based on the target field identified in the input energy storage data.
Further, the target field comprises more than one type of field;
the obtaining unit 201 is further specifically configured to:
determining the importance of each part of data in the data to be encrypted based on the fields of more than one category;
and encrypting each part of data based on an encryption method corresponding to the importance of each part of data.
Optionally, the energy storage data management apparatus 20 further includes:
a downlink unit 205 for:
when a block chain energy storage data request instruction is received, judging whether a user sending the block chain energy storage data request instruction has corresponding authority;
when the user has the corresponding right, based on the energy storage data requested by the block chain energy storage data request instruction, outputting the corresponding decrypted energy storage data to the user;
and when the user does not have the corresponding authority, prompting that the user does not have the corresponding authority.
Optionally, the second storage unit 204 is further configured to:
judging whether the energy storage data to be linked in the first database is consistent with the acquired corresponding data;
and outputting abnormal prompt information when the energy storage data to be linked in the first database is inconsistent with the acquired corresponding data.
As can be seen from the above, in the technical scheme of the application, energy storage data to be linked are acquired; storing energy storage data to be linked into a first database of the middleware; performing chain winding operation on the energy storage data to be chain wound so as to store the energy storage data to be chain wound into the block chain and obtain a corresponding transaction ID; based on the obtained transaction ID, corresponding data are obtained from the block chain and stored in a second database of the middleware, so that a user can compare the energy storage data to be linked with the obtained corresponding data to judge whether the obtained corresponding data are changed compared with the energy storage data to be linked, whether the energy storage data on the block chain have errors is further determined, and the reliability of energy storage data management based on the block chain can be effectively improved.
EXAMPLE III
The present application further provides another energy storage data management device based on a block chain, as shown in fig. 3, the energy storage data management device in the embodiment of the present application includes: a memory 301, a processor 302, and a computer program stored in the memory 301 and executable on the processor 302, wherein: the memory 301 is used to store software programs and modules, the processor 302 executes various functional applications and data processing by operating the software programs and modules stored in the memory 301, and the memory 301 and the processor 302 are connected by a bus 303.
Specifically, the processor 302 implements the following steps by running the above-mentioned computer program stored in the memory 301:
acquiring energy storage data to be linked;
storing the energy storage data to be linked into a first database of the middleware;
performing chain linking operation on the energy storage data to be chain linked so as to store the energy storage data to be chain linked into a block chain and obtain a corresponding transaction ID;
and acquiring corresponding data from the block chain based on the acquired transaction ID and storing the corresponding data into a second database of the middleware.
Assuming that the above is a first possible implementation manner, in a second possible implementation manner based on the first possible implementation manner, the acquiring the to-be-uplink energy storage data includes:
identifying the input energy storage data to determine data needing encryption and data needing no encryption;
encrypting the data to be encrypted;
and taking the data which needs to be encrypted and the data which does not need to be encrypted after encryption processing as the energy storage data to be linked.
In a third possible implementation manner based on the second possible implementation manner, the identifying the input energy storage data to determine the data to be encrypted and the data not to be encrypted includes:
identifying a target field of the input energy storage data;
and determining data to be encrypted in the input energy storage data based on the target field identified in the input energy storage data.
In a fourth possible implementation based on the third possible implementation, the target field includes more than one type of field;
the encrypting the data to be encrypted includes:
determining the importance of each part of data in the data to be encrypted based on the fields of more than one category;
and encrypting each part of data based on an encryption method corresponding to the importance of each part of data.
In a fifth possible implementation manner based on the first, second, third, or fourth possible implementation manner, the energy storage data management method further includes:
when a block chain energy storage data request instruction is received, judging whether a user sending the block chain energy storage data request instruction has corresponding authority;
if the user has the corresponding authority, outputting corresponding decrypted energy storage data to the user based on the energy storage data requested by the block chain energy storage data request instruction;
and if the user does not have the corresponding authority, prompting that the user does not have the corresponding authority.
In a sixth possible implementation manner based on the first or second or third or fourth possible implementation manner, after the obtaining corresponding data from the block chain based on the obtained transaction ID and storing the data in the second database of the middleware, the energy storage data management method further includes:
judging whether the energy storage data to be linked in the first database is consistent with the acquired corresponding data;
and if the energy storage data to be linked in the first database is inconsistent with the acquired corresponding data, outputting abnormal prompt information.
As can be seen from the above, in the technical scheme of the application, energy storage data to be linked are acquired; storing energy storage data to be linked into a first database of the middleware; performing chain winding operation on the energy storage data to be chain wound so as to store the energy storage data to be chain wound into the block chain and obtain a corresponding transaction ID; based on the obtained transaction ID, corresponding data are obtained from the block chain and stored in a second database of the middleware, so that a user can compare the energy storage data to be linked with the obtained corresponding data to judge whether the obtained corresponding data are changed compared with the energy storage data to be linked, whether the energy storage data on the block chain have errors is further determined, and the reliability of energy storage data management based on the block chain can be effectively improved.
Example four
The present application also provides a computer readable storage medium having a computer program stored thereon, which when executed, can implement the steps provided by the above-described embodiments. Specifically, the computer program includes computer program code, which may be in one of a source code form, an object code form, an executable file or some intermediate form, and is not limited herein; the computer readable storage medium can be any entity or device capable of carrying the above computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a Random Access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium, and is not limited herein. It should be noted that the contents contained in the computer-readable storage medium can be increased or decreased as required by legislation and patent practice in the jurisdiction.
As can be seen from the above, in the technical scheme of the application, energy storage data to be linked are acquired; storing energy storage data to be linked into a first database of the middleware; performing chain winding operation on the energy storage data to be chain wound so as to store the energy storage data to be chain wound into the block chain and obtain a corresponding transaction ID; based on the obtained transaction ID, corresponding data are obtained from the block chain and stored in a second database of the middleware, so that a user can compare the energy storage data to be linked with the obtained corresponding data to judge whether the obtained corresponding data are changed compared with the energy storage data to be linked, whether the energy storage data on the block chain have errors is further determined, and the reliability of energy storage data management based on the block chain can be effectively improved.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned functions may be distributed as different functional units and modules according to needs, that is, the internal structure of the apparatus may be divided into different functional units or modules to implement all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
It should be noted that, the methods and the details thereof provided by the foregoing embodiments may be combined with the apparatuses and devices provided by the embodiments, which are referred to each other and are not described again.
Those of ordinary skill in the art would appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described apparatus/device embodiments are merely illustrative, and for example, the division of the above-described modules or units is only one logical functional division, and the actual implementation may be implemented by another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A block chain-based energy storage data management method is characterized by comprising the following steps:
acquiring energy storage data to be linked;
storing the energy storage data to be linked into a first database of the middleware;
performing chain winding operation on the energy storage data to be chain wound so as to store the energy storage data to be chain wound into a block chain and obtain a corresponding transaction ID;
and acquiring corresponding data from the block chain based on the acquired transaction ID and storing the corresponding data in a second database of the middleware.
2. The energy storage data management method according to claim 1, wherein the acquiring energy storage data to be uplink comprises:
identifying the input energy storage data to determine data needing encryption and data needing no encryption;
encrypting the data to be encrypted;
and taking the encrypted data needing to be encrypted and the encrypted data not needing to be encrypted as the energy storage data to be linked.
3. The energy storage data management method according to claim 2, wherein the identifying the input energy storage data to determine the data to be encrypted and the data not to be encrypted comprises:
identifying a target field of the input energy storage data;
and determining data to be encrypted in the input energy storage data based on the identified target field in the input energy storage data.
4. The energy storage data management method according to claim 3, wherein the target field comprises more than one category of field;
the encrypting the data to be encrypted comprises:
determining the importance of each part of data in the data to be encrypted based on the fields of more than one category;
the partial data are encrypted based on an encryption method corresponding to the importance of the partial data, respectively.
5. The energy storage data management method according to any one of claims 1 to 4, further comprising:
when a block chain energy storage data request instruction is received, judging whether a user sending the block chain energy storage data request instruction has corresponding authority;
if the user has the corresponding authority, outputting the corresponding decrypted energy storage data to the user based on the energy storage data requested by the block chain energy storage data request instruction;
and if the user does not have the corresponding authority, prompting that the user does not have the corresponding authority.
6. The energy storage data management method according to any one of claims 1 to 4, wherein after acquiring the corresponding data from the blockchain and storing the corresponding data in the second database of the middleware based on the acquired transaction ID, the energy storage data management method further comprises:
judging whether the energy storage data to be linked in the first database is consistent with the acquired corresponding data;
and if the energy storage data to be uplink in the first database is inconsistent with the acquired corresponding data, outputting abnormal prompt information.
7. An energy storage data management device based on a block chain, comprising:
the acquiring unit is used for acquiring energy storage data to be linked;
the first storage unit is used for storing the energy storage data to be linked into a first database of the middleware;
the uplink unit is used for performing uplink operation on the energy storage data to be uplink so as to store the energy storage data to be uplink into a block chain and obtain a corresponding transaction ID;
and the second storage unit is used for acquiring corresponding data from the block chain and storing the corresponding data into a second database of the middleware based on the acquired transaction ID.
8. The energy storage data management device according to claim 7, wherein the obtaining unit is specifically configured to:
identifying the input energy storage data to determine data needing encryption and data needing no encryption;
encrypting the data to be encrypted;
and taking the encrypted data needing to be encrypted and the encrypted data not needing to be encrypted as the energy storage data to be linked.
9. A block chain based energy storage data management apparatus, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method according to any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium having a computer program, the computer program, when being executed by a processor, is adapted to carry out the steps of the method of any one of claims 1 to 6.
CN202011374871.1A 2020-11-30 2020-11-30 Energy storage data management method based on block chain and related device Pending CN112560052A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011374871.1A CN112560052A (en) 2020-11-30 2020-11-30 Energy storage data management method based on block chain and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011374871.1A CN112560052A (en) 2020-11-30 2020-11-30 Energy storage data management method based on block chain and related device

Publications (1)

Publication Number Publication Date
CN112560052A true CN112560052A (en) 2021-03-26

Family

ID=75046709

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011374871.1A Pending CN112560052A (en) 2020-11-30 2020-11-30 Energy storage data management method based on block chain and related device

Country Status (1)

Country Link
CN (1) CN112560052A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107657059A (en) * 2017-10-20 2018-02-02 中国银行股份有限公司 Method of data synchronization, middleware and system based on block chain application system
CN108573381A (en) * 2017-03-09 2018-09-25 北京京东尚科信息技术有限公司 Data processing method and device
CN110264193A (en) * 2019-05-20 2019-09-20 阿里巴巴集团控股有限公司 In conjunction with the receipt storage method and node of user type and type of transaction
CN111090647A (en) * 2019-11-11 2020-05-01 武汉大学 Food tracing method based on block chain
CN111274252A (en) * 2020-01-08 2020-06-12 平安科技(深圳)有限公司 Block chain data chaining method, device, storage medium and server
WO2020186807A1 (en) * 2019-03-15 2020-09-24 南瑞集团有限公司 System and method for power data linking based on blockchain technology

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108573381A (en) * 2017-03-09 2018-09-25 北京京东尚科信息技术有限公司 Data processing method and device
CN107657059A (en) * 2017-10-20 2018-02-02 中国银行股份有限公司 Method of data synchronization, middleware and system based on block chain application system
WO2020186807A1 (en) * 2019-03-15 2020-09-24 南瑞集团有限公司 System and method for power data linking based on blockchain technology
CN110264193A (en) * 2019-05-20 2019-09-20 阿里巴巴集团控股有限公司 In conjunction with the receipt storage method and node of user type and type of transaction
CN111090647A (en) * 2019-11-11 2020-05-01 武汉大学 Food tracing method based on block chain
CN111274252A (en) * 2020-01-08 2020-06-12 平安科技(深圳)有限公司 Block chain data chaining method, device, storage medium and server

Similar Documents

Publication Publication Date Title
CN109189367B (en) Data processing method, device, server and storage medium
CN109657107B (en) Terminal matching method and device based on third-party application
CN112527816A (en) Data blood relationship analysis method, system, computer device and storage medium
CN112823503B (en) Data access method, data access device and mobile terminal
CN114003559A (en) Log access method, device and equipment and computer readable storage medium
CN111475823A (en) Data sharing method, equipment, server and readable storage medium
CN114398623A (en) Method for determining security policy
CN112214270B (en) Page redrawing method, device, equipment and storage medium
CN111090616B (en) File management method, corresponding device, equipment and storage medium
CN112163036A (en) Block chain information construction and query method and related device
CN112182509A (en) Method, device and equipment for detecting abnormity of compliance data
CN112560052A (en) Energy storage data management method based on block chain and related device
CN114928756B (en) Video data protection, encryption and verification method, system and equipment
WO2023178792A1 (en) Ciphertext data storage method and apparatus, and device and storage medium
CN111651425A (en) Data extraction method and device for data mart, terminal and storage medium
CN109495444B (en) Encryption request processing method
CN111935546B (en) Program importing method and device, video playing equipment and storage medium
CN116484326B (en) Multi-account access authority management method and related device based on NFT
CN117540439B (en) Method and device for automatically authorizing number writing of equipment, storage medium and electronic equipment
CN112910654B (en) Private key management method, system, equipment and storage medium
CN115829186B (en) ERP management method based on artificial intelligence and data processing AI system
CN112307489B (en) Character display method, device, electronic equipment and computer readable storage medium
CN114978723B (en) Safety authentication method for programmable logic controller
CN117708871B (en) Data retrieval method and data storage method based on encryption storage
CN108933765B (en) Method, client and server for improving equipment ID security

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20210528

Address after: 518000 1203, building a, Pioneer Park, Silicon Valley University Town, Shenzhen, Guangdong Province

Applicant after: WEALEDGER NETWORK TECHNOLOGIES Co.,Ltd.

Applicant after: STATE GRID QINGHAI ELECTRIC POWER Co.

Address before: 518000 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Applicant before: WEALEDGER NETWORK TECHNOLOGIES Co.,Ltd.

TA01 Transfer of patent application right