CN108038979B - Sustainable operation method based on STS prepayment system - Google Patents
Sustainable operation method based on STS prepayment system Download PDFInfo
- Publication number
- CN108038979B CN108038979B CN201711019518.XA CN201711019518A CN108038979B CN 108038979 B CN108038979 B CN 108038979B CN 201711019518 A CN201711019518 A CN 201711019518A CN 108038979 B CN108038979 B CN 108038979B
- Authority
- CN
- China
- Prior art keywords
- token
- token0
- data
- meter
- tid
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07F—COIN-FREED OR LIKE APPARATUS
- G07F15/00—Coin-freed apparatus with meter-controlled dispensing of liquid, gas or electricity
- G07F15/06—Coin-freed apparatus with meter-controlled dispensing of liquid, gas or electricity with means for prepaying basic charges, e.g. rent for meters
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/64—Protecting data integrity, e.g. using checksums, certificates or signatures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Beverage Vending Machines With Cups, And Gas Or Electricity Vending Machines (AREA)
- Storage Device Security (AREA)
Abstract
The invention provides a sustainable operation method based on STS prepaid system, which is mainly completed by the following technical proposal: a method for sustainable operation of a pre-paid system based on STS, comprising the steps of: when the reference date is switched, clearing the TID stack in the meter and storing the secret value; calling an encryption box according to the requirement to obtain a string of 20 numbers of Token0, and converting the string of 20 numbers into a 16-system representation; taking out 2bits of Token types to obtain 64 bits of Token0 data ciphertext, and adding the Token0 data ciphertext and the secret value to obtain 64 bits of Token data; inserting the extracted 2-bit Token type into the Token data, and converting the Token data into 20-digit tokens; after receiving the Token, the meter analyzes the Token to obtain Token0, performs CRC check and TID identification, and after the checksum identification is successful, the meter stores the TID of Token0 and executes corresponding operation. The method enables the existing STS prepaid system to be continuously used without replacing the encryption box and without being influenced by the reference date.
Description
Technical Field
The invention relates to a sustainable operation method based on an STS (service standard specification) prepayment system, which is mainly applied to the industry of intelligent electric meters.
Background
The STS standard specifies three reference dates: 1993-01-0100: 00:00, 2014-01-0100: 00:00, and 2035-01-0100: 00:00 to indirectly define a date TID at the time of Token generation (TID is the number of minutes offset from a reference date by the current date). When the reference date is reached, all objects in the STS prepayment system need to be switched with the reference date; and the STS association specifies that all key-related, encryption-decryption-related operations and Token generation are performed by hardware encryption boxes (hereinafter abbreviated as encryption boxes). When the reference date is switched, the electricity selling key needs to be replaced, the Token key algorithm needs to be upgraded, and the like. Based on the fact that the encryption box in the current STS prepaid system does not have a new Token key algorithm function and a function of converting a reference date, in order to continuously use the STST prepaid system and public service units (hereinafter referred to as users) such as a power bureau and the like, the encryption box in the current STS prepaid system needs to be upgraded, the electricity selling key needs to be upgraded, the meter needs to be upgraded and all related strategies need to be upgraded.
In addition, because only one encryption box manufacturer of the STS prepaid system exists at present, the newly upgraded encryption box enables the license use limited function and reformulates the interface protocol between the encryption box and the electricity selling system; in order to obtain the use authority of the encryption box, a user not only needs to upgrade the electricity selling system, but also needs to purchase a new license to an encryption box manufacturer every year or when the use of the encryption box is limited so as to normally use the encryption box to sell electricity.
By observing the characteristics, the upgrading of the STS prepayment system brings extra manpower and material cost to users, such as omnibearing upgrading of a power selling system, replacement of meter keys in the whole supply group range, encryption box license cost and the like.
Disclosure of Invention
The present invention is directed to overcome the above problems and to provide a method for continuously operating an STS-based prepaid system, which enables an existing STS prepaid system to be continuously used without changing a cipher box, without being affected by a reference date.
The object of the invention is achieved by the following technical solution,
a method for sustainable operation of a pre-paid system based on STS, comprising the steps of:
when the reference date is switched, clearing the TID stack in the meter and storing the secret value;
calling an encryption box according to the requirement to obtain a string of 20 numbers of Token0, and converting the string of 20 numbers into a 16-system representation;
taking out 2bits of Token types to obtain 64 bits of Token0 data ciphertext, and adding the Token0 data ciphertext and the secret value to obtain 64 bits of Token data;
inserting the extracted 2-bit Token type into the Token data, and converting the Token data into 20-digit tokens;
after receiving the Token, the meter analyzes the Token to obtain Token0, performs CRC check and TID identification, and after the checksum identification is successful, the meter stores the TID of Token0 and executes corresponding operation.
Preferably, the clearing of the TID stack in the table meter and the storage of the secret value are specifically:
the electricity selling system generates a Token for clearing the TID stack of the meter, and fills a secret value in the Amount field of the Token;
when the reference date is switched, the electricity selling system inputs the Token into the corresponding meter, and after the identification of the meter, the meter clears the TID stack and stores the secret value.
Preferably, after receiving the Token, the meter analyzes the Token to obtain Token0, specifically:
converting the 20 digital tokens into 66 bits of data;
splitting the 66-bit data to obtain 2-bit Token types and 64-bit Token data;
subtracting the secret value stored in the table from the Token data to obtain a Token0 data ciphertext;
inserting the extracted 2-bit Token type into the Token0 data ciphertext to obtain Token 0.
Compared with the prior art, the invention has the following advantages and effects: 1. the invention not only eliminates the obstacle that the user must upgrade the current encryption box, but also solves the problem that the meter identification Token is wrong or the user illegally uses the Token caused by using the current STS prepayment system after the reference date is switched; under the condition of meeting the requirement that a user can continuously use the current STS prepayment system, the utilization rate of STS system equipment is improved, extra cost is greatly reduced, and the security of Token can be ensured to a certain extent. 2. Besides, the encryption box does not need to be updated, a new key does not need to be applied again, and the Token without TID clearing function in the existing STS is filled. In the aspect of traffic, TID clearing operation can be performed in addition to the converted key, and the secret value ensures that the Token used after TID clearing cannot be used by the user.
Drawings
FIG. 1 is a diagram illustrating the management of Token format according to the present invention.
Fig. 2 is a flowchart of Token generation operation in the background art of the present invention.
Fig. 3 is a flowchart of Token parsing operation in the background art of the present invention.
Figure 4 is a schematic diagram of the Token format of the clearing table meter TID stack of the present invention.
FIG. 5 is a flowchart of the Token generation operation of the present invention.
FIG. 6 is a flowchart of the Token parsing operation of the present invention.
Detailed Description
The present invention will be described in detail with reference to the accompanying drawings.
The invention utilizes the characteristic that STS manages Token to set the table parameters on service, combines the calculation method of data defined in STS standard in Token and the Token generation process, and provides a solution for continuously using the existing STS prepayment system without replacing the encryption box.
STS is divided into three categories according to different Token use scenes: recharging, managing and testing the Token; wherein the management Token format is defined as: token type (Class, 2bits), Token subtype (SubClass, 4bits), random number field (RND, 4bits), TID field (24bits), Register/Amount field (16bits), and CRC check field (16bits), as shown in fig. 1.
The STS defines a Token generation process (as shown in fig. 2), and the following operation steps are performed in the Token generation operation flow:
firstly, splitting a 66-bit Token data plaintext to obtain 2-bit Token types and 64-bit Token data;
then, encrypting the Token data with 64 bits to obtain a ciphertext;
then, combining the Token types of 2bits with the 64-bit ciphertext to obtain a final Token of 66 bits;
finally, the 66-bit Token is converted into a 20-digit Token code.
Similarly, the following steps are performed in the operation flow (shown in fig. 3) for parsing Token:
firstly, converting 20-digit Token codes into 66-bit tokens;
secondly, splitting the Token with 66 bits to obtain 2 Token types and 64-bit ciphertext data;
then, decrypting the Token data with 64 bits to obtain the Token data;
and finally, combining the 2-bit Token types with the 64-bit Token data to obtain the final 66-bit Token plaintext.
After the table meter successfully and primarily processes Token according to the above steps, CRC check and TID validity identification are performed on Token. When the TID of Token is smaller than the minimum TID stored in the table, the Token is an expired Token; when the TID of Token is already stored in the table, Token is used; the Token key is expired if the upper 8 bits of the Token TID represent a larger number than the key expiration parameter (KEN) stored in the table. If any of the above points is satisfied, the meter will refuse the Token, otherwise the meter records the TID of the Token in the secure storage area and performs the relevant operation required by the Token.
Over time, the TID value in Token will become larger and larger, and eventually will exceed the number that can be represented by 24 bits. Therefore, when the STS prepaid system reaches the next new reference date, the whole STS prepaid system will change the reference date and turn the TID over before the TID overrun (TID starts to calculate the number of minutes offset with reference to the new reference date).
Considering that the newly upgraded STS encryption box brings extra license cost and all on-site meter needs to perform STS key conversion to deal with TID flipping and reference date replacement, the encryption box of the current STS prepaid system can be continuously used in the following manner, so that the cost is reduced and the sustainable development of the STS prepaid system is ensured.
An operation method of the STS-based prepaid system includes:
A. when the reference date is switched, the TID stack in the meter is cleared, and the secret value is safely stored; after that, the electricity selling system generates Token according to the steps shown in fig. 5;
B. inputting functional parameters required by a customer into the electricity selling system, and calling an encryption box of the electricity selling system;
C. a string of 20 digits, Token0, is obtained and converted into a 16-ary representation;
D. taking out 2bits of Token types to obtain 64 bits of Token0 data ciphertext, and adding the Token0 data ciphertext and the secret value to obtain 64 bits of Token data, namely Token data which is Token0 data ciphertext + secret value;
E. inserting the Token type of the 2bits taken out in the previous step (step D) into the Token data to obtain a Token of 66 bits, and converting the Token into a Token of 20 digits;
F. the electricity selling system issues the obtained Token to the meter, and after receiving the Token, the meter analyzes the Token according to the steps shown in fig. 6, specifically:
f1, converting the received 20 digital tokens into 66 bits of data;
f2, splitting the 66-bit data to obtain 2-bit Token types and 64-bit Token data;
f3, subtracting the secret value stored in the table from the Token data to obtain a Token0 data ciphertext, that is, a Token0 data ciphertext is the Token data-secret value;
f4, inserting the 2-bit Token type extracted in the step F2 into the Token0 data ciphertext to obtain a Token 0.
G. After decrypting the Token0, the meter performs CRC check and TID identification, and after the check and identification are successful, the meter stores the TID of Token0 and executes the operation corresponding to Token 0.
Preferably, the clearing of the TID stack in the table meter and the storage of the secret value are specifically: the electricity vending system creates a Token for clearing the meter TID stack based on the custom management Token assigned to the vendor in the STS standard, and fills a secret value such as 4660(0x1234) in the ampount field of Token, as shown in fig. 4. When the reference date is switched, the electricity selling system inputs the Token into the corresponding meter, and after the meter is identified, the meter clears the TID stack and safely stores the secret value.
Claims (2)
1. A sustainable operation method for a prepaid STS-based system, comprising the steps of:
when the reference date is switched, clearing the TID stack in the meter and storing the secret value;
calling an encryption box according to the requirement to obtain a string of 20 numbers of Token0, and converting the string of 20 numbers into a 16-system representation;
taking out 2bits of Token types to obtain 64 bits of Token0 data ciphertext, and adding the Token0 data ciphertext and the secret value to obtain 64 bits of Token data;
inserting the extracted 2-bit Token type into the Token data, and converting the Token data into 20-digit tokens;
after receiving the Token, the meter analyzes the Token to obtain Token0, performs CRC check and TID identification, and after the check and identification are successful, the meter stores the TID of Token0 and executes corresponding operation;
after receiving the Token, the meter analyzes the Token to obtain Token0, which specifically includes:
converting the 20 digital tokens into 66 bits of data;
splitting the 66-bit data to obtain 2-bit Token types and 64-bit Token data;
subtracting the secret value stored in the table from the Token data to obtain a Token0 data ciphertext;
inserting the extracted 2-bit Token type into the Token0 data ciphertext to obtain Token 0.
2. The method of claim 1, wherein the TID stack in the meter is cleared and a secret value is stored, specifically:
the electricity selling system generates a Token for clearing the TID stack of the meter, and fills a secret value in the Amount field of the Token;
when the reference date is switched, the electricity selling system inputs the Token into the corresponding meter, and after the identification of the meter, the meter clears the TID stack and stores the secret value.
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711019518.XA CN108038979B (en) | 2017-10-27 | 2017-10-27 | Sustainable operation method based on STS prepayment system |
PCT/CN2018/075767 WO2019080409A1 (en) | 2017-10-27 | 2018-02-08 | Sustainable operation method based on sts prepayment system |
ZA2020/03103A ZA202003103B (en) | 2017-10-27 | 2020-05-26 | Sustainable operation method based on sts prepayment system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711019518.XA CN108038979B (en) | 2017-10-27 | 2017-10-27 | Sustainable operation method based on STS prepayment system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108038979A CN108038979A (en) | 2018-05-15 |
CN108038979B true CN108038979B (en) | 2020-07-28 |
Family
ID=62093389
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711019518.XA Active CN108038979B (en) | 2017-10-27 | 2017-10-27 | Sustainable operation method based on STS prepayment system |
Country Status (3)
Country | Link |
---|---|
CN (1) | CN108038979B (en) |
WO (1) | WO2019080409A1 (en) |
ZA (1) | ZA202003103B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113507451B (en) * | 2021-06-18 | 2023-11-24 | 深圳市思达仪表有限公司 | STS (Standard template S) token expansion method |
CN113947843A (en) * | 2021-09-30 | 2022-01-18 | 浙江恒业电子有限公司 | Operation method and system for deducting token based on amount in STS (service standard specification) prepayment system |
CN114220222B (en) * | 2021-11-30 | 2023-09-05 | 杭州海兴电力科技股份有限公司 | Offline prepaid electric quantity recharging method and system |
Family Cites Families (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003216822A (en) * | 2002-01-21 | 2003-07-31 | Fujitsu Ltd | System and method for stock bank |
CN101339681A (en) * | 2008-08-08 | 2009-01-07 | 深圳市思达仪表有限公司 | One-card-pass pre-payment system |
JP5467592B2 (en) * | 2009-11-13 | 2014-04-09 | セイコーインスツル株式会社 | Long-term signature server |
CN102013136B (en) * | 2010-11-24 | 2013-01-02 | 深圳市思达仪表有限公司 | Prepayment energy meter |
CN104318671B (en) * | 2014-09-30 | 2016-09-28 | 江苏林洋能源股份有限公司 | A kind of pre-paying method of the ammeter of high security without medium |
EP3213276A1 (en) * | 2014-10-31 | 2017-09-06 | Deutsche Telekom AG | Prepaid metering adaptor |
US20160183083A1 (en) * | 2014-12-19 | 2016-06-23 | Motorola Solutions, Inc. | User equipment and method for dynamic internet protocol multimedia subsystem (ims) registration |
CN106157439A (en) * | 2015-04-20 | 2016-11-23 | 中兴通讯股份有限公司 | A kind of method and device that pre-paying kilowatt-hour meter is supplemented with money |
CN106327273A (en) * | 2015-06-17 | 2017-01-11 | 中兴通讯股份有限公司 | STS-based prepaid electricity selling system and method |
WO2017031721A1 (en) * | 2015-08-26 | 2017-03-02 | 深圳市思达仪表有限公司 | Prepaid electric energy meter |
US10142107B2 (en) * | 2015-12-31 | 2018-11-27 | Microsoft Technology Licensing, Llc | Token binding using trust module protected keys |
CN106325955A (en) * | 2016-08-30 | 2017-01-11 | 威胜集团有限公司 | Remote upgrading method of STS prepayment meter |
CN106781053B (en) * | 2016-11-30 | 2019-08-20 | 杭州海兴电力科技股份有限公司 | The token recognition methods of STS and system |
CN106790144B (en) * | 2016-12-28 | 2020-01-17 | 宁波三星医疗电气股份有限公司 | STS prepaid production encryption system and operation method |
-
2017
- 2017-10-27 CN CN201711019518.XA patent/CN108038979B/en active Active
-
2018
- 2018-02-08 WO PCT/CN2018/075767 patent/WO2019080409A1/en active Application Filing
-
2020
- 2020-05-26 ZA ZA2020/03103A patent/ZA202003103B/en unknown
Also Published As
Publication number | Publication date |
---|---|
WO2019080409A1 (en) | 2019-05-02 |
ZA202003103B (en) | 2021-10-27 |
CN108038979A (en) | 2018-05-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101632086B (en) | Authentication device and method | |
CN104318671A (en) | Prepayment method of medium-free high-security electricity meters | |
CN108038979B (en) | Sustainable operation method based on STS prepayment system | |
AU708404B2 (en) | Billing procedure and system for data-transmission networks | |
CN100517357C (en) | Secure license key method and system | |
CN110224823B (en) | Transformer substation message safety protection method and device, computer equipment and storage medium | |
CN109617675A (en) | Both sides' identification authentication method and system between a kind of charge-discharge facility and user terminal | |
CN112395353A (en) | Intelligent electric energy meter quality data sharing method and system based on alliance chain | |
CN113704780A (en) | Model-driven-based power distribution network user side information adaptive encryption method | |
US11481851B2 (en) | Secure tokens for controlling access to a resource in a resource distribution network | |
US11481852B2 (en) | Secure tokens for controlling access to a resource in a resource distribution network | |
CN115964728A (en) | File encryption method and device based on consensus algorithm | |
US20130254541A1 (en) | Access control system and a user terminal | |
CN104699046B (en) | It is a kind of to be realized with public network to photovoltaic or the method and system of wind power station remote control | |
CN113378189A (en) | Authentication and verification method and system for load identification module | |
CN106096942B (en) | Prepayment method and system, terminal and server | |
CN109166199A (en) | A kind of generation method of password, device and equipment | |
CN113329014A (en) | Information transmission device based on electric power thing networking encryption communication authentication | |
AU2020367794A1 (en) | Secure tokens for controlling access to a resource in a resource distribution network | |
CN111489462B (en) | Personal Bluetooth key system | |
CN107968764A (en) | A kind of authentication method and device | |
CN108848089B (en) | Data encryption method and data transmission system | |
CN103136875B (en) | Method using dynamic password to conduct time limit management on tax-control cash register and system | |
CN106204016A (en) | A kind of pre-paying method and system, terminal, server | |
CN117118756B (en) | Data interaction method, device, computer equipment and computer readable storage medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |