A data transmission method and related equipment

By monitoring the connection time difference between the terminal and the electronic tag and sending data retransmission instructions, the problem of data interruption when reconnecting after disconnection is solved, ensuring data integrity and accuracy and avoiding garbled characters.

CN111356119BActive Publication Date: 2024-09-27BOE TECHNOLOGY GROUP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010170524.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-03-12
Publication Date
2024-09-27
Estimated Expiration
2040-04-18

AI Technical Summary

Technical Problem

When the mobile phone or Reader terminal is disconnected from the electronic tag and then reconnected beyond the breakpoint resumption limit time, data transmission is interrupted, resulting in garbled content displayed on the electronic tag, and the data packets transmitted before the disconnection may be missing.

Method used

By monitoring the time difference between the disconnection and reconnection of the near-field communication connection between the terminal and the electronic tag, if the breakpoint resumption time threshold is exceeded, a data retransmission instruction is sent to the terminal to cause it to resend data starting from the first data packet. And use check codes during data packet transmission to ensure data integrity.

Benefits of technology

Ensure the integrity and accuracy of data transmission, avoid the occurrence of garbled characters, and further ensure the accuracy of data through the verification mechanism.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111356119B
    Figure CN111356119B
Patent Text Reader

Abstract

The present invention provides a data transmission method and related equipment, including: establishing a near field communication connection with a terminal; in the process of receiving data sent by the terminal, monitoring the time difference between when the near field communication connection with the terminal is disconnected and when it is reconnected; if the time difference is greater than the breakpoint resume time threshold, sending a data retransmission instruction to the terminal. The data transmission method provided by an embodiment of the present invention sends a retransmission instruction to the terminal when the disconnection time difference exceeds the breakpoint resume interval time, so that after receiving the retransmission instruction, the terminal retransmits data from the first data packet sent again, preventing the electronic tag from missing the data packet transmitted before the disconnection, thereby ensuring that the transmitted data is complete and accurate, and avoiding garbled characters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electronic tags, and in particular to a data transmission method and related equipment. Background Art

[0002] If a mobile phone or a reader is separated from an electronic tag during data transmission and the time limit for resuming data transmission is exceeded, when the terminal is brought close to the electronic tag again, data transmission can still be performed, but the content displayed on the electronic tag will be garbled. In addition, the longer the data transmission time before the disconnection, the larger the area that is not displayed on the display.

[0003] It can be seen that when the breakpoint resume limit time is exceeded, when the terminal approaches the electronic tag again, it does not resend from the first sent data packet, resulting in the loss of the data packet transmitted before the disconnection in the electronic tag, which in turn causes garbled characters in the displayed content. Summary of the invention

[0004] In view of this, the purpose of the present invention is to provide a data transmission method and related equipment to solve the problem of garbled characters appearing in the content displayed by the electronic tag.

[0005] According to a first aspect of an embodiment of the present invention, a data transmission method is provided, which is applied to an electronic tag, and includes:

[0006] Establishing a near field communication connection with a terminal;

[0007] In the process of receiving data sent by the terminal, monitoring the time difference between when the near field communication connection with the terminal is disconnected and when it is reconnected;

[0008] If the time difference is greater than the breakpoint resume time threshold, the terminal sends a data retransmission instruction.

[0009] In some embodiments of the present invention, if the time difference is greater than the breakpoint resume time threshold, sending a data retransmission instruction to the terminal includes:

[0010] If the time difference is greater than the breakpoint resume transmission time threshold, the currently received data sent by the terminal is cleared, and a data retransmission instruction is sent to the terminal to instruct the terminal to resend all the data.

[0011] In some embodiments of the present invention, after establishing a near field communication connection with a terminal, the method further includes:

[0012] The voltage of the supercapacitor of the electronic tag is monitored, and if the voltage of the supercapacitor is greater than or equal to a first voltage threshold, a data transmission instruction is sent to the terminal.

[0013] In some embodiments of the present invention, after establishing a near field communication connection with the terminal, the method further includes:

[0014] Receiving data sent by the terminal; wherein the data includes a plurality of data packets, each of which includes a data information code and an information check code, and the information check code is calculated by the terminal according to the data information code;

[0015] For each of the data packets, calculating the to-be-verified check code of the data information code, and determining whether the to-be-verified check code is consistent with the information check code;

[0016] If not, returning a message indicating that the data packet transmission failed to the terminal;

[0017] If yes, a message indicating that the data packet has been successfully transmitted is returned to the terminal.

[0018] In some embodiments of the present invention, each of the data packets further includes a packet number check code;

[0019] After receiving the data sent by the terminal, the method further includes:

[0020] Determining whether the received data is complete according to the packet number verification code;

[0021] If not, sending a data retransmission instruction to the terminal;

[0022] If so, a data update instruction is sent to the display device of the electronic tag.

[0023] In some embodiments of the present invention, the packet number check code includes the total number of data packets;

[0024] Judging whether the received data is complete according to the packet number verification code includes:

[0025] Calculate the total number of packets received;

[0026] It is determined whether the total number of all received data packets is consistent with the total number of data packets of the packet number check code, so as to determine whether the received data is complete.

[0027] In some embodiments of the present invention, the packet number check code includes an identifier of the data packet;

[0028] Judging whether the received data is complete according to the packet number verification code includes:

[0029] It is determined whether the identifier of the last received data packet is the identifier of the first data packet, thereby determining whether the received data is complete.

[0030] In some embodiments of the present invention, the packet number check code includes an identifier of the data packet;

[0031] According to the packet number verification code, judging whether the received data is complete; if not, sending a data retransmission instruction to the terminal; if yes, sending a data update instruction to the display device of the electronic tag, including:

[0032] Traverse the identifiers of all received data packets to determine whether there is an identifier of a missing data packet;

[0033] If yes, sending a data retransmission instruction carrying the identifier of the missing data packet to the terminal;

[0034] If not, a data update instruction is sent to the display device of the electronic tag.

[0035] In some embodiments of the present invention, sending a data update instruction to a display device of the electronic tag includes:

[0036] The voltage of the supercapacitor of the electronic tag is monitored, and if the voltage of the supercapacitor is greater than or equal to a second voltage threshold, a data update instruction is sent to the display device of the electronic tag.

[0037] According to a second aspect of an embodiment of the present invention, a data transmission method is provided, which is applied to a terminal, including:

[0038] Establishing a near field communication connection with the electronic tag;

[0039] In the process of sending data to the electronic tag, receiving a data retransmission instruction sent by the electronic tag;

[0040] Resend the data that has already been sent.

[0041] In some embodiments of the present invention, resending the sent data includes:

[0042] Each packet is resent starting with the first packet sent.

[0043] In some embodiments of the present invention, it further comprises:

[0044] If a message indicating that the data packet transmission has failed is received from the electronic tag, the message is parsed to obtain an identifier of the data packet that has failed to be transmitted, and the data packet that has failed to be transmitted is resent to the electronic tag;

[0045] If a message indicating successful data packet transmission is received from the electronic tag, the message is parsed to obtain an identifier of the successfully transmitted data packet, and the next data packet is sent to the electronic tag;

[0046] If a data retransmission instruction carrying the identifier of the missing data packet sent by the electronic tag is received, the instruction is parsed to obtain the identifier of the missing data packet, and the missing data packet is sent to the electronic tag.

[0047] According to a third aspect of an embodiment of the present invention, there is provided an electronic tag, including a display device, a communication device and a processor; wherein:

[0048] The communication device is configured to establish a near field communication connection with the terminal;

[0049] The processor is configured to: during the process of receiving data sent by the terminal, monitor the time difference experienced when the near field communication connection with the terminal is disconnected and reconnected; if the time difference is greater than the breakpoint resume time threshold, send a data retransmission instruction to the terminal.

[0050] In some embodiments of the present invention, the processor is further configured to: if the time difference is greater than the breakpoint resume time threshold, clear the currently received data sent by the terminal, and send a data retransmission instruction to the terminal to instruct the terminal to resend all data.

[0051] In some embodiments of the present invention, the processor is further configured to: after establishing a near field communication connection with the terminal, monitor the voltage of the supercapacitor of the electronic tag, and if the voltage of the supercapacitor is greater than or equal to a first voltage threshold, send a data transmission instruction to the terminal.

[0052] In some embodiments of the present invention, the processor is further configured to: after establishing a near-field communication connection with the terminal, receive data sent by the terminal; wherein the data includes several data packets, each of which includes a data information code and an information verification code, and the information verification code is calculated by the terminal based on the data information code; for each of the data packets, calculate the verification code to be verified of the data information code, and determine whether the verification code to be verified is consistent with the information verification code; if not, return a message to the terminal indicating that the data packet transmission failed; if so, return a message to the terminal indicating that the data packet transmission was successful.

[0053] In some embodiments of the present invention, each of the data packets also includes a packet number verification code; the processor is also configured to: after receiving the data sent by the terminal, determine whether the received data is complete based on the packet number verification code; if not, send a data retransmission instruction to the terminal; if so, send a data update instruction to the display device of the electronic tag.

[0054] In some embodiments of the present invention, the packet number check code includes the total number of data packets; the processor is also configured to: calculate the total number of all received data packets; determine whether the total number of all received data packets is consistent with the total number of data packets of the packet number check code, thereby determining whether the received data is complete.

[0055] In some embodiments of the present invention, the packet number check code includes an identifier of the data packet; the processor is further configured to: determine whether the identifier of the last received data packet is the identifier of the first data packet, thereby determining whether the received data is complete.

[0056] In some embodiments of the present invention, the packet number check code includes an identifier of the data packet; the processor is further configured to: traverse the identifiers of all received data packets to determine whether there is an identifier of a missing data packet; if so, send a data retransmission instruction carrying the identifier of the missing data packet to the terminal; if not, send a data update instruction to the display device of the electronic tag.

[0057] In some embodiments of the present invention, the processor is further configured to: monitor the voltage of the supercapacitor of the electronic tag, and if the voltage of the supercapacitor is greater than or equal to a second voltage threshold, send a data update instruction to the display device of the electronic tag.

[0058] According to a fourth aspect of an embodiment of the present invention, there is provided a data transmission device, which is arranged in a terminal and includes:

[0059] A communication module is configured to establish a near field communication connection with the electronic tag;

[0060] a receiving module, configured to receive a data retransmission instruction sent by the electronic tag during the process of sending data to the electronic tag;

[0061] The sending module is configured to resend the sent data.

[0062] In some embodiments of the present invention, the sending module is further configured to: resend each data packet starting from the first data packet sent.

[0063] In some embodiments of the present invention, the sending module is further configured to:

[0064] If a message indicating that the data packet transmission has failed is received from the electronic tag, the message is parsed to obtain an identifier of the data packet that has failed to be transmitted, and the data packet that has failed to be transmitted is resent to the electronic tag;

[0065] If a message indicating successful data packet transmission is received from the electronic tag, the message is parsed to obtain an identifier of the successfully transmitted data packet, and the next data packet is sent to the electronic tag;

[0066] If a data retransmission instruction carrying the identifier of the missing data packet sent by the electronic tag is received, the instruction is parsed to obtain the identifier of the missing data packet, and the missing data packet is sent to the electronic tag.

[0067] According to a fifth aspect of an embodiment of the present invention, there is provided an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in any of the above embodiments when executing the program.

[0068] According to a sixth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method described in any of the above embodiments.

[0069] From the above description, it can be seen that the data transmission method and related equipment provided by the embodiment of the present invention, when the disconnection time difference exceeds the breakpoint-resume transmission interval time, sends a retransmission instruction to the terminal, so that after receiving the retransmission instruction, the terminal retransmits data from the first sent data packet again, preventing the electronic tag from missing the data packet transmitted before the disconnection, thereby ensuring the integrity and accuracy of the transmitted data and avoiding the garbled phenomenon. In addition, a verification mechanism is added for each data packet to further ensure the integrity and accuracy of the data transmission and avoid the garbled phenomenon. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0071] Figure 1 A schematic diagram of a data transmission method according to an embodiment of the present invention;

[0072] Figure 2 This is a schematic diagram of the structure of a terminal and an electronic tag according to an embodiment of the present invention;

[0073] Figure 3 A schematic flow chart of a data transmission method according to another embodiment of the present invention;

[0074] Figure 4A schematic flow chart of a data transmission method according to another embodiment of the present invention;

[0075] Figure 5 A schematic diagram of a data transmission method according to another embodiment of the present invention;

[0076] Figure 6 A schematic flow chart of a data transmission method according to another embodiment of the present invention;

[0077] Figure 7 A schematic flow chart of a data transmission method according to another embodiment of the present invention;

[0078] Figure 8 A schematic diagram of the structure of a data transmission device according to an embodiment of the present invention;

[0079] Fig. 9 A schematic diagram of the structure of a data transmission device according to another embodiment of the present invention;

[0080] Fig.10 Schematic diagram of the internal structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION

[0081] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings.

[0082] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present invention should be understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the present disclosure do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0083] In one embodiment of the present invention, Figure 1 As shown, an embodiment of the present invention provides a data transmission method, which is applied to an electronic tag and may include the following steps:

[0084] Step 101: Establish a near field communication connection with a terminal.

[0085] First, the electronic tag establishes NFC communication with a terminal with NFC (such as a mobile phone or reader, etc.). Figure 2 As shown, the electronic tag mainly includes MCU (micro control unit), super capacitor C, EPD (electronic paper display), etc. The terminal charges the super capacitor C and transmits data to the MCU through NFC technology. The MCU writes data and then sends an information update instruction to the EPD. After the electronic tag establishes a near field communication connection with the terminal, the terminal charges the super capacitor C, and the electronic tag monitors the voltage of the super capacitor C in real time. If the voltage of the super capacitor C is greater than or equal to the first voltage threshold, a data transmission instruction is sent to the terminal, so that the terminal starts to send data to the electronic tag.

[0086] Step 102: During the process of receiving data sent by the terminal, monitor the time difference between when the near field communication connection with the terminal is disconnected and when it is reconnected.

[0087] After the electronic tag establishes a near-field communication connection with the terminal, the terminal sends data to the electronic tag. In the process of receiving the data sent by the terminal, the electronic tag monitors in real time whether the near-field communication connection with the terminal is interrupted. If it is interrupted, the interruption time t0 is recorded. When the near-field communication connection between the electronic tag and the terminal is reconnected, the reconnection time t1 is recorded. The electronic tag calculates the time difference △t=t1-t0 between the time when the near-field communication connection with the terminal is disconnected and when it is reconnected.

[0088] Step 103: If the time difference is greater than the breakpoint resume time threshold, a data retransmission instruction is sent to the terminal.

[0089] If the time difference between the electronic tag and the terminal when the NFC connection is disconnected and reconnected is △t=t1-t0>T timeout (preset breakpoint resume interval time), a data retransmission instruction is sent to the terminal, so that after receiving the data retransmission instruction, the terminal retransmits data from the first sent data packet (i.e., retransmits all data). Optionally, before sending the data retransmission instruction, the received data may be cleared or may not be cleared, and the embodiment of the present invention does not limit this.

[0090] The data transmission method provided by the embodiment of the present invention sends a retransmission instruction to the terminal when the disconnection time difference exceeds the breakpoint-resume transmission interval time, so that after the terminal receives the retransmission instruction, it resends the data from the first data packet sent again, thereby preventing the electronic tag from missing the data packet transmitted before the disconnection, thereby ensuring the integrity and accuracy of the transmitted data and avoiding garbled characters.

[0091] As another embodiment of the present invention, Figure 3As shown, the data transmission method may include the following:

[0092] Step 301: Select the picture information to be updated on the terminal.

[0093] Step 302: The terminal is brought close to the electronic tag, thereby establishing a near field communication connection with the electronic tag and starting to charge the supercapacitor.

[0094] Step 303, charging is completed, the voltage of the supercapacitor is ≥1.8V, and the terminal starts to transmit data to the MCU.

[0095] Step 304 , determining whether the near field communication connection with the terminal is interrupted; if so, executing step 305 ; if not, executing step 309 .

[0096] Step 305, the MCU records the interruption time t0, and when the NFC connection between the electronic tag and the terminal is reconnected, records the reconnection time t1, and calculates the time difference △t=t1-t0 between the disconnection and reconnection of the NFC connection between the electronic tag and the terminal.

[0097] Step 306, determine whether the time difference Δt=t1-t0 is greater than T timeout (preset breakpoint resume interval); if so, execute step 307; if not, execute step 308.

[0098] Step 307: The MCU clears the received data and sends a data retransmission instruction to the terminal.

[0099] Step 308: The MCU starts the power-off resume function and continues to receive data sent by the terminal. The terminal continues to send data from the current state.

[0100] Step 309: The MCU continues to receive data sent by the terminal until the data transmission is completed, and the terminal starts to charge the supercapacitor.

[0101] Step 310, charging is completed, the voltage of the super capacitor is ≥ 2.3V, the MCU sends a data update instruction to the EPD, and the EPD starts to refresh the data.

[0102] As another embodiment of the present invention, Figure 4 As shown, an embodiment of the present invention further provides a data transmission method, which is applied to an electronic tag and may include the following steps:

[0103] Step 401: Establish a near field communication connection with a terminal.

[0104] Step 402: Receive data sent by the terminal.

[0105] After the electronic tag establishes a near field communication connection with the terminal, the terminal sends data to the electronic tag, and the electronic tag receives the data. The data includes several data packets, each of which includes a data information code and an information check code, and the information check code is calculated by the terminal according to the data information code. It should be noted that the terminal sends data packets one by one starting from the first data packet sent until all data packets are sent.

[0106] Generally speaking, the terminal will use the data packet with the largest identifier as the first data packet to be sent. For example, if there are 10 data packets to be sent, and the identifiers are 01, 02, ..., 10, the terminal will use the data packet identified as "10" as the first data packet to be sent, and send data packets such as 10, 9, ..., 02, 01, etc. one by one, then the data packet identified as "01" is the last data packet to be sent. Before the terminal sends a data packet, it calculates the information check code of the data information code in the data packet, such as the CRC (cyclic redundancy check) value, so that the electronic tag can verify the validity of the data packet after receiving the data information code and the information check code.

[0107] Optionally, each time the terminal starts to transmit data (either just beginning or restarting after an interruption), the total number of data packets of the data updated this time may be sent first, so that the electronic tag can compare the total number of data packets after receiving all data packets.

[0108] Step 403, for each of the data packets, calculate the verification code of the data information code, and determine whether the verification code is consistent with the information verification code; if so, execute step 404; if not, execute step 405.

[0109] Each time the electronic tag receives a data packet sent by the terminal, it calculates the verification code of the data information code in the data packet (the calculation method is the same as the terminal), calculates the verification code to be verified, and determines whether the verification code to be verified is consistent with the information verification code in the data packet.

[0110] Step 404: Return a message indicating that the data packet has been successfully transmitted to the terminal.

[0111] If the verification code to be verified is consistent with the information verification code in the data packet, it means that the data packet transmission is completed, and a message indicating that the data packet transmission is successful is returned to the terminal. After receiving the message, the terminal then sends the next data packet.

[0112] Step 405: Return a message indicating that the data packet transmission fails to the terminal.

[0113] If the verification code to be verified is inconsistent with the information verification code in the data packet, it means that the data packet transmission fails, and a message indicating that the data packet transmission fails is returned to the terminal. After receiving the message, the terminal resends the data packet.

[0114] Step 406: During the process of receiving the data sent by the terminal, monitor the time difference between when the near field communication connection with the terminal is disconnected and when it is reconnected.

[0115] When receiving data sent by the terminal, the electronic tag monitors in real time whether the near field communication connection with the terminal is interrupted. If it is interrupted, the interruption time t0 is recorded. When the near field communication connection between the electronic tag and the terminal is reconnected, the reconnection time t1 is recorded. The electronic tag calculates the time difference △t=t1-t0 between the time when the near field communication connection with the terminal is disconnected and when it is reconnected.

[0116] Step 407: If the time difference is greater than the breakpoint resume time threshold, a data retransmission instruction is sent to the terminal.

[0117] If the time difference between the electronic tag and the terminal when the NFC connection is disconnected and reconnected is △t=t1-t0>T timeout (preset breakpoint resume interval time), the received data is cleared, and a data retransmission instruction is sent to the terminal, so that after the terminal receives the data retransmission instruction, it resends the data from the first sent data packet (i.e., resends all the data).

[0118] Optionally, after receiving all the data packets, the electronic tag traverses each data packet to obtain the total number of all received data packets, and determines whether the total number of all received data packets is consistent with the total number of data packets sent by the terminal, thereby determining whether the received data is complete.

[0119] The data transmission method provided by the embodiment of the present invention sends a retransmission instruction to the terminal when the disconnection time difference exceeds the breakpoint-resume transmission interval time, so that after the terminal receives the retransmission instruction, it starts to send data again from the first sent data packet, thereby preventing the electronic tag from missing the data packet transmitted before the disconnection, thereby ensuring the integrity and accuracy of the transmitted data; and adding a verification mechanism for each data packet to further ensure the integrity and accuracy of the data transmission and avoid the occurrence of garbled characters.

[0120] As another embodiment of the present invention, Figure 5 As shown, an embodiment of the present invention further provides a data transmission method, which is applied to an electronic tag and may include the following steps:

[0121] Step 501: Establish a near field communication connection with a terminal.

[0122] Step 502: Receive data sent by the terminal.

[0123] After the electronic tag establishes a near field communication connection with the terminal, the terminal sends data to the electronic tag, and the electronic tag receives the data. The data includes several data packets, each of which includes a data information code, an information check code, and a packet number check code, and the information check code is calculated by the terminal based on the data information code. For example, each data packet is composed of an M-bit packet number check code, a K-bit data information code, and an R-bit information check code; wherein the packet number check code can be the total number of data packets or the identifier of the data packet.

[0124] Step 503, for each of the data packets, calculate the verification code of the data information code, and determine whether the verification code is consistent with the information verification code; if so, execute step 504; if not, execute step 505.

[0125] Each time the electronic tag receives a data packet sent by the terminal, it calculates the verification code of the data information code in the data packet (the calculation method is the same as the terminal), calculates the verification code to be verified, and determines whether the verification code to be verified is consistent with the information verification code in the data packet.

[0126] Step 504: Return a message indicating that the data packet has been successfully transmitted to the terminal.

[0127] If the verification code to be verified is consistent with the information verification code in the data packet, it means that the data packet transmission is completed, and a message indicating that the data packet transmission is successful is returned to the terminal. After receiving the message, the terminal then sends the next data packet.

[0128] Step 505: Return a message indicating that the data packet transmission fails to the terminal.

[0129] If the verification code to be verified is inconsistent with the information verification code in the data packet, it means that the data packet transmission fails, and a message indicating that the data packet transmission fails is returned to the terminal. After receiving the message, the terminal resends the data packet.

[0130] Step 506: During the process of receiving the data sent by the terminal, monitor the time difference between when the near field communication connection with the terminal is disconnected and when it is reconnected.

[0131] When receiving data sent by the terminal, the electronic tag monitors in real time whether the near field communication connection with the terminal is interrupted. If it is interrupted, the interruption time t0 is recorded. When the near field communication connection between the electronic tag and the terminal is reconnected, the reconnection time t1 is recorded. The electronic tag calculates the time difference △t=t1-t0 between the time when the near field communication connection with the terminal is disconnected and when it is reconnected.

[0132] Step 507: If the time difference is greater than the breakpoint resume time threshold, the terminal sends a data retransmission instruction.

[0133] If the time difference between the electronic tag and the terminal when the NFC connection is disconnected and reconnected is △t=t1-t0>T timeout (preset breakpoint resume transmission interval time), then send a data retransmission instruction to the terminal, so that after receiving the data retransmission instruction, the terminal resends data from the first sent data packet (that is, resends all data).

[0134] Step 508, judging whether the received data is complete according to the packet number verification code; if not, executing step 509; if yes, executing step 510.

[0135] Optionally, if the packet number check code is the total number of data packets A; then, calculate the total number of data packets B of all received data packets; determine whether the total number of data packets B of all received data packets is consistent with the total number of data packets A of the packet number check code, thereby determining whether the received data is complete.

[0136] Optionally, if the packet number check code is the identifier of the data packet (identifiers of data packets are marked one by one: 01, 02, ...), then it is determined whether the identifier of the last received data packet is the identifier of the first data packet, thereby determining whether the received data is complete. That is, it is determined whether the identifier of the last received data packet is "01".

[0137] Step 509: Send a data retransmission instruction to the terminal.

[0138] If the total number of all data packets received by the electronic tag is inconsistent with the total number of data packets of the packet number check code, indicating that there is a missing data packet, a data retransmission instruction is sent to the terminal, so that after receiving the data retransmission instruction, the terminal retransmits the data from the first sent data packet (i.e., retransmits all data). Alternatively, if the identifier of the last received data packet is not "01", indicating that there is a missing data packet, a data retransmission instruction is sent to the terminal, so that after receiving the data retransmission instruction, the terminal retransmits the data from the first sent data packet (i.e., retransmits all data).

[0139] Step 510: Send a data update instruction to the display device (such as EPD) of the electronic tag.

[0140] If the total number of all data packets received by the electronic tag is consistent with the total number of data packets of the packet number check code, it means that the data packet is complete, and a data update instruction is sent to the display device of the electronic tag, and the display device starts to refresh the data. Alternatively, if the identifier of the last received data packet is "01", it means that the data packet is complete, and a data update instruction is sent to the display device of the electronic tag, and the display device starts to refresh the data.

[0141] Optionally, step 510 may include: monitoring the voltage of the supercapacitor C of the electronic tag, and if the voltage of the supercapacitor C is greater than or equal to a second voltage threshold (the second voltage threshold is greater than the first voltage threshold), sending a data update instruction to the display device of the electronic tag, thereby refreshing the data to the display device.

[0142] The data transmission method provided by the embodiment of the present invention sends a retransmission instruction to the terminal when the disconnection time difference exceeds the breakpoint-resume transmission interval time, so that after the terminal receives the retransmission instruction, it resends the data from the first sent data packet, thereby preventing the electronic tag from missing the data packet transmitted before the disconnection, thereby ensuring the integrity and accuracy of the transmitted data; and adding a verification mechanism for each data packet through a packet number check code and an information check code, doubly ensuring the integrity and accuracy of the data transmission, and avoiding the occurrence of garbled characters.

[0143] Optionally, in an embodiment where the packet number verification code is an identifier of a data packet, it is determined whether the received data is complete based on the packet number verification code; if not, a data retransmission instruction is sent to the terminal; if so, a data update instruction is sent to the display device of the electronic tag, including: traversing the identifiers of all received data packets to determine whether there is an identifier of a missing data packet; if so, a data retransmission instruction carrying the identifier of the missing data packet is sent to the terminal; if not, a data update instruction is sent to the display device of the electronic tag. In this embodiment, it is possible to determine whether there is an identifier of a missing data packet by traversing the identifiers of each data packet. If so, a data retransmission instruction carrying the identifier of the missing data packet is sent to the terminal. After receiving the data retransmission instruction, the terminal sends the missing data packet again.

[0144] As another embodiment of the present invention, Figure 6 As shown, the data transmission method may include the following:

[0145] Step 601: Select the picture information to be updated on the terminal.

[0146] Step 602: The terminal is brought close to the electronic tag, thereby establishing a near field communication connection with the electronic tag and starting to charge the supercapacitor.

[0147] Step 603, charging is completed, the voltage of the supercapacitor is ≥1.8V, and the terminal starts to transmit data to the MCU.

[0148] The data includes several data packets, each of which includes a data information code, an information check code and a packet number check code, and the information check code (such as a CRC value) is calculated by the terminal according to the data information code. For example, each data packet is composed of an M-bit packet number check code, a K-bit data information code and an R-bit information check code; wherein the packet number check code can be the total number of data packets or the identifier of the data packet.

[0149] Step 604, for each of the data packets, the MCU calculates the verification code of the data information code and determines whether the verification code is consistent with the information verification code; if so, a message indicating successful transmission of the data packet is returned to the terminal; if not, a message indicating failed transmission of the data packet is returned to the terminal.

[0150] In step 605 , the MCU determines whether the near field communication connection with the terminal is interrupted; if so, step 606 is executed; if not, step 610 is executed.

[0151] Step 606, the MCU records the interruption time t0, and when the NFC connection between the electronic tag and the terminal is reconnected, records the reconnection time t1, and calculates the time difference △t=t1-t0 between the disconnection and reconnection of the NFC connection between the electronic tag and the terminal.

[0152] Step 607, determine whether the time difference △t=t1-t0 is greater than T timeout (preset breakpoint resume interval); if so, execute step 608; if not, execute step 609.

[0153] Step 608: The MCU clears the received data and sends a data retransmission instruction to the terminal.

[0154] Step 609: The MCU starts the power-off resume function and continues to receive data sent by the terminal.

[0155] In step 610, the MCU continues to receive data sent by the terminal until the data transmission is completed. The MCU determines whether the received data is complete based on the packet number verification code; if so, step 611 is executed; if not, a data retransmission instruction is sent to the terminal, and the terminal resends the data or the missing data packet.

[0156] Step 611, after confirming the completion of data transmission through double verification, the terminal starts charging the supercapacitor.

[0157] Step 612, charging is completed, the voltage of the super capacitor is ≥ 2.3V, the MCU sends a data update instruction to the EPD, and the EPD starts to refresh the data.

[0158] In another embodiment of the present invention, Figure 7 As shown, an embodiment of the present invention provides a data transmission method, which is applied to a terminal and may include the following steps:

[0159] Step 701: Establish a near field communication connection with an electronic tag.

[0160] The terminal has an NFC coil, and may be a mobile phone or a reader, etc. The terminal establishes NFC communication with the electronic tag, and then the terminal charges the electronic tag and transmits data through the NFC technology.

[0161] Step 702: In the process of sending data to the electronic tag, receiving a data retransmission instruction sent by the electronic tag.

[0162] After the electronic tag establishes a near-field communication connection with the terminal, the terminal sends data to the electronic tag. In the process of receiving the data sent by the terminal, the electronic tag monitors in real time whether the near-field communication connection with the terminal is interrupted. If it is interrupted, the interruption time t0 is recorded. When the near-field communication connection between the electronic tag and the terminal is reconnected, the reconnection time t1 is recorded. The electronic tag calculates the time difference △t=t1-t0 between the time when the near-field communication connection between the electronic tag and the terminal is disconnected and reconnected. If the time difference △t=t1-t0>T timeout (preset breakpoint resume transmission interval time), then send a data retransmission instruction to the terminal.

[0163] Step 703: resend the sent data.

[0164] After receiving the data retransmission instruction sent by the electronic tag, the terminal resends the sent data. Optionally, the terminal resends each data packet starting from the first sent data packet (ie resends all data, including not only the sent data but also the data that has not been sent before).

[0165] Optionally, the method also includes: if a message indicating that the data packet transmission failed is received from the electronic tag, parsing the message to obtain the identifier of the data packet that failed to be transmitted, and resending the data packet that failed to be transmitted to the electronic tag; if a message indicating that the data packet transmission was successful is received from the electronic tag, parsing the message to obtain the identifier of the data packet that was successfully transmitted, and sending the next data packet to the electronic tag; if a data retransmission instruction carrying the identifier of a missing data packet is received from the electronic tag, parsing the instruction to obtain the identifier of the missing data packet, and sending the missing data packet to the electronic tag.

[0166] In the data transmission method provided by the embodiment of the present invention, when the disconnection time difference exceeds the breakpoint-resume transmission interval, the electronic tag sends a retransmission instruction to the terminal, so that after the terminal receives the retransmission instruction, it resends the data from the first data packet sent, thereby preventing the electronic tag from missing the data packet transmitted before the disconnection, thereby ensuring the integrity and accuracy of the transmitted data and avoiding garbled characters.

[0167] The embodiment of the present invention also provides an electronic tag, such as Figure 8 As shown, the electronic tag 800 includes a display device 801, a communication device 802 and a processor 803; wherein the communication device 801 is configured to establish a near-field communication connection with the terminal; the processor 803 is configured to monitor the time difference experienced when the near-field communication connection with the terminal is disconnected and reconnected during the process of receiving data sent by the terminal; the instruction module 803 is configured to send a data retransmission instruction to the terminal if the time difference is greater than the breakpoint resume time threshold.

[0168] In some embodiments of the present invention, the processor 803: if the time difference is greater than the breakpoint resume time threshold, clears the currently received data sent by the terminal, and sends a data retransmission instruction to the terminal to instruct the terminal to resend all data.

[0169] In some embodiments of the present invention, the processor 803 is further configured to: after establishing a near field communication connection with the terminal, monitor the voltage of the supercapacitor of the electronic tag, and if the voltage of the supercapacitor is greater than or equal to a first voltage threshold, send a data transmission instruction to the terminal.

[0170] In some embodiments of the present invention, the processor 803 is further configured to: after establishing a near-field communication connection with the terminal, receive data sent by the terminal; wherein the data includes a plurality of data packets, each of the data packets includes a data information code and an information verification code, and the information verification code is calculated by the terminal based on the data information code; for each of the data packets, calculate the verification code to be verified of the data information code, and determine whether the verification code to be verified is consistent with the information verification code; if not, return a message to the terminal indicating that the data packet transmission failed; if so, return a message to the terminal indicating that the data packet transmission was successful.

[0171] In some embodiments of the present invention, each of the data packets also includes a packet number verification code; the processor 803 is also configured to: after receiving the data sent by the terminal, determine whether the received data is complete based on the packet number verification code; if not, send a data retransmission instruction to the terminal; if so, send a data update instruction to the display device of the electronic tag.

[0172] In some embodiments of the present invention, the packet number check code includes the total number of data packets; the processor 803 is also configured to: calculate the total number of all received data packets; determine whether the total number of all received data packets is consistent with the total number of data packets of the packet number check code, thereby determining whether the received data is complete.

[0173] In some embodiments of the present invention, the packet number check code includes an identifier of the data packet; the processor 803 is further configured to: determine whether the identifier of the last received data packet is the identifier of the first data packet, thereby determining whether the received data is complete.

[0174] In some embodiments of the present invention, the packet number check code includes an identifier of the data packet; the processor 803 is also configured to: traverse the identifiers of all received data packets to determine whether there is an identifier of a missing data packet; if so, send a data retransmission instruction carrying the identifier of the missing data packet to the terminal; if not, send a data update instruction to the display device of the electronic tag.

[0175] In some embodiments of the present invention, the processor 803 is further configured to: monitor the voltage of the supercapacitor of the electronic tag, and if the voltage of the supercapacitor is greater than or equal to a second voltage threshold, send a data update instruction to the display device of the electronic tag.

[0176] The embodiment of the present invention also provides a data transmission device, which is arranged in a terminal, such as Fig. 9As shown, it includes: a communication module 901, a receiving module 902 and a sending module 903; wherein the communication module 901 is configured to establish a near field communication connection with the electronic tag; the receiving module 902 is configured to receive a data retransmission instruction sent by the electronic tag during the process of sending data to the electronic tag; and the sending module 903 is configured to resend the sent data.

[0177] In some embodiments of the present invention, the sending module 903 is further configured to resend each data packet starting from the first sent data packet.

[0178] In some embodiments of the present invention, the sending module 903 is further configured to:

[0179] If a message indicating that the data packet transmission has failed is received from the electronic tag, the message is parsed to obtain an identifier of the data packet that has failed to be transmitted, and the data packet that has failed to be transmitted is resent to the electronic tag;

[0180] If a message indicating successful data packet transmission is received from the electronic tag, the message is parsed to obtain an identifier of the successfully transmitted data packet, and the next data packet is sent to the electronic tag;

[0181] If a data retransmission instruction carrying the identifier of the missing data packet sent by the electronic tag is received, the instruction is parsed to obtain the identifier of the missing data packet, and the missing data packet is sent to the electronic tag.

[0182] The apparatus of the above-mentioned embodiment is used to implement the corresponding method in the above-mentioned embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0183] Fig.10 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.

[0184] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0185] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.

[0186] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0187] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).

[0188] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).

[0189] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.

[0190] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0191] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples. Within the scope of the present invention, the above embodiments or technical features in different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the present invention as described above, which are not provided in detail for the sake of simplicity.

[0192] In addition, to simplify the description and discussion, and in order not to obscure the present invention, known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided figures. In addition, the devices may be shown in the form of block diagrams to avoid obscuring the present invention, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the present invention will be implemented (i.e., these details should be fully within the scope of understanding of those skilled in the art). Where specific details (e.g., circuits) are set forth to describe exemplary embodiments of the present invention, it will be apparent to those skilled in the art that the present invention may be implemented without these specific details or with variations in these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0193] Although the invention has been described in conjunction with specific embodiments of the invention, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.

[0194] The embodiments of the present invention are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A data transmission method, It is characterized in that Applied to an electronic tag, the electronic tag includes a display device, and the method includes: Establishing a near field communication connection with a terminal; In the process of receiving data sent by the terminal, monitoring the time difference between when the near field communication connection with the terminal is disconnected and when it is reconnected; the data includes picture information; If the time difference is greater than the breakpoint resume time threshold, a data retransmission instruction is sent to the terminal; After establishing a near field communication connection with the terminal, the method further includes: Receiving data sent by the terminal; wherein the data includes a plurality of data packets, each of which includes a data information code and an information check code, and the information check code is calculated by the terminal according to the data information code; For each of the data packets, calculating the to-be-verified check code of the data information code, and determining whether the to-be-verified check code is consistent with the information check code; If not, returning a message indicating that the data packet transmission failed to the terminal; If yes, returning a message indicating that the data packet has been successfully transmitted to the terminal; Wherein, each of the data packets also includes a packet number check code; After receiving the data sent by the terminal, the method further includes: Determining whether the received data is complete according to the packet number check code; If not, sending a data retransmission instruction to the terminal; If so, a data update instruction is sent to the display device of the electronic tag.

2. The data transmission method according to claim 1, It is characterized in that If the time difference is greater than the breakpoint resume time threshold, a data retransmission instruction is sent to the terminal, including: If the time difference is greater than the breakpoint resume transmission time threshold, the currently received data sent by the terminal is cleared, and a data retransmission instruction is sent to the terminal to instruct the terminal to resend all the data.

3. The data transmission method according to claim 1, It is characterized in that After establishing a near field communication connection with the terminal, it also includes: The voltage of the supercapacitor of the electronic tag is monitored, and if the voltage of the supercapacitor is greater than or equal to a first voltage threshold, a data transmission instruction is sent to the terminal.

4. The data transmission method according to claim 1, It is characterized in that The packet number check code includes the total number of data packets; Judging whether the received data is complete according to the packet number check code includes: Calculate the total number of packets received; It is determined whether the total number of all received data packets is consistent with the total number of data packets of the packet number check code, so as to determine whether the received data is complete.

5. The data transmission method according to claim 1, It is characterized in that The packet number check code includes an identifier of the data packet; Judging whether the received data is complete according to the packet number check code includes: It is determined whether the identifier of the last received data packet is the identifier of the first data packet, thereby determining whether the received data is complete.

6. The data transmission method according to claim 1, It is characterized in that The packet number check code includes an identifier of the data packet; Determining whether the received data is complete according to the packet number check code; If not, sending a data retransmission instruction to the terminal; If yes, a data update instruction is sent to the display device of the electronic tag, including: Traverse the identifiers of all received data packets to determine whether there is an identifier of a missing data packet; If yes, sending a data retransmission instruction carrying the identifier of the missing data packet to the terminal; If not, a data update instruction is sent to the display device of the electronic tag.

7. The data transmission method according to claim 1, It is characterized in that Sending a data update instruction to the display device of the electronic tag includes: The voltage of the supercapacitor of the electronic tag is monitored, and if the voltage of the supercapacitor is greater than or equal to a second voltage threshold, a data update instruction is sent to the display device of the electronic tag.

8. A data transmission method, It is characterized in that Applied to terminals, including: Establishing a near field communication connection with an electronic tag; the electronic tag comprising a display device; In the process of sending data to the electronic tag, receiving a data retransmission instruction sent by the electronic tag; the data includes picture information, and the data includes a plurality of data packets; Resend the sent data; If a message indicating that the data packet transmission has failed is received from the electronic tag, the message is parsed to obtain an identifier of the data packet that has failed to be transmitted, and the data packet that has failed to be transmitted is resent to the electronic tag; If a message indicating successful data packet transmission is received from the electronic tag, the message is parsed to obtain an identifier of the successfully transmitted data packet, and the next data packet is sent to the electronic tag; Wherein, each of the data packets also includes a packet number check code; The electronic tag determines whether the received data is complete according to the packet number check code; If not, the terminal receives a data retransmission instruction sent by the electronic tag, where the data retransmission instruction is sent when the time difference between when the near field communication connection between the electronic tag and the terminal is disconnected and when it is reconnected is greater than a breakpoint resume time threshold; If so, the electronic tag sends a data update instruction to the display device.

9. The data transmission method according to claim 8, It is characterized in that Resend sent data, including: Each packet is resent starting with the first packet sent.

10. The data transmission method according to claim 8, It is characterized in that Also includes: If a data retransmission instruction carrying the identifier of the missing data packet sent by the electronic tag is received, the instruction is parsed to obtain the identifier of the missing data packet, and the missing data packet is sent to the electronic tag.

11. An electronic tag, It is characterized in that It includes a display device, a communication device and a processor; wherein: The communication device is configured to establish a near field communication connection with the terminal; The processor is configured to: in the process of receiving data sent by the terminal, monitor the time difference between when the near field communication connection with the terminal is disconnected and when it is reconnected; if the time difference is greater than the breakpoint resume time threshold, send a data retransmission instruction to the terminal; The processor is further configured to: Receiving data sent by the terminal; wherein the data includes a plurality of data packets, each of which includes a data information code and an information check code, and the information check code is calculated by the terminal according to the data information code; For each of the data packets, calculating the to-be-verified check code of the data information code, and determining whether the to-be-verified check code is consistent with the information check code; If not, returning a message indicating that the data packet transmission failed to the terminal; If yes, returning a message indicating that the data packet has been successfully transmitted to the terminal; Wherein, each of the data packets also includes a packet number check code; After receiving the data sent by the terminal, the method further includes: Determining whether the received data is complete according to the packet number check code; If not, sending a data retransmission instruction to the terminal; If so, a data update instruction is sent to the display device of the electronic tag.

12. A data transmission device, It is characterized in that Set in the terminal, including: A communication module, configured to establish a near field communication connection with an electronic tag; the electronic tag includes a display device; A receiving module, configured to receive a data retransmission instruction sent by the electronic tag during the process of sending data to the electronic tag; the data includes picture information, and the data includes a plurality of data packets; A sending module, configured to resend sent data; The sending module is configured as follows: If a message indicating that the data packet transmission has failed is received from the electronic tag, the message is parsed to obtain an identifier of the data packet that has failed to be transmitted, and the data packet that has failed to be transmitted is resent to the electronic tag; If a message indicating successful data packet transmission is received from the electronic tag, the message is parsed to obtain an identifier of the successfully transmitted data packet, and the next data packet is sent to the electronic tag; Wherein, each of the data packets also includes a packet number check code; The electronic tag determines whether the received data is complete according to the packet number check code; If not, the terminal receives a data retransmission instruction sent by the electronic tag, where the data retransmission instruction is sent when the time difference between when the near field communication connection between the electronic tag and the terminal is disconnected and when it is reconnected is greater than a breakpoint resume time threshold; If so, the electronic tag sends a data update instruction to the display device.

13. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the method according to any one of claims 1 to 10 is implemented.

14. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 10.