CN111885564B - Data transmission method, equipment upgrading method and computer readable storage medium - Google Patents

Data transmission method, equipment upgrading method and computer readable storage medium Download PDF

Info

Publication number
CN111885564B
CN111885564B CN202010632051.1A CN202010632051A CN111885564B CN 111885564 B CN111885564 B CN 111885564B CN 202010632051 A CN202010632051 A CN 202010632051A CN 111885564 B CN111885564 B CN 111885564B
Authority
CN
China
Prior art keywords
data packet
data
data packets
upgrade
sent
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010632051.1A
Other languages
Chinese (zh)
Other versions
CN111885564A (en
Inventor
李可
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Haier Uplus Intelligent Technology Beijing Co Ltd
Original Assignee
Haier Uplus Intelligent Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Haier Uplus Intelligent Technology Beijing Co Ltd filed Critical Haier Uplus Intelligent Technology Beijing Co Ltd
Priority to CN202010632051.1A priority Critical patent/CN111885564B/en
Publication of CN111885564A publication Critical patent/CN111885564A/en
Application granted granted Critical
Publication of CN111885564B publication Critical patent/CN111885564B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/06Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information
    • H04W28/065Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information using assembly or disassembly of packets

Abstract

The invention provides a data transmission method, a device upgrading method and a computer readable storage medium, wherein the data transmission method comprises the following steps: transmitting a plurality of first data packets to the second device according to the user instruction; sending a query message to the second device to query the second device for the failed reception of the first data packet; transmitting a second data packet to the second device, wherein the second data packet includes at least one of: the second device receives the failed first data packet and the data packet to be sent; alternatively, the transmission operation is stopped. According to the invention, the problem that in the related technology, the Bluetooth equipment needs to respond to each upgrade package segment in the upgrading process so as to cause overlong upgrading time can be solved, and the effect of remarkably improving the transmission efficiency of the upgrade package in the upgrading process of the Bluetooth equipment can be achieved.

Description

Data transmission method, equipment upgrading method and computer readable storage medium
Technical Field
The invention relates to the field of intelligent home, in particular to a data transmission method, a device upgrading method and a computer-readable storage medium.
Background
In The related art, along with development of bluetooth technology, bluetooth products are also mature increasingly, most bluetooth products support Over The Air (OTA) upgrading through a mobile phone APP, and along with The frequency of The bluetooth product upgrading becoming faster and The size of an upgrade package becoming larger, the bluetooth products in The related art all split The upgrade package into a plurality of fragments for transmission one by one due to limited transmission capability of The existing bluetooth low energy (Bluetooth Low Energy, BLE). However, in the related art, the bluetooth device needs to respond to the mobile APP every time the update packet is transmitted, fig. 1 is an interactive schematic diagram of the bluetooth product update provided according to the related art, as shown in fig. 1, after the mobile APP transmits each packet of data to the bluetooth device, the bluetooth device needs to return a result to the mobile APP to respond, so as to inform the mobile APP whether the packet of data is successfully received, and the mobile APP determines whether to continue to transmit the next packet of data according to the response. The process of responding to each packet of data transmitted by the mobile phone APP by the Bluetooth equipment leads to very long overall upgrading time.
In the related art, an effective solution has not been proposed in the related art, which aims at the problem that in the process of upgrading a bluetooth device, each upgrade package segment needs to be responded to cause the upgrade time to be too long.
Disclosure of Invention
The embodiment of the invention provides a data transmission method, a device upgrading method and a computer readable storage medium, which at least solve the problem that in the related technology, a Bluetooth device needs to respond to each upgrading packet segment in the upgrading process so as to cause overlong upgrading time.
According to an embodiment of the present invention, there is provided a data transmission method applied to a first device, the method including:
transmitting a plurality of first data packets to the second device according to the user instruction;
sending a query message to the second device to query the second device for the failed reception of the first data packet;
transmitting a second data packet to the second device, wherein the second data packet includes at least one of: the second device receives the failed first data packet and the data packet to be sent; alternatively, the transmission operation is stopped.
According to another embodiment of the present invention, there is also provided an apparatus upgrade method, applied to a first apparatus, including:
transmitting a plurality of data packets to the second device by the data transmission method described in the above embodiment, so that the second device performs device upgrade according to the plurality of data packets;
wherein the data packet includes the first data packet and the second data packet.
According to another embodiment of the present invention, there is also provided a data transmission method applied to a second device, the method including:
receiving a plurality of first data packets sent by first equipment according to a user instruction;
receiving a query message sent by the first device, wherein the query message is used for querying the first data packet which is failed to be received by the second device;
receiving a second data packet sent by the first device, wherein the second data packet comprises at least one of the following: the second device receives the failed first data packet and the data packet to be sent; alternatively, the receiving operation is stopped.
According to another embodiment of the present invention, there is also provided an apparatus upgrade method applied to a second apparatus, the method including:
receiving a plurality of data packets sent by the first device through the data transmission method described in the above embodiment, and performing device upgrade according to the plurality of data packets;
wherein the data packet includes the first data packet and the second data packet.
According to another embodiment of the present invention, there is also provided a data transmission apparatus provided to a first device, the apparatus including:
the first sending module is used for sending a plurality of first data packets to the second equipment according to the user instruction;
the second sending module is used for sending a query message to the second device so as to query the first data packet which is failed to be received by the second device;
a third sending module, configured to send a second data packet to the second device, where the second data packet includes at least one of: the second device receives the failed first data packet and the data packet to be sent; alternatively, the transmission operation is stopped.
According to another embodiment of the present invention, there is also provided an apparatus for upgrading an apparatus provided in a first apparatus, the apparatus including:
the first upgrade module is configured to send a plurality of data packets to the second device through the data transmission method in the foregoing embodiment, so that the second device performs device upgrade according to the plurality of data packets;
wherein the data packet includes the first data packet and the second data packet.
According to another embodiment of the present invention, there is also provided a data transmission apparatus provided to a second device, the device including:
the first receiving module is used for receiving a plurality of first data packets sent by the first equipment according to the user instruction;
the second receiving module is used for receiving a query message sent by the first device, wherein the query message is used for querying the first data packet which is failed to be received by the second device;
a third receiving module, configured to receive a second data packet sent by the first device, where the second data packet includes at least one of the following: the second device receives the failed first data packet and the data packet to be sent; alternatively, the receiving operation is stopped.
According to another embodiment of the present invention, there is also provided an apparatus for upgrading a device, provided in a second device, the apparatus including:
the second upgrade module is configured to receive a plurality of data packets sent by the first device through the data transmission method described in the foregoing embodiment, and upgrade the device according to the plurality of data packets;
wherein the data packet includes the first data packet and the second data packet.
According to another embodiment of the invention, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
According to another embodiment of the invention there is also provided an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
According to the invention, after a plurality of first data packets are sent to the second device according to the user instruction, a query message is sent to the second device to query the second device for the first data packet which fails to be received, so that the second data packet is sent to the second device, wherein the second data packet comprises at least one of the following components: the second equipment receives the failed first data packet and the data packet to be sent; alternatively, the transmission operation is stopped. Therefore, in the process of transmitting the data packets to the second device for device upgrading, the first device determines which data packets are failed to receive in a query message mode, and the second device does not need to respond to each data packet/upgrading packet segment, so that the response time of the second device cannot be generated in the process. Therefore, the invention can solve the problem that in the related technology, the Bluetooth equipment needs to respond to each upgrade package segment in the upgrading process so as to cause overlong upgrading time, thereby achieving the effect of obviously improving the transmission efficiency of the upgrade package in the upgrading process of the Bluetooth equipment.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
fig. 1 is a schematic diagram of interaction between a mobile phone and a bluetooth device according to the related art;
fig. 2 is a schematic diagram of a scenario for upgrading a bluetooth device according to an embodiment of the present invention;
fig. 3 is a flowchart (a) of a data transmission method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of interaction of a first device with a second device provided in accordance with an example embodiment of the invention;
FIG. 5 is a flowchart (one) of a method for upgrading a device according to an embodiment of the present invention;
fig. 6 is a flowchart (two) of a data transmission method according to an embodiment of the present invention;
FIG. 7 is a flowchart (II) of a device upgrade method according to an embodiment of the present invention;
fig. 8 is a block diagram (a) of a data transmission apparatus according to an embodiment of the present invention;
FIG. 9 is a block diagram (I) of a device upgrade apparatus provided according to an embodiment of the present invention;
fig. 10 is a block diagram (two) of a data transmission apparatus according to an embodiment of the present invention;
fig. 11 is a block diagram (two) of a device upgrade apparatus according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the drawings in conjunction with embodiments. It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
In order to further explain the data transmission method, the device upgrading method and the computer readable storage medium in the embodiments of the present invention, the application scenarios of the data transmission method, the device upgrading method and the computer readable storage medium in the embodiments of the present invention are further described below.
The first device in the embodiment of the present invention may be a mobile phone terminal with a bluetooth transmission function, a tablet terminal, or other terminal devices with a bluetooth transmission function and used for managing or controlling the second devices, which is not limited in this aspect of the present invention, and the first device may be used for performing a corresponding control operation on one or more second devices, for example, upgrading the second devices. The second device in the embodiment of the present invention, that is, the foregoing bluetooth device, may specifically be an internet of things device having a bluetooth transmission function, for example, an intelligent sound box, an intelligent television, an intelligent refrigerator, an intelligent washing machine, an intelligent toothbrush, or other terminal devices that can be controlled by the first device, which is not limited in this invention.
Fig. 2 is a schematic diagram of a scenario of upgrading a bluetooth device according to an embodiment of the present invention, as shown in fig. 2, a first device in an embodiment of the present invention may download or store a corresponding second device upgrade package from a server in advance, or download the second device upgrade package from the server in real time during an upgrade process, and send the second device upgrade package to the second device for the second device to upgrade through bluetooth transmission.
In an exemplary embodiment, the second device is a smart speaker and the first device is a cell phone equipped with an APP for controlling the smart speaker. After a user inquires that the intelligent sound box can be upgraded through the intelligent sound box control APP on the first device, the upgrade package is downloaded to the mobile phone from the server through wireless communication or WiFi, and after Bluetooth connection is established between the mobile phone and the intelligent sound box, the upgrade package is split into a plurality of fragments to be sequentially transmitted to the intelligent sound box for the intelligent sound box to upgrade.
The data transmission method, the device upgrade method, and the computer-readable storage medium in the embodiments of the present invention are described in detail below.
Example 1
The present embodiment provides a data transmission method, applied to a first device, and fig. 3 is a flowchart (a) of the data transmission method provided according to an embodiment of the present invention, as shown in fig. 3, where the data transmission method in the present embodiment includes:
s102, the first device sends a plurality of first data packets to the second device according to the user instruction.
It should be further noted that, the plurality of first data packets are segments of an upgrade packet obtained by the first device, and the plurality of first data packets are part of segments of the upgrade packet, for example, for an upgrade packet with a size of 102.4KB, the plurality of first data packets may be split into 200 segments with a size of 512B, and each segment is a data packet in this embodiment. In the step S102, the first device may select a plurality of fragments, such as 20 fragments, from the 200 fragments, and send the plurality of fragments as the first data packet to the second device.
It should be further noted that, in step S102, the first device may send the plurality of first data packets sequentially. Similarly, in step S106 described below, the first device transmits a plurality of second data packets sequentially.
S104, the first device sends a query message to the second device to query the second device for the first data packet failed to receive.
In an optional embodiment, in step S104, sending the query message to the second device includes:
sending a query message to the second device to instruct the second device to return a confirmation message according to the query message; the acknowledgement message is used for indicating the second device to receive the failed first data packet.
It should be further noted that, in this embodiment, an identifier may be allocated to each segment during splitting the upgrade package into several segments, for example, each segment is identified by a segment sequence number. In the above optional embodiment, after receiving the query information sent by the first device, the second device may query the first data packet that fails to be received by itself, and generate a confirmation message to return to the first device.
Specifically, the confirmation message may carry an identifier of the first data packet that the second device receives successfully, so that after the first device receives the confirmation message, the first data packet that the second device receives successfully can be determined by a screening manner; alternatively, the second device may directly carry the identifier of the first data packet that fails to be received in the acknowledgement message, which is not limited in the present invention.
S106, the first device sends a second data packet to the second device, wherein the second data packet comprises at least one of the following: the second equipment receives the failed first data packet and the data packet to be sent; alternatively, the transmission operation is stopped.
It should be further noted that, in the step S106, the second data packet may be determined according to different scenes. In an example, in a case where there is a data packet to be transmitted, and the query information indicates that there is a first data packet that the second device fails to receive, the second data packet includes the data packet to be transmitted, and the first data packet that fails to receive. In another example, there is a data packet to be transmitted, and the query information indicates that there is no case of the first data packet failed to be received by the second device, the second data packet including the data packet to be transmitted. In another example, where there is no data packet to be transmitted and the query information indicates that there is a first data packet that the second device failed to receive, the second data packet includes the first data packet that failed to receive. In another example, the transmitting operation is stopped in a case where there is no data packet to be transmitted and the inquiry information indicates that there is no first data packet that the second device fails to receive.
In an optional embodiment, in step S106, the first device sends the second data packet to the second device, including:
selecting a first data packet which fails to be received by a second device from the plurality of first data packets as a second data packet; selecting one or more data packets from a plurality of data packets to be transmitted as second data packets;
the second data packet is sent to the second device.
It should be further noted that in the above alternative embodiment, after the first device learns that the second device fails to receive the first data packet, the first device may retransmit the first data packet to the second device in the next transmission process. For example, the first device still keeps transmitting 20 packets to the second device each time, the first device defines the packets identified as 1 to 20 as the first packet to be transmitted to the second device in step S102, the second device fails to successfully receive the packets identified as 18 and 19 in practice, the first device may define the packets identified as 18 and 19 as the second packet in step S106, and the selected packets identified as 21 to 38 in the packets to be transmitted as the second packet to be transmitted to the second device.
In an alternative embodiment, the number of the first data packets is the same as the number of the second data packets except for the case that the number of the data packets to be transmitted is insufficient, that is, the number of the plurality of data packets transmitted to the second device by the first device at a time is the same.
According to the data transmission method in the embodiment of the invention, after a plurality of first data packets are sent to the second device according to the user instruction, a query message is sent to the second device to query the second device for the first data packet failed to be received, so that the second data packet is sent to the second device, wherein the second data packet comprises at least one of the following components: the second equipment receives the failed first data packet and the data packet to be sent; alternatively, the transmission operation is stopped. Therefore, in the process of transmitting the data packets to the second device for device upgrading, the first device determines which data packets are failed to receive in a query message mode, and the second device does not need to respond to each data packet/upgrading packet segment, so that the response time of the second device is not generated in the process, the transmission efficiency is improved obviously, and unnecessary network resources are prevented from being occupied. Therefore, the invention can solve the problem that in the related technology, the Bluetooth equipment needs to respond to each upgrade package segment in the upgrading process so as to cause overlong upgrading time, thereby achieving the effect of obviously improving the transmission efficiency of the upgrade package in the upgrading process of the Bluetooth equipment.
In addition, the data transmission method in this embodiment can ensure complete transmission of data by actively querying the first device to the second device on the premise of improving transmission efficiency.
In an optional embodiment, in step S102, the sending a plurality of first data packets to the second device according to the user instruction includes: according to a user instruction, N first data packets are sent to second equipment, wherein N is a positive integer; in the step S102, before the N first data packets are sent to the second device according to the user instruction, the method further includes:
determining the value of N according to the volume of the upgrade package, a maximum transmission unit (Maximum Transmission Unit, MTU) preset between the first device and the second device and a preset query period;
the first data packet and the second data packet are fragments of an upgrade packet.
In an optional embodiment, the determining the value of N according to the volume of the upgrade package, the preset maximum transmission unit MTU between the first device and the second device, and the preset query period includes:
determining the transmission times between the first equipment and the second equipment according to the volume of the upgrade package and the MTU between the first equipment and the second equipment, and splitting the upgrade package into a plurality of data packages according to the transmission times;
and determining the value of N according to the number of the data packets and the query period.
It should be further noted that, the file size or the file length of the upgrade package is set as S, and the MTU between the first device and the second device may be negotiated during bluetooth connection, and set as M; the above-mentioned inquiry period can be represented by a preset progress inquiry stage value, that is, the preset inquiry position is located in the percentage of the total transmission progress of the upgrade package, and is set to P, and an inquiry is performed once per P (percentage) of the total transmission progress of the upgrade package. Thus, the above N should satisfy:
N=(S/M)*P。
for example, the size of the upgrade package is 102.4KB, i.e. s=102.4kb, and the MTU negotiated between the first device and the second device is 512B, so that it can be determined that the first device can transmit a file with a size of 512B to the second device at most at a time, and therefore, the upgrade package needs to be split into 102400/512, i.e. 200 fragments, and each fragment forms a data package. On this basis, a query is made according to the user setting the P to 10%, i.e., 10% of the total transmission progress of the upgrade package per completion.
Thus, the value of N can be determined to be (102400/512) 10%, that is, N is 20, so that it can be determined that the first device sends a query message to the second device to perform a query every time the first device sends 20 data packets to the second device.
To further illustrate the workflow of the data transmission method in the embodiment of the present invention, the following description is given by way of an exemplary embodiment:
example embodiment 1
Fig. 4 is an interaction schematic diagram of a first device and a second device according to an exemplary embodiment of the present invention, where, as shown in fig. 4, the first device is a mobile phone, the second device is a bluetooth device, and a user performs an upgrade operation of the second device through a corresponding APP in the mobile phone. The mobile phone downloads the upgrade package to the local from the server in advance, and establishes Bluetooth connection with the Bluetooth device. The size of the upgrade package is 102.4KB, and the MTU negotiated between the mobile phone and the Bluetooth device is 512B, so that the upgrade package can be split into 200 data packages for sequential transmission. In the upgrading process, the data transmission flow between the mobile phone and the Bluetooth device is as follows:
s1, 20 data packets with the identifiers of 1 to 20 are selected by a mobile phone and sent to Bluetooth equipment one by one;
s2, actively sending a query message to the Bluetooth device by the mobile phone so as to read a data packet which is specifically received successfully by the Bluetooth device from the Bluetooth device;
s3, if the Bluetooth device receives all 20 data packets in the step S2, the mobile phone selects 20 data packets with the identifiers of 21 to 40 again and sends the 20 data packets to the Bluetooth device one by one; if in step S2, the bluetooth device only receives 15 data packets with the identifiers of 1 to 15, the mobile phone selects 20 data packets with the identifiers of 16 to 35 and sends the 20 data packets to the bluetooth device one by one;
s4, repeating the steps S1 to S3 until the data of the upgrade package are completely sent.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
Example 2
The embodiment provides a device upgrading method, which is applied to a first device, and fig. 5 is a flowchart (a) of the device upgrading method provided by the embodiment of the invention, as shown in fig. 5, where the device upgrading method in the embodiment includes:
s202, the first device sends a plurality of first data packets to the second device according to a user instruction;
s204, the first device sends a query message to the second device to query the second device for the first data packet failed to receive;
s206, the first device sends a second data packet to the second device, wherein the second data packet comprises at least one of the following: the second equipment receives the failed first data packet and the data packet to be sent; or, stopping the transmission operation;
s208, the first device transmits the data packets to the second device through steps S202 to S206, so that the second device can upgrade the device according to the data packets; the data packet comprises a first data packet and a second data packet.
It should be further noted that, in the device upgrade method in this embodiment, the remaining optional embodiments and technical effects of the data transmission method adopted in steps S202 to S206 correspond to the data transmission method in embodiment 1, so that the description thereof is omitted herein.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
Example 3
The present embodiment provides a data transmission method, applied to a second device, and fig. 6 is a flowchart (second) of the data transmission method provided according to an embodiment of the present invention, as shown in fig. 6, where the data transmission method in the present embodiment includes:
s302, the second device receives a plurality of first data packets sent by the first device according to a user instruction;
s304, the second device receives a query message sent by the first device, wherein the query message is used for querying the first data packet which is failed to be received by the second device;
s306, the second device receives a second data packet sent by the first device, wherein the second data packet comprises at least one of the following: the second equipment receives the failed first data packet and the data packet to be sent; alternatively, the receiving operation is stopped.
It should be further noted that, the other optional embodiments and technical effects of the data transmission method in this embodiment correspond to those of the data transmission method in embodiment 1, so that the description thereof is omitted herein.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
Example 4
The embodiment provides a device upgrading method, applied to a second device, and fig. 7 is a flowchart (second) of the device upgrading method provided in the embodiment of the invention, as shown in fig. 7, where the device upgrading method in the embodiment includes:
s402, the second device receives a plurality of first data packets sent by the first device according to a user instruction;
s404, the second device receives a query message sent by the first device, wherein the query message is used for querying the first data packet which is failed to be received by the second device;
s406, the second device receives a second data packet sent by the first device, wherein the second data packet comprises at least one of the following: the second equipment receives the failed first data packet and the data packet to be sent; alternatively, the receiving operation is stopped;
s408, the second device receives a plurality of data packets sent by the first device through steps S402 to S408, and upgrades the device according to the plurality of data packets; the data packet comprises a first data packet and a second data packet.
It should be further noted that, in the device upgrade method in this embodiment, the remaining alternative embodiments and technical effects of the data transmission method adopted in steps S402 to S406 correspond to the data transmission method in embodiment 3, so that the description thereof is omitted herein.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
Example 5
The embodiment also provides a data transmission device, which is disposed in the first device, and the device is used to implement the foregoing embodiments and preferred embodiments, and is not described again. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 8 is a block diagram (a) of a data transmission device according to an embodiment of the present invention, as shown in fig. 8, the data transmission device in this embodiment includes:
a first sending module 502, configured to send a plurality of first data packets to a second device according to a user instruction;
a second sending module 504, configured to send a query message to the second device to query the second device for the first data packet failed to receive;
a third sending module 506, configured to send a second data packet to the second device, where the second data packet includes at least one of: the second equipment receives the failed first data packet and the data packet to be sent; alternatively, the transmission operation is stopped.
It should be further noted that, the other optional embodiments and technical effects of the data transmission device in this embodiment correspond to the data transmission method in embodiment 1, so that the description thereof is omitted herein.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
Example 6
The embodiment provides an apparatus upgrade device, which is disposed in a first apparatus, and the apparatus is used to implement the foregoing embodiments and preferred embodiments, and will not be described again. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 9 is a block diagram (a) of a device upgrade apparatus according to an embodiment of the present invention, as shown in fig. 9, where the device upgrade apparatus in this embodiment includes:
a first sending module 502, configured to send a plurality of first data packets to a second device according to a user instruction;
a second sending module 504, configured to send a query message to the second device to query the second device for the first data packet failed to receive;
a third sending module 506, configured to send a second data packet to the second device, where the second data packet includes at least one of: the second equipment receives the failed first data packet and the data packet to be sent; or, stopping the transmission operation;
the first upgrade module 508 is configured to send a plurality of data packets to the second device through the first sending module 502, the second sending module 504, and the third sending module 506, so that the second device performs device upgrade according to the plurality of data packets; the data packet comprises a first data packet and a second data packet.
It should be further noted that, in the device upgrading apparatus of the present embodiment, the other alternative embodiments and the technical effects of the first sending module 502, the second sending module 504, and the third sending module 506 are all corresponding to the data transmission apparatus of embodiment 5, so that the description thereof is omitted herein.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
Example 7
The embodiment also provides a data transmission device disposed in the second device, where the device is used to implement the foregoing embodiments and preferred embodiments, and the description is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 10 is a block diagram (two) of a data transmission device according to an embodiment of the present invention, and as shown in fig. 10, the data transmission device in this embodiment includes:
a first receiving module 602, configured to receive a plurality of first data packets sent by a first device according to a user instruction;
a second receiving module 604, configured to receive a query message sent by a first device, where the query message is used to query a first data packet that fails to be received by a second device;
a third receiving module 606, configured to receive a second data packet sent by the first device, where the second data packet includes at least one of: the second equipment receives the failed first data packet and the data packet to be sent; alternatively, the receiving operation is stopped.
It should be further noted that, the other optional embodiments and technical effects of the data transmission device in this embodiment correspond to the data transmission method in embodiment 3, so that the description thereof is omitted herein.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
Example 8
The embodiment provides an apparatus upgrading device, which is disposed in the second device, and the apparatus is used to implement the foregoing embodiments and preferred embodiments, and will not be described again. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 11 is a block diagram (two) of a device upgrade apparatus according to an embodiment of the present invention, as shown in fig. 11, where the device upgrade apparatus in this embodiment includes:
a first receiving module 602, configured to receive a plurality of first data packets sent by a first device according to a user instruction;
a second receiving module 604, configured to receive a query message sent by a first device, where the query message is used to query a first data packet that fails to be received by a second device;
a third receiving module 606, configured to receive a second data packet sent by the first device, where the second data packet includes at least one of: the second equipment receives the failed first data packet and the data packet to be sent; alternatively, the receiving operation is stopped;
the second upgrade module 608 is configured to receive, through the first receiving module 602, the second receiving module 604, and the third receiving module 606, a plurality of data packets sent by the first device, and upgrade the device according to the plurality of data packets; the data packet comprises a first data packet and a second data packet.
It should be further noted that, in the device upgrading apparatus of the present embodiment, the remaining alternative embodiments and the technical effects of the first receiving module 602, the second receiving module 604, and the third receiving module 606 correspond to the data transmission apparatus of embodiment 7, so that the description thereof is omitted herein.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
Example 9
Embodiments of the present invention also provide a computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
Alternatively, in the present embodiment, the above-described computer-readable storage medium may be configured to store a computer program for executing the above-described embodiments.
Alternatively, in the present embodiment, the above-described computer-readable storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
Example 10
An embodiment of the invention also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, where the transmission device is connected to the processor, and the input/output device is connected to the processor.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the steps in the above-described embodiment by a computer program.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments and optional implementations, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may alternatively be implemented in program code executable by computing devices, so that they may be stored in a memory device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps within them may be fabricated into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (9)

1. A method of data transmission, for use with a first device, the method comprising:
transmitting a plurality of first data packets to the second device according to the user instruction;
sending a query message to the second device to query the second device for the failed reception of the first data packet;
transmitting a second data packet to the second device, wherein the second data packet includes: the second device receives the failed first data packet and the data packet to be sent; or, stopping the transmission operation;
wherein said sending a second data packet to said second device comprises:
selecting the first data packet which fails to be received by the second device from the plurality of first data packets, and selecting one or more data packets from the plurality of data packets to be transmitted to be used as the second data packet together;
and sending the second data packet to the second device.
2. The method of claim 1, wherein the sending a query message to the second device comprises:
sending the query message to the second device to instruct the second device to return a confirmation message according to the query message; the acknowledgement message is used for indicating the second device to receive the failed first data packet.
3. The method according to any one of claims 1 to 2, wherein said sending a plurality of first data packets to the second device according to the user instruction comprises: transmitting N first data packets to the second device according to the user instruction, wherein N is a positive integer;
before the N first data packets are sent to the second device according to the user instruction, the method further includes:
determining the value of N according to the volume of the upgrade package, a preset maximum transmission unit MTU between the first device and the second device and a preset query period;
wherein the first data packet and the second data packet are fragments of the upgrade packet.
4. The method of claim 3, wherein determining the value of N according to the volume of the upgrade package, a preset maximum transmission unit MTU between the first device and the second device, and a preset query period includes:
determining the transmission times between the first equipment and the second equipment according to the volume of the upgrade package and the MTU between the first equipment and the second equipment, and splitting the upgrade package into a plurality of data packages according to the transmission times;
and determining the value of the N according to the number of the data packets and the query period.
5. A method of device upgrade applied to a first device, the method comprising:
transmitting a plurality of data packets to the second device by the data transmission method as claimed in any one of claims 1 to 4, so that the second device performs device upgrade according to the plurality of data packets;
wherein the data packet includes the first data packet and the second data packet.
6. A data transmission method, applied to a second device, the method comprising:
receiving a plurality of first data packets sent by first equipment according to a user instruction;
receiving a query message sent by the first device, wherein the query message is used for querying the first data packet which is failed to be received by the second device;
receiving a second data packet sent by the first device, wherein the second data packet comprises: the first device receives the failed first data packet from the second device selected from the plurality of first data packets, and the first device selects one or more data packets from the plurality of data packets to be transmitted; alternatively, the receiving operation is stopped.
7. A method of device upgrade, applied to a second device, the method comprising:
receiving a plurality of data packets sent by the first device through the data transmission method of claim 6, and performing device upgrade according to the plurality of data packets;
wherein the data packet includes the first data packet and the second data packet.
8. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program, wherein the computer program is arranged to perform the method of any of the claims 1 to 7 when run by a processor.
9. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to run the computer program to perform the method of any of the claims 1 to 7.
CN202010632051.1A 2020-07-03 2020-07-03 Data transmission method, equipment upgrading method and computer readable storage medium Active CN111885564B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010632051.1A CN111885564B (en) 2020-07-03 2020-07-03 Data transmission method, equipment upgrading method and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010632051.1A CN111885564B (en) 2020-07-03 2020-07-03 Data transmission method, equipment upgrading method and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN111885564A CN111885564A (en) 2020-11-03
CN111885564B true CN111885564B (en) 2024-03-22

Family

ID=73151010

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010632051.1A Active CN111885564B (en) 2020-07-03 2020-07-03 Data transmission method, equipment upgrading method and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111885564B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112702143B (en) * 2020-12-16 2023-01-24 歌尔科技有限公司 Dial data management method and device, wearable device and storage medium

Citations (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101467356A (en) * 2006-06-08 2009-06-24 夏普株式会社 Broadcast receiving terminal device, broadcast receiving method, program, and recording medium
CN101610501A (en) * 2009-07-16 2009-12-23 中兴通讯股份有限公司 Device firmware upgrade system and method, device management server and portable terminal
CN105898490A (en) * 2016-06-22 2016-08-24 青岛海信电器股份有限公司 Upgrading method for remote controller, television and remote controller
CN107409023A (en) * 2015-03-17 2017-11-28 华为技术有限公司 A kind of data merged in layer domain and the method and apparatus for retransmitting data
CN107710662A (en) * 2015-06-29 2018-02-16 华为技术有限公司 The method and receiving device of data processing
WO2018076969A1 (en) * 2016-10-24 2018-05-03 深圳创维数字技术有限公司 Software upgrade method, computing device, and channel control device
WO2018145290A1 (en) * 2017-02-09 2018-08-16 深圳市汇顶科技股份有限公司 Terminal device, ble slave device, and searching method and system based on ble
CN108737180A (en) * 2018-05-22 2018-11-02 北京汉能光伏投资有限公司 Collecting method, data transmission method for uplink, data acquisition equipment and the network equipment
CN109617945A (en) * 2018-11-02 2019-04-12 北京达佳互联信息技术有限公司 Sending method, sending device, electronic equipment and the readable medium of file transmission
JP2019083507A (en) * 2017-10-31 2019-05-30 パナソニックIpマネジメント株式会社 Reception device, transmission device, reception method and transmission method
CN109922078A (en) * 2019-03-28 2019-06-21 努比亚技术有限公司 Upgrade control method, mobile terminal and computer readable storage medium
CN109936588A (en) * 2017-12-15 2019-06-25 华为技术有限公司 A kind of internet of things data transmission method, equipment and system
WO2019137558A1 (en) * 2018-01-15 2019-07-18 海信集团有限公司 Nb-iot-based data transmission and receiving method and apparatus, and data transmission system
CN110324810A (en) * 2019-06-20 2019-10-11 上海华虹集成电路有限责任公司 A kind of method of low-power consumption bluetooth data packet scanning window adjust automatically
CN110401794A (en) * 2018-04-25 2019-11-01 杭州海康威视数字技术股份有限公司 Video camera remote upgrade method, device, electronic equipment and readable storage medium storing program for executing
CN110446228A (en) * 2019-08-13 2019-11-12 腾讯科技(深圳)有限公司 Data transmission method, device, terminal device and storage medium
CN110677200A (en) * 2019-09-17 2020-01-10 深圳市智慧海洋科技有限公司 Data transmission method and device
CN110727454A (en) * 2019-10-24 2020-01-24 北京云迹科技有限公司 Updating method and device of intelligent equipment, electronic equipment and storage medium
CN110858791A (en) * 2018-08-22 2020-03-03 华为技术有限公司 Distributed parallel transmission method, device, equipment and storage medium
CN110913431A (en) * 2019-11-27 2020-03-24 深圳云博智联科技有限公司 Data wireless transmission method and device, computer equipment and storage medium
CN111163387A (en) * 2019-12-29 2020-05-15 歌尔科技有限公司 TWS earphone upgrading method and device, charging box and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7778169B2 (en) * 2005-09-02 2010-08-17 Cisco Technology, Inc. Packetizing media for a time slotted communication system
US10866796B2 (en) * 2014-04-18 2020-12-15 Huawei Device Co., Ltd. Software upgrade method and apparatus, and device
CN106254041A (en) * 2015-08-20 2016-12-21 北京智谷技术服务有限公司 Data transmission method, data receiver method and device thereof
CN109120383B (en) * 2017-06-26 2021-11-26 深圳市道通智能航空技术股份有限公司 Unmanned aerial vehicle, ground station thereof and data transmission method

Patent Citations (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101467356A (en) * 2006-06-08 2009-06-24 夏普株式会社 Broadcast receiving terminal device, broadcast receiving method, program, and recording medium
CN101610501A (en) * 2009-07-16 2009-12-23 中兴通讯股份有限公司 Device firmware upgrade system and method, device management server and portable terminal
CN107409023A (en) * 2015-03-17 2017-11-28 华为技术有限公司 A kind of data merged in layer domain and the method and apparatus for retransmitting data
CN107710662A (en) * 2015-06-29 2018-02-16 华为技术有限公司 The method and receiving device of data processing
CN105898490A (en) * 2016-06-22 2016-08-24 青岛海信电器股份有限公司 Upgrading method for remote controller, television and remote controller
WO2018076969A1 (en) * 2016-10-24 2018-05-03 深圳创维数字技术有限公司 Software upgrade method, computing device, and channel control device
WO2018145290A1 (en) * 2017-02-09 2018-08-16 深圳市汇顶科技股份有限公司 Terminal device, ble slave device, and searching method and system based on ble
JP2019083507A (en) * 2017-10-31 2019-05-30 パナソニックIpマネジメント株式会社 Reception device, transmission device, reception method and transmission method
CN109936588A (en) * 2017-12-15 2019-06-25 华为技术有限公司 A kind of internet of things data transmission method, equipment and system
WO2019137558A1 (en) * 2018-01-15 2019-07-18 海信集团有限公司 Nb-iot-based data transmission and receiving method and apparatus, and data transmission system
CN110401794A (en) * 2018-04-25 2019-11-01 杭州海康威视数字技术股份有限公司 Video camera remote upgrade method, device, electronic equipment and readable storage medium storing program for executing
CN108737180A (en) * 2018-05-22 2018-11-02 北京汉能光伏投资有限公司 Collecting method, data transmission method for uplink, data acquisition equipment and the network equipment
CN110858791A (en) * 2018-08-22 2020-03-03 华为技术有限公司 Distributed parallel transmission method, device, equipment and storage medium
CN109617945A (en) * 2018-11-02 2019-04-12 北京达佳互联信息技术有限公司 Sending method, sending device, electronic equipment and the readable medium of file transmission
CN109922078A (en) * 2019-03-28 2019-06-21 努比亚技术有限公司 Upgrade control method, mobile terminal and computer readable storage medium
CN110324810A (en) * 2019-06-20 2019-10-11 上海华虹集成电路有限责任公司 A kind of method of low-power consumption bluetooth data packet scanning window adjust automatically
CN110446228A (en) * 2019-08-13 2019-11-12 腾讯科技(深圳)有限公司 Data transmission method, device, terminal device and storage medium
CN110677200A (en) * 2019-09-17 2020-01-10 深圳市智慧海洋科技有限公司 Data transmission method and device
CN110727454A (en) * 2019-10-24 2020-01-24 北京云迹科技有限公司 Updating method and device of intelligent equipment, electronic equipment and storage medium
CN110913431A (en) * 2019-11-27 2020-03-24 深圳云博智联科技有限公司 Data wireless transmission method and device, computer equipment and storage medium
CN111163387A (en) * 2019-12-29 2020-05-15 歌尔科技有限公司 TWS earphone upgrading method and device, charging box and storage medium

Also Published As

Publication number Publication date
CN111885564A (en) 2020-11-03

Similar Documents

Publication Publication Date Title
CN108011935B (en) Program upgrading method of NB-IOT (network node B-IOT) equipment, server and NB-IOT equipment
CN110471692B (en) Over-the-air upgrading method, device, equipment and storage medium of terminal program
CN103841134B (en) Based on API transmission, the method for receive information, apparatus and system
CN107770269B (en) A kind of service response method and its terminal
CN107861760A (en) BIOS collocation method, terminal and server
CN112000355B (en) Method and device for firmware upgrading and household appliance
CN108376078A (en) Upgrade method, device and the household appliance of equipment
CN111885594A (en) Equipment binding method and device
US20230112127A1 (en) Electronic device for deploying application and operation method thereof
CN112764803A (en) Version upgrading method and device, storage medium and electronic device
CN105530630B (en) A kind of OTA upgrade method and equipment
CN111142905A (en) OTA (over-the-air) upgrading method, OTA server and OTA upgrading system
CN111885564B (en) Data transmission method, equipment upgrading method and computer readable storage medium
CN109348434A (en) A kind of sending method of scene information, sending device and terminal device
WO2015117522A1 (en) Parameter configuration data processing method and device, and parameter configuration method and device
CN108664262A (en) Firmware batch upgrading method, system and the storage medium of wireless sorting device
CN112637221B (en) Equipment control method and device
CN110837381B (en) Software upgrading method and device for projection equipment
CN111010346B (en) Message processing method, device, storage medium and device based on dynamic routing
CN102917370A (en) Method, device and system for determining corresponding near-end unit of far-end unit and far-end unit
CN106254440B (en) AP upgrading method and device
CN111240867B (en) Information communication system and method
WO2016206437A1 (en) Rom package generation method and device
CN114257509A (en) Module upgrading method and device, storage medium and electronic device
CN111541774A (en) Equipment upgrading method, device and system

Legal Events

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