[go: up one dir, main page]

CN111815932A - A method and device for collecting electricity consumption information based on blockchain - Google Patents

A method and device for collecting electricity consumption information based on blockchain Download PDF

Info

Publication number
CN111815932A
CN111815932A CN202010492379.8A CN202010492379A CN111815932A CN 111815932 A CN111815932 A CN 111815932A CN 202010492379 A CN202010492379 A CN 202010492379A CN 111815932 A CN111815932 A CN 111815932A
Authority
CN
China
Prior art keywords
electricity
blockchain
power generation
interface
power
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
CN202010492379.8A
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.)
NARI Information and Communication Technology Co
Original Assignee
NARI Information and Communication Technology Co
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 NARI Information and Communication Technology Co filed Critical NARI Information and Communication Technology Co
Priority to CN202010492379.8A priority Critical patent/CN111815932A/en
Publication of CN111815932A publication Critical patent/CN111815932A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C19/00Electric signal transmission systems
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Economics (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Marketing (AREA)
  • Computing Systems (AREA)
  • Public Health (AREA)
  • Water Supply & Treatment (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Data Mining & Analysis (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Remote Monitoring And Control Of Power-Distribution Networks (AREA)

Abstract

本发明公开了一种基于区块链的用电信息采集方法及装置,所述方法包括向发电用户发送发电授权,使得发电用户在收到发电授权后开始发电,并通过预设合约中的接口把发电信息存储到区块链中;向用电用户发送用电授权,使得用电用户在收到用电授权后可以用电,通过预设合约中的接口向发电用户购买电量,并将用电信息通过预设合约中的接口存储到区块链中;与发电用户和用电用户通信,获取所需数据,并基于获取到的数据,通过预设合约中的接口发布调度信息,并将调度信息通过预设合约中的接口存储到区块链中。本发明基于区块链实现了电力抄表的功能,每个用户都可以存储信息,不可以干涉用户,但是会根据当前的实际情况发送调度指令,使电网运行更加智能。

Figure 202010492379

The invention discloses a method and device for collecting electricity consumption information based on blockchain. The method includes sending a power generation authorization to a power generation user, so that the power generation user starts to generate electricity after receiving the power generation authorization, and passes the interface in a preset contract. Store electricity generation information in the blockchain; send electricity authorization to electricity users, so that electricity users can use electricity after receiving electricity authorization, purchase electricity from electricity generation users through the interface in the preset contract, and use them. Electricity information is stored in the blockchain through the interface in the preset contract; communicates with power generation users and electricity users to obtain the required data, and based on the obtained data, publishes scheduling information through the interface in the preset contract, and sends The scheduling information is stored in the blockchain through the interface in the preset contract. The invention realizes the function of power meter reading based on the blockchain, each user can store information and cannot interfere with the user, but dispatching instructions will be sent according to the current actual situation to make the power grid run more intelligently.

Figure 202010492379

Description

一种基于区块链的用电信息采集方法及装置A method and device for collecting electricity consumption information based on blockchain

技术领域technical field

本发明属于用电信息采集技术领域,具体涉及一种基于区块链的用电信息采集方法及装置。The invention belongs to the technical field of electricity consumption information collection, and in particular relates to a method and device for electricity consumption information collection based on blockchain.

背景技术Background technique

随着区块链技术的迅速发展,区块链已经应用在不同的领域,因为区块链具备不需要第三方、信息不能被篡改和去中心化的特点,所以,只要是需要第三方的业务,区块链都可以发挥作用。其中,智能电网就是一个应用场景。区块链主要能够应用在智能电网中的场景包括,第一,可信计量。主要解决电力信息采集困难的问题。第二,智能控制。可以通过区块链下达指令,控制系统,结合智能合约,能够使系统更加智能。第三,集群智能,区块链能够协调不同的能源,使智能电网更加智能化。With the rapid development of blockchain technology, blockchain has been applied in different fields, because blockchain has the characteristics that it does not require a third party, and information cannot be tampered with and decentralized. Therefore, as long as it is a business that requires a third party , the blockchain can play a role. Among them, the smart grid is an application scenario. The main scenarios in which blockchain can be applied to smart grids include, first, trusted metering. It mainly solves the problem of difficulty in collecting power information. Second, intelligent control. Commands can be issued through the blockchain to control the system, combined with smart contracts to make the system more intelligent. Third, cluster intelligence, the blockchain can coordinate different energy sources, making the smart grid more intelligent.

其中电表的信息采集是智能电网中及其重要的业务,而智能电表,相比于传统电表,具备更多的功能,使用通信功能,电力信息的采集可以更加智能,避免了人工抄表,例如红外抄表、无线抄表等。通常在智能电表中还配备了计算模块、存储模块和控制接口,可以计算费率、存储信息和控制电表。随着电子器件的发展,电表的计算更加准确,耗电更省。目前我国电表的覆盖率已经达到了80%以上,基于区块链的电力信息采集更加安全可靠。Among them, the information collection of electricity meters is an important business in the smart grid. Compared with traditional electricity meters, smart electricity meters have more functions. Using the communication function, the collection of electricity information can be more intelligent, avoiding manual meter reading, such as Infrared meter reading, wireless meter reading, etc. Usually, the smart meter is also equipped with a computing module, a storage module and a control interface, which can calculate the tariff, store information and control the meter. With the development of electronic devices, the calculation of electricity meters is more accurate and the power consumption is less. At present, the coverage rate of electricity meters in my country has reached more than 80%, and the collection of electricity information based on blockchain is more secure and reliable.

发明内容SUMMARY OF THE INVENTION

针对上述问题,本发明提出一种基于区块链的用电信息采集方法及装置。In view of the above problems, the present invention proposes a method and device for collecting electricity consumption information based on a blockchain.

为了实现上述技术目的,达到上述技术效果,本发明通过以下技术方案实现:In order to realize the above-mentioned technical purpose and achieve the above-mentioned technical effect, the present invention is realized through the following technical solutions:

第一方面,本发明提供了一种基于区块链的用电信息采集方法,包括:In a first aspect, the present invention provides a method for collecting electricity consumption information based on blockchain, including:

向发电用户发送发电授权,使得发电用户在收到发电授权后开始发电,并通过预设合约中的接口把发电信息存储到区块链中;Send the power generation authorization to the power generation user, so that the power generation user can start power generation after receiving the power generation authorization, and store the power generation information in the blockchain through the interface in the preset contract;

向用电用户发送用电授权,使得用电用户在收到用电授权后可以用电,通过预设合约中的接口向发电用户购买电量,并将用电信息通过预设合约中的接口存储到区块链中;Send electricity authorization to the electricity user, so that the electricity user can use electricity after receiving the electricity authorization, purchase electricity from the power generation user through the interface in the preset contract, and store the electricity consumption information through the interface in the preset contract into the blockchain;

与发电用户和用电用户通信,获取所需数据,并基于获取到的数据,通过预设合约中的接口发布调度信息,并将调度信息通过预设合约中的接口存储到区块链中。Communicate with power generation users and electricity users to obtain the required data, and based on the obtained data, publish scheduling information through the interface in the preset contract, and store the scheduling information in the blockchain through the interface in the preset contract.

作为本发明的进一步改进,用电用户将用电信息通过预设合约中的接口存储到区块链中,包括以下过程:As a further improvement of the present invention, the electricity user stores the electricity consumption information into the blockchain through the interface in the preset contract, including the following process:

用电用户将本地智能电表中的用电信息存储到区块链,设置采集信息的时间间隔,并将用电信息上传到区块链;The electricity user stores the electricity consumption information in the local smart meter to the blockchain, sets the time interval for collecting information, and uploads the electricity consumption information to the blockchain;

当采集到当前的总电能信息后,减去上一次的总电能数据,就是一共消耗的电能数据,然后将该电能数据通过电能计算函数,传送到区块链中。When the current total power information is collected, the last total power data is subtracted, which is the total power consumption data, and then the power data is transmitted to the blockchain through the power calculation function.

作为本发明的进一步改进,所述预设合约为DL/T645-1997/2007通信规约。As a further improvement of the present invention, the preset contract is the DL/T645-1997/2007 communication protocol.

作为本发明的进一步改进,所述预设合约采用的通信方式是半双工方式。As a further improvement of the present invention, the communication mode adopted by the preset contract is a half-duplex mode.

第二方面,本发明提供了一种基于区块链的用电信息采集装置,包括:In a second aspect, the present invention provides a block chain-based electricity consumption information collection device, including:

电力管理系统;power management system;

区块链;blockchain;

发电用户,分别与所述电力管理系统和区块链相连,接收电力管理系统发送的发电授权,在收到发电授权后开始发电,并通过预设合约中的接口,把发电信息存储到区块链中;The power generation users are connected to the power management system and the blockchain respectively, receive the power generation authorization sent by the power management system, start power generation after receiving the power generation authorization, and store the power generation information in the block through the interface in the preset contract chain;

用电用户,分别与所述电力管理系统和区块链相连,接收电力管理系统发送的用电授权,通过预设合约中的接口向发电用户购买电量,并将用电信息通过预设接口存储到区块链中;The electricity user is connected to the power management system and the blockchain respectively, receives the electricity authorization sent by the power management system, purchases electricity from the power generation user through the interface in the preset contract, and stores the electricity consumption information through the preset interface into the blockchain;

所述电力管理系统还从发电用户和用电用户处获取所需数据,并基于获取到的数据,通过预设合约中的接口发布调度信息,并将调度信息通过预设合约中的接口存储到区块链中。The power management system also obtains required data from power generation users and electricity users, and based on the obtained data, publishes scheduling information through the interface in the preset contract, and stores the scheduling information in the interface through the preset contract. in the blockchain.

作为本发明的进一步改进,所述用电用户包括智能电表,所述智能表与区块链之间通过RS485总线相连。As a further improvement of the present invention, the electricity user includes a smart meter, and the smart meter and the blockchain are connected through an RS485 bus.

作为本发明的进一步改进,所述RS485总线与智能电表中的串口相连,所述串口的配置参数包括:校验位、数据位、波特率和停止位,所述串口用于通过write或者read函数读取数据。As a further improvement of the present invention, the RS485 bus is connected to the serial port in the smart meter, and the configuration parameters of the serial port include: parity bit, data bit, baud rate and stop bit, and the serial port is used for writing or reading function to read data.

作为本发明的进一步改进,用电用户将用电信息通过预设合约中的接口存储到区块链中,包括以下过程:As a further improvement of the present invention, the electricity user stores the electricity consumption information into the blockchain through the interface in the preset contract, including the following processes:

用电用户将本地智能电表中的用电信息存储到区块链,设置采集信息的时间间隔,并将用电信息上传到区块链;The electricity user stores the electricity consumption information in the local smart meter to the blockchain, sets the time interval for collecting information, and uploads the electricity consumption information to the blockchain;

当采集到当前的总电能信息后,减去上一次的总电能数据,就是一共消耗的电能数据,然后将该电能数据通过电能计算函数,传送到区块链中。When the current total power information is collected, the last total power data is subtracted, which is the total power consumption data, and then the power data is transmitted to the blockchain through the power calculation function.

作为本发明的进一步改进,所述预设合约为DL/T645-1997/2007通信规约。As a further improvement of the present invention, the preset contract is the DL/T645-1997/2007 communication protocol.

作为本发明的进一步改进,所述预设合约采用的通信方式是半双工方式。As a further improvement of the present invention, the communication mode adopted by the preset contract is a half-duplex mode.

与现有技术相比,本发明的有益效果:Compared with the prior art, the beneficial effects of the present invention:

本发明基于区块链实现了电力抄表的功能,每个用户都可以存储信息,并且该平台不可以干涉用户,但是该平台会根据当前的实际情况发送调度指令,使电网运行更加智能。The invention realizes the function of power meter reading based on the blockchain, each user can store information, and the platform cannot interfere with the user, but the platform will send scheduling instructions according to the current actual situation to make the power grid run more intelligently.

附图说明Description of drawings

为了使本发明的内容更容易被清楚地理解,下面根据具体实施例并结合附图,对本发明作进一步详细的说明,其中:In order to make the content of the present invention easier to be understood clearly, the present invention will be described in further detail below according to specific embodiments and in conjunction with the accompanying drawings, wherein:

图1为电力系统管理平台的运行流程图;Fig. 1 is the operation flow chart of the power system management platform;

图2为帧格式示意图;Figure 2 is a schematic diagram of a frame format;

图3为数据传送方式示意图;3 is a schematic diagram of a data transmission mode;

图4为打开串口的流程图;Fig. 4 is the flow chart of opening serial port;

图5为用电用户上传数据的流程图。FIG. 5 is a flow chart of uploading data by an electricity user.

具体实施方式Detailed ways

为了使本发明的目的、技术方案及优点更加清楚明白,以下结合实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明的保护范围。In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the protection scope of the present invention.

下面结合附图对本发明的应用原理作详细的描述。The application principle of the present invention will be described in detail below with reference to the accompanying drawings.

实施例1Example 1

本发明实施例中提供了一种基于区块链的用电信息采集方法,包括以下步骤:An embodiment of the present invention provides a method for collecting electricity consumption information based on a blockchain, including the following steps:

向发电用户发送发电授权,使得发电用户在收到发电授权后开始发电,并通过预设合约中的接口把发电信息存储到区块链中;Send the power generation authorization to the power generation user, so that the power generation user can start power generation after receiving the power generation authorization, and store the power generation information in the blockchain through the interface in the preset contract;

向用电用户发送用电授权,使得用电用户在收到用电授权后可以用电,通过预设合约中的接口向发电用户购买电量,并将用电信息通过预设合约中的接口存储到区块链中;Send electricity authorization to the electricity user, so that the electricity user can use electricity after receiving the electricity authorization, purchase electricity from the power generation user through the interface in the preset contract, and store the electricity consumption information through the interface in the preset contract into the blockchain;

与发电用户和用电用户通信,获取所需数据,并基于获取到的数据,通过预设合约中的接口发布调度信息,并将调度信息通过预设合约中的接口存储到区块链中,保障了数据信息的安全性和透明性。Communicate with power generation users and electricity users to obtain the required data, and based on the obtained data, publish scheduling information through the interface in the preset contract, and store the scheduling information in the blockchain through the interface in the preset contract. The security and transparency of data information are guaranteed.

在本发明实施例的一种具体实施方式中,用电用户将用电信息通过预设合约中的接口存储到区块链中,包括以下过程:In a specific implementation of the embodiment of the present invention, the electricity user stores the electricity consumption information into the blockchain through the interface in the preset contract, including the following process:

用电用户将本地智能电表中的用电信息存储到区块链,设置采集信息的时间间隔,并将用电信息上传到区块链;The electricity user stores the electricity consumption information in the local smart meter to the blockchain, sets the time interval for collecting information, and uploads the electricity consumption information to the blockchain;

当采集到当前的总电能信息后,减去上一次的总电能数据,就是一共消耗的电能数据,然后将该电能数据通过电能计算函数,传送到区块链中。When the current total power information is collected, the last total power data is subtracted, which is the total power consumption data, and then the power data is transmitted to the blockchain through the power calculation function.

所述预设合约为DL/T645-1997/2007通信规约;优选地,所述预设合约采用的通信方式是半双工方式,即为向电力终端发送命令,然后电力终端做出回应。The preset contract is a DL/T645-1997/2007 communication protocol; preferably, the communication mode adopted by the preset contract is a half-duplex mode, that is, a command is sent to the power terminal, and then the power terminal responds.

实施例2Example 2

本发明实施例中提供了一种基于区块链的用电信息采集装置,包括:An embodiment of the present invention provides a block chain-based electricity consumption information collection device, including:

电力管理系统;power management system;

区块链;blockchain;

发电用户,分别与所述电力管理系统和区块链相连,接收电力管理系统发送的发电授权,在收到发电授权后开始发电,并通过预设合约中的接口,把发电信息存储到区块链中;The power generation users are connected to the power management system and the blockchain respectively, receive the power generation authorization sent by the power management system, start power generation after receiving the power generation authorization, and store the power generation information in the block through the interface in the preset contract chain;

用电用户,分别与所述电力管理系统和区块链相连,接收电力管理系统发送的用电授权,通过预设合约中的接口向发电用户购买电量,并将用电信息通过预设接口存储到区块链中;The electricity user is connected to the power management system and the blockchain respectively, receives the electricity authorization sent by the power management system, purchases electricity from the power generation user through the interface in the preset contract, and stores the electricity consumption information through the preset interface into the blockchain;

所述电力管理系统还从发电用户和用电用户处获取所需数据,并基于获取到的数据,通过预设合约中的接口发布调度信息,并将调度信息通过预设合约中的接口存储到区块链中。The power management system also obtains required data from power generation users and electricity users, and based on the obtained data, publishes scheduling information through the interface in the preset contract, and stores the scheduling information in the interface through the preset contract. in the blockchain.

在本发明实施例的一种具体实施方式中,所述电力管理系统的工作过程为:In a specific implementation of the embodiment of the present invention, the working process of the power management system is:

首先进行管理员身份验证,在通过管理员身份验证后,由管理员添加用户或发布调度信息至发电用户和用电用户;First, perform administrator authentication. After passing the administrator authentication, the administrator will add users or publish scheduling information to power generation users and electricity consumers;

当发电用户接收电力管理系统发送的发电授权后开始发电,并通过预设合约中的接口(增发电量接口),把发电信息存储到区块链中;所述发电用户还可以通过预设合约中的接口,查询发电信息并存储到区块链中。当发电用户接收到用电用户发送的购买电量信号时,进行售卖电能,并将该售卖信息存储到区块链中。When the power generation user receives the power generation authorization sent by the power management system, it starts to generate power, and stores the power generation information in the blockchain through the interface in the preset contract (increase power generation interface); the power generation user can also pass the preset contract. interface to query power generation information and store it in the blockchain. When the power generation user receives the electricity purchase signal sent by the electricity user, the electricity is sold, and the selling information is stored in the blockchain.

当用电用户接收电力管理系统发送的用电授权后,通过预设合约中的接口向发电用户购买电量,并将用电信息(即消耗电量)通过预设接口存储到区块链中;所述发电用户还可以通过预设合约中的接口,查询用电信息并存储到区块链中。When the electricity user receives the electricity authorization sent by the power management system, it purchases electricity from the power generation user through the interface in the preset contract, and stores the electricity consumption information (ie, electricity consumption) in the blockchain through the preset interface; The power generation users can also query the electricity consumption information and store it in the blockchain through the interface in the preset contract.

在本发明实施例的一种具体实施方式中,所述用电用户包括智能电表,所述智能表与区块链之间通过RS485总线相连;所述智能电表使用的是DL/T645通信规约,在DL/T645通信规约中,帧格式如图2所示,数据传输的过程如下:假设电量的数值为123456.78kWh,那么传送的方式如图3所示,校验码为CS,在发送信息前,先传送FEH,目的是激活智能电表,所有信息都是先传输低位的字节,然后再传送高位的字节。最后智能电表传送的报文如下:FEFE FE FE 68 25 00 00 00 00 00 68 11 04 33 33 34 33 D7 16,报文经过处理,变成6825 00 00 00 00 00 68 11 04 00 00 01 00 D7 16。在报文中25 00 00 00 00 00时智能电表终端的编号,11是发送的命令,04是数据命令,00 00 01 00是读取总电能的命令,D7是校验码,最后将报文发送到智能电表中智能电表收到命令信息后,回应信息如下:682500 00 00 00 00 68 91 08 33 33 34 33 97 84 45 33 BB 16。报文中的数据信息部分是97 84 45 33,采取减33的处理,变成64 51 12 00,即为总电能为1251.64KW/h。In a specific implementation of the embodiment of the present invention, the electricity user includes a smart meter, and the smart meter and the blockchain are connected through an RS485 bus; the smart meter uses the DL/T645 communication protocol, In the DL/T645 communication protocol, the frame format is shown in Figure 2, and the data transmission process is as follows: Assuming that the value of the electricity is 123456.78kWh, the transmission method is shown in Figure 3, the check code is CS, and before sending the information , first transmit FEH, the purpose is to activate the smart meter, all information is to transmit the low-order bytes first, and then transmit the high-order bytes. Finally, the message sent by the smart meter is as follows: FEFE FE FE 68 25 00 00 00 00 00 68 11 04 33 33 34 33 D7 16, after the message is processed, it becomes 6825 00 00 00 00 00 68 11 04 00 00 01 00 D7 16. In the message, 25 00 00 00 00 00 is the terminal number of the smart meter, 11 is the command sent, 04 is the data command, 00 00 01 00 is the command to read the total energy, D7 is the check code, and finally the message After the smart meter receives the command message sent to the smart meter, the response message is as follows: 682500 00 00 00 00 68 91 08 33 33 34 33 97 84 45 33 BB 16. The data information part in the message is 97 84 45 33, which is processed by subtracting 33 to become 64 51 12 00, that is, the total power is 1251.64KW/h.

在本发明实施例的一种具体实施方式中,所述RS485总线与智能电表中的串口相连,所述串口的配置参数包括:校验位、数据位、波特率和停止位,所述串口用于通过write或者read函数读取数据。如图4所示,串口打开后可以设置串口,配置参数,可以配置的参数有:校验位、数据位、波特率和停止位等。串口设置完成后,可以通过write或者read函数读取数据。也可以设置每隔几秒读取电表的数据,例如一般选择每隔5秒读取数据,还可以检验数据的格式的正确性,检测数据的正确性。In a specific implementation of the embodiment of the present invention, the RS485 bus is connected to the serial port in the smart meter, and the configuration parameters of the serial port include: parity bit, data bit, baud rate and stop bit, the serial port Used to read data through the write or read function. As shown in Figure 4, after the serial port is opened, you can set the serial port and configure parameters. The parameters that can be configured are: parity bit, data bit, baud rate and stop bit. After the serial port setting is completed, the data can be read through the write or read function. It can also be set to read the data of the meter every few seconds, for example, it is generally selected to read the data every 5 seconds, and the correctness of the data format can also be checked, and the correctness of the data can be detected.

在本发明实施例的一种具体实施方式中,用电用户将用电信息通过预设合约中的接口存储到区块链中,如图5所示,包括以下过程:In a specific implementation of the embodiment of the present invention, the electricity user stores the electricity consumption information in the blockchain through the interface in the preset contract, as shown in Figure 5, including the following processes:

用电用户将本地智能电表中的用电信息存储到区块链,设置采集信息的时间间隔,并将用电信息上传到区块链;The electricity user stores the electricity consumption information in the local smart meter to the blockchain, sets the time interval for collecting information, and uploads the electricity consumption information to the blockchain;

当采集到当前的总电能信息后,减去上一次的总电能数据,就是一共消耗的电能数据,然后将该电能数据转换格式成为32位的数据,通过电能计算函数,传送到区块链中。When the current total power information is collected, subtract the last total power data, which is the total power consumption data, and then convert the power data into 32-bit data, and transmit it to the blockchain through the power calculation function. .

在本发明实施例的一种具体实施方式中,所述预设合约为DL/T645-1997/2007通信规约;优选地,所述预设合约采用的通信方式是半双工方式。In a specific implementation of the embodiment of the present invention, the preset contract is a DL/T645-1997/2007 communication protocol; preferably, the communication mode adopted by the preset contract is a half-duplex mode.

以上显示和描述了本发明的基本原理和主要特征和本发明的优点。本行业的技术人员应该了解,本发明不受上述实施例的限制,上述实施例和说明书中描述的只是说明本发明的原理,在不脱离本发明精神和范围的前提下,本发明还会有各种变化和改进,这些变化和改进都落入要求保护的本发明范围内。本发明要求保护范围由所附的权利要求书及其等效物界定。The basic principles and main features of the present invention and the advantages of the present invention have been shown and described above. Those skilled in the art should understand that the present invention is not limited by the above-mentioned embodiments. The above-mentioned embodiments and descriptions only illustrate the principle of the present invention. Without departing from the spirit and scope of the present invention, the present invention will also have Various changes and modifications fall within the scope of the claimed invention. The claimed scope of the present invention is defined by the appended claims and their equivalents.

Claims (10)

1.一种基于区块链的用电信息采集方法,其特征在于,包括:1. A method for collecting electricity consumption information based on block chain, is characterized in that, comprises: 向发电用户发送发电授权,使得发电用户在收到发电授权后开始发电,并通过预设合约中的接口把发电信息存储到区块链中;Send the power generation authorization to the power generation user, so that the power generation user can start power generation after receiving the power generation authorization, and store the power generation information in the blockchain through the interface in the preset contract; 向用电用户发送用电授权,使得用电用户在收到用电授权后可以用电,通过预设合约中的接口向发电用户购买电量,并将用电信息通过预设合约中的接口存储到区块链中;Send electricity authorization to the electricity user, so that the electricity user can use electricity after receiving the electricity authorization, purchase electricity from the power generation user through the interface in the preset contract, and store the electricity consumption information through the interface in the preset contract into the blockchain; 与发电用户和用电用户通信,获取所需数据,并基于获取到的数据,通过预设合约中的接口发布调度信息,并将调度信息通过预设合约中的接口存储到区块链中。Communicate with power generation users and electricity users to obtain the required data, and based on the obtained data, publish scheduling information through the interface in the preset contract, and store the scheduling information in the blockchain through the interface in the preset contract. 2.根据权利要求1所述的一种基于区块链的用电信息采集方法,其特征在于,用电用户将用电信息通过预设合约中的接口存储到区块链中,包括以下过程:2. A method for collecting electricity consumption information based on a blockchain according to claim 1, wherein the electricity consumption user stores the electricity consumption information in the blockchain through an interface in a preset contract, including the following process : 用电用户将本地智能电表中的用电信息存储到区块链,设置采集信息的时间间隔,并将用电信息上传到区块链;The electricity user stores the electricity consumption information in the local smart meter to the blockchain, sets the time interval for collecting information, and uploads the electricity consumption information to the blockchain; 当采集到当前的总电能信息后,减去上一次的总电能数据,就是一共消耗的电能数据,然后将该电能数据通过电能计算函数,传送到区块链中。When the current total power information is collected, the last total power data is subtracted, which is the total power consumption data, and then the power data is transmitted to the blockchain through the power calculation function. 3.根据权利要求1所述的一种基于区块链的用电信息采集方法,其特征在于,所述预设合约为DL/T645-1997/2007通信规约。3. A method for collecting electricity consumption information based on blockchain according to claim 1, wherein the preset contract is a DL/T645-1997/2007 communication protocol. 4.根据权利要求1所述的一种基于区块链的用电信息采集方法,其特征在于,所述预设合约采用的通信方式是半双工方式。4 . The method for collecting electricity consumption information based on blockchain according to claim 1 , wherein the communication mode adopted by the preset contract is a half-duplex mode. 5 . 5.一种基于区块链的用电信息采集装置,其特征在于,包括:5. A block chain-based electricity consumption information collection device, characterized in that it comprises: 电力管理系统;power management system; 区块链;blockchain; 发电用户,分别与所述电力管理系统和区块链相连,接收电力管理系统发送的发电授权,在收到发电授权后开始发电,并通过预设合约中的接口,把发电信息存储到区块链中;The power generation users are connected to the power management system and the blockchain respectively, receive the power generation authorization sent by the power management system, start power generation after receiving the power generation authorization, and store the power generation information in the block through the interface in the preset contract chain; 用电用户,分别与所述电力管理系统和区块链相连,接收电力管理系统发送的用电授权,通过预设合约中的接口向发电用户购买电量,并将用电信息通过预设接口存储到区块链中;The electricity user is connected to the power management system and the blockchain respectively, receives the electricity authorization sent by the power management system, purchases electricity from the power generation user through the interface in the preset contract, and stores the electricity consumption information through the preset interface into the blockchain; 所述电力管理系统还从发电用户和用电用户处获取所需数据,并基于获取到的数据,通过预设合约中的接口发布调度信息,并将调度信息通过预设合约中的接口存储到区块链中。The power management system also obtains required data from power generation users and electricity users, and based on the obtained data, publishes scheduling information through the interface in the preset contract, and stores the scheduling information in the interface through the preset contract. in the blockchain. 6.根据权利要求5所述的一种基于区块链的用电信息采集装置,其特征在于:所述用电用户包括智能电表,所述智能表与区块链之间通过RS485总线相连。6 . The device for collecting electricity consumption information based on blockchain according to claim 5 , wherein the electricity user includes a smart meter, and the smart meter and the blockchain are connected through an RS485 bus. 7 . 7.根据权利要求6所述的一种基于区块链的用电信息采集装置,其特征在于:所述RS485总线与智能电表中的串口相连,所述串口的配置参数包括:校验位、数据位、波特率和停止位,所述串口用于通过write或者read函数读取数据。7. A block chain-based power consumption information collection device according to claim 6, characterized in that: the RS485 bus is connected to the serial port in the smart meter, and the configuration parameters of the serial port include: check digit, Data bit, baud rate and stop bit, the serial port is used to read data through the write or read function. 8.根据权利要求7所述的一种基于区块链的用电信息采集装置,其特征在于:用电用户将用电信息通过预设合约中的接口存储到区块链中,包括以下过程:8. A blockchain-based electricity consumption information collection device according to claim 7, characterized in that: electricity users store electricity consumption information in the blockchain through an interface in a preset contract, including the following process : 用电用户将本地智能电表中的用电信息存储到区块链,设置采集信息的时间间隔,并将用电信息上传到区块链;The electricity user stores the electricity consumption information in the local smart meter to the blockchain, sets the time interval for collecting information, and uploads the electricity consumption information to the blockchain; 当采集到当前的总电能信息后,减去上一次的总电能数据,就是一共消耗的电能数据,然后将该电能数据通过电能计算函数,传送到区块链中。When the current total power information is collected, the last total power data is subtracted, which is the total power consumption data, and then the power data is transmitted to the blockchain through the power calculation function. 9.根据权利要求5所述的一种基于区块链的用电信息采集装置,其特征在于,所述预设合约为DL/T645-1997/2007通信规约。9 . The device for collecting electricity consumption information based on blockchain according to claim 5 , wherein the preset contract is a DL/T645-1997/2007 communication protocol. 10 . 10.根据权利要求5所述的一种基于区块链的用电信息采集装置,其特征在于,所述预设合约采用的通信方式是半双工方式。10 . The device for collecting electricity consumption information based on blockchain according to claim 5 , wherein the communication mode adopted by the preset contract is a half-duplex mode. 11 .
CN202010492379.8A 2020-06-03 2020-06-03 A method and device for collecting electricity consumption information based on blockchain Pending CN111815932A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010492379.8A CN111815932A (en) 2020-06-03 2020-06-03 A method and device for collecting electricity consumption information based on blockchain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010492379.8A CN111815932A (en) 2020-06-03 2020-06-03 A method and device for collecting electricity consumption information based on blockchain

Publications (1)

Publication Number Publication Date
CN111815932A true CN111815932A (en) 2020-10-23

Family

ID=72847884

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010492379.8A Pending CN111815932A (en) 2020-06-03 2020-06-03 A method and device for collecting electricity consumption information based on blockchain

Country Status (1)

Country Link
CN (1) CN111815932A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112636467A (en) * 2020-12-04 2021-04-09 安徽继远软件有限公司 Power utilization information method and system of energy Internet

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040177216A1 (en) * 2003-03-03 2004-09-09 Renesas Technology Corp. Nonvolatile memory and method of address management
CN106771451A (en) * 2016-11-18 2017-05-31 国网山东省电力公司济南供电公司 A kind of new residential customers Intelligent electricity consumption management terminal
CN106875164A (en) * 2016-12-29 2017-06-20 北京握奇智能科技有限公司 A kind of decentralization electricity transaction method and system based on block chain technology
CN107423945A (en) * 2017-04-13 2017-12-01 葛武 Intelligent energy trade managing system and method based on block chain technology
CN108573438A (en) * 2018-05-09 2018-09-25 深圳汇创联合自动化控制有限公司 A kind of autonomous transaction system of custom power based on block chain
CN109066690A (en) * 2018-09-13 2018-12-21 福建省农村信用社联合社 A kind of regional power supply dispatching method for producing electricity consumption
CN109066670A (en) * 2018-09-13 2018-12-21 福建省农村信用社联合社 A kind of distributed power supply management method based on Internet of Things block chain
CN109615427A (en) * 2018-12-07 2019-04-12 广州市哲明惠科技有限责任公司 A kind of energy interactive system and method based on chain structure
CN110689398A (en) * 2019-08-29 2020-01-14 合肥工业大学 Residential micro-grid power transaction management system based on block chain
CN111047320A (en) * 2019-12-19 2020-04-21 山东爱城市网信息技术有限公司 Solar power transaction method, device and medium based on block chain

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040177216A1 (en) * 2003-03-03 2004-09-09 Renesas Technology Corp. Nonvolatile memory and method of address management
CN106771451A (en) * 2016-11-18 2017-05-31 国网山东省电力公司济南供电公司 A kind of new residential customers Intelligent electricity consumption management terminal
CN106875164A (en) * 2016-12-29 2017-06-20 北京握奇智能科技有限公司 A kind of decentralization electricity transaction method and system based on block chain technology
CN107423945A (en) * 2017-04-13 2017-12-01 葛武 Intelligent energy trade managing system and method based on block chain technology
CN108573438A (en) * 2018-05-09 2018-09-25 深圳汇创联合自动化控制有限公司 A kind of autonomous transaction system of custom power based on block chain
CN109066690A (en) * 2018-09-13 2018-12-21 福建省农村信用社联合社 A kind of regional power supply dispatching method for producing electricity consumption
CN109066670A (en) * 2018-09-13 2018-12-21 福建省农村信用社联合社 A kind of distributed power supply management method based on Internet of Things block chain
CN109615427A (en) * 2018-12-07 2019-04-12 广州市哲明惠科技有限责任公司 A kind of energy interactive system and method based on chain structure
CN110689398A (en) * 2019-08-29 2020-01-14 合肥工业大学 Residential micro-grid power transaction management system based on block chain
CN111047320A (en) * 2019-12-19 2020-04-21 山东爱城市网信息技术有限公司 Solar power transaction method, device and medium based on block chain

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
邰雪等: "能源互联网中基于区块链的电力交易和阻塞管理方法", 《电网技术》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112636467A (en) * 2020-12-04 2021-04-09 安徽继远软件有限公司 Power utilization information method and system of energy Internet

Similar Documents

Publication Publication Date Title
CN107423945B (en) Intelligent energy transaction management system and method based on blockchain technology
CN108400590A (en) A kind of micro- energy net ecosystem based on block chain and cloud power supply
CN105260885A (en) Internet of things mobile phone APP self-service prepayment and cloud management system
CN110503569A (en) New energy settlement system based on block chain
CN103268325A (en) Dynamic checking method of intelligent substation IED (intelligent electronic device) model configuration correctness based on SCD (security coding device) files
CN103424615A (en) Intelligent electric meter based on WIFI (wireless fidelity) and 3G (3rd generation) networks
CN112904734A (en) Intelligent household appliance control system and method based on Internet of things and block chain double gateways
CN106066416A (en) A kind of intelligent electric meter based on mobile Internet
CN104424714A (en) Intelligent water meter based in Internet of Things and control system thereof
CN201402280Y (en) Three-phase prepaid energy meter system based on GPRS communication
CN105931379A (en) Fee deduction method and system for intelligent electric meter
CN106257546A (en) The method of managing prepaid intelligent monitoring terminal and prepayment intelligent detection and control terminal
CN111815932A (en) A method and device for collecting electricity consumption information based on blockchain
CN205880051U (en) Smart electric meter based on mobile internet
CN106297016A (en) A kind of control system for unmanned intelligent refueling station administration
CN202331644U (en) Intelligent water meter of Internet of things
CN104850426A (en) Method for enhancing function of IEC61850 client through import of SCD file
CN106327273A (en) STS-based prepaid electricity selling system and method
CN105357276B (en) A kind of internet+schedulable load user interaction method
CN108335476A (en) Wireless communication collection module, communication acquisition method and its manufactured electric energy meter
CN202331761U (en) Intelligent electric energy meter based on Internet of Things
CN112636467A (en) Power utilization information method and system of energy Internet
CN118469559A (en) Energy transaction processing system based on blockchain
CN204204110U (en) A kind of intelligent prepayment diaphragm gas flowermeter based on GPRS
CN102664957A (en) Information integration method of advanced metering infrastructure

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: 20201023