当前位置: 首页 > news >正文

电能表预付费系统-标准传输规范(STS)(13)

6.3 Token data elements 令牌数据元素

6.3.1 Data elements used in tokens 使用在令牌上的数据元素

The data elements given in Table 1 3 are used in tokens in various combinations and are all encoded in binary format.

        表13中给出的数据元素以各种组合用于令牌中,并且都以二进制格式编码。
Table 13 – Data elements used in tokens

        表 13 令牌所采用的数据

 6.3.2 Class: TokenClass

Tokens are classified into 4 main functional areas as given in Table 14.

        令牌分为表14所示的4个主要功能区域。

Class 0 and Class 2 tokens are encrypted using the DecoderKey, while Class 1 tokens are not encrypted and can thus be used on any STS-compliant payment meter.

        0类和2类令牌使用DecoderKey加密,而1级令牌不加密,因此可以在任何符合sts的支付仪表上使用。 

6.3.3 SubClass: TokenSubClass

Further sub-classification of the TokenClass is given in Table 15.

        表15给出了TokenClass的进一步子分类。 

6.3.4 RND: RandomNumber

The generation of this 4-bit number will be a snapshot of the four least significant bits of at least a millisecond counter. The inclusion of a random number in the data to be transferred enhances the security of the token transfer by providing a probability of 1 6:1 that no two tokens containing identical data to be transferred will have the same binary pattern. The control of this data element shall be implemented in a secure environment such as a hardware cryptographic module.

        这个4位数字的生成将是至少一个毫秒计数器的四个最低有效位的快照。在要传输的数据中包含一个随机数,通过提供1:6:1的概率来增强令牌传输的安全性,即没有两个包含要传输的相同数据的令牌具有相同的二进制模式。该数据元素的控制应在安全的环境中实现,例如硬件加密模块。 

6.3.5 TID: TokenIdentifier

6.3.5.1 TID calculation

The TID field is derived from the date and time of issue and indicates the number of minutes elapsed from the BaseDate associated with the VendingKey. This field is a 24-bit binary representation of the elapsed minutes.

        TID字段派生自发布的日期和时间,并指示从与VendingKey关联的BaseDate经过的分钟数。该字段是经过的分钟的24位二进制表示形式。

NOTE The definition of BaseDate now references UTC (see 6.1 .1 2), whereas previously it implicitly referenced local time.

        注:BaseDate的定义现在引用UTC(见6.1 . 2),而以前它隐式引用本地时间。

For example: with a date and time format of YYYY:MM:DD:hh:mm:ss the BaseDate and time of 1 993:01 :01 :00:00:00 corresponds to a TID value of 0.

        例如:日期和时间格式为YYYY:MM:DD:hh: MM: ss,则BaseDate和time为1993:01:01:00:00:00对应的TID值为0。

The calculation of elapsed minutes shall take leap years into account.The rule used to determine a leap year is:
• the month of February shall have an extra day in all years that are evenly divisible by 4,
except for century years (those ending in -00), which receive the extra day only if they are
evenly divisible by 400. Thus 1 996 was a leap year whereas 1 999 was not, and 1 600,
2000 and 2400 are leap years but 1 700, 1 800, 1 900 and 21 00 are not.

        计算经过的分钟数时应考虑闰年。 确定闰年的规则是:2月在所有能被4整除的年份中都有额外的一天,除了百年年(以-00结尾的年份),只有当它们能被400整除时,才会有额外的一天。1996年是闰年,而1999年不是闰年,1600年是闰年,2000年和2400年是闰年,而1700年、1800年、1900年和2100年不是闰年。 

In the binary representation of the TID the leftmost bit represents the most significant bit.When calculating the TID the “:ss” value shall be truncated from the actual time.Examples of TID calculated values are given in Table 1 6.

        在TID的二进制表示中,最左边的位表示最高有效位。在计算TID时,将“:ss”值从实际时间中截断。TID计算值的例子载于表16。 

Table 16 – TID calculation examples

In order to prevent token re-use when a BaseDate change is performed, certain operational procedures need to be performed. Refer to Clause C.1 2 for additional information.

        为了防止在执行BaseDate更改时重用令牌,需要执行某些操作过程。有关其他信息,请参阅第C.12条。 

6.3.5.2 SpecialReservedTokenIdentifier

The TokenIdentifier corresponding to 00 h 01 min of each day is reserved for special application tokens and may not be used for any other token.Using the date and time format of YYYY:MM:DD:hh:mm:ss the reserved TID values correspond to xxxx:xx:xx:00:01 :xx.

        对应于每天00时01分的TokenIdentifier为特殊应用令牌保留,不能用于任何其他令牌。如果日期和时间格式为YYYY:MM:DD:hh: MM: ss,则TID保留值对应于xxxx:xx:xx:00:01:xx。 

If a token, other than a special application token is to be generated on a time corresponding to this reserved TID, then 1 min shall be added to the TID.See also Clause C.5 Code of practice for the management of this special reserved TID.The use of special application tokens are optional (see Clause C.12), but the rule for how to use the special reserved TID is mandatory.

        如果在此保留TID对应的时间生成除特殊应用令牌以外的令牌,则TID需增加1 min。另请参阅工作守则第C.5条,以了解本特别保留的TID的管理。特殊应用令牌的使用是可选的(参见条款C. 12),但是如何使用特殊保留TID的规则是强制性的。 

6.3.5.3 Multiple tokens generated within the same minute

The POS shall ensure that no legitimately purchased token can carry the same TID as that of any other legitimately purchased token for the same payment meter even if more than one token is purchased within the same minute on the same POS.

        POS机应确保任何合法购买的令牌,即使在同一分钟内在同一POS机上购买多个令牌,也不能携带与其他任何合法购买的令牌相同的TID。 

If multiple tokens need to be generated within the same minute for the same payment meter, then 1 min shall be added to the TID of each successive token in the set. At the end of the token generating process the POS shall revert back to real time again.

        如果同一支付表需要在同一分钟内生成多个令牌,则集合中每个连续令牌的TID加1分钟。在令牌生成过程结束时,POS将再次恢复到实时状态。

This shall apply to any token that implements a TID.This shall not apply to special application tokens that implement the SpecialReserved TokenIdentifier (see 6.3.5.2).

        这将适用于实现TID的任何令牌。这不适用于实现SpecialReserved TokenIdentifier的特殊应用令牌(见6.3.5.2)。
For example: if 3 credit tokens A, B and C are generated within the same minute at 1 3h23 and in sequential order A, B and C, then A shall carry the TID time stamp 1 3h23, B shall carry time stamp 1 3h24 and C shall carry 1 3h25.

        例如:如果在同一分钟内,在13h23产生了3个信用令牌A、B、C,并且依次为A、B、C,则A的TID时间戳为13h23, B的时间戳为13h24, C的时间戳为13h25。 


http://www.mrgr.cn/news/54121.html

相关文章:

  • 【FAQ】HarmonyOS SDK 闭源开放能力 —Map Kit(3)
  • Unity DOTS中的Archetype与Chunk
  • idea 2023 创建 springboot 项目 LTS
  • 东方通 TongRDS V2 配置与开机自启指南及 Spring Boot 集成
  • HTML DOM 简介
  • 前端使用Canvas实现网页电子签名(撤销、下载)
  • 【str_replace替换导致的绕过】
  • 解决因内存过小芯片使用malloc造成内存碎片使程序偶发性卡死问题
  • mysql 10 单表访问方法
  • Java 数据基本类型详解(各基本数据类型及其大小、数据类型转换、数据溢出问题、自动装箱与拆箱的影响)
  • 架构师之路-学渣到学霸历程-23
  • 理解C#中空值条件运算符及空值检查简化
  • 十五、Python基础语法(list(列表)-上)
  • AI写作助手系统盈利模式分析:打造盈利的AI网站
  • 可能要招1000+应届生!直击美团心动岗位 - 美团面试原题 - 贪心算法题如何用 go 和 C++ 解决
  • 【CSAPP】【答案/解析】《深入理解计算机系统》实验一/datalab-handout实验
  • 记录迷茫!
  • 【运维基础知识】《Linux 系统架构与文件系统及权限管理全解析》
  • java反射介绍
  • Kubernetes运行 Llama3
  • ntfs MFT损坏(ntfs文件系统故障)导致oracle异常恢复---惜分飞
  • 使用Version Catalog在项目之间共享版本
  • target_include_directories是如何组织头文件的?
  • Android开发相关的重要网站
  • 《数字图像处理基础》学习02-BMP位图文件
  • 浅析DDR