WO2014206141A1 - 一种串行数据传输方法及其系统 - Google Patents

一种串行数据传输方法及其系统 Download PDF

Info

Publication number
WO2014206141A1
WO2014206141A1 PCT/CN2014/076486 CN2014076486W WO2014206141A1 WO 2014206141 A1 WO2014206141 A1 WO 2014206141A1 CN 2014076486 W CN2014076486 W CN 2014076486W WO 2014206141 A1 WO2014206141 A1 WO 2014206141A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
bit binary
maximum value
sent
data transmission
Prior art date
Application number
PCT/CN2014/076486
Other languages
English (en)
French (fr)
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 US14/786,542 priority Critical patent/US9621388B2/en
Publication of WO2014206141A1 publication Critical patent/WO2014206141A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L27/00Modulated-carrier systems
    • H04L27/26Systems using multi-frequency codes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/08Arrangements for detecting or preventing errors in the information received by repeating transmission, e.g. Verdan system

Definitions

  • the invention belongs to the field of communication technology, and particularly relates to a serial data transmission method and a system thereof. ⁇ Background technique ⁇
  • the minimum unit of data that we usually need to transmit is characters. If the natural binary code of the character is used directly and no special start and stop signals are inserted, the receiver cannot parse the received data. For example, if a character is an 8-bit binary number, when the sender sends data to 1, 2, 3, the data stream transmitted on the channel is 00000001 0000001 0 0000001 1 o Since the receiving end cannot determine the start bit of the character, The received data may be 0000001 0 000001 00 000001 1 0 (ie 2, 4, 6), or 000001 00 00001 000 00001 1 00 (ie 4, 8, 1 2) and other erroneous data.
  • the invention provides a serial data transmission method and a system thereof, which do not need to additionally add start and end flags when serial data transmission is performed, and the receiving end can restore original data at any time and start receiving data at any time, thereby improving serial data.
  • the efficiency of the transmission is not required to additionally add start and end flags when serial data transmission is performed, and the receiving end can restore original data at any time and start receiving data at any time, thereby improving serial data.
  • a serial data transmission method comprising the steps of:
  • the bit synchronization receiving N-bit binary coded data continuously transmitted by the transmitting end wherein the N-bit binary coded data is N-bit binary coded data that the sender converts the original data according to a preset rule;
  • the highest value is decoded to obtain the original data sent by the transmitting end.
  • the preset rule is established according to the following manner:
  • each element in the N-bit binary data set is rotated leftward or rightward by 0 to N-1 times to obtain a data set, and the maximum value of the data set is obtained, and if the maximum value is equal to the element, the The most value belongs to the N-bit binary code database;
  • the maximum value is the maximum value or the minimum value.
  • the step of decoding the maximum value and obtaining the original data to be actually sent by the transmitting end further includes the following steps:
  • the embodiment of the invention further discloses a serial data transmission method, the method comprising the steps of: converting the original data to be actually transmitted into N-bit binary coded data according to a preset rule; continuously transmitting the N-bit binary coded data continuously .
  • each element of the N-bit binary data set is rotated leftward or rightward by 0 to N-1 times to obtain a data set, and the maximum value of the data set is obtained. If the maximum value is equal to the element, the most The value belongs to the N-bit binary code database;
  • the maximum value is a maximum value or a minimum value.
  • the embodiment of the invention further discloses a serial data transmission system, comprising a transmitting end and a receiving end, wherein the transmitting end comprises an encoding function module and a sending module, wherein the encoding function module is used to send the original to be sent by the transmitting end.
  • the data is converted into an N-bit binary code according to a preset rule, and the sending module is configured to continuously send the N-bit binary code to the receiving end continuously;
  • the receiving end includes a receiving module, a pre-decoding function module, and a decoding function module, where the receiving module is configured to receive, by the bit synchronization, an N-bit binary code that is continuously and repeatedly transmitted by the transmitting end, where the pre-decoding function module is used to The data received only after the bit synchronization is converted according to a preset rule to restore the N-bit binary code sent by the transmitting end; the decoding module is connected to the pre-decoding function module, and is used to restore the N-bit binary code to Raw data.
  • the encoding function module cyclically shifts each element of the N-bit binary set to the left or right by 0 to N-1 times to obtain a data set, and obtains the maximum value of the data set, if the maximum value is equal to the element Then, the most value belongs to the N-bit binary code database, and the mapping relationship between the original data to be transmitted and each binary code in the N-bit binary code database is established.
  • serial data transmission system of the embodiment of the present invention further includes a verification module, and the verification module is connected between the pre-decoding function module and the decoding function module, and is used for comparing two data consecutively after pre-decoding, if the same The data is correct, otherwise the data is discarded.
  • the invention has the advantages that: the serial data transmission does not need to additionally add the start and end flags, and the receiving end can restore the original data at any time to receive the data, thereby improving the serial data transmission. effectiveness.
  • Embodiment 1 is a flowchart of a serial data transmission method disclosed in Embodiment 1 of the present invention.
  • Embodiment 2 is a flowchart of a serial data transmission method according to Embodiment 2 of the present invention.
  • Embodiment 3 is a flowchart of a serial data transmission method according to Embodiment 3 of the present invention.
  • FIG. 4 is a block diagram of a serial data transmission system according to Embodiment 4 of the present invention.
  • Figure 5 is a block diagram of a serial data transmission system disclosed in Embodiment 5 of the present invention.
  • the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
  • the invention uses the coding mode for serial data transmission without adding additional start and end flags, and the receiving end can restore the original data at any time to receive data, thereby improving the efficiency of serial data transmission.
  • the present invention discloses a serial data transmission method, which includes the following steps: Step 101: The bit synchronization receives N-bit binary coded data continuously transmitted by the transmitting end, and the N-bit binary coded data is a transmitting end. N-bit binary encoded data that converts raw data according to a preset rule;
  • the preset rule is established by: cyclically shifting each element in the N-bit binary data set to the left or right by 0 to N-1 times to obtain a data set, and obtaining the maximum value of the data set. If the maximum value is equal to the element, the maximum value belongs to the N-bit binary code database, and then the mapping relationship between the original data to be transmitted and each binary code in the N-bit binary code database is established.
  • the default binary database is S
  • the set of all N-bit binary numbers is Q
  • Vxe Q if X is equal to the maximum value of the result set P of the X-circular right shift (or left shift) 0 to N-1 times, then xeS.
  • the result set P generated by 0 to 2 times is ⁇ 001, 010, 100 ⁇ , where the maximum value of P is 100, not equal to x, so 001 does not belong to the set S. ;
  • the maximum set S of the 3-bit binary code database is ⁇ 000, 100, 110, 111 ⁇ .
  • the maximum set of 4-bit binary coded databases S is equal to ⁇ 0000, 1000, 1010, 1100, 1110, 1111 ⁇ .
  • the 5-bit binary code database maximum set S is equal to ⁇ 00000, 10000, 10100, 11000, 11010, 11100, 11110, 11111 ⁇ .
  • the maximum set of 6-bit binary coded databases S is equal to ⁇ 000000, 100000, 100100, 101000, 101010, 110000, 110010, 110100, 110110, 111000, 111010, 111100, 111110,
  • the 7-bit binary code database maximum set S is equal to ⁇ 0000000, 1000000, 1001000 1010000, 1010100, 1100000, 1100010, 1100100, 1101000, 1101010, 1101100 1110000, 1110010, 1110100, 1110110, 1111000, 1111010, 1111100, 1111110
  • the 8-bit binary code database maximum set S is ⁇ 00000000, 10000000, 10001000, 10010000, 10100000, 10100100, 10101000, 10101010, 11000000, 11000010, 11000100, 11001000, 11001010, 11001100, 11010000, 11010010, 11010100, 11011000, 11011010, 11100000 , 11100010, 11100100, 11100110, 11101000, 11101010, 11101100, 11101110, 11110000, 11110010, 11110100, 11110110, 11111000, 11111010, 11111100, 11111110, 11111 ⁇ .
  • Step 102 cyclically shift (or shift left) 0 to N-1 times for each of the received N-bit binary coded data to obtain a data set, and obtain a maximum value of the data set;
  • the transmitting end transmits the original data to be transmitted and then repeats the encoding, and the receiving end cyclically shifts the binary encoded data to the right (or left) 0 to N-1 times (N is the number of bits of binary data),
  • N is the number of bits of binary data
  • the maximum value of the result set is the binary coded data sent by the sender.
  • Step 103 Decode the maximum value to obtain original data actually sent by the transmitting end.
  • Example 1 The following is a set of codec functions that satisfy the rule and their transmission examples.
  • 01001 cycle right shift 1 time is 10100
  • Example 2 Here is another set of codec functions that satisfy the rule.
  • the set of 5 bits of the code is ⁇ 00000, 10000, 10100, 11000, 11010, 11100, 11110, 11111 ⁇ o
  • the sender transmits the code 11010
  • the data stream on the channel is 11010 11010 11010, because the start bit of the data received by the receiving end is uncertain, the data received by the receiving end is easy to belong to the set ⁇ 11010, 10101, 01011, 10110, 01101 ⁇ according to different starting bits.
  • the set of results that are rotated right by 0 to 4 times is ⁇ 11010, 10101, 01011, 10110, 01101 ⁇ , and it is easy to know that the maximum value 11010 is the code sent by the sender;
  • the set of results that are rotated right by 0 to 4 times is ⁇ 10101, 01011, 10110, 01101, 11010 ⁇ , and it is easy to know that the maximum value 11010 is the code sent by the sender;
  • the set of results that are rotated right by 0 to 4 times is ⁇ 01011, 10110, 01101, 11010, 10101 ⁇ , and it is easy to know that the maximum value 11010 is the code sent by the sender;
  • the set of results that are rotated right by 0 to 4 times is ⁇ 10110, 01101, 11010, 10101, 01011 ⁇ , and it is easy to know that the maximum value 11010 is the code sent by the sender;
  • the set of results that are rotated right by 0 to 4 times is ⁇ 01101, 11010, 10101, 01011, 10110 ⁇ , and it is easy to know that the maximum value 11010 is the code sent by the sender;
  • the conversion of the most value (maximum value or minimum value) after cyclic shift can restore the original data sent by the sender.
  • the receiving end can restore the original data sent by the transmitting end.
  • Embodiment 2 Referring to FIG. 2, the present invention also discloses a serial data transmission method, including the following steps: Step 201: The bit synchronization receives N-bit binary coded data continuously transmitted by the transmitting end, and the N-bit binary coded data is The N-bit binary coded data that the sender converts the original data according to a preset rule;
  • the preset rule is established by: cyclically shifting each element in the N-bit binary data set to the left or right by 0 to N-1 times, to obtain a data set, and obtaining the minimum value of the data set. If the minimum value is equal to the element, the minimum value belongs to the N-bit binary code database, and then the mapping relationship between the original data to be transmitted and each binary code in the N-bit binary code database is established.
  • the default binary database is S
  • the set of all N-bit binary numbers is Q.
  • Vxe Q if X is equal to the minimum value of the result set P of 0 to N-1 times when the X loop is shifted right (or left) by 0, then xeS.
  • the following is an example of 3-bit binary data.
  • the set of 3-bit binary numbers Q ⁇ 000, 001, 010, 011, 100, 101, 110, 111 ⁇ o
  • the resulting result set P is ⁇ 001, 010, 100 ⁇ , where the minimum value of P is 001, which is equal to x, so 001 belongs to set S;
  • the result set P is ⁇ 010, 100, 001 ⁇ , where the minimum value of P is 001, not equal to x, so 010 does not belong to the set S ;
  • the result set P is ⁇ 011, 110, 101 ⁇ , where the minimum value of P is 011, which is equal to x, so 011 belongs to the set S;
  • the result set P generated by 0 to 2 times is ⁇ 100, 001, 010 ⁇ , where the minimum value of P is 001, not equal to x, so 100 does not belong to the set S. ;
  • the maximum set S of the 3-bit binary code database is ⁇ 000, 100, 110, 111 ⁇ .
  • the 4-bit binary code database set S is equal to ⁇ 0000, 1000, 1010, 1100,
  • the 5-bit binary code database set S is equal to ⁇ 00000, 00001, 01011, 00011, 00101, 00011, 00001, 0000 ⁇ .
  • Step 102 Looping each of the received N-bit binary coded data to the left or right by 0 to N-1 times to obtain a data set, and obtaining a minimum value of the data set;
  • the transmitting end transmits the original data to be transmitted and then repeats the encoding, and the receiving end cyclically shifts the binary encoded data to the right (or left) 0 to N-1 times (N is the number of bits of binary data),
  • N is the number of bits of binary data
  • the resulting set or minimum value is the binary encoded data sent by the sender.
  • Step 203 Decode the minimum value to obtain original data actually sent by the transmitting end.
  • the present invention also discloses a serial data transmission method, where the method includes the following steps:
  • Step 301 Convert the original data to be sent into N-bit binary coded data according to a preset rule.
  • the sending end cyclically shifts each element of the N-bit binary set to the left or right by 0 to N-1 times.
  • a data set obtaining a maximum value (maximum value or minimum value) of the data set, if the maximum value is equal to the element, the maximum value belongs to the N-bit binary code database, and then establishing the original data to be sent and the N-bit binary
  • the mapping relationship between the encoding databases, when the original data is to be sent, the N corresponding to the original data is actually binary encoded data.
  • Step 302 continuously transmit the N-bit binary coded data.
  • the present invention also discloses a serial data transmission system.
  • the serial data transmission system includes a transmitting end 401 and a receiving end 402.
  • the transmitting end further includes an encoding function module 4010 and a transmitting module 4011.
  • the function module 4010 is configured to convert the original data actually sent by the transmitting end
  • the N-bit binary code is used, and the transmitting module 4011 is configured to continuously transmit the N-bit binary code to the receiving end.
  • the encoding function module 4010 cyclically shifts each element of the N-bit binary set to the left or right by 0 to N-1 times to obtain a data set, and obtains the maximum value of the data set, if the maximum value.
  • the most value belongs to the N-bit binary code database, and then the mapping relationship between the original data and the preset binary code database is established.
  • the N corresponding to the original data is actually transmitted as a binary code. data.
  • the receiving end 402 includes a receiving module 4020, a pre-decoding function module 4021, and a decoding function module 4022, wherein the receiving module 4020 is configured to receive, by the bit synchronization, a N-bit binary code that is continuously and repeatedly transmitted by the transmitting end, and the pre-decoding function module 4021 is configured to Only the data received after the bit synchronization is converted according to the preset rule, thereby restoring the N-bit binary coded data sent by the transmitting end.
  • the decoding module 4022 is coupled to the pre-decoding function module 4021 for restoring the N-bit binary encoded data to the original data transmitted by the transmitting end.
  • the serial data transmission system further includes a verification module 4023.
  • the verification module 4023 is connected between the pre-decoding function module 4021 and the decoding function module 4022 for comparing pre-decoding and continuous. Two data, if the same, the data is correct, otherwise the data is discarded.
  • the system of the present invention performs serial data transmission using the encoding of the mode, it is not necessary to additionally transmit the start and end flag signals, and the receiving end can restore the original data at any time.
  • the invention has the advantages that: the serial data transmission does not need to additionally add the start and end flags, and the receiving end can restore the original data at any time to receive the data, thereby improving the serial data transmission. effectiveness.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Dc Digital Transmission (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)
  • Communication Control (AREA)

Abstract

本发明属于通信技术领域,公开了一种串行数据传输方法和系统,其中所述方法包括步骤:位同步接收发送端连续重复发送的N位二进制编码数据,所述N位二进制编码数据为发送端按照预设规则将原始数据转化的N位二进制编码数据;对接收到的每一个所述N位二进制编码数据循环左移或右移0到N-1次,得到一数据集合,获取该数据集合的最值;对所述最值进行解码,得到发送端发送的原始数据。本发明实施例提供的串行数据传输方法和系统进行串行数据传输时不需要额外加入起始和结束标志,且接收端任意时刻开始接收数据都能够还原原始数据,提高了串行数据传输的效率。

Description

一种串行数据传输方法及其系统
【技术领域】
本发明属于通信技术领域, 特别是属于一种串行数据传输方法及其系统。 【背景技术】
在串行数据传输中, 因为数据是一位一位串行传输的, 而通常我们需要传 输的数据的最小单位是字符。 如果直接使用字符的自然二进制码发送且不插入 特殊的起始和停止信号, 则接收端无法解析收到的数据。 例如, 如果一个字符 为 8位二进制数, 当发送端发送数据为 1, 2, 3时, 在信道上传输的数据流为 00000001 0000001 0 0000001 1 o 由于接收端不能确定字符的起始位, 所以收到 数据可能是 0000001 0 000001 00 000001 1 0 (即 2, 4, 6), 或 000001 00 00001 000 00001 1 00 (即 4, 8, 1 2) 等错误的数据。 为了避免这种问题, 通常的做法是使 用特殊的标志位来标识字符的起始位 (例如, UART 协议就是加入了起始位和结 束位用来标识字符的起始和结束), 但这种做法的缺点是需要传输额外的标志位 导致传输效率变低。
【发明内容】
本发明提供了一种串行数据传输方法及其系统, 进行串行数据传输时不需 要额外加入起始和结束标志, 且接收端任意时刻开始接收数据都能够还原原始 数据, 提高了串行数据传输的效率。
本发明采用如下技术方案:
一种串行数据传输方法, 所述方法包括步骤:
位同步接收发送端连续重复发送的 N位二进制编码数据, 所述 N位二进制 编码数据为发送端按照预设规则将原始数据转化的 N位二进制编码数据;
对接收到的每一个所述 N位二进制编码数据循环左移或右移 0到 N-1 次, 得到一数据集合, 获取该数据集合的最值;
对所述最值进行解码, 得到发送端发送的原始数据。
具体的, 所述预设规则根据以下方式建立:
依此对 N位二进制数据集合中的每个元素循环左移或右移 0到 N-1 次, 得 到一数据集合, 获取该数据集合的最值, 如果该最值等于所述元素, 则该最值 属于 N位二进制编码数据库;
建立实际要发送的原始数据与 N 位二进制编码数据库中每个二进制编码之 间的映射关系。
所述最值为最大值或最小值。
其中, 对所述最值进行解码, 得到发送端实际要发送的原始数据之前进一 步包括步骤:
比较连续收到的两个数据, 如果相同则数据正确, 否则丢弃该数据。
本发明实施例还公开了一种串行数据传输方法, 所述方法包括步骤: 将实际要发送的原始数据按照预设规则转化为 N位二进制编码数据; 连续重复发送所述 N位二进制编码数据。
所述将实际要发送的原始数据按照预设规则转化为 N 位二进制编码具体步 骤为:
依此对 N位二进制数据集合的每个元素循环左移或右移 0到 N-1 次, 得到 一数据集合, 获取该数据集合的最值, 如果该最值等于所述元素, 则该最值属 于 N位二进制编码数据库;
建立实际要发送的原始数据与 N 位二进制编码数据库中每个二进制编码之 间的映射关系。
具体的, 所述最值为最大值或最小值。
本发明实施例还公开了一种串行数据传输系统, 包括发送端和接收端, 所 述发送端包括编码函数模块和发送模块, 其中所述编码函数模块用于将发送端 实际要发送的原始数据按照预设规则转化为 N 位二进制编码, 所述发送模块用 于连续重复发送所述 N位二进制编码给接收端; 所述接收端包括接收模块、 预解码函数模块和解码函数模块, 其中所述接 收模块用于位同步接收发送端连续重复发送的 N 位二进制编码, 所述预解码函 数模块用于将接收端在只进行了位同步后接收到的数据按照预设规则进行转化 从而还原出发送端发送的 N 位二进制编码; 所述解码模块与预解码函数模块连 接, 用于将所述 N位二进制编码还原为原始数据。
所述编码函数模块依此对 N位二进制集合的每个元素循环左移或右移 0到 N-1 次, 得到一数据集合, 获取该数据集合的最值, 如果该最值等于所述元素, 则该最值属于 N位二进制编码数据库, 建立实际要发送的原始数据与 N位二进 制编码数据库中每个二进制编码之间的映射关系。
进一步的, 本发明实施例串行数据传输系统还包括校验模块, 所述校验模 块连接在预解码函数模块和解码函数模块之间, 用于比较预解码后连续两个数 据, 如果相同则数据正确, 否则丢弃该数据。
本发明与现有技术相比, 有益效果在于: 进行串行数据传输时不需要额外 加入起始和结束标志, 且接收端任意时刻开始接收数据都能够还原原始数据, 提高了串行数据传输的效率。
【附图说明】
图 1是本发明实施例一公开的 种串行数据传输方法流程图
图 2是本发明实施例二公开的 种串行数据传输方法流程图
图 3是本发明实施例三公开的 种串行数据传输方法流程图
图 4是本发明实施例四公开的 种串行数据传输系统框图;
图 5是本发明实施例五公开的 种串行数据传输系统框图。
【具体实施方式】
为了使本发明的目的、 技术方案及优点更加清楚明白, 以下结合附图及实 施例, 对本发明进行进一步详细说明。 应当理解, 此处所描述的具体实施例仅 仅用以解释本发明, 并不用于限定本发明。 本发明使用该编码方式进行串行数据传输时不需要额外加入起始和结束标 志, 且接收端任意时刻开始接收数据都能够还原原始数据, 提高了串行数据传 输的效率。
实施例一
如图 1 所示, 本发明公开了一种串行数据传输方法, 包括以下步骤: 步骤 101 : 位同步接收发送端连续重复发送的 N位二进制编码数据, 所述 N 位二进制编码数据为发送端按照预设规则将原始数据转化的 N 位二进制编码数 据;
本实施例中预设规则通过以下方式建立: 依此对 N 位二进制数据集合中的 每个元素循环左移或右移 0到 N-1 次, 得到一数据集合, 获取该数据集合的最 大值, 如果该最大值等于所述元素, 则该最大值属于 N 位二进制编码数据库, 然后建立实际要发送的原始数据与 N 位二进制编码数据库中每个二进制编码之 间的映射关系。
记预设二进制数据库为 S, 记所有 N位二进制数的集合为 Q, 对于 VxeQ, 如果 X等于 X循环右移 (或左移) 0到 N-1 次的结果集合 P的最大值, 则 xeS。
下面以 3位二进制数据举例说明, 对于 3位二进制数据来说, 3位二进制数 的集合 Q={000, 001, 010, 011, 100, 101, 110, 111} o
取 x=000,将其右移(或左移) 0到 2次产生的结果集 P为 {000, 000, 000}, 其中 P的最大值为 000, 等于 x, 所以 000属于集合 S;
取 x=001,将其右移(或左移) 0到 2次产生的结果集 P为 {001, 010, 100}, 其中 P的最大值为 100, 不等于 x, 所以 001 不属于集合 S;
取 x=010,将其右移(或左移) 0到 2次产生的结果集 P为 {010, 100, 001} , 其中 P的最大值为 100, 不等于 x, 所以 010不属于集合 S;
取 x=011,将其右移(或左移) 0到 2次产生的结果集 P为 {011, 110, 101}, 其中 P的最大值为 110, 不等于 x, 所以 011 不属于集合 S;
取 x=100,将其右移(或左移) 0到 2次产生的结果集 P为 {100, 001, 010}, 其中 P的最大值为 100, 等于 x, 所以 100属于集合 S; 取 x=101,将其右移(或左移) 0到 2次产生的结果集 P为 {101, 011, 110} , 其中 Ρ的最大值为 110, 不等于 χ, 所以 101不属于集合 S;
取 χ=110,将其右移(或左移) 0到 2次产生的结果集 Ρ为 {110, 101, 011} , 其中 Ρ的最大值为 110, 等于 χ, 所以 110不属于集合 S;
取 χ=111,将其右移(或左移) 0到 2次产生的结果集 Ρ为 {111, 111, 111}, 其中 Ρ的最大值为 111, 等于 χ, 所以 111属于集合 S;
综上可得, 3位二进制编码数据库的最大值集合 S为 {000, 100, 110, 111}。 同理易得, 4位二进制编码数据库最大值集合 S等于 {0000, 1000, 1010, 1100, 1110, 1111}。
5位二进制编码数据库最大值集合 S等于 {00000, 10000, 10100, 11000, 11010, 11100, 11110, 11111}。
6位二进制编码数据库最大值集合 S等于 {000000, 100000, 100100,101000, 101010, 110000, 110010, 110100, 110110, 111000, 111010, 111100, 111110,
7位二进制编码数据库最大值集合 S 等于 {0000000, 1000000, 1001000 1010000, 1010100, 1100000, 1100010, 1100100, 1101000, 1101010, 1101100 1110000, 1110010, 1110100, 1110110, 1111000, 1111010, 1111100, 1111110
8位二进制编码数据库最大值集合 S为 {00000000, 10000000, 10001000, 10010000, 10100000, 10100100, 10101000, 10101010, 11000000, 11000010, 11000100 , 11001000 , 11001010, 11001100, 11010000 , 11010010, 11010100, 11011000, 11011010, 11100000, 11100010, 11100100, 11100110, 11101000, 11101010, 11101100, 11101110, 11110000, 11110010, 11110100, 11110110, 11111000, 11111010, 11111100, 11111110, 11111111}。
可以看出, 随着二进制编码位数的增加, 二进制编码数据库集合 S 的元素 的个数会越来越多, 预先根据需要发送的字符个数, 选择满足字符数的二进制 编码库, 预先建立字符与二进制编码库之间的映射关系即构成编码函数。 步骤 102: 对接收到的每一个所述 N位二进制编码数据循环右移 (或左移) 0到 N-1次, 得到一数据集合, 获取该数据集合的最大值;
发送端将需要发送的原始数据经过编码后连续重复的发送, 而接收端将收 到二进制编码数据循环右移 (或左移) 0到 N-1 次 (N 为二进制数据的位数), 其结果集合的最大值就是发送端发送的二进制编码数据。
步骤 103: 对所述最大值进行解码, 得到发送端实际发送的原始数据。
示例 1: 下面为满足该规则的一组编解码函数及其传输示例。
编码函数 y=F (X)的映射关系如下:
Figure imgf000008_0001
预编码函数 y=g(s)定义为 y=s循环右移 0~4次的最大值
解码函数 x=f (y)的映射关系如下:
Figure imgf000008_0002
当发送端需要发送的原始数据为 2 时, 使用编码函数进行编码后的数据为 F(2)=10100。 因为发送端会一直连续重复的发送该编码, 所以在信道上看到是 如下二进制串: ...101001010010100...。 由于接收端只进行了位同步且接收的 起始时间又不确定, 所以接收端收到的数据 se {10100, 01001, 10010, 00101, 01010}。使用上面的预解码函数对 s预解码得 g (10100) =10100, g (01001 )=10100, g (10010) =10100, g (00101 )=10100, g (01010) =10100,即 g(s)=10100,se {10100, 01001, 10010, 00101, 01010}。 最后解码后的数据为 f (10100) =2, 通信结束。
其中, g (01001 )=10100的计算过程如下: 01001循环右移 0次为 01001,
01001循环右移 1次为 10100,
01001循环右移 2次为 01010,
01001循环右移 3次为 00101,
01001循环右移 4次为 10010,
这 5次移动的最大值为 MAX (01001, 10100, 01010, 00101, 10010) =10100 即 g (01001 )=10100。
示例 2: 下面为另一组满足该规则的编解码函数。
编码函数 y=F (X)及解码函数 x=f (y)的映射关系如下,
X y(6位 2进
制数)
0 000000
1 100000
2 100100
3 101000
4 101010
5 110000
6 110010
7 110100
8 110110
9 111000
10 111010
11 111100
12 111110
13 111111 预编码函数 y=g(s)定义为 y=s循环右移 0 5次的最大值,
例如,如果使用 5位的编码发送数据, 5位该编码的集合为 {00000, 10000, 10100, 11000, 11010, 11100, 11110, 11111} o 当发送端发送编码 11010 时, 信道上的数据流为 11010 11010 11010, 由于接收端接收数据的起始位不确定, 所以根据起始位的不同易得接收端收到的数据属于集合 {11010, 10101, 01011, 10110, 01101},
如果收到数据为 11010, 将其循环右移 0 到 4次的结果的集合为 {11010, 10101, 01011, 10110, 01101} , 易知其中的最大值 11010即为发送端发送的编 码;
如果收到数据为 10101, 将其循环右移 0 到 4次的结果的集合为 {10101, 01011, 10110, 01101, 11010} , 易知其中的最大值 11010即为发送端发送的编 码;
如果收到数据为 01011, 将其循环右移 0 到 4次的结果的集合为 {01011, 10110, 01101, 11010, 10101} , 易知其中的最大值 11010即为发送端发送的编 码;
如果收到数据为 10110, 将其循环右移 0 到 4次的结果的集合为 {10110, 01101, 11010, 10101, 01011} , 易知其中的最大值 11010即为发送端发送的编 码;
如果收到数据为 01101, 将其循环右移 0 到 4次的结果的集合为 {01101, 11010, 10101, 01011, 10110} , 易知其中的最大值 11010即为发送端发送的编 码;
综上可得, 不管接收端从哪一位开始接收数据, 经过循环移位求最值 (最 大值或最小值) 的转化后都可以还原发送端发送的原始数据。 同理可验证, 只 要发送该编码数据, 接收端都可以还原发送端发送的原始数据。
本发明使用该方式的编码进行串行数据传输时, 不需要额外发送起始和结 束的标志信号, 且接收端任意时刻开始接收数据都能够还原原始数据。
实施例二 请参阅图 2所示, 本发明还公开了一种串行数据传输方法, 包括以下步骤: 步骤 201 : 位同步接收发送端连续重复发送的 N位二进制编码数据, 所述 N 位二进制编码数据为发送端按照预设规则将原始数据转化的 N 位二进制编码数 据;
本实施例中预设规则通过以下方式建立: 依此对 N 位二进制数据集合中的 每个元素循环左移或右移 0到 N-1 次, 得到一数据集合, 获取该数据集合的最 小值, 如果该最小值等于所述元素, 则该最小值属于 N 位二进制编码数据库, 然后建立实际要发送的原始数据与 N 位二进制编码数据库中每个二进制编码之 间的映射关系。
记预设二进制数据库为 S, 记所有 N位二进制数的集合为 Q, 对于 VxeQ, 如果 X等于 X循环右移 (或左移) 0到 N-1 次的结果集合 P的最小值, 则 xeS。 下面以 3位二进制数据举例说明, 对于 3位二进制数据来说, 3位二进制数 的集合 Q={000, 001, 010, 011, 100, 101, 110, 111} o
取 x=000,将其右移(或左移) 0到 2次产生的结果集 P为 {000, 000, 000}, 其中 P的最小值为 000, 等于 x, 所以 000属于集合 S;
取 x=001,将其右移(或左移) 0到 2次产生的结果集 P为 {001, 010, 100}, 其中 P的最小值为 001, 等于 x, 所以 001属于集合 S;
取 x=010,将其右移(或左移) 0到 2次产生的结果集 P为 {010, 100, 001} , 其中 P的最小值为 001, 不等于 x, 所以 010不属于集合 S;
取 x=011,将其右移(或左移) 0到 2次产生的结果集 P为 {011, 110, 101}, 其中 P的最小值为 011, 等于 x, 所以 011属于集合 S;
取 x=100,将其右移(或左移) 0到 2次产生的结果集 P为 {100, 001, 010}, 其中 P的最小值为 001, 不等于 x, 所以 100不属于集合 S;
取 x=101,将其右移(或左移) 0到 2次产生的结果集 P为 {101, 011, 110}, 其中 P的最小值为 011, 不等于 x, 所以 101 不属于集合 S;
取 x=110,将其右移(或左移) 0到 2次产生的结果集 P为 {110, 101, 011} , 其中 P的最小值为 011, 不等于 x, 所以 110不属于集合 S; 取 x=111,将其右移(或左移) 0到 2次产生的结果集 P为 {111, 111, 111}, 其中 P的最小值为 111, 等于 x, 所以 111属于集合 S;
综上可得, 3位二进制编码数据库的最大值集合 S为 {000, 100, 110, 111}。 同理易得, 4位二进制编码数据库集合 S等于 {0000, 1000, 1010, 1100,
1110, 1111}。
5位二进制编码数据库集合 S等于 {00000, 00001, 01011, 00011, 00101, 00011, 00001, 0000}。
步骤 102:对接收到的每一个所述 N位二进制编码数据循环左移或右移 0到 N-1次, 得到一数据集合, 获取该数据集合的最小值;
发送端将需要发送的原始数据经过编码后连续重复的发送, 而接收端将收 到二进制编码数据循环右移 (或左移) 0到 N-1 次 (N 为二进制数据的位数), 其结果集合的或最小值就是发送端发送的二进制编码数据。
步骤 203: 对所述最小值进行解码, 得到发送端实际发送的原始数据。
实施例三
请参阅图 3 所示, 本发明还公开一种串行数据传输方法, 所述方法包括步 骤:
步骤 301: 将要发送的原始数据按照预设规则转化为 N位二进制编码数据; 本步骤中发送端依此对 N位二进制集合的每个元素循环左移或右移 0到 N-1 次, 得到一数据集合, 获取该数据集合的最值 (最大值或者最小值), 如果该最 值等于该元素, 则该最值属于 N 位二进制编码数据库, 然后建立实际要发送的 原始数据与 N 位二进制编码数据库之间的映射关系, 那么要发送原始数据时, 实际发送的是该原始数据对应的 N为二进制编码数据。
步骤 302: 连续重复发送该 N位二进制编码数据。
实施例四
请参阅图 4 所示, 本发明还公开了一种串行数据传输系统, 该串行数据传 输系统包括发送端 401 和接收端 402, 发送端进一步包括编码函数模块 4010和 发送模块 4011,其中编码函数模块 4010用于将发送端实际要发送的原始数据转 化为 N位二进制编码, 发送模块 401 1 用于连续重复发送 N位二进制编码给接收 端。 本实施例中编码函数模块 401 0依此对 N位二进制集合的每个元素循环左移 或右移 0到 N-1 次, 得到一数据集合, 获取该数据集合的最值, 如果该最值等 于元素, 则该最值属于 N 位二进制编码数据库, 然后建立原始数据与预设二进 制编码数据库之间的映射关系, 那么要发送原始数据时, 实际发送的是该原始 数据对应的 N为二进制编码数据。
接收端 402包括接收模块 4020、预解码函数模块 4021和解码函数模块 4022, 其中接收模块 4020用于位同步接收发送端连续重复发送的 N位二进制编码, 预 解码函数模块 4021 用于将接收端在只进行了位同步后接收到的数据按照预设规 则进行转化, 从而还原出发送端发送的 N位二进制编码数据。 解码模块 4022与 预解码函数模块 4021连接, 用于将 N位二进制编码数据还原为发送端发送的原 始数据。
实施例五
为了提高串行数据传输系统的准确性, 串行数据传输系统, 还包括校验模 块 4023,校验模块 4023连接在预解码函数模块 4021和解码函数模块 4022之间, 用于比较预解码后连续两个数据, 如果相同则数据正确, 否则丢弃该数据。
本发明所示系统使用该方式的编码进行串行数据传输时, 不需要额外发送 起始和结束的标志信号, 且接收端任意时刻开始接收数据都能够还原原始数据。
以上所述仅为本发明的较佳实施例而已, 并不用以限制本发明, 凡在本发 明的精神和原则之内所作的任何修改、 等同替换和改进等, 均应包含在本发明 的保护范围之内。
【工业实用性】
本发明与现有技术相比, 有益效果在于: 进行串行数据传输时不需要额外 加入起始和结束标志, 且接收端任意时刻开始接收数据都能够还原原始数据, 提高了串行数据传输的效率。

Claims

权 利 要 求 书
1、 一种串行数据传输方法, 所述方法包括步骤:
位同步接收发送端连续重复发送的 N位二进制编码数据, 所述 N位二进制 编码数据为发送端按照预设规则将原始数据转化的 N位二进制编码数据;
对接收到的每一个所述 N位二进制编码数据循环左移或右移 0到 N-1 次, 得到一数据集合, 获取该数据集合的最值;
对所述最值进行解码, 得到发送端发送的原始数据。
2、 根据权利要求 1所述的串行数据传输方法, 其中, 所述预设规则根据以 下方式建立:
依此对 N位二进制数据集合中的每个元素循环左移或右移 0到 N-1 次, 得 到一数据集合, 获取该数据集合的最值, 如果该最值等于所述元素, 则该最值 属于 N位二进制编码数据库;
建立实际要发送的原始数据与 N 位二进制编码数据库中每个二进制编码之 间的映射关系。
3、 根据权利要求 1 或 2所述的串行数据传输方法, 其中, 所述最值为最大 值或最小值。
4、根据权利要求 1 所述的串行数据传输方法,其中,对所述最值进行解码, 得到发送端实际要发送的原始数据之前进一步包括步骤:
比较连续收到的两个数据, 如果相同则数据正确, 否则丢弃该数据。
5、 一种串行数据传输方法, 所述方法包括步骤:
将实际要发送的原始数据按照预设规则转化为 N位二进制编码数据; 连续重复发送所述 N位二进制编码数据。
6、 根据权利要求 5所述的串行数据传输方法, 其中, 所述将实际要发送的 原始数据按照预设规则转化为 N位二进制编码具体步骤为:
依此对 N位二进制数据集合的每个元素循环左移或右移 0到 N-1 次, 得到 一数据集合, 获取该数据集合的最值, 如果该最值等于所述元素, 则该最值属 于 N位二进制编码数据库; 建立实际要发送的原始数据与 N 位二进制编码数据库中每个二进制编码之 间的映射关系。
7、 根据权利要求 5或 6所述的串行数据传输方法, 其中所述最值为最大值 或最小值。
8、 一种串行数据传输系统, 包括发送端和接收端, 所述发送端包括编码函 数模块和发送模块, 其中所述编码函数模块用于将发送端实际要发送的原始数 据按照预设规则转化为 N位二进制编码,所述发送模块用于连续重复发送所述 N 位二进制编码给接收端;
所述接收端包括接收模块、 预解码函数模块和解码函数模块, 其中所述接 收模块用于位同步接收发送端连续重复发送的 N 位二进制编码, 所述预解码函 数模块用于将接收端在只进行了位同步后接收到的数据按照预设规则进行转化 从而还原出发送端发送的 N 位二进制编码; 所述解码模块与预解码函数模块连 接, 用于将所述 N位二进制编码还原为原始数据。
9、 根据权利要求 8所述的串行数据传输系统, 其中, 所述编码函数模块依 此对 N位二进制集合的每个元素循环左移或右移 0到 N-1次,得到一数据集合, 获取该数据集合的最值, 如果该最值等于所述元素, 则该最值属于 N 位二进制 编码数据库, 建立实际要发送的原始数据与 N 位二进制编码数据库中每个二进 制编码之间的映射关系。
1 0、 根据权利要求 8或 9所述的串行数据传输系统, 其中, 还包括校验模 块, 所述校验模块连接在预解码函数模块和解码函数模块之间, 用于比较预解 码后连续两个数据, 如果相同则数据正确, 否则丢弃该数据。
PCT/CN2014/076486 2013-06-27 2014-04-29 一种串行数据传输方法及其系统 WO2014206141A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US14/786,542 US9621388B2 (en) 2013-06-27 2014-04-29 Method for serial data transmission and system therefor

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310262746.5A CN103365814B (zh) 2013-06-27 2013-06-27 一种串行数据传输方法及其系统
CN201310262746.5 2013-06-27

Publications (1)

Publication Number Publication Date
WO2014206141A1 true WO2014206141A1 (zh) 2014-12-31

Family

ID=49367203

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/076486 WO2014206141A1 (zh) 2013-06-27 2014-04-29 一种串行数据传输方法及其系统

Country Status (3)

Country Link
US (1) US9621388B2 (zh)
CN (1) CN103365814B (zh)
WO (1) WO2014206141A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103365814B (zh) * 2013-06-27 2016-08-17 深圳市汇顶科技股份有限公司 一种串行数据传输方法及其系统
CN109871643B (zh) * 2019-03-07 2023-05-16 中国人民解放军国防科技大学 一种飞行气动数据处理方法及装置
CN114070901B (zh) * 2021-09-30 2024-01-02 深圳智慧林网络科技有限公司 基于多数据对齐的数据发送和接收方法、装置和设备
CN114327237A (zh) * 2021-12-15 2022-04-12 中国地质大学(武汉) 利用上位机进行实时数据解码的方法、装置及设备

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5926508A (en) * 1995-02-21 1999-07-20 Koos Technical Services, Inc. Communication scheme using non-coherent frequency detection of trellis-based coding of plural transmission frequencies per baud
CN1334992A (zh) * 1999-10-27 2002-02-06 印芬龙科技股份有限公司 对串行数据流进行编码的编码方法和编码装置
CN101119178A (zh) * 2006-08-01 2008-02-06 华为技术有限公司 信号发送、接收方法及信号发送、接收装置
CN101292221A (zh) * 2005-11-22 2008-10-22 英特尔公司 用于串行链路的基于信号跃迁特征的编码
CN102208975A (zh) * 2011-04-07 2011-10-05 泉州天地星电子有限公司 一种信号编码加密传输的方法
CN103365814A (zh) * 2013-06-27 2013-10-23 深圳市汇顶科技股份有限公司 一种串行数据传输方法及其系统

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE69031701T2 (de) * 1989-09-08 1998-03-12 Fujitsu Ltd Kodier- und Dekodierschaltung für lauflängenbegrenzte Kodierung
WO1999033019A1 (en) * 1997-12-19 1999-07-01 Bae Systems Plc Neural networks and neural memory
JP4528714B2 (ja) * 2005-11-18 2010-08-18 株式会社東芝 情報記録再生方法及び記録再生装置
JP2010272925A (ja) * 2009-05-19 2010-12-02 Sony Corp 情報処理装置、符号化方法、及びフレーム同期方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5926508A (en) * 1995-02-21 1999-07-20 Koos Technical Services, Inc. Communication scheme using non-coherent frequency detection of trellis-based coding of plural transmission frequencies per baud
CN1334992A (zh) * 1999-10-27 2002-02-06 印芬龙科技股份有限公司 对串行数据流进行编码的编码方法和编码装置
CN101292221A (zh) * 2005-11-22 2008-10-22 英特尔公司 用于串行链路的基于信号跃迁特征的编码
CN101119178A (zh) * 2006-08-01 2008-02-06 华为技术有限公司 信号发送、接收方法及信号发送、接收装置
CN102208975A (zh) * 2011-04-07 2011-10-05 泉州天地星电子有限公司 一种信号编码加密传输的方法
CN103365814A (zh) * 2013-06-27 2013-10-23 深圳市汇顶科技股份有限公司 一种串行数据传输方法及其系统

Also Published As

Publication number Publication date
US20160080185A1 (en) 2016-03-17
CN103365814B (zh) 2016-08-17
US9621388B2 (en) 2017-04-11
CN103365814A (zh) 2013-10-23

Similar Documents

Publication Publication Date Title
US8898550B2 (en) Encoding of data for transmission
RU2008101649A (ru) Канал скоростной пейджинговой связи с уменьшенной вероятностью потери пейджингового сообщения
RU2019123162A (ru) Кодирование и декодирование широковещательного канала
WO2014206141A1 (zh) 一种串行数据传输方法及其系统
RU2009120469A (ru) Способ и устройство для кодирования и декодирования данных высокоскоростного совместно используемого канала управления
FI2297856T3 (fi) Menetelmä symbolin koodaamiseksi, menetelmä symbolin dekoodaamiseksi, menetelmä symbolin lähettämiseksi lähettimeltä vastaanottimelle, kooderi, dekooderi ja järjestelmä symbolin lähettämiseksi lähettimeltä vastaanottimelle
RU2010144508A (ru) Кодирование и декодирование управляющей информации для беспроводной связи
WO2016034036A1 (zh) 信号的编解码方法、装置及系统
WO2011137790A1 (zh) 通用公共无线接口业务发送/接收方法及装置
CN109245853B (zh) 一种基于极化码的免同步通信方法
CN103312458A (zh) 混合编码方法
KR20220085049A (ko) 멀티-레벨 인코딩을 위한 장치
WO2014101087A1 (zh) 编码/解码方法、装置及系统
CN106776422B (zh) 一种基于8b/10b编解码的串行传输方法及系统
WO2019015743A1 (en) APPARATUS AND METHOD FOR ENCODING A MESSAGE INCLUDING TARGET PROBABILITY DISTRIBUTION OF CODE SYMBOLS
WO2019237624A1 (zh) 加扰方法、设备及可读存储介质
CN108768902A (zh) 一种改进的基于喷泉码防窃听方法
CN102891927A (zh) 一种基于音频空气传输的手机近距离通信方法
CN109347605B (zh) 一种编码方法、解码方法及装置、计算机可读存储介质
CN112332985A (zh) 一种基于LDPC-Polar联合编码的量子密钥分发数据协商方法和系统
TW202320493A (zh) 具有可伸縮字長的轉態編碼器及轉態編碼方法
JP2018534847A5 (zh)
JP4780350B2 (ja) シリアルデータ通信のための符号化方式
JP2014039127A5 (zh)
CN113541871A (zh) 一种生成码字的方法及编解码器

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: 14818512

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 14786542

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14818512

Country of ref document: EP

Kind code of ref document: A1