CN112926985A - Power data management method and system based on block chain intelligent contract - Google Patents

Power data management method and system based on block chain intelligent contract Download PDF

Info

Publication number
CN112926985A
CN112926985A CN202110444497.6A CN202110444497A CN112926985A CN 112926985 A CN112926985 A CN 112926985A CN 202110444497 A CN202110444497 A CN 202110444497A CN 112926985 A CN112926985 A CN 112926985A
Authority
CN
China
Prior art keywords
power data
data
power
intelligent contract
module
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
CN202110444497.6A
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.)
Suzhou Heshu Blockchain Application Research Institute Co ltd
Shanghai Heshu Software Co ltd
Original Assignee
Suzhou Heshu Blockchain Application Research Institute Co ltd
Shanghai Heshu Software 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 Suzhou Heshu Blockchain Application Research Institute Co ltd, Shanghai Heshu Software Co ltd filed Critical Suzhou Heshu Blockchain Application Research Institute Co ltd
Priority to CN202110444497.6A priority Critical patent/CN112926985A/en
Publication of CN112926985A publication Critical patent/CN112926985A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3827Use of message hashing
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • 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
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S50/00Market activities related to the operation of systems integrating technologies related to power network operation or related to communication or information technologies
    • Y04S50/12Billing, invoicing, buying or selling transactions or other related activities, e.g. cost or usage evaluation

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Theoretical Computer Science (AREA)
  • Strategic Management (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Economics (AREA)
  • Health & Medical Sciences (AREA)
  • Finance (AREA)
  • Primary Health Care (AREA)
  • Marketing (AREA)
  • Tourism & Hospitality (AREA)
  • Human Resources & Organizations (AREA)
  • General Health & Medical Sciences (AREA)
  • Water Supply & Treatment (AREA)
  • Public Health (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a power data management method based on a block chain intelligent contract, which comprises the following steps: acquiring basic information of a concurrent power terminal, sending the basic information to a block chain, and giving a hash address corresponding to the power terminal; encrypting the power data through the hash address of the corresponding power terminal, generating and sending the encrypted power data to an intelligent contract preset in the block chain; acquiring a power data access request; matching the account address with an access authority account list in the intelligent contract to generate matching information; extracting corresponding encrypted power data in the intelligent contract according to the matching information and the power data in the power data access request; and decrypting the encrypted power data according to the hash address. Relate to power management technical field. The invention also discloses a power data management system based on the intelligent block chain contract. The invention carries out safe and effective management on the power data based on the intelligent contract and meets the management requirement of the power data.

Description

Power data management method and system based on block chain intelligent contract
Technical Field
The invention relates to the technical field of power management, in particular to a power data management method and system based on a block chain intelligent contract.
Background
The block chain technology is to utilize a block chain type data structure to verify and store data, utilize a distributed node consensus algorithm to generate and update data, and utilize a cryptographic mode to ensure the safety of data transmission and access. The block chain technology adopts decentralization, so that the block chain technology has application advantages of public and credible performances and the like.
Currently, the blockchain technology can be applied to the technical field of renewable energy power. Renewable energy power technology is technology for generating electricity by renewable energy sources including, for example, wind energy, water energy, solar energy, and the like. With the rapid development of the internet of things and the artificial intelligence technology, the renewable energy power transaction scale is gradually increased, the transaction modes are various, the power transaction data are more diversified and the quantity is more huge, and the traditional power data management mode is not enough to meet the management requirement of the renewable energy power.
Disclosure of Invention
In order to overcome the above problems or at least partially solve the above problems, embodiments of the present invention provide a power data management method and system based on a block chain intelligent contract, which perform safe and effective management on power data based on the intelligent contract, and meet the management requirement of the power data.
The embodiment of the invention is realized by the following steps:
in a first aspect, an embodiment of the present invention provides a power data management method based on a block chain intelligent contract, including the following steps:
acquiring basic information of a concurrent power terminal, sending the basic information to a block chain, and giving a hash address corresponding to the power terminal;
acquiring power data of the power terminal, encrypting the power data through a hash address of the corresponding power terminal, generating and sending the encrypted power data to an intelligent contract preset in a block chain;
acquiring a power data access request;
matching the account address in the power data access request with the access authority account list in the intelligent contract to generate matching information;
extracting corresponding encrypted power data in the intelligent contract according to the matching information and the power data in the power data access request;
and decrypting the encrypted power data according to the Hash address to obtain and send the decrypted power data.
In order to ensure accurate management of different power terminals, basic information of each power terminal is acquired, the basic information comprises information such as the position, the model, the type and the number of the power terminal, the basic information is uploaded to a block chain, a hash address of a unique identifier corresponding to each power terminal is given through the block chain, and the hash address is used as a public key of the power terminal, so that power data of the power terminal can be encrypted later. The method comprises the steps of obtaining power data of each power terminal, encrypting the power data through a Hash address, ensuring data transmission safety, and simultaneously facilitating subsequent searching of the corresponding power terminal; the electric power data comprise electric quantity transaction data, electric power user data, electric power environment data and the like, comprehensive electric power data are obtained, the electric power data of the electric power terminal are comprehensively managed, and the management accuracy is improved. The encrypted power data are uploaded to an intelligent contract with preset contract conditions of a block chain, the data are encrypted and stored, the power data can be acquired only by starting a trigger condition, and the storage safety of the data is further ensured. When a user wants to check the power data, after a power data access request of the user is obtained, an account address in the power data request is extracted, the account address is matched with an account in an access authority account list which is pre-recorded in an intelligent contract, whether the account has access authority or not is judged, after the account is successfully matched, corresponding encrypted power data in the intelligent contract is extracted according to the power data in the power data access request, and the data is decrypted and sent to the corresponding user.
The method is used for carrying out safe and effective management on the power data based on the intelligent contract, meets the management requirement of the power data, and limits the user access authority by only being accessed by certain specific users with evidence storage requirements without facing the whole network nodes of the block chain, thereby avoiding the data from being acquired by other users and reducing the data leakage risk.
Based on the first aspect, in some embodiments of the present invention, the above method for matching the account address in the power data access request with the access authority account list in the intelligent contract, and generating matching information includes the following steps:
extracting an account address in the power data access request;
matching the account address with an access authority account list in the intelligent contract, judging whether the matching is successful, and if so, generating matching success information; and if not, generating and sending the no-permission prompt message.
Based on the first aspect, in some embodiments of the present invention, the method for extracting the corresponding encrypted power data in the smart contract according to the matching information and the power data in the power data access request includes the following steps:
giving data access authority to a corresponding user according to matching success information in the matching information and user information in the power data access request, and generating contract triggering information;
and extracting corresponding encrypted power data in the intelligent contract according to the contract trigger information and the power data in the power data access request.
Based on the first aspect, in some embodiments of the present invention, before the step of encrypting the power data by the hash address of the corresponding power terminal, the following steps are further included:
setting a data acquisition period, and generating a random sequence corresponding to each period according to the data acquisition period;
and extracting a corresponding random sequence according to the time information in the power data of the power terminal to encrypt the power data and generate initial encrypted power data.
In a second aspect, an embodiment of the present invention provides an electric power data management system based on a block chain intelligent contract, including an electric power terminal module, a data encryption module, a request acquisition module, a permission matching module, a data extraction module, and a data decryption module, where:
the power terminal module is used for acquiring and transmitting basic information of the power terminal to the block chain and giving a hash address corresponding to the power terminal;
the data encryption module is used for acquiring power data of the power terminal, encrypting the power data through a corresponding hash address of the power terminal, generating and sending the encrypted power data to an intelligent contract preset in the block chain;
the request acquisition module is used for acquiring an electric power data access request;
the authority matching module is used for matching the account address in the power data access request with the access authority account list in the intelligent contract to generate matching information;
the data extraction module is used for extracting corresponding encrypted power data in the intelligent contract according to the matching information and the power data in the power data access request;
and the data decryption module is used for decrypting the encrypted power data according to the hash address so as to obtain and send the decrypted power data.
In order to ensure accurate management of different power terminals, basic information of each power terminal is acquired through a power terminal module, the basic information comprises information such as the position, the model, the type and the number of the power terminal, the basic information is uploaded to a block chain, a hash address of a unique identifier corresponding to each power terminal is given through the block chain, and the hash address is used as a public key of the power terminal so as to encrypt power data of the power terminal in the subsequent process. The method comprises the steps that electric power data of each electric power terminal are obtained, the data encryption module encrypts the electric power data through a Hash address, the data transmission safety is guaranteed, and meanwhile, the corresponding electric power terminal can be found out in the following process; the electric power data comprise electric quantity transaction data, electric power user data, electric power environment data and the like, comprehensive electric power data are obtained, the electric power data of the electric power terminal are comprehensively managed, and the management accuracy is improved. The encrypted power data are uploaded to an intelligent contract with preset contract conditions of a block chain, the data are encrypted and stored, the power data can be acquired only by starting a trigger condition, and the storage safety of the data is further ensured. When a user wants to check power data, the request acquisition module acquires a power data access request of the user and extracts an account address in the power data request, the authority matching module matches the account address with an account in an access authority account list pre-recorded in an intelligent contract to see whether the account has access authority, after the matching is successful, the data extraction module extracts corresponding encrypted power data in the intelligent contract according to the power data in the power data access request, and the data decryption module decrypts the data and sends the decrypted data to the corresponding user.
The system carries out safe and effective management on the power data based on the intelligent contract, meets the management requirement of the power data, and the intelligent contract credible deposit certificate of the method can not face to the whole network nodes of the block chain, but is only accessed by certain specific users with deposit certificate requirements, limits the user access authority, avoids the data being acquired by other users, and reduces the data leakage risk.
Based on the second aspect, in some embodiments of the present invention, the permission matching module includes an address extracting sub-module and a determining sub-module, where:
the address extraction submodule is used for extracting an account address in the power data access request;
the judging submodule is used for matching the account address with the access authority account list in the intelligent contract, judging whether the matching is successful or not, and if so, generating matching success information; and if not, generating and sending the no-permission prompt message.
Based on the second aspect, in some embodiments of the present invention, the data extraction module includes a permission granting sub-module and a contract triggering sub-module, where:
the authority endowing sub-module is used for endowing the data access authority of the corresponding user according to the matching success information in the matching information and the user information in the power data access request and generating contract triggering information;
and the contract triggering submodule is used for extracting corresponding encrypted power data in the intelligent contract according to the contract triggering information and the power data in the power data access request.
Based on the second aspect, in some embodiments of the present invention, the power data management system based on the blockchain intelligent contract further includes a random sequence module and an initial encryption module, wherein:
the random sequence module is used for setting a data acquisition period and generating a random sequence corresponding to each period according to the data acquisition period;
and the initial encryption module is used for extracting a corresponding random sequence according to the time information in the power data of the power terminal to encrypt the power data and generate initial encrypted power data.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a memory for storing one or more programs; a processor. The program or programs, when executed by a processor, implement the method of any of the first aspects as described above.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the method according to any one of the first aspect described above.
The embodiment of the invention at least has the following advantages or beneficial effects:
the embodiment of the invention provides a power data management method and system based on a block chain intelligent contract, which aim to ensure that different power terminals are accurately managed, basic information of each power terminal is obtained, and a hash address of a unique identifier corresponding to each power terminal is given to each power terminal through a block chain; the power data are encrypted through the Hash address, and data transmission safety is guaranteed. The encrypted power data are uploaded to an intelligent contract with preset contract conditions of a block chain, the data are encrypted and stored, the power data can be acquired only by starting a trigger condition, and the storage safety of the data is further ensured. And when the user wants to check the power data, whether the account has the access authority is checked, after the matching is successful, the corresponding encrypted power data in the intelligent contract is extracted according to the power data in the power data access request, and the data is decrypted and then sent to the corresponding user. The method carries out safe and effective management on the power data based on the intelligent contract, meets the management requirement of the power data, and the intelligent contract credible deposit certificate of the method can not face to the whole network node of the block chain, but is only accessed by certain specific users with deposit certificate requirements, limits the user access authority, avoids the data being acquired by other users, and reduces the data leakage risk.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a flowchart of a power data management method based on a block chain intelligent contract according to an embodiment of the present invention;
fig. 2 is a schematic block diagram of an electric power data management system based on a block chain intelligent contract according to an embodiment of the present invention;
fig. 3 is a block diagram of an electronic device according to an embodiment of the present invention.
Icon: 100. a power terminal module; 200. a data encryption module; 300. a request acquisition module; 400. an authority matching module; 410. an address extraction submodule; 420. a judgment submodule; 500. a data extraction module; 510. a limit assignment submodule; 520. a contract trigger submodule; 600. a data decryption module; 700. a random sequence module; 800. an initial encryption module; 101. a memory; 102. a processor; 103. a communication interface.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. 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 invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Examples
As shown in fig. 1, in a first aspect, an embodiment of the present invention provides a power data management method based on a blockchain intelligent contract, including the following steps:
s1, acquiring and transmitting basic information of the power terminal to a block chain, and giving a hash address corresponding to the power terminal;
in some embodiments of the present invention, in order to ensure accurate management of different power terminals, basic information of each power terminal is obtained, where the basic information includes information such as a position, a model, a type, and a serial number of the power terminal, and the basic information is uploaded to a block chain, and a hash address of a unique identifier corresponding to each power terminal is given by the block chain, and the hash address is used as a public key of the power terminal, so as to encrypt power data of the power terminal in the following process.
S2, acquiring power data of the power terminal, encrypting the power data through the corresponding hash address of the power terminal, generating and sending the encrypted power data to an intelligent contract preset in the block chain;
in some embodiments of the invention, the electric power data of each electric power terminal is acquired, and the electric power data is encrypted through the hash address, so that the data transmission safety is ensured, and meanwhile, the corresponding electric power terminal is conveniently searched in the following process; the electric power data comprise electric quantity transaction data, electric power user data, electric power environment data and the like, comprehensive electric power data are obtained, the electric power data of the electric power terminal are comprehensively managed, and the management accuracy is improved. The encrypted power data are uploaded to an intelligent contract with preset contract conditions of a block chain, the data are encrypted and stored, the power data can be acquired only by starting a trigger condition, and the storage safety of the data is further ensured.
S3, acquiring a power data access request; the power data access request comprises information such as user information, power equipment information, power data and an account address.
S4, matching the account address in the power data access request with the access authority account list in the intelligent contract to generate matching information;
in some embodiments of the present invention, when a user wants to check power data and obtain a power data access request of the user, an account address in the power data request is extracted, and the account address is matched with an account in an access authority account list pre-entered in an intelligent contract to see whether the account has an access authority.
S5, extracting corresponding encrypted power data in the intelligent contract according to the matching information and the power data in the power data access request;
and S6, decrypting the encrypted power data according to the hash address to obtain and send decrypted power data.
In some embodiments of the present invention, after the matching is successful, the corresponding encrypted power data in the intelligent contract is extracted according to the power data in the power data access request, and the data is decrypted and then sent to the corresponding user.
The method is used for carrying out safe and effective management on the power data based on the intelligent contract, meets the management requirement of the power data, and limits the user access authority by only being accessed by certain specific users with evidence storage requirements without facing the whole network nodes of the block chain, thereby avoiding the data from being acquired by other users and reducing the data leakage risk.
Based on the first aspect, in some embodiments of the present invention, the above method for matching the account address in the power data access request with the access authority account list in the intelligent contract, and generating matching information includes the following steps:
extracting an account address in the power data access request;
matching the account address with an access authority account list in the intelligent contract, judging whether the matching is successful, and if so, generating matching success information; and if not, generating and sending the no-permission prompt message.
In order to ensure that the power data is managed more safely, the authority qualification of a user to be accessed is checked, whether an account address in a power data access request is in an access authority account list in a preset intelligent contract or not is judged, if yes, matching success information is generated, and the user is proved to have the access authority; if the intelligent contract does not exist, the user is indicated to have no access right, no-right prompt information is generated and sent, and the intelligent contract is not triggered later and data is not sent.
Based on the first aspect, in some embodiments of the present invention, the method for extracting the corresponding encrypted power data in the smart contract according to the matching information and the power data in the power data access request includes the following steps:
giving data access authority to a corresponding user according to matching success information in the matching information and user information in the power data access request, and generating contract triggering information;
and extracting corresponding encrypted power data in the intelligent contract according to the contract trigger information and the power data in the power data access request.
After the matching is successful, the user requesting to view the data is proved to have the access right, the data access right is endowed to the corresponding user, a contract trigger signal is generated, the intelligent contract is triggered to open the data access right, and the corresponding encrypted power data is extracted.
Based on the first aspect, in some embodiments of the present invention, before the step of encrypting the power data by the hash address of the corresponding power terminal, the following steps are further included:
setting a data acquisition period, and generating a random sequence corresponding to each period according to the data acquisition period;
and extracting a corresponding random sequence according to the time information in the power data of the power terminal to encrypt the power data and generate initial encrypted power data.
In order to further ensure the transmission security of the power data, before the power data is encrypted through the Hash address, a data acquisition period is preset, the power data acquired in each acquisition period is initially encrypted through a corresponding random sequence to obtain initial encrypted power data, and then the initial encrypted power data is encrypted through the Hash address and then uploaded to an intelligent contract. And subsequently, when decryption is carried out, the random sequence is sent to a corresponding user, and then the data is decrypted.
As shown in fig. 2, in a second aspect, an embodiment of the present invention provides an electric power data management system based on a blockchain intelligent contract, including an electric power terminal module 100, a data encryption module 200, a request obtaining module 300, an authority matching module 400, a data extraction module 500, and a data decryption module 600, where:
the power terminal module 100 is configured to acquire and transmit basic information of the power terminal to a block chain, and assign a hash address to the corresponding power terminal;
the data encryption module 200 is configured to acquire power data of the power terminal, encrypt the power data through a hash address of the corresponding power terminal, generate and send the encrypted power data to an intelligent contract preset in the block chain;
a request obtaining module 300, configured to obtain an access request of power data;
the authority matching module 400 is used for matching the account address in the power data access request with the access authority account list in the intelligent contract to generate matching information;
the data extraction module 500 is used for extracting corresponding encrypted power data in the intelligent contract according to the matching information and the power data in the power data access request;
and the data decryption module 600 is configured to decrypt the encrypted power data according to the hash address to obtain and send decrypted power data.
In order to ensure accurate management of different power terminals, the power terminal module 100 acquires basic information of each power terminal, where the basic information includes information such as a position, a model, a type, and a serial number of the power terminal, and uploads the basic information to a block chain, and a hash address of a unique identifier corresponding to each power terminal is given by the block chain, and the hash address is used as a public key of the power terminal, so that power data of the power terminal can be encrypted later. Acquiring power data of each power terminal, encrypting the power data through a hash address by the data encryption module 200 to ensure data transmission safety and simultaneously searching the corresponding power terminal in the following process; the electric power data comprise electric quantity transaction data, electric power user data, electric power environment data and the like, comprehensive electric power data are obtained, the electric power data of the electric power terminal are comprehensively managed, and the management accuracy is improved. The encrypted power data are uploaded to an intelligent contract with preset contract conditions of a block chain, the data are encrypted and stored, the power data can be acquired only by starting a trigger condition, and the storage safety of the data is further ensured. When a user wants to check power data, the request acquisition module 300 acquires a power data access request of the user and extracts an account address in the power data request, the authority matching module 400 matches the account address with an account in an access authority account list pre-recorded in an intelligent contract to see whether the account has an access authority, after the matching is successful, the data extraction module 500 extracts encrypted power data corresponding to the intelligent contract according to the power data in the power data access request, and the data decryption module 600 decrypts the data and sends the decrypted data to the corresponding user.
The system carries out safe and effective management on the power data based on the intelligent contract, meets the management requirement of the power data, and the intelligent contract credible deposit certificate of the method can not face to the whole network nodes of the block chain, but is only accessed by certain specific users with deposit certificate requirements, limits the user access authority, avoids the data being acquired by other users, and reduces the data leakage risk.
As shown in fig. 2, based on the second aspect, in some embodiments of the present invention, the permission matching module 400 includes an address extracting sub-module 410 and a determining sub-module 420, where:
the address extraction submodule 410 is used for extracting an account address in the power data access request;
the judging submodule 420 is configured to match the account address with an access authority account list in the intelligent contract, judge whether matching is successful, and if so, generate matching success information; and if not, generating and sending the no-permission prompt message.
In order to ensure that the power data is managed more safely, the authority qualification of the user to be accessed is checked, the judgment submodule 420 judges whether the account address in the power data access request is in the access authority account list in the preset intelligent contract or not, if yes, matching success information is generated, and the user is proved to have the access authority; if the intelligent contract does not exist, the user is indicated to have no access right, no-right prompt information is generated and sent, and the intelligent contract is not triggered later and data is not sent.
Based on the second aspect, in some embodiments of the present invention, as shown in fig. 2, the data extraction module 500 includes a permission granting sub-module 510 and a contract triggering sub-module 520, wherein:
the authority endowing sub-module 510 is used for endowing the data access authority of the corresponding user according to the matching success information in the matching information and the user information in the power data access request, and generating contract triggering information;
and the contract triggering submodule 520 is used for extracting corresponding encrypted power data in the intelligent contract according to the contract triggering information and the power data in the power data access request.
After the matching is successful, the user requesting to view the data is proved to have access authority, the data access authority is endowed to the corresponding user through the authority endowing sub-module 510, a contract trigger signal is generated, then, the contract trigger sub-module 520 triggers the intelligent contract to open the data access authority, and the corresponding encrypted power data is extracted.
As shown in fig. 2, according to the second aspect, in some embodiments of the present invention, the power data management system based on the blockchain intelligent contract further includes a random sequence module 700 and an initial encryption module 800, where:
a random sequence module 700, configured to set a data acquisition period, and generate a random sequence corresponding to each period according to the data acquisition period;
the initial encryption module 800 is configured to extract a corresponding random sequence according to time information in the power data of the power terminal to encrypt the power data, so as to generate initial encrypted power data.
In order to further ensure the transmission security of the power data, before the power data is encrypted by the hash address, a data acquisition cycle is preset by the random sequence module 700, a random sequence is generated, the power data acquired in each acquisition cycle is initially encrypted by the initial encryption module 800 through the corresponding random sequence to obtain initial encrypted power data, and then the initial encrypted power data is encrypted by the hash address and uploaded to the intelligent contract. And subsequently, when decryption is carried out, the random sequence is sent to a corresponding user, and then the data is decrypted.
As shown in fig. 3, in a third aspect, an embodiment of the present application provides an electronic device, which includes a memory 101 for storing one or more programs; a processor 102. The one or more programs, when executed by the processor 102, implement the method of any of the first aspects as described above.
Also included is a communication interface 103, and the memory 101, processor 102 and communication interface 103 are electrically connected to each other, directly or indirectly, to enable transfer or interaction of data. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The memory 101 may be used to store software programs and modules, and the processor 102 executes the software programs and modules stored in the memory 101 to thereby execute various functional applications and data processing. The communication interface 103 may be used for communicating signaling or data with other node devices.
The Memory 101 may be, but is not limited to, a Random Access Memory 101 (RAM), a Read Only Memory 101 (ROM), a Programmable Read Only Memory 101 (PROM), an Erasable Read Only Memory 101 (EPROM), an electrically Erasable Read Only Memory 101 (EEPROM), and the like.
The processor 102 may be an integrated circuit chip having signal processing capabilities. The Processor 102 may be a general-purpose Processor 102, including a Central Processing Unit (CPU) 102, a Network Processor 102 (NP), and the like; but may also be a Digital Signal processor 102 (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware components.
In the embodiments provided in the present application, it should be understood that the disclosed method and system and method can be implemented in other ways. The method and system embodiments described above are merely illustrative, for example, the flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of methods and systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored, which, when executed by the processor 102, implements the method according to any one of the first aspect described above. The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory 101 (ROM), a Random Access Memory 101 (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above is only a preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes will occur to those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
It will be evident to those skilled in the art that the present application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.

Claims (10)

1. A power data management method based on a block chain intelligent contract is characterized by comprising the following steps:
acquiring basic information of a concurrent power terminal, sending the basic information to a block chain, and giving a hash address corresponding to the power terminal;
acquiring power data of the power terminal, encrypting the power data through a hash address of the corresponding power terminal, generating and sending the encrypted power data to an intelligent contract preset in a block chain;
acquiring a power data access request;
matching the account address in the power data access request with the access authority account list in the intelligent contract to generate matching information;
extracting corresponding encrypted power data in the intelligent contract according to the matching information and the power data in the power data access request;
and decrypting the encrypted power data according to the Hash address to obtain and send the decrypted power data.
2. The method for power data management based on the blockchain intelligent contract according to claim 1, wherein the method for matching the account address in the power data access request with the access authority account list in the intelligent contract to generate matching information comprises the following steps:
extracting an account address in the power data access request;
matching the account address with an access authority account list in the intelligent contract, judging whether the matching is successful, and if so, generating matching success information; and if not, generating and sending the no-permission prompt message.
3. The power data management method based on the blockchain intelligent contract according to claim 1, wherein the method for extracting the corresponding encrypted power data in the intelligent contract according to the matching information and the power data in the power data access request comprises the following steps:
giving data access authority to a corresponding user according to matching success information in the matching information and user information in the power data access request, and generating contract triggering information;
and extracting corresponding encrypted power data in the intelligent contract according to the contract trigger information and the power data in the power data access request.
4. The method for power data management based on the blockchain intelligent contract according to claim 1, wherein the step of encrypting the power data through the hash address of the corresponding power terminal is preceded by the steps of:
setting a data acquisition period, and generating a random sequence corresponding to each period according to the data acquisition period;
and extracting a corresponding random sequence according to the time information in the power data of the power terminal to encrypt the power data and generate initial encrypted power data.
5. The utility model provides an electric power data management system based on intelligent contract of block chain which characterized in that, includes electric power terminal module, data encryption module, request acquisition module, authority matching module, data extraction module and data decryption module, wherein:
the power terminal module is used for acquiring and transmitting basic information of the power terminal to the block chain and giving a hash address corresponding to the power terminal;
the data encryption module is used for acquiring power data of the power terminal, encrypting the power data through a corresponding hash address of the power terminal, generating and sending the encrypted power data to an intelligent contract preset in the block chain;
the request acquisition module is used for acquiring an electric power data access request;
the authority matching module is used for matching the account address in the power data access request with the access authority account list in the intelligent contract to generate matching information;
the data extraction module is used for extracting corresponding encrypted power data in the intelligent contract according to the matching information and the power data in the power data access request;
and the data decryption module is used for decrypting the encrypted power data according to the hash address so as to obtain and send the decrypted power data.
6. The system for power data management based on the intelligent block chain contract as claimed in claim 5, wherein the permission matching module comprises an address extraction sub-module and a judgment sub-module, wherein:
the address extraction submodule is used for extracting an account address in the power data access request;
the judging submodule is used for matching the account address with the access authority account list in the intelligent contract, judging whether the matching is successful or not, and if so, generating matching success information; and if not, generating and sending the no-permission prompt message.
7. The system of claim 5, wherein the data extraction module comprises a permission granting sub-module and a contract triggering sub-module, wherein:
the authority endowing sub-module is used for endowing the data access authority of the corresponding user according to the matching success information in the matching information and the user information in the power data access request and generating contract triggering information;
and the contract triggering submodule is used for extracting corresponding encrypted power data in the intelligent contract according to the contract triggering information and the power data in the power data access request.
8. The system for power data management based on the blockchain intelligent contract according to claim 5, further comprising a random sequence module and an initial encryption module, wherein:
the random sequence module is used for setting a data acquisition period and generating a random sequence corresponding to each period according to the data acquisition period;
and the initial encryption module is used for extracting a corresponding random sequence according to the time information in the power data of the power terminal to encrypt the power data and generate initial encrypted power data.
9. An electronic device, comprising:
a memory for storing one or more programs;
a processor;
the one or more programs, when executed by the processor, implement the method of any of claims 1-4.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-4.
CN202110444497.6A 2021-04-23 2021-04-23 Power data management method and system based on block chain intelligent contract Pending CN112926985A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110444497.6A CN112926985A (en) 2021-04-23 2021-04-23 Power data management method and system based on block chain intelligent contract

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110444497.6A CN112926985A (en) 2021-04-23 2021-04-23 Power data management method and system based on block chain intelligent contract

Publications (1)

Publication Number Publication Date
CN112926985A true CN112926985A (en) 2021-06-08

Family

ID=76174669

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110444497.6A Pending CN112926985A (en) 2021-04-23 2021-04-23 Power data management method and system based on block chain intelligent contract

Country Status (1)

Country Link
CN (1) CN112926985A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113572599A (en) * 2021-06-21 2021-10-29 深圳供电局有限公司 Power data transmission method, data source device and data access device
CN116561182A (en) * 2023-07-07 2023-08-08 华北电力大学 Power data storage method and system based on block chain

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110060111A (en) * 2018-12-12 2019-07-26 阿里巴巴集团控股有限公司 Based on the invoice access method and device of block chain, electronic equipment
CN110729028A (en) * 2019-10-15 2020-01-24 腾讯科技(深圳)有限公司 Health data processing method and device, electronic equipment and storage medium
CN110879897A (en) * 2019-12-03 2020-03-13 广东电网有限责任公司 Block chain-based power data security protection method
CN111209334A (en) * 2019-12-23 2020-05-29 国网河北省电力有限公司雄安新区供电公司 Block chain-based power terminal data security management method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110060111A (en) * 2018-12-12 2019-07-26 阿里巴巴集团控股有限公司 Based on the invoice access method and device of block chain, electronic equipment
CN110729028A (en) * 2019-10-15 2020-01-24 腾讯科技(深圳)有限公司 Health data processing method and device, electronic equipment and storage medium
CN110879897A (en) * 2019-12-03 2020-03-13 广东电网有限责任公司 Block chain-based power data security protection method
CN111209334A (en) * 2019-12-23 2020-05-29 国网河北省电力有限公司雄安新区供电公司 Block chain-based power terminal data security management method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113572599A (en) * 2021-06-21 2021-10-29 深圳供电局有限公司 Power data transmission method, data source device and data access device
CN113572599B (en) * 2021-06-21 2023-11-28 深圳供电局有限公司 Power data transmission method, data source equipment and data access equipment
CN116561182A (en) * 2023-07-07 2023-08-08 华北电力大学 Power data storage method and system based on block chain
CN116561182B (en) * 2023-07-07 2023-09-19 华北电力大学 Power data storage method and system based on block chain

Similar Documents

Publication Publication Date Title
CN108512846B (en) Bidirectional authentication method and device between terminal and server
CN110868301B (en) Identity authentication system and method based on state cryptographic algorithm
CN110611563B (en) Equipment identification code distribution method and device and Internet of things equipment
CN110278080B (en) Method, system and computer readable storage medium for data transmission
CN109347632B (en) Block chain ID generation and use method, device, electronic equipment and storage medium
CN112926985A (en) Power data management method and system based on block chain intelligent contract
US11711205B2 (en) Unified secure device provisioning
CN110971593B (en) Database secure network access method
CN110912877B (en) Data transmitting and receiving method and device based on IEC61850 model in transformer substation
CN104994095A (en) Equipment authentication method, clients, server and system
CN105281902A (en) Web system safety login method based on mobile terminal
CN105553667A (en) Dynamic password generating method
CN110995410A (en) Method, device, equipment and medium for generating public key and private key
CN112653553A (en) Internet of things equipment identity management system
CN109039997B (en) Secret key obtaining method, device and system
CN111598695A (en) Block chain data access method and device
CN115276978A (en) Data processing method and related device
CN114268447B (en) File transmission method and device, electronic equipment and computer readable medium
CN111327561A (en) Authentication method, system, authentication server, and computer-readable storage medium
CN104410498A (en) Dynamic password authentication method and system
CN109698839B (en) Desensitization data comparison method and device based on asymmetric algorithm
CN108512657B (en) Password generation method and device
CN112738061B (en) Information processing method, device, management platform, electronic equipment and storage medium
CN110418342B (en) Long-term secret key management method, device and equipment
CN113111371A (en) Data transmission method and system based on block chain

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210608