CN107889100A - A kind of data communication method and data communication apparatus - Google Patents

A kind of data communication method and data communication apparatus Download PDF

Info

Publication number
CN107889100A
CN107889100A CN201710019997.9A CN201710019997A CN107889100A CN 107889100 A CN107889100 A CN 107889100A CN 201710019997 A CN201710019997 A CN 201710019997A CN 107889100 A CN107889100 A CN 107889100A
Authority
CN
China
Prior art keywords
timing
terminal
data
start time
threshold value
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.)
Pending
Application number
CN201710019997.9A
Other languages
Chinese (zh)
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.)
Tianjin Fuyue Investment Management Center (limited Partnership)
Original Assignee
Tianjin Fuyue Investment Management Center (limited Partnership)
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 Tianjin Fuyue Investment Management Center (limited Partnership) filed Critical Tianjin Fuyue Investment Management Center (limited Partnership)
Publication of CN107889100A publication Critical patent/CN107889100A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/22Processing or transfer of terminal data, e.g. status or physical capabilities
    • H04W8/24Transfer of terminal data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/12Detection or prevention of fraud

Abstract

The invention provides a kind of data communication method and data communication apparatus, this method includes:First terminal sends the first data to second terminal, and starts timing, wherein, timing start time is the completion moment for sending the first data;First terminal receives the second data that second terminal is sent, and stops timing, wherein, the second data are the processing data that second terminal is handled to obtain for the first data, and the timing stop timing is the initial time for receiving the second data;First terminal judges whether the duration T between timing start time and timing stop timing is less than predetermined threshold value TW, wherein, TW=2S/v, wherein, S is the radius of the safe range of first terminal, and v is the light velocity;Judging that T is less than TWIn the case of, parse the second data.

Description

A kind of data communication method and data communication apparatus
Technical field
The present invention relates to a kind of electronic technology field, more particularly to a kind of data communication method and data communication apparatus.
Background technology
For contactless swiping card, card reader and card are simultaneously non-contacting, but have a spacing therebetween From progress data interaction.At present there is quantum to attack such a means, because the equipment attacked with quantum is not portable enough, Therefore, equipment can be placed on them and think the place (away from by the place of object of attack) of " safety " by the hacker attacked using quantum Attacked, now, the information such as the key of card can be cracked by the attack of high speed, once the private information of card is broken Solution, so that hacker can utilize the private information centering control terminal (such as card reader, door control terminal etc.) for cracking to obtain to enter Row attack, causes certain risk.
The content of the invention
Present invention seek to address that one of above mentioned problem.
It is a primary object of the present invention to provide a kind of data communication method.
Another object of the present invention is to provide a kind of data communication apparatus.
To reach above-mentioned purpose, what technical scheme was specifically realized in:
One aspect of the present invention provides a kind of data communication method, including:First terminal sends the first number to second terminal According to, and start timing, wherein, timing start time stops timing to send the completion moment of the first data, wherein, second Data are the processing data that second terminal is handled to obtain for the first data, and the timing stop timing is the second data of reception Initial time;First terminal judges whether the duration T between timing start time and timing stop timing is less than default threshold Value TW, wherein, TW=2S/v, wherein, S is the radius of the safe range of first terminal, and v is the light velocity;Judging that T is less than TWFeelings Under condition, the second data are parsed.
Alternatively, judging that T is not less than TWIn the case of, abandon the second data.
Alternatively, before first terminal sends the first data to second terminal, method also includes:First terminal obtains current The safe range of application environment, according to safe range, the predetermined threshold value T of calculating current application environmentW
Alternatively, during the entire process of first terminal communicates with second terminal, first terminal sends carrier signal all the time; Duration T includes:The cycle for the carrier signal that n first terminal is sent from timing start time to the timing stop timing;Or The pulse for the carrier signal that n first terminal of person is sent from timing start time to the timing stop timing, n are rational.
Alternatively, predetermined threshold value TWIncluding:The cycle of N number of carrier signal;Or the pulse of N number of carrier signal, N are reasonable Number;First terminal judges whether the duration T between timing start time and timing stop timing is less than predetermined threshold value TWBag Include:First terminal judges whether n is less than N.
Alternatively, during the entire process of first terminal communicates with second terminal, first terminal sends carrier signal all the time; Duration T includes:Phase of the carrier signal in the first phase and the second phase in the timing stop timing of timing start time Potential difference.
Alternatively, predetermined threshold value TWIncluding:Default phase difference;First terminal judges that timing start time stops with timing Whether the duration T between the moment is less than predetermined threshold value TWIncluding:First terminal judges the phase of first phase and second phase Whether potential difference is less than default phase difference.
Alternatively, first terminal is reading device, and second terminal is answering device.
Another aspect of the present invention provides a kind of data communication apparatus, positioned at first terminal, including:Sending module, it is used for The first data are sent to second terminal;Timing module, for starting timing in timing start time, wherein, timing start time To send the completion moment of the first data;Receiving module, for receiving the second data of second terminal transmission, wherein, the second number According to the processing data for being handled to obtain for the first data for second terminal;Timing module, it is additionally operable in the timing stop timing Stop timing, wherein, the timing stop timing is the initial time for receiving the second data;Judge module, for judging that timing starts Whether the duration T between moment and timing stop timing is less than predetermined threshold value TW, wherein, TW=2S/v, wherein, S first The radius of the safe range of terminal, v are the light velocity;Execution module, for judging that T is less than T in judge moduleWIn the case of, parsing Second data.
Alternatively, execution module is additionally operable to judge that T is not less than T in judge moduleWIn the case of, abandon the second data.
Alternatively, device also includes:Setup module, for sending module to second terminal send the first data before, The radius S of the safe range of current application environment is obtained, according to the radius S of safe range, calculates the default of current application environment Threshold value TW
Alternatively, it is characterised in that sending module, be additionally operable to during the entire process of being communicated with second terminal, send out all the time Send carrier signal;Timing module, for calculating the cycle of the carrier signal sent from timing start time to the timing stop timing Quantity n;Or it is reasonable to calculate the quantity n, n of the pulse of carrier signal sent from timing start time to the timing stop timing Number.
Alternatively, predetermined threshold value TWIncluding:The cycle of N number of carrier signal;Or the pulse of N number of carrier signal, N are reasonable Number;Judge module judges whether the duration T between timing start time and timing stop timing is less than in the following manner Predetermined threshold value TWIncluding:Judge whether n is less than N.
Alternatively, sending module, it is additionally operable to during the entire process of being communicated with second terminal, sends carrier signal all the time; Timing module is used to calculate first phase of the carrier signal in timing start time and the second phase in the timing stop timing Phase difference.
Alternatively, predetermined threshold value TWIncluding:Default phase difference;When judge module judges that timing starts in the following manner Whether the duration T carved between the timing stop timing is less than predetermined threshold value TWIncluding:Judge first phase and second phase Phase difference whether be less than default phase difference.
As seen from the above technical solution provided by the invention, the invention provides a kind of data communication method and data Communication device, in the technical scheme that the present embodiment provides, according to the safe range of first terminal, with the transmission speed of light (i.e. The maximal rate that nature object moves in atmosphere) to refer to, it is counter to push away data from first terminal to second terminal again from second Terminal returns to the time required for first terminal, using the time value as predetermined threshold value, as long as stopping from timing start time with timing Only the duration T between the moment is less than the predetermined threshold value, then estimates second terminal in the safe range of first terminal.Due to In actual applications, user can determine can't there is attack device (scope in much scopes of first terminal completely It is referred to as the safe range of first terminal in the present embodiment), and do not have the transmission speed higher than the light velocity in nature, because This, if the data sending terminal of the second data returned outside safe range, then when stopping from timing start time and timing Duration T between quarter is bound to be more than the predetermined threshold value, so as to realize the absolute control to communication security.Further, since The safe range of first terminal is far longer than first terminal and the communication distance of second terminal in actual applications, therefore, presets Threshold value can ensure first terminal and data processing time needed for second terminal completely, can meet first terminal and second terminal Between normal data communication.
Brief description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, required use in being described below to embodiment Accompanying drawing be briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for this For the those of ordinary skill in field, on the premise of not paying creative work, other can also be obtained according to these accompanying drawings Accompanying drawing.
Fig. 1 is the flow chart for the data communication method that the embodiment of the present invention 1 provides;
Fig. 2 is the structural representation for the data communication apparatus that the embodiment of the present invention 2 provides.
Embodiment
With reference to the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Ground describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.Based on this The embodiment of invention, the every other implementation that those of ordinary skill in the art are obtained under the premise of creative work is not made Example, belongs to protection scope of the present invention.
In the description of the invention, it is to be understood that term " first ", " second " are only used for describing purpose, and can not It is interpreted as indicating or implies relative importance or quantity or position.
The embodiment of the present invention is described in further detail below in conjunction with accompanying drawing.
Embodiment 1
Fig. 1 is the flow chart according to a kind of data communication method of the embodiment of the present invention 1.Referring to Fig. 1, this method is at least wrapped Step S20 is included to step S80.
Step S20, first terminal send the first data to second terminal, and start timing, wherein, timing start time is Send the completion moment of first data.
In the present embodiment, communication, alternatively, first terminal can be used between first terminal and second terminal Short distance communication is used with second terminal.For example, communication mode between first terminal and second terminal can at least include with It is one of lower:NFC (Near Field Communication, near-field communication), Wi-Fi (Wireless Fidelity, wireless height Fidelity), UWB (UltraWideband, ultra wide band), Zigbee, RFID (Radio Frequency Identification, nothing Line radio frequency identification), Infrared Transmission and bluetooth.Therefore, the communication distance between first terminal and second terminal may be as little to several lis Hundreds of meters of meter Chang Zhi.Based on above-mentioned short-distance wireless communication mode, corresponding to different communication modes, first terminal and second is eventually Corresponding communications protocol can also be used by being communicated between end, to realize wireless data transmission between the two.Wherein, can as one kind The embodiment of choosing, first terminal include reading device, and second terminal includes answering device, and reading device and answering device can be with To support the terminal of contactless card-reading mode, for example, reading device can be POS, ATM, identity card reader etc. The terminal of card reader class, answering device can be intelligent cipher key equipment (such as industrial and commercial bank's U-shield, agricultural bank Key are precious), smart card, identity card Etc. terminal, using the terminal of above-mentioned contactless card-reading mode, as between card reader and smart card, card reader and identity card it Between can be carried out data transmission using agreement ISO14443 and ISO15693, short-distance wireless communication mode can include: The communication mode that ISO14443 and ISO15693 agreements are supported;In addition, reading device and answering device can also be mobile terminal, PC, palm PC, smart machine etc. support the terminal of short-distance wireless communication mode.
In this step, as an alternative embodiment, first terminal is sent to the first data of second terminal extremely Pending data can be included less.Using first terminal as card reader, second terminal be smart card exemplified by, wait to locate in the first data It can be Card Reader request data to manage data, and certainly, the pending data in the first data is not limited to this, with first terminal and the Exemplified by two terminals are mobile terminal, the pending data in the first data can also be ask second terminal to return to picture please Seek data etc., the present embodiment is not limited excessively the pending data in the first data, as long as first terminal to The request data that second terminal is initiated.
Step S40, first terminal receives the second data that second terminal is sent, and stops timing, wherein, second number According to the processing data for being handled to obtain for first data for the second terminal, the timing stop timing is described in reception The initial time of second data.
In the present embodiment, the second data that first terminal receives are that second terminal for the first data handle The processing data arrived, rather than other instructions that second terminal is sent, using second terminal as smart card, first terminal is card reader Exemplified by, the second data can be the data content for the smart card that first terminal request is read, equal with second terminal with first terminal Exemplified by mobile terminal, the pending data in the first data is the data of request picture, and the second data are image data.By In the second data be the second terminal processing data that is handled to obtain to the first data, rather than other instructions, so as to Prevent to attack equipment forgery second terminal to first terminal transmission delay instruction etc., and then cause attack equipment to win time misfortune That holds second terminal transmission is handled the first data obtained processing data, and is returned to after being distorted to processing data First terminal.
Due to timing start time to send the completion moment of first data, timing finish time is receives described the Carved at the beginning of two data, when volume of transmitted data is larger, first terminal, which sends data, needs the relatively long time, and second eventually End is also required to the long period in reception data, and therefore, timing start time picks to send during the completion moment of first data Except the time that data are sent, timing finish time is to carve also to eliminate data receiver at the beginning of receiving second data Time, so that T is less than predetermined threshold value TWInterior reception data.
Step 40, first terminal judges whether the duration T between timing start time and timing stop timing is less than Predetermined threshold value TW, wherein, TW=2S/v, wherein, S is the radius of the safe range of the first terminal, and v is the light velocity.
In the technical scheme that the present embodiment provides, according to the safe range of first terminal, with the transmission speed of light (i.e. oneself The maximal rate that right boundary object moves in atmosphere) to refer to, it is counter to push away data from first terminal to second terminal again from the second end End returns to the time required for first terminal, using the time value as predetermined threshold value, as long as stopping from timing start time and timing Duration T between moment is less than the predetermined threshold value, then estimates second terminal in the safe range of first terminal.Due to In practical application, user can determine in much scopes of first terminal can't to have attack device that (scope exists completely The present embodiment is referred to as the safe range of first terminal), and do not have the transmission speed higher than the light velocity in nature, because This, if the data sending terminal of the second data returned outside safe range, then when stopping from timing start time and timing Duration T between quarter is bound to be more than the predetermined threshold value, so as to realize the absolute control to communication security.
For example, at the gate inhibition at the gate of certain unit, by artificially or by instrument etc., it is ensured that 30 meters of models at gate Be not in have attack device in enclosing, therefore, the radius of the safe range of access-control card reader can be arranged to 30 meters, Jin Erke With the obtained microsecond of predetermined threshold value 0.1, as long as the duration T between timing start time and timing stop timing is more than 0.1 microsecond, then illustrate that the transmitting terminal (i.e. second terminal) of the second data is located at outside the safe range of first terminal, may be to attack Equipment is hit, first terminal abandons the second data.Further, since in actual applications, between access-control card reader and access card away from From far smaller than with a distance from this, generally only several millimeters, therefore, data snap into gate inhibition from gate inhibition again from access-control card reader to access card The transmission time of card reader is far smaller than 0.1 microsecond, then the additional time can reach completely access card handle the first data simultaneously The second data are obtained, therefore, the method provided by the present embodiment, you can to ensure that access-control card reader can be carried out with access card Normal communication, attack equipment can be avoided to attack first terminal again, realized to the absolute of the communication security of first terminal Control.
In an optional embodiment of the embodiment of the present invention, first terminal can be according to the safety of current application environment Scope, the predetermined threshold value T of current application environment is setW.In the optional embodiment, sent in first terminal to second terminal Before first data, methods described also includes:The first terminal obtains the safe range of current application environment, according to the peace Gamut, calculate the predetermined threshold value T of current application environmentW.In a particular application, user can pass through the outer of first terminal If for example, keyboard, the radius S of safe range is inputted, or, can also be by the communication interface of first terminal to first terminal The radius S of the safe range of current application environment is sent, first terminal is according to TW=2S/v, wherein, v is the light velocity, is calculated pre- If threshold value TW.Or user can be by the peripheral hardware of first terminal, for example, keyboard, is directly inputted corresponding to current application environment Predetermined threshold value TW, or, it can also be sent by the communication interface of first terminal to first terminal corresponding to current application environment Predetermined threshold value TW.By the optional embodiment, first terminal can be when application environment changes, corresponding change predetermined threshold value TW, extend the application scenarios of first terminal.
Step S80, judging that the T is less than the TWIn the case of, parse second data.
In the technical scheme that the present embodiment provides, only between timing start time and the timing stop timing Duration T is less than TWIn the case of, first terminal just parses second data, i.e. first terminal is only less than in the T The TWIn the case of, just receive the second data of second terminal return, sent out with the equipment outside safe range to first terminal Send dangerous caused by the second data.
In an optional embodiment of the embodiment of the present invention, if timing start time and the timing stop timing Between duration T be not less than TW, then first terminal abandons the second data, also, in order to be further ensured that safety, first eventually The communication that holding can also disconnect with second terminal is connected.
In an optional embodiment of the embodiment of the present invention, first terminal was calculated from timing start time and the meter When the stop timing between duration T, can be calculated by the internal clocking crystal oscillator of first terminal, in this case, Predetermined threshold value TWValue be also to be represented by internal clocking crystal oscillator, in step S60, first terminal judges whether T value small In TWValue.In this kind of optional embodiment, first terminal can set a timer, support accurate clocking capability, can The duration T obtained during passing through timer.Timing precision is determined by the clock accuracy of first terminal.
In embodiments of the present invention, data transfer can be by being loaded into carrier signal between first terminal and second terminal Upper transmission, during the entire process of first terminal communicates with second terminal, first terminal sends carrier signal all the time, therefore, this Propose different with clock timing timing statistical in embodiment, the present embodiment can also be by calculating week of carrier signal Phase number, pulse number and phase difference count the numerical value that timing obtains.
In an optional embodiment of the embodiment of the present invention, duration T includes:N first terminals are from institute State the cycle for the carrier signal that timing start time sends to the timing stop timing;Or n first terminals are from institute The pulse for the carrier signal that timing start time sends to the timing stop timing is stated, the n is rational.That is first terminal Calculate the number of cycles n of carrier signal sent from the timing start time to the timing stop timing, or from the meter When the pulse number n of carrier signal that is sent to the timing stop timing of start time.Obtaining number of cycles n or pulse After number n, first terminal can be by the frequency of carrier signal of first terminal, corresponding to calculating cycle number n or pulse number n Time, by the time and predetermined threshold value TwIt is compared.Or alternatively, the first terminal fixed for frequency of carrier signal, Can be by predetermined threshold value TwNumber of cycles N or pulse number N is converted to, directly judges whether n is less than N in step S60, so as to Judge whether duration T is less than predetermined threshold value TW
In the above-described embodiment, calculate carrier signal pulse number count carrier signal peak value number, phase Than the mode of the number of cycles in above-mentioned calculating carrier signal, statistics pulse number can reach the effect further accurately counted Fruit.
In another optional embodiment of the embodiment of the present invention, duration T includes:The carrier signal is described The phase difference of the first phase of timing start time and the second phase in the timing stop timing.In the optional embodiment In, after the phase difference between first phase and second phase is obtained, first terminal can be believed by the carrier wave of first terminal Number frequency, phase difference between first phase and second phase corresponding time is calculated, by the time and predetermined threshold value TwCarry out Compare.Or alternatively, the first terminal fixed for frequency of carrier signal can be by predetermined threshold value TwBe converted to default Phase difference, directly judges whether the phase difference between first phase and second phase is less than default phase difference in step S60, So as to judge whether duration T is less than predetermined threshold value TW
Exemplified by terminal in a manner of supporting NFC communication, the working frequency of first terminal and second terminal is 13.56MHz, In first terminal and second terminal communication process, first terminal (such as card reader) produces 13.56MHz carrier wave, carrier wave all the time Time cycle be fixed, T=1/13.56MHz, be approximately equal to 74ns, phase is can to carry out angle of a cycle in 2 π Division, timing is counted with phase, unit can be as accurate as 74/2 π ns, compared to the number of cycles of above-mentioned statistics carrier signal And the mode of pulse number, statistics phase difference can reach the effect further accurately counted.Although the optional embodiment Carried out only in a manner of NFC communication for example, but other communication modes belong to the scope of protection of the invention.
In the technical scheme that the present embodiment provides, according to the safe range of first terminal, with the transmission speed of light (i.e. oneself The maximal rate that right boundary object moves in atmosphere) to refer to, it is counter to push away data from first terminal to second terminal again from the second end End returns to the time required for first terminal, using the time value as predetermined threshold value, as long as stopping from timing start time and timing Duration T between moment is less than the predetermined threshold value, then estimates second terminal in the safe range of first terminal.Due to In practical application, user can determine in much scopes of first terminal can't to have attack device that (scope exists completely The present embodiment is referred to as the safe range of first terminal), and do not have the transmission speed higher than the light velocity in nature, because This, if the data sending terminal of the second data returned outside safe range, then when stopping from timing start time and timing Duration T between quarter is bound to be more than the predetermined threshold value, so as to realize the absolute control to communication security.Further, since The safe range of first terminal is far longer than first terminal and the communication distance of second terminal in actual applications, therefore, presets Threshold value can ensure first terminal and data processing time needed for second terminal completely, can meet first terminal and second terminal Between normal data communication.
Embodiment 2
Based on same inventive concept, the embodiment of the present invention also provides a kind of data communication apparatus, and the device is whole positioned at first End.The data communication apparatus can use the method for implementing 1 to carry out data communication.Can only the data communication apparatus in the present embodiment Structure and the functions of modules be described, other details may be referred to embodiment 1, will not be repeated here.
As shown in Fig. 2 the data communication apparatus includes:Sending module 401, for sending the first data to second terminal; Timing module 402, for starting timing in timing start time, wherein, timing start time is the completion for sending the first data Moment;Receiving module 403, for receiving the second data of second terminal transmission, wherein, the second data are second terminal for the One data are handled obtained processing data;Timing module 402, it is additionally operable to stop timing in the timing stop timing, wherein, meter When the stop timing for receive the second data initial time;Judge module 404, for judging that timing start time stops with timing Whether the duration T between the moment is less than predetermined threshold value TW, wherein, TW=2S/v, wherein, S is the safe range of first terminal Radius, v is the light velocity;Execution module 404, for judging that T is less than T in judge module 404WIn the case of, parse the second data.
In the data communication apparatus that the present embodiment provides, according to the safe range of first terminal, with the transmission speed of light (i.e. The maximal rate that nature object moves in atmosphere) to refer to, it is counter to push away data from first terminal to second terminal again from second Terminal returns to the time required for first terminal, using the time value as predetermined threshold value, as long as stopping from timing start time with timing Only the duration T between the moment is less than the predetermined threshold value, then estimates second terminal in the safe range of first terminal.Due to In actual applications, user can determine can't there is attack device (scope in much scopes of first terminal completely It is referred to as the safe range of first terminal in the present embodiment), and do not have the transmission speed higher than the light velocity in nature, because This, if the data sending terminal of the second data returned outside safe range, then when stopping from timing start time and timing Duration T between quarter is bound to be more than the predetermined threshold value, so as to realize the absolute control to communication security.Further, since The safe range of first terminal is far longer than first terminal and the communication distance of second terminal in actual applications, therefore, presets Threshold value can ensure first terminal and data processing time needed for second terminal completely, can meet first terminal and second terminal Between normal data communication.
In an optional embodiment of the embodiment of the present invention, execution module 404 is additionally operable to judge in judge module 404 T is not less than TWIn the case of, abandon the second data.Alternatively,
In an optional embodiment of the embodiment of the present invention, data communication apparatus can also include:Setup module, use In before sending module 401 sends the first data to second terminal, the radius S of the safe range of current application environment is obtained, According to the radius S of safe range, the predetermined threshold value T of calculating current application environmentW
In an optional embodiment of the embodiment of the present invention, sending module 401, it is additionally operable to communicate with second terminal During the entire process of, carrier signal is sent all the time;Timing module 402, when stopping for calculating from timing start time to timing Carve the amount of cycles n of the carrier signal sent;Or calculate the carrier wave letter sent from timing start time to the timing stop timing Number the quantity n, n of pulse be rational.
In an optional embodiment of the embodiment of the present invention, predetermined threshold value TWIncluding:The cycle of N number of carrier signal; Or the pulse of N number of carrier signal, N are rational;Judge module 404 judges timing start time and timing in the following manner Whether the duration T between the stop timing is less than predetermined threshold value TWIncluding:Judge whether n is less than N.
In an optional embodiment of the embodiment of the present invention, sending module 401, it is additionally operable to communicate with second terminal During the entire process of, carrier signal is sent all the time;Timing module 402 is used to calculate carrier signal the first of timing start time The phase difference of phase and the second phase in the timing stop timing.
In an optional embodiment of the embodiment of the present invention, predetermined threshold value TWIncluding:Default phase difference;Judge mould Block 404 judges whether the duration T between timing start time and timing stop timing is less than default threshold in the following manner Value TWIncluding:Judge whether the phase difference of first phase and second phase is less than default phase difference.Pass through the optional embodiment party Formula, the precision of timing can be improved.
In the technical scheme that the present embodiment provides, according to the safe range of first terminal, with the transmission speed of light (i.e. oneself The maximal rate that right boundary object moves in atmosphere) to refer to, it is counter to push away data from first terminal to second terminal again from the second end End returns to the time required for first terminal, using the time value as predetermined threshold value, as long as stopping from timing start time and timing Duration T between moment is less than the predetermined threshold value, then estimates second terminal in the safe range of first terminal.Due to In practical application, user can determine in much scopes of first terminal can't to have attack device that (scope exists completely The present embodiment is referred to as the safe range of first terminal), and do not have the transmission speed higher than the light velocity in nature, because This, if the data sending terminal of the second data returned outside safe range, then when stopping from timing start time and timing Duration T between quarter is bound to be more than the predetermined threshold value, so as to realize the absolute control to communication security.Further, since The safe range of first terminal is far longer than first terminal and the communication distance of second terminal in actual applications, therefore, presets Threshold value can ensure first terminal and data processing time needed for second terminal completely, can meet first terminal and second terminal Between normal data communication.
Any process or method described otherwise above description in flow chart or herein is construed as, and represents to include Module, fragment or the portion of the code of the executable instruction of one or more the step of being used to realize specific logical function or process Point, and the scope of the preferred embodiment of the present invention includes other realization, wherein can not press shown or discuss suitable Sequence, including according to involved function by it is basic simultaneously in the way of or in the opposite order, carry out perform function, this should be of the invention Embodiment person of ordinary skill in the field understood.
It should be appreciated that each several part of the present invention can be realized with hardware, software, firmware or combinations thereof.Above-mentioned In embodiment, software that multiple steps or method can be performed in memory and by suitable instruction execution system with storage Or firmware is realized.If, and in another embodiment, can be with well known in the art for example, realized with hardware Any one of row technology or their combination are realized:With the logic gates for realizing logic function to data-signal Discrete logic, have suitable combinational logic gate circuit application specific integrated circuit, programmable gate array (PGA), scene Programmable gate array (FPGA) etc..
Those skilled in the art are appreciated that to realize all or part of step that above-described embodiment method carries Suddenly it is that by program the hardware of correlation can be instructed to complete, described program can be stored in a kind of computer-readable storage medium In matter, the program upon execution, including one or a combination set of the step of embodiment of the method.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing module, can also That unit is individually physically present, can also two or more units be integrated in a module.Above-mentioned integrated mould Block can both be realized in the form of hardware, can also be realized in the form of software function module.The integrated module is such as Fruit is realized in the form of software function module and as independent production marketing or in use, can also be stored in a computer In read/write memory medium.
Storage medium mentioned above can be read-only storage, disk or CD etc..
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show The description of example " or " some examples " etc. means specific features, structure, material or the spy for combining the embodiment or example description Point is contained at least one embodiment or example of the present invention.In this manual, to the schematic representation of above-mentioned term not Necessarily refer to identical embodiment or example.Moreover, specific features, structure, material or the feature of description can be any One or more embodiments or example in combine in an appropriate manner.
Although embodiments of the invention have been shown and described above, it is to be understood that above-described embodiment is example Property, it is impossible to limitation of the present invention is interpreted as, one of ordinary skill in the art is not departing from the principle and objective of the present invention In the case of above-described embodiment can be changed within the scope of the invention, change, replace and modification.The scope of the present invention By appended claims and its equivalent limit.

Claims (15)

  1. A kind of 1. data communication method, it is characterised in that including:
    First terminal sends the first data to second terminal, and starts timing, wherein, timing start time is transmission described first The completion moment of data;
    The first terminal receives the second data that the second terminal is sent, and stops timing, wherein, second data are The processing data that the second terminal is handled to obtain for first data, timing stop timing are reception described second The initial time of data;
    The first terminal judges whether the duration T between the timing start time and the timing stop timing is less than Predetermined threshold value TW, wherein, the TW=2S/v, wherein, the S is the radius of the safe range of the first terminal, and the v is The light velocity;
    Judging that the T is less than the TWIn the case of, parse second data.
  2. 2. according to the method for claim 1, it is characterised in that judging that the T is not less than the TWIn the case of, abandon Second data.
  3. 3. method according to claim 1 or 2, it is characterised in that first terminal to second terminal send the first data it Before, methods described also includes:The first terminal obtains the safe range of current application environment, according to the safe range, meter Calculate the predetermined threshold value T of current application environmentW
  4. 4. according to the method described in any one of claims 1 to 3, it is characterised in that
    During the entire process of the first terminal communicates with the second terminal, the first terminal sends carrier wave letter all the time Number;
    The duration T includes:The n first terminals are sent from the timing start time to the timing stop timing Carrier signal cycle;Or the n first terminals are sent from the timing start time to the timing stop timing Carrier signal pulse, the n is rational.
  5. 5. according to the method for claim 4, it is characterised in that
    The predetermined threshold value TWIncluding:The cycle of N number of carrier signal;Or the pulse of N number of carrier signal, the N are Rational;
    The first terminal judges whether the duration T between the timing start time and the timing stop timing is less than Predetermined threshold value TWIncluding:The first terminal judges whether the n is less than the N.
  6. 6. according to the method described in any one of claims 1 to 3, it is characterised in that
    During the entire process of the first terminal communicates with the second terminal, the first terminal sends carrier wave letter all the time Number;
    The duration T includes:The carrier signal the timing start time first phase with stopping in the timing The only phase difference of the second phase at moment.
  7. 7. method according to claim 6, it is characterised in that
    The predetermined threshold value TWIncluding:Default phase difference;
    The first terminal judges whether the duration T between the timing start time and the timing stop timing is less than Predetermined threshold value TWIncluding:Whether the first terminal judges the first phase with the phase difference of the second phase less than described Default phase difference.
  8. 8. according to the method described in any one of claim 1 to 7, it is characterised in that
    The first terminal is reading device, and the second terminal is answering device.
  9. A kind of 9. data communication apparatus, positioned at first terminal, it is characterised in that including:
    Sending module, for sending the first data to second terminal;
    Timing module, for starting timing in timing start time, wherein, the timing start time counts to send described first According to the completion moment;
    Receiving module, the second data sent for receiving the second terminal, wherein, second data are described second whole The processing data that end is handled to obtain for first data;
    The timing module, it is additionally operable to stop timing in the timing stop timing, wherein, the timing stop timing is described in reception The initial time of second data;
    Judge module, for judging whether the duration T between the timing start time and the timing stop timing is small In predetermined threshold value TW, wherein, the TW=2S/v, wherein, the S be the first terminal safe range radius, the v For the light velocity;
    Execution module, for judging that the T is less than the T in the judge moduleWIn the case of, parse second data.
  10. 10. device according to claim 9, it is characterised in that the execution module is additionally operable to sentence in the judge module The T that breaks is not less than the TWIn the case of, abandon second data.
  11. 11. the device according to claim 9 or 10, it is characterised in that described device also includes:
    Setup module, for before the sending module sends the first data to second terminal, obtaining current application environment The radius S of safe range, according to the radius S of the safe range, the predetermined threshold value T of calculating current application environmentW
  12. 12. according to the device described in any one of claim 9 to 11, it is characterised in that
    The sending module, it is additionally operable to during the entire process of being communicated with the second terminal, sends carrier signal all the time;
    The timing module, for calculating the carrier signal sent from the timing start time to the timing stop timing Amount of cycles n;Or calculate the pulse of the carrier signal sent from the timing start time to the timing stop timing Quantity n, the n are rational.
  13. 13. device according to claim 12, it is characterised in that
    The predetermined threshold value TWIncluding:The cycle of N number of carrier signal;Or the pulse of N number of carrier signal, the N are Rational;
    The judge module judges to continue between the timing start time and the timing stop timing in the following manner Whether time T is less than predetermined threshold value TWIncluding:Judge whether the n is less than the N.
  14. 14. according to the device described in any one of claim 9 to 11, it is characterised in that
    The sending module, it is additionally operable to during the entire process of being communicated with the second terminal, sends carrier signal all the time;
    The timing module is used to calculate the carrier signal in the first phase of the timing start time and in the timing The phase difference of the second phase of stop timing.
  15. 15. according to claim 14 described device, it is characterised in that
    The predetermined threshold value TWIncluding:Default phase difference;
    The judge module judges to continue between the timing start time and the timing stop timing in the following manner Whether time T is less than predetermined threshold value TWIncluding:Judge whether the first phase and the phase difference of the second phase are less than institute State default phase difference.
CN201710019997.9A 2016-09-30 2017-01-11 A kind of data communication method and data communication apparatus Pending CN107889100A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610876582 2016-09-30
CN2016108765829 2016-09-30

Publications (1)

Publication Number Publication Date
CN107889100A true CN107889100A (en) 2018-04-06

Family

ID=61780416

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710019997.9A Pending CN107889100A (en) 2016-09-30 2017-01-11 A kind of data communication method and data communication apparatus

Country Status (1)

Country Link
CN (1) CN107889100A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101504462A (en) * 2008-02-04 2009-08-12 深圳市博时雅科技有限公司 Phase difference detection method and system, double-crystal oscillation mixer circuit and distance measurement apparatus
CN102497645A (en) * 2011-10-28 2012-06-13 深圳市新国都技术股份有限公司 Method for preventing illegal relocation and communication transmission and device utilizing same
CN102754106A (en) * 2009-12-23 2012-10-24 原子能和辅助替代能源委员会 Method of protection in a contactless radiofrequency communication
CN104821945A (en) * 2015-04-30 2015-08-05 南京邮电大学 Defensive system of relay attack of near-field mobile payment and realization method thereof
CN105956844A (en) * 2016-03-18 2016-09-21 李明 Payment method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101504462A (en) * 2008-02-04 2009-08-12 深圳市博时雅科技有限公司 Phase difference detection method and system, double-crystal oscillation mixer circuit and distance measurement apparatus
CN102754106A (en) * 2009-12-23 2012-10-24 原子能和辅助替代能源委员会 Method of protection in a contactless radiofrequency communication
CN102497645A (en) * 2011-10-28 2012-06-13 深圳市新国都技术股份有限公司 Method for preventing illegal relocation and communication transmission and device utilizing same
CN104821945A (en) * 2015-04-30 2015-08-05 南京邮电大学 Defensive system of relay attack of near-field mobile payment and realization method thereof
CN105956844A (en) * 2016-03-18 2016-09-21 李明 Payment method and system

Similar Documents

Publication Publication Date Title
EP2770782B1 (en) Wireless data communication
EP3058792B1 (en) Wireless protocol message conversion method and corresponding device
CN104702411B (en) Have the token design method of mobile payment security certification and mobile phone loss alarm concurrently
JP5903442B2 (en) Communications system
EP2725834A1 (en) Method for providing a device ID of a short distance communication device to an authentication process, computer programme at short distance communication receiver
Umar et al. Performance variation in host-based card emulation compared to a hardware security element
KR101998543B1 (en) Data communication method and data communication system
US10979899B2 (en) Data communication method and system
US20170127225A1 (en) Systems and methods for distance bounding using near field communication
EP1877952B1 (en) Circuit for a communication device and method of controlling a transmission
EP3122084A1 (en) Mobile communication device supported by a cloud-based computer system
KR102188691B1 (en) Systems and methods for determining an upper limit on the distance between devices
US8588743B2 (en) Communication device and communication system
CN107889100A (en) A kind of data communication method and data communication apparatus
CN107689946B (en) Data communication method and data communication system
CN107889099A (en) A kind of data communication method and data communication apparatus
CN107688760B (en) Data communication method and data communication system
CN107659341B (en) Near field communication-type B device
Bozdogan et al. Layered model architecture for internet of things
Kortvedt Securing near field communication
Celiano Overclocking proximity checks in contactless smartcards
CN107688749B (en) Secure communication method and system
CN107852586A (en) Controlled using the electronic access in intermediate layer
EP3300042B1 (en) A mobile terminal
CN105321220A (en) Small-range bluetooth terminal counter and counting method thereof

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180406