CN104168045B - Data transmission method and data transmission device - Google Patents

Data transmission method and data transmission device Download PDF

Info

Publication number
CN104168045B
CN104168045B CN201410439004.XA CN201410439004A CN104168045B CN 104168045 B CN104168045 B CN 104168045B CN 201410439004 A CN201410439004 A CN 201410439004A CN 104168045 B CN104168045 B CN 104168045B
Authority
CN
China
Prior art keywords
terminal
role
work
discovery
response
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410439004.XA
Other languages
Chinese (zh)
Other versions
CN104168045A (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.)
Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Original Assignee
Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
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 Yulong Computer Telecommunication Scientific Shenzhen Co Ltd filed Critical Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Priority to CN201410439004.XA priority Critical patent/CN104168045B/en
Publication of CN104168045A publication Critical patent/CN104168045A/en
Application granted granted Critical
Publication of CN104168045B publication Critical patent/CN104168045B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The present invention proposes a kind of data transmission method and a kind of data transmission device, and for terminal, the terminal is connected with other-end, and the data transmission method includes:Judge step, according to the current near-field communication interface information of the terminal, judge the corresponding work at present role of the terminal;Obtaining step, obtains work at present role corresponding with the other-end that the terminal is connected;Determine step, according to the terminal and the corresponding work at present role of the other-end, determine the transmitting terminal and receiving terminal in near-field communication;Interactive step, according to the determination result of the determination step, sends near-field communication information, or receive the near-field communication information that the other-end sends after the connecting link activation between the transmitting terminal and the receiving terminal to the other-end.By technical scheme, automatically delivering for the point-to-point information of NFC can be completed, be convenient for users to operate, improve Consumer's Experience.

Description

Data transmission method and data transmission device
Technical field
The present invention relates to technical field of data transmission, passed in particular to a kind of data transmission method and a kind of data Defeated device.
Background technology
The NFC point-to-point transmission function of existing mobile terminal generally needs the screen ability that user's click transmitting terminal reduces complete Into the transmission of information.Specifically, user is in function point-to-point using NFC, it is necessary first to put two NFC terminals back-to-back Put, then click on the screen of transmitting terminal diminution to complete the transmission of information, this process generally needs both hands to co-operate ability Complete, when the point-to-point information transfers of the people NFC of user one, both hands carry out simultaneously operate it is very inconvenient, especially for volume Larger large-screen mobile phone.
Therefore, how to make user easily carries out the point-to-point information transfers of NFC, as current problem demanding prompt solution.
The content of the invention
The present invention is based on above mentioned problem, it is proposed that a kind of new technical scheme, can complete the point-to-point information of NFC Automatically deliver, with user-friendly.
In view of this, the present invention proposes a kind of data transmission method, and for terminal, the terminal connects with other-end Connect, including:Judge step, according to the current near-field communication interface information of the terminal, judge the corresponding current work of the terminal Make role;Obtaining step, obtains work at present role corresponding with the other-end that the terminal is connected;Determine step, according to The terminal and the corresponding work at present role of the other-end, determine the transmitting terminal and receiving terminal in near-field communication;Interaction Step, according to the determination result of the determination step, after the connecting link activation between the transmitting terminal and the receiving terminal Near-field communication information is sent to the other-end, or receives the near-field communication information that the other-end sends.
In the technical scheme, according to the current near-field communication interface information of terminal, i.e., the NFC transmission interface residing for terminal The interface information of (can push the application interface of NFC information, such as browser interface, contact person interface) determines NFC The work role of P2P (i.e. NFC point-to-point transmission function), and the work role of other-end is obtained, to determine NFC P2P business Transmitting terminal and receiving terminal, between transmitting terminal and receiving terminal connecting link activation after, transmitting terminal is automatically performed the hair of information Send, receiving terminal receives the information.So, automatic sending function is increased, as long as receiving terminal just may be used when being operated in target side role It is manually operated without user to complete automatically delivering for the point-to-point information of NFC, user is increased while user-friendly Experience.
In the above-mentioned technical solutions, it is preferable that the work role includes initial corner color and target side role, described to obtain Taking step includes:The work at present role that judged result is the terminal be the initial corner color when, to the terminal The other-end of connection sends and finds request;Rung according to the discovery for finding that request sends etc. the other-end to be received Should;When the discovery response is received, find that response judges the work at present role of the other-end according to described;It is described Determine that step includes:When the work at present role that judged result is the other-end is the target side role, institute is determined Terminal is stated for the transmitting terminal, the other-end is the receiving terminal;The interactive step includes:It is determined that the terminal is The transmitting terminal, when the other-end is the receiving terminal, the connecting link between the transmitting terminal and the receiving terminal After activation near-field communication information is sent to the other-end.
In the technical scheme, the work role of NFC terminal mainly includes initial corner color and target side role, operating angle Color is that the terminal of initial corner color sends discovery request to other-end, and judges other ends according to the discovery of other-end response Whether the work role at end is target side role, when the work role of other-end is target side role, determines work role For the terminal of initial corner color is transmitting terminal, other-end is receiving terminal, carries out the automatic transmission of NFC P2P information, so, nothing Need that user's is manually operated, increased Consumer's Experience.
In the above-mentioned technical solutions, it is preferable that also include:When the discovery response is not received, judge whether to receive To the discovery request that the other-end sends;When receiving the discovery that the other-end sends and asking, to it is described other Terminal sends and finds response, so that the other-end finds that response judges the work role of the terminal according to described.
In the technical scheme, when the discovery that terminal does not receive other-end is responded, it is impossible to judge other-end Work role, now the terminal can according to receive discovery request actively to other-end send find response so that its His terminal judges the work role of the terminal according to the discovery response from the terminal for receiving.
In the above-mentioned technical solutions, it is preferable that also include:When the work at present role that judged result is the terminal is institute When stating target side role, the discovery for waiting the other-end to be received to send is asked;When receiving what the other-end sent It was found that during request, finding that request sends the discovery response to the other-end according to described, for the other-end root Find that response judges the work role of the terminal according to described.
In the technical scheme, the work role of terminal is presently in whether interface is that NFC transmission interface comes true by terminal Fixed, when it is determined that the work role of the terminal is target side role, other-end is according to the discovery from the terminal for receiving Response is come to judge the work role of the terminal be target side role.By determining the work role of communicating pair, would operate in just One side of beginning corner color is operated in a side of target side role as receiving terminal as transmitting terminal, can complete NFC P2P information Automatic transmission.
In the above-mentioned technical solutions, it is preferable that it is described find response include the work role of terminal, mode of operation and/or The RF agreement of support.
In the technical scheme, after terminal receives the discovery request of other-end transmission, can be by the work role of itself, work Operation mode and/or the RF agreement of support are sent to the other-end for sending and finding request as discovery response, so as to other-end Discovery response according to receiving judges that the terminal is transmitting terminal/receiving terminal.
In the above-mentioned technical solutions, it is preferable that the mode of operation includes aggressive mode and Passive Mode, in the terminal Work at present role be initial corner color when, the terminal can be operated in the aggressive mode, in the current work of the terminal When making role for target side role, the terminal can be operated in the aggressive mode or the Passive Mode.
In the technical scheme, aggressive mode refers to that terminal is actively produced and non-connects radiofrequency field to complete the pattern of NFC communication, quilt Dynamic model formula refer to terminal do not produce it is non-connect radiofrequency field, but the pattern of communication is completed by way of loading modulation.Initial corner color I.e. hair opens a side of NFC communication, and in the active mode, target side role is the request of the initial side of response in communication process for work One side, can be operated under actively or passively pattern.When interface residing for terminal is that NFC transmits interface, the terminal works is set and is existed Initial corner color, and for aggressive mode under, actively produces Non-contact radio-frequency field, send out and open NFC communication;When interface residing for terminal is non- During NFC transmission interfaces, the terminal works are set in target side role, can be operated under actively or passively pattern.
Another aspect of the present invention proposes a kind of data transmission device, and for terminal, the terminal connects with other-end Connect, including:Judging unit, according to the current near-field communication interface information of the terminal, judges the corresponding current work of the terminal Make role;Acquiring unit, obtains work at present role corresponding with the other-end that the terminal is connected;Determining unit, according to The terminal and the corresponding work at present role of the other-end, determine the transmitting terminal and receiving terminal in near-field communication;Interaction Unit, the determination result according to the determining unit, after the connecting link activation between the transmitting terminal and the receiving terminal Near-field communication information is sent to the other-end, or receives the near-field communication information that the other-end sends.
In the technical scheme, according to the current near-field communication interface information of terminal, i.e., the NFC transmission interface residing for terminal The interface information of (can push the application interface of NFC information, such as browser interface, contact person interface) determines NFC The work role of P2P (i.e. NFC point-to-point transmission function), and the work role of other-end is obtained, to determine NFC P2P business Transmitting terminal and receiving terminal, between transmitting terminal and receiving terminal connecting link activation after, transmitting terminal is automatically performed the hair of information Send, receiving terminal receives the information.So, automatic sending function is increased, as long as receiving terminal just may be used when being operated in target side role It is manually operated without user to complete automatically delivering for the point-to-point information of NFC, user is increased while user-friendly Experience.
In the above-mentioned technical solutions, it is preferable that the work role includes initial corner color and target side role, described to obtain Taking unit includes:Request transmitting unit, when the work at present role that judged result is the terminal is the initial corner color, Sent to the other-end being connected with the terminal and find request;Response receiving unit, wait the other-end to be received according to It is described to find the discovery response that request sends;First judging unit, when the discovery response is received, finds to ring according to described The work at present role of the other-end should be judged;The determining unit specifically for:It it is described other ends in judged result When the work at present role at end is the target side role, the terminal is determined for the transmitting terminal, the other-end is institute State receiving terminal;The interactive unit specifically for:It is determined that the terminal is the transmitting terminal, the other-end connects for described During receiving end, near-field communication is sent to the other-end after the connecting link activation between the transmitting terminal and the receiving terminal Information.
In the technical scheme, the work role of NFC terminal mainly includes initial corner color and target side role, operating angle Color is that the terminal of initial corner color sends discovery request to other-end, and judges other ends according to the discovery of other-end response Whether the work role at end is target side role, when the work role of other-end is target side role, determines work role For the terminal of initial corner color is transmitting terminal, other-end is receiving terminal, carries out the automatic transmission of NFC P2P information, so, nothing Need that user's is manually operated, increased Consumer's Experience.
In the above-mentioned technical solutions, it is preferable that also include:Second judging unit, when the discovery response is not received, Judge whether to receive the discovery request that the other-end sends;And the interactive unit specifically for:Receiving When the discovery for stating other-end transmission is asked, sent to the other-end and find response, so that the other-end is according to institute State the work role for finding that response judges the terminal.
In the technical scheme, when the discovery that terminal does not receive other-end is responded, it is impossible to judge other-end Work role, now the terminal can according to receive discovery request actively to other-end send find response so that its His terminal judges the work role of the terminal according to the discovery response from the terminal for receiving.
In the above-mentioned technical solutions, it is preferable that the interactive unit is additionally operable to:When judged result is the current of the terminal When work role is the target side role, the discovery for waiting the other-end to be received to send is asked, and ought receive institute When the discovery for stating other-end transmission is asked, find that request finds response to other-end transmission is described according to described, with Find that response judges the work role of the terminal according to described for the other-end.
In the technical scheme, the work role of terminal is presently in whether interface is that NFC transmission interface comes true by terminal Fixed, when it is determined that the work role of the terminal is target side role, other-end is according to the discovery from the terminal for receiving Response is come to judge the work role of the terminal be target side role.By determining the work role of communicating pair, would operate in just One side of beginning corner color is operated in a side of target side role as receiving terminal as transmitting terminal, can complete NFC P2P information Automatic transmission.
In the above-mentioned technical solutions, it is preferable that it is described find response include the work role of terminal, mode of operation and/or The RF agreement of support.
In the technical scheme, after terminal receives the discovery request of other-end transmission, can be by the work role of itself, work Operation mode and/or the RF agreement of support are sent to the other-end for sending and finding request as discovery response, so as to other-end Discovery response according to receiving judges that the terminal is transmitting terminal/receiving terminal.
In the above-mentioned technical solutions, it is preferable that the mode of operation includes aggressive mode and Passive Mode, in the terminal Work at present role be initial corner color when, the terminal can be operated in the aggressive mode, in the current work of the terminal When making role for target side role, the terminal can be operated in the aggressive mode or the Passive Mode.
In the technical scheme, aggressive mode refers to that terminal is actively produced and non-connects radiofrequency field to complete the pattern of NFC communication, quilt Dynamic model formula refer to terminal do not produce it is non-connect radiofrequency field, but the pattern of communication is completed by way of loading modulation.Initial corner color I.e. hair opens a side of NFC communication, and in the active mode, target side role is the request of the initial side of response in communication process for work One side, can be operated under actively or passively pattern.When interface residing for terminal is that NFC transmits interface, the terminal works is set and is existed Initial corner color, and for aggressive mode under, actively produces Non-contact radio-frequency field, send out and open NFC communication;When interface residing for terminal is non- During NFC transmission interfaces, the terminal works are set in target side role, can be operated under actively or passively pattern.
By above technical scheme, automatically delivering for the point-to-point information of NFC can be completed, be convenient for users to operate, lifted Consumer's Experience.
Brief description of the drawings
Fig. 1 shows the flow chart of data transmission method according to an embodiment of the invention;
Fig. 2 shows the flow chart of data transmission method according to an embodiment of the invention;
Fig. 3 shows the block diagram of data transmission device according to an embodiment of the invention;
Fig. 4 shows the block diagram of data transmission device according to an embodiment of the invention.
Specific embodiment
It is below in conjunction with the accompanying drawings and specific real in order to be more clearly understood that the above objects, features and advantages of the present invention Mode is applied to be further described in detail the present invention.It should be noted that in the case where not conflicting, the implementation of the application Feature in example and embodiment can be mutually combined.
Many details are elaborated in the following description in order to fully understand the present invention, but, the present invention may be used also Implemented with being different from other modes described here using other, therefore, protection scope of the present invention is not by described below Specific embodiment limitation.
Fig. 1 shows the flow chart of data transmission method according to an embodiment of the invention.
As shown in figure 1, data transmission method according to an embodiment of the invention, including:
Step 102, according to the current near-field communication interface information of terminal, judges the corresponding work at present role of terminal.
Step 104, obtains work at present role corresponding with the other-end that terminal is connected.
Step 106, according to terminal and the corresponding work at present role of other-end, determine transmitting terminal in near-field communication and Receiving terminal.
Step 108, according to determine step determination result, between transmitting terminal and receiving terminal connecting link activation after to Other-end sends near-field communication information, or receives the near-field communication information that other-end sends.
In the technical scheme, according to the current near-field communication interface information of terminal, i.e., the NFC transmission interface residing for terminal The interface information of (can push the application interface of NFC information, such as browser interface, contact person interface) determines NFC The work role of P2P (i.e. NFC point-to-point transmission function), and the work role of other-end is obtained, to determine NFC P2P business Transmitting terminal and receiving terminal, between transmitting terminal and receiving terminal connecting link activation after, transmitting terminal is automatically performed the hair of information Send, receiving terminal receives the information.So, automatic sending function is increased, as long as receiving terminal just may be used when being operated in target side role It is manually operated without user to complete automatically delivering for the point-to-point information of NFC, user is increased while user-friendly Experience.
In the above-mentioned technical solutions, it is preferable that work role includes initial corner color and target side role, step 104 is wrapped Include:When the work at present role that judged result is terminal is initial corner color, hair is sent to the other-end being connected with terminal Now ask;Etc. other-end to be received according to the discovery response for finding that request sends;When discovery response is received, according to discovery Response judges the work at present role of other-end;Step 106 includes:It is the work at present role of other-end in judged result During for target side role, terminal is determined for transmitting terminal, other-end is receiving terminal;Step 108 includes:It is determined that terminal is transmission End, when other-end is receiving terminal, near field is sent after the connecting link activation between transmitting terminal and receiving terminal to other-end The communication information.
In the technical scheme, the work role of NFC terminal mainly includes initial corner color and target side role, operating angle Color is that the terminal of initial corner color sends discovery request to other-end, and judges other ends according to the discovery of other-end response Whether the work role at end is target side role, when the work role of other-end is target side role, determines work role For the terminal of initial corner color is transmitting terminal, other-end is receiving terminal, carries out the automatic transmission of NFC P2P information, so, nothing Need that user's is manually operated, increased Consumer's Experience.
In the above-mentioned technical solutions, it is preferable that also include:When discovery response is not received, judge whether to receive it The discovery request that his terminal sends;When the discovery for receiving other-end transmission is asked, sent to other-end and find response, The work role of terminal is judged according to discovery response for other-end.
In the technical scheme, when the discovery that terminal does not receive other-end is responded, it is impossible to judge other-end Work role, now the terminal can according to receive discovery request actively to other-end send find response so that its His terminal judges the work role of the terminal according to the discovery response from the terminal for receiving.
In the above-mentioned technical solutions, it is preferable that also include:When judged result for the work at present role of terminal is target side During role, the discovery for waiting other-end to be received to send is asked;When the discovery for receiving other-end transmission is asked, according to hair Now ask to be sent to other-end and find response, judge the work role of terminal according to discovery response for other-end.
In the technical scheme, the work role of terminal is presently in whether interface is that NFC transmission interface comes true by terminal Fixed, when it is determined that the work role of the terminal is target side role, other-end is according to the discovery from the terminal for receiving Response is come to judge the work role of the terminal be target side role.By determining the work role of communicating pair, would operate in just One side of beginning corner color is operated in a side of target side role as receiving terminal as transmitting terminal, can complete NFC P2P information Automatic transmission.
In the above-mentioned technical solutions, it is preferable that find that response includes work role, mode of operation and/or the support of terminal RF agreement.
In the technical scheme, after terminal receives the discovery request of other-end transmission, can be by the work role of itself, work Operation mode and/or the RF agreement of support are sent to the other-end for sending and finding request as discovery response, so as to other-end Discovery response according to receiving judges that the terminal is transmitting terminal/receiving terminal.
In the above-mentioned technical solutions, it is preferable that mode of operation includes aggressive mode and Passive Mode, in the current work of terminal When making role for initial corner color, terminal can be operated in aggressive mode, when the work at present role of terminal is target side role, Terminal can be operated in aggressive mode or Passive Mode.
In the technical scheme, aggressive mode refers to that terminal is actively produced and non-connects radiofrequency field to complete the pattern of NFC communication, quilt Dynamic model formula refer to terminal do not produce it is non-connect radiofrequency field, but the pattern of communication is completed by way of loading modulation.Initial corner color I.e. hair opens a side of NFC communication, and in the active mode, target side role is the request of the initial side of response in communication process for work One side, can be operated under actively or passively pattern.When interface residing for terminal is that NFC transmits interface, the terminal works is set and is existed Initial corner color, and for aggressive mode under, actively produces Non-contact radio-frequency field, send out and open NFC communication;When interface residing for terminal is non- During NFC transmission interfaces, the terminal works are set in target side role, can be operated under actively or passively pattern.
Fig. 2 shows the flow chart of data transmission method according to an embodiment of the invention.
As shown in Fig. 2 data transmission method according to an embodiment of the invention, including:
Step 202, obtains the interface information residing for local terminal.Wherein, local terminal is the terminal described in the embodiment of Fig. 1, with Under the opposite end be other-end described in the embodiment of Fig. 1.
Step 204, judges whether the interface residing for local terminal is NFC transmission interface, when judged result is to be, into step 212, when judged result is no, into step 206.
Step 206, sets local terminal and is operated in target side role.Whether the work role of terminal is presently in interface by terminal Interface is transmitted for NFC to determine.Wherein, target side role is a side of the request of the initial side of response in communication process, can be worked Under actively or passively pattern, aggressive mode refer to terminal actively produce it is non-radiofrequency field is connect to complete the pattern of NFC communication, by dynamic model Formula refer to terminal do not produce it is non-connect radiofrequency field, but the pattern of communication is completed by way of loading modulation.
Step 208, waits the NFC of opposite end to find request.
Step 210, judges whether that the NFC for receiving opposite end transmission has found request, when judged result is to be, into step 222, when judged result is no, return to step 208.
Step 212, sets local terminal and is operated in initial corner color.Initial corner color is the side that hair opens NFC communication, can be worked In the active mode.
Step 214, sends into NFC discovery phases and finds request.
Step 216, waits NFC radio-frequency informations to be received.
Step 218, judges whether that the NFC for receiving opposite end transmission has found response, when judged result is to be, into step 224, otherwise, into step 220.
Step 220, judges whether that the NFC for receiving opposite end transmission has found request, when judged result is to be, into step 222, otherwise, into step 216.
Step 222, sends to opposite end and finds response.Wherein, it is found that response includes local terminal work at present role, mode of operation With the information such as RF agreement supported.
Step 224, judges whether opposite end is operated in target side role, no into step 226 when judged result is to be Then, into step 228.
Step 226, local terminal directly transmits information as transmitting terminal.
Step 228, screen reduces and waits user to click on.
In the technical scheme, local terminal can obtain the interface information being presently in first, when current interface is that NFC transmits boundary During face, local terminal is set and is operated in initial corner color, when current interface is that non-NFC transmits interface, local terminal is set and is operated in target Corner color.Terminal in target side role waits the NFC of transmitting terminal to find request as receiving terminal, and receiving after request can be to Transmitting terminal reply NFC find response, wherein, find response include the current work role of the terminal device, mode of operation and The information such as the RF agreement of support.Target side role can be operated under actively or passively pattern, and initial corner color is operated in active mould Under formula, actively send the radiofrequency field of oneself and send NFC discovery requests, into NFC discovery phases, move into initial side's radiofrequency field In the range of terminal device receive request after, the solicited message can be responded, to illustrate itself current work role.When When opposite equip. is operated in target side role, initial side sends P2P data to target side automatically after link activation, when opposite end sets For when being operated in initial corner color, into traditional NFC P2P transmission flows, will the diminution of both sides' screen, wait user's click Send.
In the technical scheme, after determining the work role of local terminal and opposite end, the side that would operate in initial corner color makees It is transmitting terminal, is operated in a side of target side role as receiving terminal, the automatic transmission of NFC P2P information can be completed.So, Without the manually operated of user, Consumer's Experience is increased.
Fig. 3 shows the block diagram of data transmission device according to an embodiment of the invention.
As shown in figure 3, data transmission device 300 according to an embodiment of the invention, including:Judging unit 302, according to end The current near-field communication interface information at end, judges the corresponding work at present role of terminal;Acquiring unit 304, obtains and connects with terminal The corresponding work at present role of other-end for connecing;Determining unit 306, according to terminal and the corresponding work at present angle of other-end Color, determines the transmitting terminal and receiving terminal in near-field communication;Interactive unit 308, the determination result according to determining unit, in transmitting terminal Near-field communication information is sent to other-end after connecting link activation and receiving terminal between, or receives what other-end sent Near-field communication information.
In the technical scheme, according to the current near-field communication interface information of terminal, i.e., the NFC transmission interface residing for terminal The interface information of (can push the application interface of NFC information, such as browser interface, contact person interface) determines NFC The work role of P2P (i.e. NFC point-to-point transmission function), and the work role of other-end is obtained, to determine NFC P2P business Transmitting terminal and receiving terminal, between transmitting terminal and receiving terminal connecting link activation after, transmitting terminal is automatically performed the hair of information Send, receiving terminal receives the information.So, automatic sending function is increased, as long as receiving terminal just may be used when being operated in target side role It is manually operated without user to complete automatically delivering for the point-to-point information of NFC, user is increased while user-friendly Experience.
In the above-mentioned technical solutions, it is preferable that work role includes initial corner color and target side role, acquiring unit 304 include:Request transmitting unit 3042, judged result for terminal work at present role be initial corner color when, to end Hold the other-end of connection to send and find request;Response receiving unit 3044, waits other-end to be received according to discovery request hair The discovery sent is responded;First judging unit 3046, when discovery response is received, working as other-end is judged according to finding to respond Preceding work role;Determining unit 306 specifically for:In judged result for the work at present role of other-end is target side role When, terminal is determined for transmitting terminal, other-end is receiving terminal;Interactive unit 308 specifically for:It is determined that terminal be transmitting terminal, When other-end is receiving terminal, near-field communication is sent to other-end after the connecting link activation between transmitting terminal and receiving terminal Information.
In the technical scheme, the work role of NFC terminal mainly includes initial corner color and target side role, operating angle Color is that the terminal of initial corner color sends discovery request to other-end, and judges other ends according to the discovery of other-end response Whether the work role at end is target side role, when the work role of other-end is target side role, determines work role For the terminal of initial corner color is transmitting terminal, other-end is receiving terminal, carries out the automatic transmission of NFC P2P information, so, nothing Need that user's is manually operated, increased Consumer's Experience.
In the above-mentioned technical solutions, it is preferable that also include:Second judging unit 310, when discovery response is not received, Judge whether that the discovery for receiving other-end transmission is asked;And interactive unit 308 specifically for:Receiving other-end When the discovery of transmission is asked, sent to other-end and find response, judge the work of terminal according to discovery response for other-end Make role.
In the technical scheme, when the discovery that terminal does not receive other-end is responded, it is impossible to judge other-end Work role, now the terminal can according to receive discovery request actively to other-end send find response so that its His terminal judges the work role of the terminal according to the discovery response from the terminal for receiving.
In the above-mentioned technical solutions, it is preferable that interactive unit 308 is additionally operable to:When judged result is the work at present of terminal When role is target side role, the discovery for waiting other-end to be received to send is asked, and when receiving other-end transmission It was found that during request, sent to other-end according to discovery request and find response, so that other-end judges eventually according to discovery response The work role at end.
In the technical scheme, the work role of terminal is presently in whether interface is that NFC transmission interface comes true by terminal Fixed, when it is determined that the work role of the terminal is target side role, other-end is according to the discovery from the terminal for receiving Response is come to judge the work role of the terminal be target side role.By determining the work role of communicating pair, would operate in just One side of beginning corner color is operated in a side of target side role as receiving terminal as transmitting terminal, can complete NFC P2P information Automatic transmission.
In the above-mentioned technical solutions, it is preferable that find that response includes work role, mode of operation and/or the support of terminal RF agreement.
In the technical scheme, after terminal receives the discovery request of other-end transmission, can be by the work role of itself, work Operation mode and/or the RF agreement of support are sent to the other-end for sending and finding request as discovery response, so as to other-end Discovery response according to receiving judges that the terminal is transmitting terminal/receiving terminal.
In the above-mentioned technical solutions, it is preferable that mode of operation includes aggressive mode and Passive Mode, in the current work of terminal When making role for initial corner color, terminal can be operated in aggressive mode, when the work at present role of terminal is target side role, Terminal can be operated in aggressive mode or Passive Mode.
In the technical scheme, aggressive mode refers to that terminal is actively produced and non-connects radiofrequency field to complete the pattern of NFC communication, quilt Dynamic model formula refer to terminal do not produce it is non-connect radiofrequency field, but the pattern of communication is completed by way of loading modulation.Initial corner color I.e. hair opens a side of NFC communication, and in the active mode, target side role is the request of the initial side of response in communication process for work One side, can be operated under actively or passively pattern.When interface residing for terminal is that NFC transmits interface, the terminal works is set and is existed Initial corner color, and for aggressive mode under, actively produces Non-contact radio-frequency field, send out and open NFC communication;When interface residing for terminal is non- During NFC transmission interfaces, the terminal works are set in target side role, can be operated under actively or passively pattern.
Fig. 4 shows the block diagram of data transmission device according to an embodiment of the invention.
As shown in figure 4, data transmission device 400 according to an embodiment of the invention, including:Determine local terminal work role mould Block 402 (equivalent to judging unit), acquisition opposite end work role module 404 (equivalent to acquiring unit), transceiver terminal identification mould Block 406 (equivalent to determining unit) and the automatic sending modules 408 of NFC P2P (equivalent to interactive unit).Wherein, local terminal is Fig. 3 Embodiment described in terminal, opposite end is the other-end described in the embodiment of Fig. 3.
Determine the information at the interface according to residing for terminal of local terminal work role module 402 to determine the work role of local terminal, its In, work role mainly includes initial corner color and target side role.When interface residing for terminal is that NFC transmits interface, set The work role of the terminal is initial corner color, and place is in the active mode, actively produces Non-contact radio-frequency, hair to open NFC and lead to Letter;When interface residing for terminal is that non-NFC transmits interface, the work role of the terminal is set for target side role, can be operated in Actively or passively under pattern.Whether interface residing for terminal is that the judgement at NFC transmission interface can be according to current application program Whether there is the NFC P2P message to be pushed to determine.The data-message that application program can be pushed upon actuation is packaged into system One data form (such as NDEF message) is to be transmitted, and the content of pushed information can be wanted according to the information real-time update at interface, Therefore, whether there is the NFC P2P message to be pushed according to current application program, it may be determined that whether current interface is NFC transmission It is not sky that the message content for pushing is needed in interface, such as current application program, then it is assumed that be presently in interface for NFC transmits boundary Face, otherwise, then it is assumed that be presently in interface for non-NFC transmits interface.
Obtaining opposite end work role module 404 is used to obtain the work role of opposite end.It is operated in the NFC ends of initial corner color End can actively produce Non-contact radio-frequency, hair to open NFC communication.In NFC discovery phases, the acquisition opposite end operating angle of initial side's terminal Color module 404 sends NFC and finds solicited message, and the terminal device entered into the range of initial side's radiofrequency field is received after asking, The solicited message can be responded, response contents mainly include the current work role of the terminal device, mode of operation and The information such as the RF agreement of support.Opposite end work role module 404 is obtained according to the response message for receiving, the work of opposite end is judged Role is initial corner color or target side role.
Transceiver terminal identification module 406 determines hair for the work role of the NFC P2P according to residing for local terminal and opposite end Sending end and receiving terminal, would operate in one end of initial corner color as transmitting terminal, for actively sending P2P data, would operate in One end of target side role as receiving terminal, for etc. data to be received.When both sides are operated in initial corner color, then wait User selects transmitting terminal.
The automatic sending modules 408 of NFC P2P are used for directly transmitting for NFC P2P information.It is determined that transmitting terminal and receiving terminal Afterwards, it is necessary to carry out the link activation of P2P, transmitting terminal is automatically performed the transmission of NFC P2P information after the completion of link activation, without use Family is manually operated.
Technical scheme is described in detail above in association with accompanying drawing, by technical scheme, can complete Automatically delivering for the point-to-point information of NFC, is convenient for users to operate, and improves Consumer's Experience.
The preferred embodiments of the present invention are the foregoing is only, is not intended to limit the invention, for the skill of this area For art personnel, the present invention can have various modifications and variations.It is all within the spirit and principles in the present invention, made any repair Change, equivalent, improvement etc., should be included within the scope of the present invention.

Claims (12)

1. a kind of data transmission method, for terminal, the terminal is connected with other-end, it is characterised in that including:
Judge step, according to the current near-field communication interface information of the terminal, judge the corresponding work at present angle of the terminal Color;
Obtaining step, obtains work at present role corresponding with the other-end that the terminal is connected;
Determine step, according to the terminal and the corresponding work at present role of the other-end, determine the hair in near-field communication Sending end and receiving terminal;
Interactive step, according to the determination result of the determination step, the connects chain between the transmitting terminal and the receiving terminal Near-field communication information is sent to the other-end after the activation of road, or receives the near of the other-end that the other-end sends The field communication information.
2. data transmission method according to claim 1, it is characterised in that the work role include initial corner color and Target side role,
The obtaining step includes:
The work at present role that judged result is the terminal be the initial corner color when, to be connected with the terminal its His terminal sends and finds request;
Responded according to the discovery for finding that request sends etc. the other-end to be received;
When the discovery response is received, find that response judges the work at present role of the other-end according to described;
The determination step includes:
When the work at present role that judged result is the other-end is the target side role, determine that the terminal is institute Transmitting terminal is stated, the other-end is the receiving terminal;
The interactive step includes:
It is determined that the terminal is the transmitting terminal, when the other-end is the receiving terminal, in the transmitting terminal and described After connecting link activation between receiving terminal near-field communication information is sent to the other-end.
3. data transmission method according to claim 2, it is characterised in that also include:
When the discovery response is not received, judge whether to receive the discovery request that the other-end sends;
When the discovery request that the other-end sends is received, sent to the other-end and find response, for described Other-end finds that response judges the work role of the terminal according to described.
4. data transmission method according to claim 2, it is characterised in that also include:
When the work at present role that judged result is the terminal is the target side role, the other-end to be received is waited The discovery request of transmission;
When the discovery request that the other-end sends is received, find that request sends institute to the other-end according to described Discovery response is stated, so that the other-end finds that response judges the work role of the terminal according to described.
5. the data transmission method according to any one of claim 2 to 4, it is characterised in that the discovery response includes The RF agreement of the work role, mode of operation and/or support of terminal.
6. data transmission method according to claim 5, it is characterised in that the mode of operation includes aggressive mode and quilt Dynamic model formula,
When the work at present role of the terminal is initial corner color, the terminal can be operated in the aggressive mode,
When the work at present role of the terminal is target side role, the terminal can be operated in the aggressive mode or institute State Passive Mode.
7. a kind of data transmission device, for terminal, the terminal is connected with other-end, it is characterised in that including:
Judging unit, according to the current near-field communication interface information of the terminal, judges the corresponding work at present angle of the terminal Color;
Acquiring unit, obtains work at present role corresponding with the other-end that the terminal is connected;
Determining unit, according to the terminal and the corresponding work at present role of the other-end, determines the hair in near-field communication Sending end and receiving terminal;
Interactive unit, the determination result according to the determining unit, the connects chain between the transmitting terminal and the receiving terminal Near-field communication information is sent to the other-end after the activation of road, or receives the near of the other-end that the other-end sends The field communication information.
8. data transmission device according to claim 7, it is characterised in that the work role include initial corner color and Target side role,
The acquiring unit includes:
Request transmitting unit, when the work at present role that judged result is the terminal is the initial corner color, Xiang Yusuo The other-end for stating terminal connection sends discovery request;
Response receiving unit, waits the other-end to be received to be responded according to the discovery for finding that request sends;
First judging unit, when the discovery response is received, finds that response judges working as the other-end according to described Preceding work role;
The determining unit specifically for:
When the work at present role that judged result is the other-end is the target side role, determine that the terminal is institute Transmitting terminal is stated, the other-end is the receiving terminal;
The interactive unit specifically for:
It is determined that the terminal is the transmitting terminal, when the other-end is the receiving terminal, in the transmitting terminal and described After connecting link activation between receiving terminal near-field communication information is sent to the other-end.
9. data transmission device according to claim 8, it is characterised in that also include:
Second judging unit, when the discovery response is not received, judges whether to receive the hair that the other-end sends Now ask;And
The interactive unit specifically for:
When the discovery request that the other-end sends is received, sent to the other-end and find response, for described Other-end finds that response judges the work role of the terminal according to described.
10. data transmission device according to claim 8, it is characterised in that
The interactive unit is additionally operable to:
When the work at present role that judged result is the terminal is the target side role, the other-end to be received is waited The discovery request of transmission, and
When the discovery request that the other-end sends is received, find that request sends institute to the other-end according to described Discovery response is stated, so that the other-end finds that response judges the work role of the terminal according to described.
11. data transmission device according to any one of claim 8 to 10, it is characterised in that the discovery response bag Include the RF agreement of work role, mode of operation and/or the support of terminal.
12. data transmission devices according to claim 11, it is characterised in that the mode of operation include aggressive mode and Passive Mode,
When the work at present role of the terminal is initial corner color, the terminal can be operated in the aggressive mode,
When the work at present role of the terminal is target side role, the terminal can be operated in the aggressive mode or institute State Passive Mode.
CN201410439004.XA 2014-08-29 2014-08-29 Data transmission method and data transmission device Active CN104168045B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410439004.XA CN104168045B (en) 2014-08-29 2014-08-29 Data transmission method and data transmission device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410439004.XA CN104168045B (en) 2014-08-29 2014-08-29 Data transmission method and data transmission device

Publications (2)

Publication Number Publication Date
CN104168045A CN104168045A (en) 2014-11-26
CN104168045B true CN104168045B (en) 2017-06-16

Family

ID=51911705

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410439004.XA Active CN104168045B (en) 2014-08-29 2014-08-29 Data transmission method and data transmission device

Country Status (1)

Country Link
CN (1) CN104168045B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107086884A (en) * 2017-03-01 2017-08-22 东莞宇龙通信科技有限公司 A kind of data transmission method based on NFC, device and mobile terminal
CN115412975B (en) * 2021-05-27 2024-05-10 成都极米科技股份有限公司 Multilink negotiation method, multilink negotiation device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1692566A (en) * 2002-12-17 2005-11-02 索尼株式会社 Communication system, communication method, and data processing device
CN102316216A (en) * 2011-09-07 2012-01-11 宇龙计算机通信科技(深圳)有限公司 Terminal adaptive role method and terminal thereof
CN102710296A (en) * 2011-03-28 2012-10-03 索尼爱立信移动通讯有限公司 Working mode switching method, working mode switching module and terminal equipment
CN103986502A (en) * 2014-04-01 2014-08-13 联想(北京)有限公司 Information processing method, electronic device and system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1630712A1 (en) * 2004-08-24 2006-03-01 Sony Deutschland GmbH Method for operating a near field communication system
KR101259009B1 (en) * 2011-11-16 2013-04-29 삼성메디슨 주식회사 Method and apparatus for providing medical images using near field communication
CN103384369B (en) * 2013-06-28 2016-11-16 华为技术有限公司 A kind of set up the method for data cube computation, Apparatus and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1692566A (en) * 2002-12-17 2005-11-02 索尼株式会社 Communication system, communication method, and data processing device
CN102710296A (en) * 2011-03-28 2012-10-03 索尼爱立信移动通讯有限公司 Working mode switching method, working mode switching module and terminal equipment
CN102316216A (en) * 2011-09-07 2012-01-11 宇龙计算机通信科技(深圳)有限公司 Terminal adaptive role method and terminal thereof
CN103986502A (en) * 2014-04-01 2014-08-13 联想(北京)有限公司 Information processing method, electronic device and system

Also Published As

Publication number Publication date
CN104168045A (en) 2014-11-26

Similar Documents

Publication Publication Date Title
EP2615869B1 (en) Systems for facilitating wireless communication and related methods
EP2704517B1 (en) Mobile terminal application parameter configuration method, related device and system
US20130178163A1 (en) Systems for Facilitating Wireless Communication and Related Methods
WO2018133178A1 (en) Nfc-based data transmission method and mobile device
EP3080704B1 (en) Automatic internet sharing
US9667504B2 (en) Communication system having management apparatus and user apparatus, management apparatus, user apparatus, and method of controlling the same
EP2941058B1 (en) Near field communication method and device
KR101818004B1 (en) Apparatus and method for sharing data
CN104661230A (en) Method and device for establishing wireless local area network based on near field communication
CN103312787B (en) A kind of method and mobile terminal being quickly shared file by fingerprint recognition
CN104066135B (en) A kind of connection switching method and related device based on near-field communication
CN105940720B (en) It is a kind of to trigger the method for register machine protocol interaction, access point, website
US20130237151A1 (en) Automatic-switching wireless communication system and method
CN106211271A (en) The method of network entry of intelligent home device, device and intelligent home device
CN104716995A (en) Method and system for near-field communication friend making through accessories
CN108496381A (en) Information processing equipment, information processing method and program
CN104270826B (en) A kind of information processing method and electronic equipment
CN104168045B (en) Data transmission method and data transmission device
CN106792658B (en) Wireless backhaul link assisted establishment method and apparatus
WO2016029842A1 (en) Multi-terminal interactive communication method, terminal and computer storage medium
CN103152839A (en) System and method for quickly pairing industrial wireless communication equipment
CN106255074B (en) A kind of group's method for building up and device
JP7159761B2 (en) Application programs and mobile terminals
CN106817668B (en) Connection communication method based on Bluetooth
CN105320521A (en) Application method of smart key device in O2O service scene

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant