WO2018095180A1 - 数据发送方法、数据接收方法和装置 - Google Patents
数据发送方法、数据接收方法和装置 Download PDFInfo
- Publication number
- WO2018095180A1 WO2018095180A1 PCT/CN2017/107599 CN2017107599W WO2018095180A1 WO 2018095180 A1 WO2018095180 A1 WO 2018095180A1 CN 2017107599 W CN2017107599 W CN 2017107599W WO 2018095180 A1 WO2018095180 A1 WO 2018095180A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- waveform sequence
- waveform
- bit
- sequence
- data
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/40—Network security protocols
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
Definitions
- the present invention relates to the field of electronic technologies, and in particular, to a data transmitting method, a data receiving method, and an apparatus.
- the sender and the receiver can transmit data through a change in level, that is, the sender can control the level between the two to control the transmission of the signal.
- the high-level and low-level are usually used directly to indicate the encoding mode of bit 1 or bit 0, that is, when the transmitting side wants to transmit bit 1, the level on the line is maintained at a high level; When the sender wants to transmit bit 0, the level on the line is maintained low.
- the low level is a voltage value of 0 or a small level, and generally cannot achieve the purpose of charging. It can be seen that there is a problem that the charging efficiency is low in the coding method of the prior art.
- bit values are distinguished by using different time intervals, for example, bits. 00 is represented by T+t1, bit 01 is represented by T+t2, bit 10 is represented by T+t3, and bit 11 is represented by T+t4.
- the existing signal transmission technique the time required for transmitting different bit values is longer. Long, the coding efficiency of data bits is low, which increases the burden and cost of the sender and the receiver.
- the present invention is directed to solving one of the above problems.
- the present invention provides a data transmission method, including: acquiring a bit sequence of data to be transmitted; and continuously transmitting a waveform sequence corresponding to a bit in the bit sequence according to the bit sequence of the data to be transmitted; wherein the waveform sequence includes One of: a first waveform sequence, a second waveform sequence, and a third waveform sequence, wherein the first waveform sequence represents a first data bit, and the second waveform sequence and the third waveform sequence respectively represent a second a data bit, the first data bit being one of bit 1 and bit 0, the second data bit being the other of bit 1 and bit 0, and at least two bits continuously transmitted are said
- the waveform sequence corresponding to the first bit of the continuously transmitted at least two bits is the second waveform sequence
- the waveform sequence corresponding to the second bit and the subsequent bit is the third waveform a sequence
- the characteristics of the waveform sequence include: a duration of the first waveform sequence, a duration of the second waveform sequence, and the third waveform sequence The duration of the
- the present invention also provides a data transmitting apparatus, including an obtaining module and a sending module, wherein: the acquiring module is configured to acquire a to-be-sent a bit sequence of the data; the sending module, configured to continuously send a waveform sequence corresponding to a bit in the bit sequence according to the bit sequence of the data to be transmitted, wherein the waveform sequence comprises one of: a first waveform a sequence, a second waveform sequence, and a third waveform sequence, the first data bit being represented by the first waveform sequence, and the second data bit being represented by the second waveform sequence and the third waveform sequence, respectively
- the data bits are one of bit 1 and bit 0, and the second data bit is the other of the bit 1 and bit 0, when at least two bits continuously transmitted are the second data bit, a waveform sequence corresponding to a first one of the at least two bits continuously transmitted is the second waveform sequence, and a waveform sequence corresponding to the second bit and subsequent bits is the third waveform sequence; wherein, the waveform sequence
- the features include
- the present invention also provides a data receiving method, comprising: detecting a level change of a receiving port; determining a continuously transmitted N waveform sequence according to the level change and a characteristic of a waveform sequence, wherein N is a positive integer, the waveform The sequence includes one of: a first waveform sequence, a second waveform sequence, and a third waveform sequence, the waveform sequence characterized by: the first waveform sequence, the second waveform sequence, and the third waveform sequence
- the duration is the same, the duration is inversely proportional to the baud rate at which the waveform sequence is transmitted, and the first waveform sequence begins at a high level and exhibits a low level for the duration, wherein The total duration of the low level occurring in the first waveform sequence for the duration does not vary with the baud rate of the waveform sequence, the second waveform sequence continuing for the preset duration a high level, the third waveform sequence starts with a low level and ends with a high level, and the total duration of the low level occurring in the third wave
- the present invention also provides a data receiving apparatus, comprising: a detecting module, configured to detect a level change of a receiving port; and a waveform sequence determining module, configured to determine N waveforms continuously transmitted according to the level change and a characteristic of the waveform sequence a sequence, wherein N is a positive integer, the waveform sequence comprising one of: a first waveform sequence, a second waveform sequence, and a third waveform sequence, the waveform sequence characterized by: the first waveform sequence, the The second waveform sequence and the third waveform sequence have the same duration, the duration is inversely proportional to the baud rate at which the waveform sequence is transmitted, and the first waveform sequence starts at a high level and is in the a low level occurs for a duration, wherein a total duration of the low level occurring in the first waveform sequence for the duration does not vary with a change in a baud rate of the waveform sequence, The second waveform sequence continues for a high level for the preset duration, the third waveform sequence begins with
- the present invention provides a data transmitting method, a data receiving method and a device.
- the data transmitting method and the data receiving method of the present invention are transmitted to a data receiver
- three waveform sequences are used to represent data bits 1 and 0, and wherein the second waveform sequence continues to be at a high level, and the other two waveform sequences are also maintained at a high level for a certain period of time, thereby enabling data to be transmitted.
- the time period in which the bit sequence corresponds to the high level is maintained as high as possible, so that the data sender and the data receiver are connected as high as possible, facilitating one of the data sender or the data receiver as the slave device.
- the power supply efficiency is improved without affecting the efficiency of data transmission.
- the transmission durations of different waveform sequences are the same, that is, one bit is transmitted by T, and the transmission of the present invention is compared with the manner in which it is required to transmit a bit value at different time intervals in the prior art.
- One bit takes less time, so coding is more efficient, reducing sender and connection The cost and burden of the recipient.
- FIG. 1 is a flowchart of a data sending method according to Embodiment 1 of the present invention.
- FIG. 2 is a schematic diagram of a data frame according to Embodiment 1 of the present invention.
- Embodiment 3 is a waveform characteristic diagram of three waveform sequences provided by Embodiment 1 of the present invention.
- FIG. 4 is a schematic diagram of a first waveform sequence X according to Embodiment 1 of the present invention.
- FIG. 5 is a schematic diagram of a format of a data frame header according to Embodiment 1 of the present invention.
- FIG. 6 is a flowchart of a data receiving method according to Embodiment 1 of the present invention.
- Embodiment 7 is a specific implementation application diagram provided by Embodiment 1 of the present invention.
- FIG. 8 is a schematic structural diagram of a data sending apparatus according to Embodiment 2 of the present invention.
- FIG. 9 is a schematic structural diagram of a data receiving apparatus according to Embodiment 2 of the present invention.
- FIG. 10 is a schematic structural diagram of a data transmission system according to Embodiment 2 of the present invention.
- the invention is based on a data transmission system comprising a data sender and a data receiver, the data sender and the data receiver being connected by a wire, and the data sender transmits the data to the data receiver through a level change.
- the transmitted information, the data receiver receives the information by detecting or sensing a change in level.
- the data sender and the data receiver may be a pair of master and slave devices.
- the data sender is the master device
- the data receiver is the slave device.
- the data sender may also be the slave device and the data receiver is the master device.
- the master device and the slave device are connected by a wired data line.
- the master device and the slave device When the data is not transmitted after the master device and the slave device are connected, the master device and the slave device always maintain a high level connection, and the master device can provide a high connection through the wired connection.
- the level is the power supply from the device; when the master device and the slave device are connected for data transmission, the level of the transmission port can be controlled according to the waveform sequence used by the data to generate high and low level changes, and in the waveform sequence used by the data.
- the slave can still draw power from the master during a sustained high period.
- the invention also defines a waveform sequence used for transmitting and receiving data between the data sender and the data receiver, which is embodied in the embodiment.
- This embodiment provides a data sending method, as shown in FIG. 1 , including:
- Step S101 Obtain a bit sequence of data to be transmitted.
- the data to be transmitted is converted into a bit sequence corresponding to the data to be transmitted by itself or by receiving data to be transmitted sent by the external device, and may also be directly sent by the external device.
- the data to be sent may be a data frame to be sent by the data sender, and the bit sequence of the data to be transmitted may include: a data frame header, a transmission data, and a data frame tail. As shown in FIG.
- an example of a data bit sequence to be transmitted (ie, a data frame) includes a data frame header SOF, n bytes of transmission data, and a data frame tail EOF, wherein the data frame header SOF and the data frame tail
- the EOF may be a bit string of a fixed number of bits agreed upon for each communication, and the transmission data of n bytes differs depending on the content of the transmission and the type of the message.
- the data frame header SOF and the data frame tail EOF are described in detail later.
- the data to be sent may be a different type of packet, and may be a packet including a request or a response command, or a packet including data to be transmitted, such as an ATR, an ACK, a PKT, or the like.
- the data packet length of each transmission data can be a fixed value. The fixed value can be allocated according to different registers. The default is that each data packet has a length of 64 bytes, and the maximum length of each data can be transmitted.
- the packet length is fixed to 256 bytes. Of course, in a specific transmission, the length of the last transmitted packet can be less than the default length.
- the flag bit in the transmission data is used to mark the characteristics of the transmission data, and the 1-byte flag bit may be located in the first byte of the transmission data (such as the Byte 0 position in FIG. 2), and may include an information feature that identifies the transmission data.
- the bits for example, include the bits of the data sender, the message type, and the like, so that the data receiver obtains the information of the transmitted data through the flag bit, which is advantageous for data reception and parsing.
- the last two bytes of the data to be transmitted, Byte n-1 , Byte n may be used as a CRC redundancy check bit, and the bit of the received data frame may be used by the check bit pair. The sequence is verified to detect or verify that the received data has an error.
- the flag bit in the transmission data may include 8 bits, and the 8 bit may be specifically as shown in Table 1, but is not limited thereto.
- Device_type represents the sender of the data, and can use 1 for the master device Host, 0 for the slave device Device, and 1 for the slave device Device, 0 for the master device Host, so that the data receiver can receive the data.
- the analysis tool then distinguishes whether the data is sent by the master or slave. Rev is the default data, Packet_type: represents the message type, and Table 2 shows the types of messages that may be involved, but is not limited thereto.
- the ATR represents the parameter to obtain the packet. After the master device recognizes the access of the slave device, it sends an ATR packet to the slave device. The slave device needs to respond immediately after receiving the ATR packet. The response packet type is still ATR. And carry parameter information.
- the ATR message may contain only 1 byte of flag bits and 2 bytes of CRC check bits (eg, the first two bytes of EOF in Figure 2).
- the ACK represents a response message, that is, a response message indicating that the data is successfully received, and the ACK message may include a 1-byte flag bit and a 2-byte CRC check bit.
- the NAK represents a response message that the device is not ready (or data reception failure). For example, in the case of data reception error or data packet loss, the receiver returns a NAK message to the sender.
- the NAK message can contain 1 byte. The flag bit and the 2-byte CRC check bit.
- the PKT represents a data packet, that is, the packet is a normal data packet.
- the format of the 8-bit flag bit is as shown in Table 3.
- the tag bit of the data packet PKT includes not only the field identifying the device type, the packet type, but also the field indicating whether the packet is the last packet sent for this time, for example, If the packet is the last packet sent, bit 5 is "Last".
- Step S102 Continuously transmit a waveform sequence corresponding to the bit in the bit sequence according to the bit sequence of the data to be transmitted, and the waveform sequence includes one of the following: a first waveform sequence, a second waveform sequence, and a third waveform sequence.
- the first data bit is represented by a first waveform sequence
- the second data bit is represented by a second waveform sequence and a third waveform sequence, respectively.
- the first data bit is one of bit 1 and bit 0, and the second data bit is a bit.
- the characteristics of the waveform sequence include: the duration of the first waveform sequence, the duration of the second waveform sequence, and the duration of the third waveform sequence are the same, and the duration is inversely proportional to the baud rate of the transmission waveform sequence, and the first The waveform sequence starts at a high level and exhibits a low level for a duration, wherein the total duration of the low level occurring in the first waveform sequence for the duration does not vary with the baud rate of the waveform sequence.
- the second waveform sequence continues for a high level for a duration
- the third waveform sequence begins with a low level, ends with a high level, and the total duration of the low level occurring in the third waveform sequence for the duration Does not change with the baud rate of the waveform sequence.
- the three waveform sequences have different waveform characteristics for distinguishing, which is advantageous for the receiver to detect the data.
- all three waveform sequences have the same duration T, wherein the duration T of the waveform sequence is inversely proportional to the baud rate of the transmitted data, and can be used to determine the baud rate of the data transmission (ie, the baud rate is 1/1). T).
- three waveform sequences hereinafter, a first waveform sequence is denoted by X, Y represents a second waveform sequence, and Z represents a third waveform sequence), as shown in Fig.
- the first waveform sequence X starts with a high level, and jumps to a low level after a high level for a period of time (T1), and the time (T1) of the continuous high level can be fixed. It can also be fixed or fixed for each transmission.
- the total duration of the low level occurring in the first waveform sequence X does not change with the change of the baud rate of the waveform sequence, that is, the low level appearing in the first waveform sequence is in the duration
- the duration of the low level occurring in the first waveform sequence is a fixed duration. As shown in FIG.
- the second waveform sequence Y continues for a high level for a duration, that is, the second waveform sequence Y does not generate a transition for a duration.
- the third waveform sequence Z starts at a low level, and the total duration of the low level occurring in the third waveform sequence for the duration does not follow the waveform of the baud. The rate changes and changes.
- the total duration of the low level occurring in the third waveform sequence does not change with the baud rate of the waveform sequence, that is, the low level occurring in the third waveform sequence is occupied by the duration.
- the duration of the low level (T2) occurring in the third waveform sequence is a fixed duration during one transmission.
- the fixed duration and the baud rate There is no linear relationship between the fixed duration and the baud rate.
- bits 1 and 0 are generally present in the bit sequence of the transmission data to be transmitted, and when the bit sequence of the data to be transmitted is transmitted, if it is represented by the first waveform sequence X Bit 1, with the second waveform sequence Y indicating bit 0, based on the characteristics of the foregoing waveform sequence, when the continuous at least two bits 0 are encountered, since the second waveform sequence Y is a continuous high level, if only When the second waveform sequence Y indicates bit 0, it may be impossible to distinguish whether the data bit 0 is the end of data transmission or normal data. Therefore, in the present invention, the bit sequence of the data to be transmitted is represented by three waveform sequences, and the bit 1 and the bit 0 are respectively represented by three waveform sequences, specifically, the following two representations:
- bit 1 is represented by a first waveform sequence
- bit 0 is represented by a second waveform sequence or a third waveform sequence, that is, when bit 1 appears in the transmission data
- the first waveform sequence is used to represent
- bit 0 appears in the transmitted data
- it may be represented by the second waveform sequence or by the third waveform sequence. If the second waveform sequence or the third waveform sequence is used, it needs to be determined according to the position of the bit 0 in the bit sequence. Rather than using only one of the second waveform sequence or the third waveform sequence.
- the first appearing bit 0 is represented by the second waveform sequence Y, and the bit 0 appearing immediately thereafter is all represented by the third waveform sequence Z.
- the corresponding waveform sequence should be XYXXYZXYZZ.
- bit 0 is represented by a first waveform sequence
- bit 1 is represented by a second waveform sequence or a third waveform sequence, that is, when bit 0 appears in the transmission data
- the first waveform sequence is used to represent
- bit 1 may be represented by the second waveform sequence or by the third waveform sequence. If the second waveform sequence or the third waveform sequence is used, it needs to be determined according to the position of the bit 1 in the bit sequence. Whether the second waveform sequence or the third waveform sequence is used is not transmitted using only one of the second waveform sequence or the third waveform sequence.
- the first appearing bit 1 is represented by the second waveform sequence Y, and the bit 1 appearing immediately thereafter is all represented by the third waveform sequence Z.
- the corresponding waveform sequence should be YXYZXXYXX.
- level jump or "jump” in the present invention, if there is no other opposite description, it refers to jumping from a high level to a low level in the actual waveform. Can be expressed as a falling edge. In this application, it is sometimes also indicated directly by “falling edge jump”. In the present invention, if the level is changed from low to high, it is not directly called level jump.
- the data sender transmits data to the data receiver
- three waveform sequences are used to represent data bits 1 and 0, and wherein the second waveform sequence continues to be at a high level, and the other two
- the waveform sequence also maintains a high level for a certain period of time, thereby
- the time for maintaining the high level in the waveform sequence corresponding to the bit sequence of the data to be transmitted is as long as possible, so that the data sender and the data receiver are connected as high as possible, facilitating the data sender or the data receiver.
- One of them acts as a slave device to obtain as much power as possible from the master device, improving power supply efficiency without affecting data transmission efficiency.
- the transmission durations of different waveform sequences are the same, that is, one bit is transmitted by T, compared with the method in the prior art that different bit intervals are needed to transmit one bit value, the implementation The method provided by the example requires a shorter time to transmit one bit, and therefore, the coding efficiency is higher, and the cost and burden of the sender and the receiver are reduced.
- the data sender may send the control through the control.
- the level of the port is changed according to the waveform of the waveform sequence corresponding to the bit in the bit sequence and the characteristics of the waveform sequence to transmit the data to be transmitted.
- the data sender can control the level of the transmission port by breaking the hardware switch or the software switch, thereby implementing the waveform characteristics of the different waveform sequences described above.
- a waveform sequence corresponding to the bit may be transmitted by acquiring one bit, or may be all after the all bits of the bit sequence of the data to be transmitted are acquired.
- a plurality of waveform sequences corresponding to the bits are transmitted together, and which method is specifically adopted as needed.
- the setting of the high level and the low level can be adaptively designed according to the condition of the circuit and the hardware. For example, the high level can be set to 5V, the low level is 0V, and the high level can be set to 5V. The low level is 4.7V, of course there are other settings. As long as the hardware used can achieve a distinction between high and low levels, it can be used in this application.
- the duration of the low level occurring in the first waveform sequence and the third waveform sequence may be a fixed value (eg, 10 ns), and when the baud rate changes, the duration is It also follows the baud rate in inverse proportion, but the duration of the low level occurring in the first waveform sequence and in the third waveform sequence does not change with the change of the baud rate, and remains at a fixed value.
- the duration of the high level in the first waveform sequence and the third waveform sequence may be as long as possible, and the duration of the low level is long.
- the waveform sequence can be maintained at a high level for as long as possible, so that one of the data sender or the data receiver can obtain as much power as possible from the master device without affecting the data transmission.
- the waveform sequence further comprises: the low level occurring in the first waveform sequence has a total duration of duration less than one-half of the duration; and/or the third waveform sequence
- the low level that occurs in the duration of the low period is less than one-half of the duration.
- the low level appearing in the first waveform sequence or the third waveform sequence may be less than one-half of the duration of the period, so as to reduce the duration of the low level, of course, the low level in the waveform sequence
- the duration can be a variable duration that is less than one-half of the duration.
- the duration of the high level in the first waveform sequence and the third waveform sequence can be as long as possible, and the duration of the low level is as short as possible, so that the waveform sequence can be completed. It may be maintained in a high state for a long period of time, thereby improving power supply efficiency.
- the first waveform sequence may end with a high level or with a low level. Therefore, in an optional embodiment of the present invention, the waveform sequence further includes: the first waveform sequence is low. At the end of the level, the first waveform sequence starts at a high level and appears only one level transition from a high level to a low level for a duration; or, the first waveform sequence is at a high level In the end case, the first waveform sequence starts at a high level and jumps at a level that changes from a high level to a low level only once during the duration.
- the first waveform sequence X after the first waveform sequence X transitions from a high level to a low level, it can jump from a low level to a high level and end with a high level, and can also maintain a low level. And ending with a low level, as long as the waveform sequence transitions from a high level to a low level for a duration of time, it can be considered as the first waveform sequence X, as shown in Figures 3(a) and (b).
- the first waveform sequence is skipped from a high level to a low level and ends at a low level, the number of transitions can be reduced, and the complexity of data transmission can be reduced.
- the first waveform sequence X jumps from a high level to a low level, and can be further changed from a low level to a high level and ends with a high level, the time for maintaining the high level can be lengthened. Improve power efficiency.
- the waveform sequence further includes: the third waveform sequence starts at a low level and only occurs once in a duration from a low level to a high level. And ends with a high level.
- the third waveform sequence Z can be maintained at a low level all the time, or can be jumped from a low level to a high level after a jump, and ends with a high level, as shown in FIGS. 3(d) and (e). ) shown.
- the end of the third waveform sequence at a high level can lengthen the time during which the high level is maintained, improving the power taking efficiency.
- the bit sequence of the data to be transmitted may include: a data frame header, a transmission data, and a data frame tail, and the data frame header includes at least one bit, and the data frame header
- the waveform sequence corresponding to the first bit is a third waveform sequence or a first waveform sequence.
- the data frame header may be only 1 bit.
- the second waveform sequence cannot be used as the data frame header alone, because the second waveform sequence is continuous high power.
- the sender's transmit port is also a persistent high level.
- the receiver can only start to recognize that the sender is transmitting data if it detects a falling edge transition, if the initial transmitted data is sustained high. Indicates that the receiver is undetectable, so the second waveform sequence cannot be used alone as a data frame header.
- the data frame header may also be a plurality of bits including the waveform sequence corresponding to the first bit being the third waveform sequence or the first waveform sequence, and then the second frame sequence may be included in the data frame header.
- the data frame header can be used to mark at least the start position of the data transmission, and the data frame tail can be used to mark at least the end position of the data transmission, and the receiver formats the data with the data frame header or the data frame tail when receiving the data.
- the data transmission starts or ends.
- the data frame header and the frame tail are passed so that the data receiver can correctly receive the data.
- the transmitted data includes information that the data sender wants to transmit externally.
- the receiving party can directly treat the first few bits (according to the agreement) as the data frame header without detecting whether it is the data frame header. .
- the bit sequence of the data to be transmitted includes: a data frame header, a transmission data, and a data frame tail, the data frame header includes at least M bits, and M is a positive integer. And M ⁇ 2; wherein the waveform sequence corresponding to the first M bits of the data frame header is composed of M first waveform sequences; or, the waveform sequence corresponding to the first M bits of the data frame header is composed of M third waveform sequences Or, the waveform sequence corresponding to the first M bits of the data frame header includes at least one first waveform sequence and at least one third waveform sequence. In particular, when at least two bits are included in the data frame header, it can be a combination of multiple waveform sequences.
- All possible data frame header formats can be deduced in turn, as long as they are within the scope of the invention, and can be used as a data frame header.
- the data receiver by receiving a data frame header of at least two bits, the data receiver can receive the data frame header information, or after determining the data frame header, according to the relationship between the at least two data frame headers.
- the data sender and the data receiver need not separately agree on the baud rate, and the baud rate of the transmission data can be obtained only by parsing the data frame header, thereby parsing the subsequent data packet and realizing the adaptation of the data transmission.
- the data sender can more flexibly select the baud rate for data transmission, and the data sender can select the current transmission environment and the rate of the received data supported by the data sender.
- the highest baud rate supported by both parties is used for data transmission.
- the data receiver can obtain the current baud rate by parsing the data frame header. Therefore, the data can be transmitted at the maximum baud rate supported by the communication parties to achieve high speed. The effect of data transfer.
- the data receiver can determine the transmission time of a waveform sequence by two transition time intervals from high level to low level, as shown in FIG.
- the calculation method varies correspondingly according to the waveform characteristics of the waveform sequence, and will not be described here.
- the duration of obtaining a waveform sequence by analyzing the data frame header is calculated according to the time interval between the falling edge transitions in the waveform sequence, in order to calculate a waveform according to the waveform sequence of the data frame header.
- the duration of the sequence, when M 2, Y cannot appear in the first 2 bits of the data frame header negotiated by the two communicating parties.
- the present embodiment may also be followed by consecutive identical waveform sequences (as long as it is followed, for example, immediately after the same consecutive waveform sequence, or a few After the waveform sequence, a waveform sequence different from the same waveform sequence, that is, a waveform sequence corresponding to the anti-interference bit, may be agreed upon.
- the waveform sequence corresponding to the first M bits of the data frame header is composed of M
- the data frame header further includes: at least one anti-interference bit after the first M bits of the data frame header, wherein the waveform sequence corresponding to the at least one anti-interference bit is the second waveform sequence or the third The waveform sequence; when the waveform sequence corresponding to the first M bits of the data frame header is composed of M third waveform sequences, the data frame header further includes: at least one anti-interference bit after the first M bits of the data frame header, wherein The waveform sequence corresponding to the at least one anti-interference bit is a second waveform sequence or a first waveform sequence.
- the data receiver may be interfered by a single-frequency interference source when detecting the level change of the receiving port, and the single-frequency interference may be understood as a pulse sequence generated in the same period, if the preset data frame
- the first M bits of the header are set to the same waveform sequence, for example, the data frame header It consists of 4 consecutive Zs, and the frequency of single-frequency interference is exactly the same as the baud rate. That is, the data receiver recognizes the same waveform sequence as the preset data frame header through the level change. At this time, the data receiver will The single-frequency interference is misjudged as a data frame header, resulting in failure of data transmission.
- the waveform sequence of the anti-interference bit is different from the waveform sequence of the M bits, so that the data frame header corresponds to There are different time intervals in the waveform sequence, that is, the same waveform sequence as single-frequency interference does not occur, thereby preventing single-frequency interference from being misjudged as the data frame header.
- the data frame header includes 8 bits
- the waveform sequence corresponding to the 8 bits is a third waveform sequence, a third waveform sequence, a third waveform sequence, a third waveform sequence, and a third A second waveform sequence, a third waveform sequence, a second waveform sequence, and a third waveform sequence.
- the data frame tail includes 2 bits, wherein: the waveform sequence corresponding to the first bit of the data frame tail is the second waveform sequence, and the waveform corresponding to the second bit of the data frame tail
- the sequence is the second waveform sequence, or the waveform sequence corresponding to the first bit of the data frame tail is the third waveform sequence, and the waveform sequence corresponding to the second bit of the data frame tail is the second waveform sequence, or the data frame tail
- the waveform sequence corresponding to the first bit of the data is the first waveform sequence
- the waveform sequence corresponding to the second bit of the data frame tail is the third waveform sequence.
- the data frame tail is used to determine the end position of the data transmission.
- the data receiver determines that the data transmission has ended. Therefore, the data frame tail can only be selected.
- the end of the data frame can be 2 bits, of course, the data frame tail can also contain more bits.
- the data frame header may be used.
- the data frame tail can be selected as "YY".
- the waveform sequence corresponding to the first bit of the data frame tail is the second waveform sequence
- the waveform sequence corresponding to the second bit of the data frame tail is the second waveform sequence, or the first of the data frame ends
- the waveform sequence corresponding to the bits is the third waveform sequence
- the waveform sequence corresponding to the second bit of the data frame tail is the second waveform sequence.
- the data frame tail can be selected as "YY” or "XZ".
- the waveform sequence corresponding to the first bit of the data frame tail is the second waveform sequence
- the waveform sequence corresponding to the second bit of the data frame tail is the second waveform sequence
- the first bit of the data frame tail corresponds to
- the waveform sequence is the first waveform sequence
- the waveform sequence corresponding to the second bit of the data frame tail is the third waveform sequence.
- the data frame tail may select "ZY” or "XZ", that is, the end of the data frame.
- the waveform sequence corresponding to one bit is a third waveform sequence
- the waveform sequence corresponding to the second bit of the data frame tail is the second waveform sequence
- the waveform sequence corresponding to the first bit of the data frame tail is the first waveform sequence.
- the waveform sequence corresponding to the second bit of the data frame tail is a third waveform sequence.
- the embodiment further provides a data receiving method, which is matched with the data sender transmitting data by using the data sending method, and the data receiver adopts the data receiving method of the embodiment to receive the data.
- the data receiving method includes:
- Step S601 detecting a level change of the receiving port
- the data sender forms a waveform sequence corresponding to the bit sequence of the data to be transmitted by controlling the transmission port to generate a high-low level change. Therefore, correspondingly, the data receiver transmits the data in order to receive the data.
- the data sent by the party needs to detect the level change of the receiving port to identify the waveform sequence according to the level change.
- detecting a level change of the receiving port may detect a level transition occurring at the receiving port by using the detecting circuit or the detecting module, or obtaining a level change by sampling the level at the receiving port by the sampling circuit or the sampling module.
- the detection circuit can employ a differential circuit, a comparator circuit, etc., and can be used in the present invention as long as level changes can be detected.
- the sampling frequency of the sampling circuit and the sampling module according to the difference of the level variation law caused by the waveform sequence encoding rule The rate should be able to match the level change to ensure that enough points can be sampled to obtain the law of level changes.
- Step S602 determining N waveform sequences that are continuously transmitted according to the level change and the characteristics of the waveform sequence.
- N is a positive integer
- the waveform sequence comprises one of: a first waveform sequence, a second waveform sequence, and a third waveform sequence, the first waveform sequence, the second waveform sequence, and the third waveform sequence having the following characteristics of the waveform sequence:
- the durations of the first waveform sequence, the second waveform sequence, and the third waveform sequence are the same, the duration is inversely proportional to the baud rate of the transmitted waveform sequence, and the first waveform sequence starts at a high level and appears low for a duration Level, wherein the total duration of the low level occurring in the first waveform sequence does not vary with the baud rate of the waveform sequence, and the second waveform sequence continues to be high for a preset duration
- the third waveform sequence starts with a low level and ends with a high level, and the total duration of the low level occurring in the third waveform sequence for the duration does not change with the baud rate of the waveform sequence;
- Each of the N waveform sequences is one of the following:
- the data to be transmitted (a data frame) sent by the data sender sequentially includes a data frame header, a transmission data, and a data frame tail.
- the data receiver receives the data first. After several bits of the data frame header, the subsequent transmission data and the data frame tail information are received.
- the specific format of the data frame header, the transmission data, and the data frame trailer has been described in detail in the data transmission method, and will not be described here.
- the data receiver Since the data receiver receives the data, it is necessary to determine the N waveform sequences included in the detected level change information according to the duration of a waveform sequence and the characteristics of the waveform sequence mentioned above, and the waveform sequence
- the duration may be pre-negotiated or pre-set, or may be obtained from the data frame header information in the received data.
- the data sender and the data receiver need to pre-appoint L waveform sequences as data frame headers, and the data receiver can obtain from the data sender or from the data receiver.
- the feature of the L waveform sequences is obtained in the memory, that is, the characteristics of the waveform sequence in the data frame header are known by the data receiver.
- the L waveform sequences can be agreed to be composed of S level jumps, of course, it can be agreed
- the waveform sequence corresponding to the data frame header includes S level transitions, and the time interval of the S level transitions can also be agreed upon, and the data receiver can know that the S levels jump into the data frame header.
- detecting a level change of the receiving port includes: continuously detecting S level transitions of the receiving port; and continuing to detect after detecting S level jumps of the receiving port
- the Q levels of the receiving port are hopped, wherein the S level transitions and the Q level transitions all change from a high level to a low level, and both S and Q are positive integers, and S>1, Q>1.
- Determining the continuously transmitted N waveform sequences according to the level change and the characteristics of the waveform sequence comprising: acquiring L waveform sequences formed by the preset S level jumps of the data frame header, wherein L is a positive integer and 1 ⁇ L ⁇ N; calculating the duration of a waveform sequence based on the characteristics of the L waveform sequences and the time interval between any two of the detected S level transitions; using the calculated duration as The duration of each waveform sequence determines the transmission data and the sequence of waveforms corresponding to the end of the data frame based on the Q level transitions and the characteristics of the waveform sequence.
- the data sender and the data receiver pre-arrange the data frame header as L waveform sequences
- the L waveform sequences include S level transitions
- the data receiver continuously detects the level change of the receiving port.
- the detected S level transitions may be defaulted to S hops corresponding to the data frame header, and the level changes (ie, the detected Q hops) are detected after S hops.
- the level change contained in the waveform sequence corresponding to the transmitted data and the data frame end in the data frame.
- the data receiver determines the duration T of a waveform according to the data frame header, and determines whether a level jump occurs in each T duration and a characteristic of each level jump.
- the Q levels jump to the corresponding waveform sequence to determine the entire N waveform sequence.
- the first waveform sequence X starts with a high level, and it undergoes a level jump for the duration of the waveform and the time of the transition is T1 (T1 starts from each waveform).
- the second waveform sequence is a continuous high level, which does not undergo a level jump for the duration of the waveform;
- the third waveform sequence starts with a low level, Since the data sender and data receiver default state is high, the third waveform sequence can be considered to experience a level jump at the very beginning of the waveform (which can be considered to be time zero). Therefore, under the premise of obtaining the duration of a waveform sequence, the manner of determining a waveform sequence may be: during the duration of a waveform sequence, according to the level of the start time of the waveform sequence and the duration of the duration is consistent with the above Which kind of waveform sequence is characteristic.
- the waveform characteristic of the detected waveform sequence when the waveform characteristic of the detected waveform sequence starts at a high level and jumps to a low level after a high level for a period of time, it can be determined to be the first Waveform sequence; when detecting The waveform characteristic of the obtained waveform sequence is that the high level is sustained for a duration, then it can be determined as the second waveform sequence; when the waveform characteristic of the detected waveform sequence starts with a low level, it can be determined that it is the third Waveform sequence. In this way, it can be determined which waveform sequence is each of the waveform sequences of the N waveform sequences. It should be noted that when the data receiver determines the type of the waveform sequence, it can determine the type of each waveform sequence, or it can determine the waveform type after detecting all the N waveform sequences.
- a waveform sequence can be determined every time a level change of T is determined.
- the waveform sequence can be determined according to the characteristics of the waveform sequence.
- the data receiver After detecting the waveform sequence corresponding to the data frame header, the data receiver can determine the starting position of the waveform sequence corresponding to the transmission data in one data frame, and the starting position can be changed according to the detected level (eg, The level jump of the falling edge) determines the first waveform sequence according to the characteristics of the above-mentioned waveform sequence, and after determining the duration of the waveform sequence T, starts to determine the second waveform sequence, until the received data is determined.
- the transmission data and the sequence of waveforms corresponding to the end of the data frame can be determined according to the detected level (eg, The level jump of the falling edge) determines the first waveform sequence according to the characteristics of the above-mentioned waveform sequence, and after determining the duration of the waveform sequence T, starts to determine the second waveform sequence, until the received data is determined.
- the data receiver when the data receiver detects the level change of the receiving port and determines the waveform sequence according to the level change, it can adopt the method of monitoring the level jump of the receiving port, and the level jump occurs as the main level change.
- the level change is determined by monitoring the level jump or by sampling, the result is to be able to restore the waveform feature according to the level change, that is, as long as the S jumps corresponding to the data frame header can be obtained,
- the invention is not limited to which way.
- S level jumps are obtained by sampling, the entire waveform can be restored, and all the features of the waveform are obtained, so that not only the characteristics of the level jump but also the waveform corresponding to the complete level change can be obtained, thereby eliminating the need for Considering the characteristics of various waveform sequences, it can be applied to any type of waveform sequence, and the waveform sequence can be successfully parsed. If the monitoring level jump mode is used, it is not necessary to sample the level, and long-time sampling is avoided to restore the overall waveform. Only the characteristics of the level jump can be determined to determine N waveform sequences, which reduces the parsing. Complexity.
- Step S603 determining a bit sequence of the received data according to the continuously transmitted N waveform sequences, wherein one of the bit 1 and the bit 0 is represented by the first waveform sequence, and the bit 1 and the second waveform sequence and the third waveform sequence respectively represent the bit 1 and The other of bit 0.
- each of the N waveform sequences may be determined according to the same rule as the data sender.
- the bit value represented by the waveform sequence According to different coding rules, at least the following two resolution methods are included:
- bit 1 when bit 1 is represented by a first waveform sequence, bit 0 is represented by a second waveform sequence or a third waveform sequence, that is, when a certain waveform sequence of the N waveform sequences is the first waveform sequence, Then, the waveform sequence represents a bit value of 1.
- bit value of 1 When one of the N waveform sequences is a second waveform sequence or a third waveform sequence, the waveform sequence represents a bit value of zero.
- the second waveform sequence and the third waveform sequence may exist at the same time, and the second waveform sequence or the third is determined according to the position where the data sender appears according to the bit 0 in the bit sequence.
- the waveform sequence is not transmitted by only one of the second waveform sequence or the third waveform sequence, so in the N waveform sequences obtained by the receiver, the second waveform sequence or the third waveform sequence is resolved to bit 0. .
- the received bit sequence is 1011001000.
- bit 0 when bit 0 is represented by a first waveform sequence, bit 1 is represented by a second waveform sequence or a third waveform sequence, that is, when a certain waveform sequence of the N waveform sequences is the first waveform sequence, Then, the bit value represented by the waveform sequence is 0.
- the waveform sequence represents a bit value of 1.
- the second waveform sequence and the third waveform sequence may exist at the same time, and the second waveform sequence or the third is determined according to the position where the data sender appears according to the bit 1 in the bit sequence.
- the waveform sequence is not transmitted by only one of the second waveform sequence or the third waveform sequence, so in the N waveform sequences obtained by the receiver, the second waveform sequence or the third waveform sequence is parsed into the bit 1 .
- the determined N waveform sequences are XYXXYZXYZZ, according to the parsing rule, the received bit sequence is 0100110111.
- the data sending method of the present invention when the data sender transmits data to the data receiver using the above data transmission method, three waveform sequences are used to represent the data bits 1 and 0, and one of the waveform sequences continues to be at the high level.
- the other two waveform sequences are also maintained at a high level for a certain period of time, so that the waveform sequence can be maintained at a high level for as long as possible, so that between the data sender and the data receiver Connect as high as possible to facilitate the acquisition of as much power as possible from the master when the data sender or data receiver acts as a slave, improving power supply efficiency without affecting data transmission efficiency.
- the transmission durations of different waveform sequences are the same, that is, one bit is transmitted by T, compared with the method in the prior art that different bit intervals are needed to transmit one bit value, the implementation For example, the time required to transmit one bit is shorter, so the coding efficiency is higher, and the cost and burden of the sender and the receiver are reduced.
- FIG. 7 A specific implementation manner of receiving data and parsing the data is given below. As shown in FIG. 7, the embodiment includes but is not limited to the following cases:
- the data sender and the data receiver pre-agreed the data frame header.
- the sequence “XZZZ” with the data frame header of 4 bits may be agreed upon, or the data frame header may be directly arbitrarily changed to four high-to-low level transitions.
- the pre-agreed L-waveform sequence of the data frame header is a 4-bit sequence "XZZZ”
- the level change detected by the data receiver is as shown in Fig. 7(a).
- the data frame header is considered to have been received. That is, the four high-to-low transitions correspond to the data frame header.
- the receiver receives the S.
- the transition should be 4 high to low transitions.
- the space ratio coefficient, the second waveform sequence is the third waveform sequence Z, and the third waveform sequence Z has a transition time of zero.
- the receiving end can calculate the duration T of a waveform sequence according to the waveform characteristics of the data frame header sequence and the time interval (ie, ⁇ ) between any two of the L level transitions, thereby receiving
- the data frame header data can be used to determine the baud rate (ie 1/T) used by the sender to send data.
- the first waveform sequence X ends with a high level
- the third waveform sequence Z ends with a high level. If the first waveform sequence and/or the third waveform sequence end with a low level, the same can also be obtained, and will not be described here.
- the transmission data can be parsed from the end position of the data frame header.
- the data receiver determines the waveform type according to the level transition of the detection level from the high level to the low level, according to the previously known waveform characteristics, during each period of time T, when it is detected that the occurrence is high
- the low level jumps and the transition time is T1
- the data after the data frame header "XZZZ” is the determined transmission data and data frame tail.
- the waveform sequence is “XYXXYZZXYY” in sequence, as shown in Figure 7(c), and once “YY” appears, it can be regarded as the end of the data frame.
- the actual transmission data is “XYXXYZZX”. If it is represented by X, When Y or Z indicates 0, the transmission data is finally parsed as "10110001" as shown in Fig. 7(d).
- the data transmitting device 80 is a device corresponding to the data transmitting method in the first embodiment, that is, the operation implemented by the data transmitting device in the first embodiment can be specifically implemented by the data transmitting device 80 in the present embodiment.
- the data sending device 80 of this embodiment includes an obtaining module 801 and a sending module 802.
- the obtaining module 801 and the sending module 802 can be implemented by using one or more processors, where:
- the obtaining module 801 is configured to obtain a bit sequence of data to be sent.
- the obtaining module 801 may be a single processor, a chip, or a circuit integrated on the processor, and the obtaining module 801 may be configured by itself.
- the bit sequence to be transmitted is obtained in the memory, and the external transmission or input sequence to be transmitted can also be received, for example, can be received through an interface or received through a keyboard input.
- the obtaining module 801 obtains the bit sequence and sends it to the sending module 802.
- the sending module 802 is configured to continuously send a waveform sequence corresponding to the bit in the bit sequence according to the bit sequence of the data to be sent, where the waveform sequence includes one of the following: a first waveform sequence, a second waveform sequence, and a third waveform sequence. Representing the first data bit in a first waveform sequence, and representing the second data bit in a second waveform sequence and a third waveform sequence, respectively, the first data bit being one of bit 1 and bit 0, The two data bits are the other one of the bit 1 and the bit 0.
- the waveform sequence corresponding to the first bit of the at least two bits continuously transmitted is the second waveform.
- the sequence of waveforms corresponding to the second bit and subsequent bits is a third sequence of waveforms; specifically, the transmitting module 802 can be a wired data transmission interface, such as a USB interface, an audio interface, a two-wire interface, and the like.
- the characteristics of the waveform sequence include: the duration of the first waveform sequence, the duration of the second waveform sequence, and the duration of the third waveform sequence are the same, and the duration is inversely proportional to the baud rate of the transmission waveform sequence, and the first The waveform sequence starts at a high level and exhibits a low level for a duration, wherein the total duration of the low level occurring in the first waveform sequence for the duration does not vary with the baud rate of the waveform sequence.
- the second waveform sequence continues for a high level for a duration
- the third waveform sequence begins with a low level, ends with a high level, and the total duration of the low level occurring in the third waveform sequence for the duration Does not change with the baud rate of the waveform sequence.
- the embodiment further provides a data receiving device 90.
- the data receiving device 90 is a device corresponding to the data receiving method in Embodiment 1, that is, the operation implemented by the data receiver in Embodiment 1 can be performed by the present embodiment.
- the data receiving device 90 in the embodiment is embodied.
- the data receiving device 90 includes a receiving port 901, a detecting module 902, a waveform sequence determining module 903, and a data determining module 904.
- the detecting module 902, the waveform sequence determining module 903, and the data determining module 904 can be implemented by using one or more processors. among them:
- the detecting module 902 is configured to detect a level change of the receiving port 901.
- the detecting module may be a detecting circuit or a sampling circuit, wherein the detecting circuit may adopt a differential circuit, a comparator circuit, etc., and the detecting module may be connected to each other by a wired
- the receiving port of the data interface detects the receiving port of the wired data interface
- the wired data interface may be a USB interface, an audio interface, a two-wire interface, or the like.
- the waveform sequence determining module 903 is configured to determine, according to the level change and the characteristics of the waveform sequence, the N waveform sequences that are continuously transmitted, where N is a positive integer, and the waveform sequence includes one of the following: a first waveform sequence, a second waveform sequence, and The third waveform sequence, the characteristics of the waveform sequence include: the first waveform sequence, the second waveform sequence, and the third waveform sequence have the same duration, and the duration is inversely proportional to the baud rate of the transmission waveform sequence, and the first waveform sequence is A high level starts and a low level occurs for a duration, wherein the total duration of the low level occurring in the first waveform sequence for the duration does not vary with the baud rate of the waveform sequence, and the second waveform The sequence continues for a high level for a preset duration, the third waveform sequence begins with a low level and ends with a high level, and the total time that occurs during the duration of the low level occurring in the third waveform sequence does not follow The bau
- the data determining module 904 is configured to determine a bit sequence of the received data according to the continuously transmitted N waveform sequences, wherein the first waveform sequence represents one of the bit 1 and the bit 0, respectively, the second waveform sequence and the third waveform sequence Indicates the other of bit 1 and bit 0.
- the embodiment further provides a data transmission system, as shown in FIG. 10, including a data transmitting device 80 and a data receiving device 90, thereby implementing the data transmitting method and data receiving method of the present invention.
- the data transmitting apparatus transmits data to the data receiving apparatus
- three kinds of waveform sequences are used to represent the data bits 1 and 0, and wherein the second waveform sequence continues to be at the high level, and the other two
- the waveform sequence is also maintained at a high level for a certain period of time, so that the time in which the bit sequence corresponding to the bit sequence of the data to be transmitted is maintained at the high level is as long as possible, so that the data transmitting device and the data receiving device are as
- the high level connection facilitates obtaining as much power as possible from the master device when one of the data transmitting device or the data receiving device is used as the slave device, and improves the power supply efficiency without affecting the data transmission efficiency.
- the transmission durations of different waveform sequences are the same, that is, one bit is transmitted by T, compared with the method in the prior art that different bit intervals are needed to transmit one bit value, the implementation For example, the time required to transmit one bit is shorter, so the coding efficiency is higher, and the cost and burden of the sender and the receiver are reduced.
- portions of the invention may be implemented in hardware, software, firmware or a combination thereof.
- multiple steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system.
- a suitable instruction execution system For example, if implemented in hardware, as in another embodiment, it can be implemented using any one of the following techniques or combinations thereof known in the art: A discrete logic circuit for logic gate circuits that implement logic functions on data signals, an application specific integrated circuit with a suitable combination of logic gates, a programmable gate array (PGA), a field programmable gate array (FPGA), and the like.
- each functional unit in each embodiment of the present invention may be integrated into one processing module, or each unit may exist physically separately, or two or more units may be integrated into one module.
- the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
- An integrated module can also be stored in a computer readable storage medium if it is implemented as a software functional module and sold or used as a standalone product.
- the above mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Dc Digital Transmission (AREA)
Abstract
本发明提供一种数据发送方法、数据接收方法和装置,其中数据发送方法包括:获取待发送数据的比特序列;根据待发送数据的比特序列,连续发送比特序列中的比特对应的波形序列;其中,以第一波形序列表示第一数据比特,分别以第二波形序列和第三波形序列表示第二数据比特,第一数据比特为比特1和比特0中的一个,第二数据比特为比特1和比特0中的另一个,在连续发送的至少两个比特为第二数据比特时,连续发送的至少两个比特中的第一个比特对应的波形序列为第二波形序列,第二个比特以及后续的比特对应的波形序列为第三波形序列。通过本发明的数据发送方法,设备可以获取到尽可能多的电能,在不影响数据传输效率的前提下,提高供电效率。
Description
相关申请的交叉引用
本申请要求天地融科技股份有限公司于2016年11月24日提交中国专利局、申请号为201611051686.2、发明名称为“数据发送方法和装置”的中国专利申请的优先权,以及天地融科技股份有限公司于2016年11月24日提交中国专利局、申请号为201611053236.7、发明名称为“数据接收方法和装置”的中国专利申请的优先权。
本发明涉及一种电子技术领域,尤其涉及一种数据发送方法、数据接收方法和装置。
通信双方在有线的电连接的场合下,发送方和接收方之间可以通过电平高低的变化来传输数据,即,发送方可以控制两者之间的电平来控制信号的发送。此时,由于两者之间必然维持有高电平的情形,则此时一方可以利用该高电平为自身进行充电,从而实现通信的同时还能充电的目的。然而,在现有技术中,通常直接采用高电平和低电平来表示比特1或比特0的编码方式,即,发送方要发送比特1时,该线路上的电平维持为高电平;发送方要发送比特0时,该线路上的电平维持为低电平。此时在发送比特1或比特0时必然有一个利用低电平来表示的比特,一般低电平是电平为0或者很小的电压值,一般无法达到充电的目的。可见,现有技术的编码方式中存在充电效率低的问题。
此外,在现有的某些信号传输技术中虽然不采用高电平和低电平来表示比特1或比特0的编码方式,而改为采用利用不同的时间间隔区分不同的比特值,例如,比特00用T+t1表示,比特01用T+t2表示,比特10用T+t3表示,比特11用T+t4表示,采用该现有的信号传输技术,传输不同的比特值所需的时长较长,数据比特的编码效率较低,增加了发送方和接收方的负担及成本。
发明内容
本发明旨在解决上述问题之一。
为达到上述目的,本发明的技术方案具体是这样实现的:
本发明提供一种数据发送方法,包括:获取待发送数据的比特序列;根据所述待发送数据的比特序列,连续发送所述比特序列中的比特对应的波形序列;其中,所述波形序列包括以下之一:第一波形序列、第二波形序列和第三波形序列,以所述第一波形序列表示第一数据比特,分别以所述第二波形序列和所述第三波形序列表示第二数据比特,所述第一数据比特为比特1和比特0中的一个,所述第二数据比特为所述比特1和比特0中的另一个,在连续发送的至少两个比特为所述第二数据比特时,所述连续发送的至少两个比特中的第一个比特对应的波形序列为所述第二波形序列,第二个比特以及后续的比特对应的波形序列为所述第三波形序列;其中,所述波形序列的特征包括:所述第一波形序列的持续时间、所述第二波形序列的持续时间以及所述第三波形序列的持续时间相同,所述持续时间与传输所述波形序列的波特率呈反比关系,且所述第一波形序列以高电平开始并在所述持续时间内出现低电平,其中,所述第一波形序列中出现的低电平在所述持续时间内所占的总时长不随所述波形序列的波特率的变化而变化,所述第二波形序列在所述持续时间内持续高电平,所述第三波形序列以低电平开始,并以高电平结束,且所述第三波形序列中出现的低电平在所述持续时间内所占的总时长不随所述波形序列的波特率的变化而变化。
本发明还提供一种数据发送装置,包括获取模块和发送模块,其中:所述获取模块,用于获取待发送
数据的比特序列;所述发送模块,用于根据所述待发送数据的比特序列,连续发送所述比特序列中的比特对应的波形序列,其中,所述波形序列包括以下之一:第一波形序列、第二波形序列和第三波形序列,以所述第一波形序列表示第一数据比特,分别以所述第二波形序列和所述第三波形序列表示第二数据比特,所述第一数据比特为比特1和比特0中的一个,所述第二数据比特为所述比特1和比特0中的另一个,在连续发送的至少两个比特为所述第二数据比特时,所述连续发送的至少两个比特中的第一个比特对应的波形序列为所述第二波形序列,第二个比特以及后续的比特对应的波形序列为所述第三波形序列;其中,波形序列的特征包括:所述第一波形序列的持续时间、所述第二波形序列的持续时间以及所述第三波形序列的持续时间相同,所述持续时间与传输所述波形序列的波特率呈反比关系,且所述第一波形序列以高电平开始并在所述持续时间内出现低电平,其中,所述第一波形序列中出现的低电平在所述持续时间内所占的总时长不随所述波形序列的波特率的变化而变化,所述第二波形序列在所述持续时间内持续高电平,所述第三波形序列以低电平开始,并以高电平结束,且所述第三波形序列中出现的低电平在所述持续时间内所占的总时长不随所述波形序列的波特率的变化而变化。
本发明还提供一种数据接收方法,包括:检测接收端口的电平变化;根据所述电平变化以及波形序列的特征确定连续传输的N个波形序列,其中,N为正整数,所述波形序列包括以下之一:第一波形序列、第二波形序列和第三波形序列,所述波形序列的特征包括:所述第一波形序列、所述第二波形序列以及所述第三波形序列的持续时间相同,所述持续时间与传输所述波形序列的波特率呈反比关系,且所述第一波形序列以高电平开始并在所述持续时间内出现低电平,其中,所述第一波形序列中出现的低电平在所述持续时间内所占的总时长不随所述波形序列的波特率的变化而变化,所述第二波形序列在所述预设持续时间内持续高电平,所述第三波形序列以低电平开始,并以高电平结束,且所述第三波形序列中出现的低电平在所述持续时间内所占的总时长不随所述波形序列的波特率的变化而变化;所述N个波形序列中的各个波形序列分别为以下之一:所述第一波形序列、所述第二波形序列和所述第三波形序列;根据所述连续传输的N个波形序列确定接收数据的比特序列,其中,以所述第一波形序列表示比特1和比特0中的一个,分别以所述第二波形序列和所述第三波形序列表示所述比特1和比特0中的另一个。
本发明还提供一种数据接收装置,包括:检测模块,用于检测接收端口的电平变化;波形序列确定模块,用于根据所述电平变化以及波形序列的特征确定连续传输的N个波形序列,其中,N为正整数,所述波形序列包括以下之一:第一波形序列、第二波形序列和第三波形序列,所述波形序列的特征包括:所述第一波形序列、所述第二波形序列以及所述第三波形序列的持续时间相同,所述持续时间与传输所述波形序列的波特率呈反比关系,且所述第一波形序列以高电平开始并在所述持续时间内出现低电平,其中,所述第一波形序列中出现的低电平在所述持续时间内所占的总时长不随所述波形序列的波特率的变化而变化,所述第二波形序列在所述预设持续时间内持续高电平,所述第三波形序列以低电平开始,并以高电平结束,且所述第三波形序列中出现的低电平在所述持续时间内所占的总时长不随所述波形序列的波特率的变化而变化;所述N个波形序列中的各个波形序列分别为以下之一:所述第一波形序列、所述第二波形序列和所述第三波形序列;数据确定模块,用于根据所述连续传输的N个波形序列确定接收数据的比特序列,其中,以所述第一波形序列表示比特1和比特0中的一个,分别以所述第二波形序列和所述第三波形序列表示所述比特1和比特0中的另一个。
由上述本发明提供的技术方案可以看出,本发明提供了一种数据发送方法、数据接收方法和装置,通过本发明的数据发送方法和数据接收方法,当数据发送方在向数据接收方传输数据时,采用三种波形序列来表示数据比特1和0,且其中第二波形序列一直持续在高电平,另外两种波形序列也维持一定时间的高电平,从而能够使得待发送数据的比特序列对应的波形序列中维持在高电平的时间尽可能长,使得数据发送方和数据接收方之间尽可能以高电平连接,方便数据发送方或数据接收方中其中一个作为从设备时从主设备获取到尽可能多的电能,在不影响数据传输效率的前提下,提高供电效率。此外,在本发明中,不同的波形序列的传输持续时间相同,即均以T来传输一个比特,相比与现有技术中需要用不同的时间间隔来传输一个比特值的方式,本发明传输一个比特所需的时间更短,因此,编码效率更高,降低了发送方和接
收方的成本及负担。
为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域的普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他附图。
图1为本发明实施例1提供的数据发送方法的流程图;
图2为本发明实施例1提供的一个数据帧的示意图;
图3为本发明实施例1提供的三种波形序列的波形特征图;
图4为本发明实施例1提供的第一波形序列X的示意图;
图5为本发明实施例1提供的一种数据帧头格式示意图;
图6是本发明实施例1提供的数据接收方法的流程图;
图7是本发明实施例1提供的一个具体实施应用图;
图8为本发明实施例2提供的一种数据发送装置结构示意图;
图9为本发明实施例2提供的一种数据接收装置结构示意图;
图10为本发明实施例2提供的一种数据传输系统结构示意图。
下面结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明的保护范围。
下面将结合附图对本发明实施例作进一步地详细描述。
本发明基于一种数据传输系统,该数据传输系统包括数据发送方和数据接收方,数据发送方和数据接收方之间通过有线连接,数据发送方通过电平的变化来向数据接收方发送要发送的信息,数据接收方通过检测或感应电平的变化来接收信息。数据发送方和数据接收方可以是一对主从设备,例如,数据发送方为主设备,数据接收方为从设备,当然,数据发送方也可以是从设备而数据接收方为主设备。主设备和从设备之间通过有线数据线进行连接,当主设备和从设备之间连接后不传输数据时,则主设备和从设备始终维持高电平连接,主设备可以通过有线连接提供的高电平为从设备供电;当主设备和从设备连接后进行数据传输时,可以根据数据所采用的波形序列控制发送端口的电平产生高低电平的变化,而且,在数据所采用的波形序列中出现持续高电平的时间内,从设备仍然可以从主设备获得电能。本发明还限定了数据发送方和数据接收方之间收发数据所采用的波形序列,具体在实施例中体现。
实施例1
本实施例提供一种数据发送方法,如图1所示,包括:
步骤S101,获取待发送数据的比特序列。
具体来说,当数据发送方需要传输数据时,其通过自身生成或者通过接收外部设备发送过来的待发送数据,将待发送数据转换为待发送数据对应的比特序列,也可以直接接收外部设备发送过来的待发送数据的比特序列。该待发送数据可以是数据发送方要发送的数据帧,待发送数据的比特序列可以包括:数据帧头、传输数据以及数据帧尾等信息。如图2所示是一个待发送数据比特序列的示例(即一个数据帧),其中包括数据帧头SOF、n个字节的传输数据、数据帧尾EOF,其中数据帧头SOF和数据帧尾EOF可以是每次通信均约定好的固定位数的比特串,而n个字节的传输数据根据传输内容、报文类型的不同而不同。关于数据帧头SOF和数据帧尾EOF在后面有详细介绍。
在本发明的一个可选实施方式中,在待发送数据的比特序列中(即一个数据帧)的传输数据中可以至
少包括:至少1字节的标记位,其中,标记位至少包括:至少1比特的报文类型位。具体来说,待发送数据可以是不同类型的报文,可以是包含请求或者响应命令的报文,也可以是包含要传输的数据的报文,例如ATR、ACK、PKT等报文。每个传输数据的数据包长可以是固定值,根据不同的寄存器可对该固定值进行调配,可以默认为每个传输数据的数据包长为64字节,最长可以将每个传输数据的数据包长固定为256字节,当然,在具体的传输中,最后一个传输数据包的长度可以小于默认长度。传输数据中的标记位用于标记该传输数据的特征,该1字节的标记位可以位于传输数据的第1字节(如图2中的Byte 0位置),可以包括标识传输数据的信息特征的比特位,例如包括数据发送者、报文类型等特征的比特位,以便数据接受方通过标记位获得传输数据的信息,有利于数据的接收和解析。
此外,在一种可选的实施方式中,待传输数据中的最后两个字节Byten-1,Byten可以作为CRC冗余校验位,可以利用该校验位对接收数据帧的比特序列进行校验,以便检测或校验接收的数据是否出现错误。
以下,对传输数据中标记位、报文类型等做简单示例,本发明并不局限于此。
传输数据中的标记位可以包括8bit,该8bit具体可以如表1所示,但并不局限于此。
表1
Bit7 | Bit[6:4] | Bit[3:0] |
Device_type | Rev | Packet_type |
其中,Device_type:代表该数据发送方,可以用1代表主设备Host,0代表从设备Device,当然也可以用1代表从设备Device,用0代表主设备Host,以便于数据接收方在接收到数据后通过分析工具可区分数据是主设备还是从设备发出的。Rev为缺省数据,Packet_type:代表报文类型,表2示出了可能涉及的报文类型,但并不局限于此。
表2
Packet_type | 报文描述 |
0001B | ATR |
0010B | ACK |
0011B | NAK |
0100B | PKT |
其中:ATR代表参数获取报文,主设备识别到从设备的接入后,向从设备发送ATR报文,从设备在收到ATR报文后需立即做出响应,响应报文类型仍为ATR,并携带参数信息。ATR报文可以只包含1字节的标记位和2字节的CRC校验位(例如图2中EOF前两个字节)。
ACK代表响应报文,即表示数据接收成功的响应报文,ACK报文可以包含1字节的标记位和2字节的CRC校验位。
NAK代表设备未准备好(或数据接收失败)的响应报文,例如,在数据接收错误或者数据丢包等情况下,接收方会向发送方返回NAK报文,NAK报文可以包含1字节的标记位和2字节的CRC校验位。
PKT代表数据报文,即该报文就是正常的数据报文,当要传输的为数据时,8bit的标记位格式如表3所示。从表3中可以看出,数据报文PKT的标记位中不仅包括了标识设备类型、数据包类型等字段,还包含了显示该数据包是否为本次发送的最后一个包的字段,例如,如果该数据包为本次发送的最后一个包,则bit5为“Last”。
表3
Bit7 | Bit6 | Bit5 | Bit4 | Bit[3:0] |
Device_type | Rev | Last | Rev | Packet_type |
步骤S102,根据待发送数据的比特序列,连续发送比特序列中的比特对应的波形序列,波形序列包括以下之一:第一波形序列、第二波形序列和第三波形序列。其中,以第一波形序列表示第一数据比特,分别以第二波形序列和第三波形序列表示第二数据比特,第一数据比特为比特1和比特0中的一个,第二数据比特为比特1和比特0中的另一个,在连续发送的至少两个比特为第二数据比特时,连续发送的至少两个比特中的第一个比特对应的波形序列为第二波形序列,第二个比特以及后续的比特对应的波形序列为第三波
形序列。
其中,波形序列的特征包括:第一波形序列的持续时间、第二波形序列的持续时间以及第三波形序列的持续时间相同,持续时间与传输波形序列的波特率呈反比关系,且第一波形序列以高电平开始并在持续时间内出现低电平,其中,第一波形序列中出现的低电平在持续时间内所占的总时长不随波形序列的波特率的变化而变化,第二波形序列在持续时间内持续高电平,第三波形序列以低电平开始,并以高电平结束,且第三波形序列中出现的低电平在持续时间内所占的总时长不随波形序列的波特率的变化而变化。
在具体的实施方式中,三种波形序列具有不同的波形特征,以便区分开来,有利于接收方检测到数据。但三种波形序列均具有相同的持续时间T,其中,波形序列的持续时间T与传输数据的波特率呈反比关系,可以用于确定数据传输的波特率(即波特率为1/T)。在本实施例中给出三种波形序列(在后面将以X表示第一波形序列、Y表示第二波形序列、Z表示第三波形序列)的波形特征图,如图3(a)和(b)所示,第一波形序列X以高电平开始,在持续一段时间(T1)的高电平后跳变到低电平,该持续高电平的时间(T1)可以是固定的,也可以是不固定的,也可以根据每次传输而固定。其中,第一波形序列X中出现的低电平在持续时间内所占的总时长不随波形序列的波特率的变化而变化,即第一波形序列中出现的低电平在持续时间内所占的总时长与波形序列的波特率和持续时间均没有对应的线性变化关系,例如,在一次传输过程中,第一波形序列中出现的低电平的持续时长是一个固定时长。如图3(c)所示,该第二波形序列Y在持续时间内持续高电平,即该第二波形序列Y在持续时间内不产生跳变。如图3(d)和(e)所示,第三波形序列Z以低电平开始,且第三波形序列中出现的低电平在持续时间内所占的总时长不随波形序列的波特率的变化而变化。其中,第三波形序列中出现的低电平在持续时间内所占的总时长不随波形序列的波特率的变化而变化,即第三波形序列中出现的低电平在持续时间内所占的总时长与波形序列的波特率和持续时间均没有对应的线性变化关系,即,在一次传输过程中,第三波形序列中出现的低电平(T2)的持续时长是一个固定时长,该固定时长与波特率没有线性关系。
在数据发送方需要向数据接收方发送数据时,在要发送的传输数据的比特序列中,一般会出现比特1和0,在发送待发送数据的比特序列时,如果以第一波形序列X表示比特1,以第二波形序列Y表示比特0,则基于前述波形序列的特征可知,当遇到连续的至少两个比特0时,由于第二波形序列Y是持续的高电平,如果仅用第二波形序列Y表示比特0时,则可能无法区分该数据比特0是数据传输的结束还是正常数据。因此,在本发明中通过三种波形序列来表示待发送数据的比特序列,分别以三种波形序列来表示比特1和比特0,具体来说有以下两种表示方式:
方式一、以第一波形序列表示比特1,以第二波形序列或第三波形序列来表示比特0,也就是说,当传输数据中出现比特1时,则采用第一波形序列来表示,当传输数据中出现比特0时,则可能采用第二波形序列或者采用第三波形序列来表示,具体采用第二波形序列还是采用第三波形序列,则需要根据比特序列中比特0出现的位置而决定而并非只采用第二波形序列或第三波形序列中的一个来传输。基于方式一的规则,在发送连续至少两个比特0时,第一个出现的比特0用第二波形序列Y来表示,紧随其后出现的比特0全部都用第三波形序列Z表示。例如,当要传输的数据为1011001000时,则相应的波形序列应当为XYXXYZXYZZ。
方式二、以第一波形序列表示比特0,以第二波形序列或第三波形序列来表示比特1,也就是说,当传输数据中出现比特0时,则采用第一波形序列来表示,当传输数据中出现比特1时,则可能采用第二波形序列或者采用第三波形序列来表示,具体采用第二波形序列还是采用第三波形序列,则需要根据比特序列中比特1出现的位置而决定采用第二波形序列还是第三波形序列,而并非只采用第二波形序列或第三波形序列中的一个来传输。基于方式二的规则,在发送连续至少两个比特1时,第一个出现的比特1用第二波形序列Y来表示,紧随其后出现的比特1全部都用第三波形序列Z表示。例如,当要传输的数据为1011001000时,则相应的波形序列应当为YXYZXXYXXX。
需要注意的是,在本发明中单出现“电平跳变”或“跳变”的场合,如果没有其他相反的说明,均特指从高电平跳变到低电平,在实际的波形中可以表现为一个下降沿。在本申请有时也直接以“下降沿跳变”表示。而在本发明中如果涉及到电平由低变化到高,则不直接称为电平跳变。
通过本发明的数据传输方法,当数据发送方在向数据接收方传输数据时,采用三种波形序列来表示数据比特1和0,且其中第二波形序列一直持续在高电平,另外两种波形序列也维持一定时间的高电平,从而
能够使得待发送数据的比特序列对应的波形序列中维持在高电平的时间尽可能长,使得数据发送方和数据接收方之间尽可能以高电平连接,方便数据发送方或数据接收方中其中一个作为从设备时从主设备获取到尽可能多的电能,在不影响数据传输效率的前提下,提高供电效率。此外,在本实施例中,不同的波形序列的传输持续时间相同,即均以T来传输一个比特,相比与现有技术中需要用不同的时间间隔来传输一个比特值的方式,本实施例提供的方法传输一个比特所需的时间更短,因此,编码效率更高,降低了发送方和接收方的成本及负担。
在本发明的一个可选实施方式中,当确定了待发送数据的比特序列后,需要根据待发送数据的比特序列连续发送比特序列中的比特对应的波形序列时,数据发送方可以通过控制发送端口的电平按照比特序列中的比特对应的上述波形序列的波形以及波形序列的特征进行变化,以发送待发送数据。具体来说,数据发送方可以通过硬件开关或者软件开关的开断来控制发送端口的电平,从而实现上述不同波形序列的波形特征。数据发送方在通过控制发送端口的电平变化发送待发送数据时,可以获取到一个比特就发送该比特对应的一个波形序列,也可以在待发送数据的比特序列的全部比特获取完之后将全部比特对应的多个波形序列一起发送,根据需要决定具体采用哪种方式。此外,高电平和低电平的设定可以根据电路和硬件的情况来适应性设计,例如,可以设定高电平为5V,低电平为0V,也可以设定高电平为5V,低电平为4.7V,当然还有其他设定方式。只要所采用的硬件能够实现高电平和低电平的区分,均可以用于本申请。
在一个可选的实施方式中,第一波形序列中和第三波形序列中出现的低电平所占的时长可以是固定的数值(如10ns),而当波特率变化时,则持续时间也跟随波特率成反比变化,但第一波形序列中和第三波形序列中出现的低电平所占持续时间的时长不跟随波特率的变化而变化,仍然保持为固定值。当然,在具体的实施方式中,在能够满足传输数据要求的前提下,第一波形序列和第三波形序列中的高电平所占的时长可以尽可能的长,而低电平所占时长尽可能短,以便波形序列能够尽可能长地维持在高电平状态,方便数据发送方或数据接收方中其中一个作为从设备时从主设备获取到尽可能多的电能,在不影响数据传输效率的前提下,提高供电效率。
以下以第一波形序列X举例来说明:假设X的第一预设时长T1=1/4T,X的低电平所占时长为10ns,则周期最小值可以是20ns,此时波特率为50Mbps,这时候可以取到50%的电,如图4(a)所示;如果低电平时长固定不变,T1=1/4T,周期如果是40ns,此时波特率为25Mbps,这时候可以取到75%的电,如图4(b)所示。可见,采用低电平固定的方式,可以在降低波特率的情况下,取到更多的电。
在一个可选实施方式中,波形序列的特征还包括:第一波形序列中出现的低电平在持续时间内所占的总时长小于持续时间的二分之一;和/或第三波形序列中出现的低电平在持续时间内所占的总时长小于持续时间的二分之一。具体来说,第一波形序列或第三波形序列中出现的低电平均可以小于周期的持续时间的二分之一,以便减少低电平所占时长,当然,波形序列中低电平所占时长可以是一个小于持续时间的二分之一的可变时长。在能够满足传输数据要求的前提下,第一波形序列和第三波形序列中的高电平所占的时长可以尽可能的长,而低电平所占时长尽可能短,以便波形序列能够尽可能长地维持在高电平状态,由此可以提高供电效率。
根据前述可知,第一波形序列可以以高电平结束,也可以以低电平结束,因此,在本发明的一个可选实施方式中,波形序列的特征还包括:在第一波形序列以低电平结束的情况下,第一波形序列以高电平开始并在持续时间内仅出现一次由高电平变为低电平的电平跳变;或者,在第一波形序列以高电平结束的情况下,第一波形序列以高电平开始并在持续时间内仅一次由高电平变为低电平的电平跳变。具体来说,该第一波形序列X在由高电平跳变到低电平之后,可以再由低电平跳变到高电平并以高电平结束,也可以维持低电平不变并以低电平结束,只要波形序列的持续时间内经历一次由高电平跳变到低电平,均可以认为是第一波形序列X,如图3(a)和(b)所示。当第一波形序列由高电平跳到低电平后以低电平结束时,可以减少跳变的次数,降低数据传输的复杂度。当该第一波形序列X在由高电平跳变到低电平之后,可以再由低电平跳变到高电平并以高电平结束后,可以使得高电平维持的时间拉长,提高取电效率。
在本发明的一个可选实施方式中,波形序列的特征还包括:第三波形序列以低电平开始且在持续时间内仅出现一次由低电平变为高电平的电平跳变,并以高电平结束。具体来说,第三波形序列Z可以一直维持低电平,也可以经历一次跳变后由低电平跳变到高电平,并以高电平结束,如图3(d)和(e)所示。
当然,第三波形序列以高电平结束可以使得高电平维持的时间拉长,提高取电效率。
根据前述已经知道待发送数据的比特序列的格式,以下给出待发送数据的几种具体实施方式。
在本发明的一个可选实施方式中,待发送数据的比特序列(即一个数据帧)可以依次包括:数据帧头、传输数据以及数据帧尾,数据帧头至少包括1个比特,数据帧头的第1个比特对应的波形序列为第三波形序列或者第一波形序列。具体来说,数据帧头可以仅为1个比特,当该数据帧头仅包含1个比特时,第二波形序列无法单独作为数据帧头使用,这是由于第二波形序列是持续的高电平,而不发送数据时发送方的发送端口也是持续的高电平,接收方只有检测到下降沿跳变时才能开始识别到发送方在发送数据,如果初始发送的数据由持续的高电平表示,接收方是无法检测到的,因此,第二波形序列无法单独作为数据帧头使用。当然,数据帧头也可以为包括第1个比特对应的波形序列为第三波形序列或者第一波形序列的多个比特,则此时数据帧头中可以包括第二波形序列。通过数据帧头可以用于至少标记数据传输的起始位置,数据帧尾可以用于至少标记数据传输的结束位置,接收方在接收到的数据时将其与数据帧头或数据帧尾的格式进行比对,如果发现是帧头或者帧尾,则判断出数据传输的开始或者结束。通过数据帧头和帧尾以便数据接收方能够正确地接收数据。传输数据中包括了数据发送方要对外传输的信息。当然,在数据发送的开始,由于收发双方可以约定发送数据的时间,此时接收方也可以无需检测其是否为数据帧头,而直接将接收到前几位(依约定)当作数据帧头。
在本发明的一个可选实施方式中,待发送数据的比特序列(即一个数据帧)依次包括:数据帧头、传输数据以及数据帧尾,数据帧头至少包括M个比特,M为正整数且M≥2;其中,数据帧头的前M个比特对应的波形序列由M个第一波形序列组成;或,数据帧头的前M个比特对应的波形序列由M个第三波形序列组成;或,数据帧头的前M个比特对应的波形序列包括至少一个第一波形序列和至少一个第三波形序列。具体来说,当数据帧头中包括了至少两个比特时,其可以是多种波形序列的组合。当M=2时,该数据帧头可以是XX、ZZ、XZ和ZX;当M=3时,该数据帧头可以是XXX、XXZ、XYZ、XZY、YXZ、YZX、ZZZ、ZZX、ZXX、ZXY、ZYX等情况。依次可以类推出所有可能的数据帧头格式,只要在本发明限定的范围内,均可以作为数据帧头试用。在本实施例中,通过包括至少两个比特的数据帧头,数据接收方在接收到数据帧头信息,或者在判断出该数据帧头之后,可以根据至少两个数据帧头之间的关系确定一个波形序列所持续的时间,即可以获得一个波形序列的持续时间,从而获得数据传输的波特率。由此数据发送方和数据接收方无需另外约定波特率,仅通过解析数据帧头就可以获得该传输数据的波特率,从而解析后续的数据包,实现数据传输的自适应。通过数据帧头解析获得一个波形序列的传输持续时间的方式,数据发送方可以更灵活选择波特率进行数据传输,数据发送方可以视当前的传输环境以及数据发送方支持的接收数据的速率选择双方支持的最高的波特率进行数据传输,数据接收方只要解析数据帧头就可以获得当前的波特率,由此,可以采用通信双方支持的最大波特率进行数据传输,以达到高速的数据传输的效果。
举例来说,当数据帧头为XX时,数据接收方可以通过两次由高电平跳变到低电平的跳变时间间隔来确定一个波形序列的传输时间,如图5所示。当采用其他数据帧头格式时,其计算方法根据波形序列的波形特征而发生相应变化,在此不再赘叙。
需要说明的是,由于解析数据帧头获得一个波形序列的持续时间,是根据波形序列中下降沿跳变之间的时间间隔推算得到的,所以为了能够根据数据帧头的波形序列推算出一个波形序列的持续时间,当M=2时,通信双方协商的数据帧头的前2个比特中不能出现Y。
在本发明的一个具体实施方式中,为了避免单频干扰,本实施例中还可以在连续相同的波形序列的后面(只要在后面就可以,比如紧接着连续相同的波形序列后面,或者隔几个波形序列之后均可)约定至少1个与所述相同的波形序列不同的波形序列,即抗干扰比特对应的波形序列,因此,数据帧头的前M个比特对应的波形序列由M个第一波形序列组成时,数据帧头还包括:在数据帧头的前M个比特之后的至少1个抗干扰比特,其中,至少1个抗干扰比特对应的波形序列为第二波形序列或第三波形序列;数据帧头的前M个比特对应的波形序列由M个第三波形序列组成时,数据帧头还包括:在数据帧头的前M个比特之后的至少1个抗干扰比特,其中,至少1个抗干扰比特对应的波形序列为第二波形序列或第一波形序列。具体来说,在具体实施时,数据接收方在检测接收端口的电平变化时可能受到单频干扰源的干扰,单频干扰可以理解为以相同周期产生的脉冲序列,如果预设的数据帧头的前M个比特设为同样的波形序列,比如,数据帧头
由连续4个Z组成,而单频干扰的频率恰好与波特率相同,即数据接收方通过电平变化识别出与预设的数据帧头相同的波形序列,此时,数据接收方会将该单频干扰误判为数据帧头,导致数据传输的失败。因此,当数据帧头中的前M个比特为相同的波形序列时,则还需要增加至少一个抗干扰比特,该抗干扰比特的波形序列与M个比特的波形序列不同,使得数据帧头对应的波形序列中存在不同的时间间隔,即不会出现与单频干扰相同的波形序列,从而防止将单频干扰误判为数据帧头。
在本发明的一个可选的实施方式中,数据帧头包括8个比特,8个比特对应的波形序列依次为第三波形序列、第三波形序列、第三波形序列、第三波形序列、第二波形序列、第三波形序列、第二波形序列和第三波形序列。通过以上8比特的数据帧头,可以使得数据接收方能够方便地确定数据传输的开始,同时能够根据数据帧头获取到波形的持续时间,从而确定数据传输的波特率,还可以通过不同的波形序列,防止可能因为单频干扰产生的误判。此外,通过设置较长的数据帧头,保证了数据接收方获取信息的可靠性,提高传输效率。
在本发明的一个可选实施方式中,数据帧尾包括2个比特,其中:数据帧尾的第一个比特对应的波形序列为第二波形序列,数据帧尾的第二个比特对应的波形序列为第二波形序列,或者,数据帧尾的第一个比特对应的波形序列为第三波形序列,数据帧尾的第二个比特对应的波形序列为第二波形序列,或者,数据帧尾的第一个比特对应的波形序列为第一波形序列,数据帧尾的第二个比特对应的波形序列为第三波形序列。具体来说,数据帧尾用于确定数据传输的结束位置,由于一旦检测到了代表数据帧尾的数据,则数据接收方会判断出本次数据传输已经结束,因此,数据帧尾仅能选择在正常的数据传输中不会出现的波形序列。由于本发明中设定的波形序列规则,在正常的数据传输中不可能出现的数据有“YY”、“XZ”或“ZY”,因此,可以将这三种波形序列当作数据帧尾使用。数据帧尾可以为2个比特,当然数据帧尾也可以包含更多比特。
在本发明的一个可选实施方式中,由于数据帧头中可能存在前述的“YY”、“XZ”或“ZY”序列,为了更好的检测到数据帧尾,可以根据数据帧头的情况来选择数据帧尾,当数据帧头对应的波形序列中存在相邻两个波形序列依次为第一波形序列和第三波形序列(即“XZ”)时,数据帧尾则可以选择“YY”或“ZY”,即数据帧尾的第一个比特对应的波形序列为第二波形序列,数据帧尾的第二个比特对应的波形序列为第二波形序列,或者,数据帧尾的第一个比特对应的波形序列为第三波形序列,数据帧尾的第二个比特对应的波形序列为第二波形序列。同样的,当数据帧头对应的波形序列中存在相邻两个波形序列依次为第三波形序列和第二波形序列(即“ZY”)时,数据帧尾则可以选择“YY”或“XZ”,即数据帧尾的第一个比特对应的波形序列为第二波形序列,数据帧尾的第二个比特对应的波形序列为第二波形序列,或者,数据帧尾的第一个比特对应的波形序列为第一波形序列,数据帧尾的第二个比特对应的波形序列为第三波形序列。同样的,当数据帧头对应的波形序列中存在相邻连续两个第二波形序列(即“YY”)时,数据帧尾则可以选择“ZY”或“XZ”,即数据帧尾的第一个比特对应的波形序列为第三波形序列,数据帧尾的第二个比特对应的波形序列为第二波形序列,或者,数据帧尾的第一个比特对应的波形序列为第一波形序列,数据帧尾的第二个比特对应的波形序列为第三波形序列。总的来说,选择没有出现在数据帧头中的比特序列作为数据帧尾,将数据帧头和数据帧尾的波形序列完全区分开来,可以防止将数据帧头误检测为数据帧尾,可以更方便地检测到数据帧尾,有利于数据的传输。
本实施例还提供一种数据接收方法,与数据发送方利用上述数据发送方法发送数据相匹配,数据接收方采用本实施例的数据接收方法来接收数据。如图6所示,该数据接收方法包括:
步骤S601,检测接收端口的电平变化;
本实施例中,如前文所述,数据发送方是通过控制发送端口产生高低电平的变化来形成待发送数据的比特序列对应的波形序列的,因此,相应的,数据接收方为了接收数据发送方发送的数据,需要对接收端口的电平变化进行检测,以便根据电平变化进行波形序列的识别。
具体来说,检测接收端口的电平变化可以通过检测电路或者检测模块来检测接收端口出现的电平跳变,或者通过采样电路或者采样模块对接收端口处的电平进行采样得到电平变化。根据波形序列编码规则导致的电平变化规律的不同,检测电路可以采用差分电路、比较器电路等等,只要能检测到电平变化,均可以运用在本发明中。根据波形序列编码规则导致的电平变化规律的不同,采样电路和采样模块的采样频
率应当能够与电平变化相匹配,以便保证能够采样到足够的点获得电平变化的规律。
步骤S602,根据电平变化以及波形序列的特征确定连续传输的N个波形序列。
其中,N为正整数,波形序列包括以下之一:第一波形序列、第二波形序列和第三波形序列,第一波形序列、第二波形序列和第三波形序列具有以下波形序列的特征:第一波形序列、第二波形序列以及第三波形序列的持续时间相同,持续时间与传输波形序列的波特率呈反比关系,且第一波形序列以高电平开始并在持续时间内出现低电平,其中,第一波形序列中出现的低电平在持续时间内所占的总时长不随波形序列的波特率的变化而变化,第二波形序列在预设持续时间内持续高电平,第三波形序列以低电平开始,并以高电平结束,且第三波形序列中出现的低电平在持续时间内所占的总时长不随波形序列的波特率的变化而变化;N个波形序列中的各个波形序列分别为以下之一:第一波形序列、第二波形序列和第三波形序列。关于三种波形序列不同的波形特征已经在数据发送方法中详细叙述,在此不再赘叙。
具体来说,如前文所述,数据发送方发送的待发送数据(一个数据帧)依次包括数据帧头、传输数据和数据帧尾,相应的,数据接收方在接收数据时,是先接收到几个比特的数据帧头之后,再接收后续的传输数据以及数据帧尾信息。关于数据帧头、传输数据和数据帧尾的具体格式已经在数据发送方法中详细叙述,在此不再赘叙。
由于数据接收方在接收到数据时,需要根据一个波形序列的持续时间以及上述提到的波形序列的特征,确定出检测到的电平变化信息中包含的N个波形序列,而该一个波形序列的持续时间可以是预先协商好的或者预先设定,也可以是根据接收到的数据中的数据帧头信息中获取。当需要从数据帧头中获取到波形序列的持续时间等参数信息时,数据发送方和数据接收方需要预先约定L个波形序列作为数据帧头,数据接收方可以从数据发送方获取或者从自身存储器中获取到L个波形序列的特征,即数据帧头中的波形序列的特征是数据接收方已知的,例如,可以约定L个波形序列为S个电平跳变组成,当然,可以约定数据帧头对应的波形序列包含S个电平跳变,还可以将S个电平跳变的时间间隔也做约定,而数据接收方可以获知该S个电平跳变为数据帧头。
根据电平变化以及波形序列的特征确定连续传输的N个波形序列具体可以通过以下实施方式来实现:
即,在一个可选的实施方式中,检测接收端口的电平变化,包括:持续检测到接收端口的S个电平跳变;在检测到接收端口的S个电平跳变之后,继续检测接收端口的Q个电平跳变,其中S个电平跳变和Q个电平跳变均为从高电平跳变为低电平,S、Q均为正整数,且S>1,Q>1。根据电平变化以及波形序列的特征确定连续传输的N个波形序列,包括:获取数据帧头预设的S个电平跳变形成的L个波形序列,其中,L为正整数且1<L<N;根据L个波形序列的特征以及检测到的S个电平跳变中的任意两个电平跳变之间的时间间隔计算一个波形序列的持续时间;以该计算得到的持续时间作为每个波形序列的持续时间,根据Q个电平跳变以及波形序列的特征确定传输数据以及数据帧尾对应的波形序列。在本实施方式中,数据发送方和数据接收方预先约定数据帧头为L个波形序列,该L个波形序列包含S个电平跳变,数据接收方在持续检测接收端口的电平变化的过程中,可以将检测到的S个电平跳变默认为对应数据帧头的S个跳变,而在S个跳变之后检测到电平变化(即检测到的Q个跳变)则视为数据帧中的传输数据和数据帧尾对应的波形序列包含的电平变化。数据接收方根据前述的方法接收到数据帧头后,根据数据帧头确定一个波形的持续时间T,再在每T时长内是否发生电平跳变以及每个电平跳变的特征,确定出Q个电平跳变对应的波形序列,从而确定整个N个波形序列。
当然,在确定出Q个电平跳变后,需要根据数据发送方法中记载的每种类型波形的特征来确定Q个电平跳变对应的波形序列。根据前文的波形序列的特征可以知道,第一波形序列X以高电平开始,且其在波形的持续时间内经历一次电平跳变且跳变的时间为T1(T1为从每一个波形开始的时间到发生跳变的时间,T1>0);第二波形序列为持续的高电平,其在波形的持续时间内不经历电平跳变;第三波形序列为以低电平开始,由于数据发送方和数据接收方默认状态是高电平,因此第三波形序列可以认为其在波形的最开始(可以认为是0时刻)经历一次电平跳变。因此,在获取到一个波形序列的持续时间的前提下,确定一个波形序列的方式可以为:在一个波形序列的持续时间内,根据该波形序列的起始时刻的电平高低以及持续时长符合上述哪种波形序列的特征。例如,在一个波形序列的持续时间内,当检测到的波形序列的波形特征为以高电平开始,在持续一段时间的高电平后跳变到低电平时,则可以确定其为第一波形序列;当检测
到的波形序列的波形特征为在持续时间内持续高电平,则可以确定其为第二波形序列;当检测到的波形序列的波形特征为以低电平开始,则可以确定其为第三波形序列。以此可以确定N个波形序列的每一个波形序列分别为哪种波形序列。需要注意的是,数据接收方在确定波形序列的类型时,可以每检测到一个波形序列就确定其类型,也可以在检测完所有的N个波形序列之后统一确定其波形类型。
当数据接收方已知一个波形序列的持续时间为T时,可以在每经过一个T的时长的电平变化确定一个波形序列,依照上述方法,可以根据波形序列的特征确定这一个波形序列是第一波形序列X、第二波形序列Y、还是第三波形序列Z,最终将检测到的电平变化确定出N个波形序列,也可以在检测到所有电平变化(即从第一个下降沿跳变开始直到检测不到下降沿跳变的过程中的电平变化)之后再将所有的电平变化以T的时长进行划分确定出相应的N个波形序列。如果某一个波形序列不能确定为第一波形序列、第二波形序列和第三波形序列中的任一个,则可能该波形序列在传输过程中发生了错误,则可能需要重发机制。
数据接收方在检测到数据帧头对应的波形序列后,就可以确定一个数据帧中的传输数据对应的波形序列的起始位置,从该起始位置开始可以根据检测到的电平变化(如下降沿的电平跳变)符合上述哪种波形序列的特征来确定第一个波形序列,在经过一个波形序列的持续时间T后,开始确定第二个波形序列,以此直至确定完接收数据中的传输数据和数据帧尾对应的波形序列。
此外,数据接收方在检测接收端口的电平变化,并根据电平变化确定波形序列时,可以采用监测接收端口出现的电平跳变的方式,将发生电平跳变作为电平变化的主要特征;也可以对接收端口处的电平进行采样获得接收端口电平变化的情况,获得完整的电平变化的规律,从而获得S个电平跳变。无论是通过监测电平跳变还是通过采样来确定电平变化,其结果均是为了能够根据电平变化还原出波形特征,即,只要能够获得对应于数据帧头的S个跳变均可,本发明并不局限于哪种方式。如果利用采样的方式获得S个电平跳变可以还原出整个波形,获得波形的所有特征,则不仅可以获得电平发生跳变的特征,还可以获得完整的电平变化对应的波形,从而无需考虑各类波形序列的特征,可以适用在任何类型的波形序列中,均可以成功解析出波形序列。如果利用监测电平跳变的方式,则无需对电平进行采样,避免了长时间采样来还原整体波形,只需要根据电平跳变的特征就可以确定出N个波形序列,减少了解析的复杂程度。
步骤S603,根据连续传输的N个波形序列确定接收数据的比特序列,其中,以第一波形序列表示比特1和比特0中的一个,分别以第二波形序列和第三波形序列表示比特1和比特0中的另一个。具体来说,当确定出N个波形序列的每一个分别是第一波形序列、第二波形序列还是第三波形序列后,则可以根据与数据发送方相同的规则来确定N个波形序列的每个波形序列所代表的比特值。根据不同的编码规则,至少包括以下两种解析方式:
方式一、当以第一波形序列表示比特1,以第二波形序列或第三波形序列来表示比特0,也就是说,当N个波形序列中的某个波形序列为第一波形序列时,则该波形序列所代表的比特值为1,当N个波形序列中的某个波形序列为第二波形序列或第三波形序列时,则该波形序列所代表的比特值为0。需要注意的是,在N个波形序列中,第二波形序列和第三波形序列是可能同时存在的,在数据发送方根据比特序列中比特0出现的位置而决定采用第二波形序列还是第三波形序列,而并非只采用第二波形序列或第三波形序列中的一个来传输,所以在接收方获得的N个波形序列中,碰到第二波形序列或第三波形序列均解析为比特0。例如,当确定的N个波形序列为XYXXYZXYZZ,时,根据解析规则,则接收到的比特序列为1011001000。
方式二、当以第一波形序列表示比特0,以第二波形序列或第三波形序列来表示比特1,也就是说,当N个波形序列中的某个波形序列为第一波形序列时,则该波形序列所代表的比特值为0,当N个波形序列中的某个波形序列为第二波形序列或第三波形序列时,则该波形序列所代表的比特值为1。需要注意的是,在N个波形序列中,第二波形序列和第三波形序列是可能同时存在的,在数据发送方根据比特序列中比特1出现的位置而决定采用第二波形序列还是第三波形序列,而并非只采用第二波形序列或第三波形序列中的一个来传输,所以在接收方获得的N个波形序列中,碰到第二波形序列或第三波形序列均解析为比特1。例如,当确定的N个波形序列为XYXXYZXYZZ,时,根据解析规则,则接收到的比特序列为0100110111。
通过本发明的数据接收方法,当数据发送方采用上述数据发送方法向数据接收方传输数据时,采用三种波形序列来表示数据比特1和0,且其中一种波形序列一直持续在高电平,另外两种波形序列也维持一定时间的高电平,从而能够使得波形序列尽可能长时间的维持在高电平,使得数据发送方和数据接收方之间
尽可能以高电平连接,方便数据发送方或数据接收方中其中一个作为从设备时从主设备获取到尽可能多的电能,在不影响数据传输效率的前提下,提高供电效率。此外,在本实施例中,不同的波形序列的传输持续时间相同,即均以T来传输一个比特,相比与现有技术中需要用不同的时间间隔来传输一个比特值的方式,本实施例传输一个比特所需的时间更短,因此,编码效率更高,降低了发送方和接收方的成本及负担。
以下给出一个接收数据并解析出数据的具体实现方式,如图7所示,本实施例包括但不限于以下情况:
数据发送方和数据接收方预先约定好数据帧头,例如可以约定数据帧头为4bit的序列“XZZZ”,也可以直接约定数据帧头为4个由高到低的电平跳变。当预先约定的数据帧头的L个波形序列为4bit的序列“XZZZ”时,则可以认为数据帧头需要经历4次由高到低的电平跳变(X和Z均有一次由高到低的跳变)。数据接收方检测到的电平变化如图7(a)所示,在图7(a)中当检测到4次由高到低的跳变时,则认为数据帧头接收完毕。即该4次由高到低的跳变对应的即为数据帧头。
接下来需要根据检测到的S个跳变和L个波形序列的特征计算出数据帧头中携带的一个波形序列的持续时间等信息。仍然以前例来详细说明,如图7(b)所示,双方已经约定L位的数据帧头格式为4bit的序列“XZZZ”,如果在数据传输中没有发生错误,则接收方接收到的S个跳变应当为4个由高到低的跳变。接收方已知数据帧头数据中的第1个波形序列为第一波形序列X,且第一波形序列X的跳变时间为T1=a*T,其中,a为预设的高电平占空比系数,第2个波形序列为第三波形序列Z,且第三波形序列Z的跳变时间为0。接收方可以在接收端口检测到第1次和第2次电平跳变之间(电平跳变仅指由高电平到低电平的电平跳变)的时间间隔τ,接收方检测到的时间间隔τ与持续时间T应满足τ=(T-T1),即τ=(T-a*T)。由此,接收端可以根据数据帧头序列的波形特征以及L个电平跳变中的任意两个电平跳变之间的时间间隔(即τ)计算一个波形序列的持续时间T,从而接收方通过数据帧头数据即可确定发送方发送数据所采用的波特率(即1/T)。图7中第一波形序列X以高电平结束,第三波形序列Z以高电平结束时。如果第一波形序列和/或第三波形序列以低电平结束时也同样可以获得,在此不再赘叙
由于在数据帧头的结束位置即是传输数据的开始位置,在确定了每个波形的持续时间T后,就可以从数据帧头的结束位置开始解析传输数据。当数据接收方根据检测电平由高电平到低电平的电平跳变来确定波形类型时,根据前面已知的波形特征,在每一段持续时间T内,当检测到出现一次由高到低的电平跳变且跳变的时间为T1时,则可以判定其为一个第一波形序列X;当检测到某一个波形序列在持续时间的一开始就发生由高到低的电平跳变的,则可以判定其为一个第三波形序列Z;当检测到某一个波形序列在波形的持续时间内不发生由高到低的电平跳变时,则可以判定其为一个第二波形序列Y。在图7(b)中可以看到,在数据帧头“XZZZ”之后的数据即为确定出的传输数据和数据帧尾,从解析的结果可以看出,在数据帧头“XZZZ”之后的波形序列依次为“XYXXYZZXYY”,如图7(c)所示,而一旦出现“YY”则可以认为其为数据帧尾,可见真正的传输数据为“XYXXYZZX”,如果是以X表示1、以Y或Z表示0的场合,则该传输数据为最终解析为“10110001”,如图7(d)所示。
实施例2
本实施例提供一种数据发送装置80,如图8所示。数据发送装置80是实施例1中的数据发送方法对应的装置,即实施例1中的数据发送方实现的操作可以通过本实施例中的数据发送装置80来具体实现。此处仅对数据发送装置80的结构进行简单描述,其余内容参见实施例1中数据发送方法的描述。本实施例的数据发送装置80包括获取模块801和发送模块802,该获取模块801和发送模块802可以采用一个或者多个处理器来实现,其中:
获取模块801,用于获取待发送数据的比特序列;具体来说,获取模块801可以是一个单独的处理器、芯片,也可以是集成在处理器上的一个电路,获取模块801可以从自身的存储器中获取待发送的比特序列,也可以接收外部传输或者输入的待发送序列,例如,可以通过接口接收或通过键盘输入接收。获取模块801获取到比特序列后发送到发送模块802。
发送模块802,用于根据待发送数据的比特序列,连续发送比特序列中的比特对应的波形序列,其中,波形序列包括以下之一:第一波形序列、第二波形序列和第三波形序列,以第一波形序列表示第一数据比特,分别以第二波形序列和第三波形序列表示第二数据比特,第一数据比特为比特1和比特0中的一个,第
二数据比特为比特1和比特0中的另一个,在连续发送的至少两个比特为第二数据比特时,连续发送的至少两个比特中的第一个比特对应的波形序列为第二波形序列,第二个比特以及后续的比特对应的波形序列为第三波形序列;具体来说,发送模块802可以是一个有线的数据传输接口,例如USB接口、音频接口、两线接口等。
其中,波形序列的特征包括:第一波形序列的持续时间、第二波形序列的持续时间以及第三波形序列的持续时间相同,持续时间与传输波形序列的波特率呈反比关系,且第一波形序列以高电平开始并在持续时间内出现低电平,其中,第一波形序列中出现的低电平在持续时间内所占的总时长不随波形序列的波特率的变化而变化,第二波形序列在持续时间内持续高电平,第三波形序列以低电平开始,并以高电平结束,且第三波形序列中出现的低电平在持续时间内所占的总时长不随波形序列的波特率的变化而变化。
本实施例还提供一种数据接收装置90,如图9所示,数据接收装置90是实施例1中的数据接收方法对应的装置,即实施例1中的数据接收方实现的操作可以通过本实施例中的数据接收装置90来具体实现。此处仅对数据接收装置90的结构进行简单描述,其余内容参见实施例1中对数据接收方法的描述。数据接收装置90包括接收端口901、检测模块902、波形序列确定模块903和数据确定模块904,该检测模块902、波形序列确定模块903和数据确定模块904可以采用一个或者多个处理器来实现,其中:
检测模块902,用于检测接收端口901的电平变化;具体来说,检测模块可以是一个检测电路或者采样电路,其中检测电路可以采用差分电路、比较器电路等,检测模块可以连接都一个有线数据接口的接收端口,检测该有线数据接口的接收端口,该有线数据接口可以是USB接口、音频接口、两线接口等。
波形序列确定模块903,用于根据电平变化以及波形序列的特征确定连续传输的N个波形序列,其中,N为正整数,波形序列包括以下之一:第一波形序列、第二波形序列和第三波形序列,波形序列的特征包括:第一波形序列、第二波形序列以及第三波形序列的持续时间相同,持续时间与传输波形序列的波特率呈反比关系,且第一波形序列以高电平开始并在持续时间内出现低电平,其中,第一波形序列中出现的低电平在持续时间内所占的总时长不随波形序列的波特率的变化而变化,第二波形序列在预设持续时间内持续高电平,第三波形序列以低电平开始,并以高电平结束,且第三波形序列中出现的低电平在持续时间内所占的总时长不随波形序列的波特率的变化而变化;N个波形序列中的各个波形序列分别为以下之一:第一波形序列、第二波形序列和第三波形序列;
数据确定模块904,用于根据连续传输的N个波形序列确定接收数据的比特序列,其中,以第一波形序列表示比特1和比特0中的一个,分别以第二波形序列和第三波形序列表示比特1和比特0中的另一个。
本实施例还提供一种数据传输系统,如图10所示,包括数据发送装置80和数据接收装置90,从而实现本发明的数据发送方法和数据接收方法。
通过本实施例的数据发送系统,当数据发送装置在向数据接收装置传输数据时,采用三种波形序列来表示数据比特1和0,且其中第二波形序列一直持续在高电平,另外两种波形序列也维持一定时间的高电平,从而能够使得待发送数据的比特序列对应的波形序列中维持在高电平的时间尽可能长,使得数据发送装置和数据接收装置之间尽可能以高电平连接,方便数据发送装置或数据接收装置中其中一个作为从设备时从主设备获取到尽可能多的电能,在不影响数据传输效率的前提下,提高供电效率。此外,在本实施例中,不同的波形序列的传输持续时间相同,即均以T来传输一个比特,相比与现有技术中需要用不同的时间间隔来传输一个比特值的方式,本实施例传输一个比特所需的时间更短,因此,编码效率更高,降低了发送方和接收方的成本及负担。
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本发明的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本发明的实施例所属技术领域的技术人员所理解。
应当理解,本发明的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用
于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。
本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。
此外,在本发明各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。
上述提到的存储介质可以是只读存储器,磁盘或光盘等。
Claims (40)
- 一种数据发送方法,其特征在于,包括:获取待发送数据的比特序列;根据所述待发送数据的比特序列,连续发送所述比特序列中的比特对应的波形序列;其中,所述波形序列包括以下之一:第一波形序列、第二波形序列和第三波形序列,以所述第一波形序列表示第一数据比特,分别以所述第二波形序列和所述第三波形序列表示第二数据比特,所述第一数据比特为比特1和比特0中的一个,所述第二数据比特为所述比特1和比特0中的另一个,在连续发送的至少两个比特为所述第二数据比特时,所述连续发送的至少两个比特中的第一个比特对应的波形序列为所述第二波形序列,第二个比特以及后续的比特对应的波形序列为所述第三波形序列;其中,所述波形序列的特征包括:所述第一波形序列的持续时间、所述第二波形序列的持续时间以及所述第三波形序列的持续时间相同,所述持续时间与传输所述波形序列的波特率呈反比关系,且所述第一波形序列以高电平开始并在所述持续时间内出现低电平,其中,所述第一波形序列中出现的低电平在所述持续时间内所占的总时长不随所述波形序列的波特率的变化而变化,所述第二波形序列在所述持续时间内持续高电平,所述第三波形序列以低电平开始,并以高电平结束,且所述第三波形序列中出现的低电平在所述持续时间内所占的总时长不随所述波形序列的波特率的变化而变化。
- 根据权利要求1所述的方法,其特征在于,所述根据所述待发送数据的比特序列,连续发送所述比特序列中的比特对应的波形序列,包括:控制发送端口的电平按照所述比特序列中的比特对应的波形序列的波形以及所述波形序列的特征进行变化,以发送所述待发送数据。
- 根据权利要求1或2所述的方法,其特征在于,所述波形序列的特征还包括:所述第一波形序列中出现的低电平在所述持续时间内所占的总时长小于所述持续时间的二分之一;和/或所述第三波形序列中出现的低电平在所述持续时间内所占的总时长小于所述持续时间的二分之一。
- 根据权利要求1至3任一项所述的方法,其特征在于,所述波形序列的特征还包括:所述第三波形序列以低电平开始且在所述持续时间内仅出现一次由低电平变为高电平的电平跳变,并以高电平结束;所述第一波形序列以高电平开始并在所述持续时间内仅出现一次由高电平变为低电平的电平跳变,并以低电平结束;或者,所述第一波形序列以高电平开始并在所述持续时间内仅一次由高电平变为低电平的电平跳变,并以高电平结束。
- 根据权利要求1至4中任一项所述的方法,其特征在于,所述待发送数据的比特序列依次包括:数据帧头、传输数据以及数据帧尾,所述数据帧头至少包括1个比特,所述数据帧头的第1个比特对应的波形序列为所述第三波形序列或者所述第一波形序列。
- 根据权利要求1至4中任一项所述的方法,其特征在于,所述待发送数据的比特序列依次包括:数据帧头、传输数据以及数据帧尾,所述数据帧头至少包括M个比特,M为正整数且M≥2;其中,所述数据帧头的前M个比特对应的波形序列由M个所述第一波形序列组成;或所述数据帧头的前M个比特对应的波形序列由M个所述第三波形序列组成;或所述数据帧头的前M个比特对应的波形序列包括至少一个所述第一波形序列和至少一个所述第三波形序列。
- 根据权利要求6所述的方法,其特征在于,所述数据帧头的前M个比特对应的波形序列由M个所述第一波形序列组成时,所述数据帧头还包括: 在所述数据帧头的前M个比特之后的至少1个抗干扰比特,其中,所述至少1个抗干扰比特对应的波形序列为所述第二波形序列或所述第三波形序列;所述数据帧头的前M个比特对应的波形序列由M个所述第三波形序列组成时,所述数据帧头还包括:在所述数据帧头的前M个比特之后的至少1个抗干扰比特,其中,所述至少1个抗干扰比特对应的波形序列为所述第二波形序列或所述第一波形序列。
- 根据权利要求5至7中任一项所述的方法,其特征在于,所述数据帧头包括8个比特,所述8个比特对应的波形序列依次为所述第三波形序列、所述第三波形序列、所述第三波形序列、所述第三波形序列、所述第二波形序列、所述第三波形序列、所述第二波形序列和所述第三波形序列。
- 根据权利要求5至8中任一项所述的方法,其特征在于,所述数据帧尾包括2个比特,其中:所述数据帧尾的第一个比特对应的波形序列为所述第二波形序列,所述数据帧尾的第二个比特对应的波形序列为所述第二波形序列,或者,所述数据帧尾的第一个比特对应的波形序列为所述第三波形序列,所述数据帧尾的第二个比特对应的波形序列为所述第二波形序列,或者,所述数据帧尾的第一个比特对应的波形序列为所述第一波形序列,所述数据帧尾的第二个比特对应的波形序列为所述第三波形序列。
- 根据权利要求5至9中任一项所述的方法,其特征在于,所述传输数据至少包括:至少1字节的标记位,其中,所述标记位至少包括:至少1比特的报文类型位。
- 一种数据发送装置,其特征在于,包括获取模块和发送模块,其中:所述获取模块,用于获取待发送数据的比特序列;所述发送模块,用于根据所述待发送数据的比特序列,连续发送所述比特序列中的比特对应的波形序列,其中,所述波形序列包括以下之一:第一波形序列、第二波形序列和第三波形序列,以所述第一波形序列表示第一数据比特,分别以所述第二波形序列和所述第三波形序列表示第二数据比特,所述第一数据比特为比特1和比特0中的一个,所述第二数据比特为所述比特1和比特0中的另一个,在连续发送的至少两个比特为所述第二数据比特时,所述连续发送的至少两个比特中的第一个比特对应的波形序列为所述第二波形序列,第二个比特以及后续的比特对应的波形序列为所述第三波形序列;其中,波形序列的特征包括:所述第一波形序列的持续时间、所述第二波形序列的持续时间以及所述第三波形序列的持续时间相同,所述持续时间与传输所述波形序列的波特率呈反比关系,且所述第一波形序列以高电平开始并在所述持续时间内出现低电平,其中,所述第一波形序列中出现的低电平在所述持续时间内所占的总时长不随所述波形序列的波特率的变化而变化,所述第二波形序列在所述持续时间内持续高电平,所述第三波形序列以低电平开始,并以高电平结束,且所述第三波形序列中出现的低电平在所述持续时间内所占的总时长不随所述波形序列的波特率的变化而变化。
- 根据权利要求11所述的装置,其特征在于,所述根据所述待发送数据的比特序列,连续发送所述比特序列中的比特对应的波形序列,包括:控制发送端口的电平按照所述比特序列中的比特对应的波形序列的波形以及所述波形序列的特征进行变化,以发送所述待发送数据。
- 根据权利要求11或12所述的装置,其特征在于,所述波形序列的特征还包括:所述第一波形序列中出现的低电平在所述持续时间内所占的总时长小于所述持续时间的二分之一;和/或所述第三波形序列中出现的低电平在所述持续时间内所占的总时长小于所述持续时间的二分之一。
- 根据权利要求11至13任一项所述的装置,其特征在于,所述波形序列的特征还包括:所述第三波形序列以低电平开始且在所述持续时间内仅出现一次由低电平变为高电平的电平跳变,并 以高电平结束;所述第一波形序列以高电平开始并在所述持续时间内仅出现一次由高电平变为低电平的电平跳变,并以低电平结束;或者,所述第一波形序列以高电平开始并在所述持续时间内仅一次由高电平变为低电平的电平跳变,并以高电平结束。
- 根据权利要求11至14中任一项所述的装置,其特征在于,所述待发送数据的比特序列依次包括:数据帧头、传输数据以及数据帧尾,所述数据帧头至少包括1个比特,所述数据帧头的第1个比特对应的波形序列为所述第三波形序列或者所述第一波形序列。
- 根据权利要求11至14中任一项所述的装置,其特征在于,所述待发送数据的比特序列依次包括:数据帧头、传输数据以及数据帧尾,所述数据帧头至少包括M个比特,M为正整数且M≥2;其中,所述数据帧头的前M个比特对应的波形序列由M个所述第一波形序列组成;或所述数据帧头的前M个比特对应的波形序列由M个所述第三波形序列组成;或所述数据帧头的前M个比特对应的波形序列包括至少一个所述第一波形序列和至少一个所述第三波形序列。
- 根据权利要求16所述的装置,其特征在于,所述数据帧头的前M个比特对应的波形序列由M个所述第一波形序列组成时,所述数据帧头还包括:在所述数据帧头的前M个比特之后的至少1个抗干扰比特,其中,所述至少1个抗干扰比特对应的波形序列为所述第二波形序列或所述第三波形序列;所述数据帧头的前M个比特对应的波形序列由M个所述第三波形序列组成时,所述数据帧头还包括:在所述数据帧头的前M个比特之后的至少1个抗干扰比特,其中,所述至少1个抗干扰比特对应的波形序列为所述第二波形序列或所述第一波形序列。
- 根据权利要求15至17中任一项所述的装置,其特征在于,所述数据帧头包括8个比特,所述8个比特对应的波形序列依次为所述第三波形序列、所述第三波形序列、所述第三波形序列、所述第三波形序列、所述第二波形序列、所述第三波形序列、所述第二波形序列和所述第三波形序列。
- 根据权利要求15至18中任一项所述的装置,其特征在于,所述数据帧尾包括2个比特,其中:所述数据帧尾的第一个比特对应的波形序列为所述第二波形序列,所述数据帧尾的第二个比特对应的波形序列为所述第二波形序列,或者,所述数据帧尾的第一个比特对应的波形序列为所述第三波形序列,所述数据帧尾的第二个比特对应的波形序列为所述第二波形序列,或者,所述数据帧尾的第一个比特对应的波形序列为所述第一波形序列,所述数据帧尾的第二个比特对应的波形序列为所述第三波形序列。
- 根据权利要求15至19中任一项所述的装置,其特征在于,所述传输数据至少包括:至少1字节的标记位,其中,所述标记位至少包括:至少1比特的报文类型位。
- 一种数据接收方法,其特征在于,包括:检测接收端口的电平变化;根据所述电平变化以及波形序列的特征确定连续传输的N个波形序列,其中,N为正整数,所述波形序列包括以下之一:第一波形序列、第二波形序列和第三波形序列,所述波形序列的特征包括:所述第一波形序列、所述第二波形序列以及所述第三波形序列的持续时间相同,所述持续时间与传输所述波形序列的波特率呈反比关系,且所述第一波形序列以高电平开始并在所述持续时间内出现低电平,其中,所述第一波形序列中出现的低电平在所述持续时间内所占的总时长不随所述波形序列的波特率的变化而变化,所述第二波形序列在所述预设持续时间内持续高电平,所述第三波形序列以低电平开始,并以高电平结束,且所述第三波形序列中出现的低电平在所述持续时间内所占的总时长不随所述波形序列的波特率的变化而变化;所述N个波形序列中的各个波形序列分别为以下之一:所述第一波形序列、所述第二波形序列和 所述第三波形序列;根据所述连续传输的N个波形序列确定接收数据的比特序列,其中,以所述第一波形序列表示比特1和比特0中的一个,分别以所述第二波形序列和所述第三波形序列表示所述比特1和比特0中的另一个。
- 根据权利要求21所述的方法,其特征在于,所述波形序列的特征还包括:所述第一波形序列中出现的低电平在所述持续时间内所占的总时长小于所述持续时间的二分之一;和/或,所述第三波形序列中出现的低电平在所述持续时间内所占的总时长小于所述持续时间的二分之一。
- 根据权利要求21或22所述的方法,其特征在于,所述波形序列的特征还包括:所述第三波形序列以低电平开始且在所述持续时间内仅出现一次电平变化,并以高电平结束;所述第一波形序列以高电平开始并在所述持续时间内仅出现一次由高电平变为低电平的电平跳变,并以低电平结束;或者,所述第一波形序列以高电平开始并在所述持续时间内仅出现一次由高电平变为低电平的电平跳变,并以高电平结束。
- 根据权利要求21至23中任一项所述的方法,其特征在于,所述接收数据的比特序列依次包括:数据帧头、传输数据以及数据帧尾,所述数据帧头至少包括1个比特,所述数据帧头的第1个比特对应的波形序列为所述第三波形序列或者所述第一波形序列。
- 根据权利要求21至23中任一项所述的方法,其特征在于,所述待发送数据的比特序列依次包括:数据帧头、传输数据以及数据帧尾,所述数据帧头至少包括M个比特,M为正整数且M≥2;其中,所述数据帧头的前M个比特对应的波形序列由M个所述第一波形序列组成;或所述数据帧头的前M个比特对应的波形序列由M个所述第三波形序列组成;或所述数据帧头的前M个比特对应的波形序列包括至少一个所述第一波形序列和至少一个所述第三波形序列。
- 根据权利要求25所述的方法,其特征在于,所述数据帧头的前M个比特对应的波形序列由M个所述第一波形序列组成时,所述数据帧头还包括:在所述数据帧头的前M个比特之后的至少1个抗干扰比特,其中,所述至少1个抗干扰比特对应的波形序列为所述第二波形序列或所述第三波形序列;所述数据帧头的前M个比特对应的波形序列由M个所述第三波形序列组成时,所述数据帧头还包括:在所述数据帧头的前M个比特之后的至少1个抗干扰比特,其中,所述至少1个抗干扰比特对应的波形序列为所述第二波形序列或所述第一波形序列。
- 根据权利要求24至26中任一项所述的方法,其特征在于,所述数据帧头包括8个比特,所述8个比特对应的波形序列依次为所述第三波形序列、所述第三波形序列、所述第三波形序列、所述第三波形序列、所述第二波形序列、所述第三波形序列、所述第二波形序列和所述第三波形序列。
- 根据权利要求24至27中任一项所述的方法,其特征在于,所述数据帧尾包括2个比特,其中:所述数据帧尾的第一个比特对应的波形序列为所述第二波形序列,所述数据帧尾的第二个比特对应的波形序列为所述第二波形序列,或者,所述数据帧尾的第一个比特对应的波形序列为所述第三波形序列,所述数据帧尾的第二个比特对应的波形序列为所述第二波形序列,或者,所述数据帧尾的第一个比特对应的波形序列为所述第一波形序列,所述数据帧尾的第二个比特对应的波形序列为所述第三波形序列。
- 根据权利要求24至28中任一项所述的方法,其特征在于,所述传输数据至少包括:1字节的标记位,其中,所述标记位至少包括:1比特的报文类型位。
- 根据权利要求24至29任一项所述的方法,其特征在于,所述检测接收端口的电平变化,包括:持续检测到所述接收端口的S个电平跳变;在检测到所述接收端口的所述S个电平跳变之后,继续检测所述接收端口的Q个电平跳变,其中所述S个电平跳变和所述Q个电平跳变均为从高电平跳变为低电平,S、Q均为正整数,且S>1,Q>1;所述根据所述电平变化以及波形序列的特征确定连续传输的N个波形序列,包括:获取所述数据帧头预设的S个电平跳变形成的L个波形序列,其中,L为正整数且1<L<N;根据所述L个波形序列的特征以及检测到的所述S个电平跳变中的任意两个电平跳变之间的时间间隔计算一个波形序列的持续时间;以计算得到的持续时间作为每个波形序列的持续时间,根据所述Q个电平跳变以及所述波形序列的特征确定所述传输数据以及所述数据帧尾对应的波形序列。
- 一种数据接收装置,其特征在于,包括:检测模块,用于检测接收端口的电平变化;波形序列确定模块,用于根据所述电平变化以及波形序列的特征确定连续传输的N个波形序列,其中,N为正整数,所述波形序列包括以下之一:第一波形序列、第二波形序列和第三波形序列,所述波形序列的特征包括:所述第一波形序列、所述第二波形序列以及所述第三波形序列的持续时间相同,所述持续时间与传输所述波形序列的波特率呈反比关系,且所述第一波形序列以高电平开始并在所述持续时间内出现低电平,其中,所述第一波形序列中出现的低电平在所述持续时间内所占的总时长不随所述波形序列的波特率的变化而变化,所述第二波形序列在所述预设持续时间内持续高电平,所述第三波形序列以低电平开始,并以高电平结束,且所述第三波形序列中出现的低电平在所述持续时间内所占的总时长不随所述波形序列的波特率的变化而变化;所述N个波形序列中的各个波形序列分别为以下之一:所述第一波形序列、所述第二波形序列和所述第三波形序列;数据确定模块,用于根据所述连续传输的N个波形序列确定接收数据的比特序列,其中,以所述第一波形序列表示比特1和比特0中的一个,分别以所述第二波形序列和所述第三波形序列表示所述比特1和比特0中的另一个。
- 根据权利要求31所述的装置,其特征在于,所述波形序列的特征还包括:所述第一波形序列中出现的低电平在所述持续时间内所占的总时长小于所述持续时间的二分之一;和/或,所述第三波形序列中出现的低电平在所述持续时间内所占的总时长小于所述持续时间的二分之一。
- 根据权利要求31或32所述的装置,其特征在于,所述波形序列的特征还包括:所述第三波形序列以低电平开始且在所述持续时间内仅出现一次电平变化,并以高电平结束;所述第一波形序列以高电平开始并在所述持续时间内仅出现一次由高电平变为低电平的电平跳变,并以低电平结束;或者,所述第一波形序列以高电平开始并在所述持续时间内仅出现一次由高电平变为低电平的电平跳变,并以高电平结束。
- 根据权利要求31至33中任一项所述的装置,其特征在于,所述接收数据的比特序列依次包括:数据帧头、传输数据以及数据帧尾,所述数据帧头至少包括1个比特,所述数据帧头的第1个比特对应的波形序列为所述第三波形序列或者所述第一波形序列。
- 根据权利要求31至33中任一项所述的装置,其特征在于,所述待发送数据的比特序列依次包括:数据帧头、传输数据以及数据帧尾,所述数据帧头至少包括M个比特,M为正整数且M≥2;其中,所述数据帧头的前M个比特对应的波形序列由M个所述第一波形序列组成;或所述数据帧头的前M个比特对应的波形序列由M个所述第三波形序列组成;或所述数据帧头的前M个比特对应的波形序列包括至少一个所述第一波形序列和至少一个所述第三波 形序列。
- 根据权利要求35所述的装置,其特征在于,所述数据帧头的前M个比特对应的波形序列由M个所述第一波形序列组成时,所述数据帧头还包括:在所述数据帧头的前M个比特之后的至少1个抗干扰比特,其中,所述至少1个抗干扰比特对应的波形序列为所述第二波形序列或所述第三波形序列;所述数据帧头的前M个比特对应的波形序列由M个所述第三波形序列组成时,所述数据帧头还包括:在所述数据帧头的前M个比特之后的至少1个抗干扰比特,其中,所述至少1个抗干扰比特对应的波形序列为所述第二波形序列或所述第一波形序列。
- 根据权利要求34至36中任一项所述的装置,其特征在于,所述数据帧头包括8个比特,所述8个比特对应的波形序列依次为所述第三波形序列、所述第三波形序列、所述第三波形序列、所述第三波形序列、所述第二波形序列、所述第三波形序列、所述第二波形序列和所述第三波形序列。
- 根据权利要求34至37中任一项所述的装置,其特征在于,所述数据帧尾包括2个比特,其中:所述数据帧尾的第一个比特对应的波形序列为所述第二波形序列,所述数据帧尾的第二个比特对应的波形序列为所述第二波形序列,或者,所述数据帧尾的第一个比特对应的波形序列为所述第三波形序列,所述数据帧尾的第二个比特对应的波形序列为所述第二波形序列,或者,所述数据帧尾的第一个比特对应的波形序列为所述第一波形序列,所述数据帧尾的第二个比特对应的波形序列为所述第三波形序列。
- 根据权利要求34至38中任一项所述的装置,其特征在于,所述传输数据至少包括:1字节的标记位,其中,所述标记位至少包括:1比特的报文类型位。
- 根据权利要求34至39任一项所述的装置,其特征在于,所述检测模块检测接收端口的电平变化,包括:所述检测模块持续检测到所述接收端口的S个电平跳变;在检测到所述接收端口的所述S个电平跳变之后,继续检测所述接收端口的Q个电平跳变,其中所述S个电平跳变和所述Q个电平跳变均为从高电平跳变为低电平,S、Q均为正整数,且S>1,Q>1;所述波形序列确定模块根据所述电平变化以及波形序列的特征确定连续传输的N个波形序列,包括:所述波形序列确定模块获取所述数据帧头预设的S个电平跳变形成的L个波形序列,其中,L为正整数且1<L<N;根据所述L个波形序列的特征以及检测到的所述S个电平跳变中的任意两个电平跳变之间的时间间隔计算一个波形序列的持续时间;以所述持续时间作为每个波形序列的持续时间,根据所述Q个电平跳变以及所述波形序列的特征确定所述传输数据以及所述数据帧尾对应的波形序列。
Applications Claiming Priority (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611053236.7 | 2016-11-24 | ||
CN201611051686.2 | 2016-11-24 | ||
CN201611051686.2A CN107404366B (zh) | 2016-11-24 | 2016-11-24 | 数据发送方法和装置 |
CN201611053236.7A CN107404319B (zh) | 2016-11-24 | 2016-11-24 | 数据接收方法和装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018095180A1 true WO2018095180A1 (zh) | 2018-05-31 |
Family
ID=62194734
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/107599 WO2018095180A1 (zh) | 2016-11-24 | 2017-10-25 | 数据发送方法、数据接收方法和装置 |
Country Status (1)
Country | Link |
---|---|
WO (1) | WO2018095180A1 (zh) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060029006A1 (en) * | 2004-08-09 | 2006-02-09 | Spediant Systems Ltd. | Inverse multiplex framing |
CN103379397A (zh) * | 2012-04-26 | 2013-10-30 | 国民技术股份有限公司 | 数据传输、处理、基于音频接口的信号处理方法及模块 |
CN103716270A (zh) * | 2011-09-26 | 2014-04-09 | 天地融科技股份有限公司 | 一种数据发送、接收方法及装置 |
CN104714920A (zh) * | 2015-02-13 | 2015-06-17 | 暨南大学 | 一种自适应波特率的信号接收方法 |
CN105162471A (zh) * | 2015-08-24 | 2015-12-16 | 武汉瑞纳捷电子技术有限公司 | 一种差分曼彻斯特解码电路及方法 |
CN107241161A (zh) * | 2016-11-24 | 2017-10-10 | 天地融科技股份有限公司 | 一种数据传输方法及装置 |
CN107241162A (zh) * | 2016-11-24 | 2017-10-10 | 天地融科技股份有限公司 | 一种数据传输方法及装置 |
-
2017
- 2017-10-25 WO PCT/CN2017/107599 patent/WO2018095180A1/zh active Application Filing
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060029006A1 (en) * | 2004-08-09 | 2006-02-09 | Spediant Systems Ltd. | Inverse multiplex framing |
CN103716270A (zh) * | 2011-09-26 | 2014-04-09 | 天地融科技股份有限公司 | 一种数据发送、接收方法及装置 |
CN103379397A (zh) * | 2012-04-26 | 2013-10-30 | 国民技术股份有限公司 | 数据传输、处理、基于音频接口的信号处理方法及模块 |
CN104714920A (zh) * | 2015-02-13 | 2015-06-17 | 暨南大学 | 一种自适应波特率的信号接收方法 |
CN105162471A (zh) * | 2015-08-24 | 2015-12-16 | 武汉瑞纳捷电子技术有限公司 | 一种差分曼彻斯特解码电路及方法 |
CN107241161A (zh) * | 2016-11-24 | 2017-10-10 | 天地融科技股份有限公司 | 一种数据传输方法及装置 |
CN107241162A (zh) * | 2016-11-24 | 2017-10-10 | 天地融科技股份有限公司 | 一种数据传输方法及装置 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2018095181A1 (zh) | 数据传输方法及装置 | |
EP2763365B1 (en) | Method and device for sending and receiving data | |
US10027504B2 (en) | Protocol-assisted advanced low-power mode | |
US10216690B2 (en) | Single-wire interface bus transceiver system based on I2C-bus, and associated method for communication of single-wire interface bus | |
US8934528B2 (en) | Transition interval coding for serial communication | |
KR20180074682A (ko) | N-위상 고속 버스 턴어라운드 | |
CN105637495A (zh) | 低功率相机控制接口总线和设备 | |
US11032100B2 (en) | Communication devices and methods | |
WO2018095179A1 (zh) | 一种数据传输方法及终端 | |
WO2017050234A1 (zh) | 数据传输方法及数据处理设备 | |
CN107241162B (zh) | 一种数据传输方法及装置 | |
CN107346997B (zh) | 一种数据传输方法以及终端 | |
JP2011524678A (ja) | 高速データ伝送方法および対応する装置 | |
CN107404319B (zh) | 数据接收方法和装置 | |
CN107359964B (zh) | 数据发送方法和装置 | |
WO2018095180A1 (zh) | 数据发送方法、数据接收方法和装置 | |
CN107359962B (zh) | 数据接收方法和装置 | |
CN106330357B (zh) | 一种serdes的传输校验方法、节点与系统 | |
CN105072007B (zh) | 一种石油测井总线的数据传输方法 | |
US8416717B2 (en) | Signals communication apparatus | |
CN107346998B (zh) | 一种数据帧尾检测方法及数据传输装置 | |
US8175170B2 (en) | Transmitter, receiver, method for transmitting, method for receiving, fixed length serial burst data transfer system, semiconductor device, and hybrid semiconductor device | |
CN107346999B (zh) | 一种数据帧尾检测方法及数据传输装置 | |
CN107404366B (zh) | 数据发送方法和装置 | |
CN107359963B (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: 17873076 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 17873076 Country of ref document: EP Kind code of ref document: A1 |