CN112686358A - Data transmission method, NFC electronic tag, terminal device and storage medium - Google Patents
Data transmission method, NFC electronic tag, terminal device and storage medium Download PDFInfo
- Publication number
- CN112686358A CN112686358A CN202011433361.7A CN202011433361A CN112686358A CN 112686358 A CN112686358 A CN 112686358A CN 202011433361 A CN202011433361 A CN 202011433361A CN 112686358 A CN112686358 A CN 112686358A
- Authority
- CN
- China
- Prior art keywords
- terminal
- nfc
- electronic tag
- data
- nfc electronic
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Telephone Function (AREA)
Abstract
A data transmission method, an NFC electronic tag, terminal equipment and a storage medium are provided, the method is applied to the NFC electronic tag for near field communication, the NFC electronic tag is in communication connection with a first terminal, and the method comprises the following steps: when detecting that a second terminal reads the label of the NFC electronic label, acquiring input data sent by the first terminal, wherein the second terminal is in a card reader mode of NFC; packaging the input data according to the label information stored in the NFC electronic label to obtain first transmission data; and transmitting the first transmission data to the second terminal through the NFC radio frequency field generated by the second terminal so that the second terminal analyzes the input data from the first transmission data. By implementing the embodiment of the application, data transmission among different terminal devices can be realized through the NFC electronic tag, and the transmission step of input information is facilitated to be simplified.
Description
Technical Field
The present application relates to the field of electronic communications technologies, and in particular, to a data transmission method, an NFC electronic tag, a terminal device, and a storage medium.
Background
Currently, data transmission between terminal devices often needs to be performed by means of third-party software (for example, Wechat, MSN Messenger, etc.). For example, when a user uses a portable terminal device such as a mobile phone or a tablet, since the portable terminal device is not convenient for inputting information, the user often selects to input information on the terminal device such as a computer, which is convenient for inputting, and then transmits the input information to the portable terminal device through third-party software. However, in practice, it has been found that the use of third party software to assist in the transfer of input information is cumbersome.
Disclosure of Invention
The embodiment of the application discloses a data transmission method, an NFC electronic tag, terminal equipment and a storage medium, and the data transmission between different terminal equipment can be realized through the NFC electronic tag, so that the transmission steps of input information can be simplified.
A first aspect of an embodiment of the present application discloses a data transmission method, which is applied to an NFC electronic tag for near field communication, where the NFC electronic tag is in communication connection with a first terminal, and the method includes:
when detecting that a second terminal reads the label of the NFC electronic label, acquiring input data sent by the first terminal, wherein the second terminal is in a card reader mode of NFC;
packaging the input data according to the label information stored in the NFC electronic label to obtain first transmission data;
and transmitting the first transmission data to the second terminal through an NFC radio frequency field generated by the second terminal so that the second terminal analyzes the input data from the first transmission data.
In a second aspect of the embodiments of the present application, a Near Field Communication (NFC) electronic tag is disclosed, where the NFC electronic tag is in communication connection with a first terminal, and the NFC electronic tag includes:
the input data acquisition unit is used for acquiring input data sent by the first terminal when detecting that a second terminal reads the label of the NFC electronic label, wherein the second terminal is in a card reader mode of NFC;
the packaging unit is used for packaging the input data according to the label information stored in the NFC electronic label to obtain first transmission data;
and the first transmission unit is used for transmitting the first transmission data to the second terminal through the NFC radio frequency field generated by the second terminal so that the second terminal can analyze the input data from the first transmission data.
A third aspect of the embodiments of the present application discloses another near field communication NFC electronic tag, which includes a memory and a processor, where the memory stores a computer program, and when the computer program is executed by the processor, the processor is enabled to execute all or part of the steps in any one of the data transmission methods disclosed in the first aspect of the embodiments of the present application.
A fourth aspect of the embodiments of the present application discloses a computer-readable storage medium, which stores a computer program, where the computer program enables a computer to execute all or part of the steps in any one of the data transmission methods disclosed in the first aspect of the embodiments of the present application.
Compared with the related art, the embodiment of the application has the following beneficial effects:
in the embodiment of the application, the NFC electronic tag may be in communication connection with the first terminal, and the second terminal may be in a card reader mode of NFC. When the NFC electronic tag detects a tag reading operation of a second terminal for the NFC electronic tag, it may acquire input data sent by a first terminal; the NFC electronic tag can package the input data according to the stored tag information to obtain first transmission data; the NFC electronic tag can transmit the first transmission data to the second terminal through the NFC radio frequency field generated by the second terminal, so that the second terminal can analyze the input data from the first transmission data, and the input data can be quickly transmitted to the second terminal from the first terminal convenient to input. Therefore, by implementing the embodiment of the application, the second terminal reads the NFC electronic tag through the NFC card reader mode, the data transmitted by the first terminal can be quickly acquired, the data transmission between different terminal devices is realized, the assistance of third-party software is not needed, the complicated steps of downloading, logging, verifying and the like which are needed when the third-party software is used for transmitting information are also omitted, the communication connection with the first terminal is not needed to be directly established, the transmission step of input information is facilitated to be simplified, and the efficiency of using the terminal devices by a user is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario of a data transmission method disclosed in an embodiment of the present application;
fig. 2 is a schematic structural diagram of an NFC electronic tag disclosed in an embodiment of the present application;
fig. 3 is a timing diagram of a data transmission method disclosed in an embodiment of the present application;
fig. 4 is a schematic flow chart of a data transmission method disclosed in an embodiment of the present application;
fig. 5 is a schematic flow chart of another data transmission method disclosed in the embodiments of the present application;
FIG. 6 is a flow chart illustrating a further data transmission method disclosed in an embodiment of the present application;
FIG. 7 is a schematic flow chart diagram illustrating a further data transmission method disclosed in an embodiment of the present application;
fig. 8 is a schematic diagram illustrating a parsing process of first transmission data according to an embodiment of the present application;
FIG. 9 is a schematic flow chart diagram illustrating a further data transmission method disclosed in an embodiment of the present application;
fig. 10 is a schematic block diagram of an NFC electronic tag disclosed in an embodiment of the present application;
fig. 11 is a schematic block diagram of a terminal device disclosed in an embodiment of the present application;
fig. 12 is a schematic block diagram of another terminal device disclosed in an embodiment of the present application;
fig. 13 is a schematic block diagram of another NFC electronic tag disclosed in an embodiment of the present application;
fig. 14 is a schematic block diagram of another terminal device disclosed in the embodiments of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "comprises" and "comprising," and any variations thereof, in the embodiments of the present application, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The embodiment of the application discloses a data transmission method, an NFC electronic tag, terminal equipment and a storage medium, and the data transmission between different terminal equipment can be realized through the NFC electronic tag, so that the transmission steps of input information can be simplified.
The following detailed description is made with reference to the accompanying drawings.
Referring to fig. 1, fig. 1 is a schematic view of an application scenario of a data transmission method disclosed in an embodiment of the present application, including a first terminal 10, a second terminal 20, and an NFC (Near Field Communication) electronic tag 30. The NFC electronic tag 30 may be in communication connection with the first terminal 10, so that data interaction may be performed between the two terminals; the second terminal 20 may be in a card reader mode of NFC, and when the second terminal 20 approaches the NFC electronic tag 30, the content in the NFC electronic tag 30 may be read, so as to obtain the input data obtained by the NFC electronic tag 30 from the first terminal 10.
Illustratively, the first terminal 10 may include various devices or systems having an input function, such as a PC (Personal Computer), a PDA (Personal Digital Assistant), and the like. The second terminal 20 may include various devices or systems having an NFC function, such as a smart phone, a tablet computer, a smart watch, a smart bracelet, and the like, wherein the second terminal 20 may be in a card reader mode of NFC, so as to read the NFC electronic tag 30. It should be noted that the first terminal 10 shown in fig. 1 is a computer, and the second terminal 20 is a smartphone, which is merely an example and does not constitute a limitation on the terminal types of the first terminal 10 and the second terminal 20 in the embodiment of the present application.
For example, to implement data interaction between the NFC electronic tag 30 and the first terminal 10, as shown in fig. 2, the NFC electronic tag 30 may include a Micro Control Unit (MCU) 31, a data interface 32, a storage module 33, and a radio frequency module 34. The data interface 32 may include various USB (Universal Serial Bus) interfaces (for example, Micro USB, Mini USB, Type C, etc.), parallel connectors, and the like, for transmitting data between the first terminal 10 and the NFC electronic tag 30. On this basis, the mcu 31 may be configured to obtain data sent by the first terminal 10 through the data interface 32, process the data, for example, encapsulate the data according to the tag information stored in the storage module 33, and finally control the rf module 34 to transmit the encapsulated data to the second terminal 20.
In the embodiment of the present application, when a user desires to perform data transmission between the first terminal 10 and the second terminal 20 (for example, to transmit input data of the first terminal 10 to the second terminal 20, the input data may include input data received by the first terminal 10 through an input control thereof), the second terminal 20 in the card reader mode may be close to the NFC electronic tag 30, so that the NFC electronic tag 30 may be in the NFC radio-frequency field generated by the second terminal 20. Then, the second terminal 20 may perform a tag reading operation on the NFC electronic tag 30, and when the NFC electronic tag 30 detects the tag reading operation, perform data interaction with the first terminal 10 to obtain input data sent by the first terminal 10, and package the input data according to tag information stored in the storage module 33 of the NFC electronic tag 30, so as to obtain first transmission data suitable for NFC transmission. Finally, the second terminal 20 can read the NFC electronic tag 30, that is, the NFC electronic tag 30 transmits the first transmission data to the second terminal 20 through the radio frequency module 34 thereof, so that the second terminal 20 can parse the input data from the first transmission data, and implement data transmission between the first terminal 10 and the second terminal 20.
To better describe an application scenario of the embodiment of the present application, fig. 3 discloses a timing chart of a data transmission method of the embodiment of the present application. As shown in fig. 3, the method may include:
302. the first terminal receives input data through the input control.
Illustratively, the input control may include an input box, an input field, and the like on the first terminal, through which the user may make input on the first terminal. Optionally, the user may assist in completing the input through hardware devices such as a keyboard, a mouse, and a microphone, which is not specifically limited in the embodiment of the present application.
304. The NFC electronic tag detects a tag read operation for the NFC electronic tag.
For example, the NFC electronic tag may listen for a card reading event for the NFC electronic tag, and when the card reading event is listened to, it means that a tag reading operation for the NFC electronic tag is detected.
306. And the second terminal reads the NFC electronic tag.
When a user wants to acquire input data of the first terminal through the second terminal, the second terminal in the card reader mode can be close to the NFC electronic tag in communication connection with the first terminal, so that NFC communication connection can be established between the second terminal and the NFC electronic tag through an NFC radio frequency field generated by the second terminal, and the NFC electronic tag can be read.
308. When the NFC electronic tag detects that the tag reading operation of the second terminal aiming at the NFC electronic tag, the first terminal sends input data to the NFC electronic tag.
In this embodiment of the application, when detecting a tag reading operation for the NFC electronic tag, the NFC electronic tag may send a data request to a first terminal in communication connection with the NFC electronic tag, and when receiving the data request, the first terminal may send input data to the NFC electronic tag.
Optionally, the first terminal may also directly send the input data to the NFC electronic tag when receiving the input data through the input control, so that the NFC electronic tag may perform the following steps in advance, encapsulate the input data and wait for transmission to the second terminal, which is beneficial to further improving the transmission efficiency of the input data.
310. The NFC electronic tag obtains input data sent by the first terminal.
312. And the NFC electronic tag packages the input data according to the stored tag information to obtain first transmission data.
In this embodiment, the first transmission Data may include Data suitable for NFC transmission, such as NDEF (NFC Data Exchange Format) Data. The NFC electronic tag can mark, encrypt and the like input data according to tag information stored in the NFC electronic tag, and then package the input data according to a selected protocol to obtain first transmission data in an NDEF format.
314. And the NFC electronic tag transmits the first transmission data to the second terminal through the NFC radio frequency field generated by the second terminal.
316. The second terminal parses the input data from the first transmission data.
For example, the second terminal may parse the acquired first transmission data, that is, unpack the acquired NDEF data packet, perform operations such as unmarking and decrypting, and thus parse the input data from the first transmission data.
By implementing the method described in the above embodiment, the second terminal reads the NFC electronic tag through the NFC card reader mode, and can quickly acquire the data transmitted by the first terminal, so that data transmission between different terminal devices is realized without depending on the assistance of third-party software, and therefore, the cumbersome steps of downloading, logging in, verifying, and the like, which are required when the third-party software is used to transmit information, are also omitted, and a communication connection with the first terminal is not required to be directly established, which is beneficial to simplifying the transmission step of input information, and improving the efficiency of using the terminal devices by a user.
Referring to fig. 4, fig. 4 is a schematic flowchart of a data transmission method disclosed in an embodiment of the present application, where the method may be applied to a near field communication NFC electronic tag, and the NFC electronic tag may be in communication connection with a first terminal. As shown in fig. 4, the data transmission method may include the steps of:
402. when detecting that a second terminal reads the label of the NFC electronic label, acquiring input data sent by the first terminal, wherein the second terminal is in a card reader mode of NFC.
In this embodiment of the application, the NFC electronic tag may monitor a card reading event for the NFC electronic tag, and when the card reading event is monitored, it means that a tag reading operation for the NFC electronic tag is detected. Wherein, this NFC electronic tags can be passive electronic tags, and this NFC electronic tags self does not supply power promptly, also can not produce the NFC radio frequency field, and relies on the NFC radio frequency field that the second terminal produced to supply power for this NFC electronic tags when covering this NFC electronic tags.
In particular, in one embodiment, when the NFC electronic tag is in the NFC radio frequency field generated by the second terminal, it may generate a coupling power source in the NFC radio frequency field and use the coupling power source to power the micro-control unit in the NFC electronic tag. After the micro control unit is powered on, the circuit state (for example, a voltage value, a current value, an impedance value, and the like of a designated port or a designated pin) of the NFC electronic tag may be monitored, and then whether a card reading event for the NFC electronic tag occurs may be determined according to the circuit state. For example, the micro control unit may continuously obtain a voltage value on a target pin, where the target pin is in a first voltage state (e.g., floating) when the NFC electronic tag is not read and in a second voltage state (e.g., high level, low level, etc.) when the NFC electronic tag is read, so that whether a card reading event for the NFC electronic tag occurs may be determined according to the voltage value of the target pin, and then whether a tag reading operation of a second terminal for the NFC electronic tag is detected can be determined. Optionally, when the micro control unit of the NFC electronic tag is powered on to operate, whether a card reading event for the NFC electronic tag occurs may also be directly determined according to the power-on state of the micro control unit. It can be understood that when the NFC radio-frequency field generated by the second terminal is the only power supply source of the NFC electronic tag, the micro-control unit is powered on, that is, it indicates that the second terminal is close to the NFC electronic tag and a card reading event for the NFC electronic tag occurs, so that a tag reading operation of the second terminal for the NFC electronic tag can be detected.
In another embodiment, the NFC electronic tag may be powered by a first terminal to which it is communicatively coupled. Illustratively, the data interface of the NFC electronic tag may be a USB interface, and the NFC electronic tag may be in wired connection with the first terminal through the USB interface, so that the first terminal may also supply power to the NFC electronic tag through the USB interface. On this basis, the NFC electronic tag may actively detect the field intensity of the NFC radio-frequency field in which the NFC electronic tag is located (for example, by setting a sensor, monitoring a circuit state, and the like), and if the field intensity exceeds a reading field intensity threshold, it indicates that a reading event for the NFC electronic tag has occurred, that is, a tag reading operation of the second terminal for the NFC electronic tag is detected.
When detecting a tag reading operation of the second terminal for the NFC electronic tag, the NFC electronic tag may acquire input data sent by the first terminal, where the input data may include input data received on the first terminal through its input control. The input control may include an input box, an input field, and the like on the first terminal, and the user may input on the first terminal through the input control with the aid of the external device. Optionally, the external device may include a hardware device externally connected to the first terminal, such as a keyboard, a mouse, and a microphone, and the embodiment of the present application is not limited specifically.
After receiving the input data, the first terminal can immediately send the input data to the NFC electronic tag, or send the input data to the NFC electronic tag when the data sending condition is met, so that the NFC electronic tag can acquire the input data in time to perform subsequent steps. Illustratively, the data transmission condition may include receiving a data request, waiting for a certain duration (e.g., 1 second, 0.5 second, etc.), receiving a certain amount of data (e.g., 0.5Kb, 1Kb, etc.), and so on. For example, the NFC electronic tag may send a data request to the first terminal by using its micro control unit when detecting a tag reading operation of the second terminal for the NFC electronic tag; then, the first terminal can respond to the data request and send the input data to the NFC electronic tag, so that the input data can be transmitted only when the NFC electronic tag is ensured to be read, and the effectiveness of input data transmission is improved.
404. And packaging the input data according to the label information stored in the NFC electronic label to obtain first transmission data.
For example, the tag information of the NFC electronic tag may be stored in the storage module thereof, and the tag information may include a tag identification, a private identification, a supported protocol, and the like. The tag identifier is a tag ID of the NFC electronic tag, and is used to identify different NFC electronic tags (such as tag 1 and tag 2); the private identity is used for defining the type and the role of the NFC electronic tag, namely marking that the NFC electronic tag can be used for transmitting input data; the supporting protocol represents an NFC communication protocol that can be supported by the NFC electronic tag, and is used to instruct a format of the NFC electronic tag to encapsulate data, requirements for NFC communication, and the like.
In the embodiment of the present application, the NFC electronic tag for transmitting input data may have a designated private identity. When the NFC electronic tag encapsulates the input data, tag information stored in the NFC electronic tag may be obtained first; when the tag information includes the private identity, the NFC electronic tag may encapsulate the input data into first transmission data conforming to an NFC transmission format, such as NDEF data, according to the tag information, so that the first transmission data may be used for NFC communication, thereby implementing cross-terminal transmission of the input data.
406. And transmitting the first transmission data to a second terminal through an NFC radio frequency field generated by the second terminal so that the second terminal analyzes the input data from the first transmission data.
Specifically, when the NFC electronic tag receives reading from the second terminal, the NFC electronic tag may transmit the first transmission data to the second terminal in the NFC radio frequency field generated by the second terminal in a load modulation manner (that is, the NFC electronic tag adjusts an electrical parameter of an oscillation circuit of the NFC electronic tag according to the first transmission data to be transmitted, so as to change impedance and implement modulation to transmit information), so as to implement NFC communication and quickly transmit the input data of the first terminal. Because the second terminal is in the card reader mode, point-to-point transmission connection with the NFC electronic tag is not needed, and therefore the NFC electronic tag does not need to actively send data (namely, data do not need to be sent through the active mode of NFC).
It can be seen that, with the data transmission method described in the foregoing embodiment, the second terminal reads the NFC electronic tag through the NFC card reader mode, and can quickly acquire data transmitted by the first terminal, so that data transmission between different terminal devices is achieved without relying on assistance of third-party software, and therefore, cumbersome steps such as downloading, logging in, and verifying that are required when the third-party software is used to transmit information are also omitted, and a communication connection with the first terminal does not need to be directly established, which is beneficial to simplifying transmission steps of input information, and improves efficiency of a user in using the terminal device.
Referring to fig. 5, fig. 5 is a schematic flowchart of another data transmission method disclosed in the embodiment of the present application, where the method may be applied to a near field communication NFC electronic tag, and the NFC electronic tag may be communicatively connected to a first terminal. As shown in fig. 5, the data transmission method may include the steps of:
502. when detecting that a second terminal reads the label of the NFC electronic label, acquiring input data sent by the first terminal, wherein the second terminal is in a card reader mode of NFC.
Step 502 is similar to step 402, and is not described herein again.
504. The data amount of the input data is determined.
In this embodiment of the application, the NFC electronic tag may perform data volume statistics on received input data of the first terminal, and the obtained data volume may be the number of bytes of the input data or the number of characters of the input data. Optionally, before sending the input data, the first terminal may determine a data amount of the input data, and send the data amount and the input data to the NFC electronic tag, so that the NFC electronic tag may directly obtain the data amount of the input data.
506. And when the data quantity is larger than the single transmission threshold value, segmenting the input data according to the single transmission threshold value.
In this embodiment of the application, the NFC electronic tag may compare the data amount and the single transmission threshold value through a micro control unit of the NFC electronic tag, where the single transmission threshold value may be stored in a storage module of the NFC electronic tag, and the micro control unit accesses the storage module in advance to obtain the single transmission threshold value. When the comparison result is that the data volume is smaller than or equal to the single transmission threshold, the NFC electronic tag may directly perform the next encapsulation step on the input data; when the comparison result indicates that the data volume is greater than the single transmission threshold, the NFC electronic tag may segment the input data according to the single transmission threshold, so as to obtain at least two segments of segmented input data, where the data volume of each segment of segmented input data is less than or equal to the single transmission threshold.
508. And respectively packaging each segmented input data according to the label information stored in the NFC electronic label to obtain a plurality of first transmission data.
Wherein step 508 is similar to step 404 described above. By implementing the above-mentioned division and encapsulation, it is possible to complete processing of input data according to a data volume requirement for transmitted data in NFC communication, and obtain transmission data fragments conforming to an NFC transmission format, that is, a plurality of first transmission data. Taking the NDEF data as an example, each piece of first transmission data may include an NFC Record (Record) encapsulating a segment of divided input data, and the plurality of pieces of first transmission data, that is, the plurality of NFC records, may form an NDEF Message (Message) in one piece of NFC communication, so that the second terminal may read the plurality of pieces of first transmission data transmitted by the NFC electronic tag through one-time card reading, which is beneficial to improving the transmission efficiency of the input data.
In some embodiments, the input data may also be divided and encapsulated according to the data volume requirement of the first terminal or the second terminal, the input data that cannot be transmitted at one time is encapsulated into a plurality of first transmission data, and the obtained plurality of first transmission data are transmitted in multiple times in the next step.
As an optional implementation manner, the tag information stored in the NFC electronic tag may further include encrypted data, and the NFC electronic tag may encrypt the input data according to the encrypted data and then package the encrypted input data, so as to obtain encrypted first transmission data. Illustratively, the encryption may be symmetric encryption or asymmetric encryption. For example, when asymmetric encryption is adopted, the NFC electronic tag may use the encrypted data as a public key, encrypt the input data, and then encapsulate the encrypted data into first transmission data; the second terminal may store a corresponding private key for decrypting the received first transmission data, thereby ensuring security of input data transmission. For another example, the NFC electronic tag may also encrypt the input data by using the encrypted data as a private key, and the second terminal may store a corresponding public key for decryption, so as to ensure that the NFC electronic tag read by the second terminal is a verified electronic tag, and further improve the security and validity of the input data transmission. Alternatively, the private identification in the tag information may be used as the encrypted data.
By implementing the method, the input data can be encrypted when the NFC electronic tag encapsulates the input data, so that the safety protection of the input data is enhanced, the safety and the effectiveness of the input data transmission are improved, the steps of login, verification and the like required when third-party software transmits information are replaced, and the transmission step of the input information is simplified.
510. And transmitting the first transmission data to a second terminal through an NFC radio frequency field generated by the second terminal so that the second terminal analyzes the input data from the first transmission data.
Step 510 is similar to step 406, and is not described herein again.
As an optional implementation manner, when the NFC electronic tag transmits the plurality of first transmission data through the NFC radio frequency field generated by the second terminal, the NFC communication connection between the NFC electronic tag and the second terminal may be established in the NFC radio frequency field, and the first transmission data with the current top sequence is transmitted to the second terminal; then, the NFC communication connection between the NFC electronic tag and the second terminal can be disconnected, and the NFC communication connection is reestablished with the second terminal after a certain time; when the tag reading operation of the second terminal for the NFC electronic tag is detected again, the NFC electronic tag may regard the next first transmission data as the first transmission data with the current top sequence, and re-execute the step of transmitting the first transmission data with the current top sequence to the second terminal until all the first transmission data are transmitted.
For example, the first transmission data queue to be transmitted may include N (N is a positive integer greater than or equal to 2) pieces of first transmission data, and after establishing NFC communication connection with the second terminal, the NFC electronic tag may transmit the first transmission data at the head of the queue to the second terminal, where N-1 pieces of first transmission data are left in the first transmission queue; then, the NFC communication connection between the NFC electronic tag and the second terminal can be disconnected in a mode that the NFC electronic tag is actively disconnected (such as being realized by a micro-control unit to control a circuit switch, impedance and the like) or the second terminal is disconnected (such as being realized by power failure, NFC function closing and the like); the NFC communication connection may be reestablished after a certain time (e.g., 0.3 second, 0.5 second, 1 second, and the like), so that the NFC electronic tag may detect a tag reading operation of the second terminal for the NFC electronic tag again, and transmit the first transmission data currently at the head of the queue to the second terminal; the steps are repeated until all the first transmission data are transmitted, continuous automatic transmission of a plurality of first transmissions can be achieved, and therefore each segmented input data can be completely transmitted to the second terminal, and convenience in input data transmission is improved.
As an optional implementation manner, when the NFC electronic tag detects a tag writing operation of the second terminal for the NFC electronic tag, the NFC electronic tag may further receive second transmission data sent by the second terminal through an NFC radio-frequency field generated by the second terminal. It should be noted that, at this time, the second terminal may still be in the card reader mode of NFC, that is, the second terminal may simultaneously implement reading and writing of the NFC electronic tag in the card reader mode. On this basis, NFC electronic tags can be according to above-mentioned second transmission data, the label information of this NFC electronic tags storage is updated, for example private identification, support agreement, encryption data etc. to including in the label information update to can realize the management to NFC electronic tags through the mode of writing the card, in time adjust the label information of NFC electronic tags storage, be favorable to promoting the security and the stability of input data transmission, reduce NFC electronic tags's use risk.
Therefore, by implementing the data transmission method described in the above embodiment, the input data of the first terminal can be transmitted in a segmented manner through the NFC electronic tag, so that convenience in input data transmission is improved; in addition, by means of encryption of transmission data, updating of tag information and the like, the safety, effectiveness and stability of input data transmission can be improved, and the use risk of the NFC electronic tag is reduced.
Referring to fig. 6, fig. 6 is a schematic flowchart of another data transmission method disclosed in the embodiment of the present application, where the method may be applied to a first terminal, and the first terminal is in communication connection with an NFC electronic tag. As shown in fig. 6, the data transmission method may include the steps of:
602. and sending the input data of the first terminal to the NFC electronic tag, wherein the input data is used for obtaining first transmission data by packaging according to stored tag information when the NFC electronic tag detects that a second terminal in an NFC card reader mode reads the tag of the NFC electronic tag, and the first transmission data is used for being transmitted to the second terminal through an NFC radio frequency field generated by the second terminal by the NFC electronic tag so that the second terminal analyzes the input data from the first transmission data.
In this application embodiment, when detecting the tag reading operation for this NFC electronic tag, the NFC electronic tag may send a data request to the first terminal, and then the first terminal may respond to this data request, and send the input data of the first terminal to this NFC electronic tag, so that the first terminal may perform transmission of the input data only when ensuring that the NFC electronic tag is read, which is beneficial to ensuring timeliness of the input data and improving validity of input data transmission.
Alternatively, the first terminal may receive input data through an input control, wherein the input control may include an input box, an input field, or the like on the first terminal. For example, a user may input data through an external hardware device (such as a keyboard, a mouse, a microphone, and the like) of the first terminal, and the input data may be presented in an input control on the first terminal, so that the user may perform real-time adjustment according to the input data presented on the input control (for example, perform real-time modification according to the input data displayed on the screen by the input control); when the user finishes inputting, the input data can be temporarily stored in the storage area corresponding to the input control, and after the first terminal receives a data request sent by the NFC electronic tag, the input data is sent to the output port of the first terminal under the control of the processor of the first terminal, and then is transmitted to the micro control unit of the NFC electronic tag through the data interface of the NFC electronic tag.
Therefore, by implementing the data transmission method described in the above implementation, the input data of the first terminal can be conveniently sent to the NFC electronic tag in communication connection with the first terminal, and then the input data can be transmitted to the second terminal through the NFC electronic tag, so that the input data can be quickly transmitted from the first terminal convenient to input to the second terminal without depending on the assistance of third-party software. The data transmission method is beneficial to simplifying the transmission steps of the input information and improving the efficiency of data transmission between terminals.
Referring to fig. 7, fig. 7 is a flowchart illustrating another data transmission method disclosed in the embodiment of the present application, where the method can be applied to a second terminal. As shown in fig. 7, the data transmission method may include the steps of:
702. and when the second terminal is in the card reader mode of NFC, if the NFC electronic tag of near field communication is detected to be in the NFC radio frequency field generated by the second terminal, the tag reading operation is carried out on the NFC electronic tag.
In this embodiment of the application, when a user wishes to acquire input data of a first terminal through a second terminal, an NFC function of the second terminal may be enabled and enter a card reader mode, and the second terminal in the card reader mode is brought close to an NFC electronic tag in communication connection with the first terminal to read the NFC electronic tag. Specifically, when it is detected that the NFC electronic tag is located in an NFC radio-frequency field generated by the second terminal, the second terminal may establish NFC communication connection with the NFC electronic tag, and at this time, the second terminal may generate a card reading event for the NFC electronic tag, that is, the second terminal performs a tag reading operation on the NFC electronic tag. When the NFC electronic tag monitors the occurrence of a card reading event, it means that the NFC electronic tag detects a tag reading operation for the NFC electronic tag.
704. And reading first transmission data from the NFC electronic tag according to the tag reading operation, wherein the first transmission data is obtained by packaging input data sent by a first terminal according to stored tag information when the NFC electronic tag detects the tag reading operation, and the first terminal is in communication connection with the NFC electronic tag.
Illustratively, the second terminal in the card reader mode reads the NFC electronic tag, and may acquire first transmission data transmitted by the NFC electronic tag. Specifically, when the NFC electronic tag detects a tag reading operation of a second terminal for the NFC electronic tag, the NFC electronic tag may send a data request to the first terminal by using a micro control unit of the NFC electronic tag, and further obtain input data that the first terminal sends to the NFC electronic tag in response to the data request; on this basis, the NFC electronic tag may encapsulate the input data according to the tag information thereof, so as to obtain the first transmission data, such as NDEF data, conforming to the NFC transmission format. After the second terminal establishes an NFC communication connection with the NFC electronic tag in the NFC radio-frequency field generated by the second terminal, the NFC electronic tag may transmit the first transmission data to the second terminal in a load modulation manner, so that the second terminal can read the first transmission data.
As an alternative implementation, when there are multiple first transmission data, the second terminal may further read each first transmission data multiple times. Illustratively, when the NFC electronic tag is in an NFC radio-frequency field generated by the second terminal, the second terminal may read first transmission data currently transmitted by the NFC electronic tag; then, the second terminal can actively close the NFC radio frequency field and be turned on again after a certain time; when it is detected again that the NFC electronic tag is in the NFC radio-frequency field regenerated by the second terminal, the second terminal may perform a tag reading operation on the NFC electronic tag again to read next first transmission data from the NFC electronic tag until all first transmission data are completely transmitted.
For example, the first transmission data queue to be transmitted to the second terminal may include M (M is a positive integer greater than or equal to 2) first transmission data. When the second terminal detects that the NFC electronic tag is in an NFC radio-frequency field generated by the second terminal, the first transmission data of the queue head can be read from the NFC electronic tag, that is, the NFC electronic tag transmits the first transmission data of the queue head to the second terminal first, and at this time, M-1 first transmission data remain in the first transmission data queue; then, the second terminal can actively close the NFC radio frequency field through power-off, NFC function closing and other modes, so that the communication connection with the NFC electronic tag is interrupted; after a certain time (such as 0.3 second, 0.5 second, 1 second and the like), the second terminal restarts the NFC radio frequency field, and when the NFC electronic tag in the NFC radio frequency field is detected again, the second terminal can read the NFC radio frequency field again to obtain the first transmission data currently at the head of the queue; the steps are repeated until all the first transmission data transmitted by the NFC electronic tag are read, continuous automatic reading of multiple first transmissions can be achieved, and then the first transmissions can be combined into a complete NDEF message, so that the completeness and reliability of input data transmission are guaranteed, and meanwhile, the convenience of the second terminal for reading the input data is effectively improved.
706. The input data is parsed from the first transmission data.
For example, as shown in fig. 8, when the second terminal parses the input data from the first transmission data, the second terminal may first extract tag information (usually located at a header of a data packet) corresponding to the NFC electronic tag from the first transmission data, where the tag information may include a tag identifier, a private identifier, a supported protocol, and the like. Then, the second terminal may analyze the first transmission data according to the tag information to obtain the input data. Specifically, the second terminal may check whether the tag information includes a private identity, and if the tag information includes the private identity, it may be determined that the first transmission data encapsulates the input data of the first terminal, so that the input data may be parsed from the first transmission data according to the supported protocol and the like.
As an optional implementation manner, the tag information may further include encryption data, which is used to indicate an encryption condition of the input data encapsulated by the first transmission data, such as whether to encrypt the input data, what kind of encryption is performed, and the like. If the input data is encrypted, the second terminal further needs to decrypt the analyzed input data, so that the decrypted input data is obtained.
Therefore, by implementing the data transmission method described in the above implementation, the second terminal reads the NFC electronic tag through the NFC card reader mode, and can quickly acquire data transmitted by the first terminal, so that data transmission between different terminal devices is realized without depending on assistance of third-party software, and without directly establishing communication connection with the first terminal, which is beneficial to simplifying the transmission step of input information; meanwhile, continuous automatic reading of the plurality of first transmissions can be achieved, so that the convenience of the second terminal for reading the input data is effectively improved while the completeness and reliability of input data transmission are ensured, and the efficiency of the user for using the terminal equipment is further improved.
Referring to fig. 9, fig. 9 is a flowchart illustrating another data transmission method disclosed in the embodiment of the present application, where the method can be applied to a second terminal. As shown in fig. 9, the data transmission method may include the steps of:
902. and when the second terminal is in the card reader mode of NFC, if the NFC electronic tag of near field communication is detected to be in the NFC radio frequency field generated by the second terminal, the tag reading operation is carried out on the NFC electronic tag.
904. And reading first transmission data from the NFC electronic tag according to the tag reading operation, wherein the first transmission data is obtained by packaging input data sent by a first terminal according to stored tag information when the NFC electronic tag detects the tag reading operation, and the first terminal is in communication connection with the NFC electronic tag.
Step 902 and step 904 are similar to step 702 and step 704, and are not described herein again.
906. And extracting tag information corresponding to the NFC electronic tag from the first transmission data.
908. And if the label information contains the private identification, analyzing the first transmission data according to the label information to obtain the input data.
Step 906 and step 908 are similar to step 706, and are not described herein again.
910. And executing terminal operation corresponding to the input data according to the input data, wherein the terminal operation at least comprises one or more of copying the input data to a clipboard, broadcasting according to the input data and storing the input data.
In an embodiment, the second terminal may copy the parsed input data to the clipboard, so that the user may directly call the input data from the clipboard and paste the input data to a location specified by the user when the user needs to use the input data, thereby quickly and conveniently realizing copy transfer of the input data from the first terminal to the second terminal. When a user needs to perform more or less input operations on the second terminal, the input efficiency can be improved by the aid of the first terminal which is convenient to input by implementing the method, and therefore the efficiency of the user in using the terminal equipment is improved. Optionally, the second terminal may also store the input data directly in a designated location (such as a memo, a notepad, etc.), thereby facilitating long-term invocation by the user.
In another embodiment, the second terminal may broadcast the parsed input data, and if a target process exists on the second terminal to monitor the broadcast, the corresponding application operation may be triggered. For example, when the input data is a shopping password, the process of the shopping application on the second terminal monitors the broadcast, can open the shopping application, and jumps to an interface corresponding to the shopping password; when the input data is the to-be-shared dynamic state, the process of the social application on the second terminal monitors the broadcast, the social application can be opened, and an editing interface corresponding to the to-be-shared dynamic state is skipped to, so that the sharing efficiency of the user is improved. It can be understood that the second terminal can limit the process of only foreground application to monitor the broadcast, thereby reducing the operation steps of the user and improving the efficiency and accuracy of triggering the terminal operation by using the input data.
As an optional implementation manner, the second terminal may further write a card to the NFC electronic tag, so as to update tag information stored in the NFC electronic tag. For example, if the second terminal in the card reader mode detects that the NFC electronic tag is in the NFC radio-frequency field generated by the second terminal, the second terminal may perform tag writing operation on the NFC electronic tag, that is, the second terminal may send second transmission data to the NFC electronic tag through the NFC radio-frequency field, and the micro control unit in the NFC electronic tag may cover the tag information stored in the storage module according to the received second transmission data, so as to update the tag information. By implementing the method, the private identification, the support protocol, the encrypted data and the like in the tag information can be updated, so that the NFC electronic tag can be managed in a card writing mode, the tag information stored in the NFC electronic tag can be adjusted in time, the safety and the stability of input data transmission are improved, and the use risk of the NFC electronic tag is reduced
Therefore, by implementing the data transmission method described in the above implementation, the second terminal reads the NFC electronic tag through the card reader mode of NFC, and can quickly acquire the data transmitted by the first terminal, thereby implementing data transmission between different terminal devices and simplifying the transmission step of input information; in addition, by updating the tag information of the NFC electronic tag, the safety, effectiveness and stability of input data transmission can be improved, and the use risk of the NFC electronic tag is reduced.
Referring to fig. 10, fig. 10 is a schematic view illustrating a module of an NFC electronic tag according to an embodiment of the present disclosure, where the NFC electronic tag may be communicatively connected to a first terminal. As shown in fig. 10, the NFC electronic tag may include an input data obtaining unit 1001, a packaging unit 1002, and a first transmission unit 1003, where:
an input data acquiring unit 1001, configured to acquire input data sent by a first terminal when detecting a tag reading operation of a second terminal for an NFC electronic tag, where the second terminal may be in a card reader mode of NFC;
the packaging unit 1002 is configured to package input data according to tag information stored in the NFC electronic tag to obtain first transmission data;
the first transmission unit 1003 is configured to transmit the first transmission data to the second terminal through the NFC radio frequency field generated by the second terminal, so that the second terminal parses the input data from the first transmission data.
It can be seen that, with the NFC electronic tag described in the above embodiment, the second terminal reads the NFC electronic tag through the NFC card reader mode, and can quickly acquire the data transmitted by the first terminal, so that data transmission between different terminal devices is realized without relying on the assistance of third-party software, and therefore, the cumbersome steps of downloading, logging, verifying, and the like that are required when the third-party software is used to transmit information are also omitted, and a communication connection with the first terminal is not required to be directly established, which is beneficial to simplifying the transmission step of input information, and improves the efficiency of the user in using the terminal device.
In one embodiment, the input data acquiring unit 1001 may include a data requesting sub-unit and a data acquiring sub-unit, not shown, wherein:
the data request subunit is used for sending a data request to the first terminal when detecting that the second terminal reads the tag of the NFC electronic tag;
and the data acquisition subunit is used for acquiring input data sent by the first terminal in response to the data request, wherein the input data is input data received by the first terminal through the input control.
In one embodiment, the NFC electronic tag may further include a determination unit and a segmentation unit, which are not shown in the figure, wherein:
a determination unit configured to determine a data amount of input data transmitted by the first terminal after the input data acquisition unit 1001 acquires the input data;
the dividing unit is used for dividing the input data according to the single transmission threshold value when the data quantity is larger than the single transmission threshold value;
the encapsulating unit 1002 may be specifically configured to encapsulate each segmented input data according to tag information stored in the NFC electronic tag, so as to obtain a plurality of first transmission data.
The first transmission unit 1003 may be specifically configured to establish an NFC communication connection between the NFC electronic tag and the second terminal in an NFC radio-frequency field generated by the second terminal, and transmit first transmission data that is currently sorted at the top to the second terminal; then, disconnecting the NFC communication connection between the NFC electronic tag and the second terminal, and reestablishing the NFC communication connection with the second terminal after a certain time; and finally, when the tag reading operation of the second terminal for the NFC electronic tag is detected again, taking the next first transmission data as the first transmission data with the highest current sequencing, and re-executing the step of transmitting the first transmission data with the highest current sequencing to the second terminal until all the first transmission data are transmitted.
It can be seen that, the NFC electronic tag described in the above embodiment can realize continuous automatic transmission of a plurality of first transmissions, so that each segmented input data can be completely transmitted to the second terminal, which is beneficial to improving convenience of input data transmission.
In one embodiment, the packaging unit 1002 may include a tag acquisition sub-unit and a data packaging sub-unit, not shown, wherein:
the tag obtaining subunit is configured to obtain tag information stored in the NFC electronic tag, where the tag information at least includes a private identity;
and the data packaging subunit is used for packaging the input data into first transmission data which accords with the NFC transmission format according to the label information.
In one embodiment, the NFC electronic tag may further include a data receiving unit and a tag updating unit, which are not shown in the drawing, wherein:
the data receiving unit is used for receiving second transmission data sent by the second terminal in the card reader mode of NFC when detecting that the second terminal writes in operation aiming at the label of the NFC electronic label;
and the tag updating unit is used for updating the tag information stored in the NFC electronic tag according to the second transmission data.
It can be seen that, by using the NFC electronic tag described in the above embodiment, security, effectiveness, and stability of input data transmission can be further improved by encrypting transmission data, updating tag information, and the like, and the use risk of the NFC electronic tag is reduced.
Referring to fig. 11, fig. 11 is a schematic view of a terminal device in a modular manner, according to an embodiment of the present disclosure, the terminal device is communicatively connected to an NFC electronic tag. As shown in fig. 11, the terminal device may include:
an input data sending unit 1101, configured to send input data of the terminal device to the NFC electronic tag, where the input data is used to obtain first transmission data by packaging, according to stored tag information, when the NFC electronic tag detects a tag reading operation of a second terminal in a card reader mode of NFC for the NFC electronic tag, and the first transmission data is used to be transmitted to the second terminal by the NFC electronic tag through an NFC radio frequency field generated by the second terminal, so that the second terminal parses the input data from the first transmission data.
It can be seen that, by adopting the terminal device described in the above embodiment, the input data of the first terminal can be conveniently sent to the NFC electronic tag in communication connection with the first terminal, and then the input data can be transmitted to the second terminal through the NFC electronic tag, so that the input data can be quickly transmitted to the second terminal from the first terminal convenient for input without depending on the assistance of third-party software. The data transmission method is beneficial to simplifying the transmission steps of the input information and improving the efficiency of data transmission between terminals.
Referring to fig. 12, fig. 12 is a schematic block diagram of another terminal device disclosed in the embodiment of the present application. As shown in fig. 12, the terminal device may include:
a reading operation unit 1201, configured to, when the terminal device is in an NFC card reader mode, perform a tag reading operation on an NFC electronic tag if it is detected that the NFC electronic tag is in an NFC radio-frequency field generated by the terminal device;
a transmission data reading unit 1202, configured to read first transmission data from an NFC electronic tag according to a tag reading operation, where the first transmission data is obtained by encapsulating, according to stored tag information, input data sent by a first terminal when the NFC electronic tag detects the tag reading operation, and the first terminal is in communication connection with the NFC electronic tag;
the parsing unit 1203 is configured to parse the input data from the first transmission data.
In an embodiment, the transmission data reading unit 1202 may be specifically configured to, when the NFC electronic tag is located in an NFC radio-frequency field generated by the second terminal, read first transmission data currently transmitted by the NFC electronic tag; then, closing the NFC radio frequency field, and restarting the NFC radio frequency field after a certain time; and finally, when the NFC electronic tag is detected to be in the NFC radio frequency field generated by the second terminal again, the step of carrying out tag reading operation on the NFC electronic tag is carried out again so as to read the next first transmission data from the NFC electronic tag until all the first transmission data are completely transmitted.
It can be seen that, with the terminal device described in the above embodiment, the second terminal reads the NFC electronic tag through the NFC card reader mode, and can quickly acquire data transmitted by the first terminal, so that data transmission between different terminal devices is realized without depending on assistance of third-party software, and without directly establishing communication connection with the first terminal, which is beneficial to simplifying transmission steps of input information; meanwhile, continuous automatic reading of the plurality of first transmissions can be achieved, so that the convenience of the second terminal for reading the input data is effectively improved while the completeness and reliability of input data transmission are ensured, and the efficiency of the user for using the terminal equipment is further improved.
In one embodiment, the parsing unit 1203 may include a label extraction subunit and a data parsing subunit, not shown, where:
the tag extraction subunit is used for extracting tag information corresponding to the NFC electronic tag from the first transmission data;
and the data analysis subunit is used for analyzing the first transmission data according to the tag information to obtain the input data if the tag information contains the private identification.
In one embodiment, the terminal device may further include an execution unit, not shown, configured to execute a terminal operation corresponding to the input data according to the input data parsed by the parsing unit 1203, where the terminal operation includes at least one or more of copying the input data to a clipboard, broadcasting according to the input data, and storing the input data.
In one embodiment, the terminal device may further include a not-illustrated write data transmitting unit, wherein:
and the write-in data sending unit is used for performing label write-in operation on the NFC electronic label and sending second transmission data to the NFC electronic label, wherein the second transmission data is used for enabling the NFC electronic label to update the stored label information according to the second transmission data.
As can be seen, with the terminal device described in the above embodiment, the second terminal reads the NFC electronic tag through the NFC card reader mode, and can quickly acquire the data transmitted by the first terminal, thereby implementing data transmission between different terminal devices and simplifying the transmission step of input information; in addition, by updating the tag information of the NFC electronic tag, the safety, effectiveness and stability of input data transmission can be improved, and the use risk of the NFC electronic tag is reduced.
Referring to fig. 13, fig. 13 is a schematic block diagram of another NFC electronic tag disclosed in the embodiment of the present application. As shown in fig. 13, the NFC electronic tag may include:
a memory 1301 in which executable program code is stored;
a processor 1302 coupled to the memory 1301;
the processor 1302 calls the executable program code stored in the memory 1301 to execute all or part of the steps of any one of the data transmission methods for the NFC electronic tag described in the above embodiments.
Referring to fig. 14, fig. 14 is a schematic block diagram of another terminal device disclosed in the embodiment of the present application. As shown in fig. 14, the terminal device may include:
a memory 1401 storing executable program code;
a processor 1402 coupled to a memory 1401;
wherein, the processor 1402 calls the executable program code stored in the memory 1401 to execute all or part of the steps of any one of the data transmission methods for the first terminal or the second terminal described in the above embodiments.
In addition, the present application further discloses a computer-readable storage medium storing a computer program for electronic data exchange, wherein the computer program causes a computer to execute all or part of the steps in any one of the data transmission methods described in the above embodiments.
It will be understood by those skilled in the art that all or part of the steps in the methods of the embodiments described above may be implemented by hardware instructions of a program, and the program may be stored in a computer-readable storage medium, where the storage medium includes Read-Only Memory (ROM), Random Access Memory (RAM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), One-time Programmable Read-Only Memory (OTPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Compact Disc Read-Only Memory (CD-ROM), or other Memory, such as a magnetic disk, or a combination thereof, A tape memory, or any other medium readable by a computer that can be used to carry or store data.
The data transmission method, the NFC electronic tag, the terminal device, and the storage medium disclosed in the embodiments of the present application are introduced in detail, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the embodiments is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.
Claims (20)
1. A data transmission method is applied to a Near Field Communication (NFC) electronic tag, wherein the NFC electronic tag is in communication connection with a first terminal, and the method comprises the following steps:
when detecting that a second terminal reads the label of the NFC electronic label, acquiring input data sent by the first terminal, wherein the second terminal is in a card reader mode of NFC;
packaging the input data according to the label information stored in the NFC electronic label to obtain first transmission data;
and transmitting the first transmission data to the second terminal through an NFC radio frequency field generated by the second terminal so that the second terminal analyzes the input data from the first transmission data.
2. The method according to claim 1, wherein the obtaining the input data sent by the first terminal when detecting a tag reading operation of a second terminal for the NFC electronic tag comprises:
when detecting that a second terminal reads the label of the NFC electronic label, sending a data request to the first terminal;
and acquiring input data sent by the first terminal in response to the data request, wherein the input data is input data received by the first terminal through an input control.
3. The method according to claim 1, wherein after the obtaining of the input data sent by the first terminal when the tag reading operation of the second terminal for the NFC electronic tag is detected, the method further comprises:
determining a data volume of the input data;
when the data volume is larger than a single transmission threshold value, segmenting the input data according to the single transmission threshold value;
the encapsulating the input data according to the tag information stored in the NFC electronic tag to obtain first transmission data includes:
and respectively packaging each segmented input data according to the label information stored in the NFC electronic label to obtain a plurality of first transmission data.
4. The method of claim 3, wherein the transmitting the first transmission data to the second terminal via the NFC radio frequency field generated by the second terminal comprises:
establishing NFC communication connection between the NFC electronic tag and the second terminal in an NFC radio frequency field generated by the second terminal, and transmitting first transmission data which are sequenced at the top at present to the second terminal;
disconnecting the NFC communication connection between the NFC electronic tag and the second terminal, and reestablishing the NFC communication connection with the second terminal after a certain time;
and when the tag reading operation of the second terminal for the NFC electronic tag is detected again, the next first transmission data is used as the first transmission data with the most front current sequencing, and the first transmission data with the most front current sequencing is transmitted to the second terminal again until all the first transmission data are transmitted.
5. The method according to any one of claims 1 to 4, wherein the encapsulating the input data according to the tag information stored in the NFC electronic tag to obtain first transmission data comprises:
acquiring label information stored by the NFC electronic label, wherein the label information at least comprises a private identification;
and according to the label information, packaging the input data into first transmission data conforming to an NFC transmission format.
6. The method according to any of claims 1 to 4, wherein after said transmitting of said first transmission data to said second terminal by means of said NFC radio frequency field generated by said second terminal, the method further comprises:
when detecting that the second terminal performs tag writing operation on the NFC electronic tag, receiving second transmission data sent by the second terminal in an NFC card reader mode;
and updating the tag information stored in the NFC electronic tag according to the second transmission data.
7. A data transmission method is applied to a first terminal, wherein the first terminal is in communication connection with a Near Field Communication (NFC) electronic tag, and the method comprises the following steps:
and sending the input data of the first terminal to the NFC electronic tag, wherein the input data is used for obtaining first transmission data by packaging the NFC electronic tag according to stored tag information when the NFC electronic tag detects that a second terminal in an NFC card reader mode reads the tag of the NFC electronic tag, and the first transmission data is used for being transmitted to the second terminal through an NFC radio frequency field generated by the second terminal by the NFC electronic tag so that the second terminal analyzes the input data from the first transmission data.
8. A data transmission method, applied to a second terminal, the method comprising:
when the second terminal is in an NFC card reader mode, if the NFC electronic tag is detected to be in an NFC radio frequency field generated by the second terminal, performing tag reading operation on the NFC electronic tag;
reading first transmission data from the NFC electronic tag according to the tag reading operation, wherein the first transmission data is obtained by packaging input data sent by a first terminal according to stored tag information when the NFC electronic tag detects the tag reading operation, and the first terminal is in communication connection with the NFC electronic tag;
the input data is parsed from the first transmission data.
9. The method of claim 8, wherein reading the first transmission data from the NFC electronic tag according to the tag read operation comprises:
when the NFC electronic tag is in an NFC radio frequency field generated by the second terminal, reading first transmission data currently transmitted by the NFC electronic tag;
closing the NFC radio frequency field, and restarting the NFC radio frequency field after a certain time;
when the NFC electronic tag is detected to be in the NFC radio frequency field generated by the second terminal again, the tag reading operation of the NFC electronic tag is executed again, so that next first transmission data are read from the NFC electronic tag until all first transmission data are completely transmitted.
10. The method of claim 8, wherein parsing the input data from the first transmission data comprises:
extracting tag information corresponding to the NFC electronic tag from the first transmission data;
and if the label information contains a private identification, analyzing the first transmission data according to the label information to obtain the input data.
11. The method according to any of claims 8 to 10, wherein after said parsing out said input data from said first transmission data, said method further comprises:
and executing terminal operation corresponding to the input data according to the input data, wherein the terminal operation at least comprises one or more of copying the input data to a clipboard, broadcasting according to the input data and storing the input data.
12. The method according to any one of claims 8 to 10, further comprising:
and performing label writing operation on the NFC electronic label, and sending second transmission data to the NFC electronic label, wherein the second transmission data is used for enabling the NFC electronic label to update the stored label information according to the second transmission data.
13. A near field communication, NFC, electronic tag, wherein the NFC electronic tag is communicatively coupled to a first terminal, the NFC electronic tag comprising:
the input data acquisition unit is used for acquiring input data sent by the first terminal when detecting that a second terminal reads the label of the NFC electronic label, wherein the second terminal is in a card reader mode of NFC;
the packaging unit is used for packaging the input data according to the label information stored in the NFC electronic label to obtain first transmission data;
and the first transmission unit is used for transmitting the first transmission data to the second terminal through the NFC radio frequency field generated by the second terminal so that the second terminal can analyze the input data from the first transmission data.
14. A near field communication, NFC, electronic tag, characterized in that it comprises a memory and a processor, the memory having stored therein a computer program which, when executed by the processor, causes the processor to carry out the method of any one of claims 1 to 6.
15. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a computer, carries out the method according to any one of claims 1 to 6.
16. A terminal device, wherein the terminal device is communicatively connected to a near field communication, NFC, electronic tag, the terminal device comprising:
the input data sending unit is used for sending input data of the terminal equipment to the NFC electronic tag, the input data are used for being packaged according to stored tag information to obtain first transmission data when the NFC electronic tag detects that a second terminal in an NFC card reader mode reads the tag of the NFC electronic tag, and the first transmission data are used for being transmitted to the second terminal through an NFC radio frequency field generated by the second terminal by the NFC electronic tag so that the second terminal can analyze the input data from the first transmission data.
17. A terminal device comprising a memory and a processor, the memory having stored therein a computer program which, when executed by the processor, causes the processor to carry out the method of claim 7.
18. A terminal device, characterized in that the terminal device comprises:
the reading operation unit is used for performing label reading operation on the NFC electronic label if the NFC electronic label is detected to be in an NFC radio frequency field generated by the terminal equipment when the terminal equipment is in an NFC card reader mode;
a transmission data reading unit, configured to read first transmission data from the NFC electronic tag according to the tag reading operation, where the first transmission data is obtained by encapsulating, according to stored tag information, input data sent by a first terminal when the NFC electronic tag detects the tag reading operation, and the first terminal is in communication connection with the NFC electronic tag;
and the analysis unit is used for analyzing the input data from the first transmission data.
19. A terminal device comprising a memory and a processor, the memory having stored thereon a computer program which, when executed by the processor, causes the processor to carry out the method of any one of claims 8 to 12.
20. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a computer, carries out the method according to any one of claims 8 to 12.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011433361.7A CN112686358A (en) | 2020-12-09 | 2020-12-09 | Data transmission method, NFC electronic tag, terminal device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011433361.7A CN112686358A (en) | 2020-12-09 | 2020-12-09 | Data transmission method, NFC electronic tag, terminal device and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112686358A true CN112686358A (en) | 2021-04-20 |
Family
ID=75446595
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011433361.7A Pending CN112686358A (en) | 2020-12-09 | 2020-12-09 | Data transmission method, NFC electronic tag, terminal device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112686358A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113613225A (en) * | 2021-07-29 | 2021-11-05 | 珠海格力电器股份有限公司 | Debugging method, debugging device, electronic equipment and computer readable storage medium |
CN113676883A (en) * | 2021-08-10 | 2021-11-19 | Oppo广东移动通信有限公司 | Housing assembly, communication method, electronic device, communication system, and storage medium |
CN113780022A (en) * | 2021-09-09 | 2021-12-10 | 珠海格力电器股份有限公司 | Near field communication triggering method and device, electronic equipment and storage medium |
CN114157925A (en) * | 2021-08-31 | 2022-03-08 | 佛山市顺德区美的饮水机制造有限公司 | Water intaking data transmission method, device and system |
CN114693339A (en) * | 2022-02-15 | 2022-07-01 | 北京优酷科技有限公司 | User rights and interests resource processing method and electronic equipment |
WO2024065698A1 (en) * | 2022-09-30 | 2024-04-04 | Oppo广东移动通信有限公司 | Communication method and apparatus, and device, storage medium, chip, product and program |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103501192A (en) * | 2013-09-24 | 2014-01-08 | 深圳Tcl新技术有限公司 | Method and device for data transmission between terminals |
CN106162364A (en) * | 2015-03-30 | 2016-11-23 | 腾讯科技(深圳)有限公司 | Intelligent television system input method and device, terminal auxiliary input method and device |
CN108833200A (en) * | 2018-05-04 | 2018-11-16 | 佛山科学技术学院 | A kind of adaptive unidirectional transmission method of large data files and device |
-
2020
- 2020-12-09 CN CN202011433361.7A patent/CN112686358A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103501192A (en) * | 2013-09-24 | 2014-01-08 | 深圳Tcl新技术有限公司 | Method and device for data transmission between terminals |
CN106162364A (en) * | 2015-03-30 | 2016-11-23 | 腾讯科技(深圳)有限公司 | Intelligent television system input method and device, terminal auxiliary input method and device |
CN108833200A (en) * | 2018-05-04 | 2018-11-16 | 佛山科学技术学院 | A kind of adaptive unidirectional transmission method of large data files and device |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113613225A (en) * | 2021-07-29 | 2021-11-05 | 珠海格力电器股份有限公司 | Debugging method, debugging device, electronic equipment and computer readable storage medium |
CN113676883A (en) * | 2021-08-10 | 2021-11-19 | Oppo广东移动通信有限公司 | Housing assembly, communication method, electronic device, communication system, and storage medium |
CN113676883B (en) * | 2021-08-10 | 2023-10-13 | Oppo广东移动通信有限公司 | Housing assembly, communication method, electronic device, communication system, and storage medium |
CN114157925A (en) * | 2021-08-31 | 2022-03-08 | 佛山市顺德区美的饮水机制造有限公司 | Water intaking data transmission method, device and system |
CN113780022A (en) * | 2021-09-09 | 2021-12-10 | 珠海格力电器股份有限公司 | Near field communication triggering method and device, electronic equipment and storage medium |
CN113780022B (en) * | 2021-09-09 | 2024-05-03 | 珠海格力电器股份有限公司 | Near field communication triggering method, device, electronic equipment and storage medium |
CN114693339A (en) * | 2022-02-15 | 2022-07-01 | 北京优酷科技有限公司 | User rights and interests resource processing method and electronic equipment |
WO2024065698A1 (en) * | 2022-09-30 | 2024-04-04 | Oppo广东移动通信有限公司 | Communication method and apparatus, and device, storage medium, chip, product and program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112686358A (en) | Data transmission method, NFC electronic tag, terminal device and storage medium | |
CN107612909B (en) | Information interaction method, device and equipment about Internet of things equipment | |
CN109152094B (en) | Wireless network connection method for terminal | |
CN113259301B (en) | Account data sharing method and electronic equipment | |
CN107786331B (en) | Data processing method, device, system and computer readable storage medium | |
US20150119017A1 (en) | Method and system for implementing smart card remote operation based on smart card web server | |
US11310727B2 (en) | Methods, devices and media for obtaining and for providing access information of wireless access points | |
CN110113250B (en) | Method for sharing wireless access point through instant messaging software | |
CN109699019B (en) | Broadcast scanning method, device, electronic equipment and storage medium | |
CN104346560A (en) | Security authentication method and security authentication device | |
CN111918274B (en) | Code number configuration and management method and device, electronic equipment and readable storage medium | |
US20230180007A1 (en) | Electronic device and method for electronic device to provide ranging-based service | |
CN105848145A (en) | WIFI intelligent configuration method and device | |
CN111404706A (en) | Application downloading method, secure element, client device and service management device | |
CN111722938A (en) | AT instruction processing method, AT instruction processing device, computer equipment and storage medium | |
CN114339737A (en) | Wireless communication instruction encryption method and related equipment | |
CN104202432B (en) | Remote web management system and management method | |
CN113038192A (en) | Video processing method and device, electronic equipment and storage medium | |
CN111818492A (en) | Bluetooth beacon and data transmission method and readable storage medium thereof | |
CN111338673A (en) | Equipment debugging method and device, electronic equipment and storage medium | |
CN116244764A (en) | Method and system for generating device unique ID of Android device | |
CN111770488B (en) | EHPLMN updating method, related equipment and storage medium | |
CN114996730A (en) | Data encryption and decryption system, method, computer equipment and storage medium | |
CN113596827A (en) | Key generation method and device, electronic equipment and storage medium | |
CN113037760A (en) | Message sending method and device |
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 |