WO2018040879A1

Password keyboard usb communication anomaly recovery method and system

Abstract

The present invention relates to the technical field of USB communications, and provides a password keyboard USB communication anomaly recovery method and system. The method comprises the following steps: various underlying drive modules of a password keyboard insert command numbers in respective communication data; determine whether communication is abnormal or not; if yes, the various underlying drive modules of the password keyboard determine whether data needs to be retransmitted; if yes, the underlying drive modules transmit original data again with the same command numbers; a connecting device determines whether the command numbers of the received data are same or not; if yes, discard repetitively received data, or otherwise, receive the data. According to the technical solution of the present invention, various underlying drive modules perform error processing; the short-time disconnection problem due to the fact that communication is interfered is resolved; design of a communication protocol can be simplified; and thus, by means of a command serial number mechanism, the problem of asynchronous or repetitive operation of both communication sides due to the fact that same commands are repetitively received and transmitted can be prevented.

WO2018040879A1, drawing sheet 1
Sheet 1 of 6

Term

No projected expiry on record.

  1. Priority
  2. Filed
  3. Published
  4. Today

8 claims: 2 independent, 6 dependent

  1. 1
    一种密码键盘USB通信异常恢复方法,其特征在于,包括以下步骤:密码键盘各底层驱动模块,在各自的通信数据中插入命令号;判断密码键盘与连接设备的通信是否异常,若是,则密码键盘各底层驱动模块以及连接设备,判断是否需要重发数据;若需要重发数据,则所述底层驱动模块,以相同的命令号再次发送原数据;连接设备判断接收到的数据的命令号是否一致,若是,则数据重复接收,丢弃重复接收数据,若否,则接收该数据。
  2. 2
    根据权利要求1所述的密码键盘USB通信异常恢复方法,其特征在于,在所述底层驱动模块,以相同的命令号再次发送原数据之前,还包括步骤:判断数据重发次数是否超过预设的最大重发次数,若是,则发送超时,并更新命令号,若否,则以相同的命令号再次发送原数据。
  3. 3
    根据权利要求1所述的密码键盘USB通信异常恢复方法,其特征在于,所述密码键盘与连接设备的通信异常包括数据发送失败和数据接收超时。
  4. 4
    根据权利要求1所述的密码键盘USB通信异常恢复方法,其特征在于,密码键盘各底层驱动模块所发送的通信数据中,还插入有与各底层驱动模块对应的模块号。
  5. 5
    一种密码键盘USB通信异常恢复系统,其特征在于,包括插入单元、第一判断单元、第二判断单元、重发单元和接收单元;所述插入单元用于密码键盘各底层驱动模块,在各自的通信数据中插入命令号;所述第一判断单元用于判断密码键盘与连接设备的通信是否异常;所述第二判断单元用于在第一判断单元判定通信异常时,密码键盘各底层驱动模块,判断是否需要重发数据;所述重发单元用于在第二判断单元判定需要重发数据时,所述底层驱动 模块,以相同的命令号再次发送原数据;所述接收单元用于连接设备判断接收到的数据的命令号是否一致,若是,则数据重复接收,丢弃重复接收数据,若否,则接收该数据。
  6. 6
    根据权利要求5所述的密码键盘USB通信异常恢复系统,其特征在于,所述重发单元还用于在以相同的命令号再次发送原数据之前,判断数据重发次数是否超过预设的最大重发次数,若是,则发送超时,并更新命令号,若否,则以相同的命令号再次发送原数据。
  7. 7
    根据权利要求5所述的密码键盘USB通信异常恢复系统,其特征在于,所述密码键盘与连接设备的通信异常包括数据发送失败和数据接收超时。
  8. 8
    根据权利要求5所述的密码键盘USB通信异常恢复系统,其特征在于,所述插入单元还用于在密码键盘各底层驱动模块所发送的通信数据中,插入有与各底层驱动模块对应的模块号。
Independent claims8