WO2018165948A1 - Method and system for reading interactive data between ios device and bluetooth device - Google Patents

Method and system for reading interactive data between ios device and bluetooth device Download PDF

Info

Publication number
WO2018165948A1
WO2018165948A1 PCT/CN2017/076971 CN2017076971W WO2018165948A1 WO 2018165948 A1 WO2018165948 A1 WO 2018165948A1 CN 2017076971 W CN2017076971 W CN 2017076971W WO 2018165948 A1 WO2018165948 A1 WO 2018165948A1
Authority
WO
WIPO (PCT)
Prior art keywords
tag
bytes
data
byte
occupied
Prior art date
Application number
PCT/CN2017/076971
Other languages
French (fr)
Chinese (zh)
Inventor
吴思蒙
Original Assignee
深圳大趋智能科技有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 深圳大趋智能科技有限公司 filed Critical 深圳大趋智能科技有限公司
Priority to PCT/CN2017/076971 priority Critical patent/WO2018165948A1/en
Priority to CN201780001540.3A priority patent/CN107690819B/en
Publication of WO2018165948A1 publication Critical patent/WO2018165948A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup

Definitions

  • the present invention relates to the field of data reading, and in particular, to a method and system for reading data exchanged between an ios device and a Bluetooth device.
  • Bluetooth devices have more data to interact with the mobile phone, and contain different information that needs to be disassembled for analysis and stored.
  • the interactive data includes Tag, the number of bytes of the data body read, and the data body.
  • the existing method is to have a fixed-byte Tag for different data types.
  • Tag represents the function of data, which is limited by the number of bytes of the Tag, and the amount of information carried by the Tag is limited.
  • the number of bytes occupied by each tag is fixed.
  • the reading method will be An error occurred in the number of bytes of the read data body, which caused it to not work properly.
  • a main object of the present invention is to provide a method and system for reading data exchanged between an iOS device and a Bluetooth device in a case where the number of bytes occupied by the tag is dynamic.
  • the present invention provides a method for reading data exchanged between an iOS device and a Bluetooth device, including the following steps: [0007]
  • the iOS device receives data sent by the Bluetooth device, and the data carries a tag, where the Tag occupies 1, 2 Or 3 bytes;
  • the content following the Tag in the data is read according to the number of bytes occupied by the Tag.
  • the step of analyzing the number of bytes occupied by the tag includes:
  • the step of detecting whether the number of bytes occupied by the Tag is greater than one byte includes:
  • the step of detecting whether the number of bytes occupied by the tag exceeds two bytes includes:
  • the second byte of the Tag & operation 0x80 is not equal to 0; when it is no, the Tag occupies 2 bytes; when it is ⁇ , the Tag occupies more than 2 bytes.
  • a reading system for interacting data between an iOS device and a Bluetooth device comprising a receiving module, an analyzing module, and a reading module;
  • the receiving module is configured to receive, by the iOS device, data sent by the Bluetooth device, where the data carries a Tag, where Ta g occupies 1 to 3 bytes, and Tag occupies an integer number of bytes;
  • the analysis module is configured to analyze the number of bytes occupied by the tag
  • the reading module is configured to read the content behind the Tag in the data according to the number of bytes occupied by the Tag.
  • the analysis module includes a first analysis submodule, a second analysis submodule, and a third analysis submodule
  • the first analysis sub-module is configured to detect whether the number of bytes occupied by the tag is greater than one byte, and if not, the number of bytes occupied by the shell IjTag is 1;
  • the second analysis sub-module is configured to detect whether the number of bytes occupied by the tag exceeds two bytes, and if not, the number of bytes occupied by the shell 1JT ag is 2;
  • the third analysis submodule is configured to determine, in the second analysis submodule, that the number of bytes occupied by the tag is 3.
  • the detection method of the first analysis submodule is:
  • the detection method of the second analysis submodule is: [0030] Whether the second byte of the Tag & operation 0x80 is not equal to 0; when it is no, the Tag occupies 2 bytes; when it is ⁇ , the Tag occupies more than 2 bytes.
  • the method and system for reading data of interaction between the iOS device and the Bluetooth device of the present invention by analyzing the number of bytes occupied by the tag, and correctly determining the number of bytes of the body of the read data, the amount of information that the Tag can carry is larger.
  • the data is more scalable.
  • FIG. 1 is a schematic diagram of steps of a method for reading data of interaction between an iOS device and a Bluetooth device according to the present invention
  • FIG. 2 is a schematic diagram showing the steps of analyzing the number of bytes occupied by the tag in the data in the method for reading the data exchanged between the iOS device and the Bluetooth device according to the present invention
  • FIG. 3 is a schematic diagram of a method for analyzing the number of bytes occupied by a tag in a method for reading data exchanged between an iOS device and a Bluetooth device according to the present invention
  • FIG. 4 is a schematic structural diagram of a system for reading data of interaction between an iOS device and a Bluetooth device according to the present invention
  • FIG. 5 is a schematic structural diagram of an analysis module in a system for reading data of interaction between an iOS device and a Bluetooth device according to the present invention
  • an embodiment of a method for reading data of interaction between an iOS device and a Bluetooth device includes the following steps:
  • the iOS device receives data sent by the Bluetooth device, where the data carries a tag, where the Tag occupies 1, 2, or 3 bytes; [0042] S2, analyzing the number of bytes occupied by the tag;
  • the data includes a tag, a number of bytes of the read data body, and a data body; the tag represents a function of the data, the tag carries more content, and the information carried by the data is richer, and the functions are multiple. Information can be fully reflected in one piece of data. When the same function is implemented, fewer data pieces are needed, the number of tags is reduced, the occupied data space is reduced, and the processing efficiency is higher.
  • An iOS device refers to a terminal device such as a mobile phone or a tablet computer with an iOS system installed.
  • Tag does not have a unified Chinese name in China. Some call it “classification”, some call it “small class” or “mass classification”, and others call it “tag”.
  • Labels are a more flexible and interesting way to classify logs. You can add one or more tags to each log, and then you can see all the logs on the BlogBus that use the same tag, and thus generate it with other users. More contact and communication.
  • the tag in this embodiment is a tag.
  • step S2 by analyzing and determining the correct number of bytes occupied by the tag, the Tag and the part of the data representing the number of read data bytes can be correctly distinguished, and the number of bytes occupied by the tag is constantly changed. Apple mobile phones and Bluetooth devices interact with data normally.
  • the content after the Tag is the number of bytes of the read data body and the data body, and only the number of bytes occupied by the T ag is correctly read, so as to ensure the number of bytes and the data body of the read data body. Correct, ensure the correct reading of the entire data, to ensure that the Bluetooth device has a flaw and the normal operation of the mobile phone.
  • step S2 includes the following steps:
  • step S21 it can be detected whether the number of bytes occupied by the tag is greater than one byte, and further whether step S22 is to be performed.
  • step S22 it can be detected whether the number of bytes occupied by the tag exceeds two bytes, and when it exceeds two bytes, step S23 is performed, and when the part exceeds two bytes, the tag takes up
  • the number of bytes is 2.
  • step S23 it is determined that the number of bytes occupied by the tag is 3, and the number of bytes occupied by the tag is at most 3. Therefore, when the number of bytes occupied by the tag is detected in step S22, the number of bytes exceeds two words. Thrift, you can determine that the maximum number of bytes occupied by the tag is 3.
  • the number of bytes occupied by the tag may be more than three, and step S23 may determine the maximum number of bytes occupied by the tag; after step S22, there may be a corresponding number of similar steps.
  • the number of bytes occupied by the detection tag is more than three, four, five, and so on.
  • the method for detecting whether the number of bytes occupied by the tag is greater than one byte is as follows:
  • S4 the first byte of the Tag & operation OxlF is 0x11; when it is no, the Tag occupies 1 byte; when it is ⁇ , the Tag occupies more than 1 byte.
  • the calculation rule of the & operation is that if both numbers are true (or 1), the result is true, if one of the two digits is false (or is 0), the result is true.
  • OxlF Ox stands for hexadecimal, that is, the binary code represented by Oxlf is 00011111; the binary code represented by 0x11 is 00010001.
  • the method of detecting whether the number of bytes occupied by the tag exceeds two bytes is as follows:
  • S5 the second byte of the tag & operation 0x80 is not equal to 0; when it is no, the Tag occupies 2 bytes; when it is ⁇ , the Tag occupies more than 2 bytes.
  • step S5 the calculation rule of the & operation is that if both numbers are true (or 1), the result is true, if one of the two digits is false (or is 0), the result is true. False; 0x80 represents a binary of 1000000
  • 0; 0 represents the binary code is 00000000.
  • the method for reading data exchanged between the iOS device and the Bluetooth device in the embodiment of the present invention by analyzing the number of bytes occupied by the tag, can correctly determine the number of bytes of the read data body, and the amount of information that the Tag can carry is more Large, the data is more scalable.
  • a system for reading data of an iOS device and a Bluetooth device a system for reading a method for reading data between an iOS device and a Bluetooth device, including a receiving module 1, an analyzing module 2, and a reading module 3 ;
  • the receiving module 1 is configured to receive, by the iOS device, data sent by the Bluetooth device, where the data carries a Tag, where T ag occupies 1, 2 or 3 bytes;
  • the analysis module 2 is configured to analyze the number of bytes occupied by the tag; [0069]
  • the reading module 3 is configured to read the content behind the Tag in the data according to the number of bytes occupied by the Tag.
  • the data sent by the Bluetooth device includes a tag, a number of bytes of the data body to be read, and a data body; the tag represents a function of the data, the tag carries more content, the information carried by the data is richer, and the information of multiple functions It can be fully embodied in one piece of data. When the same function is implemented, fewer data pieces are needed, the number of tags is reduced, the occupied data space is reduced, and the processing efficiency is also higher.
  • the analysis module 2 determines the correct number of bytes occupied by the tag by analyzing, and can correctly distinguish the Tag and the part of the data representing the number of data body bytes read, and ensure that the number of bytes occupied by the tag constantly changes, i
  • the OS device and the Bluetooth device normally exchange data.
  • the analysis module 2 includes a first analysis sub-module 21 and a second analysis sub-module.
  • the first analysis sub-module 21 is configured to detect whether the number of bytes occupied by the tag is greater than one byte, and if not, the number of bytes occupied by the shell IjT ag is 1;
  • the second analysis sub-module 22 is configured to detect whether the number of bytes occupied by the tag exceeds two bytes, and if not, the number of bytes occupied by the shell IjTag is 2;
  • the third analysis sub-module 23 is configured to determine, in the second analysis sub-module 22, that the number of bytes occupied by the tag is 3.
  • the first analysis sub-module 21 can detect whether the number of bytes occupied by the tag is greater than one byte, and further determine whether to enter the second analysis sub-module 22 link.
  • the second analysis sub-module 22 is capable of detecting whether the number of bytes occupied by the tag exceeds two bytes, and when it exceeds two bytes, enters the third analysis sub-module 23, and the portion exceeds two bytes.
  • the number of bytes occupied by Tag is 2.
  • the third analysis sub-module 23 determines that the number of bytes occupied by the tag is 3, and the number of bytes occupied by the tag is at most 3. Therefore, when the number of bytes occupied by the tag is detected in step S22, the number of bytes exceeds two words. Thrift, you can determine that the maximum number of bytes occupied by the tag is 3.
  • the detection method of the first analysis sub-module 21 is:
  • S4 the first byte of the Tag & operation OxlF is 0x11; when it is no, the Tag occupies 1 byte; when it is ⁇ , the Tag occupies more than 1 byte.
  • the detection method of the second analysis sub-module 22 is: [0082] S5, whether the second byte of the Tag & operation 0x80 is not equal to 0; when it is no, the Tag occupies 2 bytes; when it is ⁇ , the Tag occupies more than 2 bytes.
  • the method and system for reading data of interaction between the iOS device and the Bluetooth device of the present invention by analyzing the number of bytes occupied by the tag, and correctly determining the number of bytes of the body of the read data, the amount of information that the Tag can carry is larger.
  • the data is more scalable.
  • the iOS device receives data sent by the Bluetooth device, where the data carries a Tag, where the Tag occupies 1,
  • A2 The method for reading data of interaction between an iOS device and a Bluetooth device, as described in A1, wherein the step of analyzing the number of bytes occupied by the tag includes:
  • the method for reading data of the interaction between the iOS device and the Bluetooth device, as described in FIG. 2, is characterized in that, the step of detecting whether the number of bytes occupied by the tag is greater than one byte comprises:
  • A. The method for reading data of the interaction between the iOS device and the Bluetooth device, as described in A2, wherein the step of detecting whether the number of bytes occupied by the tag exceeds two bytes comprises:
  • the second byte of the tag & operation 0x80 is not equal to 0; when it is no, the tag occupies 2 bytes; when it is ⁇ , the tag occupies more than 2 bytes.
  • FIG. 1 Another embodiment of the invention: [0098] Bl, a reading system for interacting data between an iOS device and a Bluetooth device, comprising: [0099] a receiving module, wherein the iOS device receives data sent by the Bluetooth device, where the data carries a tag, where Description
  • an analysis module analyzing the number of bytes occupied by the tag
  • the reading module reads the content behind the Tag in the data according to the number of bytes occupied by the Tag.
  • the first analysis submodule is configured to detect whether the number of bytes occupied by the tag is greater than one byte, and if not
  • the number of bytes occupied by the tag is 1;
  • the second analysis submodule is configured to detect whether the number of bytes occupied by the tag exceeds two bytes, and if not, the number of bytes occupied by the tag is 2;
  • the third analysis submodule in the second analysis submodule, the detection result is yes, determining that the number of bytes occupied by the tag is 3.
  • the first byte of the Tag & operation OxlF is 0x11; when it is no, the Tag occupies 1 byte; when it is ⁇ , the Tag occupies more than 1 byte.

Abstract

A method for reading interactive data between an iOS device and a Bluetooth device comprises the following steps: S1, an iOS device receives data, the data carrying a Tag, and the tag occupying 1, 2 or 3 bytes; and S2, analyze the number of bytes occupied by the Tag; and S3, read content of data following the tag according to the number of bytes occupied by the Tag. By analyzing the number of bytes occupied by the Tag, a main body of data is correctly read, and the data scalability is higher.

Description

iOS设备与蓝牙设备交互数据的读取方法及系统 技术领域  Method and system for reading data exchange between iOS device and Bluetooth device
[0001] 本发明涉及到一种数据读取领域, 特别是涉及到一种 ios设备与蓝牙设备交互 数据的读取方法及系统。  [0001] The present invention relates to the field of data reading, and in particular, to a method and system for reading data exchanged between an ios device and a Bluetooth device.
背景技术  Background technique
[0002] 苹果手机和蓝牙设备进行数据交互在很多吋候都有应用。  [0002] Data communication between Apple mobile phones and Bluetooth devices has been applied in many cases.
[0003] 蓝牙设备有吋与手机进行交互的数据较多, 并且含有不同的信息需要拆解进行 分析后存储。 交互的数据包括 Tag、 读取数据正文的字节数量和数据正文, 现有 方法是对于不同的数据类型有一个固定字节的 Tag。  [0003] Bluetooth devices have more data to interact with the mobile phone, and contain different information that needs to be disassembled for analysis and stored. The interactive data includes Tag, the number of bytes of the data body read, and the data body. The existing method is to have a fixed-byte Tag for different data types.
[0004] Tag代表数据的功能, 受 Tag的字节数的限制, Tag承载的信息量有限。 现今的 数据的读取方法, 认为每个 Tag占有的字节数量是固定的, 当 Tag占有的字节数 量是动态的吋候, 如果占有的字节数量与过去不同, 该读取方法会在读取数据 正文的字节数量处出现差错, 导致无法正常工作。  [0004] Tag represents the function of data, which is limited by the number of bytes of the Tag, and the amount of information carried by the Tag is limited. In today's data reading method, the number of bytes occupied by each tag is fixed. When the number of bytes occupied by the tag is dynamic, if the number of bytes occupied is different from the past, the reading method will be An error occurred in the number of bytes of the read data body, which caused it to not work properly.
技术问题  technical problem
[0005] 本发明的主要目的为提供一种适用 Tag占有的字节数量是动态的情况的 iOS设备 与蓝牙设备交互数据的读取方法及系统。  [0005] A main object of the present invention is to provide a method and system for reading data exchanged between an iOS device and a Bluetooth device in a case where the number of bytes occupied by the tag is dynamic.
问题的解决方案  Problem solution
技术解决方案  Technical solution
[0006] 本发明提出一种 iOS设备与蓝牙设备交互数据的读取方法, 包括以下步骤: [0007] iOS设备接收由蓝牙设备发送的数据, 该数据中带有 Tag, 其中 Tag占有 1、 2或 3 个字节;  [0006] The present invention provides a method for reading data exchanged between an iOS device and a Bluetooth device, including the following steps: [0007] The iOS device receives data sent by the Bluetooth device, and the data carries a tag, where the Tag occupies 1, 2 Or 3 bytes;
[0008] 分析 Tag所占的字节数量;  [0008] analyzing the number of bytes occupied by the Tag;
[0009] 根据 Tag所占的字节数量, 读取数据中 Tag后面的内容。  [0009] The content following the Tag in the data is read according to the number of bytes occupied by the Tag.
[0010] 进一步地, 分析 Tag所占的字节数量的步骤包括: [0010] Further, the step of analyzing the number of bytes occupied by the tag includes:
[0011] 检测 Tag所占的字节数量是否大于一个字节, 若否, 则 Tag所占的字节数量为 1 [0012] 若是则检测 Tag所占的字节数量是否超过两个字节, 若否, 则 Tag所占的字节数 量为 2; [0011] detecting whether the number of bytes occupied by the tag is greater than one byte, and if not, the number of bytes occupied by the tag is 1 [0012] If yes, it is detected whether the number of bytes occupied by the tag exceeds two bytes, and if not, the number of bytes occupied by the tag is 2;
[0013] 若是则 Tag所占的字节数量为 3。  [0013] If yes, the number of bytes occupied by the tag is 3.
[0014] 进一步地, 检测 Tag所占的字节数量是否大于一个字节的步骤包括:  [0014] Further, the step of detecting whether the number of bytes occupied by the Tag is greater than one byte includes:
[0015] 将 Tag第一个字节 &运算 OxlF是否为 0x11 ; 当为否吋, Tag占有 1个字节; 当为 是吋, Tag占有大于1个字节。 [0015] Whether the first byte of the Tag & operation OxlF is 0x11; when it is no, the Tag occupies 1 byte; when it is 吋, Ta g occupies more than 1 byte.
[0016] 进一步地, 检测 Tag所占的字节数量是否超过两个字节的步骤包括:  [0016] Further, the step of detecting whether the number of bytes occupied by the tag exceeds two bytes includes:
[0017] 将 Tag第二个字节 &运算 0x80是否不等于 0; 当为否吋, Tag占有 2个字节; 当为 是吋, Tag占有超过 2个字节。 [0017] The second byte of the Tag & operation 0x80 is not equal to 0; when it is no, the Tag occupies 2 bytes; when it is 吋, the Tag occupies more than 2 bytes.
[0018]  [0018]
[0019] 一种 iOS设备与蓝牙设备交互数据的读取系统, 包括接收模块、 分析模块和读 取模块;  [0019] A reading system for interacting data between an iOS device and a Bluetooth device, comprising a receiving module, an analyzing module, and a reading module;
[0020] 接收模块用于 iOS设备接收由蓝牙设备发送的数据, 该数据中带有 Tag, 其中 Ta g占有 1到 3个字节, Tag占有整数个字节;  [0020] The receiving module is configured to receive, by the iOS device, data sent by the Bluetooth device, where the data carries a Tag, where Ta g occupies 1 to 3 bytes, and Tag occupies an integer number of bytes;
[0021] 分析模块用于分析 Tag所占的字节数量; [0021] The analysis module is configured to analyze the number of bytes occupied by the tag;
[0022] 读取模块用于根据 Tag所占的字节数量, 读取数据中 Tag后面的内容。  [0022] The reading module is configured to read the content behind the Tag in the data according to the number of bytes occupied by the Tag.
[0023] 进一步地, 分析模块包括第一分析子模块、 第二分析子模块和第三分析子模块  [0023] Further, the analysis module includes a first analysis submodule, a second analysis submodule, and a third analysis submodule
[0024] 第一分析子模块用于检测所述 Tag所占的字节数量是否大于一个字节, 若否, 贝 IjTag所占的字节数量为 1 ; [0024] The first analysis sub-module is configured to detect whether the number of bytes occupied by the tag is greater than one byte, and if not, the number of bytes occupied by the shell IjTag is 1;
[0025] 第二分析子模块用于则检测 Tag所占的字节数量是否超过两个字节, 若否, 贝 1JT ag所占的字节数量为 2; [0025] The second analysis sub-module is configured to detect whether the number of bytes occupied by the tag exceeds two bytes, and if not, the number of bytes occupied by the shell 1JT ag is 2;
[0026] 第三分析子模块用于在第二分析子模块检测结果为是吋, 确定 Tag所占的字节 数量为 3。 [0026] The third analysis submodule is configured to determine, in the second analysis submodule, that the number of bytes occupied by the tag is 3.
[0027] 进一步地, 第一分析子模块的检测方法为:  [0027] Further, the detection method of the first analysis submodule is:
[0028] 将 Tag第一个字节 &运算 OxlF是否为 0x11 ; 当为否吋, Tag占有 1个字节; 当为 是吋, Tag占有大于1个字节。 [0028] Whether the first byte of the Tag & operation OxlF is 0x11; when it is no, the Tag occupies 1 byte; when it is 吋, Ta g occupies more than 1 byte.
[0029] 进一步地, 第二分析子模块的检测方法为: [0030] 将 Tag第二个字节 &运算 0x80是否不等于 0; 当为否吋, Tag占有 2个字节; 当为 是吋, Tag占有超过 2个字节。 [0029] Further, the detection method of the second analysis submodule is: [0030] Whether the second byte of the Tag & operation 0x80 is not equal to 0; when it is no, the Tag occupies 2 bytes; when it is 吋, the Tag occupies more than 2 bytes.
发明的有益效果  Advantageous effects of the invention
有益效果  Beneficial effect
[0031] 本发明 iOS设备与蓝牙设备交互数据的读取方法及系统, 通过分析 Tag所占的字 节数量, 进而正确确定读取数据正文的字节数量, Tag可承载的信息量更大, 数 据的扩展性更强。  [0031] The method and system for reading data of interaction between the iOS device and the Bluetooth device of the present invention, by analyzing the number of bytes occupied by the tag, and correctly determining the number of bytes of the body of the read data, the amount of information that the Tag can carry is larger. The data is more scalable.
对附图的简要说明  Brief description of the drawing
附图说明  DRAWINGS
[0032] 图 1为本发明 iOS设备与蓝牙设备交互数据的读取方法的步骤示意图;  1 is a schematic diagram of steps of a method for reading data of interaction between an iOS device and a Bluetooth device according to the present invention;
[0033] 图 2为本发明 iOS设备与蓝牙设备交互数据的读取方法中分析确定数据中 Tag所 占的字节数量的步骤示意图;  [0033] FIG. 2 is a schematic diagram showing the steps of analyzing the number of bytes occupied by the tag in the data in the method for reading the data exchanged between the iOS device and the Bluetooth device according to the present invention;
[0034] 图 3为本发明 iOS设备与蓝牙设备交互数据的读取方法中分析 Tag所占的字节数 量的方法示意图; 3 is a schematic diagram of a method for analyzing the number of bytes occupied by a tag in a method for reading data exchanged between an iOS device and a Bluetooth device according to the present invention;
[0035] 图 4为本发明 iOS设备与蓝牙设备交互数据的读取系统的结构示意图;  4 is a schematic structural diagram of a system for reading data of interaction between an iOS device and a Bluetooth device according to the present invention;
[0036] 图 5为本发明 iOS设备与蓝牙设备交互数据的读取系统中分析模块的结构示意图  5 is a schematic structural diagram of an analysis module in a system for reading data of interaction between an iOS device and a Bluetooth device according to the present invention;
[0037] [0037]
[0038] 本发明目的的实现、 功能特点及优点将结合实施例, 参照附图做进一步说明。  [0038] The implementation, functional features, and advantages of the present invention will be further described with reference to the accompanying drawings.
实施该发明的最佳实施例  BEST MODE FOR CARRYING OUT THE INVENTION
本发明的最佳实施方式  BEST MODE FOR CARRYING OUT THE INVENTION
[0039] 应当理解, 此处所描述的具体实施例仅仅用以解释本发明, 并不用于限定本发 明。 The specific embodiments described herein are intended to be illustrative only and not to limit the invention.
[0040] 参照图 1, 本发明 iOS设备与蓝牙设备交互数据的读取方法的一实施例, 包括以 下步骤:  [0040] Referring to FIG. 1, an embodiment of a method for reading data of interaction between an iOS device and a Bluetooth device according to the present invention includes the following steps:
[0041] Sl、 iOS设备接收由蓝牙设备发送的数据, 该数据中带有 Tag, 其中 Tag占有 1、 2、 或 3个字节; [0042] S2、 分析 Tag所占的字节数量; [0041] Sl, the iOS device receives data sent by the Bluetooth device, where the data carries a tag, where the Tag occupies 1, 2, or 3 bytes; [0042] S2, analyzing the number of bytes occupied by the tag;
[0043] S3、 根据 Tag所占的字节数量, 读取数据中 Tag后面的内容。  [0043] S3. Read the content behind the Tag in the data according to the number of bytes occupied by the Tag.
[0044] 上述步骤 S1中, 数据包括 Tag、 读取数据正文的字节数量和数据正文; Tag代表 数据的功能, Tag所承载的内容更多, 数据所承载的信息更丰富, 多个功能的信 息可以在一条数据中充分体现, 当实现同样的功能, 需要的数据条数更少, 减 少了 Tag的数量, 减少了占用的数据空间, 处理效率也更高。  [0044] In the foregoing step S1, the data includes a tag, a number of bytes of the read data body, and a data body; the tag represents a function of the data, the tag carries more content, and the information carried by the data is richer, and the functions are multiple. Information can be fully reflected in one piece of data. When the same function is implemented, fewer data pieces are needed, the number of tags is reduced, the occupied data space is reduced, and the processing efficiency is higher.
[0045] iOS设备是指安装有 iOS系统的手机、 平板电脑等终端设备。 [0045] An iOS device refers to a terminal device such as a mobile phone or a tablet computer with an iOS system installed.
[0046] Tag在中国并没有统一的中文名称, 有的称之为"分类", 也有的称之为"幵放分 类"或"大众分类", 还有的称之为 "标签"。 [0046] Tag does not have a unified Chinese name in China. Some call it "classification", some call it "small class" or "mass classification", and others call it "tag".
[0047] 标签是一种更为灵活、 有趣的日志分类方式, 可以为每篇日志添加一个或多个 标签, 然后可以看到 BlogBus上所有使用了相同 Tag的日志, 并且由此和其他用 户产生更多的联系和沟通。 本实施例中的 Tag为标签。 [0047] Labels are a more flexible and interesting way to classify logs. You can add one or more tags to each log, and then you can see all the logs on the BlogBus that use the same tag, and thus generate it with other users. More contact and communication. The tag in this embodiment is a tag.
[0048] 上述步骤 S2中, 通过分析确定 Tag所占的字节正确数量, 可以正确区分 Tag和代 表读取的数据正文字节数量的部分数据, 保证 Tag所占字节数量不断变动的情况 下, 苹果手机和蓝牙设备正常交互数据。 [0048] In the above step S2, by analyzing and determining the correct number of bytes occupied by the tag, the Tag and the part of the data representing the number of read data bytes can be correctly distinguished, and the number of bytes occupied by the tag is constantly changed. Apple mobile phones and Bluetooth devices interact with data normally.
[0049] 上述步骤 S3中, Tag后面的内容为读取数据正文的字节数量和数据正文, 只有 T ag所占字节数量读取正确, 才能保证读取数据正文的字节数量和数据正文正确, 保证整个数据的正确读取, 保证蓝牙设备有吋与手机的正常工作。 [0049] In the above step S3, the content after the Tag is the number of bytes of the read data body and the data body, and only the number of bytes occupied by the T ag is correctly read, so as to ensure the number of bytes and the data body of the read data body. Correct, ensure the correct reading of the entire data, to ensure that the Bluetooth device has a flaw and the normal operation of the mobile phone.
[0050] 参照图 2, 步骤 S2包括如下步骤: [0050] Referring to FIG. 2, step S2 includes the following steps:
[0051] S21、 检测 Tag所占的字节数量是否大于一个字节, 若否, 则 Tag所占的字节数 量为 1 ;  [0051] S21, detecting whether the number of bytes occupied by the tag is greater than one byte, and if not, the number of bytes occupied by the tag is 1;
[0052] S22、 若是则检测 Tag所占的字节数量是否超过两个字节, 若否, 贝 IjTag所占的 字节数量为 2;  [0052] S22, if yes, detecting whether the number of bytes occupied by the tag exceeds two bytes, and if not, the number of bytes occupied by the shell IjTag is 2;
[0053] S23、 若是则 Tag所占的字节数量为 3。 [0053] S23. If yes, the number of bytes occupied by the tag is 3.
[0054] 在上述步骤 S21中, 能够检测出 Tag所占的字节数量是否大于一个字节, 进而确 定步骤 S22是否要进行。  [0054] In the above step S21, it can be detected whether the number of bytes occupied by the tag is greater than one byte, and further whether step S22 is to be performed.
[0055] 在上述步骤 S22中, 能够检测出 Tag所占的字节数量是否超过两个字节, 当超过 两个字节吋, 进行步骤 S23, 当部超过两个字节吋, Tag所占的字节数量是 2。 [0056] 在上述步骤 S23中, 确定 Tag所占的字节数量为 3, Tag所占的字节数量最大为 3, , 因此当步骤 S22中检测出 Tag所占的字节数量超过两个字节吋, 可以确定 Tag所 占的字节数量最大为 3。 [0055] In the above step S22, it can be detected whether the number of bytes occupied by the tag exceeds two bytes, and when it exceeds two bytes, step S23 is performed, and when the part exceeds two bytes, the tag takes up The number of bytes is 2. [0056] In the above step S23, it is determined that the number of bytes occupied by the tag is 3, and the number of bytes occupied by the tag is at most 3. Therefore, when the number of bytes occupied by the tag is detected in step S22, the number of bytes exceeds two words. Thrift, you can determine that the maximum number of bytes occupied by the tag is 3.
[0057] 在另一些实施例中, Tag所占的字节数量可以多于三个, 步骤 S23可以确定 Tag 所占的字节数量的最大值; 步骤 S22之后可以有相应个数的相似步骤, 依次顺顺 沿检测 Tag所占的字节数量是否大于三个、 四个、 五个等等。  [0057] In other embodiments, the number of bytes occupied by the tag may be more than three, and step S23 may determine the maximum number of bytes occupied by the tag; after step S22, there may be a corresponding number of similar steps. The number of bytes occupied by the detection tag is more than three, four, five, and so on.
[0058] 参照图 3, 检测 Tag所占的字节数量是否大于一个字节的步骤中方法为:  [0058] Referring to FIG. 3, the method for detecting whether the number of bytes occupied by the tag is greater than one byte is as follows:
[0059] S4、 将 Tag第一个字节&运算 OxlF是否为 0x11 ; 当为否吋, Tag占有 1个字节; 当为是吋, Tag占有大于 1个字节。  [0059] S4, the first byte of the Tag & operation OxlF is 0x11; when it is no, the Tag occupies 1 byte; when it is 吋, the Tag occupies more than 1 byte.
[0060] 在上述步骤 S4中, &运算的计算规则是, 如果两个数都为真 (或为 1), 其结果为 真, 如果两位数中有一位为假 (或为 0) 者结果为假, 例如 00001011&00000111 = 00000011; OxlF中 Ox代表 16进制,即 Oxlf代表的 2进制为 00011111; 0x11代表的 2 进制为 00010001。  [0060] In the above step S4, the calculation rule of the & operation is that if both numbers are true (or 1), the result is true, if one of the two digits is false (or is 0), the result is true. False, for example, 00001011 & 00000111 = 00000011; OxlF Ox stands for hexadecimal, that is, the binary code represented by Oxlf is 00011111; the binary code represented by 0x11 is 00010001.
[0061] 参照图 3, 检测 Tag所占的字节数量是否超过两个字节的步骤中的方法为:  [0061] Referring to FIG. 3, the method of detecting whether the number of bytes occupied by the tag exceeds two bytes is as follows:
[0062] S5、 将 Tag第二个字节 &运算 0x80是否不等于 0; 当为否吋, Tag占有 2个字节; 当为是吋, Tag占有超过 2个字节。 [0062] S5, the second byte of the tag & operation 0x80 is not equal to 0; when it is no, the Tag occupies 2 bytes; when it is 吋, the Tag occupies more than 2 bytes.
[0063] 在上述步骤 S5中, &运算的计算规则是, 如果两个数都为真 (或为 1), 其结果为 真, 如果两位数中有一位为假 (或为 0) 者结果为假; 0x80代表的 2进制为 1000000[0063] In the above step S5, the calculation rule of the & operation is that if both numbers are true (or 1), the result is true, if one of the two digits is false (or is 0), the result is true. False; 0x80 represents a binary of 1000000
0; 0代表的 2进制为 00000000。 0; 0 represents the binary code is 00000000.
[0064] 本发明实施例的 iOS设备与蓝牙设备交互数据的读取方法, 通过分析 Tag所占的 字节数量, 进而可以正确确定读取数据正文的字节数量, Tag可承载的信息量更 大, 数据的扩展性更强。 [0064] The method for reading data exchanged between the iOS device and the Bluetooth device in the embodiment of the present invention, by analyzing the number of bytes occupied by the tag, can correctly determine the number of bytes of the read data body, and the amount of information that the Tag can carry is more Large, the data is more scalable.
[0065]  [0065]
[0066] 参照图 4, 一种 iOS设备与蓝牙设备交互数据的读取系统, 为应用 iOS设备与蓝 牙设备交互数据的读取方法的系统, 包括接收模块 1、 分析模块 2和读取模块 3;  4, a system for reading data of an iOS device and a Bluetooth device, a system for reading a method for reading data between an iOS device and a Bluetooth device, including a receiving module 1, an analyzing module 2, and a reading module 3 ;
[0067] 接收模块 1用于 iOS设备接收由蓝牙设备发送的数据, 该数据中带有 Tag, 其中 T ag占有 1、 2或 3个字节;  [0067] The receiving module 1 is configured to receive, by the iOS device, data sent by the Bluetooth device, where the data carries a Tag, where T ag occupies 1, 2 or 3 bytes;
[0068] 分析模块 2用于分析 Tag所占的字节数量; [0069] 读取模块 3用于根据 Tag所占的字节数量, 读取数据中 Tag后面的内容。 [0068] The analysis module 2 is configured to analyze the number of bytes occupied by the tag; [0069] The reading module 3 is configured to read the content behind the Tag in the data according to the number of bytes occupied by the Tag.
[0070] 蓝牙设备发送的数据包括 Tag、 读取数据正文的字节数量和数据正文; Tag代表 数据的功能, Tag所承载的内容更多, 数据所承载的信息更丰富, 多个功能的信 息可以在一条数据中充分体现, 当实现同样的功能, 需要的数据条数更少, 减 少了 Tag的数量, 减少了占用的数据空间, 处理效率也更高。  [0070] The data sent by the Bluetooth device includes a tag, a number of bytes of the data body to be read, and a data body; the tag represents a function of the data, the tag carries more content, the information carried by the data is richer, and the information of multiple functions It can be fully embodied in one piece of data. When the same function is implemented, fewer data pieces are needed, the number of tags is reduced, the occupied data space is reduced, and the processing efficiency is also higher.
[0071] 分析模块 2通过分析确定 Tag所占的字节正确数量, 可以正确区分 Tag和代表读 取的数据正文字节数量的部分数据, 保证 Tag所占字节数量不断变动的情况下, i[0071] The analysis module 2 determines the correct number of bytes occupied by the tag by analyzing, and can correctly distinguish the Tag and the part of the data representing the number of data body bytes read, and ensure that the number of bytes occupied by the tag constantly changes, i
OS设备和蓝牙设备正常交互数据。 The OS device and the Bluetooth device normally exchange data.
[0072] 参照图 5, 在本实施例中, 分析模块 2包括第一分析子模块 21、 第二分析子模块[0072] Referring to FIG. 5, in the embodiment, the analysis module 2 includes a first analysis sub-module 21 and a second analysis sub-module.
22和第三分析子模块 23; 22 and a third analysis sub-module 23;
[0073] 第一分析子模块 21用于检测 Tag所占的字节数量是否大于一个字节, 若否, 贝 IjT ag所占的字节数量为 1 ; [0073] The first analysis sub-module 21 is configured to detect whether the number of bytes occupied by the tag is greater than one byte, and if not, the number of bytes occupied by the shell IjT ag is 1;
[0074] 第二分析子模块 22用于则检测 Tag所占的字节数量是否超过两个字节, 若否, 贝 IjTag所占的字节数量为 2; [0074] The second analysis sub-module 22 is configured to detect whether the number of bytes occupied by the tag exceeds two bytes, and if not, the number of bytes occupied by the shell IjTag is 2;
[0075] 第三分析子模块 23用于在第二分析子模块 22检测结果为是吋, 确定 Tag所占的 字节数量为 3。 [0075] The third analysis sub-module 23 is configured to determine, in the second analysis sub-module 22, that the number of bytes occupied by the tag is 3.
[0076] 第一分析子模块 21能够检测出 Tag所占的字节数量是否大于一个字节, 进而确 定是否要进入第二分析子模块 22环节。  [0076] The first analysis sub-module 21 can detect whether the number of bytes occupied by the tag is greater than one byte, and further determine whether to enter the second analysis sub-module 22 link.
[0077] 第二分析子模块 22能够检测出 Tag所占的字节数量是否超过两个字节, 当超过 两个字节吋, 进入第三分析子模块 23, 当部超过两个字节吋, Tag所占的字节数 量是 2。 [0077] The second analysis sub-module 22 is capable of detecting whether the number of bytes occupied by the tag exceeds two bytes, and when it exceeds two bytes, enters the third analysis sub-module 23, and the portion exceeds two bytes. The number of bytes occupied by Tag is 2.
[0078] 第三分析子模块 23确定 Tag所占的字节数量为 3, Tag所占的字节数量最大为 3, , 因此当步骤 S22中检测出 Tag所占的字节数量超过两个字节吋, 可以确定 Tag所 占的字节数量最大为 3。  [0078] The third analysis sub-module 23 determines that the number of bytes occupied by the tag is 3, and the number of bytes occupied by the tag is at most 3. Therefore, when the number of bytes occupied by the tag is detected in step S22, the number of bytes exceeds two words. Thrift, you can determine that the maximum number of bytes occupied by the tag is 3.
[0079] 参照图 3, 在本实施例中, 第一分析子模块 21的检测方法为:  Referring to FIG. 3, in the embodiment, the detection method of the first analysis sub-module 21 is:
[0080] S4、 将 Tag第一个字节&运算 OxlF是否为 0x11 ; 当为否吋, Tag占有 1个字节; 当为是吋, Tag占有大于 1个字节。  [0080] S4, the first byte of the Tag & operation OxlF is 0x11; when it is no, the Tag occupies 1 byte; when it is 吋, the Tag occupies more than 1 byte.
[0081] 在本实施例中, 第二分析子模块 22的检测方法为: [0082] S5、 将 Tag第二个字节 &运算 0x80是否不等于 0; 当为否吋, Tag占有 2个字节; 当为是吋, Tag占有超过 2个字节。 [0081] In this embodiment, the detection method of the second analysis sub-module 22 is: [0082] S5, whether the second byte of the Tag & operation 0x80 is not equal to 0; when it is no, the Tag occupies 2 bytes; when it is 吋, the Tag occupies more than 2 bytes.
[0083] 本发明 iOS设备与蓝牙设备交互数据的读取方法及系统, 通过分析 Tag所占的字 节数量, 进而正确确定读取数据正文的字节数量, Tag可承载的信息量更大, 数 据的扩展性更强。 [0083] The method and system for reading data of interaction between the iOS device and the Bluetooth device of the present invention, by analyzing the number of bytes occupied by the tag, and correctly determining the number of bytes of the body of the read data, the amount of information that the Tag can carry is larger. The data is more scalable.
[0084] 本发明一实施例: [0084] An embodiment of the invention:
[0085] Al、 一种 iOS设备与蓝牙设备交互数据的读取方法, 其特征在于, 包括以下步 骤:  [0085] Al, a method for reading data exchanged between an iOS device and a Bluetooth device, comprising: the following steps:
[0086] iOS设备接收由蓝牙设备发送的数据, 该数据中带有 Tag, 其中所述 Tag占有 1、 [0086] The iOS device receives data sent by the Bluetooth device, where the data carries a Tag, where the Tag occupies 1,
2或 3个字节; 2 or 3 bytes;
[0087] 分析所述 Tag所占的字节数量; [0087] analyzing the number of bytes occupied by the tag;
[0088] 根据所述 Tag所占的字节数量, 读取所述数据中所述 Tag后面的内容。  [0088] reading content behind the tag in the data according to the number of bytes occupied by the tag.
[0089] A 2、 如 A 1所述的 iOS设备与蓝牙设备交互数据的读取方法, 其特征在于, 所 述分析所述 Tag所占的字节数量的步骤包括:  [0089] A2. The method for reading data of interaction between an iOS device and a Bluetooth device, as described in A1, wherein the step of analyzing the number of bytes occupied by the tag includes:
[0090] 检测所述 Tag所占的字节数量是否大于一个字节, 若否, 则所述 Tag所占的字节 数量为 1 ; [0090] detecting whether the number of bytes occupied by the tag is greater than one byte, and if not, the number of bytes occupied by the tag is 1;
[0091] 若是则检测所述 Tag所占的字节数量是否超过两个字节, 若否, 则所述 Tag所占 的字节数量为 2;  [0091] If yes, it is detected whether the number of bytes occupied by the tag exceeds two bytes, and if not, the number of bytes occupied by the tag is 2;
[0092] 若是则所述 Tag所占的字节数量为 3。 [0092] If yes, the number of bytes occupied by the tag is 3.
[0093] A 3、 如 A 2所述的 iOS设备与蓝牙设备交互数据的读取方法, 其特征在于, 所 述检测所述 Tag所占的字节数量是否大于一个字节的步骤包括:  The method for reading data of the interaction between the iOS device and the Bluetooth device, as described in FIG. 2, is characterized in that, the step of detecting whether the number of bytes occupied by the tag is greater than one byte comprises:
[0094] 将所述 Tag第一个字节 &运算 OxlF是否为 0x11 ; 当为否吋, 所述 Tag占有 1个字 节; 当为是吋, 所述 Tag占有大于 1个字节。 [0094] Whether the first byte & operation OxlF of the Tag is 0x11; when it is no, the Tag occupies 1 byte; when it is 吋, the Tag occupies more than 1 byte.
[0095] A 4、 如 A 2所述的 iOS设备与蓝牙设备交互数据的读取方法, 其特征在于, 所 述检测所述 Tag所占的字节数量是否超过两个字节的步骤包括: [0095] A. The method for reading data of the interaction between the iOS device and the Bluetooth device, as described in A2, wherein the step of detecting whether the number of bytes occupied by the tag exceeds two bytes comprises:
[0096] 将 Tag第二个字节 &运算 0x80是否不等于 0; 当为否吋, 所述 Tag占有 2个字节; 当为是吋, 所述 Tag占有超过 2个字节。 [0096] The second byte of the tag & operation 0x80 is not equal to 0; when it is no, the tag occupies 2 bytes; when it is 吋, the tag occupies more than 2 bytes.
[0097] 本发明另一实施例: [0098] Bl、 一种 iOS设备与蓝牙设备交互数据的读取系统, 其特征在于, 包括: [0099] 接收模块, iOS设备接收由蓝牙设备发送的数据, 该数据中带有 Tag, 其中所述[0097] Another embodiment of the invention: [0098] Bl, a reading system for interacting data between an iOS device and a Bluetooth device, comprising: [0099] a receiving module, wherein the iOS device receives data sent by the Bluetooth device, where the data carries a tag, where Description
Tag占有 1、 2或 3个字节; Tag occupies 1, 2 or 3 bytes;
[0100] 分析模块, 分析所述 Tag所占的字节数量; [0100] an analysis module, analyzing the number of bytes occupied by the tag;
[0101] 读取模块, 根据 Tag所占的字节数量, 读取数据中 Tag后面的内容。  [0101] The reading module reads the content behind the Tag in the data according to the number of bytes occupied by the Tag.
[0102] B 2、 如 B 1所述的 iOS设备与蓝牙设备交互数据的读取系统, 其特征在于, 所 述分析模块包括: [0102] B2. The reading system for interacting data between the iOS device and the Bluetooth device according to B1, wherein the analyzing module comprises:
[0103] 第一分析子模块, 用于检测所述 Tag所占的字节数量是否大于一个字节, 若否 [0103] The first analysis submodule is configured to detect whether the number of bytes occupied by the tag is greater than one byte, and if not
, 则所述 Tag所占的字节数量为 1 ; , the number of bytes occupied by the tag is 1;
[0104] 第二分析子模块, 用于则检测所述 Tag所占的字节数量是否超过两个字节, 若 否, 则所述 Tag所占的字节数量为 2; [0104] The second analysis submodule is configured to detect whether the number of bytes occupied by the tag exceeds two bytes, and if not, the number of bytes occupied by the tag is 2;
[0105] 第三分析子模块, 在第二分析子模块检测结果为是吋, 确定所述 Tag所占的字 节数量为 3。 [0105] The third analysis submodule, in the second analysis submodule, the detection result is yes, determining that the number of bytes occupied by the tag is 3.
[0106] B 3、 如 B 2所述的 iOS设备与蓝牙设备交互数据的读取系统, 其特征在于, 所 述第一分析子模块的检测方法为:  [0106] B. The reading system for interacting data between the iOS device and the Bluetooth device as described in B2, wherein the detecting method of the first analyzing submodule is:
[0107] 将 Tag第一个字节 &运算 OxlF是否为 0x11 ; 当为否吋, 所述 Tag占有 1个字节; 当为是吋, 所述 Tag占有大于 1个字节。 [0107] The first byte of the Tag & operation OxlF is 0x11; when it is no, the Tag occupies 1 byte; when it is 吋, the Tag occupies more than 1 byte.
[0108] B 4、 如 B 2所述的 iOS设备与蓝牙设备交互数据的读取系统, 其特征在于, 所 述第二分析子模块的检测方法为: [0108] B4. The reading system for interacting data between the iOS device and the Bluetooth device, as described in B2, wherein the detecting method of the second analyzing submodule is:
[0109] 将所述 Tag第二个字节 &运算 0x80是否不等于 0; 当为否吋, 所述 Tag占有 2个字 节; 当为是吋, 所述 Tag占有超过 2个字节。 [0109] Whether the second byte & operation 0x80 of the Tag is not equal to 0; when it is no, the Tag occupies 2 bytes; when it is 吋, the Tag occupies more than 2 bytes.
[0110]  [0110]
[0111] 以上所述仅为本发明的优选实施例, 并非因此限制本发明的专利范围, 凡是利 用本发明说明书及附图内容所作的等效结构或等效流程变换, 或直接或间接运 用在其他相关的技术领域, 均同理包括在本发明的专利保护范围内。  The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the invention, and the equivalent structure or equivalent process transformations made by the description of the present invention and the drawings are used directly or indirectly. Other related technical fields are equally included in the scope of patent protection of the present invention.

Claims

权利要求书 Claim
[权利要求 1] 一种 iOS设备与蓝牙设备交互数据的读取方法, 其特征在于, 包括以 下步骤:  [Claim 1] A method for reading data exchanged between an iOS device and a Bluetooth device, comprising the steps of:
iOS设备接收由蓝牙设备发送的数据, 该数据中带有 Tag, 其中所述 T ag占有 1、 2或 3个字节;  The iOS device receives data sent by the Bluetooth device, and the data carries a Tag, wherein the T ag occupies 1, 2 or 3 bytes;
分析所述 Tag所占的字节数量;  Analyzing the number of bytes occupied by the tag;
根据所述 Tag所占的字节数量, 读取所述数据中所述 Tag后面的内容  Reading the content behind the tag in the data according to the number of bytes occupied by the tag
[权利要求 2] 根据权利要求 1所述的 iOS设备与蓝牙设备交互数据的读取方法, 其特 征在于, 所述分析所述 Tag所占的字节数量的步骤包括: [Claim 2] The method for reading data of interaction between an iOS device and a Bluetooth device according to claim 1, wherein the step of analyzing the number of bytes occupied by the tag includes:
检测所述 Tag所占的字节数量是否大于一个字节, 若否, 则所述 Tag 所占的字节数量为 1 ;  Check whether the number of bytes occupied by the tag is greater than one byte, and if not, the number of bytes occupied by the tag is 1;
若是则检测所述 Tag所占的字节数量是否超过两个字节, 若否, 则所 述 Tag所占的字节数量为 2;  If yes, it is detected whether the number of bytes occupied by the tag exceeds two bytes, and if not, the number of bytes occupied by the tag is 2;
若是则所述 Tag所占的字节数量为 3。  If so, the number of bytes occupied by the tag is 3.
[权利要求 3] 根据权利要求 2所述的 iOS设备与蓝牙设备交互数据的读取方法, 其特 征在于, 所述检测所述 Tag所占的字节数量是否大于一个字节的步骤 包括: [Claim 3] The method for reading data of interaction between an iOS device and a Bluetooth device according to claim 2, wherein the step of detecting whether the number of bytes occupied by the tag is greater than one byte comprises:
将所述 Tag第一个字节 &运算 OxlF是否为 0x11 ; 当为否吋, 所述 Tag占 有 1个字节; 当为是吋, 所述 Tag占有大于 1个字节。  Whether the first byte of the Tag & operation OxlF is 0x11; when it is no, the tag occupies 1 byte; when it is 吋, the tag occupies more than 1 byte.
[权利要求 4] 根据权利要求 2所述的 iOS设备与蓝牙设备交互数据的读取方法, 其特 征在于, 所述检测所述 Tag所占的字节数量是否超过两个字节的步骤 包括: [Claim 4] The method for reading data of interaction between an iOS device and a Bluetooth device according to claim 2, wherein the step of detecting whether the number of bytes occupied by the tag exceeds two bytes comprises:
将 Tag第二个字节 &运算 0x80是否不等于 0; 当为否吋, 所述 Tag占有 2 个字节; 当为是吋, 所述 Tag占有超过 2个字节。  The second byte of the tag & operation 0x80 is not equal to 0; when it is no, the tag occupies 2 bytes; when it is 吋, the tag occupies more than 2 bytes.
[权利要求 5] —种 iOS设备与蓝牙设备交互数据的读取系统, 其特征在于, 包括: 接收模块, iOS设备接收由蓝牙设备发送的数据, 该数据中带有 Tag , 其中所述 Tag占有 1、 2或 3个字节; 分析模块, 分析所述 Tag所占的字节数量; [Claim 5] A reading system for interacting data between an iOS device and a Bluetooth device, comprising: a receiving module, the iOS device receiving data sent by the Bluetooth device, wherein the data has a tag, wherein the tag possesses 1, 2 or 3 bytes; An analysis module, analyzing the number of bytes occupied by the tag;
读取模块, 根据 Tag所占的字节数量, 读取数据中 Tag后面的内容。  The reading module reads the content behind the Tag in the data according to the number of bytes occupied by the Tag.
[权利要求 6] 根据权利要求 5所述的 iOS设备与蓝牙设备交互数据的读取系统, 其特 征在于, 所述分析模块包括: [Claim 6] The system for reading data of interaction between an iOS device and a Bluetooth device according to claim 5, wherein the analysis module comprises:
第一分析子模块, 用于检测所述 Tag所占的字节数量是否大于一个字 节, 若否, 则所述 Tag所占的字节数量为 1 ;  a first analysis submodule, configured to detect whether the number of bytes occupied by the tag is greater than one byte, and if not, the number of bytes occupied by the tag is 1;
第二分析子模块, 用于则检测所述 Tag所占的字节数量是否超过两个 字节, 若否, 则所述 Tag所占的字节数量为 2;  a second analysis submodule, configured to detect whether the number of bytes occupied by the tag exceeds two bytes, and if not, the number of bytes occupied by the tag is 2;
第三分析子模块, 在第二分析子模块检测结果为是吋, 确定所述 Tag 所占的字节数量为 3。  The third analysis sub-module, in the second analysis sub-module, the detection result is yes, determining that the number of bytes occupied by the tag is 3.
[权利要求 7] 根据权利要求 6所述的 iOS设备与蓝牙设备交互数据的读取系统, 其特 征在于, 所述第一分析子模块的检测方法为:  [Claim 7] The system for reading data of interaction between an iOS device and a Bluetooth device according to claim 6, wherein the detection method of the first analysis sub-module is:
将 Tag第一个字节 &运算 OxlF是否为 0x11 ; 当为否吋, 所述 Tag占有 1 个字节; 当为是吋, 所述 Tag占有大于 1个字节。  The first byte of the Tag & operation OxlF is 0x11; when it is no, the Tag occupies 1 byte; when it is 吋, the Tag occupies more than 1 byte.
[权利要求 8] 根据权利要求 6所述的 iOS设备与蓝牙设备交互数据的读取系统, 其特 征在于, 所述第二分析子模块的检测方法为: [Claim 8] The system for reading data of interaction between an iOS device and a Bluetooth device according to claim 6, wherein the detection method of the second analysis sub-module is:
将所述 Tag第二个字节 &运算 0x80是否不等于 0; 当为否吋, 所述 Tag 占有 2个字节; 当为是吋, 所述 Tag占有超过 2个字节。  The second byte of the tag & operation 0x80 is not equal to 0; when it is no, the tag occupies 2 bytes; when it is 吋, the tag occupies more than 2 bytes.
PCT/CN2017/076971 2017-03-16 2017-03-16 Method and system for reading interactive data between ios device and bluetooth device WO2018165948A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2017/076971 WO2018165948A1 (en) 2017-03-16 2017-03-16 Method and system for reading interactive data between ios device and bluetooth device
CN201780001540.3A CN107690819B (en) 2017-03-16 2017-03-16 Method and system for reading interactive data of iOS device and Bluetooth device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/076971 WO2018165948A1 (en) 2017-03-16 2017-03-16 Method and system for reading interactive data between ios device and bluetooth device

Publications (1)

Publication Number Publication Date
WO2018165948A1 true WO2018165948A1 (en) 2018-09-20

Family

ID=61154897

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/076971 WO2018165948A1 (en) 2017-03-16 2017-03-16 Method and system for reading interactive data between ios device and bluetooth device

Country Status (2)

Country Link
CN (1) CN107690819B (en)
WO (1) WO2018165948A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5274820A (en) * 1989-08-14 1993-12-28 International Business Machines Corporation Method and system for eliminating operation codes from intermediate prolog instructions
CN1288342A (en) * 2000-10-24 2001-03-21 深圳黎明电脑网络有限公司 Dynamic realizing method of mobile value added business and device therefor
CN104722058A (en) * 2015-04-03 2015-06-24 深圳市微队信息技术有限公司 Athlete competitive state analysis method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5274820A (en) * 1989-08-14 1993-12-28 International Business Machines Corporation Method and system for eliminating operation codes from intermediate prolog instructions
CN1288342A (en) * 2000-10-24 2001-03-21 深圳黎明电脑网络有限公司 Dynamic realizing method of mobile value added business and device therefor
CN104722058A (en) * 2015-04-03 2015-06-24 深圳市微队信息技术有限公司 Athlete competitive state analysis method and system

Also Published As

Publication number Publication date
CN107690819A (en) 2018-02-13
CN107690819B (en) 2021-06-15

Similar Documents

Publication Publication Date Title
CN103839005A (en) Malware detection method and malware detection system of mobile operating system
US20090037940A1 (en) POS hardware abstraction
CN105046186A (en) Two-dimensional code recognition method and device
CN109243425A (en) Speech recognition test method, device, system, computer equipment and storage medium
WO2014194827A1 (en) Method and device for mobile terminal to process visualization graphics code
CN105391674A (en) Information processing method and system, server, and client
CN109918226A (en) A kind of silence error-detecting method, device and storage medium
CN113506045A (en) Risk user identification method, device, equipment and medium based on mobile equipment
CN111881094A (en) Method, device, terminal and storage medium for extracting key information in log
CN116956080A (en) Data processing method, device and storage medium
JP2004164180A (en) Information processor, communication processor and method and computer program
CN107122647A (en) Finger print data processing method, device and electronic equipment
CN114244611A (en) Abnormal attack detection method, device, equipment and storage medium
WO2018165948A1 (en) Method and system for reading interactive data between ios device and bluetooth device
CN107436836A (en) The processing method and relevant device of a kind of journal file
CN112711955A (en) NFC information transmission method, NFC information transmission device and NFC terminal
CN110888791A (en) Log processing method, device, equipment and storage medium
EP3531335A1 (en) Barcode identification method and apparatus
CN105022959A (en) Analysis device and analysis method for analyzing malicious code of mobile terminal
CN106302935B (en) Method and system for identifying communication information
CN108650229A (en) A kind of network application behavior parsing restoring method and system
JP5603863B2 (en) Code collection technology for mobile devices
CN102194070A (en) Data processing method and system as well as computer program product thereof
CN104751096A (en) Rapid two-dimension code identification design and achievement method through IP (Internet Protocol) camera
CN111240696A (en) Method for extracting similar modules of mobile malicious program

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17901141

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 22/01/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 17901141

Country of ref document: EP

Kind code of ref document: A1