WO2017050234A1 - 数据传输方法及数据处理设备 - Google Patents
数据传输方法及数据处理设备 Download PDFInfo
- Publication number
- WO2017050234A1 WO2017050234A1 PCT/CN2016/099622 CN2016099622W WO2017050234A1 WO 2017050234 A1 WO2017050234 A1 WO 2017050234A1 CN 2016099622 W CN2016099622 W CN 2016099622W WO 2017050234 A1 WO2017050234 A1 WO 2017050234A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- time
- time interval
- data
- signals
- signal
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L25/00—Baseband systems
- H04L25/38—Synchronous or start-stop systems, e.g. for Baudot code
- H04L25/40—Transmitting circuits; Receiving circuits
- H04L25/49—Transmitting circuits; Receiving circuits using code conversion at the transmitter; using predistortion; using insertion of idle bits for obtaining a desired frequency spectrum; using three or more amplitude levels ; Baseband coding techniques specific to data transmission systems
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L7/00—Arrangements for synchronising receiver with transmitter
Definitions
- the present application relates to the field of electronic technologies, and in particular, to a data transmission method and a data processing device.
- the serial communication mode between electronic circuits is mainly divided into synchronous communication mode and asynchronous communication mode.
- the synchronous communication method requires the communication parties to perform at the same clock frequency, and is accurately coordinated. By sharing a single clock or a timing pulse source to ensure accurate synchronization between the sender and the receiver, the efficiency is high; the asynchronous communication method does not require synchronization between the two parties, and the transceiver party
- the respective clock sources can be used, and both parties follow an asynchronous communication protocol, in which characters are used as data transmission units, the time interval at which the sender transmits characters is uncertain, and the transmission efficiency is lower than that of synchronous transmission.
- the DART protocol is characterized in that one character is transmitted one character at a time, and each character is transmitted bit by bit, and when a character is transmitted, it always starts with a "starting bit” and ends with a “stopping bit”. There is no fixed time interval requirement between.
- the transmitting clock of the transmitting end and the receiving clock of the receiving end are allowed to have a certain difference. When the frequency difference value is within a certain range, the receiving end does not detect the misalignment and can receive correctly, and the frequency difference is not due to multiple characters. Continuous reception causes error accumulation because the receiver at each start of the character is repositioned. When the difference between the transmit clock and the receive clock frequency is too large, the receiver may be misplaced, causing a receive error and reducing communication efficiency.
- This application is intended to address one of the above problems.
- the main purpose of the present application is to provide a data transmission method.
- the technical solution of the present application is specifically implemented as follows:
- An aspect of the present application provides a data transmission method, including:
- the second time interval determines a time parameter of the current data transmission
- the data is received in accordance with the time parameter.
- the receiving K signals comprises: detecting K times of low level pulses.
- the receiving data according to the time parameter includes: acquiring, according to the time parameter, a correspondence between 2 N different values and time intervals included in the N-bit data, where different values correspond to The time interval is different, wherein N ⁇ 1; receiving X signals, determining a time interval between the start times of each of the adjacent two signals, obtaining X-1 time intervals, where X is a positive integer, and X>1; obtaining a value corresponding to a single time interval in each of the consecutive S time intervals in the X-1 time intervals according to the determined time parameter, and obtaining the value of the S time interval transmission
- the value transmitted by the S time intervals is a value corresponding to the single time interval, and the value is one of 2 N different values included in the N-bit data, wherein, in the case of S>1, the The S time intervals are the same, wherein X and S are both positive integers, and S ⁇ X-1, N ⁇ 1.
- X-1 n*S, n ⁇ 1 and n is an integer.
- the receiving the X signals comprises: detecting X times of low level pulses.
- receiving X signals includes: receiving Y+1 signals, removing interference in the Y+1 signals, to obtain the X signals, where Y+1 ⁇ X.
- the method further includes: performing data transmission according to the time parameter.
- the performing data transmission according to the time parameter includes: obtaining, according to the time parameter, a correspondence between 2 N different values and time intervals included in the N-bit data, wherein different values Corresponding time intervals are different, wherein N ⁇ 1; acquiring data bit strings currently to be sent; grouping the data bit strings, each group of data is N bits; according to the obtained correspondence, each group of data
- the time interval corresponding to the value indicates the manner in which the set of data is transmitted.
- the step of receiving the K signals is continued.
- Another aspect of the present application provides a data transmission method, including: determining a time parameter; determining, according to the time parameter, a first time interval group and a second time interval group, wherein the first time interval group includes j first a time interval, the second time interval group includes j second time intervals;
- the generating the K handshake signals comprises: generating K times of low level pulses according to the first time interval and the second time interval.
- the method further includes: obtaining, according to the time parameter, a correspondence between 2 N different values and time intervals included in the N-bit data.
- the time interval corresponding to the different values is different, wherein N ⁇ 1; acquiring the data bit string to be currently sent; grouping the data bit string, each group of data is N bits; according to the obtained correspondence relationship,
- the set of data is transmitted in such a manner that the set of data is represented by a time interval corresponding to the value of each set of data.
- transmitting the set of data for each set of data comprises: generating and transmitting M signals, wherein a start time of each of the signals is related to a start time of an adjacent previous signal
- the time interval is the time interval corresponding to the value of the data of the group, M ⁇ 1 and M is a natural number.
- the generating the M signals comprises: generating M low-level pulses in accordance with the time interval.
- the method further includes: replacing, according to a preset rule, a currently used time parameter with a new time parameter, and using the new time parameter as a time parameter of the current data transmission;
- the time parameter of the current data transmission updates the corresponding relationship; and uses the updated correspondence to perform data transmission.
- the time processing module is configured to determine the first time interval group and/or the first a second time interval group, the first time interval group includes j first time intervals, and the second time interval group includes j second time intervals; if the first time interval and the first time interval The second time interval satisfies the preset relationship, according to the first time interval group At least one first time interval and / Or at least one second time interval in the second time interval group determines a time parameter of a current data transmission; the data processing module is configured to receive data according to the time parameter.
- the receiving module configured to receive K signals, specifically includes: the receiving module is configured to detect K times of low level pulses.
- the receiving module is further configured to receive X signals
- the data processing module is configured to: receive data according to the time parameter, and specifically: obtain, according to the time parameter, a correspondence between 2 N different values and time intervals included in the N-bit data, where different time values corresponding to different values are different, Wherein, N ⁇ 1; determining a time interval between the start times of each of the two adjacent signals, obtaining X-1 time intervals, wherein X is a positive integer, and X>1; Determining the time parameter, obtaining a value corresponding to a single time interval in each of the consecutive S time intervals in the X-1 time intervals, and obtaining values of the S time interval transmissions, where the S time intervals are transmitted
- the value is a value corresponding to the single time interval, the value being one of 2 N different values included in the N-bit data, wherein, in the case of S>1, the S time intervals are the same, wherein X And S are both positive integers, and S ⁇ X-1, N ⁇ 1.
- X-1 n*S, n ⁇ 1 and n is an integer.
- the receiving module is further configured to receive X signals, where the receiving module is further configured to detect X times of low level pulses.
- the data processing module is further configured to: receive Y+1 signals, remove interference in the Y+1 signals, and obtain the X signals, where Y+1 ⁇ X.
- the method further includes: a data sending module, wherein the data sending module is configured to: after the data processing module receives data according to the time parameter, perform data sending according to the time parameter .
- the data sending module configured to perform data sending according to the time parameter, specifically: acquiring, according to the time parameter, a correspondence between 2 N different values and time intervals included in the N-bit data The time interval corresponding to the different values is different, wherein N ⁇ 1; acquiring the data bit string to be currently sent; grouping the data bit string, each group of data is N bits; according to the obtained correspondence relationship, The set of data is transmitted in such a manner that the set of data is represented by a time interval corresponding to the value of each set of data.
- the time processing module is further configured to: if the first time interval and the second time interval do not satisfy the preset relationship, instruct the determining module to continue to perform receiving The operation of the K signals.
- the present application further provides a data processing device, including: a second time parameter module, a second time processing module, and a second signal generation and sending module; wherein the second time parameter module is configured to determine a time parameter; Narrative a second time processing module, configured to determine, according to the time parameter, a first time interval group and a second time interval group, where the first time interval group includes j first time intervals, and the second time interval group includes a second second time interval; the second signal generating and transmitting module, configured to generate and send K handshake signals, wherein a predetermined relationship is satisfied between the first time interval and the second time interval;
- the first time interval is a time interval between a start time of the i-th handshake signal and a start time of the i-1th handshake signal, where the second time interval is a start of the i-th handshake signal
- the second signal generating and transmitting module is configured to: the second signal generating and transmitting module according to the first time interval and the second time The interval generates K low-level pulses.
- the second signal generating and transmitting module is further configured to: after generating and transmitting K handshake signals, acquire 2 N different values and times included in the N-bit data according to the time parameter. Corresponding relationship of intervals, wherein different time values corresponding to different values are different, wherein N ⁇ 1; acquiring data bit strings currently to be transmitted; grouping the data bit strings, each group of data is N bits; In the correspondence relationship, the group data is transmitted in such a manner that the group of data is represented by a time interval corresponding to the value of each group of data.
- the second signal generating module is further configured to send the set of data, specifically: the second signal generating and transmitting module, and is further configured to generate and send M signals.
- the time interval between the start time of each of the signals and the start time of the adjacent previous signal is a time interval corresponding to the value of the set of data, M ⁇ 1 and M is a natural number.
- the second signal generating and transmitting module is further configured to generate the M signals
- the method further includes: the second signal generating and transmitting module, and configured to generate the M low power according to the time interval. Flat pulse.
- the second time parameter module is further configured to replace the currently used time parameter with a new time parameter according to a preset rule, and use the new time parameter as the current The time parameter of the data transmission; the second signal generation sending module is further configured to: update the correspondence according to the time parameter of the current data transmission; and perform data transmission by using the updated correspondence.
- the present application provides a data transmission method and a data processing device, which determine time parameters etu and pdt through a handshake signal, thereby ensuring each time data transmission, the transmitting end and the receiving end
- the values of etu and pdt are consistent, which ensures the stability and accuracy of each data transmission, avoids the frequency difference caused by the continuous reception of multiple characters, and effectively prevents the difference between the transmission clock and the receiving time parameters.
- it causes the receiving end to sample the misalignment, causing reception errors and technical problems of reducing communication efficiency.
- the transmitting end can represent the data of the transmitted waveform according to the time interval of the transmitted waveform, and the receiving end can determine the receiving according to the time interval of the received waveform.
- the data bits of the waveform can be used to receive data only by using two lines. When used in an electronic device, the volume of the electronic device can be effectively reduced.
- FIG. 1 is a flowchart of a data transmission method according to Embodiment 1 of the present application.
- FIG. 2 is a flowchart of a data receiving method according to Embodiment 2 of the present application.
- FIG. 3 is a flowchart of a data transmission method according to Embodiment 3 of the present application.
- FIG. 4 is a flowchart of a data sending method according to Embodiment 4 of the present application.
- FIG. 8 is a schematic structural diagram of a data processing device according to Embodiment 5 of the present application.
- FIG. 9 is a schematic structural diagram of another data processing device according to Embodiment 5 of the present application.
- FIG. 10 is a schematic structural diagram of a data processing device according to Embodiment 6 of the present application.
- FIG. 11 is a schematic structural diagram of a data sending module according to Embodiment 5 and Embodiment 6 according to Embodiment 6 of the present application;
- FIG. 12 is a schematic structural diagram of another data transmission module according to Embodiment 5 and Embodiment 6 provided in Embodiment 6 of the present application.
- this embodiment provides a data transmission method.
- the technical solution of this embodiment is specifically implemented as follows:
- Step S101 Receive K signals.
- the signal can be a pulse signal, that is, a high level pulse signal (rising edge signal) or a low level pulse signal (falling edge signal), and the pulse signal can be a square wave, a sine wave, A triangular wave or other irregular waveform may also be a combination of the above different waveforms.
- the K signals are received, including at least one of the following:
- Method 1 detecting K times low-level pulse
- the terminal can detect K times of low-level pulses in a continuous high level. For example, after detecting a high level for a period of time, a low-level pulse is detected, and then the detected high power is restored. In the flat state, after a period of time, a low-level pulse is detected again, and in this way, K times of low-level pulses can be continuously detected.
- the terminal can detect K times of high-level pulses in a continuous low level. For example, after detecting a low level for a period of time, a high-level pulse is detected once, and then the detected low power is restored. In the flat state, after a period of time, a high-level pulse is detected again, and in this way, K times of high-level pulses can be continuously detected.
- the K signals belong to the hopping signal, and the hopping amplitude is obvious, which is convenient for distinguishing from the noise signal.
- Step S102 Detect a time interval between each adjacent two of the K signals.
- the time between the start time of the pth low level signal and the start time of the p+1th low level signal is determined as the time between the pth and p+1th signals
- the start time of the p-th high-level signal is determined to the start time of the p+1-th high-level signal
- the duration between the time interval between the pth and p+1th signals; wherein 1 ⁇ p ⁇ K-1, and p is a natural number; as an alternative embodiment, by detecting each pulse The starting moment of the signal, thereby accurately and quickly obtaining the time interval between the start times of the two adjacent signals.
- Step S103 Determine whether a preset relationship is satisfied between the first time interval and the second time interval.
- the first time interval may be a time interval between a start time of the ith signal and a start time of the i-1th signal
- the first time interval is the first signal and the second signal start time.
- the time interval between the signal and the start of the fourth signal is labeled t2
- Step S104 Determine a first time interval group and/or a second time interval group.
- the first time interval group includes j first time intervals
- the K-1 time intervals generated according to the K signals will generate a series of first time intervals and second time intervals, and at least one of the plurality of different first time intervals may be selected.
- t0 and t2 may be taken as the first time interval group, and t1 and t3 are taken as the second time interval group.
- This embodiment does not limit the first time interval group and the first time interval.
- the number of time intervals in the two time interval groups may be at least one. In this manner, the first time interval group and/or the second time interval group may be determined to facilitate classification processing of the time interval.
- Step S105 If the first time interval and the second time interval satisfy a preset relationship, according to at least one first time interval in the first time interval group and/or at least one of the second time interval groups The second time interval determines the time parameter of the current data transmission.
- step S105 according to at least one first time interval in the first time interval group and/or at least one second time interval in the second time interval group, specifically: according to the first time interval group Determining, by the at least two first time intervals, a time parameter of the current data transmission, determining a time parameter of the current data transmission according to at least two second time intervals in the second time interval group, or according to at least one of the first time interval group
- the first time interval and the at least one second time interval in the second time interval group collectively determine a time parameter of the current data transmission, and the first time interval and the second time interval are not adjacent.
- the K signals are valid handshake signals, at this time, according to The first time interval group, or according to the second time interval group, or according to the first time interval group and the second time interval group, according to a time parameter generation rule pre-agreed with the data sending end, determining a time parameter of the current data transmission, wherein
- the pre-agreed time parameter generation rule can select any kind of way to determine the time parameter under the premise that the coding mode of each data bit is unique.
- the first time interval is between the first signal and the start time of the second signal.
- the time interval, marked as t0, the second time interval is the time interval between the second signal and the start time of the third signal, marked as t1;
- the first time interval is the third signal and
- the time interval between the start times of the fourth signal is marked as t2
- the second time interval is the time interval between the fourth signal and the start time of the fifth signal, which is marked as t3; as an example, the following
- a manner of determining a time parameter of a current data transmission according to at least one first time interval in the first time interval group and/or at least one second time interval in the second time interval group is described in detail.
- t0 and t2 are selected as the first time interval group, and the time parameter of the current data transmission is determined according to the first time interval group, where the time parameter includes the first time parameter etu and the second time parameter.
- Pdt, etu and pdt are uniquely represented by t0 and t2, and the values of etu and pdt can be obtained by arbitrary calculation according to the values of t0 and t2.
- etu and pdt can be obtained by any of the following calculation methods, of course, and Not limited to the following calculation methods:
- t0 is selected as the first time interval group, and the time parameter of the current data transmission is determined according to the first time interval group, where the time parameter includes the first time parameter etu and the second time parameter pdt.
- etu and pdt are uniquely represented by t0, and the values of etu and pdt can be obtained by arbitrary calculation according to the value of t0.
- etu and pdt can be obtained by any of the following calculation methods, of course, not limited to the following calculation methods. :
- t1 and t3 are selected as the second time interval group, and the time parameter of the current data transmission is determined according to the second time interval group, where the time parameter includes the first time parameter etu and the second time.
- Parameter Pdt, etu and pdt are uniquely represented by t1 and t3, and the values of etu and pdt can be obtained by arbitrary calculation according to the values of t1 and t3.
- etu and pdt can be obtained by any of the following calculation methods, of course, and Not limited to the following calculation methods:
- t1 is selected as the second time interval group, and the time parameter of the current data transmission is determined according to the second time interval group, where the time parameter includes the first time parameter etu and the second time parameter pdt.
- etu and pdt are uniquely represented by t1, and the values of etu and pdt can be obtained by any calculation according to the value of t1.
- etu and pdt can be obtained by any of the following calculation methods, of course, not limited to the following calculation methods. :
- t0 is selected as the first time interval group
- t3 is selected as the first time interval group
- the time parameter of the current data transmission is determined according to the first time interval group and the second time interval group.
- the time parameter includes a first time parameter etu and a second time parameter pdt, etu and pdt are uniquely represented by t0 and t3, and the values of etu and pdt can be obtained by any calculation according to the values of t0 and t3, exemplary, etu and Pdt can be obtained by any of the following calculation methods, of course, not limited to the following calculation methods:
- the first time interval is between the first signal and the start time of the second signal.
- Time interval, marked as t0 the second time interval is the time interval between the second signal and the start time of the third signal, marked as t1;
- the first time interval The time interval between the third signal and the start time of the fourth signal is marked as t2
- the second time interval is the time interval between the fourth signal and the start time of the fifth signal, labeled as t3;
- the first time interval is the time interval between the fifth signal and the start time of the sixth signal, and is marked as t4, and the second time interval is between the sixth signal and the start time of the seventh signal.
- the time interval is marked as t5; in this case, t0, t2, and t4 may be selected as the first time interval group, and t1, t3, and t5 may be selected as the second time interval group, according to at least two of the first time interval groups.
- Determining, by the first time interval, a time parameter of the current data transmission determining a time parameter of the current data transmission according to at least two second time intervals in the second time interval group, or according to at least one first time in the first time interval group
- the interval and the at least one second time interval in the second time interval group jointly determine a time parameter of the current data transmission, and the first time interval and the second time interval are not adjacent, and the time parameters etu and pdt are acquired
- the first time interval is the time between the first signal and the start time of the second signal.
- the interval is marked as t0
- the second time interval is a time interval between the second signal and the start time of the third signal, which is labeled as t1; as an example, the following is based on the first time interval group
- the manner in which the at least one first time interval and/or at least one of the second time interval groups determines the time parameter of the current data transmission is described in detail.
- t0 is selected as the first time interval group, and the time parameter of the current data transmission is determined according to the first time interval group, where the time parameter includes the first time parameter etu and the second time parameter pdt.
- etu and pdt are uniquely represented by t0, and the values of etu and pdt can be obtained by arbitrary calculation according to the value of t0.
- etu and pdt can be obtained by any of the following calculation methods, of course, not limited to the following calculation methods. :
- t1 is selected as the second time interval group, and the time parameter of the current data transmission is determined according to the second time interval group, where the time parameter includes the first time parameter etu and the second time parameter pdt.
- etu and pdt are uniquely represented by t1, and the values of etu and pdt can be obtained by any calculation according to the value of t1.
- etu and pdt can be obtained by any of the following calculation methods, of course, not limited to the following calculation methods. :
- the specific implementation manner of determining the time parameter of the current data transmission in this embodiment is only an exemplary implementation manner, and the present application does not exclude other time parameter generation rules according to at least two first time intervals in the first time interval group. Or determining current data according to at least two second time intervals in the second time interval group, or according to at least one first time interval in the first time interval group and at least one second time interval in the second time interval group The implementation of the time parameter of the transmission.
- the time parameters etu and pdt are determined by the first time interval group and/or the second time interval group, thereby ensuring that the values of etu and pdt are consistent between the transmitting end and the receiving end each time data transmission is performed, thereby ensuring that the values are consistent.
- the stability and accuracy of each data transmission because the receiving end will re-determine the values of the time parameters etu and pdt according to the handshake information sent by the sender before each data transmission, thereby avoiding the frequency difference caused by the continuous reception of multiple characters. Accumulation of errors effectively prevents the problem of sampling misplacement at the receiving end, causing reception errors and reducing communication efficiency when the difference between the transmission clock and the reception time parameter is too large.
- step S101 if the first time interval and the second time interval satisfy the preset relationship and the preset relationship is not satisfied, the step of receiving the handshake signal is continued, that is, the process returns to step S101.
- Step S106 Receive data according to the time parameter.
- step S106 according to the implementation manner of receiving the data according to the time parameter determined by the handshake signal, refer to the specific process of the data receiving method in Embodiment 2.
- the method further includes: performing data transmission according to the time parameter. Please refer to the specific process of the data sending method in Embodiment 4.
- the data transmission method provided in this embodiment re-determines the time parameter according to the handshake information before each data is received, so that the time parameters of the transmitting end and the receiving end are always consistent, and the stability and accuracy of the data transmission are ensured; the signal is transmitted by using a pulse signal. It is convenient to distinguish from noise signals; by detecting the rising or falling edge of each signal trigger, the starting time of each signal can be easily obtained, so that the time between the start times of two adjacent signals can be accurately and quickly obtained.
- the interval is determined according to the obtained time interval to determine whether the time interval between the signals satisfies the preset relationship, and whether the received signal is a valid handshake signal, so that the judging process is accurate and rapid, and the success rate is high, according to the first time interval and/or Or determining the first time interval group and/or the second time interval group by the second time interval, and determining the time parameters etu and pdt by the first time interval group and/or the second time interval group, thereby ensuring each data transmission
- the sender and receiver receive the same values for etu and pdt, ensuring each data transmission.
- the receiving end will re-determine the values of the time parameters etu and pdt according to the handshake information sent by the transmitting end before each data transmission, thereby avoiding the error accumulation caused by the continuous reception of the frequency difference due to the continuous reception of multiple characters, effectively preventing
- the difference between the transmission clock and the reception time parameter is too large, the sampling error of the receiving end is caused, resulting in a reception error and a technical problem of reduced communication efficiency.
- FIG. 2 is a flowchart of an optional time parameter receiving data determined according to the handshake signal based on the data transmission shown in FIG. 1 in the first embodiment.
- the receiving the data according to the time parameter determined by the handshake signal includes the following steps:
- Step S201 receiving X signals, determining a time interval between the start times of each of the two adjacent X signals, and obtaining X-1 time intervals, where X is a positive integer and X>1.
- receiving X signals may be detecting X times of low level pulses, or may detect X times of high level pulses.
- the low-level pulse/high-level pulse can be represented by a square wave, a sine wave, a triangular wave, or the like, which can distinguish between high and low level pulses, and is not limited herein.
- the detection is a low-level pulse, that is, the transmitting end can generate a low-level pulse when the receiving end is provided with a high level. In this manner, when the transmitting end communicates with the receiving end, the receiving end can The high level provided by the transmitting end is used as the power source to supply power to the power consuming device at the receiving end.
- the receiving end can be charged by the high level provided by the transmitting end, or the receiving end is not provided with the power source, and the transmitting end is directly used.
- the level is used as the power source.
- the device adopting the method can use the same line to complete the power supply and information reception at the same time when the information is exchanged, thereby reducing the device volume and the manufacturing cost.
- step S201a is further included, and K signals are received, and it is detected whether a preset relationship is satisfied between K signals, K ⁇ 2 and K is an integer. Since only one time interval is generated between two adjacent signals, at least two handshake signals should be received to obtain at least one time interval.
- the receiving end can determine whether the K signals are handshake signals by determining whether the K signals meet the preset relationship. The receiving end receives the handshake signal, and can determine the starting position of the data transmission according to the handshake signal, thereby improving the data transmission efficiency.
- a time interval between the K signals may be detected to determine whether a preset relationship is satisfied between the first time interval and the second time interval, where the first time interval is the ith signal.
- the received K signals are handshake signals, and the signals following the K signals are data transmission signals, wherein the value of K may be predetermined.
- the receiving end continuously detects the handshake signal, and starts to receive data until the handshake signal is detected, thereby avoiding the transmitting end. In the case of a misoperation, a signal is sent to the receiving end, and at the same time, the start of the data can be judged.
- the first time interval and The preset relationship that is satisfied between the second time interval may be a pre-agreed relationship between any sender and the receiver, for example, the second time interval is twice the first time interval.
- the receiving end can determine whether the received signal is a handshake signal by whether the received data satisfies a preset relationship.
- the K signals received in step S201a may also carry time parameters.
- the time parameters may be determined according to the K signals.
- the time parameter is determined by K signals, which can overcome the situation that the theoretical time parameter of the receiving end is inconsistent with the actual time parameter, and the accuracy of data transmission is guaranteed.
- the receiving end can confirm that K signals are received when K times of low-level pulses are detected.
- the low/high level pulse can be implemented by a square wave or a sine wave.
- the low level pulse is detected, that is, the transmitting end provides a high level to the receiving end, and when the K signals need to be sent, a K low level pulse is generated, so that when the transmitting end communicates with the receiving end, the receiving end can Use the high level provided by the transmitting end as the power source, or the receiving end does not set the power inside, and directly use the high level of the transmitting end as the power source.
- the device adopting the method can use the same line to complete the power supply simultaneously when performing information exchange. And information reception, reducing equipment size and manufacturing costs.
- receiving the X signals includes: receiving Z signals, removing interference in the Z signals, and obtaining X signals, where Z ⁇ X.
- step S202 according to the time parameter of the current data transmission determined by the scheme in Embodiment 1, the value corresponding to a single time interval in each consecutive S time interval in the X-1 time interval is obtained, and the value of the S time interval transmission is obtained.
- the value is one of 2 N different values contained in the N-bit data, wherein, in the case of S>1, S time intervals are the same, X and S are both positive integers, and S ⁇ X-1, N ⁇ 1 . That is, in the X-1 time interval, in the case of S>1, the S consecutive time intervals are the same, and the value of the N-bit data corresponding to the single time interval is the value transmitted by the S time intervals.
- the transmitting end uses a plurality of identical time intervals to represent the value of the N-bit data, and obtains 3 time intervals.
- the value corresponding to a single time interval in each consecutive S time interval in the X-1 time interval is obtained.
- the value corresponding to the time interval for example, a time interval received, calculates the value of m based on etu and pdt.
- each set of data set or negotiated is 1 bit, the value is 1, and if each set of data is 2 bits, the value is 01, if each set of data is 3 bits, then The value is 001.
- the data of each group is 4 or more, the value is obtained in the same manner, and details are not described herein again.
- the pre-agreed codec rule may be In any way that can guarantee that N data bits of different values correspond to a unique time interval, by way of example:
- N data bits of different values include: 0, 1, at this time,
- N data bits of different values include: 000, 001, 010, 011, 100, 101, 110, 111.
- the time interval corresponding to the 2N different values included in the N-bit data is obtained according to the codec rule that is pre-agreed with the data sending end.
- codec rule that is pre-agreed with the data sending end.
- the time interval corresponding to 2 N different values included in the N-bit data is obtained according to the first time parameter etu and the second time parameter pdt, wherein the time intervals corresponding to the different values are different, thereby distinguishing
- the different data bits corresponding to the received different time intervals are used to obtain the data sent by the transmitting end through the received time interval.
- a value corresponding to a single time interval in each consecutive S time interval in the X-1 time interval is obtained, and S time interval transmission is obtained.
- the value of the value is one of 2 N different values contained in the N-bit data, wherein, in the case of S>1, the S time intervals are the same, X and S are both positive integers, and S ⁇ X-1, N ⁇ 1 can be understood as:
- a bit string corresponding to a single time interval is obtained, and a bit string transmitted by S time intervals is obtained, wherein the value transmitted by the S time intervals is a bit string corresponding to a single time interval, and in the case of S>1, the S time intervals are the same.
- X is 5 or more
- the above examples are merely exemplary, as long as the manner of obtaining bit strings transmitted in S time intervals should be within the protection scope of the present application.
- step S202' before acquiring the value of the first consecutive S time intervals in the X-1 time intervals in step S202, step S202' may be further included, and N is obtained according to the time parameter.
- N Correspondence between 2 N different values and time intervals included in the bit data, wherein the different values correspond to different time intervals, N ⁇ 1, wherein the above-mentioned pre-calculated N-bit data includes 2N different values and time intervals. Determining the data bits of the received time interval further reduces the decoding time after receiving the data.
- the correspondence between the 2 N different values and the time interval included in the N-bit data is obtained according to the time parameter, wherein the time interval corresponding to the different values is different, and N ⁇ 1 can be understood as: Obtaining, according to a time parameter, a correspondence between each of the 2 N bit strings of length N and a time interval, where 2 N of the bit strings are different from each other, and different time intervals corresponding to the bit strings are different, N ⁇ 1.
- the receiving end of the data may calculate a time interval of the data bit by using a calculation method preset or negotiated by the sending end of the data.
- the time interval for transmitting the data bit m is:
- the present application may also use other pre-negotiated calculation methods to determine the time interval, which is not specifically limited in this implementation.
- the time interval of the data bit is calculated by a pre-negotiated calculation method, and the scalability of the data transmission can be ensured, that is, regardless of the value of N, the time interval between the data bits can be calculated by the transmitting end and the receiving end. Then, the receiving end can compare with the received time interval according to the calculated time interval, thereby directly determining the value corresponding to the time interval, and improving the efficiency of determining the data.
- the receiving end of the data may also use a list that is pre-negotiated and stored with the data sending end to determine a time interval corresponding to the value, and determine the corresponding value by using a lookup list.
- the time interval increases the efficiency of the time interval corresponding to the value.
- X-1 n*S, n ⁇ 1 and n is an integer.
- X signals can transmit n*S data bits, and There is no problem with redundant signals that can't be decoded.
- the time parameter may also be replaced during the data transmission process.
- the method may further include the step S203: replacing the currently used time parameter with the new one according to the preset rule.
- Time parameter taking the new time parameter as the time parameter of the current data transmission, receiving X signals, determining the time interval between the starting times of each two adjacent signals in the X signals, and obtaining X-1 times Interval, and then use the time parameter of the current data transmission to obtain the value corresponding to a single time interval in each consecutive S time interval in the X-1 time interval, and obtain the value of the S time interval transmission, and the value of the S time interval transmission is
- the value corresponding to a single time interval is one of 2 N different values contained in the N-bit data, wherein, in the case of S>1, the S time intervals are the same.
- the determination of the new time parameter may be completed through negotiation between the transmitting end and the receiving end, or may be performed by the sending end and the receiving end searching for a pre-stored time parameter table, such as determining a table when transmitting certain types of data.
- the time parameter of the sender can be changed. It can match the receivers of different data processing capabilities, or match different types of data, which can further improve the efficiency of data processing.
- the transmitting end may further send A end signals (A ⁇ 1 and an integer), and the receiving end may also receive A end signals.
- the end signal may be the same as the handshake signal, or may be a signal of another specific format. Through the end signal, the receiving end may determine whether the data is received or not.
- the receiving end may further receive the verification data sent by the transmitting end before receiving the end signal.
- the data receiving end can determine whether the received data is complete and correct.
- the verification data includes verification data calculated by a verification method such as MAC check, parity check, and sum check.
- the receiving end can determine the data bits of the received waveform according to the time interval of receiving the waveform, and can complete the data reception by using only two lines, and is applicable to the electronic device. Effectively reduce the size of electronic devices.
- the time parameter is the length of time occupied by the data transmission.
- the number of time parameters does not have a corresponding relationship with N, and only the negotiation with the sending end is consistent. This embodiment does not limit the specific number of time parameters, as long as the time interval corresponding to the value of the data bit can be expressed. .
- step S201 six signals are received, and the time interval between the start times of two adjacent signals in the six signals is determined, and five time intervals etu, etu+3pdt, etu+2pdt, etu+pdt, Etu.
- step S202 the two-bit data corresponding to the five time intervals are respectively obtained.
- the receiving end may receive a time interval to represent a group of data, such as only receiving an etu time interval indicating 00, the data transmission speed is fast, and the same time may be received multiple times.
- the time interval represents a group of data. If the time interval of receiving three etus is 00, the data transmission accuracy is high, which can prevent misjudgment caused by the loss of time interval.
- the time parameter of the current data transmission is determined.
- N There is no corresponding relationship between the number of time parameters and N. This embodiment does not limit the specific number of time parameters, as long as the time interval corresponding to the value of the data bits can be expressed.
- step S201 11 signals are received, and the time interval between the start times of each of the adjacent two signals is determined, and 10 time intervals etu, etu, pdt, pdt, pdt, etu, etu, Pdt, etu, etu.
- Step S202 acquiring 1-bit data corresponding to the above 10 time intervals, and obtaining an etu time interval transmission.
- the value 0, the value 0 transmitted by the etu time interval is obtained, and the value 1 transmitted by the pdt time interval is obtained, and the value 1 of the pdt time interval transmission is obtained.
- the value 0 of the etu data interval transmission is obtained, and the reception of the bit string 0011100100 is finally completed.
- the receiving end can receive a time interval to represent 1-bit data, and if the time interval of receiving only one etu represents a value of 0, the data transmission speed is fast, and can also be received multiple times.
- the same time interval represents 1-bit data. If the time interval of receiving three etus represents a value of 0, the data transmission accuracy is high, and the misjudgment caused by the loss of the time interval can be prevented.
- the time parameter is the length of time that the data transmission takes.
- the number of time parameters does not have a corresponding relationship with N, and only the negotiation with the sending end is consistent. This embodiment does not limit the specific number of time parameters, as long as the time interval corresponding to the value of the data bit can be expressed. .
- step S201 five signals are received, and the time interval between the start times of two adjacent signals in the five signals is determined, and four time intervals etu, etu+3pdt, etu+4pdt, etu+4pdt are obtained.
- step S202 the two-bit data corresponding to the four time intervals are respectively obtained.
- the zero-padding bit is deleted, and the reception of the bit string 0011100100 is completed.
- the receiving end may receive a time interval to represent a group of data, such as only receiving an etu time interval indicating 000, the data transmission speed is fast, and the same data may be received multiple times.
- the time interval represents a group of data. If the time interval of receiving three etus is 000, the data transmission accuracy is high, which can prevent misjudgment caused by the loss of time interval.
- this embodiment provides a data transmission method.
- the technical solution of this embodiment is specifically implemented as follows:
- Step S301 Determine a time parameter.
- the time parameter may include the first time parameter and/or the second time parameter.
- the first time parameter is recorded as etu and the second time is used in this embodiment.
- the time interval for sending the handshake signal is determined, and the receiving end may determine the handshake signal according to the received handshake signal.
- the description is convenient for description, and only two time parameters are used.
- the first time interval group and the second time interval group are determined by using two time parameters, but the case of multiple time parameters is not excluded.
- Step S302 Determine a first time interval group and a second time interval group according to the time parameter.
- the first time interval group includes j first time intervals
- the second time interval group includes j second time intervals.
- the first time interval refers to step S202.
- the time interval between the start time of the i-th signal and the start time of the i-1th signal is denoted as T i-1,i
- the first time interval T i-1,i in the first time interval group and the second time interval T i,i+1 in the second time interval group satisfy a certain
- the preset relationship can ensure the validity of the handshake signal, so that the receiving end can receive the handshake signal according to the first time interval T i-1,i and the second time interval T i.
- a preset relationship of i+1 determining that the handshake signal is a signal for instructing to start receiving data; and second, each first time interval T i-1,i in the first time interval group and the first time parameter etu and The second time parameter pdt satisfies a certain preset relationship, so that after receiving the handshake signal, the receiving end can calculate the first time parameter etu by using the received multiple first time intervals according to the same preset relationship. And/or the second time parameter pdt, so that the receiving end can calculate the bit data corresponding to the time interval of the transmission according to the first time parameter etu and/or the second time parameter pdt.
- the first time interval T i-1,i in the first time interval group and the second time interval T i,i+1 in the second time interval group satisfy a certain preset relationship, which may include many
- the first time interval T i-1,i in the first time interval group and the first time parameter etu and/or the second time parameter pdt satisfy a certain preset relationship, and also include multiple types, below, by way of example A detailed explanation of the sexual approach.
- t0 and t2 are the first time interval group
- t1 and t3 are the second time interval group
- the preset relationship between the first time interval and the second time interval means that between t0 and t1, and t2.
- the preset relationship is satisfied at the same time as t3, and the preset relationship may be determined according to the experience of the technician or determined according to actual operating parameters.
- each first time interval T i-1, i t0, t2 in the first time interval group and the first time parameter etu and/or The second time parameter pdt satisfies a certain preset relationship and is described in detail:
- the first time interval t0 and t2 are generated according to one of the first time parameter etu or the second time parameter pdt by using a preset time parameter generation rule.
- t0 and t2 can be obtained by any of the following calculation methods.
- the preset time parameter generation rules are not limited to the following calculation methods:
- the receiving end can calculate etu by using t0 and t2 through the same preset time parameter generation rule.
- the first time interval t0 and t2 are generated according to the preset time parameter generation rule according to the first time parameter etu and the second time parameter pdt, and t0 and t2 can be obtained by any one of the following calculation methods, of course, the preset The time parameter generation rule is not limited to the following calculation methods:
- T2 x*a*etu+b*pdt
- a and b are natural numbers ⁇ 1, and x is a rational number. Therefore, the receiving end can calculate etu and pdt by using t0 and t2 through the same preset time parameter generation rule.
- the first time interval t0 and t2 are generated according to the preset time parameter generation rule according to the first time parameter etu and the second time parameter pdt, and t0 and t2 can be obtained by any one of the following calculation methods, of course, the preset The time parameter generation rule is not limited to the following calculation methods:
- T2 a*etu+x*b*pdt
- a and b are natural numbers ⁇ 1, and x is a rational number. Therefore, the receiving end can calculate etu and pdt by using t0 and t2 through the same preset time parameter generation rule.
- the first time interval T 1,2 is the first signal and the second signal.
- the time interval between the start times is marked as t0
- the second time interval T 2,3 is the time interval between the second signal and the start time of the third signal, labeled as t1;
- the first The time interval T 3,4 is the time interval between the start of the third signal and the fourth signal, denoted as t2
- the second time interval T 4,5 is between the fourth signal and the start time of the fifth signal
- the t1, t3, and t5 of the second time interval group and the t0, t2, and t4 of the first time interval group respectively satisfy a preset relationship, that is, between t0 and t1, and t2 and t3.
- the first time interval t0 of the first time interval group is determined according to the first time parameter etu and/or the second time parameter pdt according to the preset time parameter generation rule according to the preset time relationship between t4 and t5.
- the values of t2 and t4 may be generated in different manners by using preset time parameter generation rules, for example, the first time intervals t0, t2, and t4 are preset according to one of the first time parameter etu or the second time parameter pdt.
- the time parameter generation rule is generated. Taking etu as an example, t0, t2, and t4 can be obtained by any of the following calculation methods.
- the preset time parameter generation rule is not limited to the following calculation methods:
- the receiving end can calculate etu by using t0, t2, and t4 through the same preset time parameter generation rule.
- the first time interval t0, t2, and t4 are generated according to the first time parameter etu and the second time parameter pdt by using a preset time parameter generation rule, and t0, t2, and t4 may be obtained by any one of the following calculation methods, of course,
- the preset time parameter generation rule is not limited to the following calculation methods:
- T2 x*a*etu+b*pdt
- T4 2x*a*etu+b*pdt
- a and b are natural numbers ⁇ 1, and x is a rational number. Therefore, the receiving end can calculate etu and pdt by using t0, t2, and t4 through the same preset time parameter generation rule.
- the first time interval t0, t2, and t4 are generated according to the first time parameter etu and the second time parameter pdt by using a preset time parameter generation rule, and t0, t2, and t4 may be obtained by any one of the following calculation methods, of course,
- the preset time parameter generation rule is not limited to the following calculation methods:
- T2 a*etu+x*b*pdt
- T4 a*etu+2x*b*pdt
- the number generation rule can calculate etu and pdt using t0, t2, and t4.
- the specific implementation manners of determining the first time interval group and the second time interval group of the current data transmission in this embodiment are merely exemplary embodiments, and the present application does not exclude other time parameter generation rules according to the first time parameter etu and / or the second time parameter pdt determines the implementation of the first time interval of the first time interval group, and does not exclude the preset relationship of the other first time interval and the second time interval.
- the first time interval group is determined by the time parameter etu and/or pdt, thereby ensuring that the values of etu and pdt are consistent between the transmitting end and the receiving end each time data transmission is performed, thereby ensuring stable data transmission every time.
- Sex and accuracy because the handshake information sent by the sender before each data transmission re-determines the values of the time parameters etu and pdt, avoiding the frequency difference caused by the continuous reception of multiple characters, effectively preventing the transmission of the clock and
- the receiving end samples the sampling misalignment, causing the receiving error and the communication efficiency to be reduced.
- Step S303 Generate and transmit K handshake signals.
- generating and sending K handshake signals includes: generating and transmitting K handshake signals according to the first time interval group and the second time interval group; wherein, K The foregoing preset relationship is satisfied between the first time interval and the second time interval in the handshake signal, and the description of the preset relationship that needs to be satisfied in the first time interval and the second time interval in step S201 may be referred to.
- K is a preset value
- K ⁇ 3 and K is an odd number
- the signal may be a pulse signal, that is, a high-level pulse signal (rising edge signal) or a low-level pulse signal is received. (falling edge signal), the pulse signal can be a square wave, a sine wave, a triangle wave or other irregular waveform, or a combination of the above different waveforms.
- K signals are generated and transmitted, including at least one of the following:
- Method 1 Generate and send K times low-level pulses
- the transmitting end triggers K times of low-level pulses in a continuous high level, for example, after continuously triggering a high level for the first time interval, triggering a low-level pulse once, and then resumes triggering a high level.
- the first time interval can be the start time of the ith signal and the ith a time interval between the start times of the signals
- the first time interval is the first signal and the second signal starts.
- the time interval between times is marked as t0
- the second time interval is the time interval between the second signal and the start time of the third signal, and is marked as t1;
- the first time interval is the third time
- the time interval between the start time of the signal and the fourth signal is marked as t2
- the second time interval is the time interval between the start time of the fourth signal and the fifth signal, marked as t3, and the transmitting end is continuously high.
- Triggering 5 low-level pulses in the level including: triggering the first low-level pulse after continuously triggering the high level for a period of time, then The state of triggering the high level is resumed. After t0, the second low level pulse is triggered, and then the state of triggering the high level is resumed. After t1, the third low level pulse is triggered, and then resumes.
- Method 2 generate and send K high-level pulses
- the transmitting end triggers K high-level pulses in a continuous low level, for example, after continuously triggering the low level for the first time interval, triggering a high-level pulse once, and then resumes triggering the low level.
- the first time interval is the first signal and the second signal starts.
- the time interval between times is marked as t0
- the second time interval is the time interval between the second signal and the start time of the third signal, and is marked as t1;
- the first time interval is the third time
- the time interval between the start time of the signal and the fourth signal is marked as t2
- the second time interval is the time interval between the start time of the fourth signal and the fifth signal, marked as t3, and the transmitting end is continuously low.
- the high-level pulse is triggered 5 times in the level, including: after continuously triggering the low level for a period of time, triggering the first high-level pulse, and then restoring the state of triggering the low level, after t0, triggering the second The second high level pulse, then resumes the state of triggering the low level. After t1, the third high level pulse is triggered, and then the state of the low level is restored. After t2, the fourth high is triggered.
- the K signals belong to the hopping signal, and the hopping amplitude is obvious, which is convenient for distinguishing from the noise signal.
- the method provided in this embodiment further includes: following the step of transmitting data according to the first time parameter etu and the second time parameter pdt, specifically, refer to the description in Embodiment 4. Data transmission method.
- FIG. 4 is a flowchart of an optional data transmission method based on the data transmission method shown in FIG. 1 in FIG. 1 and Embodiment 3 in the first embodiment.
- the data sending method performs data transmission according to the determined time parameter, and includes the following steps:
- Step S401 Acquire a correspondence between 2 N different values and time intervals included in the N-bit data according to the time parameter, where different time values corresponding to different values are different, N ⁇ 1.
- the time parameter is the time parameter determined in Embodiment 1 and Embodiment 3, and specifically includes a first time parameter etu and a second time parameter pdt.
- the correspondence between the 2 N different values and the time interval included in the N-bit data is obtained according to the time parameter, wherein the time interval corresponding to the different values is different, and N ⁇ 1 can also be understood as:
- each bit string of two bit strings of length 1 is 0 and 1, respectively.
- the present application may also use other pre-negotiated calculation methods to determine the time interval, which is not limited in this application.
- the time interval corresponding to the value is calculated by a pre-negotiated calculation method to ensure the scalability of data transmission, that is, regardless of the value of N, both the transmitting end and the receiving end can calculate different values and time intervals. Correspondence relationship.
- the decoding rule may be any manner that can ensure that N data bits of different values correspond to a unique time interval, exemplarily:
- N data bits of different values include: 0, 1, at this time,
- N data bits of different values include: 00, 01, 10, and 11, at this time,
- N data bits of different values include: 000, 001, 010, 011, 100, 101, 110, 111.
- the time interval corresponding to the 2N different values included in the N-bit data is obtained according to the codec rule that is pre-agreed with the data receiving end.
- codec rule that is pre-agreed with the data receiving end.
- the sending end of the data may also use a list that is pre-negotiated and stored with the receiving end of the data to determine a time interval corresponding to the value, and determine the corresponding value by using a lookup list.
- the time interval can increase the efficiency of obtaining the time interval corresponding to the value.
- the sending end of the data searches the pre-stored list to determine the Whether the time interval corresponding to the calculated value belongs to the receiving range of the receiving end of the data.
- the time interval corresponding to the value is obtained, and the scalability of the data transmission can be improved under the premise that the receiving end can receive normally.
- Step S402 Acquire a data bit string to be currently transmitted.
- the sending end of the data may generate a data bit string to be sent by itself, or may receive a data bit string to be sent from another device, and the application is not limited to the current to be sent.
- the manner of obtaining the data bit string, as long as the data bit string currently to be sent can be finally obtained, should belong to the protection scope of the present application.
- the transmitting end of the data can be used as a switching device, which can transfer the communication between the other device (hereinafter referred to as the first terminal) and the receiving end of the data.
- the terminal obtains the data bit string to be sent in the following manner: Step S402a, receiving the first data through the first interface; Step S402b, decoding the first data according to the protocol supported by the first interface, and obtaining the first data bit to be sent string.
- the transmitting end may have two communication interfaces, such as a first interface and a second interface, the first interface is an interface for communicating with the first terminal, and the second interface is for communicating with the receiving end of the data.
- the first interface may be an existing universal interface, including a wireless interface, such as a USB interface, an audio interface, a serial port, a Bluetooth, a wifi, an NFC interface, etc., through which the first interface can be connected to the first terminal, Receiving first data sent from the first terminal.
- the first terminal may be a mobile phone, a computer, a PAD, or the like.
- the first data may be a mobile phone, a computer, or a data that needs to be transmitted on the PAD end.
- the first interface can decode the received first data by using a protocol supported by itself.
- the first interface can be based on a USB protocol, an audio protocol, a serial protocol, a Bluetooth protocol, a wifi protocol,
- the NFC protocol or the like decodes the first data, and obtains a data bit string corresponding to the first data, where the data bit string is a first data bit string to be transmitted (ie, a data bit string to be transmitted currently).
- the second interface may be an interface connected to the electronic payment device (ie, the receiving end of the data) through which the data bits are transmitted to the electronic payment device.
- the second interface can be a two-wire interface; the electronic payment device can implement a USBkey function, an OTP function, and a smart card function.
- the transmitting end of the data of the present application is used as a switching device, and data conversion is performed through the first interface, so that data sent by the terminal can be converted into data suitable for communicating with the receiving end of the data, thereby realizing conversion between different interfaces.
- the scope of use of the transmitting end of the data of the present application is expanded.
- the transmitting end of the data is used as a switching device, the data bit string to be sent is obtained through the first interface, and the data bit string to be sent is sent through the second interface by using the data sending method described in this application. .
- step S403 the data bit strings are grouped, and each set of data is N bits.
- step S402 and step S403 may also be performed at any time before step S401, as long as the data bit strings are acquired and grouped before the data is transmitted.
- the sending end of the data may perform the step of determining the time parameter and the step S401 in the third embodiment before the data is sent, or the sending end of the data may also perform the steps and steps of determining the time parameter in the third embodiment. S401.
- Each time the data is sent the corresponding relationship between the 2N different values and the time interval included in the N-bit data is obtained in step S401, and the data to be sent is encoded, or an expiration date may be set, and the valid period is valid.
- the data is transmitted within the time limit, and the corresponding relationship between the 2 N different values and the time interval included in the N-bit data is obtained in step S401, and the data to be transmitted is encoded.
- each time an event trigger is received for example, the user inputs a time parameter of the current data transmission, and calculates a correspondence between the 2 N different values and the time interval included in the N-bit data.
- the specific embodiment is not limited.
- the data bit string is grouped, and each group of data is N bits, which may be grouped in multiple manners, may be grouped by using 1 bit each group, or may be included in each group.
- the bit mode is grouped.
- the data bit string includes a single number, since the data bit string cannot be completely grouped according to 2 bits, the data bit string can be complemented by 0 and then grouped.
- the data transmitting end and the data receiving end are preset. Determine or negotiate the way to fill 0.
- the data bit string is sent from the upper bits of the data, the last bit of the bit string is padded with 0.
- the data bit string is transmitted from the lower bits of the data, the upper bits of the bit string are padded with zeros.
- each group includes 3 bits or more can be grouped by referring to each group including 2 bits, and details are not described herein again.
- Step S404 Send the group of data in a manner that the group of data is represented by a time interval corresponding to the value of each group of data according to the obtained correspondence.
- the value of each set of data may correspond to one time interval, or may correspond to multiple identical time intervals.
- a set of data includes 2 bits, and the value of the set of data may be 00, 01, 10, and 11.
- the value of the set of data is 00
- the value 00 may be represented by one time interval.
- the time length corresponding to the one time interval may be etu, that is, the expression of the data 00 may be a time interval of, for example, 10 ⁇ s.
- the value 00 may be represented by five time intervals.
- the time length of each of the five time intervals may be etu, that is, the data of the group of data 00 may be expressed by five signals having the same time interval, and each time interval is a time interval of 10 ⁇ s.
- the value of each set of data corresponds to a time interval, and the data transmission speed is fast and the efficiency is high.
- the value of each set of data corresponds to multiple time intervals, and the value corresponding to the time interval can be accurately determined to prevent errors caused by the lost time interval during data transmission.
- M signals may be generated and transmitted, where the start time of each signal and the start time of the adjacent previous signal
- the time interval is the time interval corresponding to the value of the data of the group, M ⁇ 1 and M is a natural number.
- the time interval generated by the signal method has the effect of easy detection and high stability.
- M signals may be generated in such a manner that M times of low-level pulses are generated at time intervals, or M signals may be generated in such a manner that M-times high-level pulses are generated at time intervals.
- the low-level pulse/high-level pulse can be represented by a square wave, a sine wave, a triangular wave, or the like, which can distinguish between high and low level pulses, and is not limited herein.
- the low-level pulse is generated according to the time interval.
- the transmitting end communicates with the receiving end, the transmitting end can use the high level to supply power to the receiving end and transmit the information through the low-level pulse.
- the device adopting the method can use the same line to complete power supply and information transmission at the same time when performing information exchange, thereby reducing equipment volume and manufacturing cost.
- the time parameter may also be replaced, that is, after the step S404, the method may further include: the current usage time according to the preset rule.
- the parameter is replaced with a new time parameter, and the new time parameter is used as the time parameter of the current data transmission; the corresponding relationship is updated according to the time parameter of the current data transmission; in the subsequent data transmission process, the updated correspondence is used for data transmission.
- the determination of the new time parameter may be completed through negotiation between the transmitting end and the receiving end, or may be performed by the sending end and the receiving end searching for a pre-stored time parameter table, such as determining a table when transmitting certain types of data.
- the time parameter that this type of data should use.
- the time parameter of the sender can be changed. It can match the receivers of different data processing capabilities, or match different types of data, which can further improve the efficiency of data processing.
- the packet may also be included. Including: sending verification data, through which the data receiving end can determine whether the received data is complete and correct.
- the check data includes, but is not limited to, check data calculated by a check method such as MAC check, parity check, and checksum.
- the method may further include: sending A The end signal (A ⁇ 1 and an integer), the end signal may be the same as or different from the handshake signal, and the end signal may be used by the receiving end to determine whether the data bit is received or not.
- the transmitting end can represent the data of the transmitted waveform according to the time interval of the transmitted waveform, and can complete the data transmission only by using two lines, which can be effectively reduced when applied to the electronic device.
- the size of the electronic device can represent the data of the transmitted waveform according to the time interval of the transmitted waveform, and can complete the data transmission only by using two lines, which can be effectively reduced when applied to the electronic device. The size of the electronic device.
- the time parameter of the current transmission is determined.
- the time parameter is the length of time occupied by the data transmission.
- the number of time parameters does not correspond to N, and only the receiving end is consistent. This embodiment does not limit the specific number of time parameters, as long as the time interval corresponding to the value of the data bit can be expressed.
- step S401 the correspondence between the 2N different values and the time interval included in the N-bit data is obtained according to the time parameter.
- the time interval corresponding to the value of the 2-bit data can be expressed in various combinations of time parameters, and is not limited thereto.
- step S402 the current data bit string 0011100100 to be transmitted is acquired.
- step S403 the data bit string 0011100100 is grouped, and each group of data is 2 bits, that is, 00 11 10 01 00.
- the group data is transmitted in a manner that the group of data is represented by a time interval corresponding to the value of each group of data.
- the value of each set of data may correspond to one time interval, or may correspond to multiple identical time intervals, such as 00 may correspond to an etu time interval (eg, 10 ⁇ s), and after a signal at the time interval Send another signal, the duration of the etu thus formed represents the value 00; of course, 00 can also correspond to the time interval of three etu (for example, each time interval is 10 ⁇ s), and send three consecutively at etu intervals after one signal.
- the receiver will only accept the value of 00 if it receives the same three durations.
- the number of the time interval is the same as that of the receiving end, which is not limited in this embodiment.
- the transmission value 00 can be represented by the time interval of etu according to the order of the data bit string, the time interval of etu+3pdt represents the transmission value 11, and the time interval of etu+2pdt represents the transmission time value 10, the time interval of etu+pdt Indicates that the value of 01 is sent, and the time interval of etu indicates that the value 00 is transmitted.
- the waveform of the transmitted data bit string 0011100100 is as shown in FIG. 5, and the transmission of the data bit string is completed by the time interval between the respective signals.
- the time parameter of the current transmission is determined.
- N There is no corresponding relationship between the number of time parameters and N. This embodiment does not limit the specific number of time parameters, as long as the time interval corresponding to the value of the data bits can be expressed.
- step S401 the correspondence between the 2N different values and the time interval included in the N-bit data is obtained according to the time parameter.
- the time interval corresponding to the numerical value expressing the 1-bit data in various combinations is not limited thereto.
- step S402 the current data bit string 0011100100 to be transmitted is acquired.
- step S403 the data bit string 0011100100 is grouped, and each group of data includes 1 bit, that is, 0 0 1 1 1 0 0 1 0 0. This step can also be omitted.
- the group data is transmitted in a manner that the group of data is represented by a time interval corresponding to the value of each group of data.
- the value of each set of data may correspond to one time interval, or may correspond to multiple identical time intervals, such as 0 may correspond to an etu time interval (eg, 10 ⁇ s), and after a signal at the time interval Send another signal, the duration of the etu thus formed represents the value 0; of course, 0 can also correspond to the time interval of three etu (for example, each time interval is 10 ⁇ s), and send three consecutively at etu intervals after one signal. For each signal, the receiver will only accept the value of 0 if it receives the same three durations.
- each group of data may be sent in the order of data bit strings, that is, the time interval of each signal is etu time interval, etu time interval, pdt time interval, pdt time interval, pdt time interval, Etu time interval, etu time interval, pdt time interval, etu time interval, etu time interval.
- the waveform of the transmitted data bit string 0011100100 is as shown in FIG. 6, and the data bit string is transmitted by the time interval between the respective signals.
- the time parameter of the current transmission is determined.
- N There is no corresponding relationship between the number of time parameters and N. This embodiment does not limit the specific number of time parameters, as long as the time interval corresponding to the value can be expressed.
- step S401 the correspondence between the 2N different values and the time interval included in the N-bit data is obtained according to the time parameter.
- step S402 the current data bit string 0011100100 to be transmitted is acquired.
- step S403 the data bit string 0011100100 is grouped, and each group of data is 3 bits.
- the data bit string is complemented.
- Zero operation when the data bit sequence is sent from low to high, the high zero pad is: 000 011 100 100.
- the low pad is 001. 110 010 000.
- step S404 according to the acquired correspondence, the group data is transmitted in a manner that the group of data is represented by a time interval corresponding to the value of each group of data.
- the value of each set of data may correspond to one time interval, or may correspond to multiple identical time intervals.
- each group of data bits is transmitted in the order from the lower bit to the upper bit of the data bit string, that is, the signal of the time interval of transmitting etu+4pdt, the signal of the time interval of etu+4pdt, and the time interval of etu+3pdt.
- Signal the signal of the time interval of etu.
- the waveform of the transmitted data bit string 0011100100 is as shown in FIG. 7, and the data bit string is transmitted by the time interval between the respective signals.
- the data transmission mode is similar to the low to high bits, but the signals are sequentially transmitted at intervals corresponding to the values starting from the upper bits. , will not repeat them here.
- a plurality of time intervals may be used to correspond to different values in the B-bit data, where B is an integer multiple of N, B Is a positive integer.
- the embodiment provides a data processing device.
- the data processing device includes: a receiving module, and a judgment. a module, a time processing module, and a data processing module, wherein
- the receiving module is configured to receive K signals.
- the data processing device provided in this embodiment can determine whether the data can be started to be received through the relationship between the time intervals of the K signals, that is, if the K signals are received after the preset relationship is satisfied.
- the K signals can be regarded as a handshake signal indicating that data reception starts to be received; wherein the signal can be a pulse signal, that is, a high-level pulse signal (rising edge signal) is received, or a low-level pulse signal (down)
- the pulse signal may be a square wave, a sine wave, a triangular wave or other irregular waveform, or may be a combination of the above different waveforms.
- the receiving module is configured to receive K signals, including at least one of the following manners:
- Method 1 The receiving module detects K times of low-level pulses
- the receiving module can detect K times of low level pulses in a continuous high level. For example, after the receiving module detects a high level for a period of time, a low level pulse is detected, and then the detection is resumed. In the high level state, after a period of time, a low level pulse is detected again, and the receiving module can continuously detect K times of low level pulses in this manner.
- Method 2 The receiving module detects K times of high level pulses
- the receiving module can detect K times of the high level pulse in the continuous low level. For example, after the receiving module detects the low level for a period of time, the high level pulse is detected once, and then the detection is resumed. In the low level state, after a period of time, a high level pulse is detected again, and the receiving module can continuously detect K times of high level pulses in this manner.
- the K signals belong to the hopping signal, and the hopping amplitude is obvious, which is convenient for distinguishing from the noise signal.
- a judging module is configured to detect a time interval between each adjacent one of the K signals.
- the determining module detects a time interval between each adjacent two signals of the K signals, optionally, when the K signals are in a continuous high level.
- the judging module determines the duration between the start time of the p-th low-level signal and the start time of the p+1-th low-level signal as the pth and p+1th The time interval between the signals; similarly, when the K signals are K high-level signals in the continuous low level, the determining module determines the starting time of the p-th high-level signal to the p+1th
- the duration between the start times of the high level signals is the time interval between the pth and p+1th signals; wherein 1 ⁇ p ⁇ K-1, and p is a natural number; as an alternative
- the judging module accurately and quickly obtains the time interval between the start times of the two adjacent signals by detecting the start time of each pulse signal.
- the determining module is further configured to determine whether a preset relationship is satisfied between the first time interval and the second time interval.
- the first time interval may be the start time and the first time of the ith signal.
- the embodiment does not limit the number of time intervals in the first time interval group and the second time interval group, all of which are j, at least one, and the time processing module can determine the first time interval group and/or in this manner. Or a second time interval group, which facilitates classifying the time interval.
- the time processing module is configured to: according to at least one first time interval in the first time interval group and/or at least one second time in the second time interval group The interval determines the time parameter of the current data transmission.
- the time processing module determines a time parameter of the current data transmission according to at least one first time interval in the first time interval group and/or at least one second time interval in the second time interval group, specifically: time The processing module is configured according to at least two first time intervals in the first time interval group, or according to at least two second time intervals in the second time interval group, or according to at least one first time interval in the first time interval group And generating, by the at least one second time interval in the second time interval group, a rule according to a time parameter pre-agreed with the data sending end, and the first time The interval and the second interval are not adjacent.
- the time processing module is configured according to at least two first time intervals in the first time interval group.
- time parameter generating rule pre-agreed by the sending end, and the first time interval and the second time interval are not adjacent, determining a time parameter of the current data transmission, wherein the pre-agreed time parameter generating rule ensures that each data bit is encoded uniquely Under the premise, you can choose any kind of way to determine the time parameters.
- the first time interval is between the first signal and the start time of the second signal.
- the time interval, marked as t0, the second time interval is the time interval between the second signal and the start time of the third signal, marked as t1;
- the first time interval is the third signal and
- the time interval between the start times of the fourth signal is marked as t2
- the second time interval is the time interval between the fourth signal and the start time of the fifth signal, which is marked as t3; as an example, the following
- a manner of determining a time parameter of a current data transmission according to at least one first time interval in the first time interval group and/or at least one second time interval in the second time interval group is described in detail.
- the time processing module selects t0 and t2 as the first time interval group, and determines a time parameter of the current data transmission according to the first time interval group, where the time parameter includes the first time parameter etu and the first
- the two time parameters pdt, etu and pdt are uniquely represented by t0 and t2, and the values of etu and pdt can be obtained by arbitrary calculation according to the values of t0 and t2.
- etu and pdt can be obtained by any of the following calculation methods. Of course, it is not limited to the following calculation methods:
- the time processing module selects t0 as the first time interval group, and determines a time parameter of the current data transmission according to the first time interval group, where the time parameter includes the first time parameter etu and the second
- the time parameters pdt, etu and pdt are uniquely represented by t0, and the values of etu and pdt can be obtained by any calculation according to the value of t0.
- etu and pdt can be obtained by any of the following calculation methods, of course, not limited to The following calculation method:
- the time processing module selects t1 and t3 as the second time interval group, and determines a time parameter of the current data transmission according to the second time interval group, where the time parameter includes the first time parameter etu and
- the second time parameters pdt, etu and pdt are uniquely represented by t1 and t3, and the values of etu and pdt can be obtained by any calculation according to the values of t1 and t3.
- etu and pdt can be obtained by any of the following calculation methods. Of course, it is not limited to the following calculation methods:
- the time processing module selects t1 as the second time interval group, and determines a time parameter of the current data transmission according to the second time interval group, where the time parameter includes the first time parameter etu and the second
- the time parameters pdt, etu and pdt are uniquely represented by t1, and the values of etu and pdt can be obtained by any calculation according to the value of t1.
- etu and pdt can be obtained by any of the following calculation methods, of course, not limited to The following calculation method:
- the first time interval is the time between the first signal and the start time of the second signal.
- the interval is marked as t0
- the second time interval is a time interval between the second signal and the start time of the third signal, which is labeled as t1; as an example, the following is based on the first time interval group
- the manner in which the at least one first time interval and/or at least one of the second time interval groups determines the time parameter of the current data transmission is described in detail.
- t0 is selected as the first time interval group, and the time parameter of the current data transmission is determined according to the first time interval group, where the time parameter includes the first time parameter etu and the second time parameter pdt.
- etu and pdt are uniquely represented by t0, and the values of etu and pdt can be obtained by arbitrary calculation according to the value of t0, exemplary, Etu and pdt can be obtained by any of the following calculation methods, of course, not limited to the following calculation methods:
- t1 is selected as the second time interval group, and the time parameter of the current data transmission is determined according to the second time interval group, where the time parameter includes the first time parameter etu and the second time parameter pdt.
- etu and pdt are uniquely represented by t1, and the values of etu and pdt can be obtained by any calculation according to the value of t1.
- etu and pdt can be obtained by any of the following calculation methods, of course, not limited to the following calculation methods. :
- the time processing module may select t0, t2, and t5 as the first time interval group, or t1, t3, and t6 as the second time interval group, and the time processing module
- Time interval to determine the time of the current data transmission And determining, according to at least two second time intervals in the second time interval group, a time parameter of the current data transmission, or according to at least one of the first time interval group and the second time interval group in the first time interval group
- a second time interval jointly determines a time parameter of the current data transmission, and the first time interval and the second time interval are not adjacent, and the time parameters etu and pdt are not uniquely obtained, and the time processing module can adopt different calculation methods.
- the first time interval is the time between the first signal and the start time of the second signal.
- the interval is marked as t0
- the second time interval is the time interval between the second signal and the start time of the third signal, and is marked as t1; as an example, the following A manner in which at least one first time interval in a time interval group and/or at least one second time interval in the second time interval group determines a time parameter of a current data transmission is described in detail.
- t0 is selected as the first time interval group, and the time parameter of the current data transmission is determined according to the first time interval group, where the time parameter includes the first time parameter etu and the second time parameter pdt.
- etu and pdt are uniquely represented by t0, and the values of etu and pdt can be obtained by arbitrary calculation according to the value of t0.
- etu and pdt can be obtained by any of the following calculation methods, of course, not limited to the following calculation methods. :
- t1 is selected as the second time interval group, and the time parameter of the current data transmission is determined according to the second time interval group, where the time parameter includes the first time parameter etu and the second time parameter pdt.
- etu and pdt are uniquely represented by t1, and the values of etu and pdt can be obtained by any calculation according to the value of t1.
- etu and pdt can be obtained by any of the following calculation methods, of course, not limited to the following calculation methods. :
- the specific implementation manner of determining the time parameter of the current data transmission in this embodiment is only an exemplary implementation manner, and the present application does not exclude other time parameter generation rules according to at least two first time intervals in the first time interval group. Or determining current data according to at least two second time intervals in the second time interval group, or according to at least one first time interval in the first time interval group and at least one second time interval in the second time interval group The implementation of the time parameter of the transmission.
- the time processing module determines the time parameters etu and pdt through the first time interval group and/or the second time interval group, thereby ensuring that the values of etu and pdt are maintained at the transmitting end and the receiving end each time data transmission is performed. Consistently, the stability and accuracy of each data transmission are guaranteed. Because each time before the data transmission, the receiving end will re-determine the values of the time parameters etu and pdt according to the handshake information sent by the transmitting end, thereby avoiding the frequency difference due to multiple characters. Continuous reception causes error accumulation, effectively preventing the sampling error of the receiving end when the difference between the transmission clock and the receiving time parameter is too large, causing receiving errors and reducing communication efficiency.
- the receiving module is instructed to continue receiving the handshake signal.
- a data processing module for receiving data according to a time parameter.
- the receiving module is further configured to receive X signals, determine a time interval between start times of each of the two adjacent X signals, and obtain X-1 times.
- An interval where X is a positive integer, and X>1;
- the data processing module is further configured to receive the X signals according to the time parameter, specifically, the data processing module, configured to acquire each consecutive S in the X-1 time interval N data bits corresponding to a single time interval in a time interval, the data bits transmitted in the S time intervals are obtained, and the obtained data bits transmitted in the S time intervals are the obtained N data bits, wherein, in the case of S>1 Next, S time intervals are the same, wherein X and S are both positive integers, and S ⁇ X-1.
- the data bit is determined according to the time parameter of the current data transmission, such as the current data receiving end and the data sending end.
- the data processing module performs data reception according to the first time parameter etu and the second time parameter pdt according to a codec rule agreed in advance with the data sending end; the data processing module according to the time parameter Receiving the data includes: obtaining, according to the time parameter, a correspondence between 2 N different values and time intervals included in the N-bit data, wherein different time values corresponding to different values are different, wherein N ⁇ 1.
- the data processing module acquires the correspondence between the 2N different values and the time interval included in the N-bit data according to the first time parameter etu and the second time parameter pdt according to the codec rule agreed in advance with the data transmitting end, and the pre-agreed editing
- the decoding rule may be any manner that can ensure that N data bits of different values correspond to a unique time interval, exemplarily:
- N data bits of different values include: 0, 1, at this time,
- N data bits of different values include: 00, 01, 10, and 11, at this time,
- N data bits of different values include: 000, 001, 010, 011, 100, 101, 110, 111.
- the time interval corresponding to the 2N different values included in the N-bit data is obtained according to the codec rule that is pre-agreed with the data sending end.
- codec rule that is pre-agreed with the data sending end.
- the data processing module obtains a time interval corresponding to 2 N different values included in the N-bit data according to the first time parameter etu and the second time parameter pdt in a manner agreed in advance with the data transmitting end, wherein the time intervals corresponding to the different values are different. Therefore, the different data bits corresponding to the received different time intervals are distinguished, and the data sent by the transmitting end is obtained by using the received time interval.
- the time processing module is further configured to obtain a time interval corresponding to N bits of different values according to a time parameter before the data processing module acquires the transmitted data, where N bits of different values are used.
- the corresponding time interval is different, N ⁇ 1.
- the time interval of the data bit is calculated by a pre-negotiated calculation method, and the scalability of the data transmission can be ensured, that is, regardless of the value of N, the data transmitting end and the data receiving end can calculate the time of the data bit. interval.
- the data receiving end may also use a list pre-stored with the data transmitting end to determine the time interval of the data bit.
- the data processing module may determine the time interval of the data bit by using a lookup list, thereby improving the efficiency of obtaining the data bit time interval.
- X-1 n*S, n ⁇ 1 and n is an integer.
- X signals can transmit n*S data bits, and There is no problem with redundant signals that can't be decoded.
- the data processing device further includes a time parameter update module, which can be used to replace the time parameter, that is, replace the current used time parameter with a new one according to a preset rule.
- the time parameter, the new time parameter is used as the time parameter of the current data transmission;
- the data processing module is further configured to decode the received X signals according to the time interval corresponding to the N bits of the reacquired different values, that is, according to the current Using the time parameter, the N bits corresponding to a single time interval in each consecutive S time interval in the X-1 time interval are obtained, and the data bits transmitted in the S time intervals are obtained, and the obtained data bits of the S time intervals are obtained. N bits.
- the determination of the new time parameter may be completed by negotiation between the data sending end and the data receiving end, or may be completed by searching the pre-stored time parameter table by the data sending end and the data receiving end, for example, sending a certain type of number. According to the time table, the time parameter that the type of data should be used is determined. The time parameter of the data transmitting end can be changed, and the data receiving device capable of matching different data processing capabilities or matching different types of data can further improve the efficiency of data processing.
- the receiving module is further configured to: after completing the reception of the last data bit, further receive an end signal (Z ⁇ 1 and an integer), and the end signal may be combined with the handshake signal. Similarly, it may be a signal of another specific format, by which the data processing module can determine whether the data bit is received or not.
- the receiving module is further configured to: after receiving the last data bit, or after receiving the A end signal, the receiving module is further configured to receive the check data bit, Through the check data bit, it is judged whether the received data is complete and correct.
- the check data bits include check data calculated by a check method such as MAC check, parity check, and sum check.
- the data processing device further includes a filtering module, configured to receive Z signals, remove interference in the Z signals, obtain X signals, and send the signals to the receiving module. , where Z ⁇ X.
- the data processing module can determine the data bits of the received waveform according to the time interval of receiving the waveform, and can complete the data reception only by using two lines, which can be effectively applied when used in an electronic device. Reduce the size of the electronic device.
- the data processing device in this embodiment further includes: a data sending module, where the data sending module is configured to perform time parameters in the data processing module. After receiving the data, the data is sent according to the time parameter.
- a data sending module where the data sending module is configured to perform time parameters in the data processing module. After receiving the data, the data is sent according to the time parameter.
- the specific structure of the data sending module and the implementation manner of the data sending module transmitting the data according to the time parameter refer to the detailed description of the data sending module in FIG. 11 in Embodiment 7. .
- the data processing module provided in this embodiment re-determines the time parameter according to the handshake information before receiving the data each time, ensuring that the time parameters of the transmitting end and the receiving end are always consistent, ensuring the stability and accuracy of the data transmission; the signal is transmitted by using a pulse signal. It is convenient to distinguish from noise signals; by detecting the rising or falling edge of each signal trigger, the starting time of each signal can be easily obtained, so that the time between the start times of two adjacent signals can be accurately and quickly obtained.
- the interval is determined according to the obtained time interval to determine whether the time interval between the signals satisfies the preset relationship, and whether the received signal is a valid handshake signal, so that the judging process is accurate and rapid, and the success rate is high, according to the first time interval and/or Or determining the first time interval group and/or the second time interval group by the second time interval, and determining the time parameters etu and pdt by the first time interval group and/or the second time interval group, thereby ensuring each data transmission
- the sender and receiver receive the same values for etu and pdt, ensuring each data transmission.
- the receiving end will re-determine the values of the time parameters etu and pdt according to the handshake information sent by the transmitting end before each data transmission, thereby avoiding the error accumulation caused by the continuous reception of the frequency difference due to the continuous reception of multiple characters, effectively preventing When sending clock and receive time parameters When the difference is too large, the receiving end is sampled and misaligned, resulting in a receiving error and a technical problem of reduced communication efficiency.
- the embodiment provides a data processing device.
- the data processing device includes: a second time parameter module, a second time processing module, and a second signal generation and sending module.
- the second time parameter module is configured to determine a time parameter.
- the time parameter may include the first time parameter and/or the second time parameter.
- the first time parameter is recorded as etu and the second time is used in this embodiment.
- the time interval for sending the handshake signal is determined, and the receiving end may determine the handshake signal according to the received handshake signal.
- the description is convenient for description, and only two time parameters are used.
- the first time interval group and the second time interval group are determined by using two time parameters, but the case of multiple time parameters is not excluded.
- the second time processing module is configured to determine a first time interval group and a second time interval group according to the time parameter, where the first time interval group includes j first time intervals, and the second time The interval group includes j second time intervals.
- the first time interval refers to a start time of the ith signal and a start time of the i-1th signal when the second signal generation and transmission module sends K handshake signals.
- the time interval between them is denoted as T i-1,i
- the second time interval refers to the time interval between the start time of the i-th signal and the start time of the i+1th signal when K handshake signals are transmitted.
- the first time interval T i-1,i in the first time interval group and the second time interval T i,i+1 in the second time interval group satisfy a certain
- the preset relationship can ensure the validity of the handshake signal, so that the receiving end can receive the handshake signal according to the first time interval T i-1,i and the second time interval T i.
- a preset relationship of i+1 determining that the handshake signal is a signal for instructing to start receiving data; and second, each first time interval T i-1,i in the first time interval group and the first time parameter etu and The second time parameter pdt satisfies a certain preset relationship, so that after receiving the handshake signal, the receiving end can calculate the first time parameter etu by using the received multiple first time intervals according to the same preset relationship. And/or the second time parameter pdt, so that the receiving end can calculate the bit data corresponding to the time interval of the transmission according to the first time parameter etu and/or the second time parameter pdt.
- the first time interval T i-1,i in the first time interval group and the second time interval T i,i+1 in the second time interval group satisfy a certain preset relationship, which may include many
- the first time interval T i-1,i in the first time interval group satisfies a certain preset relationship with the first time parameter etu and/or the second time parameter pdt, and includes a plurality of types, below, by way of example A detailed explanation of the sexual approach.
- t0 and t2 are the first time interval group
- t1 and t3 are the second time interval group
- the preset relationship between the first time interval and the second time interval means that between t0 and t1, and t2.
- the preset relationship is satisfied at the same time as t3, and the preset relationship may be determined according to the experience of the technician or determined according to actual operating parameters.
- each first time interval T i-1, i t0, t2 in the first time interval group and the first time parameter etu and/or The second time parameter pdt satisfies a certain preset relationship and is described in detail:
- the first time interval t0 and t2 are generated according to one of the first time parameter etu or the second time parameter pdt by using a preset time parameter generation rule.
- t0 and t2 can be obtained by any of the following calculation methods.
- the preset time parameter generation rules are not limited to the following calculation methods:
- the receiving end can calculate etu by using t0 and t2 through the same preset time parameter generation rule.
- the first time interval t0 and t2 are generated according to the preset time parameter generation rule according to the first time parameter etu and the second time parameter pdt, and t0 and t2 can be obtained by any one of the following calculation methods, of course, the preset The time parameter generation rule is not limited to the following calculation methods:
- T2 x*a*etu+b*pdt
- a and b are natural numbers ⁇ 1, and x is a rational number. Therefore, the receiving end can calculate etu and pdt by using t0 and t2 through the same preset time parameter generation rule.
- the first time interval t0 and t2 are generated according to the preset time parameter generation rule according to the first time parameter etu and the second time parameter pdt, and t0 and t2 can be obtained by any one of the following calculation methods, of course, the preset The time parameter generation rule is not limited to the following calculation methods:
- T2 a*etu+x*b*pdt
- a and b are natural numbers ⁇ 1, and x is a rational number. Therefore, the receiving end can calculate etu and pdt by using t0 and t2 through the same preset time parameter generation rule.
- the first time interval T 1,2 is the first signal and the second signal.
- the time interval between the start times is marked as t0
- the second time interval T 2,3 is the time interval between the second signal and the start time of the third signal, labeled as t1;
- the first The time interval T 3,4 is the time interval between the start of the third signal and the fourth signal, denoted as t2
- the second time interval T 4,5 is between the fourth signal and the start time of the fifth signal
- the t1, t3, and t5 of the second time interval group and the t0, t2, and t4 of the first time interval group respectively satisfy a preset relationship, that is, between t0 and t1, and t2 and t3. And satisfying the preset relationship between t4 and t5, determining the first time interval t0, t2 of the first time interval group by using the preset time parameter generation rule according to the first time parameter etu and/or the second time parameter pdt And the value of t4, the preset time parameter generation rule may adopt different manners, for example, the first time interval t0, t2, and t4, according to one of the first time parameter etu or the second time parameter pdt through the preset The time parameter generation rule is generated. Taking etu as an example, t0, t2, and t4 can be obtained by any of the following calculation methods. Of course, the preset time parameter generation rule is not limited to the following calculation methods:
- the receiving end can calculate etu by using t0, t2, and t4 through the same preset time parameter generation rule.
- the first time interval t0, t2, and t4 are generated according to the first time parameter etu and the second time parameter pdt by using a preset time parameter generation rule, and t0, t2, and t4 may be obtained by any one of the following calculation methods, of course,
- the preset time parameter generation rule is not limited to the following calculation methods:
- T2 x*a*etu+b*pdt
- T4 2x*a*etu+b*pdt
- a and b are natural numbers ⁇ 1, and x is a rational number. Therefore, the receiving end can calculate etu and pdt by using t0, t2, and t4 through the same preset time parameter generation rule.
- the first time interval t0, t2, and t4 are generated according to the first time parameter etu and the second time parameter pdt by using a preset time parameter generation rule, and t0, t2, and t4 may be obtained by any one of the following calculation methods, of course,
- the preset time parameter generation rule is not limited to the following calculation methods:
- T2 a*etu+x*b*pdt
- T4 a*etu+2x*b*pdt
- a and b are natural numbers ⁇ 1, and x is a rational number. Therefore, the receiving end can calculate etu and pdt by using t0, t2, and t4 through the same preset time parameter generation rule.
- the specific implementation manners of determining the first time interval group and the second time interval group of the current data transmission in this embodiment are merely exemplary embodiments, and the present application does not exclude other time parameter generation rules according to the first time parameter etu and / or the second time parameter pdt determines the implementation of the first time interval of the first time interval group, and does not exclude the preset relationship of the other first time interval and the second time interval.
- the first time interval group is determined by the time parameter etu and/or pdt, thereby ensuring that the values of etu and pdt are consistent between the transmitting end and the receiving end each time data transmission is performed, thereby ensuring stable data transmission every time.
- Sex and accuracy because the handshake information sent by the sender before each data transmission re-determines the values of the time parameters etu and pdt, avoiding the frequency difference caused by the continuous reception of multiple characters, effectively preventing the transmission of the clock and
- the receiving end samples the sampling misalignment, causing the receiving error and the communication efficiency to be reduced.
- the second signal generation transmitting module is configured to generate and transmit K handshake signals.
- generating and sending K handshake signals includes: generating and transmitting K handshake signals according to the first time interval group and the second time interval group; wherein, K The foregoing preset relationship is satisfied between the first time interval and the second time interval in the handshake signal.
- K The foregoing preset relationship is satisfied between the first time interval and the second time interval in the handshake signal.
- generating and sending K handshake signals includes: generating and transmitting K handshake signals according to the first time interval group and the second time interval group; wherein, K The foregoing preset relationship is satisfied between the first time interval and the second time interval in the handshake signal.
- K is a preset value
- K ⁇ 3 and K is an odd number
- the signal may be a pulse signal, that is, a high-level pulse signal (rising edge signal) or a low-level pulse signal is received. (falling edge signal), the pulse signal can be a square wave, a sine wave, a triangle wave or other irregular waveform, or a combination of the above different waveforms.
- the second signal generating and transmitting module generates and transmits K signals, including at least one of the following manners:
- the second signal generating sending module generates and sends K times of low level pulses
- the second signal generating and transmitting module triggers K times of the low level pulse in the continuous high level.
- the second signal generating transmitting module triggers the low level after the first time interval of continuously triggering the high level.
- the flat pulse is then restored to the state of triggering the high level.
- the low level pulse is triggered again. In this way, K times of low level pulses can be continuously generated.
- the first time interval can be The time interval between the start time of the i-th signal and the start time of the i-1th signal
- the second time interval may be the start time of the i-th signal and the opening of the i+1th signal
- the first time interval is the first signal and the second signal starts.
- the time interval between times is marked as t0
- the second time interval is the time interval between the second signal and the start time of the third signal, and is marked as t1;
- the first time interval is the third time
- the second time interval is the time interval between the fourth signal and the start time of the fifth signal, labeled t3, and the second signal is sent.
- the module triggers 5 low-level pulses in a continuous high level, including: the second signal generation transmitting module triggers the first low-level pulse after continuously triggering the high level for a period of time, and then resumes triggering the high level. State, after t0, triggers the second low-level pulse, and then resumes the state of triggering the high level. After t1, the third low-level pulse is triggered, and then the state of triggering the high level is resumed. After t2, the fourth low-level pulse is triggered, After that, the state of triggering the high level is resumed. After t3, the fifth low-level pulse is triggered, and in this way, the low-level pulse can be continuously generated 5 times, and the first time interval and the second time interval are satisfied.
- the second signal generation transmitting module generates and sends K times a high level pulse
- the second signal generating transmitting module triggers K times of the high level pulse in the continuous low level. For example, the second signal generating transmitting module triggers the high level after the first time interval of continuously triggering the low level. The flat pulse is then restored to the state of triggering the low level. After the second time interval, the high level pulse is triggered once again. In this way, the K high level pulse can be continuously generated.
- the first time interval can be The time interval between the start time of the i-th signal and the start time of the i-1th signal
- the first time interval is the first signal and the second signal starts.
- the time interval between times is marked as t0
- the second time interval is the time interval between the second signal and the start time of the third signal, and is marked as t1;
- the first time interval is the third time
- the second time interval is the time interval between the fourth signal and the start time of the fifth signal, labeled t3, and the second signal is sent.
- the module triggers 5 high-level pulses in a continuous low level, including: the second signal generation transmitting module triggers the first high-level pulse after continuously triggering the low level for a period of time, and then resumes triggering the low level.
- the state after t0, triggers the second high-level pulse, and then resumes the state of triggering the low level, after t1, triggers the third high-level pulse, and then resumes the state of triggering the low level.
- the fourth high pulse is triggered, then After that, the state of triggering the low level is resumed.
- the fifth high-level pulse is triggered, and in this way, the high level can be continuously generated 5 times.
- the preset relationship can be multiple, and will not be described here to form an effective handshake signal.
- the K signals belong to the hopping signal, and the hopping amplitude is obvious, which is convenient for distinguishing from the noise signal.
- the data processing device in this embodiment further includes: a data sending module, where the data sending module is configured to generate and send K handshakes in the second signal generating and sending module. After the signal, the data is sent according to the time parameter.
- a data sending module where the data sending module is configured to generate and send K handshakes in the second signal generating and sending module. After the signal, the data is sent according to the time parameter.
- the specific structure of the data sending module and the implementation manner of the data sending module transmitting the data according to the time parameter refer to the detailed description of the data sending module in Embodiment 7.
- the time parameter is re-determined according to the handshake information before each data is received, so that the time parameters of the transmitting end and the receiving end are always consistent, and the stability and accuracy of the data transmission are ensured;
- the signal is transmitted by using a pulse signal, which is convenient for distinguishing from the noise signal;
- the receiving end will re-determine the values of the time parameters etu and pdt, which avoids the frequency difference caused by the continuous reception of multiple characters, effectively preventing the difference between the sending clock and the receiving time parameter.
- it causes the receiving end to sample the misalignment, causing reception errors and technical problems of reducing communication efficiency.
- FIG. 11 is a schematic structural diagram of an optional data transmission module according to the embodiment, which includes: a time interval acquisition unit and a data bit string acquisition. Unit, sending unit, where:
- the time interval obtaining unit acquires a correspondence between 2 N different values and time intervals included in the N-bit data according to the time parameter, wherein different time intervals corresponding to different values are different, N ⁇ 1.
- the time interval corresponding to the value can be calculated.
- the present application may also use other pre-negotiated calculation methods to determine the time interval, which is not limited in this application.
- the time interval corresponding to the value is calculated by a pre-negotiated calculation method to ensure the scalability of data transmission, that is, regardless of the value of N, both the transmitting end and the receiving end can calculate different values and time intervals. Correspondence relationship.
- the time interval obtaining unit acquires 2N different N-bit data according to a codec rule agreed in advance with the data sending end according to the first time parameter etu and the second time parameter pdt.
- the correspondence between the value and the time interval, the pre-agreed codec rule may be any manner that can ensure that N data bits of different values correspond to a unique time interval, exemplarily:
- N data bits of different values include: 0, 1, at this time,
- N data bits of different values include: 00, 01, 10, and 11, at this time,
- N data bits of different values include: 000, 001, 010, 011, 100, 101, 110, 111.
- the time interval obtaining unit obtains the time interval corresponding to the 2N different values of the N-bit data according to the codec rule that is pre-agreed by the data transmitting end.
- codec rule that is pre-agreed by the data transmitting end.
- the time interval obtaining unit of the data sending module may also be adopted.
- the time interval corresponding to the value is determined by using a list that is pre-negotiated and stored with the data receiving end, and the time interval corresponding to the value is determined by using a lookup list, thereby improving the efficiency of obtaining the time interval corresponding to the value.
- the time interval obtaining unit of the data sending module searches for The pre-stored list is used to determine whether the time interval corresponding to the calculated value belongs to the receiving range of the data receiving end. By calculating the time interval corresponding to the value and further searching the list, the time interval corresponding to the value is obtained, and the scalability of the data transmission can be improved under the premise that the data receiving end can be normally received.
- the data bit string obtaining unit is configured to acquire a data bit string to be currently transmitted, and group the data bit string, and each group of data is N bits.
- the data bit string obtaining unit may generate a data bit string to be sent by itself, or may receive a data bit string to be sent from other devices or other units of the data processing device. It is not limited to the manner of obtaining the data bit string to be sent at present, and the manner in which the data bit string to be currently transmitted can be finally obtained is within the protection scope of the present application.
- the data processing device can be used as a switching device, which can transfer the communication between the other device (hereinafter referred to as the first terminal) and the data receiving device.
- the data processing device passes Obtaining a data bit string to be sent in the following manner: receiving the first data by using the first interface; decoding the first data according to the protocol supported by the first interface, and obtaining the first data bit string to be sent.
- the data processing device may have two communication interfaces, such as a first interface and a second interface, the first interface is an interface for communicating with the first terminal, and the second interface is for communicating with the receiving end of the data.
- the first interface may be an existing universal interface, including a wireless interface, such as a USB interface, an audio interface, a serial port, a Bluetooth, a wifi, an NFC interface, etc., through which the first interface can be connected to the first terminal to receive The first data sent from the first terminal.
- the first terminal may be a mobile phone, a computer, a PAD, or the like.
- the first data may be a mobile phone, a computer, or a data that needs to be transmitted on the PAD end.
- the first interface can decode the received first data by using a protocol supported by itself.
- the first interface can be based on a USB protocol, an audio protocol, a serial protocol, a Bluetooth protocol, a wifi protocol,
- the NFC protocol or the like decodes the first data, and obtains a data bit string corresponding to the first data, where the data bit string is a first data bit string to be transmitted (ie, a data bit string to be transmitted currently).
- the second interface may be an interface connected to an electronic payment device (ie, a data receiving device) through which data bits are transmitted to the electronic payment device.
- the second interface can be a two-wire interface; the electronic payment device can implement a USBkey function, an OTP function, and a smart card function.
- Transferring the data of the present application to the switching device, and performing data conversion through the first interface can convert data sent by the terminal into data suitable for communication with the data receiving device, and realize conversion between different interfaces.
- the scope of use of the data transmitting module of the present application is expanded.
- the data bit string obtaining unit may perform the operation of acquiring the data bit string and the packet at any time, as long as the data is transmitted before the transmitting unit performs the data transmission.
- the transmitting end of the data may be operated by the corresponding relationship between the 2 N different values and the time interval included in the N-bit data acquired by the time interval acquiring unit before each data transmission, or the transmitting end of the data may also be first
- the time interval obtaining unit performs the operation, and each time the data is sent, the correspondence between the 2N different values and the time interval included in the N-bit data obtained by the time interval obtaining unit is used to encode the data to be sent, or , an expiration date may be set, and data is sent within the expiration date, and the correspondence between 2 N different values and time intervals included in the N-bit data obtained by the operation of the time interval acquisition unit is used to encode the data to be sent.
- each time an event trigger is received for example, the user inputs a time parameter of the current data transmission, and calculates a correspondence between the 2 N different values and the time interval included in the N-bit data.
- the specific embodiment is not limited.
- the data bit string obtaining unit groups the data bit strings, and each group of data is N bits, which can be grouped in multiple manners, and can be grouped by using each group including 1 bit, or The grouping is performed by using two bits per group.
- the data bit string includes a single number, since the two bits cannot be completely grouped, the data bit string can be complemented by 0 and then grouped.
- the data transmitting end and the data are used.
- the receiving end presets or negotiates the method of complementing 0.
- the bit string is transmitted from the upper bit of the data
- the last bit of the bit string is padded with 0.
- the bit string is The high position is 0.
- each group includes 3 bits or more can be grouped by referring to each group including 2 bits, and details are not described herein again.
- a sending unit configured to send the group of data according to the acquired correspondence, by indicating the group of data at a time interval corresponding to the value of each group of data.
- each set of data bits may correspond to one time interval, or may correspond to multiple identical time intervals.
- the value of each set of data bits corresponds to multiple time intervals, and the value corresponding to the time interval can be accurately determined to prevent errors caused by the lost time interval during data transmission.
- the transmitting unit is configured to generate and transmit M signals for each set of data bits when transmitting the set of data bits, wherein the start time of each signal and the adjacent upper
- the time interval of the start time of a signal is the time interval corresponding to the set of data bits, M ⁇ 1 and M is a natural number.
- the time interval generated by the signal is easy to detect and high stability.
- the sending unit is configured to generate M signals in a manner of generating M low-level pulses according to time intervals, or may generate M signals in a manner of generating M high-level pulses according to time intervals.
- the low-level pulse/high-level pulse can be represented by a square wave, a sine wave, a triangular wave, or the like, which can distinguish between high and low level pulses, and is not limited herein.
- the low-level pulse is generated according to the time interval.
- the data transmitting end communicates with the data receiving end, the data transmitting end can use the high level to supply power to the data receiving end, and transmit the information by the low-level pulse.
- the device adopting the method can use the same line to complete power supply and information transmission at the same time when performing information exchange, thereby reducing equipment volume and manufacturing cost.
- the time parameter is transmitted by using the time interval between the K handshake signals, so that the data receiving end can obtain the time parameter used by the data processing device according to the K handshake signals, and further confirm the use of the data receiving end.
- a time parameter updating unit may be further included, according to the preset rule. Replace the current time parameter with the new time parameter, and use the new time parameter as the time parameter of the current data transmission; the trigger time interval acquisition unit updates the correspondence according to the new time parameter; the time interval acquisition unit is also used to follow The time parameter of the current data transmission updates the corresponding relationship; the sending unit is further configured to perform data transmission by using the updated correspondence.
- the determination of the new time parameter may be completed by negotiation between the data sending end and the data receiving end, or may be completed by searching the pre-stored time parameter table by the data sending end and the data receiving end, such as sending some type of data.
- the time table determines the time parameters that should be used for this type of data.
- the time parameter of the data sending module can be changed, and the data receiving device that can match different data processing capabilities or match different types of data can further improve the efficiency of data processing.
- the data sending module may further include a check data sending unit, and after the sending list completes transmitting the last set of data, the check data sending unit sends the check data.
- the check data includes, but is not limited to, check data calculated by a check method such as MAC check, parity check, and checksum.
- the data sending module may further include an end signal sending unit, where the unit is configured to send the last data set after the sending unit completes, or check the data bit sending. After the unit transmits the verification data, the A (A ⁇ 1 and an integer) end signals are transmitted, and the end signal may be the same as or different from the handshake signal, and the data receiving device may determine whether the data reception is ended by the end signal.
- the data processing device can represent the data bits of the transmitted waveform according to the time interval of the transmitted waveform, and can complete the data transmission only by using two lines, which can be effectively applied when used in an electronic device. Reduce the size of the electronic device.
- portions of the application can 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.
- each functional unit in each embodiment of the present application 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.
- the integrated modules, if implemented in the form of software functional modules and sold or used as stand-alone products, may also be stored in a computer readable storage medium.
- the above mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
Landscapes
- Physics & Mathematics (AREA)
- Spectroscopy & Molecular Physics (AREA)
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Communication Control (AREA)
- Dc Digital Transmission (AREA)
Abstract
本申请提供一种数据传输方法及数据处理设备,该方法包括:接收K个信号,检测K个信号中每相邻两个之间的时间间隔,判断第一时间间隔与第二时间间隔之间是否满足预设关系,确定第一时间间隔组和/或第二时间间隔组,如果满足预设关系,则根据第一时间间隔组和/或第二时间间隔组确定当前数据传输的时间参数;按照时间参数接收数据。本申请可以保证每次数据传输的稳定性与准确性,有效防止了当发送时钟和接收时间参数差异太大时,引起接收端采样错位,造成接收错误,通讯效率降低的技术问题。
Description
相关申请的交叉引用
本申请基于申请号为201510604981.5、申请日为2015/9/21的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
本申请涉及一种电子技术领域,尤其涉及一种数据传输方法及数据处理设备。
电子电路之间的串行通讯方式主要分为同步通信方式和异步通信方式。同步通信方式要求通信双方以相同的时钟频率进行,而且准确协调,通过共享一个单个时钟或定时脉冲源保证发送方和接收方的准确同步,效率较高;异步通信方式不要求双方同步,收发方可采用各自的时钟源,双方遵循异步的通信协议,以字符为数据传输单位,发送方传送字符的时间间隔不确定,发送效率比同步传送效率低。
以DART协议为例,其特点是一个字符一个字符地传输,每个字符一位一位地传输,并且传输一个字符时,总是以“起始位”开始,以“停止位”结束,字符之间没有固定的时间间隔要求。发送端的发送时钟和接收端的接收时钟,其频率允许有一定差异,当频率差异值在一定范围内,不会引起接收端检测错位,能够正确接收,并且这种频率差异不会因多个字符的连续接收而造成误差累计,因为每个字符的起始位处接收方均重新定位。而当发送时钟和接收时钟频率差异值太大时,会引起接收端采样错位,造成接收错误,通讯效率降低。
因此亟需提供一种新的数据传输方法及数据处理设备来解决上述问题。
发明内容
本申请旨在解决上述问题之一。
本申请的主要目的在于提供一种数据传输方法,为达到上述目的,本申请的技术方案具体是这样实现的:
本申请一方面提供一种数据传输方法,包括:
接收K个信号,检测所述K个信号中每相邻两个之间的时间间隔,判断第一时间间隔与第二时间间隔之间是否满足预设关系,所述第一时间间隔为第i个所述信号的开始时刻
与第i-1个所述信号的开始时刻之间的时间间隔,所述第二时间间隔为第i个所述信号的开始时刻与第i+1个所述信号的开始时刻之间的时间间隔,i=2,4,……,2j,j=(K-1)/2,K≥3且K为奇数;
确定第一时间间隔组和/或第二时间间隔组,所述第一时间间隔组包括j个所述第一时间间隔,所述第二时间间隔组包括j个所述第二时间间隔;
若所述第一时间间隔与所述第二时间间隔满足预设关系,则根据所述第一时间间隔组中的至少一个第一时间间隔和/或所述第二时间间隔组中的至少一个第二时间间隔确定当前数据传输的时间参数;
按照所述时间参数接收数据。
在本申请的至少一个实施例中,所述接收K个信号包括:检测到K次低电平脉冲。
在本申请的至少一个实施例中,所述按照所述时间参数接收数据包括:按照所述时间参数获取N比特数据包含的2N个不同数值与时间间隔的对应关系,其中,不同数值对应的时间间隔不同,其中,N≥1;接收X个信号,确定所述X个信号中每相邻两个信号的起始时刻之间的时间间隔,得到X-1个时间间隔,其中,X为正整数,且X>1;根据确定的所述时间参数,获取所述X-1个时间间隔中每连续S个时间间隔中单个时间间隔对应的数值,得到所述S个时间间隔传输的数值,所述S个时间间隔传输的数值为所述单个时间间隔对应的数值,所述数值为N比特数据包含的2N个不同数值中的一个,其中,在S>1的情况下,所述S个时间间隔相同,其中,X和S均为正整数,且S≤X-1,N≥1。
在本申请的至少一个实施例中,X-1=n*S,n≥1且n为整数。
在本申请的至少一个实施例中,所述接收X个信号包括:检测到X次低电平脉冲。
在本申请的至少一个实施例中,接收X个信号包括:接收Y+1个信号,去除所述Y+1个信号中的干扰,得到所述X个信号,其中Y+1≥X。
在本申请的至少一个实施例中,在所述按照所述时间参数接收数据之后,还包括:按照所述时间参数进行数据发送。
在本申请的至少一个实施例中,所述按照所述时间参数进行数据发送,包括:按照所述时间参数获取N比特数据包含的2N个不同数值与时间间隔的对应关系,其中,不同数值对应的时间间隔不同,其中,N≥1;获取当前待发送的数据比特串;将所述数据比特串进行分组,每组数据为N比特;根据获取的所述对应关系,以每组数据的数值对应的时间间隔表示该组数据的方式发送该组数据。
在本申请的至少一个实施例中,若所述第一时间间隔与所述第二时间间隔不满足所述预设关系,则继续执行接收所述K个信号的步骤。
本申请另一方面提供一种数据传输方法,包括:确定时间参数;根据所述时间参数确定第一时间间隔组与第二时间间隔组,其中,所述第一时间间隔组包括j个第一时间间隔,所述第二时间间隔组包括j个第二时间间隔;
产生并发送K个握手信号,其中,所述第一时间间隔与所述第二时间间隔之间满足预设关系;所述第一时间间隔为第i个所述握手信号的开始时刻与第i-1个所述握手信号的开始时刻之间的时间间隔,所述第二时间间隔为第i个所述握手信号的开始时刻与第i+1个所述握手信号的开始时刻之间的时间间隔,i=2,4,……,2j,j=(K-1)/2,K≥3且K为奇数。
在本申请的至少一个实施例中,所述产生K个握手信号包括:按照所述第一时间间隔和所述第二时间间隔产生K次低电平脉冲。
在本申请的至少一个实施例中,在所述产生并发送K个握手信号之后,所述方法还包括:按照所述时间参数获取N比特数据包含的2N个不同数值与时间间隔的对应关系,其中,不同数值对应的时间间隔不同,其中,N≥1;获取当前待发送的数据比特串;将所述数据比特串进行分组,每组数据为N比特;根据获取的所述对应关系,以每组数据的数值对应的时间间隔表示该组数据的方式发送该组数据。
在本申请的至少一个实施例中,对于每组数据,发送该组数据,包括:产生并发送M个信号,其中,每个所述信号的开始时刻与相邻的上一个信号的开始时刻的时间间隔为该组数据的数值对应的时间间隔,M≥1且M为自然数。
在本申请的至少一个实施例中,所述产生M个信号包括:按照所述时间间隔产生M次低电平脉冲。
在本申请的至少一个实施例中,还包括:按照预设规则,将当前使用的时间参数替换为新的时间参数,将所述新的时间参数作为所述当前数据传输的时间参数;按照所述当前数据传输的时间参数更新所述对应关系;利用更新后的对应关系进行数据传输。
本申请又一方面提供一种数据处理设备,包括:接收模块、判断模块、时间处理模块和数据处理模块,其中,所述接收模块,用于接收K个信号;所述判断模块,用于检测所述K个信号中每相邻两个之间的时间间隔,判断第一时间间隔与第二时间间隔之间是否满足预设关系,所述第一时间间隔为第i个所述信号的开始时刻与第i-1个所述信号的开始时刻之间的时间间隔,所述第二时间间隔为第i个所述信号的开始时刻与第i+1个所述信号的开始时刻之间的时间间隔,i=2,4,……,2j,j=(K-1)/2,K≥3且K为奇数;所述时间处理模块,用于确定第一时间间隔组和/或第二时间间隔组,所述第一时间间隔组包括j个所述第一时间间隔,所述第二时间间隔组包括j个所述第二时间间隔;若所述第一时间间隔与所述第二时间间隔满足预设关系,则根据所述第一时间间隔组中的至少一个第一时间间隔和/
或所述第二时间间隔组中的至少一个第二时间间隔确定当前数据传输的时间参数;所述数据处理模块,用于按照所述时间参数接收数据。
在本申请的至少一个实施例中,所述接收模块用于接收K个信号具体包括:所述接收模块用于检测K次低电平脉冲。
在本申请的至少一个实施例中,所述接收模块,还用于接收X个信号;
所述数据处理模块用于按照所述时间参数接收数据具体包括:按照所述时间参数获取N比特数据包含的2N个不同数值与时间间隔的对应关系,其中,不同数值对应的时间间隔不同,其中,N≥1;确定所述X个信号中每相邻两个信号的起始时刻之间的时间间隔,得到X-1个时间间隔,其中,X为正整数,且X>1;根据确定的所述时间参数,获取所述X-1个时间间隔中每连续S个时间间隔中单个时间间隔对应的数值,得到所述S个时间间隔传输的数值,所述S个时间间隔传输的数值为所述单个时间间隔对应的数值,所述数值为N比特数据包含的2N个不同数值中的一个,其中,在S>1的情况下,所述S个时间间隔相同,其中,X和S均为正整数,且S≤X-1,N≥1。
在本申请的至少一个实施例中,X-1=n*S,n≥1且n为整数。
在本申请的至少一个实施例中,所述接收模块还用于接收X个信号具体包括:所述接收模块还用于检测X次低电平脉冲。
在本申请的至少一个实施例中,所述数据处理模块,还用于:接收Y+1个信号,去除所述Y+1个信号中的干扰,得到所述X个信号,其中Y+1≥X。
在本申请的至少一个实施例中,还包括:数据发送模块,其中,所述数据发送模块,用于在所述数据处理模块按照所述时间参数接收数据之后,按照所述时间参数进行数据发送。
在本申请的至少一个实施例中,所述数据发送模块用于按照所述时间参数进行数据发送具体包括:按照所述时间参数获取N比特数据包含的2N个不同数值与时间间隔的对应关系,其中,不同数值对应的时间间隔不同,其中,N≥1;获取当前待发送的数据比特串;将所述数据比特串进行分组,每组数据为N比特;根据获取的所述对应关系,以每组数据的数值对应的时间间隔表示该组数据的方式发送该组数据。
在本申请的至少一个实施例中,所述时间处理模块,还用于若所述第一时间间隔与所述第二时间间隔不满足所述预设关系,则指示所述判断模块继续执行接收所述K个信号的操作。
本申请还一方面提供一种数据处理设备,包括:第二时间参数模块、第二时间处理模块、第二信号产生发送模块;其中,所述第二时间参数模块,用于确定时间参数;所述第
二时间处理模块,用于根据所述时间参数确定第一时间间隔组与第二时间间隔组,其中,所述第一时间间隔组包括j个第一时间间隔,所述第二时间间隔组包括j个第二时间间隔;所述第二信号产生发送模块,用于产生并发送K个握手信号,其中,所述第一时间间隔与所述第二时间间隔之间满足预设关系;所述第一时间间隔为第i个所述握手信号的开始时刻与第i-1个所述握手信号的开始时刻之间的时间间隔,所述第二时间间隔为第i个所述握手信号的开始时刻与第i+1个所述握手信号的开始时刻之间的时间间隔,i=2,4,……,2j,j=(K-1)/2,K≥3且K为奇数。
在本申请的至少一个实施例中,所述第二信号产生发送模块用于所述K个握手信号具体包括:所述第二信号产生发送模块按照所述第一时间间隔和所述第二时间间隔产生K次低电平脉冲。
在本申请的至少一个实施例中,所述第二信号产生发送模块还用于,在产生并发送K个握手信号之后,按照所述时间参数获取N比特数据包含的2N个不同数值与时间间隔的对应关系,其中,不同数值对应的时间间隔不同,其中,N≥1;获取当前待发送的数据比特串;将所述数据比特串进行分组,每组数据为N比特;根据获取的所述对应关系,以每组数据的数值对应的时间间隔表示该组数据的方式发送该组数据。
在本申请的至少一个实施例中,对于每组数据,所述第二信号产生模块还用于发送该组数据具体包括:所述第二信号产生发送模块,还用于产生并发送M个信号,其中,每个所述信号的开始时刻与相邻的上一个信号的开始时刻的时间间隔为该组数据的数值对应的时间间隔,M≥1且M为自然数。
在本申请的至少一个实施例中,所述第二信号产生发送模块还用于产生M个信号具体包括:所述第二信号产生发送模块,还用于按照所述时间间隔产生M次低电平脉冲。
在本申请的至少一个实施例中,所述第二时间参数模块,还用于按照预设规则,将当前使用的时间参数替换为新的时间参数,将所述新的时间参数作为所述当前数据传输的时间参数;所述第二信号产生发送模块,还用于按照所述当前数据传输的时间参数更新所述对应关系;利用更新后的对应关系进行数据传输。
由上述本申请提供的技术方案可以看出,本申请提供了一种数据传输方法及一种数据处理设备,通过握手信号确定时间参数etu和pdt,从而保证每次数据传输时,发送端与接收端对etu和pdt的取值一致,保证了每次数据传输的稳定性与准确性,避免了频率差异因多个字符的连续接收而造成误差累计,有效防止当发送时钟和接收时间参数差异太大时,引起接收端采样错位,造成接收错误,通讯效率降低的技术问题。此外,发送端可以根据发送波形的时间间隔表示发送波形的数据,接收端可以根据接收波形的时间间隔确定接收
波形的数据比特,可以仅使用两线完成数据的接收,适用在电子设备中时,可以有效减小电子设备的体积。
为了更清楚地说明本申请实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域的普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他附图。
图1为本申请实施例1提供的数据传输方法的流程图;
图2为本申请实施例2提供的数据接收方法的流程图;
图3为本申请实施例3提供的数据传输方法流程图;
图4为本申请实施例4提供的数据发送方法的流程图;
图5为本申请实施例4提供的N=2时,发送数据比特串0011100100的波形示意图;
图6为本申请实施例4提供的N=1时,发送数据比特串0011100100的波形示意图;
图7为本申请实施例4提供的N=3时,发送数据比特串0011100100的波形示意图;
图8为本申请实施例5提供的一种数据处理设备的结构示意图;
图9为本申请实施例5提供的另一种数据处理设备的结构示意图;
图10为本申请实施例6提供的一种数据处理设备的结构示意图;
图11为本申请实施例6提供的一种实施例5以及实施例6中涉及的数据发送模块的结构示意图;
图12为本申请实施例6提供的另一种实施例5以及实施例6中涉及的数据发送模块的结构示意图。
下面结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请的保护范围。
在本申请的描述中,需要理解的是,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或数量或位置。
下面将结合附图对本申请实施例作进一步地详细描述。
实施例1
如图1所示,本实施例提供一种数据传输方法,为达到上述目的,本实施例的技术方案具体是这样实现的:
步骤S101:接收K个信号。
K为预先设定值,K≥3且K为奇数,例如预先设定K=5,那么当累计接收到5个信号时,则对接收到的5个信号进行处理,本实施例提供的方法可以通过该K个信号之间的时间间隔的关系判断出是否可以开始接收数据,即,如果满足预设关系在K个信号之后开始接收数据,可以将该K个信号视为指示开始接收数据的握手信号;其中,信号可以为脉冲信号,即接收到的是高电平脉冲信号(上升沿信号),或者是低电平脉冲信号(下降沿信号),脉冲信号可以为方波、正弦波、三角波或其他不规则波形,也可以是上述不同波形的组合。
在本实施例中,接收K个信号,包括以下方式至少之一:
方式一:检测到K次低电平脉冲;
在该方式中,终端可以检测到连续高电平中的K次低电平脉冲,例如,在检测到高电平一段时间后,检测到1次低电平脉冲,然后又恢复检测到高电平的状态,在经过一段时间后,又检测到1次低电平脉冲,以这样的方式可以连续检测到K次低电平脉冲。
方式二:检测到K次高电平脉冲;
在该方式中,终端可以检测到连续低电平中的K次高电平脉冲,例如,在检测到低电平一段时间后,检测到1次高电平脉冲,然后又恢复检测到低电平的状态,在经过一段时间后,又检测到1次高电平脉冲,以这样的方式可以连续检测到K次高电平脉冲。
在上述方式中,K个信号属于跳变信号,且跳变幅度明显,便于与噪声信号进行区分。
步骤S102:检测K个信号中每相邻两个之间的时间间隔。
在本实施例中,当连续接收到K个信号后,检测K个信号中每相邻两个信号之间的时间间隔,可选地,当K个信号为连续高电平中的K个低电平信号时,确定第p个低电平信号的起始时刻至第p+1个低电平信号的起始时刻之间的时长为第p个和第p+1个信号之间的时间间隔;同样地,当K个信号为连续低电平中的K个高电平信号时,确定第p个高电平信号的起始时刻至第p+1个高电平信号的起始时刻之间的时长为第p个和第p+1个信号之间的时间间隔;其中,1≤p≤K-1,且p为自然数;作为一种可选的实施方式,通过检测每个脉冲信号的起始时刻,从而准确迅速地获得相邻两个信号起始时刻之间的时间间隔。
步骤S103:判断第一时间间隔与第二时间间隔之间是否满足预设关系。
作为本实施例一种可选的实施方式,在步骤S103中,第一时间间隔可以为第i个信号的开始时刻与第i-1个信号的开始时刻之间的时间间隔,第二时间间隔可以为第i个信号的
开始时刻与第i+1个信号的开始时刻之间的时间间隔,其中,i=2,4,……,2j,j=(K-1)/2,K≥3且K为奇数;示例性的,当K=5时,5个信号中每相邻两个之间共会产生4个时间间隔,当i=2时,第一时间间隔为第一个信号与第二个信号开始时刻之间的时间间隔,标记为t0,第二时间间隔为第二个信号与第三个信号开始时刻之间的时间间隔,标记为t1;当i=4时,第一时间间隔为第三个信号与第四个信号开始时刻之间的时间间隔,标记为t2,第二时间间隔为第四个信号与第5个信号开始时刻之间的时间间隔,标记为t3。判断第一时间间隔与第二时间间隔之间是否满足预设关系即指,判断t0与t1之间,以及t2与t3之间是否同时满足预设关系,该预设关系可以根据技术人员的经验确定,或者根据实际运行时的参数确定,只要保证满足这样的预设关系,就可以确定该K个信号为指示开始接收数据的握手信号。作为一种可选的实施方式,预设关系可以为t1=a*t0且t3=a*t2;或者,t1=(a+b)*t0且t3=(a+b)*t2;或者,t1=(c*a+b)*t0且t3=(c*a+b)*t2,其中,a、b、c为≥1的自然数,例如,a=2,该预设关系可以是多种,此处不再赘述。
步骤S104:确定第一时间间隔组和/或第二时间间隔组。
其中,第一时间间隔组包括j个第一时间间隔,第二时间间隔组包括j个第二时间间隔,j=(K-1)/2,K≥3且K为奇数。当i取值不同时,根据K个信号产生的K-1个时间间隔将产生一系列的第一时间间隔和第二时间间隔,可以从多个不同的第一时间间隔中选取至少1个成为第一时间间隔组,同样的,也可以从多个不同的第二时间间隔中选取至少1个成为第二时间间隔组,例如,K=5时,5个信号中产生第一时间间隔t0、t2,以及第二时间间隔t1、t3,此时,可以取t0、t2作为第一时间间隔组,取t1、t3作为第二时间间隔组,本实施例并不限制第一时间间隔组以及第二时间间隔组中时间间隔的个数,至少有一个即可,通过这样的方式可以确定第一时间间隔组和/或第二时间间隔组,便于对时间间隔进行分类处理。
步骤S105:若第一时间间隔与第二时间间隔满足预设关系,则根据所述第一时间间隔组中的至少一个第一时间间隔和/或所述第二时间间隔组中的至少一个第二时间间隔确定当前数据传输的时间参数。
步骤S105中,根据所述第一时间间隔组中的至少一个第一时间间隔和/或所述第二时间间隔组中的至少一个第二时间间隔,具体为:根据第一时间间隔组中的至少两个第一时间间隔确定当前数据传输的时间参数,根据第二时间间隔组中的至少两个第二时间间隔确定当前数据传输的时间参数,也可根据第一时间间隔组中的至少一个第一时间间隔和第二时间间隔组中的至少一个第二时间间隔共同确定当前数据传输的时间参数,且第一时间间隔和第二时间间隔不相邻。
在本实施例中,在确定的第一时间间隔组和第二时间间隔组中,当第i个信号与第i-1
个信号之间的第一时间间隔与第i个信号与第i+1个信号之间的第二时间间隔均满足预设关系时,可以判定K个信号为有效的握手信号,此时,根据第一时间间隔组,或根据第二时间间隔组,或根据第一时间间隔组以及第二时间间隔组,按照与数据发送端预先约定的时间参数生成规则,确定当前数据传输的时间参数,其中,预先约定的时间参数生成规则在保证每个数据比特编码方式唯一的前提下,可以选择任意种类的方式进行时间参数的确定。
例如,当K=5时,5个信号中相邻两个之间共会产生4个时间间隔,当i=2时,第一时间间隔为第一个信号与第二个信号开始时刻之间的时间间隔,标记为t0,第二时间间隔为第二个信号与第三个信号开始时刻之间的时间间隔,标记为t1;当i=4时,第一时间间隔为第三个信号与第四个信号开始时刻之间的时间间隔,标记为t2,第二时间间隔为第四个信号与第5个信号开始时刻之间的时间间隔,标记为t3;以此为例,下面对根据所述第一时间间隔组中的至少一个第一时间间隔和/或所述第二时间间隔组中的至少一个第二时间间隔确定当前数据传输的时间参数的方式做详细描述。
作为本实施例的一种可选实施方式,选取t0和t2作为第一时间间隔组,根据第一时间间隔组确定当前数据传输的时间参数,时间参数包括第一时间参数etu和第二时间参数pdt,etu和pdt由t0和t2唯一表示,etu和pdt的值可根据t0和t2的值通过任意计算方式获得,示例性的,etu和pdt可采用以下任意一种计算方式获得,当然,并不限于以下计算方式:
etu=t0,pdt=(t0-t2)/5;
etu=t0+t2,pdt=(t0+t2)/10;
etu=t0+t2/2,pdt=(t0-t2)/5;
etu=t2,pdt=(t0-t2)/15;
……..
作为本实施例的另一种可选实施方式,选取t0作为第一时间间隔组,根据第一时间间隔组确定当前数据传输的时间参数,时间参数包括第一时间参数etu和第二时间参数pdt,etu和pdt由t0唯一表示,etu和pdt的值可根据t0的值通过任意计算方式获得,示例性的,etu和pdt可采用以下任意一种计算方式获得,当然,并不限于以下计算方式:
etu=t0,pdt=t0/5;
etu=2*t0,pdt=t0/10;
etu=t0/2,pdt=t0/5;
etu=t0/3,pdt=t0/15;
……..
作为本实施例的另一种可选实施方式,选取t1和t3作为第二时间间隔组,根据第二时间间隔组确定当前数据传输的时间参数,时间参数包括第一时间参数etu和第二时间参数
pdt,etu和pdt由t1和t3唯一表示,etu和pdt的值可根据t1和t3的值通过任意计算方式获得,示例性的,etu和pdt可采用以下任意一种计算方式获得,当然,并不限于以下计算方式:
etu=t1,pdt=(t1-t3)/5;
etu=t1+t3,pdt=(t1+t3)/10;
etu=t1+t3/2,pdt=(t1-t3)/5;
etu=t3,pdt=(t1-t3)/15;
……..
作为本实施例的另一种可选实施方式,选取t1作为第二时间间隔组,根据第二时间间隔组确定当前数据传输的时间参数,时间参数包括第一时间参数etu和第二时间参数pdt,etu和pdt由t1唯一表示,etu和pdt的值可根据t1的值通过任意计算方式获得,示例性的,etu和pdt可采用以下任意一种计算方式获得,当然,并不限于以下计算方式:
etu=t1,pdt=t1/5;
etu=2*t1,pdt=t1/10;
etu=t1/2,pdt=t1/5;
etu=t1/3,pdt=t1/15;
……..
作为本实施例的另一种可选实施方式,选取t0作为第一时间间隔组,选取t3作为第一时间间隔组,根据第一时间间隔组和第二时间间隔组确定当前数据传输的时间参数,时间参数包括第一时间参数etu和第二时间参数pdt,etu和pdt由t0和t3唯一表示,etu和pdt的值可根据t0和t3的值通过任意计算方式获得,示例性的,etu和pdt可采用以下任意一种计算方式获得,当然,并不限于以下计算方式:
etu=t0,pdt=t3/5;
etu=2*t0,pdt=t3/10;
etu=t0/2,pdt=t3/5;
etu=t0/3,pdt=t3/15;
etu=t0+t3,pdt=t0+t3/5;
etu=t0/3+t3,pdt=t0+t3/15;
……..
同样地,当K=7时,7个信号相邻两个之间共会产生6个时间间隔,当i=2时,第一时间间隔为第一个信号与第二个信号开始时刻之间的时间间隔,标记为t0,第二时间间隔为第二个信号与第三个信号开始时刻之间的时间间隔,标记为t1;当i=4时,第一时间间
隔为第三个信号与第四个信号开始时刻之间的时间间隔,标记为t2,第二时间间隔为第四个信号与第五个信号开始时刻之间的时间间隔,标记为t3;当i=6时,第一时间间隔为第五个信号与第六个信号开始时刻之间的时间间隔,标记为t4,第二时间间隔为第六个信号与第七个信号开始时刻之间的时间间隔,标记为t5;此时,可选取t0、t2和t4作为第一时间间隔组,也可选取t1、t3和t5作为第二时间间隔组,根据第一时间间隔组中的至少两个第一时间间隔确定当前数据传输的时间参数,根据第二时间间隔组中的至少两个第二时间间隔确定当前数据传输的时间参数,也可根据第一时间间隔组中的至少一个第一时间间隔和第二时间间隔组中的至少一个第二时间间隔共同确定当前数据传输的时间参数,且第一时间间隔和第二时间间隔不相邻,时间参数etu和pdt的获取方式并不唯一,可采用不同的计算方式通过第一时间间隔组和/或第二时间间隔组任意获取,具体获取方式可参考K=5时的方案,在此不再赘述。
当K=3时,3个信号中相邻两个之间共会产生2个时间间隔,当i=2时,第一时间间隔为第一个信号与第二个信号开始时刻之间的时间间隔,标记为t0,第二时间间隔为第二个信号与第三个信号开始时刻之间的时间间隔,标记为t1;以此为例,下面对根据所述第一时间间隔组中的至少一个第一时间间隔和/或所述第二时间间隔组中的至少一个第二时间间隔确定当前数据传输的时间参数的方式做详细描述。
作为本实施例的另一种可选实施方式,选取t0作为第一时间间隔组,根据第一时间间隔组确定当前数据传输的时间参数,时间参数包括第一时间参数etu和第二时间参数pdt,etu和pdt由t0唯一表示,etu和pdt的值可根据t0的值通过任意计算方式获得,示例性的,etu和pdt可采用以下任意一种计算方式获得,当然,并不限于以下计算方式:
etu=t0,pdt=t0/5;
etu=2*t0,pdt=t0/10;
etu=t0/2,pdt=t0/5;
etu=t0/3,pdt=t0/15;
……..
作为本实施例的另一种可选实施方式,选取t1作为第二时间间隔组,根据第二时间间隔组确定当前数据传输的时间参数,时间参数包括第一时间参数etu和第二时间参数pdt,etu和pdt由t1唯一表示,etu和pdt的值可根据t1的值通过任意计算方式获得,示例性的,etu和pdt可采用以下任意一种计算方式获得,当然,并不限于以下计算方式:
etu=t1,pdt=t1/5;
etu=2*t1,pdt=t1/10;
etu=t1/2,pdt=t1/5;
etu=t1/3,pdt=t1/15;
……..
本实施例中上述确定当前数据传输的时间参数的具体实施方式仅为示例性实施方式,本申请并不排除其他时间参数生成规则以根据第一时间间隔组中的至少两个第一时间间隔,或根据第二时间间隔组中的至少两个第二时间间隔,或根据第一时间间隔组中的至少一个第一时间间隔以及第二时间间隔组中的至少一个第二时间间隔,确定当前数据传输的时间参数的实施方式。
本实施例通过第一时间间隔组和/或第二时间间隔组来确定时间参数etu和pdt,从而保证每次数据传输时,发送端与接收端对etu和pdt的取值保持一致,保证了每次数据传输的稳定性与准确性,由于每次数据传输之前接收端都会根据发送端发送的握手信息重新确定时间参数etu和pdt的值,避免了频率差异因多个字符的连续接收而造成误差累计,有效防止当发送时钟和接收时间参数差异太大时,引起接收端采样错位,造成接收错误,通讯效率降低的问题。
作为本实施例一种可选的实施方式,若第一时间间隔与第二时间间隔满足预设关系不满足上述预设关系,则继续执行接收握手信号的步骤,即返回步骤S101。
步骤S106:按照时间参数接收数据。
具体地,步骤S106按照握手信号确定的时间参数接收数据的实现方式,请参照实施例2中数据接收方法的具体流程。
此外,在按照时间参数接收数据之后,还包括:按照时间参数进行数据发送,请参照实施例4中数据发送方法的具体流程。
本实施例提供的数据传输方法通过每次接收数据之前根据握手信息重新确定时间参数,保证发送端和接收端的时间参数始终保持一致,保证数据传输的稳定性与准确性;信号采用脉冲信号进行传输,便于与噪声信号进行区分;通过检测每个信号触发的上升沿或下降沿,可以容易地获取每个信号的起始时刻,从而准确迅速地获得相邻两个信号起始时刻之间的时间间隔,根据获取到的时间间隔判断信号间的时间间隔是否满足预设关系,判断接收到的信号是否为有效的握手信号,使得判断过程准确迅速,且成功率高,根据第一时间间隔和/或第二时间间隔确定第一时间间隔组和/或第二时间间隔组,并通过第一时间间隔组和/或第二时间间隔组来确定时间参数etu和pdt,从而保证每次数据传输时,发送端与接收端对etu和pdt的取值保持一致,保证了每次数据传输的稳定性与准确性,由于每次数据传输之前接收端都会根据发送端发送的握手信息重新确定时间参数etu和pdt的值,避免了频率差异因多个字符的连续接收而造成误差累计,有效防止当发送时钟和接收时间参数差异太大时,引起接收端采样错位,造成接收错误,通讯效率降低的技术问题。
实施例2
本实施例提供了一种数据接收方法,图2是基于本实施例1中图1所示的数据传输的一种可选的按照握手信号确定的时间参数接收数据的流程图。
如图2所示,该按照握手信号确定的时间参数接收数据包括以下步骤:
步骤S201,接收到X个信号,确定X个信号中每相邻两个信号的起始时刻之间的时间间隔,得到X-1个时间间隔,其中,X为正整数,且X>1。
在本实施例的一个可选实施方式中,接收X个信号可以是检测到X次低电平脉冲,也可以是检测到X次高电平脉冲。该低电平脉冲/高电平脉冲可以采用方波、正弦波、三角波等可区分高低电平脉冲的波形表示,在此不作限制。优选为检测到的是低电平脉冲,即发送端可以在为接收端提供高电平的情况下,产生低电平脉冲,采用这种方式,在发送端与接收端通信时,接收端可使用发送端提供的高电平作为电源,为接收端的耗电器件提供电能,例如,接收端可以利用发送端提供的高电平进行充电,或者接收端内部不设置电源,而直接使用发送端的高电平作为电源,采用该方法的设备,在进行信息交互时,可使用同一根线同时完成供电和信息接收,减小了设备体积和制造成本。
在本实施例的一个可选实施方式中,在步骤S201之前,还包括步骤S201a,接收到K个信号,检测K个信号之间是否满足预设关系,K≥2且K为整数。由于只有相邻的两个信号之间才会产生一个时间间隔,因此,应当至少接收两个握手信号,以得到至少一个时间间隔。接收端可通过判断K个信号之间是否满足预设关系判断该K个信号是否为握手信号。接收端接收握手信号,可根据该握手信号判断数据传输的开始位置,提高数据传输效率。
可选地,在步骤S201a中,可以检测K个信号之间的时间间隔,判断第一时间间隔与第二时间间隔之间是否满足预设关系,其中,第一时间间隔为第i个信号的开始时刻与第i-1个信号的开始时刻之间的时间间隔,第二时间间隔为第i个信号的开始时刻与第i+1个信号的开始时刻之间的时间间隔,i=2,4,……,2j,j=(K-1)/2,K≥3且K为奇数;若第一时间间隔与第二时间间隔满足预设关系,执行接收X个信号的步骤,即确定接收到的K个信号为握手信号,K个信号之后的信号为数据传输信号,其中,K的取值可以是预先预定的。进一步的,若第一时间间隔与第二时间间隔不满足预设关系,继续检测后续的K个信号之间的时间间隔,判断后续的K个信号的第一时间间隔与第二时间间隔之间是否满足预设关系直至检测到符合预设关系的K个信号,即在没有检测到握手信号的情况下,接收端持续检测握手信号,直到检测到握手信号才开始接收数据,从而可以避免发送端的误操作的情况下向接收端发送信号的情形,同时还可以判断数据的开始。进一步地,第一时间间隔与
第二时间间隔之间满足的预设关系可以是任意发送端与接收端预先约定的关系,如第二时间间隔是第一时间间隔的二倍。接收端可通过接收到的数据是否满足预设关系来判断接收到信号是否为握手信号。作为一种可选的实施方式,预设关系可以为t1=a*t0且t3=a*t2;或者,t1=(a+b)*t0且t3=(a+b)*t2;或者,t1=(c*a+b)*t0且t3=(c*a+b)*t2,其中,a、b、c为≥1的自然数,例如,a=2,该预设关系可以是多种,此处不再赘述。
进一步地,步骤S201a中接收的K个信号还可以携带时间参数,则在实施例1的方案中,可以根据K个信号确定时间参数。可选地,可以先确定第一时间间隔组与第二时间间隔组,其中,第一时间间隔组包括j个第一时间间隔,第二时间间隔组包括j个第二时间间隔,然后根据第一时间间隔组与第二时间间隔组确定时间参数。例如,如果发送端发送的5个握手信号,第一时间间隔t1=etu,第二时间间隔t2=etu+pdt,则接收端根据第一时间间隔和第二时间间隔可以确定时间参数etu和pdt的取值。通过K个信号确定时间参数,可克服接收端的理论时间参数与实际时间参数不一致的情况,保障数据传输的准确性。
与传输数据的信号相似,接收端可以在检测到K次低电平脉冲的情况下,确认接收到K个信号。或者,也可以是检测到K次高电平脉冲,确认接收到K个信号。该低电平/高电平脉冲可以采用方波、正弦波等方式实现。优选采用检测到低电平脉冲,即发送端向接收端提供高电平,在需要发送K个信号时,产生K次低电平脉冲,这样,在发送端与接收端通信时,接收端可使用发送端提供的高电平作为电源,或者接收端内部不设置电源,而直接使用发送端的高电平作为电源,采用该方法的设备,在进行信息交互时,可使用同一根线同时完成供电和信息接收,减小了设备体积和制造成本。
在本实施例的一个可选实施方式中,接收到X个信号包括:接收Z个信号,去除Z个信号中的干扰,得到X个信号,其中Z≥X。
步骤S202,根据实施例1中的方案确定的当前数据传输的时间参数,获取X-1个时间间隔中每连续S个时间间隔中单个时间间隔对应的数值,得到S个时间间隔传输的数值,数值为N比特数据包含的2N个不同数值中的一个,其中,在S>1的情况下,S个时间间隔相同,X和S均为正整数,且S≤X-1,N≥1。即在X-1个时间间隔中,在S>1的情况下,每S个连续时间间隔相同,其中单个时间间隔对应的N比特数据的数值即为该S个时间间隔传输的数值。如,接收到7个信号,获取到6个时间间隔,其中3个连续的时间间隔是相同的,即发送端采用了多个相同的时间间隔表示了N比特数据的数值,得到3个时间间隔中单个时间间隔对应的N比特数据,进一步得到3个时间间隔传输的数值,在S=1的情况下,得到1个时间间隔传输的数值。
作为本申请实施例的一个可选实施方式,根据实施例1中的方案确定的当前数据传输的时间参数,获取X-1个时间间隔中每连续S个时间间隔中单个时间间隔对应的数值,得
到S个时间间隔传输的数值,可以采用多种计算方式来计算得到单个时间间隔对应的数值,例如可以采用:预先确定或者协商好的计算方法数值m的时间间隔=etu+m*pdt的得到时间间隔对应的数值,例如接收到的一个时间间隔,则根据etu和pdt来计算得到m的数值。例如当m=1时,如果预先设定或者协商的每组数据为1比特,则该数值为1,如果每组数据为2比特,则该数值为01,如果每组数据为3比特,则该数值为001,每组数据为4或者以上比特时,得到数值的方式相同,在此不再赘述。
根据第一时间参数etu与第二时间参数pdt,按照与数据发送端预先约定的编解码规则,获取N比特数据包含的2N个不同数值与时间间隔的对应关系,预先约定的编解码规则可以为能够保证不同数值的N个数据比特对应唯一时间间隔的任意方式,示例性地:
当N=1时,不同数值的N个数据比特包括:0、1,此时,
0=etu,1=etu+pdt,且etu≠etu+pdt,或,
0=2etu,1=etu+2pdt,且2etu≠etu+2pdt,
……
当N=2时,不同数值的2比特包括:00、01、10、11,此时,
00=etu,01=etu+pdt,10=etu+2pdt,11=etu+3pdt,且etu≠etu+pdt≠etu+2pdt≠etu+3pdt,或,
00=2etu,01=etu+2pdt,10=etu+2.5pdt,11=1.3etu+3pdt,
且2etu≠etu+2pdt≠etu+2.5pdt≠1.3etu+3pdt,
……
同样地,当N=3时,不同数值的N个数据比特包括:000、001、010、011、100、101、110、111,此时,根据第一时间参数etu与第二时间参数pdt,按照与数据发送端预先约定的编解码规则,得到N比特数据包含的2N个不同数值对应的时间间隔,预先约定的编解码规则可参照上述示例,在此不再赘述。
按照与数据发送端预先约定的方式,根据第一时间参数etu和第二时间参数pdt得到N比特数据包含的2N个不同数值对应的时间间隔,其中,不同数值对应的时间间隔不同,从而区分接收到的不同的时间间隔所对应的不同数据比特,实现通过接收到的时间间隔来获取发送端发送的数据。
作为本申请实施例的一个可选实施方式,根据确定的当前数据传输的时间参数,获取X-1个时间间隔中每连续S个时间间隔中单个时间间隔对应的数值,得到S个时间间隔传输的数值,数值为N比特数据包含的2N个不同数值中的一个,其中,在S>1的情况下,S个时间间隔相同,X和S均为正整数,且S≤X-1,N≥1可以理解为:
根据确定的当前数据传输的时间参数,获取X-1个时间间隔中每连续S个时间间隔中
单个时间间隔对应的比特串,得到S个时间间隔传输的比特串,其中,S个时间间隔传输的数值为单个时间间隔对应的比特串,在S>1的情况下,S个时间间隔相同,S为正整数,且S≤X-1。例如当X=2,S=1时,只具有一个时间间隔,获取该时间间隔对应的比特串;当X为3或者以上,S=1时,具有多个时间间隔,获取每个时间间隔对应的比特串;当X=3,S=2时,具有两个时间间隔,这两个时间间隔相同,且该时间间隔对应一个比特串,这两个时间间隔表示该一个时间间隔对应的比特串;当X为5或者以上时,S=2时,具有四个时间间隔,前两个连续的时间间隔中的一个时间间隔对应一个比特串,后两个连续的时间间隔中的一个时间间隔对应另一个比特串,即前两个时间间隔表示一个比特串,后两个时间间隔表示另一个比特串。当然,以上举例只是示例性的,只要可以得到S个时间间隔传输的比特串的方式均应属于本申请的保护范围。
在本实施例的一个可选实施方式中,在步骤S202的在获取X-1个时间间隔中第一个连续S个时间间隔传输的数值之前,还可以包括步骤S202’,按照时间参数获取N比特数据包含的2N个不同数值与时间间隔的对应关系,其中,不同数值对应的时间间隔不同,N≥1,其中,采用上述预先计算N比特数据包含的2N不同数值与时间间隔的方式确定接收到的时间间隔的数据比特,可进一步减少接收到数据后的解码时间。作为本申请实施例的一个可选实施方式,按照时间参数获取N比特数据包含的2N个不同数值与时间间隔的对应关系,其中,不同数值对应的时间间隔不同,N≥1可以理解为:按照时间参数获取2N个长度为N的比特串中各个比特串与时间间隔的对应关系,其中,2N个所述比特串互不相同,且不同所述比特串对应的时间间隔不同,N≥1。
在本实施例的一个可选实施方式中,N比特数据包含的2N个不同数值,可以理解为:例如,N=1时,1比特数据,其包含21个不同数值,分别为0,1;N=2时,2比特数据,其包含22个不同数值,分别为00,01,10,11。按照时间参数获取N比特数据包含的2N个不同数值与时间间隔的对应关系可以理解为:例如,当N=1时,按照时间参数获取0对应的时间间隔,按照时间参数获取1对应的时间间隔;当N=2时,按照时间参数获取00对应的时间间隔,按照时间参数获取01对应的时间间隔,按照时间参数获取10对应的时间间隔,按照时间参数获取11对应的时间间隔。当然,当N为其他值时,与上述理解方式相同,在此不再赘述。
可选地,数据的接收端可采用与数据的发送端预先设置或者协商确定的计算方法计算该数据比特的时间间隔,如当N=n,发送数据比特m的时间间隔的计算方法为:数值m对应的时间间隔=etu+m*pdt(其中,0≤m≤2n-1,etu为第一时间参数,pdt为第二时间参数,举例来说etu=10μs,pdt=30μs),即数值11对应的时间间隔计算方法可以为10μs+3*30μs=100μs,通过该可选实施方式可以计算出数值对应的时间间隔。当然,本申请
也可以采用其他预先协商的计算方法确定时间间隔,本实施对此不做具体限制。通过预先协商的计算方法计算得出该数据比特的时间间隔,可保证数据传输的可扩展性,即不论N的取值是多少,发送端和接收端均可计算得出数据比特的时间间隔。之后,接收端可以按照计算出的时间间隔来与接收到的时间间隔进行比对,从而直接确定该时间间隔对应的数值,提高确定数据的效率。
作为本申请实施例的另一个可选实施方式,数据的接收端也可采用与数据的发送端预先协商并存储的列表来确定该数值对应的时间间隔,采用查找列表的方式确定该数值对应的时间间隔,提高得到该数值对应的时间间隔的效率。
在本实施例的一个可选实施方式中,X-1=n*S,n≥1且n为整数,采用这种可选实施方式,X个信号刚好可以传输n*S个数据比特,而不会出现多余的信号导致无法解码的问题。
在本实施例的一个可选实施方式中,在数据传输过程中,还可以更换时间参数,即在步骤S202之后,还可以包括步骤S203:按照预设规则,将当前使用的时间参数替换为新的时间参数,将新的时间参数作为当前数据传输的时间参数,接收到X个信号,确定X个信号中每相邻两个信号的起始时刻之间的时间间隔,得到X-1个时间间隔,然后使用当前数据传输的时间参数,获取X-1个时间间隔中每连续S个时间间隔中单个时间间隔对应的数值,得到S个时间间隔传输的数值,S个时间间隔传输的数值为单个时间间隔对应的数值,数值为N比特数据包含的2N个不同数值中的一个,其中,在S>1的情况下,S个时间间隔相同。在本实施方案中,新的时间参数的确定可以通过发送端和接收端的协商完成,也可以通过发送端和接收端查找预先存储的时间参数表完成,如在发送某种类型数据时查表确定该类型的数据应该使用的时间参数。发送端的时间参数是可以变化的,可以匹配不同数据处理能力的接收端,或匹配不同类型的数据,可进一步提高数据处理的效率。
在本实施例的一个可选实施方式中,在步骤S202完成接收最后一个数据之后,发送端还可以发送A个结束信号(A≥1且为整数),而接收端还可接收A个结束信号,结束信号可以与握手信号相同,也可以是其他特定格式的信号,通过该结束信号,接收端可判断数据是否接收结束。
在本实施例的一个可选实施方式中,在步骤S202完成接收最后一个数据之后,或在完成接收最后一个数据之后,接收A个结束信号之前,接收端还可接收发送端发送的校验数据,通过该校验数据,数据接收端可判断接收数据是否完整正确。校验数据包括通过MAC校验、奇偶校验、取和校验等校验方式计算出的校验数据。
由上述本申请实施例提供的技术方案可以看出,接收端可以根据接收波形的时间间隔确定接收波形的数据比特,可以仅使用两线完成数据的接收,适用在电子设备中时,可以
有效减小电子设备的体积。
下面以待接收的比特串为0011100100,N=2,对本申请实施例提供的数据接收方法进行的简单举例说明:
实施例1的方案中,确定当前数据传输的时间参数,可选的,可确定出两个时间参数,第一时间参数etu和第二时间参数pdt,其中etu=10μs,pdt=30μs,在本申请实施例中,时间参数为数据发送占用的时间长度。时间参数的个数与N并不存在对应关系,仅与发送端协商一致即可,本实施例并不对时间参数的具体个数作限制,只要能表达出数据比特的数值对应的时间间隔即可。
步骤S201中,接收到6个信号,确定6个信号中每相邻两个信号的起始时刻之间的时间间隔,得到5个时间间隔etu、etu+3pdt、etu+2pdt、etu+pdt、etu。
步骤S202中,获取上述5个时间间隔分别对应的2比特数据,本实施例中,可以根据与数据的发送端预先协商的计算方法m=etu+m*pdt的得到时间间隔对应的数值,如接收到的一个100μs的时间间隔,则可得到m=3,即该时间间隔传输的数值为11。也可以在本步骤之前按照时间参数获取N比特数据包含的2N个不同数值与时间间隔的对应关系。如,在N=2时,按照时间参数获取2比特数据包含的4个不同数值与时间间隔的对应关系,即00=etu,01=etu+pdt,10=etu+2pdt,11=etu+3pdt,即如接收到100μs的时间间隔,可以直接确定该时间间隔传输的数值为11。最终完成比特串0011100100的接收。
在本实施例中,根据发送端的发送策略不同,接收端可以接收到一次时间间隔表示一组数据,如仅接收到一次etu的时间间隔表示00,数据传输速度快,也可以接收到多次相同的时间间隔表示一组数据,如接收到三次etu的时间间隔表示00,数据传输精确度高,可防止时间间隔丢失造成的误判。
下面以待接收的比特串为0011100100,N=1,进行本申请中数据发送方法的简单举例说明:
实施例1的方案中,确定当前数据传输的时间参数,可选的,可确定出两个时间参数,第一时间参数etu和第二时间参数pdt,其中etu=10μs,pdt=30μs。时间参数的个数与N并不存在对应关系,本实施例并不对时间参数的具体个数作限制,只要能表达出数据比特的数值对应的时间间隔即可。
步骤S201中,接收到11个信号,确定11个信号中每相邻两个信号的起始时刻之间的时间间隔,得到10个时间间隔etu、etu、pdt、pdt、pdt、etu、etu、pdt、etu、etu。
步骤S202,获取上述10个时间间隔分别对应的1比特数据,得到etu时间间隔传输的
数值0,得到etu时间间隔传输的数值0,得到pdt时间间隔传输的数值1,得到pdt时间间隔传输的数值1……得到etu数据间隔传输的数值0,最终完成比特串0011100100的接收。
在本实施例中,根据发送端的发送策略不同,接收端可以接收到一次时间间隔表示1比特数据,如仅接收到一次etu的时间间隔表示数值0,数据传输速度快,也可以接收到多次相同的时间间隔表示1比特数据,如接收到三次etu的时间间隔表示数值0,数据传输精确度高,可防止时间间隔丢失造成的误判。
下面以待接收的比特串为0011100100,N=3,对本申请实施例提供的数据接收方法进行的简单举例说明:
实施例1的方案中,确定当前传输的时间参数,可选的,可确定出两个时间参数,第一时间参数etu和第二时间参数pdt,其中etu=10μs,pdt=30μs,在本申请实施例中,时间参数为数据发送占用的时间长度。时间参数的个数与N并不存在对应关系,仅与发送端协商一致即可,本实施例并不对时间参数的具体个数作限制,只要能表达出数据比特的数值对应的时间间隔即可。
步骤S201中,接收到5个信号,确定5个信号中每相邻两个信号的起始时刻之间的时间间隔,得到4个时间间隔etu、etu+3pdt、etu+4pdt、etu+4pdt。
步骤S202,获取上述4个时间间隔分别对应的2比特数据,本实施例中,可以根据与数据的发送端预先协商的计算方法m=etu+m*pdt的得到时间间隔对应的数值,如接收到的一个100μs的时间间隔,则可得到m=3,即该组数据为101。也可以在本步骤之前按照时间参数获取N比特数据包含的2N个不同数值与时间间隔的对应关系。如,在N=3时,按照时间参数获取3比特数据包含的8个不同数值与时间间隔的对应关系,即000=etu,001=etu+pdt,010=etu+2pdt,011=etu+3pdt,100=etu+4pdt,101=etu+5pdt,110=etu+6pdt,111=etu+7pdt,即如接收到100μs的时间间隔,可以直接确定该数据比特为101。最终根据与数据发送端预先协商的数据位数,删除补零位,完成比特串0011100100的接收。
在本实施例中,根据发送端的发送策略不同,接收端可以接收到一次时间间隔表示一组数据,如仅接收到一次etu的时间间隔表示000,数据传输速度快,也可以接收到多次相同的时间间隔表示一组数据,如接收到三次etu的时间间隔表示000,数据传输精确度高,可防止时间间隔丢失造成的误判。
当N≥4时,可参照N=2或N=3时的数据接收方法,接收数据,在此不再赘述。
实施例3
如图3所示,本实施例提供一种数据传输方法,为达到上述目的,本实施例的技术方案具体是这样实现的:
步骤S301:确定时间参数。
作为本实施例中一种可选的实施方式,时间参数可以包括第一时间参数和/或第二时间参数,为了便于说明,本实施例中将第一时间参数记为etu,将第二时间参数记为pdt,第一时间参数etu和第二时间参数pdt均代表一段时间值,例如etu=0.1秒,pdt=0.01秒,该值由数据发送端与接收端协商确定,利用该时间参数可以确定发送握手信号的时间间隔,接收端可以根据接收到的握手信号确定,当然,可以只有一个时间参数,也可以有多个时间参数,本实施例中为例便于描述,仅以2个时间参数为例,利用2个时间参数确定第一时间间隔组和第二时间间隔组,但并不排除多个时间参数的情况。
步骤S302:根据所述时间参数确定第一时间间隔组与第二时间间隔组。
其中,第一时间间隔组包括j个第一时间间隔,第二时间间隔组包括j个第二时间间隔;作为本实施例中一种可选的实施方式,第一时间间隔是指在步骤S202中发送K个握手信号时,第i个信号的开始时刻与第i-1个信号的开始时刻之间的时间间隔,记做Ti-1,i,第二时间间隔是指发送K个握手信号时,第i个信号的开始时刻与第i+1个信号的开始时刻之间的时间间隔,记做Ti,i+1,其中,i=2,4,……,2j,j=(K-1)/2,K≥3且K为奇数。
在本实施例中,需要说明的是,首先,第一时间间隔组中的第一时间间隔Ti-1,i与第二时间间隔组中的第二时间间隔Ti,i+1满足一定的预设关系,通过该预设关系可以保证握手信号的有效性,以使接收端在接收到该握手信号后,可以根据第一时间间隔Ti-1,i和第二时间间隔Ti,i+1的预设关系,判断出该握手信号是用于指示开始接收数据的信号;其次,第一时间间隔组中的各个第一时间间隔Ti-1,i与第一时间参数etu和/或第二时间参数pdt满足一定的预设关系,以使得接收端在接收到该握手信号后,可以根据相同的预设关系通过接收到的多个第一时间间隔计算得到第一时间参数etu和/或第二时间参数pdt,以使得接收端可以根据第一时间参数etu和/或第二时间参数pdt计算得到传输的时间间隔对应的比特数据。
在本实施例中,第一时间间隔组中的第一时间间隔Ti-1,i与第二时间间隔组中的第二时间间隔Ti,i+1满足一定的预设关系可以包括很多种,而第一时间间隔组中的各个第一时间间隔Ti-1,i与第一时间参数etu和/或第二时间参数pdt满足一定的预设关系也包括多种,下面,以示例性的方式做出详细解释。
作为本实施例的一种可选实施方式,以K=5为例,5个信号中每相邻两个之间共会产生4个时间间隔,当i=2时,第一时间间隔T1,2为第一个信号与第二个信号开始时刻之间的时间间隔,标记为t0,第二时间间隔T2,3为第二个信号与第三个信号开始时刻之间的时间间隔,标记为t1;当i=4时,第一时间间隔T3,4为第三个信号与第四个信号开始时刻之间的时间间隔,标记为t2,第二时间间隔T4,5为第四个信号与第5个信号开始时刻之间的时间间隔,标记为t3。此时,t0、t2为第一时间间隔组,取t1、t3为第二时间间隔组,第一
时间间隔与第二时间间隔之间满足预设关系即指,t0与t1之间,以及t2与t3之间同时满足预设关系,该预设关系可以根据技术人员的经验确定,或者根据实际运行时的参数确定。作为一种可选的实施方式,预设关系可以为t1=a*t0且t3=a*t2;或者,t1=(a+b)*t0且t3=(a+b)*t2;或者,t1=(c*a+b)*t0且t3=(c*a+b)*t2,其中,a、b、c为≥1的自然数,例如,a=2,该预设关系可以是多种,此处不再赘述。
下面,以第一时间间隔组的第一时间间隔t0和t2为例,对第一时间间隔组中的各个第一时间间隔Ti-1,it0、t2与第一时间参数etu和/或第二时间参数pdt满足一定的预设关系,进行详细说明:
第一时间间隔t0和t2,根据第一时间参数etu或第二时间参数pdt中的一个通过预设的时间参数生成规则生成,以etu为例,t0和t2可采用以下任意一种计算方式获得,当然,预设的时间参数生成规则并不限于以下计算方式:
t0=a*etu;
t2=x*a*etu;
其中,a为≥1的自然数,x为有理数,因此,接收端可以通过相同的预设的时间参数生成规则利用t0与t2可以计算出etu。
或者,第一时间间隔t0和t2,根据第一时间参数etu和第二时间参数pdt通过预设的时间参数生成规则生成,t0和t2可采用以下任意一种计算方式获得,当然,预设的时间参数生成规则并不限于以下计算方式:
t0=a*etu+b*pdt;
t2=x*a*etu+b*pdt;
其中,a、b为≥1的自然数,x为有理数,因此,接收端可以通过相同的预设的时间参数生成规则利用t0与t2可以计算出etu和pdt。
或者,第一时间间隔t0和t2,根据第一时间参数etu和第二时间参数pdt通过预设的时间参数生成规则生成,t0和t2可采用以下任意一种计算方式获得,当然,预设的时间参数生成规则并不限于以下计算方式:
t0=a*etu+b*pdt;
t2=a*etu+x*b*pdt;
其中,a、b为≥1的自然数,x为有理数,因此,接收端可以通过相同的预设的时间参数生成规则利用t0与t2可以计算出etu和pdt。
同样地,当K=7时,7个信号相邻两个之间共会产生6个时间间隔,当i=2时,第一时间间隔T1,2为第一个信号与第二个信号开始时刻之间的时间间隔,标记为t0,第二时间间隔T2,3为第二个信号与第三个信号开始时刻之间的时间间隔,标记为t1;当i=4时,第
一时间间隔T3,4为第三个信号与第四个信号开始时刻之间的时间间隔,标记为t2,第二时间间隔T4,5为第四个信号与第五个信号开始时刻之间的时间间隔,标记为t3;当i=6时,第一时间间隔T5,6为第五个信号与第六个信号开始时刻之间的时间间隔,标记为t4,第二时间间隔T6,7为第六个信号与第七个信号开始时刻之间的时间间隔,标记为t5;此时,t0、t2和t4为第一时间间隔组,t1、t3和t5为第二时间间隔组,第二时间间隔组的t1、t3和t5与第一时间间隔组的t0、t2和t4分别满足预设关系,即t0与t1之间、t2与t3之间,以及t4与t5之间同时满足预设关系,根据第一时间参数etu和/或第二时间参数pdt通过预设的时间参数生成规则来确定第一时间间隔组的第一时间间隔t0、t2和t4的值,通过预设的时间参数生成规则可采用不同的方式,例如,第一时间间隔t0、t2和t4,根据第一时间参数etu或第二时间参数pdt中的一个通过预设的时间参数生成规则生成,以etu为例,t0、t2和t4可采用以下任意一种计算方式获得,当然,预设的时间参数生成规则并不限于以下计算方式:
t0=a*etu;
t2=x*a*etu;
t4=2x*a*etu;
其中,a为≥1的自然数,x为有理数,因此,接收端可以通过相同的预设的时间参数生成规则利用t0、t2、t4可以计算出etu。
或者,第一时间间隔t0、t2和t4,根据第一时间参数etu和第二时间参数pdt通过预设的时间参数生成规则生成,t0、t2、t4可采用以下任意一种计算方式获得,当然,预设的时间参数生成规则并不限于以下计算方式:
t0=a*etu+b*pdt;
t2=x*a*etu+b*pdt;
t4=2x*a*etu+b*pdt;
其中,a、b为≥1的自然数,x为有理数,因此,接收端可以通过相同的预设的时间参数生成规则利用t0、t2、t4可以计算出etu和pdt。
或者,第一时间间隔t0、t2和t4,根据第一时间参数etu和第二时间参数pdt通过预设的时间参数生成规则生成,t0、t2和t4可采用以下任意一种计算方式获得,当然,预设的时间参数生成规则并不限于以下计算方式:
t0=a*etu+b*pdt;
t2=a*etu+x*b*pdt;
t4=a*etu+2x*b*pdt;
其中,a、b为≥1的自然数,x为有理数,因此,接收端可以通过相同的预设的时间参
数生成规则利用t0、t2、t4可以计算出etu和pdt。
本实施例中上述确定当前数据传输的第一时间间隔组和第二时间间隔组的具体实施方式仅为示例性实施方式,本申请并不排除其他时间参数生成规则以根据第一时间参数etu和/或第二时间参数pdt确定第一时间间隔组的第一时间间隔的实施方式,也不排除其他第一时间间隔与第二时间间隔的预设关系。
本实施例通过时间参数etu和/或pdt来确定第一时间间隔组,从而保证每次数据传输时,发送端与接收端对etu和pdt的取值保持一致,保证了每次数据传输的稳定性与准确性,由于每次数据传输之前发送端都会发送的握手信息重新确定时间参数etu和pdt的值,避免了频率差异因多个字符的连续接收而造成误差累计,有效防止当发送时钟和接收时间参数差异太大时,引起接收端采样错位,造成接收错误,通讯效率降低的问题。
步骤S303:产生并发送K个握手信号。
作为本实施例一种可选的实施方式,在具体实施时,产生并发送K个握手信号包括:根据第一时间间隔组与第二时间间隔组产生并发送K个握手信号;其中,K个握手信号中的第一时间间隔与第二时间间隔之间满足上述预设关系,可以参照步骤S201中对第一时间间隔与第二时间间隔需满足的预设关系的描述。
在本实施例中,K为预先设定值,K≥3且K为奇数,信号可以为脉冲信号,即接收到的是高电平脉冲信号(上升沿信号),或者是低电平脉冲信号(下降沿信号),脉冲信号可以为方波、正弦波、三角波或其他不规则波形,也可以是上述不同波形的组合。
在本实施例中,产生并发送K个信号,包括以下方式至少之一:
方式一:产生并发送K次低电平脉冲;
在该方式中,发送端在连续高电平中触发K次低电平脉冲,例如,在持续触发高电平第一时间间隔后,触发1次低电平脉冲,然后又恢复触发高电平的状态,在经过第二时间间隔后,又触发1次低电平脉冲,以这样的方式可以连续产生K次低电平脉冲,第一时间间隔可以为第i个信号的开始时刻与第i-1个信号的开始时刻之间的时间间隔,第二时间间隔可以为第i个信号的开始时刻与第i+1个信号的开始时刻之间的时间间隔,其中,i=2,4,……,2j,j=(K-1)/2,K≥3且K为奇数。
示例性的,当K=5时,5个信号中每相邻两个之间共会产生4个时间间隔,当i=2时,第一时间间隔为第一个信号与第二个信号开始时刻之间的时间间隔,标记为t0,第二时间间隔为第二个信号与第三个信号开始时刻之间的时间间隔,标记为t1;当i=4时,第一时间间隔为第三个信号与第四个信号开始时刻之间的时间间隔,标记为t2,第二时间间隔为第四个信号与第5个信号开始时刻之间的时间间隔,标记为t3,发送端在连续高电平中触发5次低电平脉冲,包括:在持续触发高电平一段时间后,触发第1次低电平脉冲,然后
又恢复触发高电平的状态,在经过t0后,触发第2次低电平脉冲,然后又恢复触发高电平的状态,在经过t1后,触发第3次低电平脉冲,然后又恢复触发高电平的状态,在经过t2后,触发第4次低电平脉冲,然后又恢复触发高电平的状态,在经过t3后,触发第5次低电平脉冲,以这样的方式可以连续产生5次低电平脉冲,且,第一时间间隔与第二时间间隔满足预设关系,例如,t1=a*t0且t3=a*t2;或者,t1=(a+b)*t0且t3=(a+b)*t2;或者,t1=(c*a+b)*t0且t3=(c*a+b)*t2,其中,a、b、c为≥1的自然数,例如,a=2,该预设关系可以是多种,此处不再赘述,形成有效的握手信号。
方式二:产生并发送K次高电平脉冲;
在该方式中,发送端在连续低电平中触发K次高电平脉冲,例如,在持续触发低电平第一时间间隔后,触发1次高电平脉冲,然后又恢复触发低电平的状态,在经过第二时间间隔后,又触发1次高电平脉冲,以这样的方式可以连续产生K次高电平脉冲,第一时间间隔可以为第i个信号的开始时刻与第i-1个信号的开始时刻之间的时间间隔,第二时间间隔可以为第i个信号的开始时刻与第i+1个信号的开始时刻之间的时间间隔,其中,i=2,4,……,2j,j=(K-1)/2,K≥3且K为奇数。
示例性的,当K=5时,5个信号中每相邻两个之间共会产生4个时间间隔,当i=2时,第一时间间隔为第一个信号与第二个信号开始时刻之间的时间间隔,标记为t0,第二时间间隔为第二个信号与第三个信号开始时刻之间的时间间隔,标记为t1;当i=4时,第一时间间隔为第三个信号与第四个信号开始时刻之间的时间间隔,标记为t2,第二时间间隔为第四个信号与第5个信号开始时刻之间的时间间隔,标记为t3,发送端在连续低电平中触发5次高电平脉冲,包括:在持续触发低电平一段时间后,触发第1次高电平脉冲,然后又恢复触发低电平的状态,在经过t0后,触发第2次高电平脉冲,然后又恢复触发低电平的状态,在经过t1后,触发第3次高电平脉冲,然后又恢复触发低电平的状态,在经过t2后,触发第4次高电平脉冲,然后又恢复触发低电平的状态,在经过t3后,触发第5次高电平脉冲,以这样的方式可以连续产生5次高电平脉冲,且,第一时间间隔与第二时间间隔满足预设关系,例如,t1=a*t0且t3=a*t2;或者,t1=(a+b)*t0且t3=(a+b)*t2;或者,t1=(c*a+b)*t0且t3=(c*a+b)*t2,其中,a、b、c为≥1的自然数,例如,a=2,该预设关系可以是多种,此处不再赘述,形成有效的握手信号。
在上述方式中,K个信号属于跳变信号,且跳变幅度明显,便于与噪声信号进行区分。
此外,在所述产生并发送K个握手信号之后,本实施例提供的方法还包括:按照根据第一时间参数etu与第二时间参数pdt发送数据的步骤,具体请参见实施例4中描述的数据发送方法。
实施例4
本实施例提供了一种数据发送方法,图4是基于本实施例1中图1和实施例3中图3所示的数据传输方法的一种可选的数据发送方法的流程图。如图4所示,该数据发送方法按照确定的时间参数进行数据发送,包括以下步骤:
步骤S401,按照时间参数获取N比特数据包含的2N个不同数值与时间间隔的对应关系,其中,不同数值对应的时间间隔不同,N≥1。
在步骤S401中,该时间参数即为实施例1以及实施例3中确定的时间参数,具体包括第一时间参数etu和第二时间参数pdt。作为本实施例的一个可选实施方式,按照时间参数获取N比特数据包含的2N个不同数值与时间间隔的对应关系,其中,不同数值对应的时间间隔不同,N≥1还可以理解为:
获取2N个长度为N的比特串中各个比特串与时间间隔的对应关系,其中,2N个所述比特串互不相同,且不同所述比特串对应的时间间隔不同,N≥1。例如当N=1时,2个长度为1的比特串中各个比特串分别为0和1,当N=2时,4个长度为2的比特串中各个比特串分别为:00、01、10和11,当N=3或者以上时,参照N=2,在此不再赘述。
在本实施例的一个可选实施方式中,N比特数据包含的2N个不同数值,可以理解为:例如,N=1时,1比特数据,其包含21个不同数值,分别为0,1;N=2时,2比特数据,其包含22个不同数值,分别为00,01,10,11。按照时间参数获取N比特数据包含的2N个不同数值与时间间隔的对应关系可以理解为:例如,当N=1时,按照时间参数获取0对应的时间间隔,按照时间参数获取1对应的时间间隔;当N=2时,按照时间参数获取00对应的时间间隔,按照时间参数获取01对应的时间间隔,按照时间参数获取10对应的时间间隔,按照时间参数获取11对应的时间间隔。当然,当N为其他值时,与上述理解方式相同,在此不再赘述。
在本实施例的一个可选实施方式中,数据的发送端可采用与数据的接收端预先协商确定的计算方法计算该数值对应的时间间隔,如当N=n时,发送数值m对应的时间间隔的计算方法可以为:数值m对应的时间间隔=etu+m*pdt(其中,0≤m≤2n-1,etu为第一时间参数,pdt为第二时间参数,举例来说etu=10μs,pdt=30μs),即数值11对应的时间间隔计算方法可以为10μs+3*30μs=100μs,通过该可选实施方式可以计算出数值对应的时间间隔。当然,本申请也可以采用其他预先协商的计算方法确定时间间隔,本申请对此不做限制。通过预先协商的计算方法计算得出该数值对应的时间间隔,可保证数据传输的可扩展性,即不论N的取值是多少,发送端和接收端均可计算得出不同数值与时间间隔的对应关系。
具体地,根据第一时间参数etu与第二时间参数pdt,按照与数据接收端预先约定的编解码规则,获取N比特数据包含的2N个不同数值与时间间隔的对应关系,预先约定的编解
码规则可以为能够保证不同数值的N个数据比特对应唯一时间间隔的任意方式,示例性地:
当N=1时,不同数值的N个数据比特包括:0、1,此时,
0=etu,1=etu+pdt,且etu≠etu+pdt,或,
0=2etu,1=etu+2pdt,且2etu≠etu+2pdt,
……
当N=2时,不同数值的N个数据比特包括:00、01、10、11,此时,
00=etu,01=etu+pdt,10=etu+2pdt,11=etu+3pdt,且etu≠etu+pdt≠etu+2pdt≠etu+3pdt,或,
00=2etu,01=etu+2pdt,10=etu+2.5pdt,11=1.3etu+3pdt,
且2etu≠etu+2pdt≠etu+2.5pdt≠1.3etu+3pdt,
……
同样地,当N=3时,不同数值的N个数据比特包括:000、001、010、011、100、101、110、111,此时,根据第一时间参数etu与第二时间参数pdt,按照与数据接收端预先约定的编解码规则,得到N比特数据包含的2N个不同数值对应的时间间隔,预先约定的编解码规则可参照上述示例,在此不再赘述。
作为本申请实施例的另一个可选实施方式,数据的发送端也可采用与数据的接收端预先协商并存储的列表来确定该数值对应的时间间隔,采用查找列表的方式确定该数值对应的时间间隔,可提高得到该数值对应的时间间隔的效率。
作为本申请实施例的另一个可选实施方式,数据的发送端采用与数据的接收端预先协商确定的计算方法计算该数值对应的时间间隔之后,数据的发送端查找预先存储的列表来判断该计算得到的数值对应的时间间隔是否属于数据的接收端的接收范围。采用计算得到数值对应的时间间隔之后进一步查找列表的方式得到数值对应的时间间隔,可在保证接收端可正常接收的前提下提高数据传输的扩展性。
步骤S402,获取当前待发送的数据比特串。
在本申请的一个可选实施方式中,数据的发送端可以自行生成当前待发送的数据比特串,也可以从其他装置接收当前待发送的数据比特串,本申请并不局限于当前待发送的数据比特串的获取方式,只要最终可以获取当前待发送的数据比特串的方式均应属于本申请的保护范围。
作为本申请的一个可选实施方式,数据的发送端可以作为一个转接装置,其可以将其他装置(以下称为第一终端)与数据的接收端的通信进行转接,此时,数据的发送端通过如下方式获取当前待发送的数据比特串:步骤S402a,通过第一接口接收第一数据;步骤S402b,根据第一接口支持的协议对第一数据进行解码,获得待发送的第一数据比特串。数
据的发送端作为转接装置时,可以具有两个通信接口,例如第一接口和第二接口,第一接口为与第一终端进行通信的接口,第二接口为与数据的接收端进行通信的接口,第一接口可以是现有的通用接口,包括无线和有线接口,例如USB接口、音频接口、串口、蓝牙、wifi、NFC等接口,通过该第一接口可以连接到第一终端,以接收从第一终端发送来的第一数据。第一终端可以是手机、电脑、PAD等设备,该第一数据可以是手机、电脑、PAD端需要传输的数据。同时,第一接口根据其接口类型的不同,可以利用自身支持的协议对接收到的第一数据进行解码,例如,第一接口可以根据USB协议、音频协议、串口协议、蓝牙协议、wifi协议、NFC协议等对第一数据进行解码,获得第一数据对应的数据比特串,该数据比特串为待发送的第一数据比特串(即当前待发送的数据比特串)。第二接口可以是连接到电子支付设备(即数据的接收端)的接口,通过该第二接口将数据比特发送至电子支付设备。该第二接口可以是一个两线接口;该电子支付设备可以实现USBkey功能、OTP功能以及智能卡功能等。将本申请的数据的发送端作为转接装置,通过该第一接口进行数据转换,可以实现将终端发送过来的数据转换成适合与数据的接收端进行通信的数据,实现不同接口之间的转换,扩大了本申请的数据的发送端的使用范围。当数据的发送端作为一个转接装置时,通过第一接口获取到当前待发送的数据比特串,并以本申请记载的数据发送方法通过第二接口将待发送的数据比特串进行发送即可。
步骤S403,将数据比特串进行分组,每组数据为N比特。
在本实施例中,可选地,步骤S402和步骤S403也可以在步骤S401之前的任意时刻执行,只要在数据发送前获取数据比特串并分组即可。另外,数据的发送端可以在每次发送数据之前均执行一次实施例3中确定时间参数的步骤和步骤S401,或者,数据的发送端也可以先执行实施例3中确定时间参数的步骤和步骤S401,后续每次发送数据,都使用步骤S401获取N比特数据包含的2N个不同数值与时间间隔的对应关系,以对待发送的数据进行编码,或者,也可以设置一个有效期限,在该有效期限内发送数据,均使用步骤S401获取N比特数据包含的2N个不同数值与时间间隔的对应关系,以对待发送的数据进行编码。或者,也可以按照事件触发的方式,每接收到一次事件触发,例如,用户输入当前数据传输的时间参数,计算一次N比特数据包含的2N个不同数值与时间间隔的对应关系。具体本实施例不作限定。
作为本申请的一个可选实施方式,将数据比特串进行分组,每组数据为N比特可以采用多种方式进行分组,可以采用每组包括1比特的方式进行分组,也可以采用每组包括2比特的方式进行分组,当数据比特串包括单数时,由于无法按照2比特进行完全分组,可以对数据比特串进行补0后再进行分组,此时,数据的发送端和数据的接收端预先设定或者协商好补0的方式,当从数据的高位开始发送数据比特串时,在比特串的末位补0,当
从数据的低位开始发送数据比特串时,在比特串的高位补0。当然,每组包括3比特及以上的情况可以参照每组包括2比特的方式进行分组,在此不再赘述。
步骤S404,根据获取的所述对应关系,以每组数据的数值对应的时间间隔表示该组数据的方式发送该组数据。
在本实施例中,每组数据的数值可以对应一个时间间隔,也可以对应多个相同的时间间隔。例如,参照图2,一组数据中包含2比特,该组数据的数值可以为00、01、10和11,当该组数据的数值为00时,可以以1个时间间隔表示数值00,此时该1个时间间隔对应的时间长度可以为etu,即该组数据00的表达方式可以为1个例如10μs的时间间隔,该组数据为00时,也可以5个时间间隔表示数值00,此时该5个时间间隔中每个时间间隔的时间长度可以为etu,即该组数据00的表达方式可以为5个时间间隔相同的信号,每个时间间隔为10μs的时间间隔。采用每组数据的数值对应一个时间间隔,数据传输速度快,效率高。采用每组数据的数值对应多个时间间隔,可准确判断该时间间隔对应的数值,防止数据传输过程中的丢失时间间隔导致的错误。
在本实施例的一个可选实施方式中,对于每组数据,在发送该组数据时,可以产生并发送M个信号,其中,每个信号的开始时刻与相邻的上一个信号的开始时刻的时间间隔为该组数据的数值对应的时间间隔,M≥1且M为自然数。采用信号的方式产生的时间间隔,有着易于检测和稳定性高的效果。
可选地,可以按照时间间隔产生M次低电平脉冲的方式产生M个信号,也可以是按照时间间隔产生M次高电平脉冲的方式产生M个信号。该低电平脉冲/高电平脉冲可以采用方波、正弦波、三角波等可区分高低电平脉冲的波形表示,在此不作限制。优选采用按照时间间隔产生低电平脉冲,在发送端与接收端通信时,发送端可使用高电平为接收端进行供电,通过低电平脉冲的方式传输信息。采用该方法的设备,在进行信息交互时,可使用同一根线同时完成供电和信息发送,减小了设备体积和制造成本。
在本实施例的一个可选实施方式中,在步骤S404之后,为了满足当前数据传输的速率,还可以更换时间参数,即在步骤S404之后还包括:可以按照预设规则,将当前使用的时间参数替换为新的时间参数,将新的时间参数作为当前数据传输的时间参数;按照当前数据传输的时间参数更新对应关系;在后续的数据发送过程中,利用更新后的对应关系进行数据传输。在本实施方案中,新的时间参数的确定可以通过发送端和接收端的协商完成,也可以通过发送端和接收端查找预先存储的时间参数表完成,如在发送某种类型数据时查表确定该类型的数据应该使用的时间参数。发送端的时间参数是可以变化的,可以匹配不同数据处理能力的接收端,或匹配不同类型的数据,可进一步提高数据处理的效率。
在本实施例的一个可选实施方式中,步骤S404中完成发送最后一组数据之后,还可包
括:发送校验数据,通过该校验数据,数据接收端可判断接收数据是否完整正确。校验数据包括但不限于通过MAC校验、奇偶校验、取和校验等校验方式计算出的校验数据。
在本实施例的一个可选实施方式中,步骤S404中完成发送最后一组数据比特之后,或步骤S404中完成发送最后一组数据之后,在发送校验数据之前,还可包括:发送A个结束信号(A≥1且为整数),结束信号可以与握手信号相同,也可以不同,通过该结束信号,接收端可判断数据比特是否接收结束。
由上述本申请实施例提供的技术方案可以看出,发送端可以根据发送波形的时间间隔表示发送波形的数据,可以仅使用两线完成数据的发送,适用在电子设备中时,可以有效减小电子设备的体积。
下面以待发送的比特串为0011100100,N=2,对本申请实施例提供的数据发送方法进行简单举例说明:
实施例1和实施例3中,确定当前传输的时间参数,可选的,可确定出两个时间参数,第一时间参数etu和第二时间参数pdt,其中etu=10μs,pdt=30μs,在本申请实施例中,时间参数为数据发送占用的时间长度。时间参数的个数与N并不存在对应关系,仅与接收端一致即可,本实施例并不对时间参数的具体个数作限制,只要能表达出数据比特的数值对应的时间间隔即可。
步骤S401中,按照时间参数获取N比特数据包含的2N个不同数值与时间间隔的对应关系。如,在N=2时,按照时间参数获取2比特数据包含的4个不同数值与时间间隔的对应关系,即可以为00=etu,01=etu+pdt,10=etu+2pdt,11=etu+3pdt,在本申请中,可以采用时间参数的多种组合形式表达2比特数据的数值对应的时间间隔,并不局限于此。
步骤S402中,获取当前待发送的数据比特串0011100100。
步骤S403中,将数据比特串0011100100进行分组,每组数据为2比特,即:00 11 10 01 00。
步骤S404中,根据获取的对应关系,以每组数据的数值对应的时间间隔表示该组数据的方式发送该组数据。在本实施例中,每组数据的数值可以对应一个时间间隔,也可以对应多个相同的时间间隔,如00可以对应一个etu的时间间隔(例如10μs),并在一个信号后以该时间间隔发送另一个信号,这样形成的etu的时长表示数值00;当然,00也可以对应三个etu的时间间隔(例如每个时间间隔为10μs),并在一个信号后以etu的时间间隔连续发送三个信号,接收端只有接收到这样相同的三个时长才会认为接收到了数值00。在使用多个相同的时间间隔表示每组数据比特时,时间间隔的个数发送端和接收端一致即可,具体本实施例不作限制。
本实施例中,可以按照数据比特串的顺序以etu的时间间隔表示发送数值00,etu+3pdt的时间间隔表示发送数值11,etu+2pdt的时间间隔表示发送数值10,etu+pdt的时间间隔表示发送数值01,etu的时间间隔表示发送数值00。以每组数据的数值对应一个时间间隔为例,发送数据比特串0011100100的波形如图5所示,通过各个信号之间的时间间隔,完成该数据比特串的发送。
下面以待发送的比特串为0011100100,N=1,对本申请实施例提供的数据发送方法进行简单举例说明:
实施例1和实施例3中,确定当前传输的时间参数,可选的,可确定出两个时间参数,第一时间参数etu和第二时间参数pdt,其中etu=10μs,pdt=30μs。时间参数的个数与N并不存在对应关系,本实施例并不对时间参数的具体个数作限制,只要能表达出数据比特的数值对应的时间间隔即可。
步骤S401中,按照时间参数获取N比特数据包含的2N个不同数值与时间间隔的对应关系。如,在N=1时,按照时间参数获取1比特数据包含的2个不同数值与时间间隔的对应关系,即可以是,0=etu,1=pdt,在本申请中,可以采用时间参数的多种组合形式表达1比特数据的数值对应的时间间隔,并不局限于此。
步骤S402中,获取当前待发送的数据比特串0011100100。
步骤S403中,将数据比特串0011100100进行分组,每组数据包含1比特,即:0 0 1 1 1 0 0 1 0 0。本步骤也可省略。
步骤S404中,根据获取的对应关系,以每组数据的数值对应的时间间隔表示该组数据的方式发送该组数据。在本实施例中,每组数据的数值可以对应一个时间间隔,也可以对应多个相同的时间间隔,如0可以对应一个etu的时间间隔(例如10μs),并在一个信号后以该时间间隔发送另一个信号,这样形成的etu的时长表示数值0;当然,0也可以对应三个etu的时间间隔(例如每个时间间隔为10μs),并在一个信号后以etu的时间间隔连续发送三个信号,接收端只有接收到这样相同的三个时长才会认为接收到了数值0。
本实施例中,可以按照数据比特串的顺序发送每组数据,即各个信号的时间间隔分别为etu的时间间隔,etu的时间间隔,pdt的时间间隔,pdt的时间间隔,pdt的时间间隔,etu的时间间隔,etu的时间间隔,pdt的时间间隔,etu的时间间隔,etu的时间间隔。以每组数据的数值对应一个时间间隔为例,发送数据比特串0011100100的波形如图6所示,通过各个信号之间的时间间隔,完成该数据比特串的发送。
下面以待发送的比特串为0011100100,N=3,对本申请实施例提供的数据发送方法进
行简单举例说明:
实施例1和实施例3中,确定当前传输的时间参数,可选的,可确定出两个时间参数,第一时间参数etu和第二时间参数pdt,其中etu=10μs,pdt=30μs。时间参数的个数与N并不存在对应关系,本实施例并不对时间参数的具体个数作限制,只要能表达出数值对应的时间间隔即可。
步骤S401中,按照时间参数获取N比特数据包含的2N个不同数值与时间间隔的对应关系。如,在N=3时,按照时间参数获取3比特数据包含的8个不同数值与时间间隔的对应关系,例如,000=etu,001=etu+pdt,010=etu+2pdt,011=etu+3pdt,100=etu+4pdt,101=etu+5pdt,110=etu+6pdt,111=etu+7pdt,在本申请中,可以采用时间参数的多种组合形式表达3比特数据的数值对应的时间间隔,并不局限于此。
步骤S402中,获取当前待发送的数据比特串0011100100。
步骤S403中,将数据比特串0011100100进行分组,每组数据为3比特,在本实施例中,当获取的数据比特串不是每组包含的比特数的整数倍时,对数据比特串的进行补零操作,当数据比特串的发送顺序为从低位到高位发送,则高位补零分组为:000 011 100 100,当数据比特串的发送顺序为从高位至低位发送,则低位补零分组为001 110 010 000。
步骤S404中,根据获取的对应关系,以每组数据的数值对应的时间间隔表示该组数据的方式发送该组数据。在本实施例中,每组数据的数值可以对应一个时间间隔,也可以对应多个相同的时间间隔。
本实施例中,如按照数据比特串的从低位至高位的顺序发送每组数据比特,即发送etu+4pdt的时间间隔的信号,etu+4pdt的时间间隔的信号,etu+3pdt的时间间隔的信号,etu的时间间隔的信号。以每组数据的数值对应一个时间间隔为例,发送数据比特串0011100100的波形如图7所示,通过各个信号之间的时间间隔,完成该数据比特串的发送。当然,如果从高位只低位的顺序发送每组数据比特,只需要在低位补零即可,数据发送的方式采用与低位至高位的类似,只是采用从高位开始的数值对应的时间间隔依次发送信号,在此不再赘述。
当N≥4时,可参照N=2或N=3时的数据发送方法,发送数据。
当N=1.5时,可参照N=2时的数据发送方法,发送数据,不同之处在于:
使用至少2个时间间隔对应3比特数据中的数值,即当N的取值为非整数时,可使用多个时间间隔对应B比特数据中的不同数值,其中,B是N的整数倍,B为正整数。
实施例5
本实施例提供一种数据处理设备,如图8所示,该数据处理设备包括:接收模块、判
断模块、时间处理模块和数据处理模块,其中,
接收模块,用于接收K个信号。
K为预先设定值,K≥3且K为奇数,例如预先设定K=5,那么当接收模块累计接收到5个信号时,则判断模块、时间处理模块和数据处理模块对接收到的5个信号进行处理,本实施例提供的数据处理设备可以通过该K个信号之间的时间间隔的关系判断出是否可以开始接收数据,即,如果满足预设关系在K个信号之后开始接收数据,可以将该K个信号视为指示开始接收数据的握手信号;其中,信号可以为脉冲信号,即接收到的是高电平脉冲信号(上升沿信号),或者是低电平脉冲信号(下降沿信号),脉冲信号可以为方波、正弦波、三角波或其他不规则波形,也可以是上述不同波形的组合。
在本实施例中,接收模块,用于接收K个信号,包括以下方式至少之一:
方式一:接收模块检测到K次低电平脉冲;
在该方式中,接收模块可以检测到连续高电平中的K次低电平脉冲,例如,在接收模块检测到高电平一段时间后,检测到1次低电平脉冲,然后又恢复检测到高电平的状态,在经过一段时间后,又检测到1次低电平脉冲,接收模块以这样的方式可以连续检测到K次低电平脉冲。
方式二:接收模块检测到K次高电平脉冲;
在该方式中,接收模块可以检测到连续低电平中的K次高电平脉冲,例如,在接收模块检测到低电平一段时间后,检测到1次高电平脉冲,然后又恢复检测到低电平的状态,在经过一段时间后,又检测到1次高电平脉冲,接收模块以这样的方式可以连续检测到K次高电平脉冲。
在上述方式中,K个信号属于跳变信号,且跳变幅度明显,便于与噪声信号进行区分。
判断模块,用于检测K个信号中每相邻两个之间的时间间隔。
在本实施例中,当接收模块连续接收到K个信号后,判断模块检测K个信号中每相邻两个信号之间的时间间隔,可选地,当K个信号为连续高电平中的K个低电平信号时,判断模块确定第p个低电平信号的起始时刻至第p+1个低电平信号的起始时刻之间的时长为第p个和第p+1个信号之间的时间间隔;同样地,当K个信号为连续低电平中的K个高电平信号时,判断模块确定第p个高电平信号的起始时刻至第p+1个高电平信号的起始时刻之间的时长为第p个和第p+1个信号之间的时间间隔;其中,1≤p≤K-1,且p为自然数;作为一种可选的实施方式,判断模块通过检测每个脉冲信号的起始时刻,从而准确迅速地获得相邻两个信号起始时刻之间的时间间隔。
判断模块,还用于判断第一时间间隔与第二时间间隔之间是否满足预设关系。
作为本实施例一种可选的实施方式,第一时间间隔可以为第i个信号的开始时刻与第
i-1个信号的开始时刻之间的时间间隔,第二时间间隔可以为第i个信号的开始时刻与第i+1个信号的开始时刻之间的时间间隔,其中,i=2,4,……,2j,j=(K-1)/2,K≥3且K为奇数;示例性的,当K=5时,5个信号中每相邻两个之间共会产生4个时间间隔,当i=2时,第一时间间隔为第一个信号与第二个信号开始时刻之间的时间间隔,标记为t0,第二时间间隔为第二个信号与第三个信号开始时刻之间的时间间隔,标记为t1;当i=4时,第一时间间隔为第三个信号与第四个信号开始时刻之间的时间间隔,标记为t2,第二时间间隔为第四个信号与第5个信号开始时刻之间的时间间隔,标记为t3。判断第一时间间隔与第二时间间隔之间是否满足预设关系即指,判断t0与t1之间,以及t2与t3之间是否同时满足预设关系,该预设关系可以根据技术人员的经验确定,或者根据实际运行时的参数确定,只要保证满足这样的预设关系,就可以确定该K个信号为指示开始接收数据的握手信号。作为一种可选的实施方式,预设关系可以为t1=a*t0且t3=a*t2;或者,t1=(a+b)*t0且t3=(a+b)*t2;或者,t1=(c*a+b)*t0且t3=(c*a+b)*t2,其中,a、b、c为≥1的自然数,例如,a=2,该预设关系可以是多种,此处不再赘述;当判断模块判定第一时间间隔与第二时间间隔满足预设关系时,即可判定K个信号为有效的握手信号。
时间处理模块,用于确定第一时间间隔组和/或第二时间间隔组,第一时间间隔组包括j个第一时间间隔,第二时间间隔组包括j个第二时间间隔,j=(K-1)/2,K≥3且K为奇数。
当i取值不同时,时间处理模块根据K个信号产生的K-1个时间间隔将产生一系列的第一时间间隔和第二时间间隔,时间处理模块可以从多个不同的第一时间间隔中选取至少1个成为第一时间间隔组,同样的,时间处理模块也可以从多个不同的第二时间间隔中选取至少1个成为第二时间间隔组,例如,K=5时,5个信号中产生第一时间间隔t0、t2,以及第二时间间隔t1、t3,此时,时间处理模块可以取t0、t2作为第一时间间隔组,取t1、t3作为第二时间间隔组,本实施例并不限制第一时间间隔组以及第二时间间隔组中时间间隔的个数,均为j个,至少有一个即可,时间处理模块通过这样的方式可以确定第一时间间隔组和/或第二时间间隔组,便于对时间间隔进行分类处理。
若第一时间间隔与第二时间间隔满足预设关系,时间处理模块则根据第一时间间隔组中的至少一个第一时间间隔和/或所述第二时间间隔组中的至少一个第二时间间隔确定当前数据传输的时间参数。
其中,时间处理模块则根据第一时间间隔组中的至少一个第一时间间隔和/或所述第二时间间隔组中的至少一个第二时间间隔确定当前数据传输的时间参数,具体为:时间处理模块根据第一时间间隔组中的至少两个第一时间间隔,或根据第二时间间隔组中的至少两个第二时间间隔,或根据第一时间间隔组中的至少一个第一时间间隔以及第二时间间隔组中的至少一个第二时间间隔,按照与数据发送端预先约定的时间参数生成规则,且第一时
间间隔和第二时间间隔不相邻。
在本实施例中,在确定的第一时间间隔组和第二时间间隔组中,当第i个信号与第i-1个信号之间的第一时间间隔与第i个信号与第i+1个信号之间的第二时间间隔均满足预设关系时,可以判定K个信号为有效的握手信号,此时,时间处理模块根据第一时间间隔组中的至少两个第一时间间隔,或根据第二时间间隔组中的至少两个第二时间间隔,或根据第一时间间隔组中的至少一个第一时间间隔以及第二时间间隔组中的至少一个第二时间间隔,按照与数据发送端预先约定的时间参数生成规则,且第一时间间隔和第二时间间隔不相邻,确定当前数据传输的时间参数,其中,预先约定的时间参数生成规则在保证每个数据比特编码方式唯一的前提下,可以选择任意种类的方式进行时间参数的确定。
例如,当K=5时,5个信号中相邻两个之间共会产生4个时间间隔,当i=2时,第一时间间隔为第一个信号与第二个信号开始时刻之间的时间间隔,标记为t0,第二时间间隔为第二个信号与第三个信号开始时刻之间的时间间隔,标记为t1;当i=4时,第一时间间隔为第三个信号与第四个信号开始时刻之间的时间间隔,标记为t2,第二时间间隔为第四个信号与第5个信号开始时刻之间的时间间隔,标记为t3;以此为例,下面对根据第一时间间隔组中的至少一个第一时间间隔和/或所述第二时间间隔组中的至少一个第二时间间隔确定当前数据传输的时间参数的方式做详细描述。
作为本实施例的一种可选实施方式,时间处理模块选取t0和t2作为第一时间间隔组,根据第一时间间隔组确定当前数据传输的时间参数,时间参数包括第一时间参数etu和第二时间参数pdt,etu和pdt由t0和t2唯一表示,etu和pdt的值可根据t0和t2的值通过任意计算方式获得,示例性的,etu和pdt可采用以下任意一种计算方式获得,当然,并不限于以下计算方式:
etu=t0,pdt=(t0-t2)/5;
etu=t0+t2,pdt=(t0+t2)/10;
etu=t0+t2/2,pdt=(t0-t2)/5;
etu=t2,pdt=(t0-t2)/15;
……..
作为本实施例的另一种可选实施方式,时间处理模块选取t0作为第一时间间隔组,根据第一时间间隔组确定当前数据传输的时间参数,时间参数包括第一时间参数etu和第二时间参数pdt,etu和pdt由t0唯一表示,etu和pdt的值可根据t0的值通过任意计算方式获得,示例性的,etu和pdt可采用以下任意一种计算方式获得,当然,并不限于以下计算方式:
etu=t0,pdt=t0/5;
etu=2*t0,pdt=t0/10;
etu=t0/2,pdt=t0/5;
etu=t0/3,pdt=t0/15;
……..
作为本实施例的另一种可选实施方式,时间处理模块选取t1和t3作为第二时间间隔组,根据第二时间间隔组确定当前数据传输的时间参数,时间参数包括第一时间参数etu和第二时间参数pdt,etu和pdt由t1和t3唯一表示,etu和pdt的值可根据t1和t3的值通过任意计算方式获得,示例性的,etu和pdt可采用以下任意一种计算方式获得,当然,并不限于以下计算方式:
etu=t1,pdt=(t1-t3)/5;
etu=t1+t3,pdt=(t1+t3)/10;
etu=t1+t3/2,pdt=(t1-t3)/5;
etu=t3,pdt=(t1-t3)/15;
……..
作为本实施例的另一种可选实施方式,时间处理模块选取t1作为第二时间间隔组,根据第二时间间隔组确定当前数据传输的时间参数,时间参数包括第一时间参数etu和第二时间参数pdt,etu和pdt由t1唯一表示,etu和pdt的值可根据t1的值通过任意计算方式获得,示例性的,etu和pdt可采用以下任意一种计算方式获得,当然,并不限于以下计算方式:
etu=t1,pdt=t1/5;
etu=2*t1,pdt=t1/10;
etu=t1/2,pdt=t1/5;
etu=t1/3,pdt=t1/15;
……..
当K=3时,3个信号中相邻两个之间共会产生2个时间间隔,当i=2时,第一时间间隔为第一个信号与第二个信号开始时刻之间的时间间隔,标记为t0,第二时间间隔为第二个信号与第三个信号开始时刻之间的时间间隔,标记为t1;以此为例,下面对根据所述第一时间间隔组中的至少一个第一时间间隔和/或所述第二时间间隔组中的至少一个第二时间间隔确定当前数据传输的时间参数的方式做详细描述。
作为本实施例的另一种可选实施方式,选取t0作为第一时间间隔组,根据第一时间间隔组确定当前数据传输的时间参数,时间参数包括第一时间参数etu和第二时间参数pdt,etu和pdt由t0唯一表示,etu和pdt的值可根据t0的值通过任意计算方式获得,示例性的,
etu和pdt可采用以下任意一种计算方式获得,当然,并不限于以下计算方式:
etu=t0,pdt=t0/5;
etu=2*t0,pdt=t0/10;
etu=t0/2,pdt=t0/5;
etu=t0/3,pdt=t0/15;
……..
作为本实施例的另一种可选实施方式,选取t1作为第二时间间隔组,根据第二时间间隔组确定当前数据传输的时间参数,时间参数包括第一时间参数etu和第二时间参数pdt,etu和pdt由t1唯一表示,etu和pdt的值可根据t1的值通过任意计算方式获得,示例性的,etu和pdt可采用以下任意一种计算方式获得,当然,并不限于以下计算方式:
etu=t1,pdt=t1/5;
etu=2*t1,pdt=t1/10;
etu=t1/2,pdt=t1/5;
etu=t1/3,pdt=t1/15;
……..
同样地,当K=7时,7个信号相邻两个之间共会产生6个时间间隔,当i=2时,第一时间间隔为第一个信号与第二个信号开始时刻之间的时间间隔,标记为t0,第二时间间隔为第二个信号与第三个信号开始时刻之间的时间间隔,标记为t1;当i=4时,第一时间间隔为第三个信号与第四个信号开始时刻之间的时间间隔,标记为t2,第二时间间隔为第四个信号与第五个信号开始时刻之间的时间间隔,标记为t3;当i=6时,第一时间间隔为第五个信号与第六个信号开始时刻之间的时间间隔,标记为t5,第二时间间隔为第六个信号与第七个信号开始时刻之间的时间间隔,标记为t6;此时,时间处理模块可选取t0、t2和t5作为第一时间间隔组,也可选取t1、t3和t6作为第二时间间隔组,时间处理模块根据第一时间间隔组中的至少两个第一时间间隔确定当前数据传输的时间参数,根据第二时间间隔组中的至少两个第二时间间隔确定当前数据传输的时间参数,也可根据第一时间间隔组中的至少一个第一时间间隔和第二时间间隔组中的至少一个第二时间间隔共同确定当前数据传输的时间参数,且第一时间间隔和第二时间间隔不相邻,时间参数etu和pdt的获取方式并不唯一,时间处理模块可采用不同的计算方式通过第一时间间隔组和/或第二时间间隔组任意获取,具体获取方式可参考K=5时的方案,在此不再赘述。
当K=3时,3个信号中相邻两个之间共会产生2个时间间隔,当i=2时,第一时间间隔为第一个信号与第二个信号开始时刻之间的时间间隔,标记为t0,第二时间间隔为第二个信号与第三个信号开始时刻之间的时间间隔,标记为t1;以此为例,下面对根据所述第
一时间间隔组中的至少一个第一时间间隔和/或所述第二时间间隔组中的至少一个第二时间间隔确定当前数据传输的时间参数的方式做详细描述。
作为本实施例的另一种可选实施方式,选取t0作为第一时间间隔组,根据第一时间间隔组确定当前数据传输的时间参数,时间参数包括第一时间参数etu和第二时间参数pdt,etu和pdt由t0唯一表示,etu和pdt的值可根据t0的值通过任意计算方式获得,示例性的,etu和pdt可采用以下任意一种计算方式获得,当然,并不限于以下计算方式:
etu=t0,pdt=t0/5;
etu=2*t0,pdt=t0/10;
etu=t0/2,pdt=t0/5;
etu=t0/3,pdt=t0/15;
……..
作为本实施例的另一种可选实施方式,选取t1作为第二时间间隔组,根据第二时间间隔组确定当前数据传输的时间参数,时间参数包括第一时间参数etu和第二时间参数pdt,etu和pdt由t1唯一表示,etu和pdt的值可根据t1的值通过任意计算方式获得,示例性的,etu和pdt可采用以下任意一种计算方式获得,当然,并不限于以下计算方式:
etu=t1,pdt=t1/5;
etu=2*t1,pdt=t1/10;
etu=t1/2,pdt=t1/5;
etu=t1/3,pdt=t1/15;
……..
本实施例中上述确定当前数据传输的时间参数的具体实施方式仅为示例性实施方式,本申请并不排除其他时间参数生成规则以根据第一时间间隔组中的至少两个第一时间间隔,或根据第二时间间隔组中的至少两个第二时间间隔,或根据第一时间间隔组中的至少一个第一时间间隔以及第二时间间隔组中的至少一个第二时间间隔,确定当前数据传输的时间参数的实施方式。
本实施例中时间处理模块通过第一时间间隔组和/或第二时间间隔组来确定时间参数etu和pdt,从而保证每次数据传输时,发送端与接收端对etu和pdt的取值保持一致,保证了每次数据传输的稳定性与准确性,由于每次数据传输之前接收端都会根据发送端发送的握手信息重新确定时间参数etu和pdt的值,避免了频率差异因多个字符的连续接收而造成误差累计,有效防止当发送时钟和接收时间参数差异太大时,引起接收端采样错位,造成接收错误,通讯效率降低的问题。
作为本实施例一种可选的实施方式,若第一时间间隔与第二时间间隔满足预设关系不
满足上述预设关系,则指示接收模块继续接收握手信号。
数据处理模块,用于按照时间参数接收数据。
作为本实施例一种可选的实施方式,接收模块,还用于接收X个信号,确定X个信号中每相邻两个信号的起始时刻之间的时间间隔,得到X-1个时间间隔,其中,X为正整数,且X>1;数据处理模块,还用于按照时间参数接收这X个信号,具体地,数据处理模块,用于获取X-1个时间间隔中每连续S个时间间隔中单个时间间隔对应的N个数据比特,得到S个时间间隔传输的数据比特,得到的S个时间间隔传输的数据比特为获取的N个数据比特,其中,在S>1的情况下,S个时间间隔相同,其中,X和S均为正整数,且S≤X-1。
作为本实施例一种可选的实施方式,当获取数据接收端可采用与数据发送端预先协商确定的计算方法根据当前数据传输的时间参数确定数据比特,如当前数据接收端与数据发送端预先协商确定的计算方法为,当N=n时,发送数据比特m的时间间隔的计算方法为m=etu+m*pdt(其中,0≤m≤2n-1,etu为第一时间参数,pdt为第二时间参数,etu=10μs,pdt=30μs),即数据比特11的时间间隔计算方法为10μs+3*30μs=100μs。若数据接收装置接收到100μs的时间间隔,可计算出m为3,即该时间间隔对应的数据比特为11。
作为本实施例一种可选的实施方式,数据处理模块根据第一时间参数etu和第二时间参数pdt,按照与数据发送端预先约定的编解码规则,进行数据接收;数据处理模块按照时间参数接收数据包括:按照所述时间参数获取N比特数据包含的2N个不同数值与时间间隔的对应关系,其中,不同数值对应的时间间隔不同,其中,N≥1。
数据处理模块根据第一时间参数etu与第二时间参数pdt,按照与数据发送端预先约定的编解码规则,获取N比特数据包含的2N个不同数值与时间间隔的对应关系,预先约定的编解码规则可以为能够保证不同数值的N个数据比特对应唯一时间间隔的任意方式,示例性地:
当N=1时,不同数值的N个数据比特包括:0、1,此时,
0=etu,1=etu+pdt,且etu≠etu+pdt,或,
0=2etu,1=etu+2pdt,且2etu≠etu+2pdt,
……
当N=2时,不同数值的N个数据比特包括:00、01、10、11,此时,
00=etu,01=etu+pdt,10=etu+2pdt,11=etu+3pdt,且etu≠etu+pdt≠etu+2pdt≠etu+3pdt,或,
00=2etu,01=etu+2pdt,10=etu+2.5pdt,11=1.3etu+3pdt,
且2etu≠etu+2pdt≠etu+2.5pdt≠1.3etu+3pdt,
……
同样地,当N=3时,不同数值的N个数据比特包括:000、001、010、011、100、101、110、111,此时,根据第一时间参数etu与第二时间参数pdt,按照与数据发送端预先约定的编解码规则,得到N比特数据包含的2N个不同数值对应的时间间隔,预先约定的编解码规则可参照上述示例,在此不再赘述。
数据处理模块按照与数据发送端预先约定的方式,根据第一时间参数etu和第二时间参数pdt得到N比特数据包含的2N个不同数值对应的时间间隔,其中,不同数值对应的时间间隔不同,从而区分接收到的不同的时间间隔所对应的不同数据比特,实现通过接收到的时间间隔来获取发送端发送的数据。
在本实施例的一个可选实施方式中,时间处理模块,还用于在数据处理模块获取传输的数据之前,按照时间参数得到不同数值的N比特对应的时间间隔,其中,不同数值的N比特对应的时间间隔不同,N≥1。
可选地,数据接收端可采用与数据发送端预先协商确定的计算方法计算该数据比特的时间间隔,如当N=n,发送数据比特m的时间间隔的计算方法为m=etu+m*pdt(其中,0≤m≤2n-1,etu为第一时间参数,pdt为第二时间参数,etu=10μs,pdt=30μs),即数据比特11的时间间隔计算方法为10μs+3*30μs=100μs,也可以采用其他预先协商的计算方法确定时间间隔,本实施对此不做具体限制。通过预先协商的计算方法计算得出该数据比特的时间间隔,可保证数据传输的可扩展性,即不论N的取值是多少,数据发送端和数据接收端均可计算得出数据比特的时间间隔。
作为本申请实施例的另一个可选实施方式。数据接收端也可采用与数据发送端预先存储的列表来确定该数据比特的时间间隔,数据处理模块可以采用查找列表的方式确定该数据比特的时间间隔,可提高得到数据比特时间间隔的效率。
在本实施例的一个可选实施方式中,X-1=n*S,n≥1且n为整数,采用这种可选实施方式,X个信号刚好可以传输n*S个数据比特,而不会出现多余的信号导致无法解码的问题。
在本实施例的一个可选实施方式中,如图9所示,数据处理设备还包括时间参数更新模块,可以用于更换时间参数,即按照预设规则,将当前使用的时间参数替换为新的时间参数,将新的时间参数作为当前数据传输的时间参数;数据处理模块,还用于根据重新获取的不同数值的N比特对应的时间间隔对接收到的X个信号进行解码,即按照当前使用的时间参数,获取X-1个时间间隔中每连续S个时间间隔中单个时间间隔对应的N比特,得到S个时间间隔传输的数据比特,得到的S个时间间隔传输的数据比特为获取的N比特。在本实施方案中,新的时间参数的确定可以通过数据发送端和数据接收端的协商完成,也可以通过数据发送端和数据接收端查找预先存储的时间参数表完成,如在发送某种类型数
据时查表确定该类型的数据应该使用的时间参数。数据发送端的时间参数是可以变化的,可以匹配不同数据处理能力的数据接收装置,或匹配不同类型的数据,可进一步提高数据处理的效率。
在本实施例的一个可选实施方式中,在接收模块,还用于在完成接收最后一个数据比特之后,还可以接收A个结束信号(Z≥1且为整数),结束信号可以与握手信号相同,也可以是其他特定格式的信号,通过该结束信号,数据处理模块可判断数据比特是否接收结束。
在本实施例的一个可选实施方式中,在接收模块,还用于在完成接收最后一个数据比特之后,或完成接收A个结束信号之后,而接收模块,还用于接收校验数据比特,通过该校验数据比特,判断接收数据是否完整正确。校验数据比特包括通过MAC校验、奇偶校验、取和校验等校验方式计算出的校验数据。
在本实施例的一个可选实施方式中,如图9所示,数据处理设备还包括滤波模块,用于接收Z个信号,去除Z个信号中的干扰,得到X个信号并发送至接收模块,其中Z≥X。
由上述本申请实施例提供的技术方案可以看出,数据处理模块可以根据接收波形的时间间隔确定接收波形的数据比特,可以仅使用两线完成数据的接收,适用在电子设备中时,可以有效减小电子设备的体积。
此外,作为本实施例的一种可选实施方式,如图9所示,本实施例中的数据处理设备还包括:数据发送模块,其中,数据发送模块,用于在数据处理模块按照时间参数接收数据之后,按照时间参数进行数据发送;具体地,数据发送模块的具体结构,以及数据发送模块按照时间参数进行数据发送的实现方式,请参照实施例7中图11对数据发送模块的详细描述。
本实施例提供的数据处理模块通过每次接收数据之前根据握手信息重新确定时间参数,保证发送端和接收端的时间参数始终保持一致,保证数据传输的稳定性与准确性;信号采用脉冲信号进行传输,便于与噪声信号进行区分;通过检测每个信号触发的上升沿或下降沿,可以容易地获取每个信号的起始时刻,从而准确迅速地获得相邻两个信号起始时刻之间的时间间隔,根据获取到的时间间隔判断信号间的时间间隔是否满足预设关系,判断接收到的信号是否为有效的握手信号,使得判断过程准确迅速,且成功率高,根据第一时间间隔和/或第二时间间隔确定第一时间间隔组和/或第二时间间隔组,并通过第一时间间隔组和/或第二时间间隔组来确定时间参数etu和pdt,从而保证每次数据传输时,发送端与接收端对etu和pdt的取值保持一致,保证了每次数据传输的稳定性与准确性,由于每次数据传输之前接收端都会根据发送端发送的握手信息重新确定时间参数etu和pdt的值,避免了频率差异因多个字符的连续接收而造成误差累计,有效防止当发送时钟和接收时间参数
差异太大时,引起接收端采样错位,造成接收错误,通讯效率降低的技术问题。
实施例6
本实施例提供一种数据处理设备,如图10所示,该数据处理设备包括:第二时间参数模块、第二时间处理模块、第二信号产生发送模块。
其中,所述第二时间参数模块,用于确定时间参数。
作为本实施例中一种可选的实施方式,时间参数可以包括第一时间参数和/或第二时间参数,为了便于说明,本实施例中将第一时间参数记为etu,将第二时间参数记为pdt,第一时间参数etu和第二时间参数pdt均代表一段时间值,例如etu=0.1秒,pdt=0.01秒,该值由数据发送端与接收端协商确定,利用该时间参数可以确定发送握手信号的时间间隔,接收端可以根据接收到的握手信号确定,当然,可以只有一个时间参数,也可以有多个时间参数,本实施例中为例便于描述,仅以2个时间参数为例,利用2个时间参数确定第一时间间隔组和第二时间间隔组,但并不排除多个时间参数的情况。
所述第二时间处理模块,用于根据所述时间参数确定第一时间间隔组与第二时间间隔组,其中,所述第一时间间隔组包括j个第一时间间隔,所述第二时间间隔组包括j个第二时间间隔。
作为本实施例中一种可选的实施方式,第一时间间隔是指在第二信号产生发送模块发送K个握手信号时,第i个信号的开始时刻与第i-1个信号的开始时刻之间的时间间隔,记做Ti-1,i,第二时间间隔是指发送K个握手信号时,第i个信号的开始时刻与第i+1个信号的开始时刻之间的时间间隔,记做Ti,i+1,其中,i=2,4,……,2j,j=(K-1)/2,K≥3且K为奇数。
在本实施例中,需要说明的是,首先,第一时间间隔组中的第一时间间隔Ti-1,i与第二时间间隔组中的第二时间间隔Ti,i+1满足一定的预设关系,通过该预设关系可以保证握手信号的有效性,以使接收端在接收到该握手信号后,可以根据第一时间间隔Ti-1,i和第二时间间隔Ti,i+1的预设关系,判断出该握手信号是用于指示开始接收数据的信号;其次,第一时间间隔组中的各个第一时间间隔Ti-1,i与第一时间参数etu和/或第二时间参数pdt满足一定的预设关系,以使得接收端在接收到该握手信号后,可以根据相同的预设关系通过接收到的多个第一时间间隔计算得到第一时间参数etu和/或第二时间参数pdt,以使得接收端可以根据第一时间参数etu和/或第二时间参数pdt计算得到传输的时间间隔对应的比特数据。
在本实施例中,第一时间间隔组中的第一时间间隔Ti-1,i与第二时间间隔组中的第二时间间隔Ti,i+1满足一定的预设关系可以包括很多种,而第一时间间隔组中的各个第一时间间隔Ti-1,i与第一时间参数etu和/或第二时间参数pdt满足一定的预设关系也包括多种,下面,
以示例性的方式做出详细解释。
作为本实施例的一种可选实施方式,以K=5为例,5个信号中每相邻两个之间共会产生4个时间间隔,当i=2时,第一时间间隔T1,2为第一个信号与第二个信号开始时刻之间的时间间隔,标记为t0,第二时间间隔T2,3为第二个信号与第三个信号开始时刻之间的时间间隔,标记为t1;当i=4时,第一时间间隔T3,4为第三个信号与第四个信号开始时刻之间的时间间隔,标记为t2,第二时间间隔T4,5为第四个信号与第5个信号开始时刻之间的时间间隔,标记为t3。此时,t0、t2为第一时间间隔组,取t1、t3为第二时间间隔组,第一时间间隔与第二时间间隔之间满足预设关系即指,t0与t1之间,以及t2与t3之间同时满足预设关系,该预设关系可以根据技术人员的经验确定,或者根据实际运行时的参数确定。作为一种可选的实施方式,预设关系可以为t1=a*t0且t3=a*t2;或者,t1=(a+b)*t0且t3=(a+b)*t2;或者,t1=(c*a+b)*t0且t3=(c*a+b)*t2,其中,a、b、c为≥1的自然数,例如,a=2,该预设关系可以是多种,此处不再赘述。
下面,以第一时间间隔组的第一时间间隔t0和t2为例,对第一时间间隔组中的各个第一时间间隔Ti-1,it0、t2与第一时间参数etu和/或第二时间参数pdt满足一定的预设关系,进行详细说明:
第一时间间隔t0和t2,根据第一时间参数etu或第二时间参数pdt中的一个通过预设的时间参数生成规则生成,以etu为例,t0和t2可采用以下任意一种计算方式获得,当然,预设的时间参数生成规则并不限于以下计算方式:
t0=a*etu;
t2=x*a*etu;
其中,a为≥1的自然数,x为有理数,因此,接收端可以通过相同的预设的时间参数生成规则利用t0与t2可以计算出etu。
或者,第一时间间隔t0和t2,根据第一时间参数etu和第二时间参数pdt通过预设的时间参数生成规则生成,t0和t2可采用以下任意一种计算方式获得,当然,预设的时间参数生成规则并不限于以下计算方式:
t0=a*etu+b*pdt;
t2=x*a*etu+b*pdt;
其中,a、b为≥1的自然数,x为有理数,因此,接收端可以通过相同的预设的时间参数生成规则利用t0与t2可以计算出etu和pdt。
或者,第一时间间隔t0和t2,根据第一时间参数etu和第二时间参数pdt通过预设的时间参数生成规则生成,t0和t2可采用以下任意一种计算方式获得,当然,预设的时间参数生成规则并不限于以下计算方式:
t0=a*etu+b*pdt;
t2=a*etu+x*b*pdt;
其中,a、b为≥1的自然数,x为有理数,因此,接收端可以通过相同的预设的时间参数生成规则利用t0与t2可以计算出etu和pdt。
同样地,当K=7时,7个信号相邻两个之间共会产生6个时间间隔,当i=2时,第一时间间隔T1,2为第一个信号与第二个信号开始时刻之间的时间间隔,标记为t0,第二时间间隔T2,3为第二个信号与第三个信号开始时刻之间的时间间隔,标记为t1;当i=4时,第一时间间隔T3,4为第三个信号与第四个信号开始时刻之间的时间间隔,标记为t2,第二时间间隔T4,5为第四个信号与第五个信号开始时刻之间的时间间隔,标记为t3;当i=6时,第一时间间隔T5,6为第五个信号与第六个信号开始时刻之间的时间间隔,标记为t4,第二时间间隔T6,7为第六个信号与第七个信号开始时刻之间的时间间隔,标记为t5;此时,t0、t2和t4为第一时间间隔组,t1、t3和t5为第二时间间隔组,第二时间间隔组的t1、t3和t5与第一时间间隔组的t0、t2和t4分别满足预设关系,即t0与t1之间、t2与t3之间,以及t4与t5之间同时满足预设关系,根据第一时间参数etu和/或第二时间参数pdt通过预设的时间参数生成规则来确定第一时间间隔组的第一时间间隔t0、t2和t4的值,通过预设的时间参数生成规则可采用不同的方式,例如,第一时间间隔t0、t2和t4,根据第一时间参数etu或第二时间参数pdt中的一个通过预设的时间参数生成规则生成,以etu为例,t0、t2和t4可采用以下任意一种计算方式获得,当然,预设的时间参数生成规则并不限于以下计算方式:
t0=a*etu;
t2=x*a*etu;
t4=2x*a*etu;
其中,a为≥1的自然数,x为有理数,因此,接收端可以通过相同的预设的时间参数生成规则利用t0、t2、t4可以计算出etu。
或者,第一时间间隔t0、t2和t4,根据第一时间参数etu和第二时间参数pdt通过预设的时间参数生成规则生成,t0、t2、t4可采用以下任意一种计算方式获得,当然,预设的时间参数生成规则并不限于以下计算方式:
t0=a*etu+b*pdt;
t2=x*a*etu+b*pdt;
t4=2x*a*etu+b*pdt;
其中,a、b为≥1的自然数,x为有理数,因此,接收端可以通过相同的预设的时间参数生成规则利用t0、t2、t4可以计算出etu和pdt。
或者,第一时间间隔t0、t2和t4,根据第一时间参数etu和第二时间参数pdt通过预设的时间参数生成规则生成,t0、t2和t4可采用以下任意一种计算方式获得,当然,预设的时间参数生成规则并不限于以下计算方式:
t0=a*etu+b*pdt;
t2=a*etu+x*b*pdt;
t4=a*etu+2x*b*pdt;
其中,a、b为≥1的自然数,x为有理数,因此,接收端可以通过相同的预设的时间参数生成规则利用t0、t2、t4可以计算出etu和pdt。
本实施例中上述确定当前数据传输的第一时间间隔组和第二时间间隔组的具体实施方式仅为示例性实施方式,本申请并不排除其他时间参数生成规则以根据第一时间参数etu和/或第二时间参数pdt确定第一时间间隔组的第一时间间隔的实施方式,也不排除其他第一时间间隔与第二时间间隔的预设关系。
本实施例通过时间参数etu和/或pdt来确定第一时间间隔组,从而保证每次数据传输时,发送端与接收端对etu和pdt的取值保持一致,保证了每次数据传输的稳定性与准确性,由于每次数据传输之前发送端都会发送的握手信息重新确定时间参数etu和pdt的值,避免了频率差异因多个字符的连续接收而造成误差累计,有效防止当发送时钟和接收时间参数差异太大时,引起接收端采样错位,造成接收错误,通讯效率降低的问题。
所述第二信号产生发送模块,用于产生并发送K个握手信号。
作为本实施例一种可选的实施方式,在具体实施时,产生并发送K个握手信号包括:根据第一时间间隔组与第二时间间隔组产生并发送K个握手信号;其中,K个握手信号中的第一时间间隔与第二时间间隔之间满足上述预设关系,可以参照实施例1中对第一时间间隔与第二时间间隔需满足的预设关系的描述。
在本实施例中,K为预先设定值,K≥3且K为奇数,信号可以为脉冲信号,即接收到的是高电平脉冲信号(上升沿信号),或者是低电平脉冲信号(下降沿信号),脉冲信号可以为方波、正弦波、三角波或其他不规则波形,也可以是上述不同波形的组合。
在本实施例中,第二信号产生发送模块产生并发送K个信号,包括以下方式至少之一:
方式一:第二信号产生发送模块产生并发送K次低电平脉冲;
在该方式中,第二信号产生发送模块在连续高电平中触发K次低电平脉冲,例如,第二信号产生发送模块在持续触发高电平第一时间间隔后,触发1次低电平脉冲,然后又恢复触发高电平的状态,在经过第二时间间隔后,又触发1次低电平脉冲,以这样的方式可以连续产生K次低电平脉冲,第一时间间隔可以为第i个信号的开始时刻与第i-1个信号的开始时刻之间的时间间隔,第二时间间隔可以为第i个信号的开始时刻与第i+1个信号的开
始时刻之间的时间间隔,其中,i=2,4,……,2j,j=(K-1)/2,K≥3且K为奇数。
示例性的,当K=5时,5个信号中每相邻两个之间共会产生4个时间间隔,当i=2时,第一时间间隔为第一个信号与第二个信号开始时刻之间的时间间隔,标记为t0,第二时间间隔为第二个信号与第三个信号开始时刻之间的时间间隔,标记为t1;当i=4时,第一时间间隔为第三个信号与第四个信号开始时刻之间的时间间隔,标记为t2,第二时间间隔为第四个信号与第5个信号开始时刻之间的时间间隔,标记为t3,第二信号产生发送模块在连续高电平中触发5次低电平脉冲,包括:第二信号产生发送模块在持续触发高电平一段时间后,触发第1次低电平脉冲,然后又恢复触发高电平的状态,在经过t0后,触发第2次低电平脉冲,然后又恢复触发高电平的状态,在经过t1后,触发第3次低电平脉冲,然后又恢复触发高电平的状态,在经过t2后,触发第4次低电平脉冲,然后又恢复触发高电平的状态,在经过t3后,触发第5次低电平脉冲,以这样的方式可以连续产生5次低电平脉冲,且,第一时间间隔与第二时间间隔满足预设关系,例如,t1=a*t0且t3=a*t2;或者,t1=(a+b)*t0且t3=(a+b)*t2;或者,t1=(c*a+b)*t0且t3=(c*a+b)*t2,其中,a、b、c为≥1的自然数,例如,a=2,该预设关系可以是多种,此处不再赘述,形成有效的握手信号。
方式二:第二信号产生发送模块产生并发送K次高电平脉冲;
在该方式中,第二信号产生发送模块在连续低电平中触发K次高电平脉冲,例如,第二信号产生发送模块在持续触发低电平第一时间间隔后,触发1次高电平脉冲,然后又恢复触发低电平的状态,在经过第二时间间隔后,又触发1次高电平脉冲,以这样的方式可以连续产生K次高电平脉冲,第一时间间隔可以为第i个信号的开始时刻与第i-1个信号的开始时刻之间的时间间隔,第二时间间隔可以为第i个信号的开始时刻与第i+1个信号的开始时刻之间的时间间隔,其中,i=2,4,……,2j,j=(K-1)/2,K≥3且K为奇数。
示例性的,当K=5时,5个信号中每相邻两个之间共会产生4个时间间隔,当i=2时,第一时间间隔为第一个信号与第二个信号开始时刻之间的时间间隔,标记为t0,第二时间间隔为第二个信号与第三个信号开始时刻之间的时间间隔,标记为t1;当i=4时,第一时间间隔为第三个信号与第四个信号开始时刻之间的时间间隔,标记为t2,第二时间间隔为第四个信号与第5个信号开始时刻之间的时间间隔,标记为t3,第二信号产生发送模块在连续低电平中触发5次高电平脉冲,包括:第二信号产生发送模块在持续触发低电平一段时间后,触发第1次高电平脉冲,然后又恢复触发低电平的状态,在经过t0后,触发第2次高电平脉冲,然后又恢复触发低电平的状态,在经过t1后,触发第3次高电平脉冲,然后又恢复触发低电平的状态,在经过t2后,触发第4次高电平脉冲,然后又恢复触发低电平的状态,在经过t3后,触发第5次高电平脉冲,以这样的方式可以连续产生5次高电平
脉冲,且,第一时间间隔与第二时间间隔满足预设关系,例如,t1=a*t0且t3=a*t2;或者,t1=(a+b)*t0且t3=(a+b)*t2;或者,t1=(c*a+b)*t0且t3=(c*a+b)*t2,其中,a、b、c为≥1的自然数,例如,a=2,该预设关系可以是多种,此处不再赘述,形成有效的握手信号。
在上述方式中,K个信号属于跳变信号,且跳变幅度明显,便于与噪声信号进行区分。
此外,作为本实施例的一种可选实施方式,本实施例中的数据处理设备还包括:数据发送模块,其中,数据发送模块,用于在第二信号产生发送模块产生并发送K个握手信号之后,按照时间参数进行数据发送;具体地,数据发送模块的具体结构,以及数据发送模块按照时间参数进行数据发送的实现方式,请参照实施例7中对数据发送模块的详细描述。
通过每次接收数据之前根据握手信息重新确定时间参数,保证发送端和接收端的时间参数始终保持一致,保证数据传输的稳定性与准确性;信号采用脉冲信号进行传输,便于与噪声信号进行区分;通过检测每个信号触发的上升沿或下降沿,可以容易地获取每个信号的起始时刻,从而准确迅速地获得相邻两个信号起始时刻之间的时间间隔,根据获取到的时间间隔判断信号间的时间间隔是否满足预设关系,判断接收到的信号是否为有效的握手信号,使得判断过程准确迅速,且成功率高,根据第一时间间隔和/或第二时间间隔确定第一时间间隔组和/或第二时间间隔组,并通过第一时间间隔组和/或第二时间间隔组来确定时间参数etu和pdt,从而保证每次数据传输时,发送端与接收端对etu和pdt的取值保持一致,保证了每次数据传输的稳定性与准确性,由于每次数据传输之前接收端都会根据发送端发送的握手信息重新确定时间参数etu和pdt的值,避免了频率差异因多个字符的连续接收而造成误差累计,有效防止当发送时钟和接收时间参数差异太大时,引起接收端采样错位,造成接收错误,通讯效率降低的技术问题。
实施例7
本实施例提供了实施例5以及实施例6中涉及的数据发送模块,图11是本实施例的一种可选的数据发送模块的结构示意图,具体包括:时间间隔获取单元、数据比特串获取单元、发送单元,其中:
时间间隔获取单元,按照所述时间参数获取N比特数据包含的2N个不同数值与时间间隔的对应关系,其中,不同数值对应的时间间隔不同,N≥1。
在本实施例的一个可选实施方式中,N比特数据包含的2N个不同数值,可以理解为:例如,N=1时,1比特数据,其包含21个不同数值,分别为0,1;N=2时,2比特数据,其包含22个不同数值,分别为00,01,10,11。按照时间参数获取N比特数据包含的2N个不同数值与时间间隔的对应关系可以理解为:例如,当N=1时,按照时间参数获取0对应的时
间间隔,按照时间参数获取1对应的时间间隔;当N=2时,按照时间参数获取00对应的时间间隔,按照时间参数获取01对应的时间间隔,按照时间参数获取10对应的时间间隔,按照时间参数获取11对应的时间间隔。当然,当N为其他值时,与上述理解方式相同,在此不再赘述。
在本实施例的一个可选实施方式中,数据发送模块的时间间隔获取单元可采用与数据接收端预先协商确定的计算方法计算该数值对应的时间间隔,如当N=n时,发送数值m对应的时间间隔的计算方法可以为:数值m对应的时间间隔=etu+m*pdt(其中,0≤m≤2n-1,etu为第一时间参数,pdt为第二时间参数,举例来说etu=10μs,pdt=30μs),即数值11对应的时间间隔计算方法可以为10μs+3*30μs=100μs,通过该可选实施方式可以计算出数值对应的时间间隔。当然,本申请也可以采用其他预先协商的计算方法确定时间间隔,本申请对此不做限制。通过预先协商的计算方法计算得出该数值对应的时间间隔,可保证数据传输的可扩展性,即不论N的取值是多少,发送端和接收端均可计算得出不同数值与时间间隔的对应关系。
在本实施例的一个可选实施方式中,时间间隔获取单元根据第一时间参数etu与第二时间参数pdt,按照与数据发送端预先约定的编解码规则,获取N比特数据包含的2N个不同数值与时间间隔的对应关系,预先约定的编解码规则可以为能够保证不同数值的N个数据比特对应唯一时间间隔的任意方式,示例性地:
当N=1时,不同数值的N个数据比特包括:0、1,此时,
0=etu,1=etu+pdt,且etu≠etu+pdt,或,
0=2etu,1=etu+2pdt,且2etu≠etu+2pdt,
……
当N=2时,不同数值的N个数据比特包括:00、01、10、11,此时,
00=etu,01=etu+pdt,10=etu+2pdt,11=etu+3pdt,且etu≠etu+pdt≠etu+2pdt≠etu+3pdt,或,
00=2etu,01=etu+2pdt,10=etu+2.5pdt,11=1.3etu+3pdt,
且2etu≠etu+2pdt≠etu+2.5pdt≠1.3etu+3pdt,
……
同样地,当N=3时,不同数值的N个数据比特包括:000、001、010、011、100、101、110、111,此时,根据第一时间参数etu与第二时间参数pdt,时间间隔获取单元按照与数据发送端预先约定的编解码规则,得到N比特数据包含的2N个不同数值对应的时间间隔,预先约定的编解码规则可参照上述示例,在此不再赘述。
作为本申请实施例的另一个可选实施方式,数据发送模块的时间间隔获取单元也可采
用与数据接收端预先协商并存储的列表来确定该数值对应的时间间隔,采用查找列表的方式确定该数值对应的时间间隔,可提高得到该数值对应的时间间隔的效率。
作为本申请实施例的另一个可选实施方式,数据发送模块的时间间隔获取单元采用与数据接收端预先协商确定的计算方法计算该数值对应的时间间隔之后,数据发送模块的时间间隔获取单元查找预先存储的列表来判断该计算得到的数值对应的时间间隔是否属于数据接收端的接收范围。采用计算得到数值对应的时间间隔之后进一步查找列表的方式得到数值对应的时间间隔,可在保证数据接收端可正常接收的前提下提高数据传输的扩展性。
数据比特串获取单元,用于获取当前待发送的数据比特串,将所述数据比特串进行分组,每组数据为N比特。
在本申请的一个可选实施方式中,数据比特串获取单元可以自行生成当前待发送的数据比特串,也可以从其他装置或数据处理设备的其他单元接收当前待发送的数据比特串,本申请并不局限于当前待发送的数据比特串的获取方式,只要最终可以获取当前待发送的数据比特串的方式均应属于本申请的保护范围。
作为本申请的一个可选实施方式,数据处理设备可以作为一个转接装置,其可以将其他装置(以下称为第一终端)与数据接收装置的通信进行转接,此时,数据处理设备通过如下方式获取当前待发送的数据比特串:通过第一接口接收第一数据;根据第一接口支持的协议对第一数据进行解码,获得待发送的第一数据比特串。数据处理设备作为转接装置时,可以具有两个通信接口,例如第一接口和第二接口,第一接口为与第一终端进行通信的接口,第二接口为与数据的接收端进行通信的接口,第一接口可以是现有的通用接口,包括无线和有线接口,例如USB接口、音频接口、串口、蓝牙、wifi、NFC等接口,通过该第一接口可以连接到第一终端,以接收从第一终端发送来的第一数据。第一终端可以是手机、电脑、PAD等设备,该第一数据可以是手机、电脑、PAD端需要传输的数据。同时,第一接口根据其接口类型的不同,可以利用自身支持的协议对接收到的第一数据进行解码,例如,第一接口可以根据USB协议、音频协议、串口协议、蓝牙协议、wifi协议、NFC协议等对第一数据进行解码,获得第一数据对应的数据比特串,该数据比特串为待发送的第一数据比特串(即当前待发送的数据比特串)。第二接口可以是连接到电子支付设备(即数据接收装置)的接口,通过该第二接口将数据比特发送至电子支付设备。该第二接口可以是一个两线接口;该电子支付设备可以实现USBkey功能、OTP功能以及智能卡功能等。将本申请的数据发送转至作为转接装置,通过该第一接口进行数据转换,可以实现将终端发送过来的数据转换成适合与数据接收装置进行通信的数据,实现不同接口之间的转换,扩大了本申请的数据发送模块的使用范围。
在本实施例中,可选地,数据比特串获取单元可以任意时刻执行获取数据比特串和分
组的操作,只要在发送单元进行数据发送前进行即可。另外,数据的发送端可以在每次发送数据之前均由时间间隔获取单元进行获取的N比特数据包含的2N个不同数值与时间间隔的对应关系操作,或者,数据的发送端也可以先由时间间隔获取单元进行操作,后续每次发送数据,都使用由时间间隔获取单元进行操作获取的N比特数据包含的2N个不同数值与时间间隔的对应关系,以对待发送的数据进行编码,或者,也可以设置一个有效期限,在该有效期限内发送数据,均使用时间间隔获取单元进行操作获取的N比特数据包含的2N个不同数值与时间间隔的对应关系,以对待发送的数据进行编码。或者,也可以按照事件触发的方式,每接收到一次事件触发,例如,用户输入当前数据传输的时间参数,计算一次N比特数据包含的2N个不同数值与时间间隔的对应关系。具体本实施例不作限定。
作为本申请的一个可选实施方式,数据比特串获取单元将数据比特串进行分组,每组数据为N比特可以采用多种方式进行分组,可以采用每组包括1比特的方式进行分组,也可以采用每组包括2比特的方式进行分组,当数据比特串包括单数时,由于无法按照2比特进行完全分组,可以对数据比特串进行补0后再进行分组,此时,数据的发送端和数据的接收端预先设定或者协商好补0的方式,当从数据的高位开始发送数据比特串时,在比特串的末位补0,当从数据的低位开始发送数据比特串时,在比特串的高位补0。当然,每组包括3比特及以上的情况可以参照每组包括2比特的方式进行分组,在此不再赘述。
发送单元,用于根据获取的所述对应关系,以每组数据的数值对应的时间间隔表示该组数据的方式发送该组数据。
在本实施例中,每组数据比特的数值可以对应一个时间间隔,也可以对应多个相同的时间间隔。采用每组数据比特的数值对应多个时间间隔,可准确判断该时间间隔对应的数值,防止数据传输过程中的丢失时间间隔导致的错误。
在本实施例的一个可选实施方式中,对于每组数据比特在发送该组数据比特时,发送单元用于可以产生并发送M个信号,其中,每个信号的开始时刻与相邻的上一个信号的开始时刻的时间间隔为该组数据比特对应的时间间隔,M≥1且M为自然数。采用信号的方式产生的时间间隔,有着易于检测和稳定性高。
可选地,发送单元用于按照时间间隔产生M次低电平脉冲的方式产生M个信号,也可以是按照时间间隔产生M次高电平脉冲的方式产生M个信号。该低电平脉冲/高电平脉冲可以采用方波、正弦波、三角波等可区分高低电平脉冲的波形表示,在此不作限制。优选采用按照时间间隔产生低电平脉冲,在数据发送端与数据接收端通信时,数据发送端可使用高电平为数据接收端进行供电,通过低电平脉冲的方式传输信息。采用该方法的设备,在进行信息交互时,可使用同一根线同时完成供电和信息发送,减小了设备体积和制造成本。
可选地,还可以通过上述K个握手信号之间的时间间隔传输时间参数,使得数据接收端可以根据该K个握手信号获取到该数据处理设备使用的时间参数,进一步确认数据接收端使用的时间参数。具体地,数据发送模块还可以包括握手信号时间间隔确定单元,该单元用于根据时间参数确定第一时间间隔组和/或第二时间间隔组,第一时间间隔组包括j个第一时间间隔,第二时间间隔组包括j个第二时间间隔,其中,j=(K-1)/2,K≥3且K为奇数。
在本实施例的一个可选实施方式中,如图12所示,在本实施例的数据发送模块中,为了满足当前数据传输的速率,还可以包括时间参数更新单元,用于按照预设规则,将当前使用的时间参数替换为新的时间参数,将新的时间参数作为当前数据传输的时间参数;触发时间间隔获取单元按照新的时间参数更新对应关系;时间间隔获取单元,还用于按照所述当前数据传输的时间参数更新所述对应关系;发送单元,还用于利用更新后的对应关系进行数据传输。在本实施方案中,新的时间参数的确定可以通过数据发送端和数据接收端的协商完成,也可以通过数据发送端和数据接收端查找预先存储的时间参数表完成,如在发送某种类型数据时查表确定该类型的数据应该使用的时间参数。数据发送模块的时间参数是可以变化的,可以匹配不同数据处理能力的数据接收装置,或匹配不同类型的数据,可进一步提高数据处理的效率。
在本实施例的一个可选实施方式中,如图12所示,数据发送模块还可以包括校验数据发送单元,在发送单完成发送最后一组数据之后,校验数据发送单元发送校验数据,通过该校验数据,数据接收端可判断接收数据是否完整正确。校验数据包括但不限于通过MAC校验、奇偶校验、取和校验等校验方式计算出的校验数据。
在本实施例的一个可选实施方式中,如图12所示,数据发送模块还可以包括结束信号发送单元,该单元用于在发送单元完成发送最后一组数据之后,或校验数据比特发送单元发送完成校验数据之后,发送A(A≥1且为整数)个结束信号,结束信号可以与握手信号相同,也可以不同,通过该结束信号,数据接收装置可判断数据是否接收结束。
由上述本申请实施例提供的技术方案可以看出,数据处理设备可以根据发送波形的时间间隔表示发送波形的数据比特,可以仅使用两线完成数据的发送,适用在电子设备中时,可以有效减小电子设备的体积。
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本申请的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本申请的
实施例所属技术领域的技术人员所理解。
应当理解,本申请的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。
本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。
此外,在本申请各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。
上述提到的存储介质可以是只读存储器,磁盘或光盘等。
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本申请的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。
尽管上面已经示出和描述了本申请的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本申请的限制,本领域的普通技术人员在不脱离本申请的原理和宗旨的情况下在本申请的范围内可以对上述实施例进行变化、修改、替换和变型。本申请的范围由所附权利要求及其等同限定。
Claims (30)
- 一种数据传输方法,其特征在于,包括:接收K个信号,检测所述K个信号中每相邻两个之间的时间间隔,判断第一时间间隔与第二时间间隔之间是否满足预设关系,所述第一时间间隔为第i个所述信号的开始时刻与第i-1个所述信号的开始时刻之间的时间间隔,所述第二时间间隔为第i个所述信号的开始时刻与第i+1个所述信号的开始时刻之间的时间间隔,i=2,4,……,2j,j=(K-1)/2,K≥3且K为奇数;确定第一时间间隔组和/或第二时间间隔组,所述第一时间间隔组包括j个所述第一时间间隔,所述第二时间间隔组包括j个所述第二时间间隔;若所述第一时间间隔与所述第二时间间隔满足预设关系,则根据所述第一时间间隔组中的至少一个第一时间间隔和/或所述第二时间间隔组中的至少一个第二时间间隔确定当前数据传输的时间参数;按照所述时间参数接收数据。
- 根据权利要求1所述的方法,其特征在于,所述接收K个信号包括:检测到K次低电平脉冲。
- 根据权利要求1所述的方法,其特征在于,所述按照所述时间参数接收数据包括:按照所述时间参数获取N比特数据包含的2N个不同数值与时间间隔的对应关系,其中,不同数值对应的时间间隔不同,其中,N≥1;接收X个信号,确定所述X个信号中每相邻两个信号的起始时刻之间的时间间隔,得到X-1个时间间隔,其中,X为正整数,且X>1;根据确定的所述时间参数,获取所述X-1个时间间隔中每连续S个时间间隔中单个时间间隔对应的数值,得到所述S个时间间隔传输的数值,所述S个时间间隔传输的数值为所述单个时间间隔对应的数值,所述数值为N比特数据包含的2N个不同数值中的一个,其中,在S>1的情况下,所述S个时间间隔相同,其中,X和S均为正整数,且S≤X-1,N≥1。
- 根据权利要求3所述的方法,其特征在于,X-1=n*S,n≥1且n为整数。
- 根据权利要求3或4所述的方法,其特征在于,所述接收X个信号包括:检测到X次低电平脉冲。
- 根据权利要求1至5中任一项所述的方法,其特征在于,所述接收X个信号包括:接收Y+1个信号,去除所述Y+1个信号中的干扰,得到所述X个信号,其中Y+1≥X。
- 根据权利要求1所述的方法,其特征在于,在所述按照所述时间参数接收数据之后, 还包括:按照所述时间参数进行数据发送。
- 根据权利要求7所述的方法,其特征在于,所述按照所述时间参数进行数据发送,包括:按照所述时间参数获取N比特数据包含的2N个不同数值与时间间隔的对应关系,其中,不同数值对应的时间间隔不同,其中,N≥1;获取当前待发送的数据比特串;将所述数据比特串进行分组,每组数据为N比特;根据获取的所述对应关系,以每组数据的数值对应的时间间隔表示该组数据的方式发送该组数据。
- 根据权利要求1至8中任一项所述的方法,其特征在于:若所述第一时间间隔与所述第二时间间隔不满足所述预设关系,则继续执行接收所述K个信号的步骤。
- 一种数据传输方法,其特征在于,包括:确定时间参数;根据所述时间参数确定第一时间间隔组与第二时间间隔组,其中,所述第一时间间隔组包括j个第一时间间隔,所述第二时间间隔组包括j个第二时间间隔;产生并发送K个握手信号,其中,所述第一时间间隔与所述第二时间间隔之间满足预设关系;所述第一时间间隔为第i个所述握手信号的开始时刻与第i-1个所述握手信号的开始时刻之间的时间间隔,所述第二时间间隔为第i个所述握手信号的开始时刻与第i+1个所述握手信号的开始时刻之间的时间间隔,i=2,4,……,2j,j=(K-1)/2,K≥3且K为奇数。
- 根据权利要求10所述的方法,其特征在于,所述产生K个握手信号包括:按照所述第一时间间隔和所述第二时间间隔产生K次低电平脉冲。
- 根据权利要求10或11所述的方法,其特征在于,在所述产生并发送K个握手信号之后,所述方法还包括:按照所述时间参数获取N比特数据包含的2N个不同数值与时间间隔的对应关系,其中,不同数值对应的时间间隔不同,其中,N≥1;获取当前待发送的数据比特串;将所述数据比特串进行分组,每组数据为N比特;根据获取的所述对应关系,以每组数据的数值对应的时间间隔表示该组数据的方式发送该组数据。
- 根据权利要求12所述的方法,其特征在于,对于每组数据,发送该组数据,包括:产生并发送M个信号,其中,每个所述信号的开始时刻与相邻的上一个信号的开始时刻的时间间隔为该组数据的数值对应的时间间隔,M≥1且M为自然数。
- 根据权利要求13所述的方法,其特征在于,所述产生M个信号包括:按照所述时间间隔产生M次低电平脉冲。
- 根据权利要求12至14中任一项所述的方法,其特征在于,还包括:按照预设规则,将当前使用的时间参数替换为新的时间参数,将所述新的时间参数作为所述当前数据传输的时间参数;按照所述当前数据传输的时间参数更新所述对应关系;利用更新后的对应关系进行数据传输。
- 一种数据处理设备,其特征在于,包括:接收模块、判断模块、时间处理模块和数据处理模块,其中,所述接收模块,用于接收K个信号;所述判断模块,用于检测所述K个信号中每相邻两个之间的时间间隔,判断第一时间间隔与第二时间间隔之间是否满足预设关系,所述第一时间间隔为第i个所述信号的开始时刻与第i-1个所述信号的开始时刻之间的时间间隔,所述第二时间间隔为第i个所述信号的开始时刻与第i+1个所述信号的开始时刻之间的时间间隔,i=2,4,……,2j,j=(K-1)/2,K≥3且K为奇数;所述时间处理模块,用于确定第一时间间隔组和/或第二时间间隔组,所述第一时间间隔组包括j个所述第一时间间隔,所述第二时间间隔组包括j个所述第二时间间隔;若所述第一时间间隔与所述第二时间间隔满足预设关系,则根据所述第一时间间隔组中的至少一个第一时间间隔和/或所述第二时间间隔组中的至少一个第二时间间隔确定当前数据传输的时间参数;所述数据处理模块,用于按照所述时间参数接收数据。
- 根据权利要求16所述的设备,其特征在于,所述接收模块用于接收K个信号具体包括:所述接收模块用于检测K次低电平脉冲。
- 根据权利要求16所述的设备,其特征在于,所述接收模块,还用于接收X个信号;所述数据处理模块用于按照所述时间参数接收数据具体包括:按照所述时间参数获取N比特数据包含的2N个不同数值与时间间隔的对应关系,其中,不同数值对应的时间间隔不同,其中,N≥1;确定所述X个信号中每相邻两个信号的起始时刻之间的时间间隔,得到X-1个时间间隔,其中,X为正整数,且X>1;根据确定的所述时间参数,获取所述X-1个时间间隔中每连续S个时间间隔中单个时间间隔对应的数值,得到所述S个时间间 隔传输的数值,所述S个时间间隔传输的数值为所述单个时间间隔对应的数值,所述数值为N比特数据包含的2N个不同数值中的一个,其中,在S>1的情况下,所述S个时间间隔相同,其中,X和S均为正整数,且S≤X-1,N≥1。
- 根据权利要求18所述的设备,其特征在于,X-1=n*S,n≥1且n为整数。
- 根据权利要求18或19所述的设备,其特征在于,所述接收模块还用于接收X个信号具体包括:所述接收模块还用于检测X次低电平脉冲。
- 根据权利要求18至20任一项所述的设备,其特征在于,所述数据处理模块,还用于:接收Y+1个信号,去除所述Y+1个信号中的干扰,得到所述X个信号,其中Y+1≥X。
- 根据权利要求16至21任一项所述的设备,其特征在于,还包括:数据发送模块,其中,所述数据发送模块,用于在所述数据处理模块按照所述时间参数接收数据之后,按照所述时间参数进行数据发送。
- 根据权利要求22所述的设备,其特征在于,所述数据发送模块用于按照所述时间参数进行数据发送具体包括:按照所述时间参数获取N比特数据包含的2N个不同数值与时间间隔的对应关系,其中,不同数值对应的时间间隔不同,其中,N≥1;获取当前待发送的数据比特串;将所述数据比特串进行分组,每组数据为N比特;根据获取的所述对应关系,以每组数据的数值对应的时间间隔表示该组数据的方式发送该组数据。
- 根据权利要求16至23任一项所述的设备,其特征在于,所述时间处理模块,还用于若所述第一时间间隔与所述第二时间间隔不满足所述预设关系,则指示所述判断模块继续执行接收所述K个信号的操作。
- 一种数据处理设备,其特征在于,包括:第二时间参数模块、第二时间处理模块、第二信号产生发送模块;其中,所述第二时间参数模块,用于确定时间参数;所述第二时间处理模块,用于根据所述时间参数确定第一时间间隔组与第二时间间隔组,其中,所述第一时间间隔组包括j个第一时间间隔,所述第二时间间隔组包括j个第二时间间隔;所述第二信号产生发送模块,用于产生并发送K个握手信号,其中,所述第一时间间隔与所述第二时间间隔之间满足预设关系;所述第一时间间隔为第i个所述握手信号的开始时刻与第i-1个所述握手信号的开始时刻之间的时间间隔,所述第二时间间隔为第i个所述握手信号的开始时刻与第i+1个所述握手信号的开始时刻之间的时间间隔,i=2,4,……,2j,j=(K-1)/2,K≥3且K为奇数。
- 根据权利要求25所述的设备,其特征在于,所述第二信号产生发送模块用于所述K个握手信号具体包括:所述第二信号产生发送模块按照所述第一时间间隔和所述第二时间间隔产生K次低电平脉冲。
- 根据权利要求25或26所述的设备,其特征在于,所述第二信号产生发送模块还用于,在产生并发送K个握手信号之后,按照所述时间参数获取N比特数据包含的2N个不同数值与时间间隔的对应关系,其中,不同数值对应的时间间隔不同,其中,N≥1;获取当前待发送的数据比特串;将所述数据比特串进行分组,每组数据为N比特;根据获取的所述对应关系,以每组数据的数值对应的时间间隔表示该组数据的方式发送该组数据。
- 根据权利要求27所述的设备,其特征在于,对于每组数据,所述第二信号产生模块还用于发送该组数据具体包括:所述第二信号产生发送模块,还用于产生并发送M个信号,其中,每个所述信号的开始时刻与相邻的上一个信号的开始时刻的时间间隔为该组数据的数值对应的时间间隔,M≥1且M为自然数。
- 根据权利要求28所述的设备,其特征在于,所述第二信号产生发送模块还用于产生M个信号具体包括:所述第二信号产生发送模块,还用于按照所述时间间隔产生M次低电平脉冲。
- 根据权利要求27至29中任一项所述的设备,其特征在于,所述第二时间参数模块,还用于按照预设规则,将当前使用的时间参数替换为新的时间参数,将所述新的时间参数作为所述当前数据传输的时间参数;所述第二信号产生发送模块,还用于按照所述当前数据传输的时间参数更新所述对应关系;利用更新后的对应关系进行数据传输。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510604981.5A CN106549748B (zh) | 2015-09-21 | 2015-09-21 | 一种数据传输方法及数据处理设备 |
CN201510604981.5 | 2015-09-21 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2017050234A1 true WO2017050234A1 (zh) | 2017-03-30 |
Family
ID=58365302
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2016/099622 WO2017050234A1 (zh) | 2015-09-21 | 2016-09-21 | 数据传输方法及数据处理设备 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106549748B (zh) |
WO (1) | WO2017050234A1 (zh) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109960672A (zh) * | 2017-12-22 | 2019-07-02 | 苏州迈瑞微电子有限公司 | 一种基于gpio接口的数字通讯方法 |
CN111124969A (zh) * | 2019-12-26 | 2020-05-08 | 山西银河电子设备厂 | 一种基于fpga的改进型串口转换模块 |
CN111262718A (zh) * | 2018-12-03 | 2020-06-09 | 厦门雅迅网络股份有限公司 | 避免因数据丢失而影响统计准确性的数据传输方法和系统 |
CN113625992A (zh) * | 2021-06-28 | 2021-11-09 | 山东云海国创云计算装备产业创新中心有限公司 | 基于除法器的任务处理方法、装置、除法器及存储介质 |
CN113746912B (zh) * | 2021-08-30 | 2023-12-01 | 浙江中控技术股份有限公司 | Dcs监控系统以及获取dcs控制数据的方法 |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110597752B (zh) * | 2019-09-02 | 2021-02-19 | 广州粒子微电子有限公司 | 一种uart指令数据接收系统及其接收方法 |
CN111404638B (zh) * | 2019-12-16 | 2022-10-04 | 王振江 | 一种数字信号传输方法 |
CN113390499B (zh) * | 2021-05-21 | 2023-09-08 | 山东金钟科技集团股份有限公司 | 数字称重传感器防作弊方法、传感器、设备及存储介质 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO1998038737A1 (en) * | 1997-02-27 | 1998-09-03 | Northrop Grumman Corporation | Pulse position modulation communications protocol |
EP1294116A2 (en) * | 2001-09-18 | 2003-03-19 | Nortel Networks Limited | Technique for synchronizing clocks in a network |
CN1482761A (zh) * | 2002-09-13 | 2004-03-17 | 华为技术有限公司 | 一种通信系统的时间同步方法 |
CN102183695A (zh) * | 2010-01-18 | 2011-09-14 | 英飞凌科技股份有限公司 | 用于测量数据脉冲的方法和接收器 |
CN104219757A (zh) * | 2014-05-13 | 2014-12-17 | 中兴通讯股份有限公司 | 同步信号发送时间确定方法、终端、基站及通信系统 |
-
2015
- 2015-09-21 CN CN201510604981.5A patent/CN106549748B/zh active Active
-
2016
- 2016-09-21 WO PCT/CN2016/099622 patent/WO2017050234A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO1998038737A1 (en) * | 1997-02-27 | 1998-09-03 | Northrop Grumman Corporation | Pulse position modulation communications protocol |
EP1294116A2 (en) * | 2001-09-18 | 2003-03-19 | Nortel Networks Limited | Technique for synchronizing clocks in a network |
CN1482761A (zh) * | 2002-09-13 | 2004-03-17 | 华为技术有限公司 | 一种通信系统的时间同步方法 |
CN102183695A (zh) * | 2010-01-18 | 2011-09-14 | 英飞凌科技股份有限公司 | 用于测量数据脉冲的方法和接收器 |
CN104219757A (zh) * | 2014-05-13 | 2014-12-17 | 中兴通讯股份有限公司 | 同步信号发送时间确定方法、终端、基站及通信系统 |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109960672A (zh) * | 2017-12-22 | 2019-07-02 | 苏州迈瑞微电子有限公司 | 一种基于gpio接口的数字通讯方法 |
CN109960672B (zh) * | 2017-12-22 | 2022-12-30 | 苏州迈瑞微电子有限公司 | 一种基于gpio接口的数字通讯方法 |
CN111262718A (zh) * | 2018-12-03 | 2020-06-09 | 厦门雅迅网络股份有限公司 | 避免因数据丢失而影响统计准确性的数据传输方法和系统 |
CN111124969A (zh) * | 2019-12-26 | 2020-05-08 | 山西银河电子设备厂 | 一种基于fpga的改进型串口转换模块 |
CN113625992A (zh) * | 2021-06-28 | 2021-11-09 | 山东云海国创云计算装备产业创新中心有限公司 | 基于除法器的任务处理方法、装置、除法器及存储介质 |
CN113625992B (zh) * | 2021-06-28 | 2023-07-14 | 山东云海国创云计算装备产业创新中心有限公司 | 基于除法器的任务处理方法、装置、除法器及存储介质 |
CN113746912B (zh) * | 2021-08-30 | 2023-12-01 | 浙江中控技术股份有限公司 | Dcs监控系统以及获取dcs控制数据的方法 |
Also Published As
Publication number | Publication date |
---|---|
CN106549748A (zh) | 2017-03-29 |
CN106549748B (zh) | 2019-08-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2017050234A1 (zh) | 数据传输方法及数据处理设备 | |
TWI628928B (zh) | 數位無線電通訊 | |
WO2013044686A1 (zh) | 一种数据发送、接收方法及装置 | |
TW201448646A (zh) | 數位無線電通訊 | |
WO2017050235A1 (zh) | 数据发送方法和装置及数据接收方法和装置 | |
WO2018095181A1 (zh) | 数据传输方法及装置 | |
WO2018157771A1 (en) | Zigbee gateway device, zignee child node and zigbee networking methods | |
CN104065452A (zh) | 一种无线通信方法、相关设备及系统 | |
WO2019214658A1 (zh) | 数据传输的发送、接收方法及装置 | |
WO2015120758A1 (zh) | 一种数据通信方法、终端及信息安全设备 | |
CN106549921B (zh) | 数据传输方法和装置 | |
WO2015196998A1 (zh) | 一种信号发送和检测的方法及装置 | |
CN106027196B (zh) | 一种数据传输方法及系统 | |
TWI778962B (zh) | 設備對設備(d2d)通信的方法和d2d設備 | |
US8416717B2 (en) | Signals communication apparatus | |
WO2021088071A1 (zh) | 资源占用位置确定方法、装置、终端设备及存储介质 | |
CN108632245B (zh) | 低功率高清晰度无线媒体传送 | |
CN109347605B (zh) | 一种编码方法、解码方法及装置、计算机可读存储介质 | |
WO2018072159A1 (zh) | 传输数据的方法、网络设备和终端设备 | |
CN106549728A (zh) | 一种数据接收方法及装置 | |
CN106549890B (zh) | 一种数据接收方法及装置 | |
WO2024060954A1 (zh) | 一种信息传递方法及装置 | |
WO2015109967A1 (zh) | 一种移动终端与信息安全设备通信的方法 | |
WO2017050233A1 (zh) | 信号接收方法及装置 | |
WO2018095180A1 (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: 16848115 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: 16848115 Country of ref document: EP Kind code of ref document: A1 |