WO2018095183A1 - 传输参数获取方法及终端 - Google Patents

传输参数获取方法及终端 Download PDF

Info

Publication number
WO2018095183A1
WO2018095183A1 PCT/CN2017/107610 CN2017107610W WO2018095183A1 WO 2018095183 A1 WO2018095183 A1 WO 2018095183A1 CN 2017107610 W CN2017107610 W CN 2017107610W WO 2018095183 A1 WO2018095183 A1 WO 2018095183A1
Authority
WO
WIPO (PCT)
Prior art keywords
waveform
sequence
waveform sequence
level
duration
Prior art date
Application number
PCT/CN2017/107610
Other languages
English (en)
French (fr)
Inventor
李东声
Original Assignee
天地融科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CN201611051708.5A external-priority patent/CN107493156B/zh
Priority claimed from CN201611051744.1A external-priority patent/CN107368446B/zh
Application filed by 天地融科技股份有限公司 filed Critical 天地融科技股份有限公司
Publication of WO2018095183A1 publication Critical patent/WO2018095183A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L5/00Arrangements affording multiple use of the transmission path

Definitions

  • the application is based on the application number of 201611051708.5, the application date is November 24, 2016, the invention name is the transmission parameter acquisition method and the terminal Chinese patent and the application number is 201611051744.1, and the application date is November 24, 2016, the invention name is one.
  • a Chinese patent application for a transmission parameter adaptive data transmission method and apparatus is proposed, and the priority of the two Chinese patent applications is hereby incorporated by reference.
  • the present invention relates to the field of electronic technologies, and in particular, to a transmission parameter acquisition method and a terminal.
  • the serial communication between electronic devices is usually transmitted one character at a time, each character is transmitted bit by bit, and when a character is transmitted, it always starts with "start bit” and ends with “stop bit”. There is no fixed time interval between characters.
  • the transmission clock of the transmitting end and the receiving clock of the receiving end may be different.
  • the receiving end may sample the misalignment, causing a receiving error and reducing the communication efficiency.
  • the present invention is directed to solving the above problems.
  • a main object of the present invention is to provide a method for acquiring a transmission parameter, comprising: acquiring a waveform sequence feature of N waveform sequences formed by a preset S level hopping, wherein N is a positive integer, X is a positive integer and is greater than 1.
  • the respective waveform sequences in the N waveform sequences formed by the preset S level transitions are respectively one of: a first waveform sequence, a second waveform sequence, and a third waveform sequence, wherein the first A waveform sequence, the second waveform sequence, and the third waveform sequence have the following waveform sequence characteristics: the first waveform sequence, the second waveform sequence, and the third waveform sequence have the same transmission duration,
  • the transmission 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 jumps to a low level after a preset time period, ending with a high level.
  • the total duration of the low level occurring in the first waveform sequence during the transmission duration does not change with the change of the baud rate of the transmission waveform sequence, and the second waveform sequence is in the
  • the transmission duration continues for a high level
  • the third waveform sequence begins with a low level and ends with a high level
  • the low level occurring in the third waveform sequence is occupied during the transmission duration
  • the total duration does not change with the change of the baud rate of the transmitted waveform sequence, the preset S level transitions are all changed from high level to low level; and the S ports are continuously detected at the receiving port.
  • Another main object of the present invention is to provide a terminal, comprising: an obtaining module, configured to acquire waveform sequence features of N waveform sequences formed by preset S level hopping, wherein N is a positive integer, and X is a positive integer and greater than 1, each of the N waveform sequences formed by the preset S level transitions is one of the following: a first waveform sequence, a second waveform sequence, and a third waveform sequence, wherein The first waveform sequence, the second waveform sequence, and the third waveform sequence have the following waveform sequence characteristics: the first waveform The transmission durations of the sequence, the second waveform sequence, and the third waveform sequence are the same, the transmission duration is inversely proportional to the baud rate at which the waveform sequence is transmitted, and the first waveform sequence is high-powered Starting at the beginning and jumping to a low level after a preset time period, ending with a high level, wherein the total time that the low level occurring in the first waveform sequence occupies during the transmission duration does not follow the transmission The
  • the total duration of the low level occurring in the third waveform sequence does not change with the change of the baud rate of the transmission waveform sequence, and the preset S level jumps
  • the change is from high level to low level
  • the detecting module is configured to continuously detect S level jumps on the receiving port, wherein the continuously detected S level jumps are all from high power Flat to low level
  • duration identification module Waveform sequence characteristics for N waveform sequences formed according to the preset S level transitions and time between any two of the S level jumps continuously detected The interval calculates the transmission duration of a waveform sequence.
  • the present invention provides a transmission parameter acquisition method and a terminal, which can obtain transmission by a preset waveform sequence and a characteristic of a waveform sequence, and a level change detected by a receiving port.
  • the duration so as to ensure that the transmission end and the receiving end have the same value of the transmission duration for each data transmission, ensuring the stability and accuracy of each data transmission, and avoiding the waveform sequence determination error caused by the frequency difference. It effectively prevents the technical problem that the receiving end samples the misalignment when the transmission clock and the receiving time parameter are too different, causing the receiving error and the communication efficiency to be lowered.
  • the data can be sent and received using only two lines between the transmitting end and the receiving end, and during the data transmission and reception process, the power supply/charging between the two devices is completed at the same time, and the high level of the waveform sequence during data transmission The power supply/charging efficiency is greatly improved. Therefore, the transmission parameter acquisition method and the terminal provided by the present invention can effectively reduce the volume of the electronic device and improve the charging efficiency of the electronic device.
  • FIG. 1A is a flowchart of a method for acquiring a transmission parameter according to Embodiment 1 of the present invention
  • FIG. 1B is a schematic diagram of respective waveform sequences provided by Embodiment 1 of the present invention.
  • FIG. 1C is a schematic diagram of a first waveform sequence of an alternative embodiment provided by Embodiment 1 of the present invention.
  • FIG. 1D is a schematic diagram of a preset waveform sequence of an alternative embodiment provided by Embodiment 1 of the present invention.
  • FIG. 1E is a schematic diagram of a detected level jump according to an alternative embodiment provided by Embodiment 1 of the present invention.
  • 1F is a schematic diagram of a first waveform sequence composed of a first waveform sequence according to an alternative embodiment of the first embodiment of the present invention
  • FIG. 1G is a schematic diagram of a first M waveform sequence including a first waveform sequence and a third waveform sequence in an optional embodiment provided by Embodiment 1 of the present invention
  • FIG. 2A is a schematic structural diagram of a terminal according to Embodiment 2 of the present invention.
  • FIG. 2B is a schematic diagram of respective waveform sequences provided by Embodiment 2 of the present invention.
  • FIG. 2C is a schematic diagram of a preset waveform sequence of an optional implementation manner according to Embodiment 2 of the present invention.
  • FIG. 2D is a schematic diagram of a detected level jump according to an alternative embodiment provided by Embodiment 2 of the present invention.
  • FIG. 3 is a flowchart of a method for acquiring a transmission parameter according to Embodiment 3 of the present invention.
  • FIG. 4 is a schematic structural diagram of a terminal according to Embodiment 4 of the present invention.
  • This embodiment provides a transmission parameter acquisition method, which can be applied in communication between a master and a slave device.
  • the device that obtains the transmission parameters can be a slave device or a master device.
  • the device as the master device may be, for example, a terminal, and the device as the slave device may be, for example, an electronic payment device (for example, an electronic signature tool key, a smart card, a key card, a device, etc.).
  • FIG. 1A is a flowchart of a method for acquiring a transmission parameter according to an embodiment of the present invention. As shown in FIG. 1A, a method for acquiring a transmission parameter provided by this embodiment mainly includes the following steps:
  • Step 101 Acquire waveform sequence features of N waveform sequences formed by preset S level jumps, where N is a positive integer, S is a positive integer and is greater than 1, and a preset S level jump is formed.
  • Each of the N waveform sequences is one of: a first waveform sequence, a second waveform sequence, and a third waveform sequence, wherein the first waveform sequence, the second waveform sequence, and the third waveform sequence have the following waveform sequence Feature: the first waveform sequence, the second waveform sequence, and the third waveform sequence have the same transmission duration T, and the transmission duration T is inversely proportional to the baud rate of the transmission waveform sequence, and the first waveform sequence starts with a high level and Jumping to a low level after a preset time T1, ending with a high level, wherein the total time that the low level occurring in the first waveform sequence occupies within the transmission duration T does not follow the baud of the transmission waveform sequence The rate of change changes, the second waveform sequence continues for a
  • the first waveform sequence, the second waveform sequence, and the third waveform sequence may be in the manner shown in FIG. 1B.
  • the waveform sequence may include multiple transitions of a high level transition to a low level, and is not limited to the manner shown in FIG. 1B.
  • all the first waveform sequences have the same waveform sequence characteristics, and there is no case where there are two or more first waveform sequences in one data transmission process, and all the third waveform sequences It also has the same waveform sequence characteristics, and there is no case where there are two or more third waveform sequences in one data transmission.
  • the first waveform sequence starts with a high level and ends with a high level
  • the second waveform sequence continues for a high level
  • the third waveform sequence starts with a low level and ends with a high level. Sequence identification is easier.
  • the transmission duration is inversely proportional to the baud rate of the transmission waveform sequence, and the total duration of the low level occurring in the first waveform sequence during the transmission duration does not vary with the baud rate of the transmission waveform sequence.
  • the change; the total duration of the low level occurring in the third waveform sequence for the duration of the transmission does not vary with the baud rate of the sequence of transmitted waveforms. For example, taking the first waveform sequence as an example, when the baud rate is 50 Mbps, the transmission duration of the first waveform sequence is 20 ns, and when the baud rate is 25 Mbps, the transmission duration of the first waveform sequence is 40 ns, that is, transmission.
  • the duration is inversely proportional to the baud rate of the transmitted waveform sequence.
  • the longer the transmission duration the smaller the baud rate, ie the slower the transmission speed, the shorter the transmission duration, and the higher the baud rate, ie the faster the transmission speed.
  • the total duration of the low level occurring in the first waveform sequence for the duration of the transmission does not vary with the baud rate of the sequence of transmitted waveforms, as shown in Figure 1C, when the baud rate of the first waveform sequence is At 50 Mbps, the transmission duration of the first waveform sequence is 20 ns, and the duration of the low level is 8 ns. When the baud rate is 25 Mbps, the transmission duration of the first waveform sequence is 40 ns, and the duration of the low level is low. Still 8ns.
  • the total duration of the low level occurring in the third waveform sequence during the transmission duration does not change with the change of the baud rate of the transmission waveform sequence, that is, when the baud rate of the third waveform sequence is 50 Mbps, the third waveform
  • the transmission duration of the sequence is 20ns.
  • the low level has a duration of 8 ns.
  • the third waveform sequence has a transmission duration of 40 ns and its low level has a duration of 8 ns.
  • the first The transmission sequence of the waveform sequence or the third waveform sequence has a duration of 20 ns, the duration of the low level is 8 ns, and the power supply or power take-off duration of the first waveform sequence or the third waveform sequence is 60%, and the baud rate is 25 Mbps.
  • the transmission duration of the first waveform sequence or the third waveform sequence is 40 ns, the low level duration is 8 ns, and the power supply or power take-off duration of the first waveform sequence or the third waveform sequence is 80%, that is, in low power.
  • the flat duration is fixed, the lower the baud rate, the higher the power supply or power-up efficiency. To improve the power supply efficiency, the baud rate can be appropriately reduced.
  • the five waveform sequences are respectively the first waveform sequence, the first waveform sequence, the first waveform sequence, the second waveform sequence, and the third waveform sequence, and then acquired.
  • the waveform sequence characteristics of the five waveform sequences formed by the preset four level jumps are as shown in FIG.
  • 1D that is, after the high level continues for T1 time, the transition to the low level (the first transition)
  • the low level returns to the high level after a fixed period of time; after the high level continues for T1 time, the jump goes to the low level (the second jump), at T-T1
  • the low level returns to the high level after a fixed time; after the high level continues for T1 time, the transition to the low level (the third transition), during the T-T1 time, the low level Resumes to a high level for a fixed period of time; continues to a high level for T time; jumps to a low level (fourth transition), ends with a high level (the sum of the duration of the low level and the high level) For T).
  • Step 102 continuously detecting S level transitions on the receiving port, wherein the continuously detected S level transitions are all from high level to low level.
  • the device that detects the level jump for data reception may continuously sample the level of the receiving port to obtain a change in the level of the receiving port, and the sampling frequency used in the sampling should be higher than a preset minimum standard. To ensure the authenticity of the level change of the receiving port obtained by sampling, it is also possible to obtain only the time when the level of the receiving port jumps to the high level and jumps to the low level.
  • Step 103 Calculate a time interval between waveform sequence characteristics of N waveform sequences formed by preset S level hopping and any two level jumps of continuously detected S level hopping The transmission duration of the waveform sequence.
  • the waveform sequence characteristics of the waveform sequence and the time interval between any two level transitions calculate the transmission duration of a waveform sequence, as shown in FIG. 1D, the first hop and the second hop.
  • the time interval between the first hop and the third hop is T-T1+T1+T-T1+T1.
  • the transmission duration of a waveform sequence can be calculated.
  • the transmission duration of a waveform sequence is calculated by using the time interval between the times of the same hopping, and the calculation method is simple, easy to operate, and high in accuracy.
  • step 102 and step 103 may further include step 102a:
  • Determining whether each of the time intervals of the continuously detected S level transitions is equal to the S level transitions included in the N waveform sequences formed by the preset S level transitions The corresponding time interval in all the time intervals in the same time is in accordance with the same preset relationship, and if so, the waveform sequence characteristics of the N waveform sequences formed according to the preset S level transitions and the continuously detected S levels are performed.
  • the beginning of the data transmission that is, the N waveform sequences formed by the S level jumps may be the data frame header, and the data frame header is pre-agreed by the communication parties, thereby enabling reception in both communication parties.
  • the start of the end identification signal provides the basis for the subsequent calculation of the continuous transmission time T of a waveform sequence from the data frame header.
  • the same preset relationship is: for example, the detected first level The time interval between the transition and the second level transition is 50 ns, and the time interval between the preset first level transition and the second level transition is 100 ns, and the detected level jump The time interval between the change and the preset time interval of the corresponding jump are 0.5 times; the time interval between the detected detected second level jump and the third level jump is 50 ns, The time interval between the preset second level jump and the third level jump is 100 ns, and the time interval between the detected level jump and the preset corresponding jump time interval is 0.5.
  • Double relationship that is, the time interval between the detected Wth level transition and the W+1th (where W is a positive integer, and W+1 ⁇ S) level jump, and The time interval between the Wth level jump and the W+1th level jump is 0.5 times; the time between the detected first level jump and the third level jump
  • the interval is 100 ns
  • the time interval between the preset first level jump and the third level jump is 200 ns
  • the time interval in the detected level jump is preset with the corresponding jump
  • the time interval is 0.5 times, that is, the time interval between the detected Wth level jump and the W+2th (where W is a positive integer, and Y+1 ⁇ S) level jump
  • the preset The time interval between the Wth level jump and the W+2 level jump is 0.5 times; and so on, when the detected time interval of all level jumps corresponds to its preset
  • the time interval of the hopping is 0.5 times, which can be regarded as the same preset relationship.
  • the five waveform sequences continuously transmitted are the five waveform sequences corresponding to the preset data frame header. Whether each of the time intervals of the continuously detected S level transitions is equal to the S level transitions included in the N waveform sequences formed by the preset S level transitions When all the time intervals in all the time intervals are consistent with the same preset relationship, the continuously detected S level jumps may be determined as data frame headers, and the data frame header is determined before calculating a waveform sequence transmission. The duration ensures the accuracy of the transmission duration calculation and improves the transmission efficiency.
  • the waveform sequence further includes: the total duration of the low level occurring in the first waveform sequence during the transmission duration is less than one-half of the duration; and / or, the total time that occurs in the third waveform sequence for the duration of the transmission is less than one-half of the duration.
  • the shorter the total duration of the low-level duration the longer the power supply or power-on duration during data transmission, and the higher the power supply/power-up efficiency.
  • the waveform sequence further includes: the third waveform sequence only appears once at a level transition from a low level to a high level during the transmission duration, and is high The level ends; the first waveform sequence starts at a high level and only occurs once from a high level to a low level during the transmission duration.
  • the first waveform sequence or the third waveform sequence has only one transition during the transmission duration, and the transmission and reception of the first waveform sequence or the third waveform sequence is easier, and the ratio of the low level to the transmission duration is lower.
  • the N waveform sequences corresponding to the preset data frame header include at least M waveform sequences, and the M waveform sequences are in the N waveform sequences corresponding to the preset data frame header.
  • the time interval between the first high-level transition to the low level of the first waveform sequence and the first high-level transition to the low level of the second waveform sequence is the transmission duration of the first waveform sequence.
  • the first two waveform sequences of the five waveform sequences corresponding to the preset data frame header include the first waveform sequence and the third waveform sequence, as shown in FIG. 1G, 1 waveform sequence is the first waveform sequence, the second The waveform sequence is the third waveform sequence.
  • the M waveform sequences are composed of the first or third waveform sequence, or include the first and third waveform sequences, since the first and third waveform sequences both include level jumps, the calculation of the transmission duration It is simpler and faster, and the baud rate of the waveform sequence can be obtained according to the transmission duration T, and the transmission parameters of the current data transmission can be obtained.
  • the N waveform sequences corresponding to the preset data frame header further include: at least one anti-interference waveform sequence after the M waveform sequences, wherein at least one The anti-interference waveform sequence is a second waveform sequence or a third waveform sequence; when the M waveform sequences are composed of the third waveform sequence, the N waveform sequences corresponding to the preset data frame header further include: at least after the M waveform sequences An anti-interference waveform sequence, wherein the at least one anti-interference waveform sequence is a second waveform sequence or a first waveform sequence.
  • the multiple waveform sequences with the same level change interval are regarded as single-frequency interference, and the data content is misjudged.
  • the device transmitting the data needs to add an anti-interference waveform sequence after the plurality of waveform sequences having the same waveform change, so that the time interval of the level change is no longer a single repetition, and the data receiving device can recognize the level change as a normal data transmission.
  • single-frequency interference improve the accuracy of data transmission. For example, after two consecutive first waveform sequences, the device transmitting the data adds a second waveform sequence or a third waveform sequence, and the device receiving the data can determine that the two consecutive first waveform sequences are normal data, not Single frequency interference.
  • N 8
  • the N waveform sequences are sequentially a third waveform sequence, a third waveform sequence, a third waveform sequence, and a third waveform sequence.
  • Step 1 Obtain the waveform sequence features of the eight waveform sequences formed by the preset six level jumps, and the eight waveform sequences are: a third waveform sequence, a third waveform sequence, a third waveform sequence, and a third waveform sequence.
  • Step 2 continuously detecting 6 level transitions on the receiving port, wherein the continuously detected 6 level transitions are all from high level to low level;
  • Step 3 Calculate a waveform interval between the waveform sequence characteristics of the eight waveform sequences formed by the preset six level jumps and the time interval between any two of the six level jumps that are continuously detected.
  • the transmission duration of the waveform sequence The time interval between the first level jump and the second level jump of the detected six level transitions is 50 ns, then the transmission duration is 50 ns, and the fourth level jump and the fifth level.
  • the time interval between sub-level hops is 100 ns, and the transmission duration is 50 ns.
  • the transmission duration is calculated by the characteristics of the eight waveform sequences and the waveform sequence preset in the optional embodiment, and the calculation mode and the data transmission mode and the receiving mode are relatively simple.
  • the N waveform sequences formed by the preset S level transitions are N waveform sequences corresponding to the data frame header; and the S level transitions are continuously detected on the receiving port. Thereafter, the method may further include: continuing to detect level jumps on the receiving port; waveform sequence characteristics of the N waveform sequences formed according to the preset S level transitions and continuously detecting S level jumps After calculating the time interval between any two level transitions of the variable, the method may further include: using the transmission duration as the duration of each waveform sequence, continuing according to the continuation at the receiving port
  • the detected level jump and the waveform sequence feature determine a waveform sequence corresponding to the transmission data after the data frame header; the bit sequence of the transmission data is determined according to the waveform sequence corresponding to the transmission data, wherein the bit 1 and the bit 0 are represented by the first waveform sequence One of the two, the second waveform sequence and the third waveform sequence respectively represent the other of bit 1 and bit 0.
  • the waveform sequence corresponding to the transmission data after determining the level transition and the waveform sequence feature continuously detected on the receiving port continues to include, but is not limited to, the following manners: Method 1: Calculating The obtained transmission duration is used as the transmission duration of each waveform sequence, and receives the level change of each transmission duration in units of transmission duration, and is determined according to the level change of each transmission duration and the waveform sequence characteristics.
  • the calculated transmission duration is 20 ns, and a level change within 20 ns is received.
  • a level transition of a high level transition to a low level occurs at 6.67 ns.
  • the data sequence transmitted by the waveform sequence is 1, continue to receive the level change within the next 20 ns, and obtain the data bits of the transmission duration.
  • the calculated transmission duration is 20 ns
  • the level jump is continuously detected at the receiving port, and the received level transition is divided into units of 20 ns to obtain the power for each transmission duration.
  • the level change for example, the level transition of the receiving port continuous detection is divided into five transmission durations, wherein a level transition of a high level transition to a low level occurs at 6.67 ns in the third transmission duration.
  • the sequence is a first waveform sequence that transmits a data bit of one.
  • the waveform sequence and the bit sequence corresponding to the transmission data are determined according to the transmission duration, thereby ensuring the authenticity and reliability of the data transmission, and avoiding data reception caused by the transmission duration error. error.
  • the transmission duration is used as the duration of each waveform sequence
  • the data frame header is determined to be transmitted according to the level transitions continuously continued at the receiving port and the waveform sequence characteristics.
  • the method further comprises: determining whether the transmission duration is a locally supported transmission duration, and if so, performing the transmission duration as the duration of each waveform sequence, and continuing to detect continuously on the receiving port according to continue The step of level jump and the sequence of waveforms determine the sequence of waveforms corresponding to the data after the data frame header is transmitted.
  • the transmitted waveform sequence is no longer determined.
  • the transmission duration is a locally supported transmission duration, and then continuously detects a level change at the receiving port and determines a waveform sequence, thereby ensuring the authenticity and accuracy of the data bits represented by the obtained waveform sequence.
  • sexuality if it is not the locally supported transmission duration, it will not continue to detect level changes or determine the waveform sequence, which avoids wasting the computing power of the device.
  • the transmission parameter acquisition method of the embodiment acquires the waveform sequence features of the N waveform sequences formed by the preset S level hopping, and continuously detects S level hopping at the receiving port, according to the continuously detected S powers.
  • the time interval between any two level transitions in the flat transition calculates the transmission duration of a waveform sequence.
  • the embodiment provides a terminal, which is used to implement the transmission parameter acquisition method in Embodiment 1.
  • the terminal may be a PC, an iPAD, a mobile phone, an electronic signature tool key, a smart card, a key card, and the like.
  • FIG. 2A is a schematic structural diagram of a terminal 200 according to this embodiment.
  • the terminal includes: a detecting module 201, an obtaining module 202, and a duration identifying module 203.
  • the obtaining module 202 is configured to acquire waveform sequence features of N waveform sequences formed by preset S level jumps, where N is a positive integer, S is a positive integer and is greater than 1, preset
  • Each of the N waveform sequences formed by the S level jumps is one of the following: a first waveform sequence, a second waveform sequence, and a third waveform sequence, wherein the first waveform sequence and the second waveform sequence
  • the third waveform sequence has the following waveform sequence characteristics: the first waveform sequence, the second waveform sequence, and the third waveform sequence have the same transmission duration, and the transmission duration is inversely proportional to the baud rate of the transmission waveform sequence, and the first waveform
  • the sequence starts at a high level and jumps to a low level for a preset period of time, ending with a high level, wherein the total time that occurs during the transmission duration of the low level occurring in the first waveform sequence does not follow the transmission.
  • the baud rate of the waveform sequence changes, the second waveform sequence continues high for the duration of the transmission, the third waveform sequence begins with a low level, ends with a high level, and the third waveform sequence
  • the total duration of the low level that occurs during the transmission duration does not change with the baud rate of the transmitted waveform sequence.
  • the preset S level transitions are all from high level to low level. .
  • FIG. 2B a schematic diagram of the first waveform sequence, the second waveform sequence, and the third waveform sequence is shown in FIG. 2B.
  • the first waveform sequence and the third waveform sequence may exist.
  • a waveform sequence may include a transition of a plurality of high-level transitions to a low level, and is not limited to the manner shown in FIG. 2B.
  • all the first waveform sequences have the same waveform sequence characteristics, and there is no case where there are two or more first waveform sequences in one data transmission process, and all the third waveform sequences It also has the same waveform sequence characteristics, and there is no case where there are two or more third waveform sequences in one data transmission.
  • the first waveform sequence starts with a high level and ends with a high level
  • the second waveform sequence continues for a high level
  • the third waveform sequence starts with a low level and ends with a high level. Sequence identification is easier.
  • the transmission duration is inversely proportional to the baud rate of the transmission waveform sequence, and the total duration of the low level occurring in the first waveform sequence during the transmission duration does not follow the baud rate of the transmission waveform sequence.
  • the change varies; the total duration of the low level occurring in the third waveform sequence during the transmission duration does not vary with the baud rate of the transmitted waveform sequence.
  • the transmission duration of the first waveform sequence is 20 ns
  • the transmission duration of the first waveform sequence is 40 ns, that is, transmission.
  • the duration is inversely proportional to the baud rate of the transmitted waveform sequence. The longer the transmission duration, the smaller the baud rate, ie the slower the transmission speed, the shorter the transmission duration, and the higher the baud rate, ie the faster the transmission speed.
  • the total duration of the low level occurring in the first waveform sequence does not change with the baud rate of the transmission waveform sequence.
  • the baud rate of the first waveform sequence is 50 Mbps
  • the first waveform sequence The transmission duration is 20 ns
  • the low level duration is 8 ns
  • the transmission duration of the first waveform sequence is 40 ns
  • the duration of the low level is still 8 ns.
  • the total duration of the low level occurring in the third waveform sequence during the transmission duration does not change with the change of the baud rate of the transmission waveform sequence, that is, when the baud rate of the third waveform sequence is 50 Mbps, the third waveform
  • the transmission duration of the sequence is 20 ns
  • the duration of the low level is 8 ns
  • the transmission duration of the third waveform sequence is 40 ns
  • the duration of the low level is still 8 ns.
  • the first The transmission sequence of the waveform sequence or the third waveform sequence has a duration of 20 ns, the duration of the low level is 8 ns, and the power supply or power take-off duration of the first waveform sequence or the third waveform sequence is 60%, and the baud rate is 25 Mbps.
  • the first waveform sequence or the third waveform sequence has a transmission duration of 40 ns and a low level duration of 8 ns, the first waveform sequence
  • the power supply or power-on duration of the column or the third waveform sequence is 80%, that is, in the case where the duration of the low level is fixed, the lower the baud rate, the higher the power supply or power-up efficiency, and the power supply efficiency is improved. Reduce the baud rate.
  • Obtaining the waveform sequence characteristics of the five waveform sequences formed by the preset four level jumps is as shown in FIG.
  • the low level returns to the high level after a fixed time; after the high level continues for T1 time, the jump goes to the low level (the second jump), at T-T1 During the time, the low level returns to a high level for a fixed period of time; after the high level continues for T1 time, the transition goes low (the third transition), during the T-T1 time, the low battery After a fixed period of time, it returns to a high level; it continues for a high time of T time; it jumps to a low level (fourth jump) and ends with a high level (the time of low level and high level) And for T).
  • the detecting module 201 is configured to continuously detect S level transitions on the receiving port, wherein the continuously detected S level transitions are all changed from a high level to a low level.
  • the duration identification module 203 is configured to: between the waveform sequence characteristics of the N waveform sequences formed according to the preset S level transitions and between any two level transitions of the continuously detected S level transitions The time interval calculates the transmission duration of a waveform sequence.
  • the four level transitions continuously detected by the detecting module 201 are as shown in FIG. 2D, and may be hopped according to the preset four levels obtained in the obtaining module 202.
  • the waveform sequence characteristics of the five waveform sequences formed, and the time interval between any two level jumps calculate the transmission duration of a waveform sequence, as shown in FIG. 2C, the first transition and the first
  • the time interval between the first hop and the third hop is T-T1+T1+.
  • T-T1+T1 2T, which is the transmission duration of two waveform sequences.
  • the time interval between the third hop and the fourth hop is T-T1+T, which is known as the proportional relationship between T1 and T. In this case, the transmission duration of a waveform sequence can be calculated.
  • the terminal 200 calculates the transmission duration of a waveform sequence by using the time interval between the times of the same hopping, and the calculation method is simple, easy to operate, and high in accuracy.
  • the duration identification module 203 is further configured to determine the time interval of all of the continuously detected S level transitions before the time interval between any two level transitions is calculated for the transmission duration of a waveform sequence.
  • each time interval corresponds to the same preset interval in the time interval corresponding to all of the S level transitions included in the N waveform sequences formed by the preset S level transitions, if Yes, triggering the calculation of the time interval between the waveform sequence characteristics of the N waveform sequences formed according to the preset S level transitions and any two level jumps of the continuously detected S level transitions.
  • the transmission duration duration module 203 may determine the continuously detected S level transitions as data frame headers, and determine the data frame headers, when the corresponding time intervals in all the time intervals in the same time interval are consistent with the same preset relationship.
  • the transmission duration duration module 203 calculates the transmission duration of a waveform sequence, which ensures the accuracy of the transmission duration calculation and improves the transmission efficiency.
  • the waveform sequence further includes: the total duration of the low level occurring in the first waveform sequence during the transmission duration is less than one-half of the duration; and / Or, the total time that occurs in the third waveform sequence for the duration of the transmission is less than one-half of the duration.
  • the shorter the total duration of the low-level duration the longer the power supply or power-on duration during data transmission, and the higher the power supply/power-up efficiency.
  • the waveform sequence further includes: the third waveform sequence only appears once at a level transition from a low level to a high level during the transmission duration, and is high-powered End of level; the first waveform sequence starts at a high level and continues during transmission There is only one transition from high to low in the interval.
  • the first waveform sequence or the third waveform sequence has only one transition during the transmission duration, and the transmission and reception of the first waveform sequence or the third waveform sequence is easier, and the ratio of the low level to the transmission duration is lower.
  • the N waveform sequences formed by the preset S level transitions include at least M waveform sequences, and the M waveform sequences are N waveforms corresponding to preset data frame headers.
  • the first M waveform sequences in the sequence where M is a positive integer and M ⁇ 2; M waveform sequences are composed of a first waveform sequence; or, M waveform sequences are composed of a third waveform sequence; or, M waveforms
  • the sequence includes at least one first waveform sequence and at least one third waveform sequence.
  • the N waveform sequences formed by the preset S level transitions further include: at least one anti-interference waveform sequence after the M waveform sequences, wherein The at least one anti-interference waveform sequence is a second waveform sequence or a third waveform sequence; when the M waveform sequences are composed of the third waveform sequence, the preset S level hopping forms the N waveform sequences further including: At least one anti-interference waveform sequence subsequent to the waveform sequence, wherein the at least one anti-interference waveform sequence is a second waveform sequence or a first waveform sequence.
  • the multiple waveform sequences with the same level change interval are regarded as single-frequency interference, and the data content is misjudged.
  • the device transmitting the data needs to add an anti-interference waveform sequence after the plurality of waveform sequences having the same waveform change, so that the time interval of the level change is no longer a single repetition, and the data receiving device can recognize the level change as a normal data transmission.
  • single-frequency interference improve the accuracy of data transmission. For example, after two consecutive first waveform sequences, the device transmitting the data adds a second waveform sequence or a third waveform sequence, and the device receiving the data can determine that the two consecutive first waveform sequences are normal data, not Single frequency interference.
  • the N waveform sequences formed by the preset S level transitions are a third waveform sequence, a third waveform sequence, a third waveform sequence, and a third A waveform sequence, a second waveform sequence, a third waveform sequence, a second waveform sequence, and a third waveform sequence.
  • the N waveform sequences formed by the preset S level hopping are N waveform sequences corresponding to the data frame header; the detecting module 201 is further configured to continuously detect at the receiving port. After the S level jumps, the level jump is continuously detected on the receiving port; the obtaining module 202 is further configured to use the waveforms of the N waveform sequences formed by the duration identifying module 203 according to the preset S levels.
  • the time interval between the sequence characteristics and any two of the continuously detected S level transitions is calculated after the transmission duration of a waveform sequence, with the transmission duration as the duration of each waveform sequence, Determining L waveform sequences corresponding to the data after the data frame is continuously detected according to the level jump continuously detected at the receiving port and the waveform sequence feature; determining a bit sequence of the transmission data according to the waveform sequence corresponding to the transmission data, wherein The waveform sequence represents one of bit 1 and bit 0, and the other of bit 1 and bit 0 is represented in the second waveform sequence and the third waveform sequence, respectively.
  • the waveform sequence and the bit sequence corresponding to the transmission data are determined according to the transmission duration, thereby ensuring the authenticity and reliability of the data transmission, and avoiding data reception caused by the transmission duration error. error.
  • the terminal further includes: a determining module 204, configured to determine whether the transmission duration is a locally supported transmission duration, and if yes, trigger the obtaining module 202 to use the transmission duration as each The duration of the waveform sequence, based on the level transitions that continue to be detected at the receiving port and the waveform sequence characteristics, determine the L waveforms corresponding to the data frame.
  • a determining module 204 configured to determine whether the transmission duration is a locally supported transmission duration, and if yes, trigger the obtaining module 202 to use the transmission duration as each The duration of the waveform sequence, based on the level transitions that continue to be detected at the receiving port and the waveform sequence characteristics, determine the L waveforms corresponding to the data frame.
  • it is first determined whether the transmission duration is a locally supported transmission duration, and then continuously detects a level change at the receiving port and determines a waveform sequence, thereby ensuring the authenticity and accuracy of the data bits represented by the obtained waveform sequence.
  • Sexuality if it is not the locally supported transmission duration, it
  • the acquiring module 202 acquires waveform sequence features of N waveform sequences formed by preset S level hopping, and the detecting module 201 continuously detects S level hopping at the receiving port, and the duration identifying module 203 calculates a transmission duration of a waveform sequence based on a time interval between any two of the S level transitions that are continuously detected.
  • the terminal 200 determines the transmission duration by using the determination, and does not need to negotiate the transmission duration before the data transmission starts, and can also avoid data transmission and reception errors caused by different transmission durations of the two devices, thereby improving data transmission efficiency and accuracy.
  • the high level is relatively high, and the terminal 200 can be charged for a high level duration, thereby improving the charging efficiency.
  • This embodiment provides a transmission parameter acquisition method, which can be applied in communication between a master and a slave device.
  • the device that sends data can be either a master device or a slave device.
  • the device as the master device may be, for example, a terminal, and the device as the slave device may be, for example, an electronic payment device (for example, an electronic signature tool key, a smart card, a key card, a device, etc.).
  • the transmission parameter acquisition method provided in this embodiment is based on the transmission parameter acquisition method provided in Embodiment 1, and according to the transmission duration calculated in step S103, when the data to be transmitted is sent, the data to be transmitted is transmitted according to the transmission duration.
  • FIG. 3 is a flowchart of a method for acquiring a transmission parameter according to an embodiment of the present invention. As shown in FIG. 3, after the step S103, the method for acquiring a transmission parameter provided in this embodiment further includes:
  • Step S104 acquiring a bit sequence of data to be transmitted
  • Step S105 transmitting a waveform sequence corresponding to the bit sequence of the data to be transmitted according to the transmission duration T.
  • data transmission is performed by the first waveform sequence S, the second waveform sequence Y, and the third waveform sequence Z column.
  • the transmission duration of each waveform sequence is T, so that The transmission of data is more efficient, and the high level in the waveform sequence takes a longer total duration during the duration of the waveform sequence transmission, so the device receiving the transmitted data can better derive power from the received waveform sequence.
  • the transmission duration T of the waveform sequence determines the relevant transmission parameters (such as the baud rate) of the transmission data, so that the device can perform data transmission according to the determined parameters of the determined transmission data, thereby realizing the transmission parameter adaptation.
  • step S101 to step S103 refer to the description of Embodiment 1.
  • step S104 and step S105 are mainly described.
  • Step S104 acquiring a bit sequence of data to be transmitted
  • the data to be transmitted is encoded into a bit sequence represented by a logical zero and a logical one.
  • Step S105 Send a waveform sequence corresponding to the bit sequence of the data to be transmitted according to the transmission duration.
  • the receiving end calculates the transmission duration used by the transmitting end to transmit data according to step S103 (the corresponding baud rate can be obtained according to the transmission duration), and the data to be transmitted is calculated according to the calculated wave through steps S104-S105.
  • the special rate is returned to the transmitting end, so that the baud rate used by the receiving end to transmit data is consistent with the baud rate adopted by the transmitting end, and the baud rate is adaptive.
  • step S105 may specifically include: indicating, by the first waveform sequence X, the first data bit, and respectively representing the second data bit by the second waveform sequence Y and the third waveform sequence Z,
  • the first data bit is one of bit 1 and bit 0, and the second data bit is the other of bit 1 and bit 0; according to the bit sequence of the data to be transmitted, the waveform sequence corresponding to the bit in the bit sequence is continuously transmitted, wherein And when the at least two bits continuously transmitted are the second data bit, the waveform sequence corresponding to the first bit of the at least two bits continuously transmitted is the second waveform sequence Y, and the second bit and the subsequent bit correspond to The waveform sequence is a third waveform sequence Z.
  • the data to be transmitted may be represented by 1, 0. Specifically, it may represent 1 by X, 0 by Y or Z. 0, such as data 1010 may be represented by XYXY; or alternatively, 0 may be represented by X, 1 may be represented by Y, or 1 may be represented by Z. For example, data 1010 may be represented by ZYZY.
  • the continuously transmitting the waveform sequence corresponding to the bit in the bit sequence according to the bit sequence of the data to be sent may include: controlling the level of the sending port according to the waveform sequence corresponding to the bit in the bit sequence. The waveform and the characteristics of the waveform sequence are changed to send the data to be transmitted.
  • the transmitting end since the receiving end of the communication parties needs to obtain power from the transmitting end, the transmitting end needs to maintain a high level in the silent state, and jumps to a low level in different manners to indicate different waveform characteristics, thereby achieving transmission.
  • the purpose of the data therefore, when the data bits 1, 0, and Z represent the data bits 1, 0, it is necessary to use the second waveform sequence Y which remains high for the transmission duration T as much as possible to represent the data bits. This achieves higher power efficiency.
  • the silent state of the transmitting end is a continuous high level, the transmitting end cannot represent the bit data with a continuous Y, in case the receiving end recognizes the continuous Y as a silent state.
  • the waveform sequences YZ, YZZ, ... when at least two bits continuously transmitted are the second data bits, that is, if the second data bit is 1, when consecutively transmitting 11, 111, ..., 11111, ..., the waveform sequences YZ, YZZ, ... can be used.
  • YZZZZ indicates data bits; if the second data bit is 0, when consecutively transmitting 00, 000, ... 00000, ..., the waveform bits YZ, YZZ, ..., YZZZZ, ... can be used to represent the data bits.
  • FIG. 4 is a schematic structural diagram of a terminal according to the embodiment.
  • the terminal is provided with respect to Embodiment 2.
  • the terminal in this embodiment further includes: a bit sequence obtaining module 205 and a data sending module 206.
  • the difference between the terminal provided by the embodiment and the terminal provided in the embodiment 2 is described. For other parts, refer to the embodiment 2, and details are not described herein.
  • the bit sequence obtaining module 205 is configured to obtain a bit sequence of data to be transmitted
  • the data sending module 206 is configured to send a waveform sequence corresponding to the bit sequence of the data to be transmitted according to the transmission duration T.
  • the data transmission device uses the duration identification module 203 to calculate the baud rate used by the transmitting end to send data, and the bit sequence obtaining module 205 and the data sending module 206 return the data to be sent according to the calculated baud rate to the sending. Therefore, the baud rate used by the data transmission device to transmit data is consistent with the baud rate adopted by the transmitting end, and the baud rate is adaptive.
  • the data sending module 205 may send a waveform sequence corresponding to the bit sequence of the data to be transmitted by: expressing the first data bit in the first waveform sequence X, and respectively adopting the second waveform
  • the sequence Y and the third waveform sequence Z represent second data bits, 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; the bit sequence according to the data to be transmitted And continuously transmitting a waveform sequence corresponding to the bit in the bit sequence, wherein, when the at least two bits continuously transmitted are the second data bit, the waveform sequence corresponding to the first bit of the at least two bits continuously transmitted is the second
  • the waveform sequence Y, the second bit and the subsequent waveform corresponding to the bit sequence are the third waveform sequence Z.
  • the data to be transmitted may be represented by 1, 0. Specifically, it may represent 1 by X, 0 by Y or 0 by Z.
  • data 1010 may be represented by XYXY; or X may be represented by X.
  • Y is represented by 1 or Z is represented by 1, for example, data 1010 can be represented by ZYZY.
  • the data sending module 205 continuously sends the waveform sequence corresponding to the bit in the bit sequence according to the bit sequence of the data to be transmitted, the data may be controlled according to the waveform corresponding to the bit in the bit sequence. The waveform of the sequence and the characteristics of the waveform sequence are varied to transmit the data to be transmitted.
  • the transmitting end since the receiving end of the communication parties needs to obtain power from the transmitting end, the transmitting end needs to maintain a high level in the silent state, and jumps to a low level in different manners to indicate different waveform characteristics, thereby achieving transmission.
  • the purpose of the data therefore, when the data bits 1, 0, and Z represent the data bits 1, 0, it is necessary to use the second waveform sequence Y which remains high for the transmission duration T as much as possible to represent the data bits. This achieves higher power efficiency.
  • the quiet state of the transmitting end is continuously high, the transmitting end cannot represent the bit data with consecutive Ys, in case the receiving end will Continuous Y is identified as a silent state.
  • the waveform sequences YZ, YZZ, ... when at least two bits continuously transmitted are the second data bits, that is, if the second data bit is 1, when consecutively transmitting 11, 111, ..., 11111, ..., the waveform sequences YZ, YZZ, ... can be used.
  • YZZZZ indicates data bits; if the second data bit is 0, when consecutively transmitting 00, 000, ... 00000, ..., the waveform bits YZ, YZZ, ..., YZZZZ, ... can be used to represent the data bits.
  • the embodiment of the present invention further provides a computer readable storage medium having instructions stored therein, when the processor of the terminal executes the instruction, the terminal performs a transmission parameter acquisition method according to an embodiment of the present invention.
  • a "computer-readable medium” can be any apparatus that can contain, store, communicate, propagate, or transport a program for use in an instruction execution system, apparatus, or device, or in conjunction with the instruction execution system, apparatus, or device.
  • 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 by any one or combination of the following techniques well known in the art: having logic gates for implementing logic functions on data signals. Discrete logic circuits, application specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本发明公开了一种传输参数获取方法及终端,传输参数获取方法包括:获取预设的S个电平跳变形成的N个波形序列的波形序列特征,其中,各波形序列具有以下波形序列特征:各波形序列的传输持续时间相同且与波特率呈反比,第一波形序列高电平开始在持续时间内出现低电平,低电平在传输持续时间内所占的总时长不随波特率变化,第二波形序列在传输持续时间内持续高电平,第三波形序列低电平开始高电平结束,低电平在传输持续时间内占总时长不随波特率变化,预设的S个电平跳变为高电平跳变为低电平;在接收端口检测S个电平跳变;根据预设的及检测到的S个电平跳变中的任意两个的时间间隔计算波形序列的传输持续时间。

Description

传输参数获取方法及终端
相关申请的交叉引用
本申请基于申请号为201611051708.5,申请日为2016年11月24日,发明名称为传输参数获取方法及终端的中国专利以及申请号为201611051744.1,申请日为2016年11月24日,发明名称为一种传输参数自适应的数据传输方法和装置的中国专利申请提出,并要求这两件中国专利申请的优先权,这两件中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本发明涉及一种电子技术领域,尤其涉及一种传输参数获取方法及终端。
背景技术
电子设备之间的串行通讯方式通常是一个字符一个字符地传输,每个字符一位一位地传输,并且传输一个字符时,总是以“起始位”开始,以“停止位”结束,字符之间没有固定的时间间隔要求。两电子设备进行通信时,发送端的发送时钟和接收端的接收时钟有可能存在不同,而当发送时钟和接收时钟频率差异太大时,会引起接收端采样错位,造成接收错误,通讯效率降低。
另外,在仅使用两根线进行电子设备之间的通信时,通常在通信的过程中不能进行供电/充电,还需要外接其他电源,为电子设备的使用带来了极大的不便,因此,本领域亟需一种在仅使用两根线进行通信时可以进行供电/充电的方法。
发明内容
本发明旨在解决上述问题。
为达到上述目的,本发明的技术方案具体是这样实现的:
本发明的主要目的在于提供一种传输参数获取方法,包括:获取预设的S个电平跳变形成的N个波形序列的波形序列特征,其中,N为正整数,X为正整数且大于1,所述预设的S个电平跳变形成的N个波形序列中的各个波形序列分别为以下之一:第一波形序列、第二波形序列和第三波形序列,其中,所述第一波形序列、所述第二波形序列和所述第三波形序列具有以下波形序列特征:所述第一波形序列、所述第二波形序列以及所述第三波形序列的传输持续时间相同,所述传输持续时间与传输所述波形序列的波特率呈反比关系,且所述第一波形序列以高电平开始并在持续预设时间后跳变为低电平,以高电平结束,其中,所述第一波形序列中出现的低电平在所述传输持续时间内所占的总时长不随传输所述波形序列的波特率的变化而变化,所述第二波形序列在所述传输持续时间内持续高电平,所述第三波形序列以低电平开始,并以高电平结束,且所述第三波形序列中出现的低电平在所述传输持续时间内所占的总时长不随传输所述波形序列的波特率的变化而变化,所述预设的S个电平跳变均为从高电平跳变为低电平;在接收端口持续检测S个电平跳变,其中,持续检测到的所述S个电平跳变均为从高电平变为低电平;根据所述预设的S个电平跳变形成的N个波形序列的波形序列特征以及持续检测到的所述S个电平跳变中的任意两个电平跳变之间的时间间隔计算一个波形序列的传输持续时间。
本发明的另一主要目的在于提供一种终端,包括:获取模块,用于获取预设的S个电平跳变形成的N个波形序列的波形序列特征,其中,N为正整数,X为正整数且大于1,所述预设的S个电平跳变形成的N个波形序列中的各个波形序列分别为以下之一:第一波形序列、第二波形序列和第三波形序列,其中,所述第一波形序列、所述第二波形序列和所述第三波形序列具有以下波形序列特征:所述第一波形 序列、所述第二波形序列以及所述第三波形序列的传输持续时间相同,所述传输持续时间与传输所述波形序列的波特率呈反比关系,且所述第一波形序列以高电平开始并在持续预设时间后跳变为低电平,以高电平结束,其中,所述第一波形序列中出现的低电平在所述传输持续时间内所占的总时长不随传输所述波形序列的波特率的变化而变化,所述第二波形序列在所述传输持续时间内持续高电平,所述第三波形序列以低电平开始,并以高电平结束,且所述第三波形序列中出现的低电平在所述传输持续时间内所占的总时长不随传输所述波形序列的波特率的变化而变化,所述预设的S个电平跳变均为从高电平跳变为低电平;检测模块,用于在接收端口持续检测S个电平跳变,其中,持续检测到的所述S个电平跳变均为从高电平变为低电平;持续时间识别模块,用于根据所述预设的S个电平跳变形成的N个波形序列的波形序列特征以及持续检测到的所述S个电平跳变中的任意两个电平跳变之间的时间间隔计算一个波形序列的传输持续时间。
由上述本发明提供的技术方案可以看出,本发明提供了一种传输参数获取方法及终端,可通过预设的波形序列及波形序列的特征,和接收端口检测到的电平变化,获得传输持续时间,从而保证每次数据传输时,发送端与接收端对传输持续时间的取值一致,保证了每次数据传输的稳定性与准确性,避免了频率差异而造成的波形序列确定错误,有效防止当发送时钟和接收时间参数差异太大时,引起接收端采样错位,造成接收错误,通讯效率降低的技术问题。此外,发送端与接收端之间可以仅使用两线完成数据的收发,并在数据的收发过程中,同时完成了两设备间的供电/充电,并且,数据传输时的波形序列中高电平占比较高,极大的提高了供电/充电效率,因此,采用本发明提供的传输参数获取方法、终端可以有效减小电子设备的体积,提高电子设备的充电效率。
附图说明
为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域的普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他附图。
图1A为本发明实施例1提供的传输参数获取方法的流程图;
图1B为本发明实施例1提供的各个波形序列的示意图;
图1C为本发明实施例1提供的可选实施方式的第一波形序列的示意图;
图1D为本发明实施例1提供的可选实施方式的一个预设的波形序列的示意图;
图1E为本发明实施例1提供的可选实施方式的一个检测到的电平跳变的示意图;
图1F为本发明实施例1提供的可选实施方式的前M个波形序列由第一波形序列组成的示意图;
图1G为本发明实施例1提供的可选实施方式的前M个波形序列包括第一波形序列和第三波形序列的示意图;
图1H为本发明实施例1提供的N=8的波形序列的示意图;
图2A为本发明实施例2提供的终端的结构示意图;
图2B为本发明实施例2提供的各个波形序列的示意图;
图2C为本发明实施例2提供的可选实施方式的一个预设的波形序列的示意图;
图2D为本发明实施例2提供的可选实施方式的一个检测到的电平跳变的示意图;
图3为本发明实施例3提供的一种传输参数获取方法的流程图;以及
图4为本发明实施例4提供的一种终端的结构示意图。
具体实施方式
下面结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明的保护范围。
下面将结合附图和实施例对本发明进行详细描述。
实施例1
本实施例提供一种传输参数获取方法,该方法可以应用在主从设备之间的通信中。获取传输参数的设备可以为从设备,也可以为主设备。作为主设备的装置例如可以是终端,作为从设备的装置例如可以是电子支付设备(例如,电子签名工具key,智能卡,key卡合一设备等)。
图1A为本发明实施例提供的一种传输参数获取方法的流程图,如图1A所示,本实施例提供的一种传输参数获取方法主要包括以下步骤:
步骤101,获取预设的S个电平跳变形成的N个波形序列的波形序列特征,其中,N为正整数,S为正整数且大于1,预设的S个电平跳变形成的N个波形序列中的各个波形序列分别为以下之一:第一波形序列、第二波形序列和第三波形序列,其中,第一波形序列、第二波形序列和第三波形序列具有以下波形序列特征:第一波形序列、第二波形序列以及第三波形序列的传输持续时间T相同,传输持续时间T与传输波形序列的波特率呈反比关系,且第一波形序列以高电平开始并在持续预设时间T1后跳变为低电平,以高电平结束,其中,第一波形序列中出现的低电平在传输持续时间T内所占的总时长不随传输波形序列的波特率的变化而变化,第二波形序列在传输持续时间T内持续高电平,第三波形序列以低电平开始,并以高电平结束,且第三波形序列中出现的低电平在传输持续时间T内所占的总时长不随传输波形序列的波特率的变化而变化,预设的S个电平跳变均为从高电平跳变为低电平。
本实施例中,第一波形序列、第二波形序列及第三波形序列可以采用如图1B所示的方式,需要说明的是,第一波形序列及第三波形序列可以存在多种方式,例如波形序列中可以包含多次高电平跳变为低电平的跳变,并不仅限于图1B所示的方式。另外,在一次数据传输过程中,所有的第一波形序列具有相同的波形序列特征,不存在一次数据传输过程中存在两种或两种以上的第一波形序列的情况,所有的第三波形序列也具有相同的波形序列特征,不存在一次数据传输过程中存在两种或两种以上的第三波形序列的情况。第一波形序列以高电平开始并以高电平结束,第二波形序列持续高电平,第三波形序列以低电平开始并以高电平结束,三种波形序列差异较大,波形序列的识别更为容易。
本步骤中,传输持续时间与传输波形序列的波特率呈反比关系,且第一波形序列中出现的低电平在传输持续时间内所占的总时长不随传输波形序列的波特率的变化而变化;第三波形序列中出现的低电平在传输持续时间内所占的总时长不随传输波形序列的波特率的变化而变化。例如,以第一波形序列为例,当波特率为50Mbps时,第一波形序列的传输持续时间为20ns,当波特率为25Mbps时,第一波形序列的传输持续时间为40ns,即传输持续时间与传输波形序列的波特率呈反比关系,传输持续时间越长,波特率越小,即传输速度越慢,传输持续时间越短,波特率越大,即传输速度越快。
第一波形序列中出现的低电平在传输持续时间内所占的总时长不随传输波形序列的波特率的变化而变化,即如图1C所示,当第一波形序列的波特率为50Mbps时,第一波形序列的传输持续时间为20ns,其低电平的持续时间为8ns,当波特率为25Mbps时,第一波形序列的传输持续时间为40ns,其低电平的持续时间仍为8ns。第三波形序列中出现的低电平在传输持续时间内所占的总时长不随传输波形序列的波特率的变化而变化,即当第三波形序列的波特率为50Mbps时,第三波形序列的传输持续时间为20ns, 其低电平的持续时间为8ns,当波特率为25Mbps时,第三波形序列的传输持续时间为40ns,其低电平的持续时间仍为8ns。在数据传输与供电同时进行的情况下,低电平持续时间所占的总时长的时间越短,数据传输过程中供电或取电时长越长,即波特率为50Mbps的情况下,第一波形序列或第三波形序列的传输持续时间为20ns,其低电平的持续时间为8ns,第一波形序列或第三波形序列的供电或取电时长为60%,波特率为25Mbps的情况下,第一波形序列或第三波形序列的传输持续时间为40ns,其低电平持续时间为8ns,第一波形序列或第三波形序列的供电或取电时长为80%,即在低电平的持续时间固定的情况下,波特率越低,供电或取电效率越高,为提高供电效率,可适当降低波特率。
本步骤中,例如,预先设定S=4,N=5,5个波形序列分别为第一波形序列、第一波形序列、第一波形序列、第二波形序列和第三波形序列,则获取预设的4个电平跳变形成的5个波形序列的波形序列特征为如图1D所示,即:在高电平持续T1时间后,跳变为低电平(第一次跳变),在T-T1的时间内,低电平持续固定时间后恢复为高电平;在高电平持续T1时间后,跳变为低电平(第二次跳变),在T-T1的时间内,低电平持续固定时间后恢复为高电平;在高电平持续T1时间后,跳变为低电平(第三次跳变),在T-T1的时间内,低电平持续固定时间后恢复为高电平;持续T时间的高电平;跳变为低电平(第四次跳变),以高电平结束(低电平与高电平所占时长之和为T)。
步骤102,在接收端口持续检测S个电平跳变,其中,持续检测到的S个电平跳变均为从高电平变为低电平。
本步骤中,检测电平跳变的进行数据接收的设备可以对接收端口的电平进行连续采样以获得接收端口的电平的变化,采样时使用的采样频率应当高于预设的最低标准,保证采样得到的接收端口的电平变化的真实性,也可以仅获取接收端口的电平跳变为高电平跳变为低电平的时刻。
步骤103,根据预设的S个电平跳变形成的N个波形序列的波形序列特征以及持续检测到的S个电平跳变中的任意两个电平跳变之间的时间间隔计算一个波形序列的传输持续时间。
本步骤中,例如,S=4,N=5,持续检测的4个电平跳变如图1E所示,则可根据步骤101中得到的预设的4个电平跳变形成的5个波形序列的波形序列特征,以及任意两个电平跳变之间的时间间隔计算出一个波形序列的传输持续时间,如,参照图1D所示,第一次跳变与第二次跳变之间的时间间隔为T-T1+T1=T,即一个波形序列的传输持续时间,第一次跳变与第三次跳变之间的时间间隔为T-T1+T1+T-T1+T1=2T,即两个波形序列的传输持续时间,第三次跳变与第四次跳变之间的时间间隔为T-T1+T,在已知T1与T的比例关系的情况下,即可计算得到一个波形序列的传输持续时间。
在本实施例中,利用相同跳变的时刻之间的时间间隔计算得到一个波形序列的传输持续时间,计算方式简单,易于操作且准确率高。
在通信过程中,通信双方的接收端不能确定发送端发送数据所采用的通信速率,采用本实施例提供的方法,接收端可以在不确定发送端所采用的通信速率的情况下,来判断检测到的S个电平跳变所形成的N个波形序列是否为数据帧头。在本实施例的一个可选实施方式中,步骤102与步骤103之间,还可以包括步骤102a:
判断持续检测到的S个电平跳变中的全部的时间间隔中的每一个时间间隔是否均与预设的S个电平跳变形成的N个波形序列中包含的S个电平跳变中的全部的时间间隔中对应的时间间隔符合同一预设关系,如果是,执行根据预设的S个电平跳变形成的N个波形序列的波形序列特征以及持续检测到的S个电平跳变中的任意两个电平跳变之间的时间间隔计算一个波形序列的传输持续时间的步骤。在数据传输的过程中,发送数据的设备与接收数据的设备需要约定好S个电平跳变形成的N个波形序列的波形特征, 以此来表示数据传输的开始,即S个电平跳变形成的N个波形序列可以为数据帧头,该数据帧头为通信双方预先约定好的,由此,可以使通信双方中的接收端识别信号的起始,为后续根据数据帧头计算一个波形序列的持续传输时间T提供基础。
如图1D和1E所示,当N=5,S=4,判断检测到的4个电平跳变中的全部的时间间隔(如图1D所示)中的每一个时间间隔是否均与预设的4个电平跳变中的全部的时间间隔(如图1C所示)中对应的时间间隔符合同一预设关系,其中,同一预设关系是:例如,检测到的第一个电平跳变与第二个电平跳变之间的时间间隔为50ns,预设的第一个电平跳变与第二个电平跳变之间的时间间隔为100ns,检测到的电平跳变中的时间间隔与预设的对应的跳变的时间间隔为0.5倍关系;检测到的检测到的第二个电平跳变与第三个电平跳变之间的时间间隔为50ns,预设的第二个电平跳变与第三个电平跳变之间的时间间隔为100ns,检测到的电平跳变中的时间间隔与预设的对应的跳变的时间间隔为0.5倍关系;即检测到的第W个电平跳变与第W+1个(其中,W为正整数,且W+1≤S)电平跳变的时间间隔,与预设的第W个电平跳变与第W+1个电平跳变的时间间隔均为0.5倍关系;检测到的第一个电平跳变与第三个电平跳变之间的时间间隔为100ns,预设的第一个电平跳变与第三个电平跳变之间的时间间隔为200ns,检测到的电平跳变中的时间间隔与预设的对应的跳变的时间间隔为0.5倍关系,即检测到的第W个电平跳变与第W+2个(其中,W为正整数,且Y+1≤S)电平跳变的时间间隔,与预设的第W个电平跳变与第W+2个电平跳变的时间间隔均为0.5倍关系;以此类推,当检测到的所有电平跳变中的时间间隔与其预设的对应的跳变的时间间隔均为0.5倍关系,即可视为同一预设关系,可确定连续传输的5个波形序列为预设的数据帧头对应的5个波形序列。当持续检测到的S个电平跳变中的全部的时间间隔中的每一个时间间隔是否均与预设的S个电平跳变形成的N个波形序列中包含的S个电平跳变中的全部的时间间隔中对应的时间间隔均符合同一预设关系时,可将持续检测到的S个电平跳变确定为数据帧头,将数据帧头确定后再计算一个波形序列的传输持续时间,可保障传输持续时间计算的准确性,提高传输效率。
在本实施例的一种可选实施方式中,波形序列的特征还包括:第一波形序列中出现的低电平在传输持续时间内所占的总时长小于持续时间的二分之一;和/或,第三波形序列中出现的低电平在传输持续时间内所占的总时长小于持续时间的二分之一。在数据传输与供电同时进行的情况下,低电平持续时间所占的总时长越短,数据传输过程中供电或取电时长越长,供电/取电效率越高。
在本实施例的一种可选实施方式中,波形序列的特征还包括:第三波形序列在传输持续时间内仅出现一次由低电平变为高电平的电平跳变,并以高电平结束;第一波形序列以高电平开始并在传输持续时间内仅出现一次由高电平变为低电平的跳变。第一波形序列或第三波形序列在传输持续时间内仅有一次跳变,第一波形序列或第三波形序列的发送和接收更加容易,低电平所占传输持续时间的比例更低,在数据传输与供电同时进行的情况下,供电/取电效率越高。
在本实施例的一种可选实施方式中,预设的数据帧头对应的N个波形序列至少包括M个波形序列,M个波形序列为预设的数据帧头对应的N个波形序列中的前M个波形序列,其中,M为正整数,且M≥2;M个波形序列由第一波形序列组成;或者,M个波形序列由第三波形序列组成;或者,M个波形序列包括至少一个第一波形序列和至少一个第三波形序列。以N=5,M=2,预设的数据帧头对应的5个波形序列的前2个波形序列由2个第一波形序列组成为例,如图1F所示,前2个波形序列中第1个波形序列初次出现高电平跳变至低电平的时间与第2个波形序列初次出现高电平跳变为低电平之间的时间间隔则为第一波形序列的传输持续时间;或者,以N=5,M=2,预设的数据帧头对应的5个波形序列的前2个波形序列包括第一波形序列和第三波形序列为例,如图1G所示,第1个波形序列为第一波形序列,第2个 波形序列为第三波形序列,当T1=T*1/3,两次跳变的时间间隔即为T*2/3,可以根据该时间间隔计算出传输持续时间T。可以看出,当M个波形序列由第一或第三波形序列组成,或包括第一和第三波形序列时,由于第一和第三波形序列均包括电平跳变,传输持续时间的计算更为简单快速,而根据传输持续时间T即可得到该波形序列的波特率,即可得到当前数据传输的传输参数。
进一步地,M个波形序列由第一波形序列组成时,预设的数据帧头对应的N个波形序列还包括:在M个波形序列之后的至少1个抗干扰波形序列,其中,至少1个抗干扰波形序列为第二波形序列或第三波形序列;M个波形序列由第三波形序列组成时,预设的数据帧头对应的N个波形序列还包括:在M个波形序列之后的至少1个抗干扰波形序列,其中,至少1个抗干扰波形序列为第二波形序列或第一波形序列。当M个波形序列均为第一波形序列或第三波形序列时,为避免接收数据的设备将连续的电平变化时间间隔相同的多个波形序列视为单频干扰而对数据内容产生误判,发送数据的设备在波形变化相同的多个波形序列后需添加抗干扰波形序列,使电平变化的时间间隔不再单一重复,数据接收设备可将该电平变化识别为正常的数据传输,而不是单频干扰,提高数据传输的正确率。例如在连续两个第一波形序列之后,发送数据的设备添加一个第二波形序列或一个第三波形序列,接收数据的设备即可判断出连续的两个第一波形序列为正常数据,并不是单频干扰。
在本实施例的一种可选实施方式中,N=8,如图1H所示,N个波形序列依次为第三波形序列、第三波形序列、第三波形序列、第三波形序列、第二波形序列、第三波形序列、第二波形序列和第三波形序列。
下面,以本可选实施方式中N=8为例,简要说明计算传输持续时间的方法:
步骤一:获取预设的6个电平跳变形成的8个波形序列的波形序列特征,8个波形序列依次为:第三波形序列、第三波形序列、第三波形序列、第三波形序列、第二波形序列、第三波形序列、第二波形序列和第三波形序列;本实施方式中,第一波形序列、第二波形序列和第三波形序列具有以下波形序列特征:第一波形序列、第二波形序列以及第三波形序列的传输持续时间T相同,传输持续时间与传输波形序列的波特率呈反比关系,且第一波形序列以高电平开始并在持续预设时间后跳变为低电平,以高电平结束,其中,第一波形序列中出现的低电平在传输持续时间内所占的总时长不随传输波形序列的波特率的变化而变化,第二波形序列在传输持续时间内持续高电平,第三波形序列以低电平开始,并以高电平结束,且第三波形序列中出现的低电平在传输持续时间内所占的总时长不随传输波形序列的波特率的变化而变化,其中,预设的S个电平跳变均为从高电平跳变为低电平;
步骤二:在接收端口持续检测6个电平跳变,其中,持续检测到的6个电平跳变均为从高电平变为低电平;
步骤三:根据预设的6个电平跳变形成的8个波形序列的波形序列特征以及持续检测到的6个电平跳变中的任意两个电平跳变之间的时间间隔计算一个波形序列的传输持续时间。检测到的6个电平跳变中第一个电平跳变与第二个电平跳变之间的时间间隔为50ns,则传输持续时间为50ns,第四次电平跳变与第五次电平跳变之间的时间间隔为100ns,则传输持续时间为50ns。
以本可选实施方式中预设的8个波形序列及波形序列的特征计算传输持续时间,计算方式和数据的发送方式和接收方式均较为简单。
在本实施例的一种可选实施方式中,预设的S个电平跳变形成的N个波形序列为数据帧头对应的N个波形序列;在接收端口持续检测S个电平跳变之后,该方法还可以包括:继续在接收端口持续检测电平跳变;在根据预设的S个电平跳变形成的N个波形序列的波形序列特征以及持续检测到的S个电平跳 变中的任意两个电平跳变之间的时间间隔计算一个波形序列的传输持续时间之后,该方法还可以包括:以传输持续时间作为每个波形序列的持续时间,根据继续在接收端口持续检测到的电平跳变以及波形序列特征确定数据帧头之后传输数据对应的波形序列;根据传输数据对应的波形序列确定传输数据的比特序列,其中,以第一波形序列表示比特1和比特0中的一个,分别以第二波形序列和第三波形序列表示比特1和比特0中的另一个。在本可选实施方式中,根据继续在接收端口持续检测到的电平跳变以及波形序列特征确定数据帧头之后传输数据对应的波形序列包括但不限于以下几种方式:方式一:以计算得到的传输持续时间作为每个波形序列的传输持续时间,以传输持续时间为单位,接收每个传输持续时间内的电平变化,根据每个传输持续时间内的电平变化以及波形序列特征确定该传输持续时间内对应的波形序列;方式二:接收端口持续检测电平变化,以传输持续时间为单位,将检测到的电平变化划分为至少一个波形序列,根据波形序列特征确定每个波形序列。以方式一为例,计算得到的传输持续时间为20ns,接收一个20ns内的电平变化,在该传输持续时间内,6.67ns时出现高电平跳变为低电平的电平跳变,则根据第一波形序列以高电平开始,高电平持续预设时间后跳变为低电平,T1=T*1/3的波形特征,则可确定该第一个20ns内的波形序列为第一波形序列,该波形序列传输的数据比特为1,继续接收下一个20ns内的电平变化,并得到该传输持续时间的数据比特。以方式二为例,计算得到的传输持续时间为20ns,继续在接收端口持续检测电平跳变,将接收到的电平跳变以20ns为单位进行划分,得到每个传输持续时间内的电平变化,例如接收端口持续检测的电平跳变被划分为5个传输持续时间,其中,第三个传输持续时间中,6.67ns时出现高电平跳变为低电平的电平跳变,则根据第一波形序列以高电平开始,高电平持续预设时间后跳变为低电平,T1=T*1/3的波形特征,则可确定该第一个20ns内的波形序列为第一波形序列,该波形序列传输的数据比特为1。在本实施例中,在得到传输持续时间之后,根据传输持续时间确定传输数据对应的波形序列和比特序列,保障了数据传输的真实性和可靠性,避免因传输持续时间错误而导致的数据接收错误。
在本实施例的一种可选实施方式中,在以传输持续时间作为每个波形序列的持续时间,根据继续在接收端口持续检测到的电平跳变以及波形序列特征确定数据帧头之后传输数据对应的波形序列之前,方法还包括:判断传输持续时间是否为本地支持的传输持续时间,如果是,则执行以传输持续时间作为每个波形序列的持续时间,根据继续在接收端口持续检测到的电平跳变以及波形序列特征确定数据帧头之后传输数据对应的波形序列的步骤。可选地,如果不是,则不再检测接收端口的电平变化,或检测到接收端口的电平变化后,不再确定传输的波形序列。在本可选实施方式中,先判断传输持续时间是否为本地支持的传输持续时间再在接收端口持续检测电平变化并确定波形序列,可保障得到的波形序列所代表数据比特的真实性和准确性,若不是本地支持的传输持续时间则不继续检测电平变化或确定波形序列,可避免对设备运算能力的浪费。
本实施例的传输参数获取方法,获取预设的S个电平跳变形成的N个波形序列的波形序列特征,在接收端口持续检测S个电平跳变,根据持续检测到的S个电平跳变中的任意两个电平跳变之间的时间间隔计算出一个波形序列的传输持续时间。通过该确定传输持续时间的方法,无须在数据传输开始前协商传输持续时间,也可避免双方设备由于传输持续时间不同而导致的数据收发错误,提高了数据传输效率和准确度。且本方法中,高电平占比较高,对数据进行接收的设备可以在高电平持续时间内进行充电,提高了充电效率。
实施例2
本实施例提供了一种终端,该终端用于实施实施例1中的传输参数获取方法。在本实施例中,终端可以是PC、iPAD、手机、电子签名工具key,智能卡,key卡合一设备等。
在本实施例中,仅对该终端中包含的各个模块以及各个模块的功能进行描述,其余相关部分可以参见实施例1,在此不再赘述。
图2A是本实施例的一种终端200的结构示意图,该终端包括:检测模块201、获取模块202和持续时间识别模块203。
在本实施例中,获取模块202,用于获取预设的S个电平跳变形成的N个波形序列的波形序列特征,其中,N为正整数,S为正整数且大于1,预设的S个电平跳变形成的N个波形序列中的各个波形序列分别为以下之一:第一波形序列、第二波形序列和第三波形序列,其中,第一波形序列、第二波形序列和第三波形序列具有以下波形序列特征:第一波形序列、第二波形序列以及第三波形序列的传输持续时间相同,传输持续时间与传输波形序列的波特率呈反比关系,且第一波形序列以高电平开始并在持续预设时间后跳变为低电平,以高电平结束,其中,第一波形序列中出现的低电平在传输持续时间内所占的总时长不随传输波形序列的波特率的变化而变化,第二波形序列在传输持续时间内持续高电平,第三波形序列以低电平开始,并以高电平结束,且第三波形序列中出现的低电平在传输持续时间内所占的总时长不随传输波形序列的波特率的变化而变化,预设的S个电平跳变均为从高电平跳变为低电平。
本实施例中,如图2B所示,第一波形序列、第二波形序列及第三波形序列的示意图如图2B所示,需要说明的是,第一波形序列及第三波形序列可以存在多种方式,例如波形序列中可以包含多次高电平跳变为低电平的跳变,并不仅限于图2B所示的方式。另外,在一次数据传输过程中,所有的第一波形序列具有相同的波形序列特征,不存在一次数据传输过程中存在两种或两种以上的第一波形序列的情况,所有的第三波形序列也具有相同的波形序列特征,不存在一次数据传输过程中存在两种或两种以上的第三波形序列的情况。第一波形序列以高电平开始并以高电平结束,第二波形序列持续高电平,第三波形序列以低电平开始并以高电平结束,三种波形序列差异较大,波形序列的识别更为容易。
本实施例中,传输持续时间与传输波形序列的波特率呈反比关系,且第一波形序列中出现的低电平在传输持续时间内所占的总时长不随传输波形序列的波特率的变化而变化;第三波形序列中出现的低电平在传输持续时间内所占的总时长不随传输波形序列的波特率的变化而变化。例如,以第一波形序列为例,当波特率为50Mbps时,第一波形序列的传输持续时间为20ns,当波特率为25Mbps时,第一波形序列的传输持续时间为40ns,即传输持续时间与传输波形序列的波特率呈反比关系,传输持续时间越长,波特率越小,即传输速度越慢,传输持续时间越短,波特率越大,即传输速度越快。
第一波形序列中出现的低电平在传输持续时间内所占的总时长不随传输波形序列的波特率的变化而变化,当第一波形序列的波特率为50Mbps时,第一波形序列的传输持续时间为20ns,其低电平的持续时间为8ns,当波特率为25Mbps时,第一波形序列的传输持续时间为40ns,其低电平的持续时间仍为8ns。第三波形序列中出现的低电平在传输持续时间内所占的总时长不随传输波形序列的波特率的变化而变化,即当第三波形序列的波特率为50Mbps时,第三波形序列的传输持续时间为20ns,其低电平的持续时间为8ns,当波特率为25Mbps时,第三波形序列的传输持续时间为40ns,其低电平的持续时间仍为8ns。在数据传输与供电同时进行的情况下,低电平持续时间所占的总时长的时间越短,数据传输过程中供电或取电时长越长,即波特率为50Mbps的情况下,第一波形序列或第三波形序列的传输持续时间为20ns,其低电平的持续时间为8ns,第一波形序列或第三波形序列的供电或取电时长为60%,波特率为25Mbps的情况下,第一波形序列或第三波形序列的传输持续时间为40ns,其低电平持续时间为8ns,第一波形序 列或第三波形序列的供电或取电时长为80%,即在低电平的持续时间固定的情况下,波特率越低,供电或取电效率越高,为提高供电效率,可适当降低波特率。
本实施例中,例如,预先设定X=4,N=5,5个波形序列分别为第一波形序列、第一波形序列、第一波形序列、第二波形序列和第三波形序列,则获取预设的4个电平跳变形成的5个波形序列的波形序列特征为如图2C所示,即:在高电平持续T1时间后,跳变为低电平(第一次跳变),在T-T1的时间内,低电平持续固定时间后恢复为高电平;在高电平持续T1时间后,跳变为低电平(第二次跳变),在T-T1的时间内,低电平持续固定时间后恢复为高电平;在高电平持续T1时间后,跳变为低电平(第三次跳变),在T-T1的时间内,低电平持续固定时间后恢复为高电平;持续T时间的高电平;跳变为低电平(第四次跳变),以高电平结束(低电平与高电平所占时长之和为T)。
检测模块201,用于在接收端口持续检测S个电平跳变,其中,持续检测到的S个电平跳变均为从高电平变为低电平。
持续时间识别模块203,用于根据预设的S个电平跳变形成的N个波形序列的波形序列特征以及持续检测到的S个电平跳变中的任意两个电平跳变之间的时间间隔计算一个波形序列的传输持续时间。
本实施例中,例如,X=4,N=5,检测模块201持续检测的4个电平跳变如图2D所示,则可根据获取模块202中得到的预设的4个电平跳变形成的5个波形序列的波形序列特征,以及任意两个电平跳变之间的时间间隔计算出一个波形序列的传输持续时间,如,参照图2C所示,第一次跳变与第二次跳变之间的时间间隔为T-T1+T1=T,即一个波形序列的传输持续时间,第一次跳变与第三次跳变之间的时间间隔为T-T1+T1+T-T1+T1=2T,即两个波形序列的传输持续时间,第三次跳变与第四次跳变之间的时间间隔为T-T1+T,在已知T1与T的比例关系的情况下,即可计算得到一个波形序列的传输持续时间。
在本实施例中,终端200利用相同跳变的时刻之间的时间间隔计算得到一个波形序列的传输持续时间,计算方式简单,易于操作且准确率高。
在本实施例的一个可选实施方式中,在持续时间识别模块203根据预设的S个电平跳变形成的N个波形序列的波形序列特征以及持续检测到的S个电平跳变中的任意两个电平跳变之间的时间间隔计算一个波形序列的传输持续时间之前,持续时间识别模块203,还用于判断持续检测到的S个电平跳变中的全部的时间间隔中的每一个时间间隔是否均与预设的S个电平跳变形成的N个波形序列中包含的S个电平跳变中的全部的时间间隔中对应的时间间隔符合同一预设关系,如果是,触发执行根据预设的S个电平跳变形成的N个波形序列的波形序列特征以及持续检测到的S个电平跳变中的任意两个电平跳变之间的时间间隔计算一个波形序列的传输持续时间的操作。当持续检测到的S个电平跳变中的全部的时间间隔中的每一个时间间隔是否均与预设的S个电平跳变形成的N个波形序列中包含的S个电平跳变中的全部的时间间隔中对应的时间间隔均符合同一预设关系时,传输持续时间持续模块203可将持续检测到的S个电平跳变确定为数据帧头,将数据帧头确定后再由传输持续时间持续模块203计算一个波形序列的传输持续时间,可保障传输持续时间计算的准确性,提高传输效率。
在本实施例的一个可选实施方式中,波形序列的特征还包括:第一波形序列中出现的低电平在传输持续时间内所占的总时长小于持续时间的二分之一;和/或,第三波形序列中出现的低电平在传输持续时间内所占的总时长小于持续时间的二分之一。在数据传输与供电同时进行的情况下,低电平持续时间所占的总时长越短,数据传输过程中供电或取电时长越长,供电/取电效率越高。
在本实施例的一个可选实施方式中,波形序列的特征还包括:第三波形序列在传输持续时间内仅出现一次由低电平变为高电平的电平跳变,并以高电平结束;第一波形序列以高电平开始并在传输持续时 间内仅出现一次由高电平变为低电平的跳变。第一波形序列或第三波形序列在传输持续时间内仅有一次跳变,第一波形序列或第三波形序列的发送和接收更加容易,低电平所占传输持续时间的比例更低,在数据传输与供电同时进行的情况下,供电/取电效率越高。
在本实施例的一个可选实施方式中,预设的S个电平跳变形成的N个波形序列至少包括M个波形序列,M个波形序列为预设的数据帧头对应的N个波形序列中的前M个波形序列,其中,M为正整数,且M≥2;M个波形序列由第一波形序列组成;或者,M个波形序列由第三波形序列组成;或者,M个波形序列包括至少一个第一波形序列和至少一个第三波形序列。当M个波形序列由第一或第三波形序列组成,或包括第一和第三波形序列时,由于第一和第三波形序列均包括电平跳变,传输持续时间的计算更为简单快速,而根据传输持续时间T即可得到该波形序列的波特率,即可得到当前数据传输的传输参数。
进一步地,M个波形序列由第一波形序列组成时,预设的S个电平跳变形成的N个波形序列还包括:在M个波形序列之后的至少1个抗干扰波形序列,其中,至少1个抗干扰波形序列为第二波形序列或第三波形序列;M个波形序列由第三波形序列组成时,预设的S个电平跳变形成的N个波形序列还包括:在M个波形序列之后的至少1个抗干扰波形序列,其中,至少1个抗干扰波形序列为第二波形序列或第一波形序列。当M个波形序列均为第一波形序列或第三波形序列时,为避免接收数据的设备将连续的电平变化时间间隔相同的多个波形序列视为单频干扰而对数据内容产生误判,发送数据的设备在波形变化相同的多个波形序列后需添加抗干扰波形序列,使电平变化的时间间隔不再单一重复,数据接收设备可将该电平变化识别为正常的数据传输,而不是单频干扰,提高数据传输的正确率。例如在连续两个第一波形序列之后,发送数据的设备添加一个第二波形序列或一个第三波形序列,接收数据的设备即可判断出连续的两个第一波形序列为正常数据,并不是单频干扰。
在本实施例的一个可选实施方式中,N=8,预设的S个电平跳变形成的N个波形序列依次为第三波形序列、第三波形序列、第三波形序列、第三波形序列、第二波形序列、第三波形序列、第二波形序列和第三波形序列。
在本实施例的一个可选实施方式中,预设的S个电平跳变形成的N个波形序列为数据帧头对应的N个波形序列;检测模块201,还用于在接收端口持续检测S个电平跳变之后,继续在接收端口持续检测电平跳变;获取模块202,还用于在持续时间识别模块203根据预设的S个电平跳变形成的N个波形序列的波形序列特征以及持续检测到的S个电平跳变中的任意两个电平跳变之间的时间间隔计算一个波形序列的传输持续时间之后,以传输持续时间作为每个波形序列的持续时间,根据继续在接收端口持续检测到的电平跳变以及波形序列特征确定数据帧头之后传输数据对应的L个波形序列;根据传输数据对应的波形序列确定传输数据的比特序列,其中,以第一波形序列表示比特1和比特0中的一个,分别以第二波形序列和第三波形序列表示比特1和比特0中的另一个。在本实施例中,在得到传输持续时间之后,根据传输持续时间确定传输数据对应的波形序列和比特序列,保障了数据传输的真实性和可靠性,避免因传输持续时间错误而导致的数据接收错误。
在本实施例的一个可选实施方式中,终端还包括:判决模块204,用于判断传输持续时间是否为本地支持的传输持续时间,如果是,则触发获取模块202以传输持续时间作为每个波形序列的持续时间,根据继续在接收端口持续检测到的电平跳变以及波形序列特征确定数据帧头之后传输数据对应的L个波形。在本可选实施方式中,先判断传输持续时间是否为本地支持的传输持续时间再在接收端口持续检测电平变化并确定波形序列,可保障得到的波形序列所代表数据比特的真实性和准确性,若不是本地支持的传输持续时间则不继续检测电平变化或确定波形序列,可避免对设备运算能力的浪费。
本实施例的终端200,获取模块202获取预设的S个电平跳变形成的N个波形序列的波形序列特征,检测模块201在接收端口持续检测S个电平跳变,持续时间识别模块203根据持续检测到的S个电平跳变中的任意两个电平跳变之间的时间间隔计算出一个波形序列的传输持续时间。终端200通过该确定传输持续时间,无须在数据传输开始前协商传输持续时间,也可避免双方设备由于传输持续时间不同而导致的数据收发错误,提高了数据传输效率和准确度。且本发明提供的实施例中,高电平占比较高,对终端200可以在高电平持续时间内进行充电,提高了充电效率。
实施例3
本实施例提供一种传输参数获取方法,该方法可以应用在主从设备之间的通信中。发送数据的设备可以为主设备,也可以为从设备。作为主设备的装置例如可以是终端,作为从设备的装置例如可以是电子支付设备(例如,电子签名工具key,智能卡,key卡合一设备等)。
本实施例提供的传输参数获取方法在实施例1提供的传输参数获取方法的基础上,根据步骤S103计算得到的传输持续时间,在发送待发送数据时,按照该传输持续时间发送待发送数据。
图3为本发明实施例提供的一种传输参数获取方法的流程图,如图3所示,本实施例提供的传输参数获取方法在步骤S103之后,还包括:
步骤S104,获取待发送数据的比特序列;
步骤S105,按照传输持续时间T发送待发送数据的比特序列对应的波形序列。
采用本实施例提供的方法,通过第一波形序列S、第二波形序列Y以及第三波形序Z列进行数据传输,该种数据传输方式中,各个波形序列的传输持续时间均为T,使数据的传输更加高效,且波形序列中的高电平在波形序列传输持续时间内所占的总时长较高,因此接收该传输数据的设备可以更好的从接收到的波形序列中获取电能。并且,通过在接收端口持续检测电平跳变,可以检测出S个电平跳变中任意两个电平跳变之间的时间间隔,并根据该时间间隔以及波形序列的特征来确定其中一个波形序列的传输持续时间T,从而确定出传输数据的相关传输参数(例如波特率),使设备可以按照确定出的传输数据的相关参数进行数据传输,实现传输参数自适应。
其中,步骤S101-步骤S103的各种可选实施方式可以参见实施例1的描述,在本实施例中,主要对步骤S104和步骤S105的各种可能的实施方式进行说明。
步骤S104,获取待发送数据的比特序列;
在该步骤中,将待发送数据编码为逻辑0和逻辑1表示的比特序列。
步骤S105,按照传输持续时间发送待发送数据的比特序列对应的波形序列。
在本实施例中,接收端通过步骤S103计算发送端发送数据所采用的传输持续时间(根据传输持续时间可以得到对应的波特率),通过步骤S104-S105将待发送数据按照计算出的波特率返回给发送端,从而使接收端发送数据所采用的波特率与发送端所采用的波特率一致,达到波特率自适应的目的。
在本实施例一种可选的实施方式中,步骤S105具体可以包括:以第一波形序列X表示第一数据比特,分别以第二波形序列Y和第三波形序列Z表示第二数据比特,第一数据比特为比特1和比特0中的一个,第二数据比特为比特1和比特0中的另一个;根据待发送数据的比特序列,连续发送比特序列中的比特对应的波形序列,其中,在连续发送的至少两个比特为第二数据比特时,连续发送的至少两个比特中的第一个比特对应的波形序列为第二波形序列Y,第二个比特以及后续的比特对应的波形序列为第三波形序列Z。数据通信中,待发送数据可以由1、0表示,具体地,可以以X表示1,以Y表示0或以Z表示 0,比如数据1010可以由XYXY表示;或者,也可以以X表示0,以Y表示1或以Z表示1,比如数据1010可以由ZYZY表示。作为一种可选的实施方式,根据待发送数据的比特序列,连续发送比特序列中的比特对应的波形序列,具体可以包括:控制发送端口的电平按照比特序列中的比特对应的波形序列的波形以及波形序列的特征进行变化,以发送待发送数据。本实施例中,由于通信双方的接收端需要从发送端获取电能,发送端需要在静默态时保持高电平,并通过不同的方式跳变至低电平表示不同的波形特征,从而达到传输数据的目的,所以,通过波形序列X、Y、Z表示数据比特1、0时,需要尽可能的采用在传输持续时间T内一直保持高电平的第二波形序列Y来表示数据比特,以此达到更高的供电效率。但是,由于发送端的静默态为持续高电平,发送端无法用连续的Y来表示比特数据,以防接收端将连续的Y识别为静默态。因此,在连续发送的至少两个比特为第二数据比特时,即如果第二数据比特为1,在连续发送11、111、……11111……时,可以用波形序列YZ、YZZ、……YZZZZ……来表示数据比特;如果第二数据比特为0,在连续发送00、000、……00000……时,可以采用波形序列YZ、YZZ、……YZZZZ……来表示数据比特。
实施例4
本实施例提供了一种终端,该终端用于执行实施例3中所述的传输参数获取方法,图4为本实施例提供的一种终端的结构示意图,该终端相对于实施例2所提供的区别在于,本实施例的终端还包括:比特序列获取模块205以及数据发送模块206。在本实施例主要对该实施例提供的终端相对于实施例2中的所提供的终端的区别进行描述,其它部分可以参见实施例2,在此不在赘述。
本实施例中,比特序列获取模块205,用于获取待发送数据的比特序列;数据发送模块206,用于按照传输持续时间T发送待发送数据的比特序列对应的波形序列。其中,该数据传输装置利用其持续时间识别模块203计算发送端发送数据所采用的波特率,通过比特序列获取模块205以及数据发送模块206将待发送数据按照计算出的波特率返回给发送端,从而使该数据传输装置发送数据所采用的波特率与发送端所采用的波特率一致,达到波特率自适应的目的。
在本实施例一种可选的实施方式中,数据发送模块205可以通过以下方式发送待发送数据的比特序列对应的波形序列:以第一波形序列X表示第一数据比特,分别以第二波形序列Y和第三波形序列Z表示第二数据比特,第一数据比特为比特1和比特0中的一个,第二数据比特为比特1和比特0中的另一个;根据待发送数据的比特序列,连续发送比特序列中的比特对应的波形序列,其中,在连续发送的至少两个比特为第二数据比特时,连续发送的至少两个比特中的第一个比特对应的波形序列为第二波形序列Y,第二个比特以及后续的比特对应的波形序列为第三波形序列Z。
数据通信中,待发送数据可以由1、0表示,具体地,可以以X表示1,以Y表示0或以Z表示0,比如数据1010可以由XYXY表示;或者,也可以以X表示0,以Y表示1或以Z表示1,比如数据1010可以由ZYZY表示。作为一种可选的实施方式,数据发送模块205根据待发送数据的比特序列,连续发送比特序列中的比特对应的波形序列时,可以控制发送端口的电平按照比特序列中的比特对应的波形序列的波形以及波形序列的特征进行变化,以发送待发送数据。本实施例中,由于通信双方的接收端需要从发送端获取电能,发送端需要在静默态时保持高电平,并通过不同的方式跳变至低电平表示不同的波形特征,从而达到传输数据的目的,所以,通过波形序列X、Y、Z表示数据比特1、0时,需要尽可能的采用在传输持续时间T内一直保持高电平的第二波形序列Y来表示数据比特,以此达到更高的供电效率。但是,由于发送端的静默态为持续高电平,发送端无法用连续的Y来表示比特数据,以防接收端将 连续的Y识别为静默态。因此,在连续发送的至少两个比特为第二数据比特时,即如果第二数据比特为1,在连续发送11、111、……11111……时,可以用波形序列YZ、YZZ、……YZZZZ……来表示数据比特;如果第二数据比特为0,在连续发送00、000、……00000……时,可以采用波形序列YZ、YZZ、……YZZZZ……来表示数据比特。
本发明实施例还提供了一种计算机可读存储介质,具有存储于其中的指令,当终端的处理器执行所述指令时,所述终端执行根据本发明一个实施例的传输参数获取方法。
在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。就本说明书而言,"计算机可读介质"可以是任何可以包含、存储、通信、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。
应当理解,本发明的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。

Claims (21)

  1. 一种传输参数获取方法,其特征在于,包括:
    获取预设的S个电平跳变形成的N个波形序列的波形序列特征,其中,N为正整数,X为正整数且大于1,所述预设的S个电平跳变形成的N个波形序列中的各个波形序列分别为以下之一:第一波形序列、第二波形序列和第三波形序列,其中,所述第一波形序列、所述第二波形序列和所述第三波形序列具有以下波形序列特征:所述第一波形序列、所述第二波形序列以及所述第三波形序列的传输持续时间相同,所述传输持续时间与传输所述波形序列的波特率呈反比关系,且所述第一波形序列以高电平开始并持续预设时间后跳变为低电平,以高电平结束,其中,所述第一波形序列中出现的低电平在所述传输持续时间内所占的总时长不随传输所述波形序列的波特率的变化而变化,所述第二波形序列在所述传输持续时间内持续高电平,所述第三波形序列以低电平开始,并以高电平结束,且所述第三波形序列中出现的低电平在所述传输持续时间内所占的总时长不随传输所述波形序列的波特率的变化而变化,所述预设的S个电平跳变均为从高电平跳变为低电平;
    在接收端口持续检测S个电平跳变,其中,持续检测到的所述S个电平跳变均为从高电平变为低电平;
    根据所述预设的S个电平跳变形成的N个波形序列的波形序列特征以及持续检测到的所述S个电平跳变中的任意两个电平跳变之间的时间间隔计算一个波形序列的传输持续时间。
  2. 根据权利要求1所述的方法,其特征在于,
    在所述根据所述预设的S个电平跳变形成的N个波形序列的波形序列特征以及持续检测到的所述S个电平跳变中的任意两个电平跳变之间的时间间隔计算一个波形序列的传输持续时间之前,所述方法还包括:
    判断所述持续检测到的所述S个电平跳变中的全部的时间间隔中的每一个时间间隔是否均与所述预设的S个电平跳变形成的N个波形序列中包含的S个电平跳变中的全部的时间间隔中对应的时间间隔符合同一预设关系,如果是,执行所述根据所述预设的S个电平跳变形成的N个波形序列的波形序列特征以及持续检测到的所述S个电平跳变中的任意两个电平跳变之间的时间间隔计算一个波形序列的所述传输持续时间的步骤。
  3. 根据权利要求1或2所述的方法,其特征在于,
    所述波形序列的特征还包括:
    所述第一波形序列中出现的低电平在所述传输持续时间内所占的总时长小于所述持续时间的二分之一;
    和/或,
    所述第三波形序列中出现的低电平在所述传输持续时间内所占的总时长小于所述持续时间的二分之一。
  4. 根据权利要求1-3中任一项所述的方法,其特征在于,
    所述预设的S个电平跳变形成的N个波形序列至少包括M个波形序列,所述M个波形序列为所述预设的数据帧头对应的N个波形序列中的前M个波形序列,其中,M为正整数,且M≥2;
    所述M个波形序列由所述第一波形序列组成;或者,所述M个波形序列由所述第三波形序列组成;或者,所述M个波形序列包括至少一个第一波形序列和至少一个所述第三波形序列。
  5. 根据权利要求4所述的方法,其特征在于,
    所述M个波形序列由所述第一波形序列组成时,所述预设的S个电平跳变形成的N个波形序列还包括:在所述M个波形序列之后的至少1个抗干扰波形序列,其中,所述至少1个抗干扰波形序列为所述第二波形序列或所述第三波形序列;
    所述M个波形序列由所述第三波形序列组成时,所述预设的S个电平跳变形成的N个波形序列还包括:在所述M个波形序列之后的至少1个抗干扰波形序列,其中,所述至少1个抗干扰波形序列为所述第二波形序列或所述第一波形序列。
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,
    N=8,所述预设的S个电平跳变形成的N个波形序列依次为所述第三波形序列、所述第三波形序列、所述第三波形序列、所述第三波形序列、所述第二波形序列、所述第三波形序列、所述第二波形序列和所述第三波形序列。
  7. 根据权利要求1至6中任一项所述的方法,其特征在于,
    所述预设的S个电平跳变形成的N个波形序列为数据帧头对应的N个波形序列;
    所述在接收端口持续检测S个电平跳变之后,所述方法还包括:继续在所述接收端口持续检测电平跳变;
    在所述根据所述预设的S个电平跳变形成的N个波形序列的波形序列特征以及持续检测到的所述S个电平跳变中的任意两个电平跳变之间的时间间隔计算一个波形序列的传输持续时间之后,所述方法还包括:
    以所述传输持续时间作为每个波形序列的持续时间,根据继续在所述接收端口持续检测到的电平跳变以及所述波形序列特征确定所述数据帧头之后传输数据对应的波形序列;
    根据所述传输数据对应的波形序列确定所述传输数据的比特序列,其中,以所述第一波形序列表示比特1和比特0中的一个,分别以所述第二波形序列和所述第三波形序列表示所述比特1和比特0中的另一个。
  8. 根据权利要求1至7任一项所述的方法,其特征在于,在计算一个波形序列的传输持续时间之后,所述方法还包括:
    获取待发送数据的比特序列;
    按照所述传输持续时间发送所述待发送数据的比特序列对应的波形序列。
  9. 根据权利要求8所述的方法,其特征在于,
    所述按照所述传输持续时间发送所述待发送数据的比特序列对应的波形序列,包括:
    以所述第一波形序列表示第一数据比特,分别以所述第二波形序列和所述第三波形序列表示第二数据比特,所述第一数据比特为比特1和比特0中的一个,所述第二数据比特为所述比特1和比特0中的另一个;
    根据所述待发送数据的比特序列,连续发送所述比特序列中的比特对应的波形序列,其中,在连续发送的至少两个比特为所述第二数据比特时,所述连续发送的至少两个比特中的第一个比特对应的波形序列为所述第二波形序列,第二个比特以及后续的比特对应的波形序列为所述第三波形序列。
  10. 根据权利要求1至9中任一项所述的方法,其特征在于,
    所述波形序列的特征还包括:
    所述第三波形序列在所述传输持续时间内仅出现一次由高电平变为低电平的电平跳变,并以高电平结束;
    所述第一波形序列以高电平开始并在所述传输持续时间内仅出现一次由高电平变为低电平的电平跳变。
  11. 一种终端,其特征在于,包括:
    获取模块,用于获取预设的S个电平跳变形成的N个波形序列的波形序列特征,其中,N为正整数,X为正整数且大于1,所述预设的S个电平跳变形成的N个波形序列中的各个波形序列分别为以下之一:第一波形序列、第二波形序列和第三波形序列,其中,所述第一波形序列、所述第二波形序列和所述第三波形序列具有以下波形序列特征:所述第一波形序列、所述第二波形序列以及所述第三波形序列的传输持续时间相同,所述传输持续时间与传输所述波形序列的波特率呈反比关系,且所述第一波形序列以高电平开始并在持续预设时间后跳变为低电平,以高电平结束,其中,所述第一波形序列中出现的低电平在所述传输持续时间内所占的总时长不随传输所述波形序列的波特率的变化而变化,所述第二波形序列在所述传输持续时间内持续高电平,所述第三波形序列以低电平开始,并以高电平结束,且所述第三波形序列中出现的低电平在所述传输持续时间内所占的总时长不随传输所述波形序列的波特率的变化而变化,所述预设的S个电平跳变均为从高电平跳变为低电平;
    检测模块,用于在接收端口持续检测S个电平跳变,其中,持续检测到的所述S个电平跳变均为从高电平变为低电平;
    持续时间识别模块,用于根据所述预设的S个电平跳变形成的N个波形序列的波形序列特征以及持续检测到的所述S个电平跳变中的任意两个电平跳变之间的时间间隔计算一个波形序列的传输持续时间。
  12. 根据权利要求11所述的终端,其特征在于,
    在所述持续时间识别模块根据所述预设的S个电平跳变形成的N个波形序列的波形序列特征以及持续检测到的所述S个电平跳变中的任意两个电平跳变之间的时间间隔计算一个波形序列的传输持续时间之前,
    所述持续时间识别模块,还用于判断所述持续检测到的所述S个电平跳变中的全部的时间间隔中的每一个时间间隔是否均与所述预设的S个电平跳变形成的N个波形序列中包含的S个电平跳变中的全部的时间间隔中对应的时间间隔符合同一预设关系,如果是,触发执行所述根据所述预设的S个电平跳变形成的N个波形序列的波形序列特征以及持续检测到的所述S个电平跳变中的任意两个电平跳变之间的时间间隔计算一个波形序列的所述传输持续时间的操作。
  13. 根据权利要求11或13所述的终端,其特征在于,
    所述波形序列的特征还包括:
    所述第一波形序列中出现的低电平在所述传输持续时间内所占的总时长小于所述持续时间的二分之一;和/或,
    所述第三波形序列中出现的低电平在所述传输持续时间内所占的总时长小于所述持续时间的二分之一。
  14. 根据权利要求11至13中任一项所述的终端,其特征在于,
    所述预设的S个电平跳变形成的N个波形序列至少包括M个波形序列,所述M个波形序列为所述预设的数据帧头对应的N个波形序列中的前M个波形序列,其中,M为正整数,且M≥2;
    所述M个波形序列由所述第一波形序列组成;或者,所述M个波形序列由所述第三波形序列组成;或者,所述M个波形序列包括至少一个第一波形序列和至少一个所述第三波形序列。
  15. 根据权利要求14所述的终端,其特征在于,
    所述M个波形序列由所述第一波形序列组成时,所述预设的S个电平跳变形成的N个波形序列还包括:在所述M个波形序列之后的至少1个抗干扰波形序列,其中,所述至少1个抗干扰波形序列为所述第二波形序列或所述第三波形序列;
    所述M个波形序列由所述第三波形序列组成时,所述预设的S个电平跳变形成的N个波形序列还包括:在所述M个波形序列之后的至少1个抗干扰波形序列,其中,所述至少1个抗干扰波形序列为所述第二波形序列或所述第一波形序列。
  16. 根据权利要求11至15中任一项所述的终端,其特征在于,N=8,所述预设的S个电平跳变形成的N个波形序列依次为所述第三波形序列、所述第三波形序列、所述第三波形序列、所述第三波形序列、所述第二波形序列、所述第三波形序列、所述第二波形序列和所述第三波形序列。
  17. 根据权利要求11至16中任一项所述的终端,其特征在于,
    所述预设的S个电平跳变形成的N个波形序列为数据帧头对应的N个波形序列;
    所述检测模块,还用于在接收端口持续检测S个电平跳变之后,继续在所述接收端口持续检测电平跳变;
    所述获取模块,还用于在所述持续时间识别模块根据所述预设的S个电平跳变形成的N个波形序列的波形序列特征以及持续检测到的所述S个电平跳变中的任意两个电平跳变之间的时间间隔计算一个波形序列的传输持续时间之后,以所述传输持续时间作为每个波形序列的持续时间,根据继续在所述接收端口持续检测到的电平跳变以及所述波形序列特征确定所述数据帧头之后传输数据对应的L个波形序列;根据所述传输数据对应的波形序列确定所述传输数据的比特序列,其中,以所述第一波形序列表示比特1和比特0中的一个,分别以所述第二波形序列和所述第三波形序列表示所述比特1和比特0中的另一个。
  18. 根据权利要求11至17任一项所述的终端,其特征在于,所述终端还包括:
    比特序列获取模块,用于获取待发送数据的比特序列;
    数据发送模块,用于按照所述传输持续时间发送所述待发送数据的比特序列对应的波形序列。
  19. 根据权利要求18所述的终端,其特征在于,所述数据发送模块按照以下方式发送待发送数据的比特序列对应的波形序列:
    以第一波形序列表示第一数据比特,分别以第二波形序列和第三波形序列表示第二数据比特,第一数据比特为比特1和比特0中的一个,第二数据比特为比特1和比特0中的另一个;根据待发送数据的比特序列,连续发送比特序列中的比特对应的波形序列,其中,在连续发送的至少两个比特为第二数据比特时,连续发送的至少两个比特中的第一个比特对应的波形序列为第二波形序列,第二个比特以及后续的比特对应的波形序列为第三波形序列。
  20. 根据权利要求11至19任一项所述的终端,其特征在于,
    所述波形序列的特征还包括:
    所述第三波形序列在所述传输持续时间内仅出现一次由高电平变为低电平的电平跳变,并以高电平结束;
    所述第一波形序列以高电平开始并在所述传输持续时间内仅出现一次由高电平变为低电平的电平跳变。
  21. 一种计算机可读存储介质,具有存储于其中的指令,当终端的处理器执行所述指令时,所述终端执行如权利要求1至10任一项所述的传输参数获取方法。
PCT/CN2017/107610 2016-11-24 2017-10-25 传输参数获取方法及终端 WO2018095183A1 (zh)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201611051708.5A CN107493156B (zh) 2016-11-24 2016-11-24 传输参数获取方法及终端
CN201611051744.1A CN107368446B (zh) 2016-11-24 2016-11-24 一种传输参数自适应的数据传输方法和装置
CN201611051708.5 2016-11-24
CN201611051744.1 2016-11-24

Publications (1)

Publication Number Publication Date
WO2018095183A1 true WO2018095183A1 (zh) 2018-05-31

Family

ID=62194740

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/107610 WO2018095183A1 (zh) 2016-11-24 2017-10-25 传输参数获取方法及终端

Country Status (1)

Country Link
WO (1) WO2018095183A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1355434A (zh) * 2000-11-30 2002-06-26 中国科学院微电子中心 一种频率、周期测量方法及装置
CN103424619A (zh) * 2013-08-15 2013-12-04 陕西海泰电子有限责任公司 定时计数器测频系统及方法
WO2014063316A1 (en) * 2012-10-24 2014-05-01 Abb Technology Ltd Pulse frequency measurement device and method and control system
CN105262489A (zh) * 2015-09-01 2016-01-20 武汉瑞纳捷电子技术有限公司 一种用于差分曼彻斯特解码的延时电路及方法
CN105353212A (zh) * 2015-10-13 2016-02-24 珠海格力电器股份有限公司 一种检测信号频率的方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1355434A (zh) * 2000-11-30 2002-06-26 中国科学院微电子中心 一种频率、周期测量方法及装置
WO2014063316A1 (en) * 2012-10-24 2014-05-01 Abb Technology Ltd Pulse frequency measurement device and method and control system
CN103424619A (zh) * 2013-08-15 2013-12-04 陕西海泰电子有限责任公司 定时计数器测频系统及方法
CN105262489A (zh) * 2015-09-01 2016-01-20 武汉瑞纳捷电子技术有限公司 一种用于差分曼彻斯特解码的延时电路及方法
CN105353212A (zh) * 2015-10-13 2016-02-24 珠海格力电器股份有限公司 一种检测信号频率的方法及装置

Similar Documents

Publication Publication Date Title
WO2018095181A1 (zh) 数据传输方法及装置
EP2763365B1 (en) Method and device for sending and receiving data
KR20180121531A (ko) 최적의 퍼포먼스 및 전력 절약을 위한 적응적 주변 컴포넌트 상호접속 익스프레스 링크 하위상태 개시
US20150380974A1 (en) Systems, methods, and devices for wireless charging
JP6572848B2 (ja) 距離推定システム
CN107241162B (zh) 一种数据传输方法及装置
CN101719858B (zh) Can控制器的位时序的同步处理方法
WO2018095183A1 (zh) 传输参数获取方法及终端
CN107423248B (zh) 数据帧头发送方法及发送装置
KR101555514B1 (ko) 단전선 직렬 통신 장치 및 동작 방법
KR20150038283A (ko) 펄스 폭 변조 수신기 회로
JP2012182595A (ja) 通信装置及びプログラム
WO2017050235A1 (zh) 数据发送方法和装置及数据接收方法和装置
EP3631988B1 (en) A phase-locked loop circuit for high bit-rate and low consumption transmission systems
CN107493156B (zh) 传输参数获取方法及终端
US10038459B2 (en) Network control device
CN103731910B (zh) 定时提醒方法、终端和服务器
CN107368446B (zh) 一种传输参数自适应的数据传输方法和装置
CN107370565B (zh) 一种传输参数自适应的数据传输方法和装置
CN107453838B (zh) 数据帧头发送方法及发送装置
CN112312522B (zh) 节能下行控制信道信息的传输方法、终端及网络侧设备
CN107346998B (zh) 一种数据帧尾检测方法及数据传输装置
CN107465498B (zh) 传输参数获取方法及终端
JP2005020308A (ja) シリアル通信方法、およびシリアル通信装置
CN112564820B (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: 17874186

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

Country of ref document: EP

Kind code of ref document: A1