CN108573158A - A kind of data communications method and system - Google Patents

A kind of data communications method and system Download PDF

Info

Publication number
CN108573158A
CN108573158A CN201710137023.0A CN201710137023A CN108573158A CN 108573158 A CN108573158 A CN 108573158A CN 201710137023 A CN201710137023 A CN 201710137023A CN 108573158 A CN108573158 A CN 108573158A
Authority
CN
China
Prior art keywords
data
level signal
terminal
timing
edge
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.)
Granted
Application number
CN201710137023.0A
Other languages
Chinese (zh)
Other versions
CN108573158B (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
李明
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 李明 filed Critical 李明
Priority to CN201710137023.0A priority Critical patent/CN108573158B/en
Publication of CN108573158A publication Critical patent/CN108573158A/en
Application granted granted Critical
Publication of CN108573158B publication Critical patent/CN108573158B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/606Protecting data by securing the transmission between two devices or processes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/44Program or device authentication
    • G06F21/445Program or device authentication by mutual authentication, e.g. between devices or programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computing Systems (AREA)
  • Dc Digital Transmission (AREA)
  • Communication Control (AREA)

Abstract

A kind of data communications method of present invention offer and system, this method include:First terminal when the edge variation of level signal meets timing trigger condition at the first wired communication interface, starts the first timing during sending the level signal of the first data;The first data of second terminal pair are handled to obtain the second data;First terminal generates the level signal of third data when the first timing reaches specified value;First terminal when the edge variation of level signal meets timing trigger condition at the first wired communication interface, starts the second timing during sending the level signal of third data;Second terminal treats signing messages and signs, and obtains signed data;Second terminal sends the level signal of the 4th data;First terminal obtains the second time value;Sign test operation is carried out to signed data, whether value and the second time value at the first time are matched and verified, if sign test by and verification pass through, it is determined that the second data are secure data.

Description

A kind of data communications method and system
Technical field
The present invention relates to a kind of electronic technology field more particularly to a kind of data communications method and systems.
Background technology
When electronic signature equipment is communicated with host equipment (such as PC equipment, mobile device etc.), host equipment is to electronics label Name equipment sends pending data, and electronic signature equipment receives the pending data, and carries out corresponding position to the pending data After reason, data after being handled, data after electronic signature equipment is handled to host equipment transmission, according to existing communication protocol, If host equipment receives data after processing within the defined stand-by period, then it is assumed that the data received are normal data, and after Continue subsequent operation (for example, transactional operation, Authorized operation etc.).
However, if between electronic signature equipment and host equipment into row data communication when, third party's illegality equipment is long-range The data that the two is transmitted are kidnapped, and invalid data is obtained after being forwarded or distorting equal illegal operations, as long as can be existing Invalid data is returned into host equipment in stand-by period as defined in communication protocol, host equipment still believes that the illegal number of reception It according to for normal data, and will continue to carry out subsequent operation using the invalid data, affect the safety of subsequent operation.And it uses The prior art can not ensure the safety of data transmission, and illegal number also can not be effectively identified after remote data has occurred and kidnaps According to.
Invention content
Present invention seek to address that the above problem.
The main purpose of the present invention is to provide a kind of data communications methods, including:The first terminal generates the first number According to level signal, and send by first wired communication interface level signal of first data;Described first eventually It holds during sending the level signal of first data, detects the side of level signal at first wired communication interface Start first when the edge variation of level signal meets timing trigger condition at first wired communication interface along variation Timing;The second terminal receives the level signal of first data by second wired communication interface, to described One data are handled to obtain the second data;The first terminal generates third when first timing reaches specified value The level signal of data, and send by first wired communication interface level signal of the third data, the third Data are notice instruction information;The first terminal is during sending the level signal of the third data, described in detection The edge variation of level signal at first wired communication interface, the edge of level signal becomes at first wired communication interface When change meets timing trigger condition, start the second timing;The second terminal receives institute by second wired communication interface The level signal for stating third data treats signing messages and signs, and obtains signed data, and the information to be signed includes described Second data and first time are worth, and the first time value is the time required to the second terminal analyzes the third data and pre- Estimate and carries out the sum of described signature operation required time;The second terminal generates the level signal of the 4th data, and by described Second wired communication interface sends the level signal of the 4th data, and the 4th data include the information to be signed and institute State signed data;The first terminal receives the level signal of the 4th data by first wired communication interface, and The second time value for reaching of second timing described in obtaining when the level signals of the 4th data starts to receive;The first terminal Sign test operation is carried out to the signed data, whether the first time value and second time value are matched and verified, If sign test by and verification pass through, it is determined that second data be secure data.
Wherein, the edge variation of first terminal level signal at first wired communication interface meets timing and touches When clockwork spring part, start the first timing, including:The first terminal detects in level signal at first wired communication interface Change to edge when meeting start bit edge variation characteristic, continues in follow-up level signal at first wired communication interface Whether the variation of detection edge meets the edge variation generated when transmission data, if it is, starting the first timing, the start bit Edge variation characteristic is the edge variation of presets or changes in the edge of specific regularity variation;The first terminal exists When the edge variation of level signal meets timing trigger condition at first wired communication interface, start the second timing, including: The first terminal detects that edge variation meets the change of start bit edge in level signal at first wired communication interface When changing feature, continue to detect whether edge variation meets transmission number in follow-up level signal at first wired communication interface According to when generate edge variation, if it is, start the second timing, start bit edge variation characteristic be presets side Change along variation or in the edge of specific regularity variation.
Wherein, the edge variation of first terminal level signal at first wired communication interface meets timing and touches When clockwork spring part, start the first timing, including:The first terminal detects in level signal at first wired communication interface Whether edge variation meets the edge variation generated when transmission data, if so, continuing at first wired communication interface When detecting that edge variation meets stop bits edge variation characteristic in follow-up level signal, then start the first timing, wherein described Stop bits edge variation characteristic includes:The edge of presets changes or changes in the edge of specific regularity variation;It is described When the edge variation of first terminal level signal at first wired communication interface meets timing trigger condition, start second Timing, including:The first terminal detects whether edge variation meets in level signal at first wired communication interface The edge variation generated when transmission data, if so, continuing to examine in follow-up level signal at first wired communication interface Edge variation is measured when meeting stop bits edge variation characteristic, then starts the second timing, wherein the stop bits edge variation is special Sign includes:The edge of presets changes or changes in the edge of specific regularity variation.
Wherein, the edge variation of first terminal level signal at first wired communication interface meets timing and touches When clockwork spring part, start the first timing, including:The first terminal detects in level signal at first wired communication interface Change to edge when meeting start bit edge variation characteristic, then start the first timing, continues to detect first wire communication connecing Whether data are carried in follow-up level signal at mouthful, if carrying data, continues timing, if not carrying data, tie Beam timing;Wherein, start bit edge variation characteristic includes:The edge of presets changes or changes in specific regularity Edge variation;The edge variation of first terminal level signal at first wired communication interface meets timing triggering When condition, start the second timing, including:The first terminal detects in level signal at first wired communication interface When edge variation meets start bit edge variation characteristic, then starts the second timing, continue to detect first wired communication interface Locate whether carry data in follow-up level signal, if carrying data, continue timing, if not carrying data, terminates Timing;Wherein, start bit edge variation characteristic includes:The edge of presets changes or in specific regularity variation Edge changes.
Wherein, the edge variation of first terminal level signal at first wired communication interface meets timing and touches When clockwork spring part, start the first timing, including:The first terminal detects in level signal at first wired communication interface Change to edge when meeting stop bits edge variation characteristic, then start the first timing, continues to detect first wire communication connecing Whether data are carried in follow-up level signal at mouthful, if carrying data, terminates timing, if not carrying data, after Continuous timing;Wherein, stop bits edge variation characteristic includes the edge variation of presets or changes in specific regularity Edge variation;The edge variation of first terminal level signal at first wired communication interface meets timing triggering When condition, start the second timing, including:The first terminal detects in level signal at first wired communication interface When edge variation meets stop bits edge variation characteristic, then starts the second timing, continue to detect first wired communication interface Locate whether carry data in follow-up level signal, if carrying data, terminate timing, if not carrying data, continues Timing;Wherein, stop bits edge variation characteristic includes the edge variation of presets or changes in specific regularity Edge changes.
Wherein, the specified value is handled to obtain second more than or equal to the second terminal to first data The data required time;The specified value is pre-stored in the first terminal, or in the first terminal to described Before two terminals send the first data, hold consultation to obtain by the first terminal and the second terminal.
Wherein, it is that the second terminal is estimated to obtain the time required to the second terminal analyzes the third data;Alternatively, Acquisition modes the time required to the second terminal analyzes the third data include:The second terminal is in the third data Start third timing when receiving;The second terminal analyzes the third data, obtains the third data point It is the analysis third data required time that third timing when analysis finishes, which reaches time value,.
Wherein, the specified value is preset duration, described when first timing reaches specified value, including: When the duration that first timing obtains reaches preset duration;Alternatively, the specified value is default count value, the beginning First timing, including:Start first to count;It is described when first timing reaches specified value, including:It is counted first To numerical value reach default count value when.
Another object of the present invention is to provide a kind of data communication system, the first wire communication of first terminal in the system Interface and the second wired communication interface of second terminal connect, the system comprises:The first terminal, for generating the first number According to level signal, and send by first wired communication interface level signal of first data;Described in transmission During the level signal of first data, the edge variation of level signal at first wired communication interface is detected, in institute The edge variation of level signal at the first wired communication interface is stated when meeting timing trigger condition, starts the first timing;Described Two terminals, the level signal for receiving first data by second wired communication interface, to first data It is handled to obtain the second data;The first terminal is additionally operable to when first timing reaches specified value, generates third The level signal of data, and send by first wired communication interface level signal of the third data, the third Data are notice instruction information;During sending the level signal of the third data, first wire communication is detected The edge of interface level signal changes, at first wired communication interface edge variation of level signal meet timing and touch When clockwork spring part, start the second timing;The second terminal is additionally operable to receive the third by second wired communication interface The level signal of data treats signing messages and signs, and obtains signed data, and the information to be signed includes second number It is worth according to first time, the first time value is that the second terminal analyzes the third data required time and estimates progress The sum of the time required to the signature operation;And the level signal of the 4th data is generated, and connect by second wire communication Mouth sends the level signal of the 4th data, and the 4th data include the information to be signed and the signed data;Institute First terminal is stated, is additionally operable to receive the level signal of the 4th data by first wired communication interface, and obtain institute The second time value for reaching of second timing described in stating when the level signals of the 4th data starts to receive;The first terminal is to described Signed data carries out sign test operation, and whether the first time value and second time value are matched and verified, if tested Label, which pass through and verify, to be passed through, it is determined that second data are secure data.
Wherein, the first terminal is specifically used for during sending the level signal of first data, described When detecting that edge variation meets start bit edge variation characteristic at the first wired communication interface in level signal, continue described Detect whether edge variation meets the edge variation generated when transmission data at first wired communication interface in follow-up level signal, If it is, starting the first timing, start bit edge variation characteristic is the edge variation of presets or is in specific rule The edge variation of rule property variation;The first terminal, also particularly useful for the process in the level signal for sending the third data In, when detecting that edge variation meets start bit edge variation characteristic in level signal at first wired communication interface, Continue to detect in follow-up level signal at first wired communication interface when whether edge variation meets transmission data and generate Edge variation, if it is, start the second timing, start bit edge variation characteristic be presets edge variation or Person changes in the edge of specific regularity variation.
Wherein, the first terminal is specifically used for during sending the level signal of first data, described Detect whether edge variation meets the edge variation generated when transmission data at first wired communication interface in level signal, if It is that continuation detects that edge variation meets the variation of stop bits edge in follow-up level signal at first wired communication interface When feature, then start the first timing, wherein stop bits edge variation characteristic includes:The edges of presets change or In the edge variation of specific regularity variation;The first terminal is believed also particularly useful in the level for sending the third data During number, detects when whether edge variation meets transmission data and produce in level signal at first wired communication interface Raw edge variation, if so, continuing to detect that edge changes in follow-up level signal at first wired communication interface When meeting stop bits edge variation characteristic, then start the second timing, wherein stop bits edge variation characteristic includes:It is default The edge of form changes or changes in the edge of specific regularity variation.
Wherein, the first terminal is specifically used for during sending the level signal of first data, described When detecting that edge variation meets start bit edge variation characteristic at the first wired communication interface in level signal, then start first Timing continues to detect at first wired communication interface whether carry data in follow-up level signal, if carrying data, Then continue timing, if not carrying data, terminates timing;Wherein, start bit edge variation characteristic includes:Presets Edge variation or in it is specific regularity variation edge change;The first terminal, also particularly useful for sending described the During the level signal of three data, detect that edge variation meets in level signal at first wired communication interface When start bit edge variation characteristic, then start the second timing, continues to detect follow-up level letter at first wired communication interface Whether data are carried in number, if carrying data, continue timing, if not carrying data, terminates timing;Wherein, institute Stating start bit edge variation characteristic includes:The edge of presets changes or changes in the edge of specific regularity variation.
Wherein, the first terminal is specifically used for during sending the level signal of first data, described When detecting that edge variation meets stop bits edge variation characteristic at the first wired communication interface in level signal, then start first Timing continues to detect at first wired communication interface whether carry data in follow-up level signal, if carrying data, Then terminate timing, if not carrying data, continues timing;Wherein, stop bits edge variation characteristic includes presets Edge variation or in it is specific regularity variation edge change;The first terminal, also particularly useful for sending described the During the level signal of three data, detect that edge variation meets in level signal at first wired communication interface When stop bits edge variation characteristic, then start the second timing, continues to detect follow-up level letter at first wired communication interface Whether data are carried in number, if carrying data, terminate timing, if not carrying data, continues timing;Wherein, institute State the edge variation or change in the edge of specific regularity variation that stop bits edge variation characteristic includes presets.
Wherein, the specified value is handled to obtain second more than or equal to the second terminal to first data The data required time;The specified value is pre-stored in the first terminal, or in the first terminal to described Before two terminals send the first data, hold consultation to obtain by the first terminal and the second terminal.
Wherein, it is that the second terminal is estimated to obtain the time required to the second terminal analyzes the third data;Alternatively, The second terminal is additionally operable to start third timing when the third data receiver finishes;And to the third data into Row analysis, it is the analysis third to obtain the third timing when third data analysis finishes to reach time value The time required to data.
Wherein, the specified value is preset duration, the first terminal, specifically for what is obtained in first timing When duration reaches preset duration, the level signal of third data is generated;Alternatively, the specified value is default count value, institute First terminal is stated, is specifically used for starting the first counting;The first terminal reaches specifically for the numerical value counted to get first When default count value, the level signal of third data is generated.
As seen from the above technical solution provided by the invention, in normal communication, first terminal sends third Start the second timing while data (i.e. notice instruction information), second terminal receives third data (i.e. notice instruction information) Afterwards, signature operation is executed, and the 4th data of transmission (the 4th data include data to be signed and signed data) give first terminal, the The time value that the second timing reaches when one terminal receives four data is the second time value.Since first time value indicates the After two terminals receive third data, analyzes the third data required time and estimate the progress signature operation required time Indicate that first terminal sends out third data to the required time for receiving the 4th data with, the second time value, and wired connection feelings Transmission delay very little under condition, can be ignored, at this point, first terminal is to the first time value and second time value When no matching is verified, it can be deduced that the first time value and second time value matching.
If there are the long-range abduction of third party's illegality equipment between first terminal and second terminal, since third party is non- Method equipment after the illegal operations such as the data kidnapped are forwarded or distort to needing to occupy the regular hour, then due to second Terminal can execute signature operation afterwards receiving third data (i.e. notice instruction information) always, and send the 4th data, and the 4th Data relay to first terminal after the long-range abduction of third party's illegality equipment processing, and first terminal receives return at this time Time of invalid data be naturally larger than value at the first time, by the first time value and second time value whether With being verified, it can be found that in the case where there is long-range kidnap, the second time value can be more than and be worth at the first time, that is, the One time value and the second time value can not match, to can effectively identify illegal number after remote data has occurred and kidnaps According to, and then respective handling measure can be taken, such as interrupt subsequent processing, abandon invalid data, disconnect first terminal and second Communication connection of terminal etc. ensure that the safety of data transmission between first terminal and second terminal.
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 Attached drawing be briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for this For the those of ordinary skill in field, without creative efforts, other are can also be obtained according to these attached drawings Attached drawing.
Fig. 1 is a kind of flow chart for data communications method that the embodiment of the present invention 1 provides;
Fig. 2 is a kind of structure diagram for data communication system that the embodiment of the present invention 2 provides.
Specific implementation mode
With reference to the attached drawing in the embodiment of the present invention, technical solution in the embodiment of the present invention carries out clear, complete Ground describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Based on this The embodiment of invention, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, belongs to protection scope of the present invention.
In the description of the present invention, it is to be understood that, term "center", " longitudinal direction ", " transverse direction ", "upper", "lower", The orientation or positional relationship of the instructions such as "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outside" is It is based on the orientation or positional relationship shown in the drawings, is merely for convenience of description of the present invention and simplification of the description, rather than instruction or dark Show that signified device or element must have a particular orientation, with specific azimuth configuration and operation, therefore should not be understood as pair The limitation of the present invention.In addition, term " first ", " second " are used for description purposes only, it is not understood to indicate or imply opposite Importance or quantity or position.
In the description of the present invention, it should be noted that unless otherwise clearly defined and limited, term " installation ", " phase Even ", " connection " shall be understood in a broad sense, for example, it may be being fixedly connected, may be a detachable connection, or be integrally connected;It can Can also be electrical connection to be mechanical connection;It can be directly connected, can also indirectly connected through an intermediary, Ke Yishi Connection inside two elements.For the ordinary skill in the art, above-mentioned term can be understood at this with concrete condition Concrete meaning in invention.
The embodiment of the present invention is described in further detail below in conjunction with attached drawing.
In the present embodiment, first terminal is equipped with the first wired communication interface, and second terminal is equipped with the second wire communication Interface, wherein first terminal includes but not limited to PC machine, mobile terminal, palm PC, the Card Reader for supporting Contact Type Ic Card interface Device (such as POS machine), second terminal include but not limited to electronic signature equipment (usbkey, audio key), Contact Type Ic Card;The One wired communication interface and the second wired communication interface can be USB interface, Contact Type Ic Card communication interface etc..
First wired communication interface of first terminal and the second wired communication interface of second terminal carry out wired connection, with Convenient for carrying out wire communication between first terminal and second terminal.
Embodiment 1
The present embodiment provides a kind of data communications methods, as shown in Figure 1, the method includes:
101, the first terminal generates the level signal of the first data, and is sent by first wired communication interface The level signal of first data;
In the present embodiment, first terminal and second terminal are established after wire communication connects, first terminal and second terminal it Between by low and high level signal realize data transmission.When first terminal sends the first data to second terminal, first terminal The level signal of the first data is generated, and is sent by the first wired communication interface, the first wired communication interface is because sending at this time The level signal of first data and the level change that generates can also cause the second wired communication interface to generate corresponding level change, The level change that second terminal is generated by detecting the second wired communication interface, you can realize the reception to the first data.
102, for the first terminal during sending the level signal of first data, detection described first is wired The edge variation of level signal at communication interface, the edge of level signal, which changes, at first wired communication interface meets meter When trigger condition when, start the first timing;
In the present embodiment, during first terminal sends the level signal of the first data, the first wire communication of detection connects The edge variation of level signal at mouthful.The edge variation of level signal for example can be level signal becomes low level from high level When the edge variation that the generates or edge variation that generates when becoming high level from low level of level signal.
In the present embodiment, it can be multiple that the pin of data transmission is used in the first wired communication interface, for example, first has When line communication interface is USB interface, the pin for data transmission is two, respectively D+ pins and D- pins.It is appreciated that , at the first wired communication interface the edge variation of level signal specifically refer to:It is electric at each pin for data transmission The edge of ordinary mail number changes, for example, by taking USB interface as an example, the edge of level signal changes and specifically refers at USB interface:D+ draws The edge variation of the edge variation of level signal and level signal at D- pins at foot.Other interface forms are similar, herein no longer It repeats.
In the present embodiment, if the edge variation of level signal meets timing trigger condition at the first wired communication interface, It can then trigger and start the first timing, in order to when the first timing reaches specified value, generate the level signal of third data.
The realization method of first timing is including but not limited to following several:Timing, the number that timing obtains are carried out using clock Value is duration;Or timing is carried out using counter, the numerical value that timing obtains is count value.
103, the second terminal receives the level signal of first data by second wired communication interface, right First data are handled to obtain the second data;
In the present embodiment, wired connection, first terminal are carried out by the first wired communication interface and the second wired communication interface When sending the level signal of the first data by the first wired communication interface, correspondingly, second terminal can be wired by second Communication interface receives the level signal of the first data.It is understood that at the first wired communication interface level signal edge Change and is consistent with the edge variation of level signal at the second wired communication interface.
In the present embodiment, after second terminal receives first data, the first data will be handled to obtain second Data.For example, the first data are data to be signed, the first data of second terminal pair are handled to obtain the second data specifically can be with It is data after being signed to the data to be signed.
104, the first terminal generates the level signal of third data when first timing reaches specified value, And the level signal of the third data is sent by first wired communication interface, the third data are notice instruction letter Breath;
In the present embodiment, the specified value to first data handle more than or equal to the second terminal To the second data required time;
In the present embodiment, third data are notice instruction information, are used to indicate second terminal and the second data are returned to the One terminal.After third data are sent to second terminal by first terminal, second terminal receives notice instruction information, by the second number According to being sent to first terminal.
105, for the first terminal during sending the level signal of the third data, detection described first is wired The edge variation of level signal at communication interface, the edge of level signal, which changes, at first wired communication interface meets meter When trigger condition when, start the second timing;
In the present embodiment, during first terminal sends the level signal of third data, the first wire communication of detection connects The edge variation of level signal at mouthful.The edge variation of level signal for example can be level signal becomes low level from high level When the edge variation that the generates or edge variation that generates when becoming high level from low level of level signal.
In the present embodiment, it can be multiple that the pin of data transmission is used in the first wired communication interface, for example, first has When line communication interface is USB interface, the pin for data transmission is two, respectively D+ pins and D- pins.It is appreciated that , at the first wired communication interface the edge variation of level signal specifically refer to:It is electric at each pin for data transmission The edge of ordinary mail number changes, for example, by taking USB interface as an example, the edge of level signal changes and specifically refers at USB interface:D+ draws The edge variation of the edge variation of level signal and level signal at D- pins at foot.Other interface forms are similar, herein no longer It repeats.
In the present embodiment, if the edge variation of level signal meets timing trigger condition at the first wired communication interface, It can then trigger and start the second timing, in order to which the second time value subsequently obtained using second timing carries out verification operation.
The realization method of second timing is including but not limited to following several:Timing, the number that timing obtains are carried out using clock Value is duration;Or timing is carried out using counter, the numerical value that timing obtains is count value.
In the present embodiment, identical timing mode may be used in the second timing and the first timing, can also use different Timing mode.It is not limited thereto.
106, the second terminal receives the level signal of the third data by second wired communication interface, right Information to be signed is signed, and signed data is obtained, and the information to be signed includes second data and first time value, institute It states the time required to value at the first time is the second terminal analysis third data and estimates and carry out needed for the signature operation The sum of time;
In the present embodiment, the first wired communication interface and the second wired communication interface carry out wired connection, and first terminal is logical When crossing the level signal of the first wired communication interface transmission third data, correspondingly, second terminal can pass through the second cable modem Believe the level signal of interface third data.It is understood that the edge of level signal becomes at the first wired communication interface Change and is consistent with the edge variation of level signal at the second wired communication interface.
In the present embodiment, second terminal receives third data, and analyzed third data is with the determining third data It is no then to execute signature operation if notice instruction information for notice instruction information, otherwise, do not execute signature operation.Analyze third Refer to that second terminal is received after third data are analyzed and drawn a conclusion the required time the time required to data.
First time value in the present embodiment indicates second terminal from third data are received to sending out the 4th data needs The value of the temporal summation of occupancy, first time value is taken by analysis third data required time with progress signature operation is estimated The sum of between.
Second terminal obtains label when executing signature operation after the second data and first time value are signed together After sign test passes through, verification behaviour is carried out using the first time value so that follow-up first terminal receives the signed data for name data Make, to verify the true legitimacy of the second data.
107, the second terminal generates the level signal of the 4th data, and is sent by second wired communication interface The level signal of 4th data, the 4th data include the information to be signed and the signed data;
In the present embodiment, the second data can't be returned to first terminal by second terminal immediately after obtaining the second data, But after receiving third data (namely notice instruction information), it is worth to second data and at the first time and executes signature behaviour It obtains signed data, and is sent the 4th data (namely information to be signed and signed data) by the second wired communication interface To first terminal, after coordinating first terminal to receive signed data, it is worth using first time and carries out verification operation, with verification The true legitimacy of second data.
108, the first terminal receives the level signal of the 4th data by first wired communication interface, and The second time value for reaching of second timing described in obtaining when the level signals of the 4th data starts to receive;The first terminal Sign test operation is carried out to the signed data, whether the first time value and second time value are matched and verified, If sign test by and verification pass through, it is determined that second data be secure data.
In the present embodiment, the second time value is taken to the 4th data are received by first terminal from sending out third data Between.First terminal second timing since sending out third data, to obtain that the second timing obtains when receiving four data when Between be worth, be exactly the second time value.
In the present embodiment, duration expression may be used in the measurement unit of value and the second time value at the first time, or also may be used To be indicated using count value, since value and the second time need that verification is compared at the first time, thus in practical application, need It is set as value and the second time value at the first time to use identical measurement unit, which kind of measurement unit is specifically used, herein not It is restricted.
It is as follows to whether value and the second time at the first time match the realization method verified in the present embodiment:It compares Whether value and the second time value are identical at the first time, if identical, then it is assumed that verification passes through, otherwise it is assumed that verification does not pass through.
In the present embodiment, in normal communication, first terminal sends the same of third data (i.e. notice instruction information) When start the second timing, after second terminal receives third data (i.e. notice instruction information), execute signature operation, and send the Four data (the 4th data include data to be signed and signed data) give first terminal, the when first terminal receives four data The time value that two timing reach is the second time value.After value indicates that second terminal receives third data at the first time, point The sum of the time required to analysing the third data and estimate the progress signature operation required time, the second time value indicates first eventually End sends out third data to the required time for receiving the 4th data, and transmission delay very little in the case of wired connection, can neglect Slightly disregard, at this point, whether first terminal matches when verifying the first time value and second time value, can obtain Go out the first time value and second time value matching.
If there are the long-range abduction of third party's illegality equipment between first terminal and second terminal, since third party is non- Method equipment after the illegal operations such as the data kidnapped are forwarded or distort to needing to occupy the regular hour, then due to second Terminal can execute signature operation afterwards receiving third data (i.e. notice instruction information) always, and send the 4th data, and the 4th Data relay to first terminal after the long-range abduction of third party's illegality equipment processing, and first terminal receives return at this time Time of invalid data be naturally larger than value at the first time, by the first time value and second time value whether With being verified, it can be found that in the case where there is long-range kidnap, the second time value can be more than and be worth at the first time, that is, the One time value and the second time value can not match, to can effectively identify illegal number after remote data has occurred and kidnaps According to, and then respective handling measure can be taken, such as interrupt subsequent processing, abandon invalid data, disconnect first terminal and second Communication connection of terminal etc. ensure that the safety of data transmission between first terminal and second terminal.
As a kind of optional embodiment of the present embodiment, the specified value is greater than or equal to the second terminal to institute The first data are stated to be handled to obtain the second data required time;Since first terminal reaches specified value in the first timing When, third data are sent, second terminal can carry out signature behaviour after receiving third data using the second data and first time value Make, specified value is set greater than, first data are handled to obtain needed for the second data equal to the second terminal The time wanted, after third data being received to avoid second terminal, second terminal is not also complete to the first data processing, is unable to get The case where second data.
As a kind of optional embodiment of the present embodiment, the specified value is pre-stored in the first terminal, for example, Specified value can be pre-stored in the secure storage areas in first terminal in advance, when first terminal needs in use, from secure storage Area obtains.
A kind of optional embodiment as the present embodiment is, it is specified that numerical value can also obtain in the following way:Described Before first terminal sends the first data to the second terminal, held consultation by the first terminal and the second terminal It arrives;Following manner may be used in the realization for negotiating to obtain specified value:The first terminal carries out two-way with the second terminal Authentication, after the two-way authentication passes through, the first terminal is negotiated to be transmitted with the second terminal Key;The second terminal generates the specified value, and is encrypted to the specified value using the transmission key, will encrypt Specified value afterwards is sent to the first terminal;The first terminal is using the transmission key to the encrypted regulation Numerical value is decrypted to obtain the specified value, and preserves;Alternatively, the first terminal generates the specified value, and described in utilization Transmission key encrypts the specified value, and encrypted specified value is sent to the second terminal;The second terminal The encrypted specified value is decrypted to obtain the specified value using the transmission key, and is preserved;Alternatively, negotiating to obtain Following manner can also be used by obtaining the realization of specified value:The first terminal carries out two-way identity with the second terminal to be recognized Card;After the two-way authentication passes through, the second terminal generates the specified value, and utilizes the first terminal Public key the specified value is encrypted, encrypted specified value is sent to the first terminal;The first terminal profit The encrypted specified value is decrypted to obtain the specified value with its private key, and is preserved;Alternatively, in the two-way body After part certification passes through, the first terminal generates the specified value, and using the public key of the second terminal to the regulation Numerical value is encrypted, and encrypted specified value is sent to the second terminal;The second terminal is added using its private key to described Specified value after close decrypts to obtain the specified value, and preserves.
As a kind of optional embodiment of the present embodiment, the second terminal analyzes the third data required time and is The second terminal is estimated to obtain;Alternatively,
The second terminal can also be obtained the time required to analyzing the third data by timing, be implemented as follows: The second terminal starts third timing when the third data receiver finishes;The second terminal to the third data into Row analysis, it is the analysis third to obtain the third timing when third data analysis finishes to reach time value The time required to data.
As a kind of optional embodiment of the present embodiment, when timing mode is clock timing, the specified value is Preset duration, it is described when first timing reaches specified value, including:Reach pre- in the duration that first timing obtains If when duration;
Alternatively, when timing mode be counter counts constantly, the specified value is default count value, described to start first Timing, including:Start first to count;It is described when first timing reaches specified value, including:It is counted to get first When numerical value reaches default count value.
As a kind of optional embodiment of the present embodiment, above-mentioned timing can be to start to trigger in data transmission, touch Hair timing is implemented as follows:
The first terminal connects during sending the level signal of first data in first wire communication When detecting that edge variation meets start bit edge variation characteristic in level signal at mouthful, continuation connects in first wire communication Whether the variation of detection edge meets the edge variation generated when transmission data in follow-up level signal at mouthful, if it is, starting First timing, start bit edge variation characteristic are the edge variation of presets or the edge in specific regularity variation Variation;
The first terminal connects during sending the level signal of the third data in first wire communication When detecting that edge variation meets start bit edge variation characteristic in level signal at mouthful, continuation connects in first wire communication Whether the variation of detection edge meets the edge variation generated when transmission data in follow-up level signal at mouthful, if it is, starting Second timing, start bit edge variation characteristic are the edge variation of presets or the edge in specific regularity variation Variation.
By taking the first wired communication interface and the second wired communication interface are USB interface as an example, lower first terminal is briefly introduced The realization process communicated by USB interface with second terminal:When not having data transmission, USB interface is in Idle state, when need When wanting transmission data, level signal can be transferred to K state from Idle state (process is also referred to as data at D+ and D- in USB interface Beginning (SOP) state of packet), later, start using differential signal transmission data at D+ and D- in USB interface, usual data First is first of synchronization field SYNC, when detecting first of synchronization field SYNC, can also determine USB Interface is in data transmission state.When the data transfer ends, last position of usual data is check bit CRC, and check bit CRC is passed After the completion of defeated, level signal enters SE0 states at D+ and D- in USB interface, can be transferred to J states (process by SE0 states later Also referred to as data end-of-packet (EOP) state).Wherein, level signal at D+ and D- in USB interface under SOP states and EOP states Feature specifically may refer to the relevant regulations in usb protocol, and details are not described herein.
Implementation based on USB interface triggering timing is as follows:First terminal detects D+ at the first wired communication interface The edge variation of level signal at pin and D- pins, which meets, to be entered K state by idle state and (namely detects data packet Start SOP) corresponding level signal generate edge variation characteristic when, then it represents that detect and meet start bit edge variation characteristic Level signal, continue to detect the edge variation of level signal at follow-up D+ pins and D- pins, if edge variation meets When the edge variation characteristic that first (such as synchronization field SYNC first) corresponding level signal of transport packet generates, Then explanation detects that the edge variation of level signal meets the edge variation generated when transmission data, that is, indicates the first cable modem Letter interface is in data transmission state, starts the first timing (the realization process of the second timing and the realization class of the first timing at this time Seemingly, details are not described herein).
Certainly, the first wired communication interface and the second wired communication interface can also be Contact Type Ic Card communication interface, letter Introduce the realization process that lower first terminal and second terminal are communicated by Contact Type Ic Card communication interface:Contact Type Ic Card Input and output I/O interfaces use character mode transmission data.Before data is transmitted, I/O interfaces are high level state.Each Character is made of 10 continuous positions:The start bit of 1 low level state, 8 data bit of composition data byte and 1 odd even Check bit.I/O interfaces enter guard time after the completion of character transmission, and in guard time, I/O interfaces are in high level state.
Realization based on Contact Type Ic Card communication interface triggering timing is as follows:First terminal detects that the first wire communication connects The edge variation of level signal meets the edge variation characteristic that the generation of a low level is transferred to by high level at mouth (i.e. I/O interfaces) When, illustrate to detect the level signal for meeting start bit edge variation characteristic, continues to detect the first wired communication interface (i.e. I/ O Interface) at follow-up level signal edge variation meet indicate 8 data bit in the corresponding level signal of first data bit When the edge variation characteristic of generation, illustrate to detect that the edge variation of level signal meets the edge generated when transmission data and becomes Change, the first wired communication interface (i.e. I/O interfaces) is in data transmission state, then starts the first timing (realization of the second timing Process is similar with the realization of the first timing, and details are not described herein);
Certainly, the first wired communication interface and the second wired communication interface can also use the third following communication mode: The data pin of data is used for transmission there are two being all provided in first wired communication interface and the second wired communication interface.By this two The differential signal that a data pin is formed carries out data transmission, and start bit would generally be arranged when data transmission starts, data Start bit generally use parallel signal indicates, such as two data pins are high level or two data pins are low Level, the specific combination how many and using how many a level using high level or low level, level value constitutes start bit can To carry out different set according to different application scenarios, details are not described herein.After data start transmission, the data transmitted use Differential signal indicates, for example, in two data pins one be high level, another is low level, and the data transmitted are different, Two data pins are formed by that differential signal is also different, can specifically be set according to different application scenarios, herein not It repeats again.Stop bits can be set in the data transfer ends, and the stop bits of data generally also uses parallel signal to indicate, such as two A data pin is high level or two data pins are low level, specifically uses high level or low level, level The how many and combination using how many a level of value, which constitutes stop bits, to carry out different set according to different application scenarios, This is repeated no more.It is understood that used by the specific level value of parallel signal and stop bits that the data start bit uses The specific level value of parallel signal is different, to show difference.
Realization based on the third communication mode triggering timing is as follows:It is used with being equipped in first wired communication interface For the first pin and second pin of transmission data;First terminal level signal and described at first pin Detect that the level signal number of edge variation is one at second pin in level signal, subsequently again at first pin When detecting that the level signal number of edge variation is two at level signal and the second pin in level signal, illustrate elder generation The level signal for meeting start bit edge variation characteristic is detected, it is rear to have detected data transmission again, then start the first timing (the realization process of the second timing is similar with the realization of the first timing, and details are not described herein).
Due to indicating that the level signal of start bit is parallel signal in the communication mode, indicate to wait in data transmission procedure The level signal of transmission data is differential signal, and when parallel signal becomes differential signal, level signal at two data pins In the edge of a level signal can change, data to be transmitted is different in data transmission procedure, and differential signal is also different, The variation of differential signal can cause the edge of two level signals in level signal at two data pins to change, if First terminal level signal at two data pins detects that the changed level signal number in edge is one, subsequently again It detects that the changed level signal number in edge is two in level signal at two data pins, illustrates first to detect Data start bits, it is follow-up to detect that data are being transmitted again, thus start timing.
As a kind of optional embodiment of the present embodiment, above-mentioned timing can be the end trigger in data transmission, touch Hair timing is implemented as follows:
In present embodiment, the first terminal is during sending the level signal of first data, described Detect whether edge variation meets the edge variation generated when transmission data at first wired communication interface in level signal, if It is that continuation detects that edge variation meets the variation of stop bits edge in follow-up level signal at first wired communication interface When feature, then start the first timing, wherein stop bits edge variation characteristic includes:The edges of presets change or In the edge variation of specific regularity variation;
The first terminal connects during sending the level signal of the third data in first wire communication Whether the variation of detection edge meets the edge variation generated when transmission data in level signal at mouthful, if so, continuing described When detecting that edge variation meets stop bits edge variation characteristic at the first wired communication interface in follow-up level signal, then start Second timing, wherein stop bits edge variation characteristic includes:The edge of presets changes or becomes in specific regularity The edge of change changes.
Implementation based on USB interface triggering timing is following, and (the realization process communicated based on USB interface is referring to upper Literary related record, details are not described herein):
First terminal detects the edge variation of level signal at D+ pins and D- pins in the first wired communication interface, if Edge variation meets the edge variation that the corresponding level signal in last position (such as check bit CRC) of transport packet generates When feature, then explanation detects that the edge variation of level signal meets the edge variation generated when transmission data, after continuing detection The edge variation of level signal at continuous D+ pins and D- pins, if detect that edge variation meets is transferred to J states by SE0 states When the edge variation characteristic that (namely detecting data end-of-packet (EOP) state) corresponding level signal generates, then it represents that inspection The level signal for meeting stop bits edge variation characteristic is measured, then starts the first timing (realization process and first of the second timing The realization of timing is similar, and details are not described herein).
Realization based on Contact Type Ic Card communication interface triggering timing (is led to as follows based on Contact Type Ic Card communication interface The realization of letter sees above associated description, and details are not described herein):
First terminal detects that the edge variation of the first wired communication interface (i.e. I/O interfaces) level signal meets expression 8 When the edge variation characteristic that the corresponding level signal of the last one data bit in a data bit generates, illustrate to detect that level is believed Number edge variation meet generated when transmission data edge variation, continue to detect that (i.e. I/O connects the first wired communication interface Mouthful) the edge variation of follow-up level signal when meeting the edge variation characteristic that the corresponding high level signal of guard time generates, says It is bright to detect the level signal for meeting stop bits edge variation characteristic, then start the first timing (the realization process of the second timing with The realization of first timing is similar, and details are not described herein).
Following (the reality communicated based on the third communication mode of realization based on the third communication mode triggering timing Referring now to associated description above, details are not described herein):
For being equipped in first wired communication interface and be used for transmission the first pin and the second pin of data;
The first terminal detects at level signal and the second pin in level signal at first pin The level signal number of edge variation is two, the follow-up electricity at level signal and the second pin at first pin again It detects that the level signal number of edge variation is one in ordinary mail number, illustrates first to have detected data transmission, it is rear to detect again To the level signal for meeting the variation of stop bits edge, then start the first timing (the realization process of the second timing and the first timing Realize similar, details are not described herein).
Due to indicating that the level signal of start bit is parallel signal in the communication mode, indicate to wait in data transmission procedure The level signal of transmission data is differential signal, and when parallel signal becomes differential signal, level signal at two data pins In the edge of a level signal can change, data to be transmitted is different in data transmission procedure, and differential signal is also different, The variation of differential signal can cause the edge of two level signals in level signal at two data pins to change, if First terminal level signal at two data pins detects that the changed level signal number in edge is two, subsequently again It detects that the changed level signal number in edge is one in level signal at two data pins, illustrates first to detect There are data transmitting, it is follow-up to detect end of data position again, thus start timing.
As a kind of optional embodiment of the present embodiment, above-mentioned timing can be to start to trigger in data transmission, touch Another realization for sending out timing is as follows:
In present embodiment, the first terminal is during sending the level signal of first data, described When detecting that edge variation meets start bit edge variation characteristic at the first wired communication interface in level signal, then start first Timing continues to detect at first wired communication interface whether carry data in follow-up level signal, if carrying data, Then continue timing, if not carrying data, terminates timing;Wherein, start bit edge variation characteristic includes:Presets Edge variation or in it is specific regularity variation edge change;
The first terminal connects during sending the level signal of the third data in first wire communication When detecting that edge variation meets start bit edge variation characteristic in level signal at mouthful, then starts the second timing, continue to detect Whether data are carried in follow-up level signal at first wired communication interface, if carrying data, continues timing, if Data are not carried, then terminate timing;Wherein, start bit edge variation characteristic includes:The edges of presets change or Person changes in the edge of specific regularity variation.
Implementation based on USB interface triggering timing is following, and (the realization process communicated based on USB interface is referring to upper Literary related record, details are not described herein):
First terminal detects the edge variation of the level signal at D+ pins and D- pins at the first wired communication interface Meet and the corresponding level signal edge K state (SOP namely detecting data packet) variation characteristic is entered by idle state When, then it represents that it detects the level signal for meeting start bit edge variation characteristic, then starts the first timing, continue to detect follow-up D+ Level signal at pin and D- pins, and data decoding is carried out to the level signal, show that the level signal is taken if can decode With data, illustrate to have started normal transmission data after detecting the level signal for meeting start bit edge variation characteristic, then after Continuous timing illustrates that data transmission is likely to occur exception, then suspends meter if decoding failure or appearance exception are unable to get data When.
The realization process of second timing is similar with the realization of the first timing, and details are not described herein.
Realization based on Contact Type Ic Card communication interface triggering timing (is led to as follows based on Contact Type Ic Card communication interface The realization of letter sees above associated description, and details are not described herein):
First terminal detects that the edge variation of level signal at the first wired communication interface (i.e. I/O interfaces) meets by height When level is transferred to the edge variation characteristic of low level generation, illustrate to detect the level for meeting start bit edge variation characteristic Signal starts the first timing, continues to detect follow-up level signal at the first wired communication interface (i.e. I/O interfaces), and to this Level signal carries out data decoding, show that the level signal carries data if can decode, and illustrates to detect and meets start bit Normal transmission data are started after the level signal of edge variation characteristic, have then continued timing, if decoding failure or appearance are abnormal Data are unable to get, illustrate that data transmission is likely to occur exception, then time out.
The realization process of second timing is similar with the realization of the first timing, and details are not described herein.
Following (the reality communicated based on the third communication mode of realization based on the third communication mode triggering timing Referring now to associated description above, details are not described herein):
For being equipped in first wired communication interface and be used for transmission the first pin and the second pin of data;It is described First terminal detects the electricity of edge variation at first pin in level signal at level signal and the second pin Ordinary mail number is one, then starts the first timing, continue to detect at first wired communication interface in follow-up level signal Whether data are carried, if carrying data, illustrates to have opened after detecting the level signal for meeting start bit edge variation characteristic Beginning normal transmission data, then continue timing, if not carrying data, illustrates that data transmission is likely to occur exception, then terminates timing;
The realization process of second timing is similar with the realization of the first timing, and details are not described herein.
Due to indicating that the level signal of start bit is parallel signal in the communication mode, indicate to wait in data transmission procedure The level signal of transmission data is differential signal, and when parallel signal becomes differential signal, level signal at two data pins In the edge of a level signal can change, data to be transmitted is different in data transmission procedure, and differential signal is also different, The variation of differential signal can cause the edge of two level signals in level signal at two data pins to change, if First terminal level signal at two data pins detects that the changed level signal number in edge is one, Ke Yikai Beginning timing, it is follow-up to detect that level signal carries data again, illustrate first to detect data start bit, it is follow-up to detect again Through there are data transmitting, thus continue timing.
As a kind of optional embodiment of the present embodiment, above-mentioned timing can be the end trigger in data transmission, touch Another realization for sending out timing is as follows:
In present embodiment, the first terminal is during sending the level signal of first data, described When detecting that edge variation meets stop bits edge variation characteristic at the first wired communication interface in level signal, then start first Timing continues to detect at first wired communication interface whether carry data in follow-up level signal, if carrying data, Then terminate timing, if not carrying data, continues timing;Wherein, stop bits edge variation characteristic includes presets Edge variation or in it is specific regularity variation edge change;
The first terminal connects during sending the level signal of the third data in first wire communication When detecting that edge variation meets stop bits edge variation characteristic in level signal at mouthful, then starts the second timing, continue to detect Whether data are carried in follow-up level signal at first wired communication interface, if carrying data, terminates timing, if Data are not carried, then continue timing;Wherein, stop bits edge variation characteristic include presets edge variation or In the edge variation of specific regularity variation.
Implementation based on USB interface triggering timing is following, and (the realization process communicated based on USB interface is referring to upper Literary related record, details are not described herein):
First terminal detects the edge variation of level signal at D+ pins and D- pins in the first wired communication interface, detection Change to meet to edge and the corresponding level letter of J states (namely detecting data end-of-packet (EOP) state) is transferred to by SE0 states When number edge variation characteristic, then it represents that it detects the level signal for meeting stop bits edge variation characteristic, starts the first timing, after It is continuous to detect level signal at follow-up D+ pins and D- pins, and data decoding is carried out to level signal, if can not be obtained after decoding Data are obtained, illustrates that data transmission has been completed, then continues timing, otherwise, if decoding can obtain data, illustrate data transmission It is not yet fully completed or exception occurs in data transmission, then terminate timing.
The realization process of second timing is similar with the realization of the first timing, and details are not described herein.
Realization based on Contact Type Ic Card communication interface triggering timing (is led to as follows based on Contact Type Ic Card communication interface The realization of letter sees above associated description, and details are not described herein):
When first terminal detects that the edge variation of the first wired communication interface (i.e. I/O interfaces) level signal meets protection Between corresponding high level signal generate edge variation characteristic when, illustrate to detect the level for meeting stop bits edge variation characteristic Signal then starts the first timing, and continues to detect follow-up level signal at the first wired communication interface (i.e. I/O interfaces), and Data decoding is carried out to level signal, if data can not be obtained after decoding, continues timing, otherwise, if decoding can obtain Data are obtained, then terminate timing.
The realization process of second timing is similar with the realization of the first timing, and details are not described herein.
Following (the reality communicated based on the third communication mode of realization based on the third communication mode triggering timing Referring now to associated description above, details are not described herein):
For being equipped in first wired communication interface and be used for transmission the first pin and the second pin of data;
The first terminal detects at level signal and the second pin in level signal at first pin The level signal number of edge variation is one, then starts the first timing, continue after detecting at first wired communication interface Whether data are carried in continuous level signal, if carrying data, terminates timing, if not carrying data, continue timing;
The realization process of second timing is similar with the realization of the first timing, and details are not described herein.
In the present embodiment, it can be seen from the above description that data start bit edge variation characteristic is presets Edge changes, for example, the level signal for meeting data start bit edge variation characteristic in Contact Type Ic Card communication interface uses one A low level indicates, the level signal for meeting end of data position edge variation characteristic use high level expression (guard time is holds Continue one section of high level) or data start bit edge variation characteristic in it is specific regularity variation edge variation, for example, The level signal for meeting data start bit edge variation characteristic in USB interface is that (level signal is transferred to K from Idle state using SOP State) it indicates, meeting the level signal of end of data position edge variation characteristic, (level signal is transferred to J from SE0 states using EOP State) it indicates.Certainly, it is also not limited to this, various forms of edge variation characteristics may be used according to different communication interfaces Indicate data start bit feature, for example, it is also possible to using multiple high level and low level combination or single high level, or Single low level of person etc., this is not restricted.
Embodiment 2
The present embodiment provides a kind of data communication systems, as shown in Fig. 2, the first wired communication interface of first terminal and Second wired communication interface of two terminals connects, the system comprises:First terminal 10 and second terminal 20;
The first terminal 10, the level signal for generating the first data, and pass through first wired communication interface Send the level signal of first data;During sending the level signal of first data, detection described first The edge variation of level signal at wired communication interface, the edge variation symbol of level signal at first wired communication interface When total when trigger condition, start the first timing;
The second terminal 20, the level for receiving first data by second wired communication interface are believed Number, first data are handled to obtain the second data;
The first terminal 10 is additionally operable to when first timing reaches specified value, generates the level of third data Signal, and the level signal of the third data is sent by first wired communication interface, the third data are notice Indicate information;During sending the level signal of the third data, level at first wired communication interface is detected The edge of signal changes, when the edge variation of level signal meets timing trigger condition at first wired communication interface, Start the second timing;
The second terminal 20 is additionally operable to receive the level letter of the third data by second wired communication interface Number, it treats signing messages and signs, obtain signed data, the information to be signed includes second data and first time Value, the first time value is analyzed the third data required time and estimated for the second terminal carries out the signature operation The sum of required time;And the level signal of the 4th data is generated, and send described the by second wired communication interface The level signal of four data, the 4th data include the information to be signed and the signed data;
The first terminal 10 is additionally operable to receive the level letter of the 4th data by first wired communication interface Number, and when the level signal for obtaining the 4th data starts to receive described in the second time value for reaching of the second timing;Described Signed data described in one terminal-pair carries out sign test operation, and progress whether is matched to the first time value and second time value Verification, if sign test by and verification pass through, it is determined that second data be secure data.
It is as follows to whether value and the second time at the first time match the realization method verified in the present embodiment:It compares Whether value and the second time value are identical at the first time, if identical, then it is assumed that verification passes through, otherwise it is assumed that verification does not pass through.
In the present embodiment, in normal communication, first terminal sends the same of third data (i.e. notice instruction information) When start the second timing, after second terminal receives third data (i.e. notice instruction information), execute signature operation, and send the Four data (the 4th data include data to be signed and signed data) give first terminal, and second terminal is indicated since first time is worth The sum of after receiving third data, the time required to analyzing the third data and estimate the progress signature operation required time, the Two time values indicate that first terminal sends out third data to receiving the required time of the 4th data, and are passed in the case of wired connection It is defeated to delay very little, it can be ignored, at this point, whether first terminal matches the first time value and second time value When being verified, it can be deduced that the first time value and second time value matching.
If there are the long-range abduction of third party's illegality equipment between first terminal and second terminal, since third party is non- Method equipment after the illegal operations such as the data kidnapped are forwarded or distort to needing to occupy the regular hour, then due to second Terminal can just send execution signature operation after receiving third data (i.e. notice instruction information) always, and send the 4th number The invalid data that retransmits after the long-range abduction of third party's illegality equipment that treated according to, the 4th data to first terminal, At this time first terminal receive the invalid data of return time be naturally larger than at the first time value, by the first time value It is verified with whether second time value matches, it can be found that in the case where there is long-range kidnap, the second time value meeting It is worth more than first time, that is, value and the second time value can not match at the first time, to which remote data abduction have occurred After can effectively identify invalid data, and then respective handling measure can be taken, such as interrupt subsequent processing, abandon illegal number According to, disconnect first terminal and second terminal communication connection etc., ensure that data transmission between first terminal and second terminal Safety.
As a kind of optional embodiment of the present embodiment, the specified value is greater than or equal to the second terminal to institute The first data are stated to be handled to obtain the second data required time;Since first terminal reaches specified value in the first timing When, third data are sent, second terminal can carry out signature behaviour after receiving third data using the second data and first time value Make, specified value is set greater than, first data are handled to obtain needed for the second data equal to the second terminal The time wanted, after third data being received to avoid second terminal, second terminal is not also complete to the first data processing, is unable to get The case where second data.
As a kind of optional embodiment of the present embodiment, the specified value is pre-stored in the first terminal, for example, Specified value can be pre-stored in the secure storage areas in first terminal in advance, when first terminal needs in use, from secure storage Area obtains.
A kind of optional embodiment as the present embodiment is, it is specified that numerical value can also obtain in the following way:Described Before first terminal sends the first data to the second terminal, held consultation by the first terminal and the second terminal It arrives;Following manner may be used in the realization for negotiating to obtain specified value:The first terminal carries out two-way with the second terminal Authentication, after the two-way authentication passes through, the first terminal is negotiated to be transmitted with the second terminal Key;The second terminal generates the specified value, and is encrypted to the specified value using the transmission key, will encrypt Specified value afterwards is sent to the first terminal;The first terminal is using the transmission key to the encrypted regulation Numerical value is decrypted to obtain the specified value, and preserves;Alternatively, the first terminal generates the specified value, and described in utilization Transmission key encrypts the specified value, and encrypted specified value is sent to the second terminal;The second terminal The encrypted specified value is decrypted to obtain the specified value using the transmission key, and is preserved;Alternatively, negotiating to obtain Following manner can also be used by obtaining the realization of specified value:The first terminal carries out two-way identity with the second terminal to be recognized Card;After the two-way authentication passes through, the second terminal generates the specified value, and utilizes the first terminal Public key the specified value is encrypted, encrypted specified value is sent to the first terminal;The first terminal profit The encrypted specified value is decrypted to obtain the specified value with its private key, and is preserved;Alternatively, in the two-way body After part certification passes through, the first terminal generates the specified value, and using the public key of the second terminal to the regulation Numerical value is encrypted, and encrypted specified value is sent to the second terminal;The second terminal is added using its private key to described Specified value after close decrypts to obtain the specified value, and preserves.
As a kind of optional embodiment of the present embodiment, the second terminal analyzes the third data required time and is The second terminal is estimated to obtain;Alternatively,
The second terminal can also be obtained the time required to analyzing the third data by timing, be implemented as follows: The second terminal starts third timing when the third data receiver finishes;The second terminal to the third data into Row analysis, it is the analysis third to obtain the third timing when third data analysis finishes to reach time value The time required to data.
As a kind of optional embodiment of the present embodiment, when timing mode is clock timing, the specified value is Preset duration, the first terminal when reaching preset duration specifically for the duration obtained in first timing, generate third The level signal of data;
Alternatively, when timing mode be counter counts constantly, the specified value is default count value, and described first eventually End is specifically used for starting the first counting;The first terminal reaches default counting specifically for the numerical value counted to get first When numerical value, the level signal of third data is generated.
As a kind of optional embodiment of the present embodiment, above-mentioned timing can be to start to trigger in data transmission, touch Hair timing is implemented as follows:
The first terminal is specifically used for during sending the level signal of first data, described first When detecting that edge variation meets start bit edge variation characteristic at wired communication interface in level signal, continue described first Detect whether edge variation meets the edge variation generated when transmission data at wired communication interface in follow-up level signal, if It is then to start the first timing, start bit edge variation characteristic is the edge variation of presets or is in specific regularity The edge of variation changes;
The first terminal, also particularly useful for during sending the level signal of the third data, described the Edge variation is detected at one wired communication interface in level signal when meeting start bit edge variation characteristic, is continued described the Detect whether edge variation meets the edge variation generated when transmission data at one wired communication interface in follow-up level signal, such as Fruit is then to start the second timing, and start bit edge variation characteristic is the edge variation of presets or is in specific rule Property variation edge variation.
By taking the first wired communication interface and the second wired communication interface are USB interface as an example, lower first terminal is briefly introduced The realization process communicated by USB interface with second terminal:When not having data transmission, USB interface is in Idle state, when need When wanting transmission data, level signal can be transferred to K state from Idle state (process is also referred to as data at D+ and D- in USB interface Beginning (SOP) state of packet), later, start using differential signal transmission data at D+ and D- in USB interface, usual data First is first of synchronization field SYNC, when detecting first of synchronization field SYNC, can also determine USB Interface is in data transmission state.When the data transfer ends, last position of usual data is check bit CRC, and check bit CRC is passed After the completion of defeated, level signal enters SE0 states at D+ and D- in USB interface, can be transferred to J states (process by SE0 states later Also referred to as data end-of-packet (EOP) state).Wherein, level signal at D+ and D- in USB interface under SOP states and EOP states Feature specifically may refer to the relevant regulations in usb protocol, and details are not described herein.
Implementation based on USB interface triggering timing is as follows:First terminal detects D+ at the first wired communication interface The edge variation of level signal at pin and D- pins, which meets, to be entered K state by idle state and (namely detects data packet Start SOP) corresponding level signal generate edge variation characteristic when, then it represents that detect and meet start bit edge variation characteristic Level signal, continue to detect the edge variation of level signal at follow-up D+ pins and D- pins, if edge variation meets When the edge variation characteristic that first (such as synchronization field SYNC first) corresponding level signal of transport packet generates, Then explanation detects that the edge variation of level signal meets the edge variation generated when transmission data, that is, indicates the first cable modem Letter interface is in data transmission state, starts the first timing (the realization process of the second timing and the realization class of the first timing at this time Seemingly, details are not described herein).
Certainly, the first wired communication interface and the second wired communication interface can also be Contact Type Ic Card communication interface, letter Introduce the realization process that lower first terminal and second terminal are communicated by Contact Type Ic Card communication interface:Contact Type Ic Card Input and output I/O interfaces use character mode transmission data.Before data is transmitted, I/O interfaces are high level state.Each Character is made of 10 continuous positions:The start bit of 1 low level state, 8 data bit of composition data byte and 1 odd even Check bit.I/O interfaces enter guard time after the completion of character transmission, and in guard time, I/O interfaces are in high level state.
Realization based on Contact Type Ic Card communication interface triggering timing is as follows:First terminal detects that the first wire communication connects The edge variation of level signal meets the edge variation characteristic that the generation of a low level is transferred to by high level at mouth (i.e. I/O interfaces) When, illustrate to detect the level signal for meeting start bit edge variation characteristic, continues to detect the first wired communication interface (i.e. I/ O Interface) at follow-up level signal edge variation meet indicate 8 data bit in the corresponding level signal of first data bit When the edge variation characteristic of generation, illustrate to detect that the edge variation of level signal meets the edge generated when transmission data and becomes Change, the first wired communication interface (i.e. I/O interfaces) is in data transmission state, then starts the first timing (realization of the second timing Process is similar with the realization of the first timing, and details are not described herein);
Certainly, the first wired communication interface and the second wired communication interface can also use the third following communication mode: The data pin of data is used for transmission there are two being all provided in first wired communication interface and the second wired communication interface.By this two The differential signal that a data pin is formed carries out data transmission, and start bit would generally be arranged when data transmission starts, data Start bit generally use parallel signal indicates, such as two data pins are high level or two data pins are low Level, the specific combination how many and using how many a level using high level or low level, level value constitutes start bit can To carry out different set according to different application scenarios, details are not described herein.After data start transmission, the data transmitted use Differential signal indicates, for example, in two data pins one be high level, another is low level, and the data transmitted are different, Two data pins are formed by that differential signal is also different, can specifically be set according to different application scenarios, herein not It repeats again.Stop bits can be set in the data transfer ends, and the stop bits of data generally also uses parallel signal to indicate, such as two A data pin is high level or two data pins are low level, specifically uses high level or low level, level The how many and combination using how many a level of value, which constitutes stop bits, to carry out different set according to different application scenarios, This is repeated no more.It is understood that used by the specific level value of parallel signal and stop bits that the data start bit uses The specific level value of parallel signal is different, to show difference.
Realization based on the third communication mode triggering timing is as follows:It is used with being equipped in first wired communication interface For the first pin and second pin of transmission data;First terminal level signal and described at first pin Detect that the level signal number of edge variation is one at second pin in level signal, subsequently again at first pin When detecting that the level signal number of edge variation is two at level signal and the second pin in level signal, illustrate elder generation The level signal for meeting start bit edge variation characteristic is detected, it is rear to have detected data transmission again, then start the first timing (the realization process of the second timing is similar with the realization of the first timing, and details are not described herein).
Due to indicating that the level signal of start bit is parallel signal in the communication mode, indicate to wait in data transmission procedure The level signal of transmission data is differential signal, and when parallel signal becomes differential signal, level signal at two data pins In the edge of a level signal can change, data to be transmitted is different in data transmission procedure, and differential signal is also different, The variation of differential signal can cause the edge of two level signals in level signal at two data pins to change, if First terminal level signal at two data pins detects that the changed level signal number in edge is one, subsequently again It detects that the changed level signal number in edge is two in level signal at two data pins, illustrates first to detect Data start bits, it is follow-up to detect that data are being transmitted again, thus start timing.
As a kind of optional embodiment of the present embodiment, above-mentioned timing can be the end trigger in data transmission, touch Hair timing is implemented as follows:
In present embodiment, the first terminal is specifically used for the process in the level signal for sending first data In, the edge generated when whether edge variation meets transmission data is detected in level signal at first wired communication interface Variation, if so, continuing to detect that edge variation meets end in follow-up level signal at first wired communication interface When the edge variation characteristic of position, then start the first timing, wherein stop bits edge variation characteristic includes:The side of presets Change along variation or in the edge of specific regularity variation;
The first terminal is also particularly useful for during sending the level signal of the third data, described first Detect whether edge variation meets the edge variation generated when transmission data at wired communication interface in level signal, if so, It is special that continuation detects that edge variation meets the variation of stop bits edge in follow-up level signal at first wired communication interface When sign, then start the second timing, wherein stop bits edge variation characteristic includes:The edge of presets changes or is in The edge variation of specific regularity variation.
Implementation based on USB interface triggering timing is following, and (the realization process communicated based on USB interface is referring to upper Literary related record, details are not described herein):
First terminal detects the edge variation of level signal at D+ pins and D- pins in the first wired communication interface, if Edge variation meets the edge variation that the corresponding level signal in last position (such as check bit CRC) of transport packet generates When feature, then explanation detects that the edge variation of level signal meets the edge variation generated when transmission data, after continuing detection The edge variation of level signal at continuous D+ pins and D- pins, if detect that edge variation meets is transferred to J states by SE0 states When the edge variation characteristic that (namely detecting data end-of-packet (EOP) state) corresponding level signal generates, then it represents that inspection The level signal for meeting stop bits edge variation characteristic is measured, then starts the first timing (realization process and first of the second timing The realization of timing is similar, and details are not described herein).
Realization based on Contact Type Ic Card communication interface triggering timing (is led to as follows based on Contact Type Ic Card communication interface The realization of letter sees above associated description, and details are not described herein):
First terminal detects that the edge variation of the first wired communication interface (i.e. I/O interfaces) level signal meets expression 8 When the edge variation characteristic that the corresponding level signal of the last one data bit in a data bit generates, illustrate to detect that level is believed Number edge variation meet generated when transmission data edge variation, continue to detect that (i.e. I/O connects the first wired communication interface Mouthful) the edge variation of follow-up level signal when meeting the edge variation characteristic that the corresponding high level signal of guard time generates, says It is bright to detect the level signal for meeting stop bits edge variation characteristic, then start the first timing (the realization process of the second timing with The realization of first timing is similar, and details are not described herein).
Following (the reality communicated based on the third communication mode of realization based on the third communication mode triggering timing Referring now to associated description above, details are not described herein):
For being equipped in first wired communication interface and be used for transmission the first pin and the second pin of data;
The first terminal detects at level signal and the second pin in level signal at first pin The level signal number of edge variation is two, the follow-up electricity at level signal and the second pin at first pin again It detects that the level signal number of edge variation is one in ordinary mail number, illustrates first to have detected data transmission, it is rear to detect again To the level signal for meeting the variation of stop bits edge, then start the first timing (the realization process of the second timing and the first timing Realize similar, details are not described herein).
Due to indicating that the level signal of start bit is parallel signal in the communication mode, indicate to wait in data transmission procedure The level signal of transmission data is differential signal, and when parallel signal becomes differential signal, level signal at two data pins In the edge of a level signal can change, data to be transmitted is different in data transmission procedure, and differential signal is also different, The variation of differential signal can cause the edge of two level signals in level signal at two data pins to change, if First terminal level signal at two data pins detects that the changed level signal number in edge is two, subsequently again It detects that the changed level signal number in edge is one in level signal at two data pins, illustrates first to detect There are data transmitting, it is follow-up to detect end of data position again, thus start timing.
As a kind of optional embodiment of the present embodiment, above-mentioned timing can be to start to trigger in data transmission, touch Another realization for sending out timing is as follows:
In present embodiment, the first terminal is specifically used for the process in the level signal for sending first data In, when detecting that edge variation meets start bit edge variation characteristic in level signal at first wired communication interface, Then start the first timing, continues to detect at first wired communication interface whether carry data in follow-up level signal, if Data are carried, then continue timing, if not carrying data, terminate timing;Wherein, the start bit edge variation characteristic packet It includes:The edge of presets changes or changes in the edge of specific regularity variation;
The first terminal is also particularly useful for during sending the level signal of the third data, described first When detecting that edge variation meets start bit edge variation characteristic at wired communication interface in level signal, then start the second meter When, continue to detect at first wired communication interface whether carry data in follow-up level signal, if carrying data, Continue timing and terminates timing if not carrying data;Wherein, start bit edge variation characteristic includes:Presets Edge changes or changes in the edge of specific regularity variation.
Implementation based on USB interface triggering timing is following, and (the realization process communicated based on USB interface is referring to upper Literary related record, details are not described herein):
First terminal detects the edge variation of the level signal at D+ pins and D- pins at the first wired communication interface Meet and the corresponding level signal edge K state (SOP namely detecting data packet) variation characteristic is entered by idle state When, then it represents that it detects the level signal for meeting start bit edge variation characteristic, then starts the first timing, continue to detect follow-up D+ Level signal at pin and D- pins, and data decoding is carried out to the level signal, show that the level signal is taken if can decode With data, illustrate to have started normal transmission data after detecting the level signal for meeting start bit edge variation characteristic, then after Continuous timing illustrates that data transmission is likely to occur exception, then suspends meter if decoding failure or appearance exception are unable to get data When.
The realization process of second timing is similar with the realization of the first timing, and details are not described herein.
Realization based on Contact Type Ic Card communication interface triggering timing (is led to as follows based on Contact Type Ic Card communication interface The realization of letter sees above associated description, and details are not described herein):
First terminal detects that the edge variation of level signal at the first wired communication interface (i.e. I/O interfaces) meets by height When level is transferred to the edge variation characteristic of low level generation, illustrate to detect the level for meeting start bit edge variation characteristic Signal starts the first timing, continues to detect follow-up level signal at the first wired communication interface (i.e. I/O interfaces), and to this Level signal carries out data decoding, show that the level signal carries data if can decode, and illustrates to detect and meets start bit Normal transmission data are started after the level signal of edge variation characteristic, have then continued timing, if decoding failure or appearance are abnormal Data are unable to get, illustrate that data transmission is likely to occur exception, then time out.
The realization process of second timing is similar with the realization of the first timing, and details are not described herein.
Following (the reality communicated based on the third communication mode of realization based on the third communication mode triggering timing Referring now to associated description above, details are not described herein):
For being equipped in first wired communication interface and be used for transmission the first pin and the second pin of data;It is described First terminal detects the electricity of edge variation at first pin in level signal at level signal and the second pin Ordinary mail number is one, then starts the first timing, continue to detect at first wired communication interface in follow-up level signal Whether data are carried, if carrying data, illustrates to have opened after detecting the level signal for meeting start bit edge variation characteristic Beginning normal transmission data, then continue timing, if not carrying data, illustrates that data transmission is likely to occur exception, then terminates timing;
The realization process of second timing is similar with the realization of the first timing, and details are not described herein.
Due to indicating that the level signal of start bit is parallel signal in the communication mode, indicate to wait in data transmission procedure The level signal of transmission data is differential signal, and when parallel signal becomes differential signal, level signal at two data pins In the edge of a level signal can change, data to be transmitted is different in data transmission procedure, and differential signal is also different, The variation of differential signal can cause the edge of two level signals in level signal at two data pins to change, if First terminal level signal at two data pins detects that the changed level signal number in edge is one, Ke Yikai Beginning timing, it is follow-up to detect that level signal carries data again, illustrate first to detect data start bit, it is follow-up to detect again Through there are data transmitting, thus continue timing.
As a kind of optional embodiment of the present embodiment, above-mentioned timing can be the end trigger in data transmission, touch Another realization for sending out timing is as follows:
In present embodiment, the first terminal is specifically used for the process in the level signal for sending first data In, when detecting that edge variation meets stop bits edge variation characteristic in level signal at first wired communication interface, Then start the first timing, continues to detect at first wired communication interface whether carry data in follow-up level signal, if Data are carried, then terminate timing, if not carrying data, continue timing;Wherein, the stop bits edge variation characteristic packet It includes the edge variation of presets or changes in the edge of specific regularity variation;
The first terminal is also particularly useful for during sending the level signal of the third data, described first When detecting that edge variation meets stop bits edge variation characteristic at wired communication interface in level signal, then start the second meter When, continue to detect at first wired communication interface whether carry data in follow-up level signal, if carrying data, Terminate timing and continues timing if not carrying data;Wherein, stop bits edge variation characteristic includes presets Edge changes or changes in the edge of specific regularity variation.
Implementation based on USB interface triggering timing is following, and (the realization process communicated based on USB interface is referring to upper Literary related record, details are not described herein):
First terminal detects the edge variation of level signal at D+ pins and D- pins in the first wired communication interface, detection Change to meet to edge and the corresponding level letter of J states (namely detecting data end-of-packet (EOP) state) is transferred to by SE0 states When number edge variation characteristic, then it represents that it detects the level signal for meeting stop bits edge variation characteristic, starts the first timing, after It is continuous to detect level signal at follow-up D+ pins and D- pins, and data decoding is carried out to level signal, if can not be obtained after decoding Data are obtained, illustrates that data transmission has been completed, then continues timing, otherwise, if decoding can obtain data, illustrate data transmission It is not yet fully completed or exception occurs in data transmission, then terminate timing.
The realization process of second timing is similar with the realization of the first timing, and details are not described herein.
Realization based on Contact Type Ic Card communication interface triggering timing (is led to as follows based on Contact Type Ic Card communication interface The realization of letter sees above associated description, and details are not described herein):
When first terminal detects that the edge variation of the first wired communication interface (i.e. I/O interfaces) level signal meets protection Between corresponding high level signal generate edge variation characteristic when, illustrate to detect the level for meeting stop bits edge variation characteristic Signal then starts the first timing, and continues to detect follow-up level signal at the first wired communication interface (i.e. I/O interfaces), and Data decoding is carried out to level signal, if data can not be obtained after decoding, continues timing, otherwise, if decoding can obtain Data are obtained, then terminate timing.
The realization process of second timing is similar with the realization of the first timing, and details are not described herein.
Following (the reality communicated based on the third communication mode of realization based on the third communication mode triggering timing Referring now to associated description above, details are not described herein):
For being equipped in first wired communication interface and be used for transmission the first pin and the second pin of data;
The first terminal detects at level signal and the second pin in level signal at first pin The level signal number of edge variation is one, then starts the first timing, continue after detecting at first wired communication interface Whether data are carried in continuous level signal, if carrying data, terminates timing, if not carrying data, continue timing;
The realization process of second timing is similar with the realization of the first timing, and details are not described herein.
In the present embodiment, it can be seen from the above description that data start bit edge variation characteristic is presets Edge changes, for example, the level signal for meeting data start bit edge variation characteristic in Contact Type Ic Card communication interface uses one A low level indicates, the level signal for meeting end of data position edge variation characteristic use high level expression (guard time is holds Continue one section of high level) or data start bit edge variation characteristic in it is specific regularity variation edge variation, for example, The level signal for meeting data start bit edge variation characteristic in USB interface is that (level signal is transferred to K from Idle state using SOP State) it indicates, meeting the level signal of end of data position edge variation characteristic, (level signal is transferred to J from SE0 states using EOP State) it indicates.Certainly, it is also not limited to this, various forms of edge variation characteristics may be used according to different communication interfaces Indicate data start bit feature, for example, it is also possible to using multiple high level and low level combination or single high level, or Single low level of person etc., this is not restricted.
It should be noted that the data interaction side provided in above-described embodiment 1 may be implemented in system provided in this embodiment Method, the relevant function of first terminal are realized referring also to the relevant description in first terminal side, second terminal in above-described embodiment 1 Relevant function realizes that details are not described herein referring also to the relevant description in second terminal side in above-described embodiment 1.
Any process described otherwise above or method description are construed as in flow chart or herein, and expression includes It is one or more for realizing specific logical function or process the step of executable instruction code module, segment or portion Point, and the range of the preferred embodiment of the present invention includes other realization, wherein can not press shown or discuss suitable Sequence, include according to involved function by it is basic simultaneously in the way of or in the opposite order, to execute function, this should be of the invention Embodiment person of ordinary skill in the field understood.
It should be appreciated that each section of the present invention can be realized with hardware, software, firmware or combination thereof.Above-mentioned In embodiment, software that multiple steps or method can in memory and by suitable instruction execution system be executed with storage Or firmware is realized.It, and in another embodiment, can be under well known in the art for example, if 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, with 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 realize all or part of step that above-described embodiment method carries Suddenly it is that relevant hardware can be instructed to complete by program, the program can be stored in a kind of computer-readable storage medium In matter, which includes the steps that one or a combination set of embodiment of the method when being executed.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing module, it can also That each unit physically exists alone, can also two or more units be integrated in a module.Above-mentioned integrated mould The form that hardware had both may be used in block is realized, 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 when sold or used as an independent product, can also be stored in a computer In read/write memory medium.
Storage medium mentioned above can be read-only memory, 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 spy described in conjunction with this embodiment or example Point is included at least one embodiment or example of the invention.In the present specification, schematic expression of the above terms are not Centainly refer to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be any One or more embodiments or example in can be combined in any suitable manner.
Although the embodiments of the present invention has been shown and described above, it is to be understood that above-described embodiment is example Property, it is not considered as limiting the invention, those skilled in the art are not departing from the principle of the present invention and objective In the case of can make changes, modifications, alterations, and variations to the above described embodiments within the scope of the invention.The scope of the present invention By appended claims and its equivalent limit.

Claims (16)

1. a kind of data communications method, which is characterized in that the first wired communication interface of first terminal and the second of second terminal Wired communication interface connects, the method includes:
The first terminal generates the level signal of the first data, and sends described first by first wired communication interface The level signal of data;
The first terminal detects first wired communication interface during sending the level signal of first data The edge variation for locating level signal, the edge of level signal, which changes, at first wired communication interface meets timing triggering item When part, start the first timing;
The second terminal receives the level signal of first data by second wired communication interface, to described first Data are handled to obtain the second data;
The first terminal generates the level signal of third data when first timing reaches specified value, and passes through institute The level signal that the first wired communication interface sends the third data is stated, the third data are notice instruction information;
The first terminal detects first wired communication interface during sending the level signal of the third data The edge variation for locating level signal, the edge of level signal, which changes, at first wired communication interface meets timing triggering item When part, start the second timing;
The second terminal receives the level signal of the third data by second wired communication interface, treats A.L.S. Breath is signed, and obtains signed data, and the information to be signed includes second data and value at the first time, when described first Between value be the time required to the second terminal analyzes the third data with the sum of estimate the time required to carrying out the signature operation;
The second terminal generates the level signal of the 4th data, and sends the described 4th by second wired communication interface The level signal of data, the 4th data include the information to be signed and the signed data;
The first terminal receives the level signal of the 4th data by first wired communication interface, and described in acquisition The second time value that the second timing reaches described in when the level signal of 4th data starts to receive;The first terminal is to the label Name data carry out sign test operation, and whether the first time value and second time value are matched and verified, if sign test By and verification pass through, it is determined that second data be secure data.
2. according to the method described in claim 1, it is characterized in that,
The first terminal is during sending the level signal of first data, at first wired communication interface When the edge variation of level signal meets timing trigger condition, start the first timing, including:
The first terminal is during sending the level signal of first data, at first wired communication interface When detecting that edge variation meets start bit edge variation characteristic in level signal, continue at first wired communication interface Whether the variation of detection edge meets the edge variation generated when transmission data in follow-up level signal, if it is, starting first Timing, start bit edge variation characteristic are the edge variation of presets or become in the edge of specific regularity variation Change;
The first terminal is during sending the level signal of the third data, at first wired communication interface When the edge variation of level signal meets timing trigger condition, start the second timing, including:
The first terminal is during sending the level signal of the third data, at first wired communication interface When detecting that edge variation meets start bit edge variation characteristic in level signal, continue at first wired communication interface Whether the variation of detection edge meets the edge variation generated when transmission data in follow-up level signal, if it is, starting second Timing, start bit edge variation characteristic are the edge variation of presets or become in the edge of specific regularity variation Change.
3. according to the method described in claim 1, it is characterized in that,
The first terminal is during sending the level signal of first data, at first wired communication interface When the edge variation of level signal meets timing trigger condition, start the first timing, including:
The first terminal is during sending the level signal of first data, at first wired communication interface Detect whether edge variation meets the edge variation generated when transmission data in level signal, if so, continuing described first When detecting that edge variation meets stop bits edge variation characteristic at wired communication interface in follow-up level signal, then start first Timing, wherein stop bits edge variation characteristic includes:The edge of presets changes or in specific regularity variation Edge changes;
The first terminal is during sending the level signal of the third data, at first wired communication interface When the edge variation of level signal meets timing trigger condition, start the second timing, including:
The first terminal is during sending the level signal of the third data, at first wired communication interface Detect whether edge variation meets the edge variation generated when transmission data in level signal, if so, continuing described first When detecting that edge variation meets stop bits edge variation characteristic at wired communication interface in follow-up level signal, then start second Timing, wherein stop bits edge variation characteristic includes:The edge of presets changes or in specific regularity variation Edge changes.
4. according to the method described in claim 1, it is characterized in that,
The first terminal is during sending the level signal of first data, at first wired communication interface When the edge variation of level signal meets timing trigger condition, start the first timing, including:
The first terminal is during sending the level signal of first data, at first wired communication interface When detecting that edge variation meets start bit edge variation characteristic in level signal, then starts the first timing, continue described in detection Whether data are carried in follow-up level signal at first wired communication interface, if carrying data, continue timing, if not having Data are carried, then terminate timing;Wherein, start bit edge variation characteristic includes:The edge of presets changes or is in The edge variation of specific regularity variation;
The first terminal is during sending the level signal of the third data, at first wired communication interface When the edge variation of level signal meets timing trigger condition, start the second timing, including:
The first terminal is during sending the level signal of the third data, at first wired communication interface When detecting that edge variation meets start bit edge variation characteristic in level signal, then starts the second timing, continue described in detection Whether data are carried in follow-up level signal at first wired communication interface, if carrying data, continue timing, if not having Data are carried, then terminate timing;Wherein, start bit edge variation characteristic includes:The edge of presets changes or is in The edge variation of specific regularity variation.
5. according to the method described in claim 1, it is characterized in that,
The first terminal is during sending the level signal of first data, at first wired communication interface When the edge variation of level signal meets timing trigger condition, start the first timing, including:
The first terminal is during sending the level signal of first data, at first wired communication interface When detecting that edge variation meets stop bits edge variation characteristic in level signal, then starts the first timing, continue described in detection Whether data are carried in follow-up level signal at first wired communication interface, if carrying data, terminate timing, if not having Data are carried, then continue timing;Wherein, stop bits edge variation characteristic includes the edge variation of presets or is in spy The edge variation of fixed regularity variation;
The first terminal is during sending the level signal of the third data, at first wired communication interface When the edge variation of level signal meets timing trigger condition, start the second timing, including:
The first terminal is during sending the level signal of the third data, at first wired communication interface When detecting that edge variation meets stop bits edge variation characteristic in level signal, then starts the second timing, continue described in detection Whether data are carried in follow-up level signal at first wired communication interface, if carrying data, terminate timing, if not having Data are carried, then continue timing;Wherein, stop bits edge variation characteristic includes the edge variation of presets or is in spy The edge variation of fixed regularity variation.
6. according to claim 1-5 any one of them methods, which is characterized in that
The specified value is handled to obtain needed for the second data more than or equal to the second terminal to first data The time wanted;
The specified value is pre-stored in the first terminal, or sends first to the second terminal in the first terminal Before data, hold consultation to obtain by the first terminal and the second terminal.
7. according to claim 1-5 any one of them methods, which is characterized in that
The second terminal is that the second terminal is estimated to obtain the time required to analyzing the third data;Alternatively,
Acquisition modes the time required to the second terminal analyzes the third data include:The second terminal is in the third Start third timing when data receiver finishes;The second terminal analyzes the third data, obtains the third number It is the analysis third data required time that third timing when being finished according to analysis, which reaches time value,.
8. according to claim 1-5 any one of them methods, which is characterized in that
The specified value is preset duration, described when first timing reaches specified value, including:In first meter When obtained duration when reaching preset duration;
Alternatively, the specified value is default count value, the first timing of the beginning, including:Start first to count;It is described When first timing reaches specified value, including:When the numerical value that first counts to get reaches default count value.
9. a kind of data communication system, which is characterized in that the first wired communication interface of first terminal and the second of second terminal Wired communication interface connects, the system comprises:
The first terminal, the level signal for generating the first data, and institute is sent by first wired communication interface State the level signal of the first data;During sending the level signal of first data, first cable modem is detected The edge variation for believing interface level signal, the edge of level signal, which changes, at first wired communication interface meets timing When trigger condition, start the first timing;
The second terminal, the level signal for receiving first data by second wired communication interface, to institute The first data are stated to be handled to obtain the second data;
The first terminal is additionally operable to when first timing reaches specified value, generates the level signal of third data, and The level signal of the third data is sent by first wired communication interface, the third data are notice instruction letter Breath;During sending the level signal of the third data, level signal at first wired communication interface is detected Edge changes, the edge variation of level signal when meeting timing trigger condition at first wired communication interface, starts the Two timing;
The second terminal is additionally operable to receive the level signal of the third data by second wired communication interface, right Information to be signed is signed, and signed data is obtained, and the information to be signed includes second data and first time value, institute It states the time required to value at the first time is the second terminal analysis third data and estimates and carry out needed for the signature operation The sum of time;And the level signal of the 4th data is generated, and the 4th number is sent by second wired communication interface According to level signal, the 4th data include the information to be signed and the signed data;
The first terminal is additionally operable to receive the level signal of the 4th data by first wired communication interface, and The second time value for reaching of second timing described in obtaining when the level signals of the 4th data starts to receive;The first terminal Sign test operation is carried out to the signed data, whether the first time value and second time value are matched and verified, If sign test by and verification pass through, it is determined that second data be secure data.
10. system according to claim 9, which is characterized in that
The first terminal is specifically used for during sending the level signal of first data, wired described first When detecting that edge variation meets start bit edge variation characteristic at communication interface in level signal, continue wired described first Detect whether edge variation meets the edge variation generated when transmission data at communication interface in follow-up level signal, if so, Then start the first timing, start bit edge variation characteristic is the edge variation of presets or changes in specific regularity Edge variation;
The first terminal has also particularly useful for during sending the level signal of the third data described first When detecting that edge variation meets start bit edge variation characteristic at line communication interface in level signal, continuation has described first Detect whether edge variation meets the edge variation generated when transmission data at line communication interface in follow-up level signal, if It is then to start the second timing, start bit edge variation characteristic is the edge variation of presets or is in specific regularity The edge of variation changes.
11. system according to claim 9, which is characterized in that
The first terminal is specifically used for during sending the level signal of first data, wired described first Detect whether edge variation meets the edge variation generated when transmission data at communication interface in level signal, if so, continuing When detecting that edge variation meets stop bits edge variation characteristic in follow-up level signal at first wired communication interface, Then start the first timing, wherein stop bits edge variation characteristic includes:The edge of presets changes or is in specific rule The edge variation of rule property variation;
The first terminal has also particularly useful for during sending the level signal of the third data described first Detect whether edge variation meets the edge variation generated when transmission data at line communication interface in level signal, if so, after Continue and detects that edge variation meets stop bits edge variation characteristic in follow-up level signal at first wired communication interface When, then start the second timing, wherein stop bits edge variation characteristic includes:The edge of presets changes or in spy The edge variation of fixed regularity variation.
12. system according to claim 9, which is characterized in that
The first terminal is specifically used for during sending the level signal of first data, wired described first When detecting that edge variation meets start bit edge variation characteristic at communication interface in level signal, then start the first timing, after Whether data are carried in follow-up level signal at continuous detection first wired communication interface, if carrying data, continued Timing terminates timing if not carrying data;Wherein, start bit edge variation characteristic includes:The edge of presets Variation changes in the edge of specific regularity variation;
The first terminal has also particularly useful for during sending the level signal of the third data described first When detecting that edge variation meets start bit edge variation characteristic at line communication interface in level signal, then start the second timing, Continue to detect at first wired communication interface and whether carries data in follow-up level signal, if carrying data, after Continuous timing terminates timing if not carrying data;Wherein, start bit edge variation characteristic includes:The side of presets Change along variation or in the edge of specific regularity variation.
13. system according to claim 9, which is characterized in that
The first terminal is specifically used for during sending the level signal of first data, wired described first When detecting that edge variation meets stop bits edge variation characteristic at communication interface in level signal, then start the first timing, after Whether data are carried in follow-up level signal at continuous detection first wired communication interface, if carrying data, terminated Timing continues timing if not carrying data;Wherein, stop bits edge variation characteristic includes the edge of presets Variation changes in the edge of specific regularity variation;
The first terminal has also particularly useful for during sending the level signal of the third data described first When detecting that edge variation meets stop bits edge variation characteristic at line communication interface in level signal, then start the second timing, Continue to detect at first wired communication interface and whether carry data in follow-up level signal, if carrying data, ties Beam timing continues timing if not carrying data;Wherein, stop bits edge variation characteristic includes the side of presets Change along variation or in the edge of specific regularity variation.
14. according to claim 9-13 any one of them systems, which is characterized in that
The specified value is handled to obtain needed for the second data more than or equal to the second terminal to first data The time wanted;
The specified value is pre-stored in the first terminal, or sends first to the second terminal in the first terminal Before data, hold consultation to obtain by the first terminal and the second terminal.
15. according to claim 9-13 any one of them systems, which is characterized in that
The second terminal is that the second terminal is estimated to obtain the time required to analyzing the third data;Alternatively,
The second terminal is additionally operable to start third timing when the third data receiver finishes;And to the third number According to being analyzed, it is described in the analysis to obtain the third timing when third data analysis finishes to reach time value The time required to third data.
16. according to claim 9-13 any one of them systems, which is characterized in that
The specified value is preset duration, and the first terminal reaches specifically for the duration obtained in first timing When preset duration, the level signal of third data is generated;
Alternatively, the specified value is default count value, the first terminal is specifically used for starting the first counting;Described One terminal when reaching default count value specifically for the numerical value counted to get first, generates the level signal of third data.
CN201710137023.0A 2017-03-09 2017-03-09 Data communication method and system Active CN108573158B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710137023.0A CN108573158B (en) 2017-03-09 2017-03-09 Data communication method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710137023.0A CN108573158B (en) 2017-03-09 2017-03-09 Data communication method and system

Publications (2)

Publication Number Publication Date
CN108573158A true CN108573158A (en) 2018-09-25
CN108573158B CN108573158B (en) 2021-07-20

Family

ID=63577672

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710137023.0A Active CN108573158B (en) 2017-03-09 2017-03-09 Data communication method and system

Country Status (1)

Country Link
CN (1) CN108573158B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110472421A (en) * 2019-07-22 2019-11-19 深圳中电长城信息安全系统有限公司 Mainboard, firmware safety detection method and terminal device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110472421A (en) * 2019-07-22 2019-11-19 深圳中电长城信息安全系统有限公司 Mainboard, firmware safety detection method and terminal device
CN110472421B (en) * 2019-07-22 2021-08-20 深圳中电长城信息安全系统有限公司 Mainboard and firmware safety detection method and terminal equipment

Also Published As

Publication number Publication date
CN108573158B (en) 2021-07-20

Similar Documents

Publication Publication Date Title
EP2291947B1 (en) Decoupling of measuring the response time of a transponder and its authentication
CN100566255C (en) Improve the method and system of safety of intelligent key equipment
JP2019530040A (en) Device logical validation against fraud and tampering
KR20160074605A (en) Systems and methods for linking devices to user accounts
JP2013512486A (en) Authenticated data transmission
EP2991263B1 (en) Offline pin authentication method and system for ic card
US8117449B2 (en) Method to detect man-in-the-middle (MITM) or relay attacks
CN101645124B (en) Method for unlocking PIN code and intelligent secret key device
WO2015032255A1 (en) Intelligent key device, mobile terminal and dynamic password output method and system
CN107437997B (en) Radio frequency communication device and method
CN108573158A (en) A kind of data communications method and system
CN110149210A (en) A kind of data transmission method and device
CN108573157A (en) A kind of data interactive method and system
CN103346886B (en) A kind of method sending signed data and electronic signature token
CN108574662A (en) A kind of data communications method and system
CN106503592B (en) Encryption method and system based on programmable logic device
CN106503782B (en) NFC smart card analogy method and device
CN108574663A (en) A kind of safe transmission method and system
CN108573159A (en) A kind of data interactive method and system
CN208061206U (en) A kind of information processing unit for realizing big data safety
Fraj et al. A global approach for the improvement of UHF RFID safety and security
CN108574665A (en) A kind of safe transmission method and system
JP5514780B2 (en) COMMUNICATION SYSTEM, TRANSMISSION DEVICE, AND RECEPTION DEVICE
CN112713991A (en) Secure communication method and system for protecting key negotiation by using timing communication
CN102185697B (en) Solution of two-factor authentication security system

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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220413

Address after: Tiantianrong building, No. 1, Zhongguancun, Beiqing Road, Haidian District, Beijing 100094

Patentee after: TENDYRON Corp.

Address before: 100086 room 603, building 12, taiyueyuan, Haidian District, Beijing

Patentee before: Li Ming

TR01 Transfer of patent right