电能表预付费系统-标准传输规范(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.rhkb.cn/news/452178.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

DISTINCT 去重

1. 单字段去重 以表 student_course 和 表 student 链接为例: SELECT * FROM student_course a INNER JOIN student b ON a.student_idb.id;查询结果如下图: 上图查询结果中,若只需要学生信息,则需要对结果进行去重:…

从零开始学PHP之helloworld

前言 每一门编程语言的第一个程序就是输出hell world(别杠,杠就是你对) 开始 上一篇讲完了开发环境的安装,这次讲编辑器的安装,顺带完成上一篇的作业(输出hello world) 安装PHPstorm 我用的…

分布式介绍

CAP理论 CAP理论是分布式架构中提出来的一种设计思想模型,全称是由Consistency、Availability、Partition Tolerance三个词组成。 C(Consistency,一致性):总能读到最新的写操作的结果A(Availability,可用性):每个请求都要在合理的时间内给出…

如何将本地 Node.js 服务部署到宝塔面板:完整的部署指南

文章简介: 将本地开发的 Node.js 项目部署到线上服务器是开发者常见的工作流程之一。在这篇文章中,我将详细介绍如何将本地的 Node.js 服务通过宝塔面板(BT 面板)上线。宝塔面板是一个强大的服务器管理工具,具有简洁的…

使用 Go 语言实现 WebSocket的核心逻辑

文章目录 WebSocket 简介时序图核心逻辑Client 结构与功能创建新客户端消息读取逻辑 (ReadPump)发送消息逻辑 (Send)客户端管理器 (ClientManager)WebSocket 处理器处理心跳与长连接 总结 本文将基于 Go 语言,通过使用 gorilla/websocket 库来实现一个简单的聊天应用…

教电脑“看”图片

教电脑“看”图片 计算机视觉简介 上一篇:《自己DIY首个人工智能模型》 序言:人是如何“看”图片的?人类感知周围世界,主要依赖看、听、闻、触这些感官,而“看”是最普遍和直观的方式。计算机视觉,就是对…

前端html,css 样式巩固1

想做这样 一个效果 点击图片切换 当前的选中图片 我们使用 原生的js html 来开发这个 直接粘贴代码 相信大家 都能看懂的 <!DOCTYPE html> <html lang"en"><head><meta charset"UTF-8"><meta name"viewport" …

力扣动态规划基础版(斐波那契类型)

70. 爬楼梯https://leetcode.cn/problems/climbing-stairs/ 70.爬楼梯 方法一 动态规划 考虑转移方程和边界条件&#xff1a; f&#xff08;x&#xff09; f&#xff08;x -1&#xff09; f&#xff08;x - 2&#xff09;;f&#xff08;1&#xff09; 1&#xff1b;f&…

CNN-BiLSTM回归预测 | MATLAB实现CNN-BiLSTM卷积双向长短期记忆神经网络多输入单输出回归预测

回归预测 | MATLAB实现CNN-BiLSTM(卷积双向长短期记忆神经网络)多输入单输出 目录 回归预测 | MATLAB实现CNN-BiLSTM(卷积双向长短期记忆神经网络)多输入单输出效果一览基本介绍程序设计学习总结参考资料效果一览 基本介绍 提出一种同时考虑时间与空间因素的卷积-双向长短期记…

UART协议

文章目录 UART 协议主要特点UART控制器组成部分工作流程 UART寄存器(fs4412)输入输出重定向 UART 协议 UART&#xff08;Universal Asynchronous Receiver/Transmitter&#xff0c;通用异步收发传输器&#xff09;是一种串行通信协议&#xff0c;用于在计算机或外设之间进行数…

java集合进阶篇-《Collection集合》

个人主页→VON 收录专栏→java从入门到起飞 目录 一、前言 二、Collection集合简要概述 Collection的主要实现 Collection的方法 迭代器&#xff08;Iterator&#xff09; 三、单列集合顶层接口Collection CollectionDemo01 CollectionDemo02 CollectionDemo03 Collec…

问题记录:matlab中spatial contact force模块下关于stiffness(刚度)的设定

最近在搞一阶倒立摆&#xff0c;在matlab仿真时遇到这样的问题&#xff1a;stiffness设置为10e5就会发生碰撞后穿透&#xff0c;&#xff08;四个spatial contact force模块是分别连接小车四个轮子和地面的&#xff09; 而设置成10e6就不会有问题&#xff0c; 由于本人也是第一…

微信小程序上传组件封装uploadHelper2.0使用整理

一、uploadHelper2.0使用步骤说明 uploadHelper.js ---上传代码封装库 cos-wx-sdk-v5.min.js---腾讯云&#xff0c;对象存储封装库 第一步&#xff0c;下载组件代码&#xff0c;放置到自己的小程序项目中 第二步、 创建上传对象&#xff0c;执行选择图片/视频 var _this th…

【H2O2|全栈】关于CSS(14)如何完成常规的页面布局

目录 基本布局方式 前言 准备工作 管理系统界面 APP界面 区域内的滚动条 结束语 基本布局方式 前言 通过上一次学习如何让页面适应任意屏幕的学习&#xff0c;我们就可以开始学习如何用代码“画”出基本的框架了。本期主要分享如何绘制基本的PC端管理系统和移动端APP的…

新颖的 setTimeout() 替代方案

在前端开发中&#xff0c;长时间运行的JavaScript任务一直是一个棘手的问题。它们会导致页面无响应&#xff0c;影响用户体验。传统上&#xff0c;开发者使用setTimeout()来分割长任务&#xff0c;但这种方法存在明显的缺陷。最近&#xff0c;Chrome 129引入了一种新的、更高效…

机器学习面试笔试知识点-线性回归、逻辑回归(Logistics Regression)和支持向量机(SVM)

机器学习面试笔试知识点-线性回归、逻辑回归Logistics Regression和支持向量机SVM 一、线性回归1.线性回归的假设函数2.线性回归的损失函数(Loss Function)两者区别3.简述岭回归与Lasso回归以及使用场景4.什么场景下用L1、L2正则化5.什么是ElasticNet回归6.ElasticNet回归的使…

视频云存储/音视频流媒体视频平台EasyCVR视频汇聚平台在欧拉系统中启动失败是什么原因?

视频监控/视频集中存储/磁盘阵列EasyCVR视频汇聚平台具备强大的拓展性和灵活性&#xff0c;支持多种视频流的外部分发&#xff0c;如RTMP、RTSP、HTTP-FLV、WebSocket-FLV、HLS、WebRTC、fmp4等&#xff0c;这为其在各种复杂环境下的部署提供了便利。 安防监控EasyCVR视频汇聚平…

分布式数据库安全可靠测评名录之平凯数据库(TiDB企业版)

作者&#xff1a; 数据源的TiDB学习之路 原文来源&#xff1a; https://tidb.net/blog/d052ee0b 2024 年 9 月 30 日&#xff0c;中国信息安全测评中心公布安全可靠测评结果公告&#xff08;2024年第2号&#xff09;&#xff0c;其中包含 6 款集中式数据库和 11 款分布式数据…

鸿蒙网络编程系列30-断点续传下载文件示例

1. 断点续传简介 在文件的下载中&#xff0c;特别是大文件的下载中&#xff0c;可能会出现各种原因导致的下载暂停情况&#xff0c;如果不做特殊处理&#xff0c;下次还需要从头开始下载&#xff0c;既浪费了时间&#xff0c;又浪费了流量。不过&#xff0c;HTTP协议通过Range…

信息安全工程师(58)网络安全漏洞处置技术与应用

前言 网络安全漏洞处置技术与应用是一个复杂而关键的领域&#xff0c;它涉及漏洞的发现、评估、修补以及后续的监控与防范等多个环节。 一、网络安全漏洞发现技术 网络安全漏洞发现技术是漏洞处置的首要步骤&#xff0c;它旨在通过各种手段识别出网络系统中存在的潜在漏洞。这些…