def bin2hexstring(bin_str):
    """
    二进制串转十六进制串，按照 4：1 比例转换
    :param bin_str: 二进制串
    :return: 十六进制串
    """
    bin_len = len(bin_str)
    left = 0
    right = 4
    re_str = hex(int(bin_str[left:right], 2))[2:]
    for i in range(right, bin_len, 4):
        left = right
        right += 4
        re_str += hex(int(bin_str[left:right], 2))[2:]

    return re_str