The invention relates to a field protection method for watt-hour meter program. 1. The algorithm of computing licensee is embedded in the upper computer software and watt-hour meter program respectively; 2. Code ID is calculated by the algorithm; 3. The upper computer software calculates a fixed-length byte Licensee by the algorithm according to the Code ID; 4. Download the obtained licensee into the licensee structure of the table and recompile it. Watt-hour meter program; 5. The compiled program is downloaded to the meter to run; 6. When the watt-hour meter is running, the validity of the watt-hour meter is determined by calling the check module in the library function. If it is legitimate, it will run normally, and if it is not, it will stop running after the effective time. The invention can enhance the legitimacy of the program operation of the watt-hour meter, ensure the legitimacy of the program issuance, and ensure that the watt-hour meter can react in time after the program has been tampered with, avoid the errors of measurement or deduction, thereby ensuring the stability of the watt-hour meter.
【技术实现步骤摘要】
一种电能表程序的现场保护方法
本专利技术属于电力系统电能表管理
,具体涉及一种电能表程序的现场保护方法。
技术介绍
随着国家电网公司智能电能表系列标准的正式实施,电能表的功能明显增多,涉及到的重要信息比如剩余电费、电价等越来越多,电能表作为不允许现场升级软件的装置,程序的合法与否是保证电能表正常运行的重要因素。如果电能表在现场未经公司授权非法下载新程序、或程序下载版本有误,程序的不稳定性会导致信息泄露或是扣费等重要活动错误,在电能表供应量大的情况下损失难以估量。因此必须要设计相关电能表程序的现场保护方法。
技术实现思路
为解决上述技术问题,本专利技术提出了一种电能表程序的现场保护方法,该方法根据程序内部Flash特定地址的数据经过特定加密算法机制生成License(License是一种许可证号,是经过加密算法计算后若干个字节的十六进制整数),出厂之前下载到电能表中。程序运行时,会首先检测License是否正确,如果电能表程序错误或是被篡改,则表内默认的License必然是错误的。电能表一旦判定表内License不合法,有效时间过后电能表停止运行,避免程序问题造成损失。本专利技术所采用的技术方案如下:一种电能表程序的现场保护方法,包括以下步骤:步骤1、将计算License的算法分别内嵌到上位机软件和电能表程序中,为防止算法泄露,算法分别封装成上位机软件和电能表可运行的库函数,且上位机软件和电能表中运行的库函数分别授权给不同权限的人员使用,提高安全性能;步骤2、电能表获取与程序编译文件相关的若干个特征值,并通过算法计算得到CodeID(CodeID是经过算法 ...
【技术保护点】
1.一种电能表程序的现场保护方法,其特征在于,包括以下步骤:步骤1、将计算License的算法分别内嵌到上位机软件和电能表程序中;步骤2、电能表获取与程序编译文件相关的若干个特征值,并通过算法计算得到CodeID;步骤3、上位机软件根据该CodeID,通过算法计算得到固定长度字节License;步骤4、将得到的License下载到表内的License结构体中,并重新编译电能表程序;步骤5、将编译成功的程序下载到表内运行;步骤6、电能表运行起来后,调用库函数中的校验模块判定电能表的合法性。
【技术特征摘要】
1.一种电能表程序的现场保护方法,其特征在于,包括以下步骤:步骤1、将计算License的算法分别内嵌到上位机软件和电能表程序中;步骤2、电能表获取与程序编译文件相关的若干个特征值,并通过算法计算得到CodeID;步骤3、上位机软件根据该CodeID,通过算法计算得到固定长度字节License;步骤4、将得到的License下载到表内的License结构体中,并重新编译电能表程序;步骤5、将编译成功的程序下载到表内运行;步骤6、电能表运行起来后,调用库函数中的校验模块判定电能表的合法性。2.根据权利要求1所述的一种电能表程序的现场保护方法,其特征在于,步骤1所述的将计算Lice...
【专利技术属性】
技术研发人员:徐龙剑,王强,徐法格,于光兴,徐健,
申请(专利权)人:积成电子股份有限公司,
类型:发明
国别省市:山东,37
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。