CN107423248B - Data frame header sending method and sending device - Google Patents

Data frame header sending method and sending device Download PDF

Info

Publication number
CN107423248B
CN107423248B CN201611051710.2A CN201611051710A CN107423248B CN 107423248 B CN107423248 B CN 107423248B CN 201611051710 A CN201611051710 A CN 201611051710A CN 107423248 B CN107423248 B CN 107423248B
Authority
CN
China
Prior art keywords
waveform
waveform sequence
sequence
sequences
level
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611051710.2A
Other languages
Chinese (zh)
Other versions
CN107423248A (en
Inventor
李东声
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tendyron Corp
Original Assignee
Tendyron Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tendyron Corp filed Critical Tendyron Corp
Priority to CN201611051710.2A priority Critical patent/CN107423248B/en
Publication of CN107423248A publication Critical patent/CN107423248A/en
Application granted granted Critical
Publication of CN107423248B publication Critical patent/CN107423248B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a data frame header sending method and a sending device, wherein the transmission parameter acquiring method comprises the following steps: acquiring N waveform sequences corresponding to a preset data frame header, wherein each waveform sequence is one of the following sequences: a first waveform sequence, a second waveform sequence, and a third waveform sequence, each waveform sequence having the following waveform sequence characteristics: the transmission duration of each waveform sequence is the same and is inversely proportional to the baud rate, the high level of the first waveform sequence jumps to the low level after starting to last for a preset time to end at the high level, the total duration occupied by the low level does not change with the baud rate, the high level of the second waveform sequence continues, the high level of the low level of the third waveform sequence starts to end at the high level, and the total duration occupied by the low level does not change with the baud rate; obtaining X level jumps in the N waveform sequences according to the characteristics of each waveform sequence, wherein the X level jumps are all changed from high level jumps to low level jumps; and controlling the level X level jumps of the sending port to carry out level change so as to send the data frame header.

Description

Data frame header sending method and sending device
Technical Field
The present invention relates to the field of electronic technologies, and in particular, to a method and a device for sending a data frame header.
Background
The serial communication mode between electronic devices is usually that one character is transmitted one by one, each character is transmitted one by one, and when one character is transmitted, the transmission always starts with a "start bit" and ends with a "stop bit", and there is no fixed time interval requirement between characters. When two electronic devices communicate, a sending clock of a sending end and a receiving clock of a receiving end may be different, and when the frequency difference between the sending clock and the receiving clock is too large, sampling dislocation of the receiving end is caused, so that receiving errors are caused, and communication efficiency is reduced.
In addition, when communication between electronic devices is performed using only two wires, power supply/charging cannot be performed during communication, and another power supply needs to be externally connected, which causes great inconvenience to the use of the electronic devices.
Disclosure of Invention
The present invention is directed to solving the above problems.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
the invention mainly aims to provide a transmission parameter acquisition method, which comprises the following steps: acquiring waveform sequence characteristics of N waveform sequences formed by X preset level jumps, wherein N is a positive integer, X is a positive integer and is greater than 1, and each waveform sequence in the N waveform sequences formed by the X preset level jumps is one of the following: a first waveform sequence, a second waveform sequence, and a third waveform sequence, wherein the first waveform sequence, the second waveform sequence, and the third waveform sequence have the following waveform sequence characteristics: the transmission durations of the first waveform sequence, the second waveform sequence and the third waveform sequence are the same, the transmission duration is in inverse proportion to the baud rate of transmitting the waveform sequences, the first waveform sequence starts from a high level and jumps to a low level after lasting for a preset time and ends from the high level, wherein the total duration of the low level appearing in the first waveform sequence in the transmission duration does not change along with the change of the baud rate of transmitting the waveform sequences, the second waveform sequence continues from the high level in the transmission duration, the third waveform sequence starts from the low level and ends from the high level, and the total duration of the low level appearing in the third waveform sequence in the transmission duration does not change along with the change of the baud rate of transmitting the waveform sequences, the preset X level jumps are all changed from high level jumps to low level jumps; continuously detecting X level jumps at a receiving port, wherein all the continuously detected X level jumps are changed from a high level to a low level; and calculating the transmission duration of a waveform sequence according to the waveform sequence characteristics of N waveform sequences formed by the preset X level jumps and the time interval between any two continuously detected level jumps in the X level jumps.
In addition, before calculating the transmission duration of one waveform sequence according to the waveform sequence characteristics of the N waveform sequences formed by the preset X level jumps and the time interval between any two of the X level jumps detected continuously, the method further includes: and judging whether each time interval of all the continuously detected X level jumps conforms to the same preset relationship with the corresponding time interval of all the X level jumps included in the N waveform sequences formed by the preset X level jumps or not, and if so, executing the step of calculating the transmission duration of one waveform sequence according to the waveform sequence characteristics of the N waveform sequences formed by the preset X level jumps and the time interval between any two continuously detected X level jumps.
Further, the waveform sequence is characterized by: the total duration of the low levels appearing in the first waveform sequence within the transmission duration is less than one-half of the duration; and/or the total duration of the low levels appearing in the third waveform sequence in the transmission duration is less than one half of the duration.
Further, the waveform sequence is characterized by: the third waveform sequence has only one level jump from low level to high level within the transmission duration and ends with high level; the first waveform sequence starts at a high level and only one transition from a high level to a low level occurs within the transmission duration.
In addition, the N waveform sequences formed by the preset X level jumps at least comprise M waveform sequences, wherein the M waveform sequences are the first M waveform sequences in the N waveform sequences corresponding to the preset data frame header, M is a positive integer and is more than or equal to 2; the M waveform sequences consist of the first waveform sequence; or, the M waveform sequences consist of the third waveform sequence; alternatively, the M waveform sequences include at least one first waveform sequence and at least one third waveform sequence.
In addition, when the M waveform sequences are composed of the first waveform sequence, the N waveform sequences formed by the preset X level jumps further include: at least 1 interference rejection waveform sequence following the M waveform sequences, wherein the at least 1 interference rejection waveform sequence is the second waveform sequence or the third waveform sequence; when the M waveform sequences are composed of the third waveform sequence, the N waveform sequences formed by the preset X level jumps further include: at least 1 interference rejection waveform sequence following the M waveform sequences, wherein the at least 1 interference rejection waveform sequence is the second waveform sequence or the first waveform sequence.
Further, N is 8, and the N waveform sequences formed by the preset X level transitions are the third waveform sequence, the second waveform sequence, and the third waveform sequence in this order.
In addition, the N waveform sequences formed by the preset X level jumps are N waveform sequences corresponding to the data frame header; after the receiving port continuously detects X level transitions, the method further comprises: continuing to detect a level jump at the receiving port; after calculating the transmission duration of a waveform sequence according to the waveform sequence characteristics of the N waveform sequences formed according to the preset X level transitions and the time interval between any two of the continuously detected X level transitions, the method further includes: determining a waveform sequence corresponding to the data transmission after the data frame header according to the level jump continuously detected at the receiving port and the waveform sequence characteristics by taking the transmission duration as the duration of each waveform sequence; and determining a bit sequence of the transmission data according to a waveform sequence corresponding to the transmission data, wherein one of bit 1 and bit 0 is represented by the first waveform sequence, and the other of bit 1 and bit 0 is represented by the second waveform sequence and the third waveform sequence respectively.
In addition, before the taking the transmission duration as the duration of each waveform sequence, determining a waveform sequence corresponding to data after the data frame header according to the level jump continuously detected at the receiving port and the waveform sequence characteristics, the method further includes: and judging whether the transmission duration is locally supported transmission duration, if so, executing the step of taking the transmission duration as the duration of each waveform sequence and determining the waveform sequence corresponding to the data transmission after the data frame header according to the level jump continuously detected at the receiving port and the waveform sequence characteristics.
Another main object of the present invention is to provide a terminal, comprising: an obtaining module, configured to obtain waveform sequence characteristics of N waveform sequences formed by preset X level jumps, where N is a positive integer, X is a positive integer and greater than 1, and each waveform sequence of the N waveform sequences formed by the preset X level jumps is one of the following: a first waveform sequence, a second waveform sequence, and a third waveform sequence, wherein the first waveform sequence, the second waveform sequence, and the third waveform sequence have the following waveform sequence characteristics: the transmission durations of the first waveform sequence, the second waveform sequence and the third waveform sequence are the same, the transmission duration is in inverse proportion to the baud rate of transmitting the waveform sequences, the first waveform sequence starts from a high level and jumps to a low level after lasting for a preset time and ends from the high level, wherein the total duration of the low level appearing in the first waveform sequence in the transmission duration does not change along with the change of the baud rate of transmitting the waveform sequences, the second waveform sequence continues from the high level in the transmission duration, the third waveform sequence starts from the low level and ends from the high level, and the total duration of the low level appearing in the third waveform sequence in the transmission duration does not change along with the change of the baud rate of transmitting the waveform sequences, the preset X level jumps are all changed from high level jumps to low level jumps; the detection module is used for continuously detecting X level jumps at a receiving port, wherein the continuously detected X level jumps are all changed from a high level to a low level; and the duration identification module is used for calculating the transmission duration of one waveform sequence according to the waveform sequence characteristics of the N waveform sequences formed by the preset X level jumps and the time interval between any two continuously detected level jumps in the X level jumps.
Furthermore, before the duration identification module calculates the transmission duration of a waveform sequence according to the waveform sequence characteristics of N waveform sequences formed by the preset X level jumps and the time interval between any two of the continuously detected X level jumps, the duration identification module is further configured to determine whether each of all the continuously detected X level jumps corresponds to a preset relationship with the corresponding time interval of all the X level jumps included in the N waveform sequences formed by the preset X level jumps, and if so, trigger execution of the waveform sequence characteristics of N waveform sequences formed by the preset X level jumps and the time interval between any two of the continuously detected X level jumps to calculate the transmission of a waveform sequence Operation of a duration.
Further, the waveform sequence is characterized by: the total duration of the low levels appearing in the first waveform sequence within the transmission duration is less than one-half of the duration; and/or the total duration of the low levels appearing in the third waveform sequence in the transmission duration is less than one half of the duration.
Further, the waveform sequence is characterized by: the third waveform sequence has only one level jump from low level to high level within the transmission duration and ends with high level; the first waveform sequence starts at a high level and only one transition from a high level to a low level occurs within the transmission duration.
In addition, the N waveform sequences formed by the preset X level jumps at least comprise M waveform sequences, wherein the M waveform sequences are the first M waveform sequences in the N waveform sequences corresponding to the preset data frame header, M is a positive integer and is more than or equal to 2; the M waveform sequences consist of the first waveform sequence; or, the M waveform sequences consist of the third waveform sequence; alternatively, the M waveform sequences include at least one first waveform sequence and at least one third waveform sequence.
In addition, when the M waveform sequences are composed of the first waveform sequence, the N waveform sequences formed by the preset X level jumps further include: at least 1 interference rejection waveform sequence following the M waveform sequences, wherein the at least 1 interference rejection waveform sequence is the second waveform sequence or the third waveform sequence; when the M waveform sequences are composed of the third waveform sequence, the N waveform sequences formed by the preset X level jumps further include: at least 1 interference rejection waveform sequence following the M waveform sequences, wherein the at least 1 interference rejection waveform sequence is the second waveform sequence or the first waveform sequence.
Further, N is 8, and the N waveform sequences formed by the preset X level transitions are the third waveform sequence, the second waveform sequence, and the third waveform sequence in this order.
In addition, the N waveform sequences formed by the preset X level jumps are N waveform sequences corresponding to the data frame header; the detection module is further configured to continue to detect level jumps at the receiving port after the receiving port continuously detects X level jumps; the obtaining module is further configured to, after the duration identifying module calculates a transmission duration of one waveform sequence according to waveform sequence features of N waveform sequences formed by the preset X level hops and a time interval between any two of the continuously detected X level hops, use the transmission duration as a duration of each waveform sequence, and determine, according to the level hops continuously detected at the receiving port and the waveform sequence features, L waveform sequences corresponding to data transmission after the data frame header; and determining a bit sequence of the transmission data according to a waveform sequence corresponding to the transmission data, wherein one of bit 1 and bit 0 is represented by the first waveform sequence, and the other of bit 1 and bit 0 is represented by the second waveform sequence and the third waveform sequence respectively.
In addition, the terminal further includes: a determining module, configured to determine whether the transmission duration is a locally supported transmission duration, if so, trigger the obtaining module to use the transmission duration as a duration of each waveform sequence, and determine, according to the level jump continuously detected at the receiving port and the waveform sequence characteristics, L waveforms corresponding to data transmitted after the data frame header.
Another main objective of the present invention is to provide a method for sending a header of a data frame, including: acquiring N waveform sequences corresponding to a preset data frame header, wherein N is a positive integer, and each waveform sequence in the N waveform sequences is one of the following sequences: a first waveform sequence, a second waveform sequence, and a third waveform sequence, wherein the first waveform sequence, the second waveform sequence, and the third waveform sequence have the following waveform sequence characteristics: the transmission durations of the first waveform sequence, the second waveform sequence and the third waveform sequence are the same, the transmission durations are in inverse proportion to the baud rate of the waveform sequences, and the first waveform sequence starts with a high level and jumps to a low level after lasting for a preset time, ends with a high level, wherein the total duration of low levels occurring in said first sequence of waveforms taken up within said transmission duration does not vary with the baud rate at which said sequence of waveforms is transmitted, the second waveform sequence continues high for the transmission duration, the third waveform sequence starts at a low level, ending with a high level, wherein the total duration of the low level appearing in the third waveform sequence in the transmission duration does not change with the change of the baud rate of the waveform sequence; obtaining X level jumps in the N waveform sequences according to the waveform sequence characteristics of each waveform sequence in the N waveform sequences, wherein X is a positive integer and is greater than 1, and the X level jumps from a high level jump to a low level; and controlling the level of the sending port to change according to X level jumps in the N waveform sequences so as to send the data frame header.
Further, the waveform sequence is characterized by: the total duration of the low levels appearing in the first waveform sequence within the transmission duration is less than one-half of the duration; and/or the total duration of the low levels appearing in the third waveform sequence in the transmission duration is less than one half of the duration.
Further, the waveform sequence is characterized by: the third waveform sequence has only one level jump from low level to high level within the transmission duration and ends with high level; the first waveform sequence starts at a high level and only one transition from a high level to a low level occurs within the transmission duration.
In addition, the N waveform sequences at least comprise M waveform sequences, and the M waveform sequences are the first M waveform sequences in the N waveform sequences, wherein M is a positive integer and is more than or equal to 2; the M waveform sequences consist of the first waveform sequence; or, the M waveform sequences consist of the third waveform sequence; alternatively, the M waveform sequences include at least one first waveform sequence and at least one third waveform sequence.
Further, when the M waveform sequences are composed of the first waveform sequence, the N waveform sequences further include: at least 1 interference rejection waveform sequence following the M waveform sequences, wherein the at least 1 interference rejection waveform sequence is the second waveform sequence or the third waveform sequence; when the M waveform sequences consist of the third waveform sequence, the N waveform sequences further include: at least 1 interference rejection waveform sequence following the M waveform sequences, wherein the at least 1 interference rejection waveform sequence is the second waveform sequence or the first waveform sequence.
Further, N is 8, and the N waveform sequences are the third waveform sequence, the second waveform sequence, and the third waveform sequence in this order.
Another main object of the present invention is to provide a transmission apparatus, including: a waveform sequence obtaining module, configured to obtain N waveform sequences corresponding to a preset data frame header, where N is a positive integer, and each of the N waveform sequences is one of the following: a first waveform sequence, a second waveform sequence, and a third waveform sequence, wherein the first waveform sequence, the second waveform sequence, and the third waveform sequence have the following waveform sequence characteristics: the transmission durations of the first waveform sequence, the second waveform sequence and the third waveform sequence are the same, the transmission durations are in inverse proportion to the baud rate of the waveform sequences, and the first waveform sequence starts with a high level and jumps to a low level after lasting for a preset time, ends with a high level, wherein the total duration of low levels occurring in said first sequence of waveforms taken up within said transmission duration does not vary with the baud rate at which said sequence of waveforms is transmitted, the second waveform sequence continues high for the transmission duration, the third waveform sequence starts at a low level, ending with a high level, wherein the total duration of the low level appearing in the third waveform sequence in the transmission duration does not change with the change of the baud rate of the waveform sequence; obtaining X level jumps in the N waveform sequences according to the waveform sequence characteristics of each waveform sequence in the N waveform sequences, wherein X is a positive integer and is greater than 1, and the X level jumps from a high level jump to a low level; and the sending module is used for controlling the level of the sending port to change according to the X level jumps in the N waveform sequences so as to send the data frame header.
Further, the waveform sequence is characterized by: the total duration of the low levels appearing in the first waveform sequence within the transmission duration is less than one-half of the duration; and/or the total duration of the low levels appearing in the third waveform sequence in the transmission duration is less than one half of the duration.
Further, the waveform sequence is characterized by: the third waveform sequence has only one level jump from low level to high level within the transmission duration and ends with high level; the first waveform sequence starts at a high level and only one transition from a high level to a low level occurs within the transmission duration.
In addition, the N waveform sequences at least include M waveform sequences, where M is a positive integer and M is greater than or equal to 2, and the M waveform sequences are the first M waveform sequences of the N waveform sequences corresponding to the preset data frame header; the M waveform sequences consist of the first waveform sequence; or, the M waveform sequences consist of the third waveform sequence; alternatively, the M waveform sequences include at least one first waveform sequence and at least one third waveform sequence.
Further, when the M waveform sequences are composed of the first waveform sequence, the N waveform sequences further include: at least 1 interference rejection waveform sequence following the M waveform sequences, wherein the at least 1 interference rejection waveform sequence is the second waveform sequence or the third waveform sequence; when the M waveform sequences consist of the third waveform sequence, the N waveform sequences further include: at least 1 interference rejection waveform sequence following the M waveform sequences, wherein the at least 1 interference rejection waveform sequence is the second waveform sequence or the first waveform sequence.
Further, N is 8, and the N waveform sequences are the third waveform sequence, the second waveform sequence, and the third waveform sequence in this order.
According to the technical scheme provided by the invention, the invention provides the data frame header sending method and the sending device, and the sending port is controlled to carry out level change according to the obtained level jump to send the data frame header by obtaining the waveform sequence corresponding to the preset data frame header and the corresponding level jump, so that the receiving device can obtain the transmission duration time through the data frame header, and the value of the transmission duration time by the sending end and the receiving end is ensured to be consistent during each data transmission. In addition, the sending end and the receiving end can only use two lines to complete data receiving and sending, and power supply/charging between the two devices is completed simultaneously in the data receiving and sending process, and the high level ratio in the waveform sequence during data transmission is higher, so that the power supply/charging efficiency is greatly improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1A is a flowchart of a transmission parameter obtaining method according to embodiment 1 of the present invention;
FIG. 1B is a diagram illustrating various waveform sequences provided in example 1 of the present invention;
FIG. 1C is a schematic diagram of a first waveform sequence for an alternative implementation provided in example 1 of the present invention;
FIG. 1D is a diagram illustrating a predetermined waveform sequence according to an alternative embodiment of the present invention provided in example 1;
fig. 1E is a schematic diagram of a detected level jump in an alternative embodiment provided in embodiment 1 of the present invention;
FIG. 1F is a diagram illustrating that the first M waveform sequences comprise a first waveform sequence in accordance with an alternative embodiment of the present invention as provided in example 1;
fig. 1G is a schematic diagram of the first M waveform sequences including the first waveform sequence and the third waveform sequence according to the alternative embodiment provided in example 1 of the present invention;
fig. 1H is a schematic diagram of a waveform sequence of N-8 according to embodiment 1 of the present invention;
fig. 2A is a schematic structural diagram of a terminal according to embodiment 2 of the present invention;
FIG. 2B is a diagram illustrating various waveform sequences provided in embodiment 2 of the present invention;
FIG. 2C is a diagram illustrating a preset waveform sequence according to an alternative embodiment of the present invention provided in example 2;
fig. 2D is a diagram illustrating a detected level jump according to an alternative embodiment of the present invention, which is provided in embodiment 2;
fig. 3A is a flowchart of a method for sending a data frame header according to embodiment 3 of the present invention;
FIG. 3B is a diagram illustrating various waveform sequences provided in embodiment 3 of the present invention;
FIG. 3C is a schematic diagram of a first waveform sequence for an alternative implementation provided in example 3 of the present invention;
fig. 3D is a schematic diagram of a waveform sequence corresponding to a preset data frame header according to an alternative implementation manner provided in embodiment 3 of the present invention;
fig. 3E is a schematic diagram of a waveform sequence of N-8 according to embodiment 3 of the present invention;
fig. 4 is a schematic structural diagram of a transmitting apparatus according to embodiment 4 of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention are clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it is to be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", and the like, indicate orientations or positional relationships based on those shown in the drawings, and are used only for convenience in describing the present invention and for simplicity in description, and do not indicate or imply that the referenced devices or elements must have a particular orientation, be constructed and operated in a particular orientation, and thus, are not to be construed as limiting the present invention. Furthermore, the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or quantity or location.
In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
Embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
Example 1
The embodiment provides a transmission parameter acquisition method, which can be applied to communication between a master device and a slave device. The device for acquiring the transmission parameters may be a slave device or a master device. The device as the master device may be, for example, a terminal, and the device as the slave device may be, for example, an electronic payment device (e.g., an electronic signature tool key, a smart card, a key-engaging device, etc.).
Fig. 1A is a flowchart of a transmission parameter obtaining method according to an embodiment of the present invention, and as shown in fig. 1A, the transmission parameter obtaining method according to the embodiment mainly includes the following steps:
step 101, obtaining waveform sequence characteristics of N waveform sequences formed by X preset level jumps, where N is a positive integer, X is a positive integer and greater than 1, and each waveform sequence in the N waveform sequences formed by the X preset level jumps is one of the following: the first waveform sequence, the second waveform sequence and the third waveform sequence are characterized in that: the transmission duration time T of the first waveform sequence, the transmission duration time T of the second waveform sequence and the transmission duration time T of the third waveform sequence are the same, the transmission duration time T is in inverse proportion to the baud rate of the transmission waveform sequence, the first waveform sequence starts from a high level and jumps to a low level after lasting for a preset time T1, and the first waveform sequence ends from the high level, wherein the total duration of the low level appearing in the first waveform sequence in the transmission duration time T does not change along with the change of the baud rate of the transmission waveform sequence, the second waveform sequence continues from the high level in the transmission duration time T, the third waveform sequence starts from the low level and ends from the high level, the total duration of the low level appearing in the third waveform sequence in the transmission duration time T does not change along with the change of the baud rate of the transmission waveform sequence, and the preset X jump levels are changed from the high level to the low level.
In this embodiment, schematic diagrams of the first waveform sequence, the second waveform sequence and the third waveform sequence are shown in fig. 1B, and it should be noted that there may be a plurality of ways for the first waveform sequence and the third waveform sequence, for example, the waveform sequence may include a plurality of transitions from high level to low level, and is not limited to the way shown in fig. 1B. In addition, in the one-time data transmission process, all the first waveform sequences have the same waveform sequence characteristics, and there is no case where two or more first waveform sequences are present in the one-time data transmission process, and all the third waveform sequences also have the same waveform sequence characteristics, and there is no case where two or more third waveform sequences are present in the one-time data transmission process. The first waveform sequence starts at a high level and ends at a high level, the second waveform sequence continues at the high level, the third waveform sequence starts at a low level and ends at the high level, the difference between the three waveform sequences is large, and the waveform sequences are easier to identify.
In the step, the transmission duration and the baud rate of the transmission waveform sequence are in inverse proportion, and the total duration of the low level in the first waveform sequence in the transmission duration does not change along with the change of the baud rate of the transmission waveform sequence; the total duration of the low levels present in the third waveform sequence during the transmission duration does not vary with the baud rate of the transmitted waveform sequence. For example, taking the first waveform sequence as an example, when the baud rate is 50Mbps, the transmission duration of the first waveform sequence is 20ns, and when the baud rate is 25Mbps, the transmission duration of the first waveform sequence is 40ns, i.e., the transmission duration is in inverse proportion to the baud rate of the transmission waveform sequence, the longer the transmission duration, the smaller the baud rate, i.e., the lower the transmission speed, and the shorter the transmission duration, the larger the baud rate, i.e., the higher the transmission speed.
The total duration of the low level appearing in the first waveform sequence in the transmission duration does not change with the change of the baud rate of the transmission waveform sequence, that is, as shown in fig. 1C, when the baud rate of the first waveform sequence is 50Mbps, the transmission duration of the first waveform sequence is 20ns, the duration of the low level is 8ns, when the baud rate is 25Mbps, the transmission duration of the first waveform sequence is 40ns, and the duration of the low level is still 8 ns. The total duration of the low level appearing in the third waveform sequence in the transmission duration does not change with the change of the baud rate of the transmission waveform sequence, namely when the baud rate of the third waveform sequence is 50Mbps, the transmission duration of the third waveform sequence is 20ns, the duration of the low level is 8ns, when the baud rate is 25Mbps, the transmission duration of the third waveform sequence is 40ns, and the duration of the low level is still 8 ns. Under the condition that data transmission and power supply are carried out simultaneously, the shorter the time of the total time length occupied by the low-level duration time is, the longer the power supply or power taking duration time is in the data transmission process, namely under the condition that the baud rate is 50Mbps, the transmission duration time of the first waveform sequence or the third waveform sequence is 20ns, the duration time of the low level is 8ns, the power supply or power taking duration time of the first waveform sequence or the third waveform sequence is 60%, under the condition that the baud rate is 25Mbps, the transmission duration time of the first waveform sequence or the third waveform sequence is 40ns, the duration time of the low level is 8ns, and the power supply or power taking duration time of the first waveform sequence or the third waveform sequence is 80%, namely under the condition that the duration time of the low level is fixed, the lower the baud rate is, the higher the power supply or power taking efficiency is, and the baud rate can be properly reduced for improving the power supply efficiency.
In this step, for example, if X is 4, N is 5, and 5 waveform sequences are preset as the first waveform sequence, the second waveform sequence, and the third waveform sequence, respectively, then the waveform sequence characteristics of the 5 waveform sequences formed by obtaining the preset 4 level jumps are as shown in fig. 1D, that is: after the high level lasts for T1 time, the low level is jumped to (the first jump), and in the time of T-T1, the low level is recovered to the high level after lasting for a fixed time; jumping to low level (second jump) after high level lasts for T1 time, and recovering to high level after low level lasts for fixed time within T-T1 time; jumping to low level (third jumping) after high level lasts for T1 time, and recovering to high level after low level lasts for fixed time within T-T1 time; high level for T time; the transition is low (fourth transition) and ends with high (T is the sum of the durations of low and high).
And 102, continuously detecting X level jumps on a receiving port, wherein all the continuously detected X level jumps are changed from a high level to a low level.
In this step, the device for receiving data, which detects level jump, may continuously sample the level of the receiving port to obtain the level change of the receiving port, and the sampling frequency used in the sampling should be higher than the preset minimum standard, so as to ensure the authenticity of the level change of the receiving port obtained by sampling, and also only obtain the time when the level jump of the receiving port changes into the high level jump or into the low level.
And 103, calculating the transmission duration of a waveform sequence according to the waveform sequence characteristics of N waveform sequences formed by the preset X level jumps and the time interval between any two level jumps in the continuously detected X level jumps.
In this step, for example, X is 4, N is 5, and 4 level transitions are continuously detected as shown in fig. 1E, the waveform sequence characteristics of the 5 waveform sequences that can be formed according to the preset 4 level jumps obtained in step 101, and the time interval between any two level transitions to calculate the transmission duration of a waveform sequence, as shown with reference to fig. 1D, the time interval between the first transition and the second transition is T-T1+ T1 ═ T, i.e., the transmission duration of a sequence of waveforms, the time interval between the first and third transition is T-T1+ T1+ T-T1+ T1-2T, i.e., the transmission durations of the two waveform sequences, the time interval between the third transition and the fourth transition is T-T1+ T, with the known ratio of T1 to T, the transmission duration of a waveform sequence can be calculated.
In the embodiment, the transmission duration of one waveform sequence is calculated by using the time interval between the same hopping moments, and the method is simple in calculation mode, easy to operate and high in accuracy.
In an optional implementation manner of this embodiment, between step 102 and step 103, step 102a may further be included:
and judging whether each time interval of all the continuously detected X level jumps conforms to the same preset relation with the corresponding time interval of all the X level jumps contained in the N waveform sequences formed by the preset X level jumps or not, and if so, calculating the transmission duration of one waveform sequence according to the waveform sequence characteristics of the N waveform sequences formed by the preset X level jumps and the time interval between any two continuously detected X level jumps. As shown in fig. 1D and 1E, when N is 5 and X is 4, it is determined whether each of all time intervals (shown in fig. 1D) of the detected 4 level transitions and corresponding time intervals (shown in fig. 1C) of all the preset 4 level transitions conform to the same preset relationship, where the same preset relationship is: for example, the time interval between the detected first level jump and the second level jump is 50ns, the time interval between the preset first level jump and the second level jump is 100ns, and the time interval between the detected level jump and the preset corresponding jump is 0.5 times of the time interval; the time interval between the detected second level jump and the detected third level jump is 50ns, the time interval between the preset second level jump and the preset third level jump is 100ns, and the time interval between the detected level jump and the preset corresponding jump is 0.5 times of the time interval; that is, the time interval between the detected W-th level jump and the W + 1-th (where W is a positive integer and W +1 is less than or equal to X) level jump is 0.5 times of the preset time interval between the W-th level jump and the W + 1-th level jump; the time interval between the detected first level jump and the detected third level jump is 100ns, the time interval between the preset first level jump and the preset third level jump is 200ns, the time interval between the detected level jump and the preset corresponding jump is 0.5 times of the relationship, namely the time interval between the detected Y level jump and the Y +2 (wherein, Y is a positive integer, and Y +1 is less than or equal to X) level jump is 0.5 times of the relationship with the time interval between the preset Y level jump and the Y +2 level jump; by analogy, when the time intervals of all detected level jumps and the time intervals of the preset corresponding jumps are 0.5 times of the relationship, the same preset relationship can be regarded, and it can be determined that the continuously transmitted 5 waveform sequences are the 5 waveform sequences corresponding to the preset data frame header. When whether each time interval of all the continuously detected X level jumps conforms to the same preset relationship with the corresponding time interval of all the X level jumps in the N waveform sequences formed by the preset X level jumps, the continuously detected X level jumps can be determined as a data frame header, the transmission duration of one waveform sequence is calculated after the data frame header is determined, the calculation accuracy of the transmission duration can be guaranteed, and the transmission efficiency is improved.
In an optional implementation manner of this embodiment, the waveform sequence further includes: the total duration of the low level appearing in the first waveform sequence in the transmission duration is less than one half of the duration; and/or the low levels present in the third waveform sequence occupy less than half of the duration of the transmission. Under the condition that data transmission and power supply are carried out simultaneously, the shorter the total duration occupied by the low-level duration time is, the longer the power supply or power taking duration is in the data transmission process, and the higher the power supply/power taking efficiency is.
In an optional implementation manner of this embodiment, the waveform sequence further includes: the third waveform sequence has only one level jump from low level to high level within the transmission duration and ends with high level; the first waveform sequence starts at a high level and only one transition occurs from a high level to a low level during the transmission duration. The first waveform sequence or the third waveform sequence has only one jump within the transmission duration, the first waveform sequence or the third waveform sequence is easier to transmit and receive, the proportion of the low level in the transmission duration is lower, and the power supply/power taking efficiency is higher under the condition that data transmission and power supply are carried out simultaneously.
In an optional implementation manner of this embodiment, the N waveform sequences corresponding to the preset data frame header at least include M waveform sequences, where M waveform sequences are the first M waveform sequences of the N waveform sequences corresponding to the preset data frame header, where M is a positive integer and M is greater than or equal to 2; the M waveform sequences consist of a first waveform sequence; or, the M waveform sequences consist of a third waveform sequence; alternatively, the M waveform sequences include at least one first waveform sequence and at least one third waveform sequence. Taking N to 5 and M to 2, the first 2 waveform sequences of the 5 waveform sequences corresponding to the preset data frame header are exemplified by 2 first waveform sequence groups, and as shown in fig. 1F, a time interval between a time when the 1 st waveform sequence first appears a high level jump to a low level and a time when the 2 nd waveform sequence first appears a high level jump to a low level is a transmission duration of the first waveform sequence; alternatively, for example, when N is 5, M is 2, and the first 2 waveform sequences of the 5 waveform sequences corresponding to the preset data frame header include a first waveform sequence and a third waveform sequence, as shown in fig. 1G, the 1 st waveform sequence is the first waveform sequence, the 2 nd waveform sequence is the third waveform sequence, and when T1 is T1/3, the time interval between two transitions is T2/3, and the transmission duration T may be calculated according to the time interval. It can be seen that, when the M waveform sequences are composed of the first or third waveform sequences, or include the first and third waveform sequences, since the first and third waveform sequences both include level jump, the calculation of the transmission duration is simpler and faster, and the baud rate of the waveform sequence can be obtained according to the transmission duration T, i.e., the transmission parameter of the current data transmission can be obtained.
Further, when the M waveform sequences are composed of the first waveform sequence, the N waveform sequences corresponding to the preset data frame header further include: at least 1 interference rejection waveform sequence after the M waveform sequences, wherein the at least 1 interference rejection waveform sequence is a second waveform sequence or a third waveform sequence; when the M waveform sequences are composed of the third waveform sequence, the N waveform sequences corresponding to the preset data frame header further include: at least 1 interference rejection waveform sequence after the M waveform sequences, wherein the at least 1 interference rejection waveform sequence is the second waveform sequence or the first waveform sequence. When the M waveform sequences are the first waveform sequence or the third waveform sequence, in order to prevent the data receiving device from judging that the data content is misjudged by considering a plurality of continuous waveform sequences with the same level change time interval as single-frequency interference, the data sending device needs to add an anti-interference waveform sequence after the plurality of waveform sequences with the same waveform change, so that the time interval of the level change is not repeated singly, the data receiving device can identify the level change as normal data transmission instead of single-frequency interference, and the accuracy of the data transmission is improved. For example, after two consecutive first waveform sequences, the device that transmits data adds a second waveform sequence or a third waveform sequence, and the device that receives data can determine that the two consecutive first waveform sequences are normal data and are not single-frequency interference.
In an alternative embodiment of this embodiment, N is 8, and as shown in fig. 1H, the N waveform sequences are sequentially a third waveform sequence, a second waveform sequence, and a third waveform sequence.
In the following, a method for calculating the transmission duration is briefly described, taking N as 8 as an example in the present alternative embodiment:
the method comprises the following steps: acquiring waveform sequence characteristics of 8 preset waveform sequences formed by 6 level jumps, wherein the 8 waveform sequences sequentially comprise: a third waveform sequence, a second waveform sequence, and a third waveform sequence; in the present embodiment, the first waveform sequence, the second waveform sequence, and the third waveform sequence have the following waveform sequence characteristics: the transmission duration time T of the first waveform sequence, the transmission duration time T of the second waveform sequence and the transmission duration time T of the third waveform sequence are the same, the transmission duration time T is in inverse proportion to the baud rate of the transmission waveform sequence, the first waveform sequence starts from a high level and jumps to a low level after lasting for a preset time and ends from the high level, wherein the total duration of the low level in the first waveform sequence in the transmission duration time does not change along with the change of the baud rate of the transmission waveform sequence, the second waveform sequence continues from the high level in the transmission duration time, the third waveform sequence starts from the low level and ends from the high level, the total duration of the low level in the third waveform sequence in the transmission duration time does not change along with the change of the baud rate of the transmission waveform sequence, and the preset X level jumps are changed from the high level to the low level;
step two: continuously detecting 6 level jumps at a receiving port, wherein the continuously detected 6 level jumps are all changed from a high level to a low level;
step three: and calculating the transmission duration of one waveform sequence according to the preset waveform sequence characteristics of 8 waveform sequences formed by 6 level jumps and the time interval between any two of the 6 detected level jumps. And if the time interval between the first level jump and the second level jump in the 6 detected level jumps is 50ns, the transmission duration is 50ns, and the time interval between the fourth level jump and the fifth level jump is 100ns, the transmission duration is 50 ns.
The transmission duration is calculated by using the 8 preset waveform sequences and the characteristics of the waveform sequences in the optional embodiment, and the calculation mode, the data sending mode and the data receiving mode are both simple.
In an optional implementation manner of this embodiment, N waveform sequences formed by preset X level jumps are N waveform sequences corresponding to a header of a data frame; after the receiving port continuously detects X level transitions, the method further comprises: continuously detecting level jump at the receiving port; after calculating the transmission duration of a waveform sequence according to the waveform sequence characteristics of the N waveform sequences formed by the preset X level jumps and the time interval between any two of the continuously detected X level jumps, the method further comprises: determining a waveform sequence corresponding to the data transmission frame header according to the level jump continuously detected at the receiving port and the waveform sequence characteristics by taking the transmission duration as the duration of each waveform sequence; and determining a bit sequence of the transmission data according to a waveform sequence corresponding to the transmission data, wherein one of bit 1 and bit 0 is represented by a first waveform sequence, and the other of bit 1 and bit 0 is represented by a second waveform sequence and a third waveform sequence respectively. In this alternative embodiment, the determining the waveform sequence corresponding to the data frame header according to the level jump continuously detected at the receiving port and the waveform sequence characteristic includes, but is not limited to, the following ways: the first method is as follows: the calculated transmission duration is used as the transmission duration of each waveform sequence, the level change in each transmission duration is received by taking the transmission duration as a unit, and the corresponding waveform sequence in the transmission duration is determined according to the level change in each transmission duration and the characteristics of the waveform sequence; the second method comprises the following steps: the receiving port continuously detects the level change, divides the detected level change into at least one waveform sequence by taking the transmission duration as a unit, and determines each waveform sequence according to the characteristics of the waveform sequence. Taking the first mode as an example, the calculated transmission duration is 20ns, a level change within 20ns is received, and a level jump from high level to low level occurs at 6.67ns in the transmission duration, then according to the waveform characteristics of the first waveform sequence starting with high level, jumping to low level after high level continues for a preset time, and T1 being T × 1/3, the waveform sequence within the first 20ns is determined to be the first waveform sequence, the data bit transmitted by the waveform sequence is 1, the level change within the next 20ns is continuously received, and the data bit of the transmission duration is obtained. Taking the second mode as an example, the calculated transmission duration is 20ns, the level jump is continuously detected at the receiving port, and the received level jump is divided by 20ns, so as to obtain the level change in each transmission duration, for example, the level jump continuously detected at the receiving port is divided into 5 transmission durations, where in the third transmission duration, a level jump from a high level to a low level occurs at 6.67ns, and then according to the waveform characteristics that the first waveform sequence starts at a high level, the high level jumps to a low level after a preset time, and T1 ═ T × 1/3, the waveform sequence in the first 20ns is determined to be the first waveform sequence, and the data bit transmitted by the waveform sequence is 1. In the embodiment, after the transmission duration is obtained, the waveform sequence and the bit sequence corresponding to the transmission data are determined according to the transmission duration, so that the authenticity and the reliability of data transmission are guaranteed, and data receiving errors caused by transmission duration errors are avoided.
In an optional implementation manner of this embodiment, before the transmission duration is taken as the duration of each waveform sequence, and the waveform sequence corresponding to the data is transmitted after the data frame header is determined according to the level jump continuously detected at the receiving port and the waveform sequence characteristics, the method further includes: and judging whether the transmission duration is locally supported transmission duration, if so, executing the step of taking the transmission duration as the duration of each waveform sequence, and determining the waveform sequence corresponding to the transmission data after the data frame header according to the level jump continuously detected at the receiving port and the waveform sequence characteristics. Optionally, if not, the level change of the receiving port is not detected, or the transmitted waveform sequence is not determined after the level change of the receiving port is detected. In this optional embodiment, it is determined whether the transmission duration is the locally supported transmission duration, and then the level change is continuously detected at the receiving port and the waveform sequence is determined, so that the authenticity and accuracy of the data bit represented by the obtained waveform sequence can be ensured, and if the transmission duration is not the locally supported transmission duration, the level change is not continuously detected or the waveform sequence is not determined, thereby avoiding the waste of the device computation capability.
The transmission parameter obtaining method of this embodiment obtains waveform sequence characteristics of N waveform sequences formed by preset X level jumps, continuously detects X level jumps at a receiving port, and calculates a transmission duration of one waveform sequence according to a time interval between any two of the continuously detected X level jumps. By the method for determining the transmission duration, the transmission duration does not need to be negotiated before the data transmission starts, data receiving and transmitting errors caused by different transmission durations of the two devices can be avoided, and the data transmission efficiency and accuracy are improved. In the method, the high level ratio is high, the equipment for receiving the data can be charged within the duration time of the high level, and the charging efficiency is improved.
Example 2
This embodiment provides a terminal, where the terminal corresponds to the transmission parameter obtaining method in embodiment 1 one to one, and details are not repeated herein, and only briefly described, and in an optional implementation manner of this embodiment, specific operations performed by each unit in the terminal may refer to embodiment 1.
In this embodiment, the terminal may be a PC, an iPAD, a mobile phone, an electronic signature tool key, a smart card, a key that engages with a device, or the like.
Fig. 2A is a schematic structural diagram of an alternative terminal 200 of this embodiment, where the terminal includes: a detection module 201, an acquisition module 202, a duration identification module 203, wherein:
an obtaining module 202, configured to obtain waveform sequence characteristics of N waveform sequences formed by X preset level jumps, where N is a positive integer, X is a positive integer and greater than 1, and each waveform sequence of the N waveform sequences formed by the X preset level jumps is one of the following: the first waveform sequence, the second waveform sequence and the third waveform sequence are characterized in that: the transmission duration of the first waveform sequence, the transmission duration of the second waveform sequence and the transmission duration of the third waveform sequence are the same, the transmission duration and the baud rate of the transmission waveform sequence are in an inverse proportion relation, the first waveform sequence starts from a high level and jumps to a low level after lasting for a preset time and ends from the high level, wherein the total duration of the low level in the first waveform sequence within the transmission duration does not change along with the change of the baud rate of the transmission waveform sequence, the second waveform sequence continues from the high level within the transmission duration, the third waveform sequence starts from the low level and ends from the high level, the total duration of the low level in the third waveform sequence within the transmission duration does not change along with the change of the baud rate of the transmission waveform sequence, and the preset X level jumps are changed from the high level to the low level.
In this embodiment, as shown in fig. 2B, the schematic diagrams of the first waveform sequence, the second waveform sequence and the third waveform sequence are shown in fig. 2B, and it should be noted that there may be a plurality of ways for the first waveform sequence and the third waveform sequence, for example, the waveform sequence may include a plurality of transitions from high level to low level, and is not limited to the way shown in fig. 2B. In addition, in the one-time data transmission process, all the first waveform sequences have the same waveform sequence characteristics, and there is no case where two or more first waveform sequences are present in the one-time data transmission process, and all the third waveform sequences also have the same waveform sequence characteristics, and there is no case where two or more third waveform sequences are present in the one-time data transmission process. The first waveform sequence starts at a high level and ends at a high level, the second waveform sequence continues at the high level, the third waveform sequence starts at a low level and ends at the high level, the difference between the three waveform sequences is large, and the waveform sequences are easier to identify.
In this embodiment, the transmission duration and the baud rate of the transmission waveform sequence are in an inverse relationship, and the total duration of the low level appearing in the first waveform sequence in the transmission duration does not change with the change of the baud rate of the transmission waveform sequence; the total duration of the low levels present in the third waveform sequence during the transmission duration does not vary with the baud rate of the transmitted waveform sequence. For example, taking the first waveform sequence as an example, when the baud rate is 50Mbps, the transmission duration of the first waveform sequence is 20ns, and when the baud rate is 25Mbps, the transmission duration of the first waveform sequence is 40ns, i.e., the transmission duration is in inverse proportion to the baud rate of the transmission waveform sequence, the longer the transmission duration, the smaller the baud rate, i.e., the lower the transmission speed, and the shorter the transmission duration, the larger the baud rate, i.e., the higher the transmission speed.
The total duration of the low level appearing in the first waveform sequence in the transmission duration does not change along with the change of the baud rate of the transmission waveform sequence, when the baud rate of the first waveform sequence is 50Mbps, the transmission duration of the first waveform sequence is 20ns, the duration of the low level is 8ns, when the baud rate is 25Mbps, the transmission duration of the first waveform sequence is 40ns, and the duration of the low level is still 8 ns. The total duration of the low level appearing in the third waveform sequence in the transmission duration does not change with the change of the baud rate of the transmission waveform sequence, namely when the baud rate of the third waveform sequence is 50Mbps, the transmission duration of the third waveform sequence is 20ns, the duration of the low level is 8ns, when the baud rate is 25Mbps, the transmission duration of the third waveform sequence is 40ns, and the duration of the low level is still 8 ns. Under the condition that data transmission and power supply are carried out simultaneously, the shorter the time of the total time length occupied by the low-level duration time is, the longer the power supply or power taking duration time is in the data transmission process, namely under the condition that the baud rate is 50Mbps, the transmission duration time of the first waveform sequence or the third waveform sequence is 20ns, the duration time of the low level is 8ns, the power supply or power taking duration time of the first waveform sequence or the third waveform sequence is 60%, under the condition that the baud rate is 25Mbps, the transmission duration time of the first waveform sequence or the third waveform sequence is 40ns, the duration time of the low level is 8ns, and the power supply or power taking duration time of the first waveform sequence or the third waveform sequence is 80%, namely under the condition that the duration time of the low level is fixed, the lower the baud rate is, the higher the power supply or power taking efficiency is, and the baud rate can be properly reduced for improving the power supply efficiency.
In this embodiment, for example, when X is 4, N is 5, and 5 waveform sequences are preset as the first waveform sequence, the second waveform sequence, and the third waveform sequence, respectively, the waveform sequence characteristics of the 5 waveform sequences formed by acquiring the preset 4 level jumps are as shown in fig. 2C, that is: after the high level lasts for T1 time, the low level is jumped to (the first jump), and in the time of T-T1, the low level is recovered to the high level after lasting for a fixed time; jumping to low level (second jump) after high level lasts for T1 time, and recovering to high level after low level lasts for fixed time within T-T1 time; jumping to low level (third jumping) after high level lasts for T1 time, and recovering to high level after low level lasts for fixed time within T-T1 time; high level for T time; the transition is low (fourth transition) and ends with high (T is the sum of the durations of low and high).
The detecting module 201 is configured to continuously detect X level jumps at the receiving port, where the continuously detected X level jumps are all changed from a high level to a low level.
And the duration identifying module 203 is configured to calculate a transmission duration of a waveform sequence according to the waveform sequence characteristics of N waveform sequences formed by the preset X level transitions and a time interval between any two of the continuously detected X level transitions.
In this embodiment, for example, X is 4, N is 5, and 4 level jumps continuously detected by the detection module 201 are as shown in fig. 2D, the transmission duration of one waveform sequence can be calculated according to the waveform sequence characteristics of 5 waveform sequences formed by the preset 4 level jumps obtained in the obtaining module 202, and the time interval between any two level jumps, for example, as shown in fig. 2C, the time interval between the first jump and the second jump is T-T1+ T1, i.e., the transmission duration of one waveform sequence, the time interval between the first jump and the third jump is T-T1+ T1+ T1+ T1, i.e., the transmission duration of two waveform sequences, the time interval between the third jump and the fourth jump is T-T1+ T, and in the case that the proportional relationship between T1 and T is known, i.e. the transmission duration of a sequence of waveforms can be calculated.
In this embodiment, the terminal 200 calculates the transmission duration of a waveform sequence by using the time interval between the same hopping times, and the calculation method is simple, easy to operate and high in accuracy.
In an optional implementation manner of this embodiment, before the duration identifying module 203 calculates the transmission duration of a waveform sequence according to the waveform sequence characteristics of N waveform sequences formed by preset X level hops and the time interval between any two of the detected X level hops, the duration identifying module 203 is further configured to determine whether each of all time intervals of the detected X level hops matches the same preset relationship as the corresponding time interval of all time intervals of the X level hops included in the N waveform sequences formed by the preset X level hops, and if so, trigger an operation of calculating the transmission duration of a waveform sequence according to the waveform sequence characteristics of N waveform sequences formed by the preset X level hops and the time interval between any two of the detected X level hops . When whether each of all time intervals of the continuously detected X level transitions corresponds to the same preset relationship with corresponding time intervals of all time intervals of the X level transitions included in the N waveform sequences formed by the preset X level transitions, the transmission duration module 203 may determine the continuously detected X level transitions as a data frame header, and calculate the transmission duration of one waveform sequence by the transmission duration module 203 after determining the data frame header, which may ensure the accuracy of the calculation of the transmission duration and improve the transmission efficiency.
In an optional implementation of this embodiment, the waveform sequence further includes: the total duration of the low level appearing in the first waveform sequence in the transmission duration is less than one half of the duration; and/or the low levels present in the third waveform sequence occupy less than half of the duration of the transmission. Under the condition that data transmission and power supply are carried out simultaneously, the shorter the total duration occupied by the low-level duration time is, the longer the power supply or power taking duration is in the data transmission process, and the higher the power supply/power taking efficiency is.
In an optional implementation of this embodiment, the waveform sequence further includes: the third waveform sequence has only one level jump from low level to high level within the transmission duration and ends with high level; the first waveform sequence starts at a high level and only one transition occurs from a high level to a low level during the transmission duration. The first waveform sequence or the third waveform sequence has only one jump within the transmission duration, the first waveform sequence or the third waveform sequence is easier to transmit and receive, the proportion of the low level in the transmission duration is lower, and the power supply/power taking efficiency is higher under the condition that data transmission and power supply are carried out simultaneously.
In an optional implementation manner of this embodiment, the N waveform sequences formed by the preset X level jumps at least include M waveform sequences, where the M waveform sequences are the first M waveform sequences of the N waveform sequences corresponding to the preset data frame header, where M is a positive integer and is greater than or equal to 2; the M waveform sequences consist of a first waveform sequence; or, the M waveform sequences consist of a third waveform sequence; alternatively, the M waveform sequences include at least one first waveform sequence and at least one third waveform sequence. When the M waveform sequences are composed of the first or third waveform sequences, or include the first and third waveform sequences, since both the first and third waveform sequences include level hopping, the calculation of the transmission duration is simpler and faster, and the baud rate of the waveform sequence can be obtained according to the transmission duration T, i.e., the transmission parameter of the current data transmission can be obtained.
Further, when the M waveform sequences are composed of the first waveform sequence, the N waveform sequences formed by the preset X level jumps further include: at least 1 interference rejection waveform sequence after the M waveform sequences, wherein the at least 1 interference rejection waveform sequence is a second waveform sequence or a third waveform sequence; when the M waveform sequences are composed of the third waveform sequence, the N waveform sequences formed by the preset X level jumps further include: at least 1 interference rejection waveform sequence after the M waveform sequences, wherein the at least 1 interference rejection waveform sequence is the second waveform sequence or the first waveform sequence. When the M waveform sequences are the first waveform sequence or the third waveform sequence, in order to prevent the data receiving device from judging that the data content is misjudged by considering a plurality of continuous waveform sequences with the same level change time interval as single-frequency interference, the data sending device needs to add an anti-interference waveform sequence after the plurality of waveform sequences with the same waveform change, so that the time interval of the level change is not repeated singly, the data receiving device can identify the level change as normal data transmission instead of single-frequency interference, and the accuracy of the data transmission is improved. For example, after two consecutive first waveform sequences, the device that transmits data adds a second waveform sequence or a third waveform sequence, and the device that receives data can determine that the two consecutive first waveform sequences are normal data and are not single-frequency interference.
In an optional implementation manner of this embodiment, N is 8, and the N waveform sequences formed by the preset X level transitions are sequentially a third waveform sequence, a second waveform sequence, and a third waveform sequence.
In an optional implementation manner of this embodiment, N waveform sequences formed by preset X level jumps are N waveform sequences corresponding to a header of a data frame; the detecting module 201 is further configured to continue to detect the level jump at the receiving port after the receiving port continuously detects the X level jumps; the obtaining module 202 is further configured to, after the duration identifying module 203 calculates a transmission duration of one waveform sequence according to waveform sequence characteristics of N waveform sequences formed by preset X level hops and a time interval between any two of the continuously detected X level hops, take the transmission duration as the duration of each waveform sequence, and determine, according to the continuously detected level hops at the receiving port and the waveform sequence characteristics, L waveform sequences corresponding to data transmission after the data frame header; and determining a bit sequence of the transmission data according to a waveform sequence corresponding to the transmission data, wherein one of bit 1 and bit 0 is represented by a first waveform sequence, and the other of bit 1 and bit 0 is represented by a second waveform sequence and a third waveform sequence respectively. In the embodiment, after the transmission duration is obtained, the waveform sequence and the bit sequence corresponding to the transmission data are determined according to the transmission duration, so that the authenticity and the reliability of data transmission are guaranteed, and data receiving errors caused by transmission duration errors are avoided.
In an optional implementation manner of this embodiment, the terminal further includes: the determining module 204 is configured to determine whether the transmission duration is a locally supported transmission duration, and if so, trigger the obtaining module 202 to use the transmission duration as the duration of each waveform sequence, and determine L waveforms corresponding to the transmission data after the data frame header according to the level jump continuously detected at the receiving port and the waveform sequence characteristics. In this optional embodiment, it is determined whether the transmission duration is the locally supported transmission duration, and then the level change is continuously detected at the receiving port and the waveform sequence is determined, so that the authenticity and accuracy of the data bit represented by the obtained waveform sequence can be ensured, and if the transmission duration is not the locally supported transmission duration, the level change is not continuously detected or the waveform sequence is not determined, thereby avoiding the waste of the device computation capability.
In the terminal 200 of this embodiment, the obtaining module 202 obtains the waveform sequence characteristics of N waveform sequences formed by preset X level jumps, the detecting module 201 continuously detects X level jumps at the receiving port, and the duration identifying module 203 calculates the transmission duration of one waveform sequence according to the time interval between any two of the continuously detected X level jumps. By determining the transmission duration, the terminal 200 does not need to negotiate the transmission duration before the data transmission starts, and can also avoid data transceiving errors caused by different transmission durations of the two devices, thereby improving the data transmission efficiency and accuracy. In the embodiment provided by the invention, the high-level ratio is higher, the terminal 200 can be charged within the high-level duration time, and the charging efficiency is improved.
Example 3
The embodiment provides a method for sending a data frame header, which can be applied to communication between a master device and a slave device. The device for sending the header of the data frame may be a master device or a slave device. The device as the master device may be, for example, a terminal, and the device as the slave device may be, for example, an electronic payment device (e.g., an electronic signature tool key, a smart card, a key-engaging device, etc.).
Fig. 3A is a flowchart of a method for sending a header of a data frame according to an embodiment of the present invention, where the method for sending a header of a data frame corresponds to the method for obtaining transmission parameters according to embodiment 1, and how to obtain the transmission parameters by using the header of the data frame and the content related to embodiment 1 are referred to in embodiment 1, which is not described in detail in this embodiment. As shown in fig. 3A, the sending method of a header of a data frame provided in this embodiment mainly includes the following steps:
step 301, obtaining N waveform sequences corresponding to a preset data frame header, where N is a positive integer, and each of the N waveform sequences is one of the following: the first waveform sequence, the second waveform sequence and the third waveform sequence are characterized in that: the transmission duration of the first waveform sequence, the transmission duration of the second waveform sequence and the transmission duration of the third waveform sequence are the same, the transmission duration and the baud rate of the transmission waveform sequence are in inverse proportion, the first waveform sequence starts from a high level and jumps to a low level after lasting for a preset time and ends from the high level, wherein the total duration of the low level in the first waveform sequence within the transmission duration does not change along with the change of the baud rate of the transmission waveform sequence, the second waveform sequence continues from the high level within the transmission duration, the third waveform sequence starts from the low level and ends from the high level, and the total duration of the low level in the third waveform sequence within the transmission duration does not change along with the change of the baud rate of the transmission waveform sequence; and obtaining X level jumps in the N waveform sequences according to the waveform sequence characteristics of each waveform sequence in the N waveform sequences, wherein X is a positive integer and is greater than 1, and the X level jumps from a high level jump to a low level.
In this embodiment, schematic diagrams of the first waveform sequence, the second waveform sequence and the third waveform sequence are shown in fig. 3B, and it should be noted that there may be a plurality of ways for the first waveform sequence and the third waveform sequence, for example, the waveform sequence may include a plurality of transitions from high level to low level, and is not limited to the way shown in fig. 3B. In addition, in the one-time data transmission process, all the first waveform sequences have the same waveform sequence characteristics, and there is no case where two or more first waveform sequences are present in the one-time data transmission process, and all the third waveform sequences also have the same waveform sequence characteristics, and there is no case where two or more third waveform sequences are present in the one-time data transmission process. The first waveform sequence starts at a high level and ends at a high level, the second waveform sequence continues at the high level, the third waveform sequence starts at a low level and ends at the high level, the difference between the three waveform sequences is large, and the waveform sequences are easier to identify.
In the step, the transmission duration and the baud rate of the transmission waveform sequence are in inverse proportion, and the total duration of the low level in the first waveform sequence in the transmission duration does not change along with the change of the baud rate of the transmission waveform sequence; the total duration of the low levels present in the third waveform sequence during the transmission duration does not vary with the baud rate of the transmitted waveform sequence. For example, taking the first waveform sequence as an example, when the baud rate is 50Mbps, the transmission duration of the first waveform sequence is 20ns, and when the baud rate is 25Mbps, the transmission duration of the first waveform sequence is 40ns, i.e., the transmission duration is in inverse proportion to the baud rate of the transmission waveform sequence, the longer the transmission duration, the smaller the baud rate, i.e., the lower the transmission speed, and the shorter the transmission duration, the larger the baud rate, i.e., the higher the transmission speed.
The total duration of the low level appearing in the first waveform sequence in the transmission duration does not change with the change of the baud rate of the transmission waveform sequence, that is, as shown in fig. 3C, when the baud rate of the first waveform sequence is 50Mbps, the transmission duration of the first waveform sequence is 20ns, the duration of the low level is 8ns, when the baud rate is 25Mbps, the transmission duration of the first waveform sequence is 40ns, and the duration of the low level is still 8 ns. The total duration of the low level appearing in the third waveform sequence in the transmission duration does not change with the change of the baud rate of the transmission waveform sequence, namely when the baud rate of the third waveform sequence is 50Mbps, the transmission duration of the third waveform sequence is 20ns, the duration of the low level is 8ns, when the baud rate is 25Mbps, the transmission duration of the third waveform sequence is 40ns, and the duration of the low level is still 8 ns. Under the condition that data transmission and power supply are carried out simultaneously, the shorter the time of the total time length occupied by the low-level duration time is, the longer the power supply or power taking duration time is in the data transmission process, namely under the condition that the baud rate is 50Mbps, the transmission duration time of the first waveform sequence or the third waveform sequence is 20ns, the duration time of the low level is 8ns, the power supply or power taking duration time of the first waveform sequence or the third waveform sequence is 60%, under the condition that the baud rate is 25Mbps, the transmission duration time of the first waveform sequence or the third waveform sequence is 40ns, the duration time of the low level is 8ns, and the power supply or power taking duration time of the first waveform sequence or the third waveform sequence is 80%, namely under the condition that the duration time of the low level is fixed, the lower the baud rate is, the higher the power supply or power taking efficiency is, and the baud rate can be properly reduced for improving the power supply efficiency.
In this step, for example, the preset header of the data frame corresponds to 5 waveform sequences, the 5 waveform sequences are respectively a first waveform sequence, a second waveform sequence and a third waveform sequence, and 4 level jumps in the 5 waveform sequences are obtained according to the waveform sequence characteristics of each of the 5 waveform sequences as shown in fig. 3D, that is: jumping to low level (first jumping) after high level lasts for T1 time, and recovering to high level after low level lasts for fixed time in T-T1 time; jumping to low level (second jump) after high level lasts for T1 time, and recovering to high level after low level lasts for fixed time in T-T1 time; jumping to low level (third jumping) after high level lasts for T1 time, and recovering to high level after low level lasts for fixed time in T-T1 time; high level for T time; the transition is low (fourth transition) and ends with high (T is the sum of the durations of low and high).
Step 302, controlling the level of the transmitting port to change according to the X level jumps in the N waveform sequences so as to transmit the data frame header.
In this step, the level of the sending port may be controlled by the main control chip or the sending chip of the data frame header sending device, and the data frame header is sent according to the X level jumps in the N waveform sequences obtained in step 301, so that the data frame header receiving device can obtain the transmission duration of one waveform sequence according to the data frame header.
In an optional implementation of this embodiment, the waveform sequence further includes: the total duration of the low level appearing in the first waveform sequence in the transmission duration is less than one half of the duration; and/or the low levels present in the third waveform sequence occupy less than half of the duration of the transmission. Under the condition that data transmission and power supply are carried out simultaneously, the shorter the total duration occupied by the low-level duration time is, the longer the power supply or power taking duration is in the data transmission process, and the higher the power supply/power taking efficiency is.
In an optional implementation of this embodiment, the waveform sequence further includes: the third waveform sequence has only one level jump from low level to high level within the transmission duration and ends with high level; the first waveform sequence starts at a high level and only one transition occurs from a high level to a low level during the transmission duration. The first waveform sequence or the third waveform sequence has only one jump within the transmission duration, the first waveform sequence or the third waveform sequence is easier to transmit and receive, the proportion of the low level in the transmission duration is lower, and the power supply/power taking efficiency is higher under the condition that data transmission and power supply are carried out simultaneously.
In an optional implementation manner of this embodiment, the N waveform sequences at least include M waveform sequences, where M is a positive integer and M is greater than or equal to 2; the M waveform sequences consist of a first waveform sequence; or, the M waveform sequences consist of a third waveform sequence; alternatively, the M waveform sequences include at least one first waveform sequence and at least one third waveform sequence. When the M waveform sequences are composed of the first or third waveform sequences, or include the first and third waveform sequences, since both the first and third waveform sequences include level hopping, the calculation of the transmission duration is simpler and faster, and the baud rate of the waveform sequence can be obtained according to the transmission duration T, i.e., the transmission parameter of the current data transmission can be obtained.
Further, when the M waveform sequences are composed of the first waveform sequence, the N waveform sequences further include: at least 1 interference rejection waveform sequence after the M waveform sequences, wherein the at least 1 interference rejection waveform sequence is a second waveform sequence or a third waveform sequence; when the M waveform sequences are composed of the third waveform sequence, the N waveform sequences further include: at least 1 interference rejection waveform sequence after the M waveform sequences, wherein the at least 1 interference rejection waveform sequence is the second waveform sequence or the first waveform sequence. When the M waveform sequences are the first waveform sequence or the third waveform sequence, in order to prevent the data receiving device from judging that the data content is misjudged by considering a plurality of continuous waveform sequences with the same level change time interval as single-frequency interference, the data sending device needs to add an anti-interference waveform sequence after the plurality of waveform sequences with the same waveform change, so that the time interval of the level change is not repeated singly, the data receiving device can identify the level change as normal data transmission instead of single-frequency interference, and the accuracy of the data transmission is improved. For example, after two consecutive first waveform sequences, the device that transmits data adds a second waveform sequence or a third waveform sequence, and the device that receives data can determine that the two consecutive first waveform sequences are normal data and are not single-frequency interference.
In an alternative embodiment of this embodiment, N is 8, and as shown in fig. 3E, the N waveform sequences are sequentially a third waveform sequence, a second waveform sequence, and a third waveform sequence. The 8 preset waveform sequences in the optional embodiment are used as data frame headers to be sent, and the receiving equipment of the data frame headers is simpler in calculation of transmission duration and calculation mode.
The data frame header sending method of this embodiment obtains N waveform sequences corresponding to a preset data frame header, obtains X level jumps in the N waveform sequences according to waveform sequence characteristics of each waveform sequence in the N waveform sequences, and controls a sending port to perform level change according to the X level jumps to send the data frame header. The device for receiving the data frame header can determine the transmission duration through the data frame header without negotiating the transmission duration before the data transmission is started, and can avoid data receiving and transmitting errors caused by different transmission durations of the two devices, thereby improving the data transmission efficiency and accuracy. In the method, the high level ratio is high, and the equipment capable of receiving data can supply power within the duration time of the high level, so that the power supply efficiency is improved.
Example 4
This embodiment provides a sending apparatus, which corresponds to the sending method of the data frame header in embodiment 3 one to one, and is not repeated herein, and only briefly described, in an optional implementation manner of this embodiment, the specific operations performed by each unit in the sending apparatus may refer to embodiment 3.
In this embodiment, the sending device may be a PC, an iPAD, a mobile phone, an electronic signature tool key, a smart card, a key that engages with a device, or the like.
Fig. 4 is a schematic structural diagram of an alternative transmitting apparatus 400 according to this embodiment, where the transmitting apparatus includes: a waveform sequence acquiring module 401 and a sending module 402, wherein:
a waveform sequence obtaining module 401, configured to obtain N waveform sequences corresponding to a preset data frame header, where N is a positive integer, and each of the N waveform sequences is one of the following: the first waveform sequence, the second waveform sequence and the third waveform sequence are characterized in that: the transmission duration of the first waveform sequence, the transmission duration of the second waveform sequence and the transmission duration of the third waveform sequence are the same, the transmission duration and the baud rate of the transmission waveform sequence are in inverse proportion, the first waveform sequence starts from a high level and jumps to a low level after lasting for a preset time and ends from the high level, wherein the total duration of the low level in the first waveform sequence within the transmission duration does not change along with the change of the baud rate of the transmission waveform sequence, the second waveform sequence continues from the high level within the transmission duration, the third waveform sequence starts from the low level and ends from the high level, and the total duration of the low level in the third waveform sequence within the transmission duration does not change along with the change of the baud rate of the transmission waveform sequence; obtaining X level jumps in the N waveform sequences according to the waveform sequence characteristics of each waveform sequence in the N waveform sequences, wherein X is a positive integer and is greater than 1, and the X level jumps from a high level jump to a low level;
a sending module 402, configured to control the level of the sending port to change according to X level jumps in the N waveform sequences obtained by the waveform sequence obtaining module 401, so as to send a header of the data frame.
In this embodiment, the sending module 402 changes according to X level jumps in the N waveform sequences obtained by the waveform sequence obtaining module 401, and sends the data frame header, so that the data frame header receiving device obtains the transmission duration of one waveform sequence according to the data frame header.
In an optional implementation of the embodiment of the present invention, the waveform sequence further comprises: the total duration of the low level appearing in the first waveform sequence in the transmission duration is less than one half of the duration; and/or the low levels present in the third waveform sequence occupy less than half of the duration of the transmission. Under the condition that data transmission and power supply are carried out simultaneously, the shorter the total duration occupied by the low-level duration time is, the longer the power supply or power taking duration is in the data transmission process, and the higher the power supply/power taking efficiency is.
In an optional implementation of the embodiment of the present invention, the waveform sequence further comprises: the third waveform sequence has only one level jump from low level to high level within the transmission duration and ends with high level; the first waveform sequence starts at a high level and only one transition occurs from a high level to a low level during the transmission duration. The first waveform sequence or the third waveform sequence has only one jump within the transmission duration, the first waveform sequence or the third waveform sequence is easier to transmit and receive, the proportion of the low level in the transmission duration is lower, and the power supply/power taking efficiency is higher under the condition that data transmission and power supply are carried out simultaneously.
In an optional implementation manner of the embodiment of the present invention, the N waveform sequences at least include M waveform sequences, where M waveform sequences are first M waveform sequences of N waveform sequences corresponding to a preset data frame header, where M is a positive integer and M is greater than or equal to 2; the M waveform sequences consist of a first waveform sequence; or, the M waveform sequences consist of a third waveform sequence; alternatively, the M waveform sequences include at least one first waveform sequence and at least one third waveform sequence. When the M waveform sequences are composed of the first or third waveform sequences, or include the first and third waveform sequences, since both the first and third waveform sequences include level hopping, the calculation of the transmission duration is simpler and faster, and the baud rate of the waveform sequence can be obtained according to the transmission duration T, i.e., the transmission parameter of the current data transmission can be obtained.
Further, when the M waveform sequences are composed of the first waveform sequence, the N waveform sequences further include: at least 1 interference rejection waveform sequence after the M waveform sequences, wherein the at least 1 interference rejection waveform sequence is a second waveform sequence or a third waveform sequence; when the M waveform sequences are composed of the third waveform sequence, the N waveform sequences further include: at least 1 interference rejection waveform sequence after the M waveform sequences, wherein the at least 1 interference rejection waveform sequence is the second waveform sequence or the first waveform sequence. When the M waveform sequences are the first waveform sequence or the third waveform sequence, in order to prevent the data receiving device from judging that the data content is misjudged by considering a plurality of continuous waveform sequences with the same level change time interval as single-frequency interference, the data sending device needs to add an anti-interference waveform sequence after the plurality of waveform sequences with the same waveform change, so that the time interval of the level change is not repeated singly, the data receiving device can identify the level change as normal data transmission instead of single-frequency interference, and the accuracy of the data transmission is improved. For example, after two consecutive first waveform sequences, the device that transmits data adds a second waveform sequence or a third waveform sequence, and the device that receives data can determine that the two consecutive first waveform sequences are normal data and are not single-frequency interference.
In an alternative implementation of the embodiment of the present invention, N is 8, and the N waveform sequences are sequentially a third waveform sequence, a second waveform sequence, and a third waveform sequence. The 8 preset waveform sequences in the optional embodiment are used as data frame headers to be sent, and the receiving equipment of the data frame headers is simpler in calculation of transmission duration and calculation mode.
In the sending apparatus of this embodiment, the waveform sequence obtaining module 401 obtains N waveform sequences corresponding to a preset data frame header, obtains X level jumps in the N waveform sequences according to waveform sequence characteristics of each waveform sequence in the N waveform sequences, and the sending port of the sending module 402 performs level change according to the X level jumps to send the data frame header. The device for receiving the data frame header can determine the transmission duration through the data frame header without negotiating the transmission duration before the data transmission is started, and can avoid data receiving and transmitting errors caused by different transmission durations of the two devices, thereby improving the data transmission efficiency and accuracy. In the method, the high level ratio is high, and the device capable of receiving data by the sending device 400 can supply power within the duration of the high level, so that the power supply efficiency is improved.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware that is related to instructions of a program, and the program may be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made in the above embodiments by those of ordinary skill in the art without departing from the principle and spirit of the present invention. The scope of the invention is defined by the appended claims and equivalents thereof.

Claims (10)

1. A method for sending a header of a data frame is characterized by comprising the following steps:
acquiring N waveform sequences corresponding to a preset data frame header, wherein N is a positive integer, and each waveform sequence in the N waveform sequences is one of the following sequences: a first waveform sequence, a second waveform sequence, and a third waveform sequence, wherein the first waveform sequence, the second waveform sequence, and the third waveform sequence have the following waveform sequence characteristics: the transmission durations of the first waveform sequence, the second waveform sequence and the third waveform sequence are the same, the transmission durations are in inverse proportion to the baud rate of the first waveform sequence, the baud rate of the second waveform sequence and the baud rate of the third waveform sequence, the first waveform sequence starts from a high level and jumps to a low level after lasting for a preset time and ends from the high level, and only one jump from the high level to the low level occurs in the transmission duration, wherein the total duration of the low level occurring in the first waveform sequence in the transmission duration does not change along with the change of the baud rate of the first waveform sequence, the second waveform sequence lasts for the high level in the transmission duration, the third waveform sequence starts from the low level and ends from the high level, level jump from low level to high level only occurs once in the transmission duration, and the total duration of the low level appearing in the third waveform sequence in the transmission duration does not change with the change of baud rate of transmitting the third waveform sequence; obtaining X level jumps in the N waveform sequences according to the waveform sequence characteristics of each waveform sequence in the N waveform sequences, wherein X is a positive integer and is greater than 1, and the X level jumps from a high level jump to a low level;
and controlling the level of the sending port to change according to X level jumps in the N waveform sequences so as to send the data frame header.
2. The method of claim 1,
the waveform sequence features further include:
the total duration of the low levels appearing in the first waveform sequence within the transmission duration is less than one-half of the duration;
and/or the presence of a gas in the gas,
the total duration of the low levels appearing in the third waveform sequence within the transmission duration is less than one-half of the duration.
3. The method according to any one of claims 1 to 2,
the N waveform sequences at least comprise M waveform sequences, and the M waveform sequences are the first M waveform sequences in the N waveform sequences, wherein M is a positive integer and is more than or equal to 2;
the M waveform sequences consist of the first waveform sequence; or, the M waveform sequences consist of the third waveform sequence; alternatively, the M waveform sequences include at least one first waveform sequence and at least one third waveform sequence.
4. The method of claim 3,
when the M waveform sequences consist of the first waveform sequence, the N waveform sequences further include: at least 1 interference rejection waveform sequence following the M waveform sequences, wherein the at least 1 interference rejection waveform sequence is the second waveform sequence or the third waveform sequence;
when the M waveform sequences consist of the third waveform sequence, the N waveform sequences further include: at least 1 interference rejection waveform sequence following the M waveform sequences, wherein the at least 1 interference rejection waveform sequence is the second waveform sequence or the first waveform sequence.
5. The method according to any one of claims 1, 2 or 4,
n =8, the N waveform sequences are, in order, the third waveform sequence, the second waveform sequence, and the third waveform sequence.
6. A transmitting apparatus, comprising:
a waveform sequence obtaining module, configured to obtain N waveform sequences corresponding to a preset data frame header, where N is a positive integer, and each of the N waveform sequences is one of the following: a first waveform sequence, a second waveform sequence, and a third waveform sequence, wherein the first waveform sequence, the second waveform sequence, and the third waveform sequence have the following waveform sequence characteristics: the transmission durations of the first waveform sequence, the second waveform sequence and the third waveform sequence are the same, the transmission durations are in inverse proportion to the baud rate of the first waveform sequence, the baud rate of the second waveform sequence and the baud rate of the third waveform sequence, the first waveform sequence starts from a high level and jumps to a low level after lasting for a preset time and ends from the high level, the first waveform sequence starts from the high level and only jumps from the high level to the low level once within the transmission duration, wherein the total duration of the low level in the first waveform sequence does not change along with the change of the baud rate of the first waveform sequence, the second waveform sequence lasts for the high level within the transmission duration, and the third waveform sequence starts from the low level, ending with a high level, wherein the third waveform sequence has only one level jump from a low level to a high level within the transmission duration and ends with the high level, and the total duration of the low level in the third waveform sequence within the transmission duration does not change with the change of the baud rate of the third waveform sequence; obtaining X level jumps in the N waveform sequences according to the waveform sequence characteristics of each waveform sequence in the N waveform sequences, wherein X is a positive integer and is greater than 1, and the X level jumps from a high level jump to a low level;
and the sending module is used for controlling the level of the sending port to change according to the X level jumps in the N waveform sequences so as to send the data frame header.
7. The apparatus of claim 6,
the waveform sequence features further include:
the total duration of the low levels appearing in the first waveform sequence within the transmission duration is less than one-half of the duration;
and/or the presence of a gas in the gas,
the total duration of the low levels appearing in the third waveform sequence within the transmission duration is less than one-half of the duration.
8. The apparatus according to any one of claims 6-7,
the N waveform sequences at least comprise M waveform sequences, and the M waveform sequences are the first M waveform sequences in the N waveform sequences corresponding to the preset data frame header, wherein M is a positive integer and is more than or equal to 2;
the M waveform sequences consist of the first waveform sequence; or, the M waveform sequences consist of the third waveform sequence; alternatively, the M waveform sequences include at least one first waveform sequence and at least one third waveform sequence.
9. The apparatus of claim 8,
when the M waveform sequences consist of the first waveform sequence, the N waveform sequences further include: at least 1 interference rejection waveform sequence following the M waveform sequences, wherein the at least 1 interference rejection waveform sequence is the second waveform sequence or the third waveform sequence;
when the M waveform sequences consist of the third waveform sequence, the N waveform sequences further include: at least 1 interference rejection waveform sequence following the M waveform sequences, wherein the at least 1 interference rejection waveform sequence is the second waveform sequence or the first waveform sequence.
10. The apparatus of any one of claims 6, 7 or 9,
n =8, the N waveform sequences are, in order, the third waveform sequence, the second waveform sequence, and the third waveform sequence.
CN201611051710.2A 2016-11-24 2016-11-24 Data frame header sending method and sending device Active CN107423248B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611051710.2A CN107423248B (en) 2016-11-24 2016-11-24 Data frame header sending method and sending device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611051710.2A CN107423248B (en) 2016-11-24 2016-11-24 Data frame header sending method and sending device

Publications (2)

Publication Number Publication Date
CN107423248A CN107423248A (en) 2017-12-01
CN107423248B true CN107423248B (en) 2020-08-21

Family

ID=60422727

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611051710.2A Active CN107423248B (en) 2016-11-24 2016-11-24 Data frame header sending method and sending device

Country Status (1)

Country Link
CN (1) CN107423248B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7070496B2 (en) 2019-04-24 2022-05-18 オムロン株式会社 Serial data communication equipment
CN115189860A (en) * 2021-04-01 2022-10-14 华为技术有限公司 Method and apparatus for data signal transmission in network device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104852430A (en) * 2015-05-05 2015-08-19 国家电网公司 PLC communication-based intelligent electric automobile charging device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102087639B (en) * 2010-11-30 2015-05-20 中兴通讯股份有限公司 Method for starting USB (Universal Serial Bus) state machine as well as terminal
CN103379397B (en) * 2012-04-26 2017-06-13 国民技术股份有限公司 Data transfer, treatment, the signal processing method based on COBBAIF and module
EP3043442A1 (en) * 2015-01-12 2016-07-13 Li, Dong-Sheng Hub having complex power converters
CN104991876B (en) * 2015-06-19 2018-11-09 福建星网锐捷网络有限公司 A kind of serial bus control method and device
CN105162471B (en) * 2015-08-24 2018-09-28 武汉瑞纳捷电子技术有限公司 A kind of Difference Manchester decoding circuit and method
CN105262489A (en) * 2015-09-01 2016-01-20 武汉瑞纳捷电子技术有限公司 Time delay circuit and time delay method for differential Manchester decoding
CN105353212B (en) * 2015-10-13 2017-12-29 珠海格力电器股份有限公司 A kind of method and device of detection signal frequency

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104852430A (en) * 2015-05-05 2015-08-19 国家电网公司 PLC communication-based intelligent electric automobile charging device

Also Published As

Publication number Publication date
CN107423248A (en) 2017-12-01

Similar Documents

Publication Publication Date Title
CN107241161B (en) Data transmission method and device
US10396921B2 (en) Multi-lane synchronization method, synchronization apparatus and system, and computer storage medium
CN109041262A (en) Data transmission method and relevant apparatus
EP3179596A1 (en) Charging method, mobile terminal, and charging device
CN106549748B (en) A kind of data transmission method and data processing equipment
CN107423248B (en) Data frame header sending method and sending device
CN105027456A (en) Methods and devices for determining a phase to which a receiver device is connected in a polyphase electric power supply system
CN112069008A (en) Equipment debugging information acquisition method and device and equipment debugging information generation method
CN103516414B (en) Diversity control method and radio communication device
CN107241162B (en) Data transmission method and device
CN107493156B (en) Transmission parameter acquisition method and terminal
CN203574663U (en) Automatic baud rate detection module
CN107453838B (en) Data frame header sending method and sending device
CN116886247B (en) Baud rate self-adaption method and device based on UART communication, UART system and medium
CN107465498B (en) Transmission parameter acquisition method and terminal
CN104682465B (en) Wireless charging device and method
CN107370565B (en) Transmission parameter adaptive data transmission method and device
CN107368446B (en) Transmission parameter adaptive data transmission method and device
CN111866723B (en) Control method and device for sharing power-assisted vehicle, electronic equipment and storage medium
WO2018095183A1 (en) Transmission parameter acquisition method and terminal
KR102557374B1 (en) Testing method and system of time parameters of adapter, computer storage medium
CN107425570B (en) Charging method, system and device of terminal equipment
CN107359963B (en) Data transmission method and terminal
CN112564820B (en) Signal receiving and transmitting method and device and electric kettle
CN112054820B (en) Method and apparatus for transmitting and receiving data using power line

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1247681

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant