WO2018201723A1 - 基于sts的预付费系统及信息传输方法 - Google Patents

基于sts的预付费系统及信息传输方法 Download PDF

Info

Publication number
WO2018201723A1
WO2018201723A1 PCT/CN2017/115581 CN2017115581W WO2018201723A1 WO 2018201723 A1 WO2018201723 A1 WO 2018201723A1 CN 2017115581 W CN2017115581 W CN 2017115581W WO 2018201723 A1 WO2018201723 A1 WO 2018201723A1
Authority
WO
WIPO (PCT)
Prior art keywords
token
sts
module
plaintext
meter
Prior art date
Application number
PCT/CN2017/115581
Other languages
English (en)
French (fr)
Inventor
郑园园
姚青
周建波
陈国华
王亮
Original Assignee
杭州海兴电力科技股份有限公司
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 杭州海兴电力科技股份有限公司 filed Critical 杭州海兴电力科技股份有限公司
Publication of WO2018201723A1 publication Critical patent/WO2018201723A1/zh
Priority to ZA2019/03312A priority Critical patent/ZA201903312B/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/321Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving a third party or a trusted authority
    • H04L9/3213Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving a third party or a trusted authority using tickets or tokens, e.g. Kerberos

Definitions

  • the invention belongs to the technical field of power systems, and relates to an information transmission technology of prepaid electricity sales, in particular to an STS-based prepayment system and an information transmission method.
  • the prepaid sales system requires the user to first use the power selling system to recharge the account (with media refill or no media recharge), and then transfer the information in the account to the prepaid list, and the prepaid meter uses the obtained information to the user's electricity consumption. Take control. When the power in the user account is used up, the prepaid list will automatically determine and power off the user.
  • the prepaid electricity sales system facilitates the user's electricity and payment, and greatly improves the return efficiency of the power sector.
  • the Standard Transfer Specification (STS) protocol is an important technology in the prepaid power sales system and is the only universal open standard for prepaid systems.
  • the STS protocol defines the information transmission flow from the power selling system to the prepaid meter. The process includes: first, inputting related operational parameters such as recharging, management or testing to the power selling system; secondly, the power selling system will operate according to the STS protocol.
  • the parameters constitute the final application data; again, the sales system converts the application data into a token Token according to the physical layer protocol and its transmission mode; after that, the prepaid meter receives the sales system.
  • the token Token data is obtained based on the same physical layer protocol; then, the prepaid table parses the token Token according to the STS protocol to obtain the application data of the power selling system; finally, the prepaid table performs corresponding charging according to the application data, Manage, test, or display operations.
  • the power selling system needs to access and use the encryption box to generate an encrypted token Token to ensure the security and reliability of the transmission of information carried by the token Token.
  • the power selling system is responsible for generating and encrypting the token Token, and the prepaid table decrypts the token Token information and performs corresponding operations to ensure the security of the service between the power selling system or the consumer and the prepaid meter.
  • the power sales system also needs to obtain specified information from the prepaid list according to certain business scenarios. For example, when the consumer migrates and applies for cancellation of the account, the power selling system obtains the balance of the meter from the prepaid list and returns it. Corresponding cash to consumers and so on.
  • the STS protocol cannot fully cover the power-related business requirements.
  • the public utility bureau needs to additionally acquire and load related information to the power selling system, and the information acquisition time is relatively longer. Long, the operating cost is large, and there are problems such as loading data errors in the operation.
  • the object of the present invention is to propose an STS-based prepaid system and an information transmission method, which can be applied to a prepaid power selling system device.
  • the present invention adopts the following technical solutions:
  • An STS-based information transmission method includes:
  • the meter receives the input command
  • the step of encrypting comprises encrypting the token Token plaintext by using a spanning tree algorithm.
  • the method further includes:
  • the power selling system receives the token Token ciphertext
  • the present invention also provides an STS-based prepaid system, comprising: a first communication module (110), a first processing module (120), a first STS protocol module (130), and a first encryption and decryption module (140);
  • the first communication module (110) is configured to receive the input instruction and the output token Token ciphertext
  • the first processing module (120) is configured to obtain the meter data in the electricity meter according to the input instruction
  • the first STS protocol module (130) is configured to convert the meter data into a corresponding token Token plaintext
  • the first encryption and decryption module (140) is configured to encrypt the token Token plaintext to obtain the token Token ciphertext.
  • the first encryption and decryption module (140) performs encryption and decryption processing on the token Token plaintext by using a spanning tree algorithm.
  • the STS-based prepaid system further includes: a second communication module (210), a second encryption and decryption module (240), a second STS protocol module (230), and a second processing module (220);
  • the second communication module (210) is configured to receive the token Token ciphertext
  • the second encryption and decryption module (240) is configured to decrypt the token Token ciphertext to obtain the token Token plaintext;
  • the second STS protocol module (230) is configured to convert the token Token plaintext into corresponding meter data
  • the second processing module (220) is configured to obtain meter data and perform data processing.
  • the STS-based prepaid system further includes a verification module that verifies the token Token plaintext.
  • the second processing module (220) calculates a corresponding remaining amount or remaining power according to the remaining power or the remaining amount and the charging mode.
  • the present invention Compared with the prior art, the present invention has the following advantages: the present invention proposes an STS-based prepaid system and an information transmission method, and converts the electric meter data information into a token Token plaintext by the STS protocol, and performs the token Token plaintext. Encryption processing, output as token Token ciphertext.
  • the token Token ciphertext is transmitted to the power selling system, and processed by decryption or the like to obtain meter data information.
  • the invention realizes the reverse transmission of the STS prepaid meter to the power selling system, expands the application scenario of the STS protocol, and effectively utilizes the encryption and decryption module provided by the traditional power selling system.
  • the prepaid system proposed by the present invention can realize two-way information transmission of a prepaid meter and a power selling system.
  • the Token ciphertext corresponding to the meter data is directly generated by the prepaid meter, which can eliminate the steps of manual meter reading by the staff of the power selling system, and avoid the risks of data errors and tampering caused by manual meter reading.
  • the electricity sales system or user can obtain the relevant data of the electricity meter according to the business change requirements, and transmit the data to the power sales system management platform in the form of token Token ciphertext, and the data transmission efficiency is high and the transmission is accurate.
  • FIG. 1 is a schematic structural diagram of an STS-based prepaid system according to an embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of an STS-based prepaid system according to another embodiment of the present invention.
  • FIG. 3 is a schematic flowchart diagram of an STS-based information transmission method according to an embodiment of the present invention.
  • Token plaintext refers to the token Token plaintext.
  • FIG. 1 is a schematic structural diagram of an STS-based prepaid system according to an embodiment of the present invention.
  • the prepaid list 100 includes: a first communication module 110, a first processing module 120, a first STS protocol module 130, and a first encryption and decryption module 140.
  • the first communication module 110 is configured to receive the input instruction and output the token Token ciphertext.
  • the first processing module 120 is configured to acquire the meter data in the electricity meter according to the input instruction.
  • the first STS protocol module 130 is configured to convert the meter data into a corresponding token Token plaintext.
  • the first encryption and decryption module 140 is configured to perform encryption processing on the token Token plaintext to obtain a token Token ciphertext.
  • the first communication module 110 receives the externally input instruction into the prepaid list, and may also output and transmit the encrypted token Token ciphertext.
  • the input mode of the command may be obtained by the user pressing the prepaid meter command button or receiving the power selling system to send the command signal.
  • the command signal sent by the power selling system is the token Token ciphertext
  • the meter needs to first decrypt the token Token ciphertext into the token Token plaintext through the decryption process of the STS protocol.
  • the token Token plaintext is then converted to an input command to the meter via the STS protocol.
  • the first communication module 110 outputs the token Token ciphertext, and the transmission manner may be a paper document. This form can also be returned to the user via the LCD display, wifi transmission, or CIU display mode.
  • the obtained meter data may be the used power, the remaining power, the remaining amount, or the amount of power used in each period.
  • the first STS protocol module 130 can be used to convert the meter data into a corresponding token Token plaintext, and can also be used to convert the token Token plaintext into meter data.
  • the token Token plaintext may include the following parameters: the type of the prepaid meter, the table manufacturer, the table recharge amount, the remaining amount, the remaining power, the test information, the new key, and the like.
  • the STS protocol defines the calculation formula of Token format and data domain.
  • the Token format includes: Token type (2bits), Token subtype (4bits), random number field (4bits), TID field (24bits), Register/Amount field (16bits), and Cyclic Redundancy Check (Cyclic Redundancy Check). CRC) check field (16 bits).
  • the Register/Amount field is shown in Table 1. It consists of a 2-bit exponent domain and a 14-bit data domain.
  • the first encryption and decryption module 140 is configured to perform encryption processing on the token Token plaintext; and may perform decryption processing on the input token Token ciphertext as needed.
  • the encryption and decryption algorithm of the first encryption and decryption module 140 may select a spanning tree algorithm (Spanning) Tree Algorithm, referred to as STA).
  • STA spanning tree algorithm
  • the STA encryption algorithm flows as follows:
  • the meter key DK is processed; the 8-byte key DK is first inverted to obtain the key DK1.
  • the key DK1 is rotated 12 bits to the right to obtain the key DK2.
  • the key DK2 and the application data Data are each divided into 16 half-bytes (abbreviated as nibble), and the replacement process is entered and executed to obtain a 64-bit DataTempt.
  • the third digit of Table 1 is replaced by the same as Table 3.
  • the counter increment is continued until the 16 nibbles of Data are all replaced, and the replaced Data (DataTempt for short) is used as a parameter to enter the replacement operation.
  • the permutation table is shown in Table 2 below.
  • the value of bit 7 in DataTempt is 1, and the new position of the corresponding substitution table is bit 2. Therefore, the value of bit 2 in the application data (referred to as DataResultTempt) of all replacements is also 1, and the dataResultTempt bit 2 corresponds to the bit 7 of DataTempt. value. In this way, all the DataTempt 64bits are all replaced to get DataResultTempt.
  • the present invention Compared with the prior art, the present invention has the following advantages: the present invention proposes an STS-based prepaid system and an information transmission method, and converts the electric meter data information into a token Token plaintext by the STS protocol, and performs the token Token plaintext. Encryption processing, output as token Token ciphertext. The token Token is transmitted to the power selling system and processed by decryption or the like to obtain meter data information.
  • the invention realizes the reverse transmission of the STS prepaid meter to the power selling system, expands the application scenario of the STS protocol, and effectively utilizes the encryption and decryption module provided by the traditional power selling system.
  • the prepaid system proposed by the present invention can realize two-way information transmission of a prepaid meter and a power selling system.
  • the Token ciphertext corresponding to the meter data is directly generated by the prepaid meter, which can eliminate the steps of manual meter reading by the staff of the power selling system, and avoid the risks of data errors and tampering caused by manual meter reading.
  • the electricity sales system or user can obtain the relevant data of the electricity meter according to the business change requirements, and transmit the data to the power sales system management platform in the form of token Token ciphertext, and the data transmission efficiency is high and the transmission is accurate.
  • FIG. 2 is a schematic structural diagram of an STS-based prepaid system according to another embodiment of the present invention.
  • This embodiment provides another STS-based prepaid system, which is an STS-based prepaid system corresponding to the prepaid meter 100 and the power selling system 200.
  • the entire prepaid system includes: a first communication module 110, a first processing module 120, a first STS protocol module 130, and a first encryption and decryption The module 140, the second communication module 210, the second encryption and decryption module 240, the second STS protocol module 230, and the second processing module 220.
  • the first communication module 110 is configured to receive the input instruction and output the token Token ciphertext.
  • the first processing module 120 is configured to acquire the meter data in the electricity meter according to the input instruction.
  • the first STS protocol module 130 is configured to convert the meter data into a corresponding token Token plaintext.
  • the first encryption and decryption module 140 is configured to perform encryption processing on the token Token plaintext to obtain a token Token ciphertext.
  • the second communication module 210 is configured to receive the token Token ciphertext; the second encryption and decryption module 240 is configured to decrypt the token Token ciphertext to obtain the token Token plaintext; and the second STS protocol module 230 is configured to use the token Token
  • the plaintext is converted into the corresponding meter data; the second processing module 220 obtains the meter data and performs data processing.
  • the second encryption and decryption module 240 selects a corresponding decryption algorithm to perform decryption processing on the token Token ciphertext.
  • the second processing module 220 may calculate a corresponding remaining amount or remaining power according to the remaining power or the remaining amount and the charging manner.
  • the STS-based prepaid system provided in this embodiment further includes: a verification module; the verification module verifies the decrypted token Token plaintext to ensure that the data transmission, encryption and decryption process is accurate. Further, the verification module performs TID (TokenIdentifier) verification on the decrypted verified token Token plaintext.
  • TID TokenIdentifier
  • FIG. 3 is a schematic flowchart diagram of an STS-based information transmission method according to an embodiment of the present invention.
  • This embodiment provides an STS-based information transmission method, such as the STS based on the embodiment.
  • Information transmission methods include:
  • the electric meter receives an input instruction.
  • This embodiment provides another STS-based information transmission method, and the STS-based information transmission method of the embodiment includes:
  • the first communication module 110 receives the input instruction
  • the first processing module 120 acquires the electric meter data in the electric meter according to the input instruction
  • the first STS protocol module 130 converts the meter data into a corresponding token Token plaintext
  • the first encryption and decryption module 140 encrypts the token Token plaintext to obtain a token Token ciphertext
  • the first communication module 110 outputs a token Token ciphertext
  • the second communication module 210 receives the token Token ciphertext
  • the second encryption and decryption module 240 performs corresponding decryption processing on the token Token ciphertext to obtain the token Token plaintext;
  • the second processing module 220 obtains the meter data and performs data processing.
  • the second processing module 220 may calculate a corresponding remaining amount or remaining power according to the remaining power or the remaining amount and the charging manner.
  • the information transmission method from the prepaid list to the power selling system is as follows:
  • the user needs to cancel the current meter for reasons such as moving, and the remaining available power of the meter is 3kWh.
  • the meter performs a user account operation of the prepaid meter based on input instructions from the user or the power selling system.
  • the meter will generate a meter balance token Token ciphertext corresponding to the meter.
  • the parameters of the STS prepaid list are set as follows: the STS prepaid meter type is an electric meter; the STS prepaid meter electric meter has a unique encoding of 14; the Token encryption and decryption algorithm is a STA encryption and decryption algorithm; and the algorithm element table is a standard replacement table (see the table). 2) Standard replacement table (see Table 3); the token Token ciphertext transmission medium is a 20-digit numeric token Token ciphertext; the token Token ciphertext transmission mode is selected to be transmitted in paper text.
  • the first communication module 110 receives the input instruction and transmits the input instruction to the first processing module 120.
  • the first processing module 120 acquires the remaining power of the meter data in the electricity meter to be 3 kWh according to the input instruction.
  • the first encryption and decryption module 140 extracts the 2bits Class data (referred to as Class) from the token Token plaintext data, and obtains 64-bit application data (hereinafter referred to as Data) and Class, and then enters the STA encryption algorithm to encrypt the Data.
  • Class 2bits Class data
  • Data 64-bit application data
  • Data encrypted by STA (referred to as DataResult) combined with Class rearrangement, add Class in front of DataResult to get 66bits length data, then exchange 27, 28 bits of 66bits data with 64, 65 bits to get the final encrypted binary Token. .
  • the binary token is converted into a token Token with 20 numbers as a representation.
  • Cipher text is converted into a token Token with 20 numbers as a representation.
  • the first communication module 110 transmits the token Token ciphertext in the form of paper text according to the Token transmission mode.
  • the second communication module 210 of the power selling system receives the token Token ciphertext and decrypts the token Token ciphertext into the token Token plaintext by the STA decryption process of the second decryption module 240.
  • the second STS protocol module 230 converts the token Token plaintext into the remaining amount of power of the meter.
  • the second processing module 220 converts the remaining power into a balance according to the remaining power data and the charging method corresponding to the electricity meter of the user meter, and outputs the result.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Beverage Vending Machines With Cups, And Gas Or Electricity Vending Machines (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Computer And Data Communications (AREA)
  • Control Of Vending Devices And Auxiliary Devices For Vending Devices (AREA)

Abstract

本发明公开了一种基于STS的预付费系统及信息传输方法,其中预付费系统包括:第一通信模块、第一处理模块、第一STS协议模块、第一加解密模块。通过STS协议反向将电表信息转化为令牌Token明文,并对令牌Token明文进行加密处理,以令牌Token密文输出。将令牌Token密文传输到STS售电系统,并经解密等处理,以获得预付费表数据信息。在售电系统需要获取预付费表数据时,本发明可省去售电系统员工人工抄表的步骤,也避免了人工抄表所带来的数据错误、篡改等风险。可通过令牌Token密文的形式将数据传输到售电系统管理平台中,数据传输效率高、传输准确。

Description

基于STS的预付费系统及信息传输方法
本申请要求于2017年05月04日提交中国专利局、申请号为201710308504.3、发明名称为“基于STS的预付费系统及信息传输方法”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明属于电力系统技术领域,涉及预付费售电的信息传输技术,特别涉及一种基于STS的预付费系统及信息传输方法。
背景技术
随着电力工业的变革,预付费售电系统已逐步取代传统普通电表系统成为发展的趋势。预付费售电系统需要用户先利用售电系统对账户缴费充值(有介质充值或无介质充值),再将账户中信息传输至预付费表,预付费表通过得到的信息对用户的用电量进行控制。当用户账户中电量使用完后,预付费表会自动判断并对该用户拉闸断电。预付费售电系统可方便于用户的用电和缴费,并且极大地提升了电力部门的资金回归效率。
标准传输规范(Standard Transfer Specification,简称STS)协议作为预付费售电系统中的重要技术,是全球唯一通用的预付费系统开放标准。STS协议定义了从售电系统到预付费表的信息传输流,其过程包括:首先,向售电系统中输入充值、管理或者测试等相关的操作参数;其次,售电系统根据STS协议将操作参数组成最终的应用数据;再次,售电系统依据物理层协议和其传输方式将应用数据转化为令牌Token后传输;之后,预付费表接收到售电系统的 令牌Token后,基于相同的物理层协议得到令牌Token数据;然后,预付费表根据STS协议解析令牌Token得到售电系统的应用数据;最后,预付费表根据应用数据执行相应的充值、管理、测试或显示等操作。在这个过程中,售电系统需接入并使用加密盒来生成加密令牌Token以保证令牌Token所承载的信息的传输的安全可靠性。售电系统负责生成并加密令牌Token,预付费表解密获取令牌Token信息并执行相应的操作,保证售电系统或消费者与预付费表之间的业务安全。
然而在实际应用过程中,售电系统还需要根据某些业务场景从预付费表中获取指定信息,比如当消费者迁移并申请注销账户时,售电系统从预付费表中获取电表余额并返还相对应的现金给消费者等。但是,由于STS协议中令牌Token的单向传输特点,使得STS协议不能全面地涵盖电力相关的业务需求。目前,为了满足此类售电系统还需要根据某些业务场景从预付费表中获取指定信息的业务需求,需要公共事业局对售电系统进行相关信息的额外获取和载入,信息获取时间较长,运营成本较大,同时在操作中会存在载入数据错误等问题。
发明内容
本发明的目的是提出一种基于STS的预付费系统及信息传输方法,可以应用到预付费售电系统设备上。
为了解决上述技术问题,本发明采用了下述技术方案:
一种基于STS的信息传输方法,包括:
电表接收输入的指令;
根据输入的指令,获取电表中的电表数据;
基于STS协议,将电表数据转化为对应的令牌Token明文;
将令牌Token明文进行加密处理,得到令牌Token密文;
输出令牌Token密文。
可选地,加密处理的步骤包括通过生成树算法对令牌Token明文进行加密处理。
具体地,输出令牌Token密文后,还包括:
售电系统接收令牌Token密文;
对令牌Token密文进行对应的解密处理,获得令牌Token明文;
基于STS协议,将令牌Token明文转化为对应的电表数据;
获得电表数据,并进行数据处理。
本发明还提供一种基于STS的预付费系统,包括:第一通信模块(110)、第一处理模块(120)、第一STS协议模块(130)以及第一加解密模块(140);
第一通信模块(110)用于接收输入的指令和输出令牌Token密文;
第一处理模块(120)用于根据输入的指令,获取电表中的电表数据;
第一STS协议模块(130)用于将电表数据转化为对应的令牌Token明文;
第一加解密模块(140)用于对令牌Token明文进行加密处理,得到令牌Token密文。
具体地,第一加解密模块(140)通过生成树算法对令牌Token明文进行加解密处理。
可选地,基于STS的预付费系统还包括:第二通信模块(210)、第二加解密模块(240)、第二STS协议模块(230)以及第二处理模块(220);
第二通信模块(210)用于接收令牌Token密文;
第二加解密模块(240)用于将令牌Token密文进行解密,获得令牌Token明文;
第二STS协议模块(230)用于将令牌Token明文转化为对应的电表数据;
第二处理模块(220)用于获得电表数据,并进行数据处理。
可选地,基于STS的预付费系统还包括对令牌Token明文进行检验的验证模块。
具体地,第二处理模块(220)根据剩余电量或剩余金额以及计费方式,计算对应的剩余金额或剩余电量。
本发明相比于现有技术的有益效果在于:本发明提出基于STS的预付费系统及信息传输方法,通过STS协议反向将电表数据信息转化为令牌Token明文,并对令牌Token明文进行加密处理,以令牌Token密文输出。将令牌Token密文传输到售电系统,并经解密等处理,以获得电表数据信息。本发明实现了STS预付费表到售电系统的反向传输,扩展了STS协议的应用场景,并有效地利用了传统售电系统自带的加解密模块。本发明提出的预付费系统可实现预付费表和售电系统的双向信息传输。另外,由预付费表直接生成与电表数据相对应的令牌Token密文,可省去售电系统员工人工抄表的步骤,也避免了人工抄表所带来的数据错误、篡改等风险。同时,售电系统或用户可根据业务变更需求,获取电表的有关数据,并以令牌Token密文的形式将数据传输到售电系统管理平台中,数据传输效率高、传输准确。
附图说明
图1为本发明的一实施例的基于STS的预付费系统的结构示意图;
图2为本发明的另一实施例的基于STS的预付费系统的结构示意图;
图3为本发明的一实施例的基于STS的信息传输方法的流程示意图。
具体实施方式
以下结合附图,对本发明上述的和另外的技术特征和优点进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明的部分实施例,而不是全部实施例。以下规定本文中,所指令牌Token特指令牌Token密文,Token明文指代令牌Token明文。
图1所示,为本发明一实施例提供的基于STS的预付费系统的结构示意图。
本实施例提供了一种基于STS的预付费系统,该实施例所述基于STS的预付费系统,对应于预付费表100。其中,预付费表100包括:第一通信模块110、第一处理模块120、第一STS协议模块130以及第一加解密模块140。
第一通信模块110用于接收输入的指令和输出令牌Token密文。第一处理模块120用于根据输入的指令,获取电表中的电表数据。第一STS协议模块130用于将电表数据转化为对应的令牌Token明文。第一加解密模块140用于对令牌Token明文进行加密处理,得到令牌Token密文。
具体地,第一通信模块110将外部输入的指令接收到预付费表内,也可以将经加密处理的令牌Token密文进行输出传送。指令的输入方式可以是通过用户按压预付费表指令按钮触发,或是接收售电系统发送指令信号而获得。当售电系统发送的指令信号是令牌Token密文时,电表需要先将令牌Token密文经STS协议的解密流程解密为令牌Token明文。令牌Token明文再经STS协议转化为对电表的输入指令。
具体地,第一通信模块110输出令牌Token密文的传输方式可以是纸质文 本形式,也可以通过电表液晶屏显示、wifi传输、或者CIU显示方式返回给用户。
第一处理模块120在获取电表中的电表数据时,所获得的电表数据可以是已使用电量、剩余电量、剩余金额或各时段使用电量等。
第一STS协议模块130可用于将电表数据转化为对应的令牌Token明文,也可用于将令牌Token明文转化为电表数据。具体地,令牌Token明文中可包含以下参数:预付费表的类型、表厂商、表充值金额、剩余金额、剩余电量、测试信息、新密钥等。其中,STS协议对Token格式和数据域的计算公式进行了定义。Token格式包括:Token类型(2bits)、Token子类型(4bits)、随机数域(4bits)、TID域(24bits)、Register/Amount域(16bits)以及循环冗余校验码(Cyclic Redundancy Check,简称CRC)校验域(16bits)。Register/Amount域如表1所示,由2bits的指数域和14bits的数据域组成。
表1
比特位 15 14 13 12 11 10 9 8
类型 e e m m m m m m
比特位 7 6 5 4 3 2 1 0
类型 m m m m m m m m
Register/Amount域的计算公式为:
Figure PCTCN2017115581-appb-000001
第一加解密模块140用于将所述令牌Token明文进行加密处理;也可根据需要,对输入的令牌Token密文进行解密处理。
优选地,第一加解密模块140的加解密算法可选择生成树算法(Spanning  Tree Algorithm,简称STA)。
具体地,STA加密算法流程如下:
第一,处理电表密钥DK;将8个字节的密钥DK先取反码,得到密钥DK1。
第二,将密钥DK1向右旋转12个比特位得到密钥DK2。
第三,将密钥DK2和应用数据Data各自分成16个的半个字节(简称nibble),进入并执行替换过程,获得64bits的DataTempt。
具体地,将密钥DK2和应用数据Data进入和执行替换过程的操作如下:
初始nibble计数器i为零,替换过程开始后计数器i递增,i=i+1;
判断第i个密钥DK2的nibble的第3个比特位的值;如果为0,则使用替换表1对第i个Data nibble进行替换;如果为1,则使用替换表2对第i个Data nibble进行替换。
例如,当第1个密钥DK2的nibble的第3个比特位的值为0,第1个Data nibble的值为3(00112),则使用如表3的替换表1中第3个的数字进行替换,将第1个Data nibble的值替换为4(01002);当第1个密钥DK2的nibble的第3个比特位的值为1,第1个Data nibble的值为8(10002),则使用如表3的替换表2中第8个的数字进行替换,将第1个Data nibble的值替换为2(00102)。
替换之后再进行计数器递增继续执行,直到Data的16个nibble全部替换,替换后的Data(简称DataTempt)作为参数进入置换操作。
表3
Figure PCTCN2017115581-appb-000002
Figure PCTCN2017115581-appb-000003
第四,完成替换操作后,结合置换表,对DataTempt进行置换操作。首先在置换表中找出DataTempt里的第i个比特位(i=0,1,2......64)所对应的新位置;然后将DataTempt的第i个比特位的值作为新位置中的值。
示例性地,置换表如下表2所示。例如:DataTempt中位7的值为1,对应置换表新位置为位2,因此全部置换后的应用数据(简称DataResultTempt)中位2的值也为1,DataResultTempt位2对应着DataTempt中位7的值。按此方式将DataTempt所有64bits全部置换得到DataResultTempt。
表2
源位置 0 1 2 3 4 5 6 7
新位置 29 27 34 9 16 62 55 2
源位置 8 9 10 11 12 13 14 15
新位置 40 49 38 25 33 61 30 23
源位置 16 17 18 19 20 21 22 23
新位置 1 41 21 57 42 15 5 58
源位置 24 25 26 27 28 29 30 31
新位置 19 53 22 17 48 28 24 39
源位置 32 33 34 35 36 37 38 39
新位置 3 60 36 14 11 52 54 12
源位置 40 41 42 43 44 45 46 47
新位置 31 51 10 26 0 45 37 43
源位置 48 49 50 51 52 53 54 55
新位置 44 6 59 4 7 35 56 50
源位置 56 57 58 59 60 61 62 63
新位置 13 18 32 47 46 63 20 8
第六,将64bits的DataResultTempt向左移动一位得到DataResult。之后再进行前述的替换、置换以及移位操作。如此循环,重复16次后结束STA加密算法流程,得到令牌Token密文。
本发明相比于现有技术的有益效果在于:本发明提出基于STS的预付费系统及信息传输方法,通过STS协议反向将电表数据信息转化为令牌Token明文,并对令牌Token明文进行加密处理,以令牌Token密文输出。将令牌Token传输到售电系统,并经解密等处理,以获得电表数据信息。本发明实现了STS预付费表到售电系统的反向传输,扩展了STS协议的应用场景,并有效地利用了传统售电系统自带的加解密模块。本发明提出的预付费系统可实现预付费表和售电系统的双向信息传输。另外,由预付费表直接生成与电表数据相对应的令牌Token密文,可省去售电系统员工人工抄表的步骤,也避免了人工抄表所带来的数据错误、篡改等风险。同时,售电系统或用户可根据业务变更需求,获取电表的有关数据,并以令牌Token密文的形式将数据传输到售电系统管理平台中,数据传输效率高、传输准确。
图2所示,为本发明的另一实施例提供的基于STS的预付费系统的结构示意图。
本实施例提供了另一种基于STS的预付费系统,该实施例所述基于STS的预付费系统,对应于预付费表100和售电系统200。整个预付费系统包括:第一通信模块110、第一处理模块120、第一STS协议模块130、第一加解密 模块140、第二通信模块210、第二加解密模块240、第二STS协议模块230以及第二处理模块220。
其中第一通信模块110用于接收输入的指令和输出令牌Token密文。第一处理模块120用于根据输入的指令,获取电表中的电表数据。第一STS协议模块130用于将电表数据转化为对应的令牌Token明文。第一加解密模块140用于将所述令牌Token明文进行加密处理,得到令牌Token密文。
其中第二通信模块210用于接收令牌Token密文;第二加解密模块240用于将令牌Token密文进行解密,获得令牌Token明文;第二STS协议模块230用于将令牌Token明文转化为对应的所述电表数据;第二处理模块220获得电表数据,并进行数据处理。
具体地,针对令牌Token加密算法,第二加解密模块240选择对应的解密算法对令牌Token密文进行解密处理。
第二处理模块220可根据剩余电量或剩余金额以及计费方式,计算对应的剩余金额或剩余电量。
可选的,本实施例提供的基于STS的预付费系统,还包括:验证模块;该验证模块对已解密的令牌Token明文进行验证,以确保数据传输、加解密过程准确无误。进一步地,验证模块对已解密已验证的令牌Token明文进行TID(TokenIdentifier)验证。
图3所示,为本发明的一实施例提供的基于STS的信息传输方法流程示意图。
本实施例提供了一种基于STS的信息传输方法,如该实施例的基于STS 的信息传输方法包括:
S301,电表接收输入的指令;
S303,根据输入的指令,获取电表中的电表数据;
S305,基于STS协议,将电表数据转化为对应的令牌Token明文;
S307,将令牌Token明文进行加密处理,得到令牌Token密文;
S309,输出令牌Token密文。
本实施例提供了另一基于STS的信息传输方法,该实施例的基于STS的信息传输方法包括:
第一通信模块110接收输入的指令;
第一处理模块120根据输入的指令,获取电表中电表数据;
第一STS协议模块130将电表数据转化为对应的令牌Token明文;
第一加解密模块140将令牌Token明文进行加密处理,得到令牌Token密文;
第一通信模块110输出令牌Token密文;
第二通信模块210接收令牌Token密文;
第二加解密模块240对令牌Token密文进行对应的解密处理,获得令牌Token明文;
基于STS协议,将令牌Token明文转化为对应的电表数据;
第二处理模块220获得电表数据,并进行数据处理。
第二处理模块220可根据剩余电量或剩余金额以及计费方式,计算对应的剩余金额或剩余电量。
由预付费表到售电系统的信息传输方法如以下具体实施例:
用户因搬家等原因需要对当前电表进行销户,此时电表剩余可用电量为3kWh。电表根据来自用户或者售电系统的输入指令执行预付费表的用户销户操作。同时,依据“销户返余额”的业务要求,电表在销户后会生成一个对应于该电表的电表余额信息令牌Token密文。假定该令牌Token密文属于管理类(Class=2),其子类型为11。STS预付费表的参数设定为:STS预付费表类型为电表;STS预付费表电表的唯一编码为14;Token的加解密算法为STA加解密算法;算法元素表为标准替换表(参见表2)、标准置换表(参见表3);令牌Token密文的传输媒介为20个数字的数值型令牌Token密文;令牌Token密文传输方式选择为以纸质文本形式传输。
第一通信模块110接收输入的指令,并将输入的指令传输给第一处理模块120。第一处理模块120根据输入的指令,获取电表中的电表数据剩余电量为3kWh。结合该数据,第一STS协议模块130将剩余电量、电表的唯一编码、加解密算法、算法元素表选择信息组织成未加密的令牌Token明文。根据STS协议中数据域的计算公式,得到数据域参数e=0,m=3,并根据STS Token格式定义生成一个电表余额为3kWh的令牌Token明文数据。
第一加解密模块140将2bits Class数据(简称Class)从令牌Token明文数据中摘出,得到64bits的应用数据(以下简称Data)和Class两部分,之后进入STA加密算法对Data进行加密操作。
经过STA加密后的Data(简称DataResult)结合Class重新排列组合,将Class加在DataResult前面得到66bits长度数据,再将66bits数据中的27、28位与64、65位交换,得到最终的加密二进制Token。
接着,把二进制Token进行转换,变成以20个数字为表现形式的令牌Token 密文。
第一通讯模块110根据Token传输方式以纸质文本形式传输令牌Token密文。
售电系统的第二通讯模块210接收令牌Token密文,并经加第二解密模块240的STA解密处理,将令牌Token密文解密为令牌Token明文。第二STS协议模块230将令牌Token明文转化为电表的剩余电量。第二处理模块220根据剩余电量数据以及该用户电表对应的电费计费方式,将剩余电量转化为余额,并输出结果。
以上所述的具体实施例,对本发明的目的、技术方案和有益效果进行了进一步的详细说明,应当理解,以上所述仅为本发明的具体实施例而已,并不用于限定本发明的保护范围。特别指出,对于本领域技术人员来说,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (8)

  1. 一种基于STS的信息传输方法,其特征在于,应用于电表,所述方法,包括:
    接收输入的指令;
    根据所述输入的指令,获取电表中的电表数据;
    基于STS协议,将所述电表数据转化为对应的令牌Token明文;
    将所述令牌Token明文进行加密处理,得到令牌Token密文;
    输出所述令牌Token密文。
  2. 根据权利要求1所述的基于STS的信息传输方法,其特征在于,所述将所述令牌Token明文进行加密处理,具体包括:
    通过生成树算法对所述令牌Token明文进行加密处理。
  3. 根据权利要求1所述的基于STS的信息传输方法,其特征在于,还包括:
    售电系统接收所述令牌Token密文;
    对所述令牌Token密文进行对应的解密处理,获得所述令牌Token明文;
    基于STS协议,将所述令牌Token明文转化为对应的所述电表数据;
    获得所述电表数据,并进行数据处理。
  4. 一种基于STS的预付费系统,其特征在于,包括:第一通信模块(110)、第一处理模块(120)、第一STS协议模块(130)以及第一加解密模块(140);
    所述第一通信模块(110)用于接收输入的指令和输出令牌Token密文;
    所述第一处理模块(120)用于根据所述输入的指令,获取电表中的电表数据;
    所述第一STS协议模块(130)用于将所述电表数据转化为对应的令牌Token明文;
    所述第一加解密模块(140)用于对所述令牌Token明文进行加密处理,得到所述令牌Token密文。
  5. 根据权利要求4所述的基于STS的预付费系统,其特征在于,
    所述第一加解密模块(140),具体用于通过生成树算法对所述令牌Token明文进行加解密处理。
  6. 根据权利要求4所述的基于STS的预付费系统,其特征在于,还包括:第二通信模块(210)、第二加解密模块(240)、第二STS协议模块(230)以及第二处理模块(220);
    所述第二通信模块(210)用于接收所述令牌Token密文;
    所述第二加解密模块(240)用于将所述令牌Token密文进行解密,获得所述令牌Token明文;
    所述第二STS协议模块(230)用于将所述令牌Token明文转化为对应的所述电表数据;
    所述第二处理模块(220)用于获得所述电表数据,并进行数据处理。
  7. 根据权利要求6所述的基于STS的预付费系统,其特征在于,还包括对所述令牌Token明文进行检验的验证模块。
  8. 根据权利要求6所述的基于STS的预付费系统,其特征在于,所述第二处理模块(220)根据剩余电量或剩余金额以及计费方式,计算对应的剩余金额或剩余电量。
PCT/CN2017/115581 2017-05-04 2017-12-12 基于sts的预付费系统及信息传输方法 WO2018201723A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
ZA2019/03312A ZA201903312B (en) 2017-05-04 2019-05-24 Sts-based prepayment system and information transmission method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710308504.3A CN107425979A (zh) 2017-05-04 2017-05-04 基于sts的预付费系统及信息传输方法
CN201710308504.3 2017-05-04

Publications (1)

Publication Number Publication Date
WO2018201723A1 true WO2018201723A1 (zh) 2018-11-08

Family

ID=60424464

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/115581 WO2018201723A1 (zh) 2017-05-04 2017-12-12 基于sts的预付费系统及信息传输方法

Country Status (3)

Country Link
CN (1) CN107425979A (zh)
WO (1) WO2018201723A1 (zh)
ZA (1) ZA201903312B (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106781053B (zh) * 2016-11-30 2019-08-20 杭州海兴电力科技股份有限公司 STS的token识别方法及系统
CN107425979A (zh) * 2017-05-04 2017-12-01 杭州海兴电力科技股份有限公司 基于sts的预付费系统及信息传输方法
CN113140075B (zh) * 2021-04-25 2023-02-14 浙江正泰仪器仪表有限责任公司 一种智能表升级方法、装置及智能表
CN113947843A (zh) * 2021-09-30 2022-01-18 浙江恒业电子有限公司 一种基于STS预付费系统中额度扣减token的操作方法及系统
CN113891314B (zh) * 2021-10-26 2024-02-23 海澜智云科技有限公司 一种电力预付费系统的安全保护方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201402280Y (zh) * 2009-04-28 2010-02-10 华南理工大学 基于gprs通讯的三相预付费电能表系统
CN101738516A (zh) * 2008-11-25 2010-06-16 深圳市宝利达实业有限公司 一种电子式电能表数据安全传输的方法及电能表装置
WO2014118717A1 (en) * 2013-01-29 2014-08-07 Itron, Inc. Electricity meter
CN106683281A (zh) * 2016-12-28 2017-05-17 宁波三星医疗电气股份有限公司 一种可切换功能的智能电表及其使用方法
CN107425979A (zh) * 2017-05-04 2017-12-01 杭州海兴电力科技股份有限公司 基于sts的预付费系统及信息传输方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101738516A (zh) * 2008-11-25 2010-06-16 深圳市宝利达实业有限公司 一种电子式电能表数据安全传输的方法及电能表装置
CN201402280Y (zh) * 2009-04-28 2010-02-10 华南理工大学 基于gprs通讯的三相预付费电能表系统
WO2014118717A1 (en) * 2013-01-29 2014-08-07 Itron, Inc. Electricity meter
CN106683281A (zh) * 2016-12-28 2017-05-17 宁波三星医疗电气股份有限公司 一种可切换功能的智能电表及其使用方法
CN107425979A (zh) * 2017-05-04 2017-12-01 杭州海兴电力科技股份有限公司 基于sts的预付费系统及信息传输方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
MOU, XIAOBO ET AL.: "Research on Standard Transfer Specification Pre-Payment Vending Electricity Standard Security System", ELECTROTECHNICS ELECTRIC, 31 May 2015 (2015-05-31) *

Also Published As

Publication number Publication date
CN107425979A (zh) 2017-12-01
ZA201903312B (en) 2020-02-26

Similar Documents

Publication Publication Date Title
WO2018201723A1 (zh) 基于sts的预付费系统及信息传输方法
US10897456B2 (en) Cryptography using multi-factor key system and finite state machine
CN102377566B (zh) 一种电表数据的安全处理装置及系统
CN103595718A (zh) 一种pos终端激活方法、系统、服务平台及pos终端
US8909937B2 (en) Access control system and access control method thereof
JP6135804B1 (ja) 情報処理装置、情報処理方法及びプログラム
CN102625025A (zh) 一种基于图像传输的加密解密方法及系统
US11431489B2 (en) Encryption processing system and encryption processing method
TW201246883A (en) Methods for customizing a Rijndael block cipher
CN102598575B (zh) 用于对密码保护的有效数据单元加速解密的方法和系统
CN102222188A (zh) 一种信息系统用户密码的生成方法
CN103425939B (zh) 一种sm3算法在java环境中的实现方法及系统
KR20100078559A (ko) 원격 검침을 위한 암호화 시스템 및 이의 키 교환 방법
CN102394746A (zh) 一种基于数字传感器的称重系统的数据传输方法
JP4916213B2 (ja) 使用電力量把握システム
CN104462994A (zh) 一种数据加密及解密操作方法
JP5364662B2 (ja) データ管理装置、電力使用量計算システム及びプログラム
CN103209071A (zh) Aes加密装置
KR102550098B1 (ko) 피어 거래 시스템
CN105574419A (zh) 一种数据保护方法和系统
KR102325430B1 (ko) 소프트웨어 라이센스 관리 방법
Ramachandran et al. Design and implementation of SOC in NIOS-II soft core processor for secured wireless communication
Hossain et al. Design And Implementation Of A Rfid And Bar Code Based Smart Meter Security System And Gsm Based Power Unit Observation
KR20230027726A (ko) 양자보안 통신장치 통합형 스마트 계장제어 시스템 및 방법
Susanto Using AES and DES Cryptography for System Development File Submission Security Mobile-Based

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17908451

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17908451

Country of ref document: EP

Kind code of ref document: A1