CN111885564A - 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
CN111885564A
CN111885564A CN202010632051.1A CN202010632051A CN111885564A CN 111885564 A CN111885564 A CN 111885564A CN 202010632051 A CN202010632051 A CN 202010632051A CN 111885564 A CN111885564 A CN 111885564A
Authority
CN
China
Prior art keywords
data packet
data
data packets
sending
packet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010632051.1A
Other languages
Chinese (zh)
Other versions
CN111885564B (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

Images

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides a data transmission method, an equipment upgrading method and a computer readable storage medium, wherein the data transmission method comprises the following steps: sending a plurality of first data packets to the second equipment according to the user instruction; sending a query message to the second device to query the second device for receiving the first data packet which fails; transmitting a second data packet to the second device, wherein the second data packet comprises 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. According to the invention, the problem that in the related technology, the upgrading time is too long due to the fact that each upgrading packet fragment needs to be responded in the upgrading process of the Bluetooth equipment is solved, and the effect of remarkably improving the transmission efficiency of the upgrading packet in the upgrading process of the Bluetooth equipment is achieved.

Description

Data transmission method, equipment upgrading method and computer readable storage medium
Technical Field
The invention relates to the field of smart home, in particular to a data transmission method, an equipment upgrading method and a computer readable storage medium.
Background
In The related art, with The development of The Bluetooth technology, Bluetooth products are mature day by day, most of The Bluetooth products support Over The Air (OTA) upgrade through The mobile phone APP, and with The frequency of Bluetooth product upgrade becoming faster and The size of The upgrade package becoming larger and larger, because The existing Bluetooth Low Energy (BLE) transmission capability is limited, The Bluetooth products in The related art all split The upgrade package into a plurality of fragments to transmit one by one. However, in the related art, the upgrade package transmits the fragments each time, the bluetooth device needs to respond to the mobile APP, fig. 1 is an interactive schematic diagram of the upgrade of the bluetooth product 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, and notifies 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 that above-mentioned bluetooth equipment responded to each packet data of cell-phone APP transmission leads to whole upgrading time very long.
Aiming at the problem that in the related technology, the Bluetooth equipment needs to respond to each upgrade packet fragment in the upgrade process so as to cause overlong upgrade time, an effective solution is not provided in the related technology.
Disclosure of Invention
The embodiment of the invention provides a data transmission method, an equipment upgrading method and a computer readable storage medium, which are used for at least solving the problem that in the related technology, the upgrading time is too long because each upgrading packet fragment needs to be responded in the upgrading process of Bluetooth equipment.
According to an embodiment of the present invention, there is provided a data transmission method applied to a first device, the method including:
sending a plurality of first data packets to the second equipment according to the user instruction;
sending a query message to the second device to query the second device for receiving the first data packet which fails;
transmitting a second data packet to the second device, wherein the second data packet comprises 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.
According to another embodiment of the present invention, there is also provided a device upgrade method applied to a first device, the method including:
sending a plurality of data packets to the second device by the data transmission method in the above embodiment, so that the second device performs device upgrade according to the plurality of data packets;
wherein the data packet comprises 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 an inquiry message sent by the first device, wherein the inquiry message is used for inquiring the first data packet which is received by the second device in a failure manner;
receiving 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 reception operation is stopped.
According to another embodiment of the present invention, there is also provided a device upgrade method applied to a second device, the method including:
receiving a plurality of data packets sent by the first device through the data transmission method in the embodiment, and upgrading the device according to the plurality of data packets;
wherein the data packet comprises 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 in 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;
a second sending module, configured to send a query message to the second device to query that the second device receives the first data packet that fails;
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 equipment 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 a device, which is provided in a first device, the apparatus including:
a first upgrading module, configured to send, by using the data transmission method in the foregoing embodiment, a plurality of data packets to the second device, so that the second device performs device upgrading according to the plurality of data packets;
wherein the data packet comprises 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, which is disposed in a second device, the device including:
the first receiving module is used for receiving a plurality of first data packets sent by first equipment according to a user instruction;
a second receiving module, configured to receive an inquiry message sent by the first device, where the inquiry message is used to inquire that the second device receives the first data packet that fails;
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 second equipment receives the failed first data packet and the data packet to be sent; alternatively, the reception operation is stopped.
According to another embodiment of the present invention, there is also provided an apparatus for upgrading a device, which is provided in a second device, the apparatus including:
a second upgrade module, configured to receive, by using the data transmission method in the foregoing embodiment, a plurality of data packets sent by the first device, and perform device upgrade according to the plurality of data packets;
wherein the data packet comprises the first data packet and the second data packet.
According to another embodiment of the present invention, a computer-readable storage medium is also provided, in which a computer program is stored, wherein the computer program is configured to perform the steps of any of the above-described method embodiments when executed.
According to another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the invention, after a plurality of first data packets are sent to the second device according to the user instruction, the inquiry message is sent to the second device to inquire the first data packets which are failed to be received by the second device, so that the second data packets are sent to the second device, wherein the second data packets comprise at least one of the following data packets: 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 sending the data packets to the second device by the first device for device upgrading, the first device determines which data packets are failed to be received in a query message mode, and the second device does not need to respond to each data packet/upgrading packet fragment, so that the time for responding by the second device cannot be generated in the process. Therefore, the invention can solve the problem that in the related technology, the upgrading time is too long because each upgrading packet fragment needs to be responded in the upgrading process of the Bluetooth equipment, thereby achieving the effect of remarkably improving the transmission efficiency of the upgrading packet 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 embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a schematic diagram of interaction between a mobile phone and a bluetooth device provided according to the related art;
fig. 2 is a schematic view of a bluetooth device upgrade scenario provided in accordance with an embodiment of the present invention;
fig. 3 is a flow chart (one) of a data transmission method provided 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 present invention;
FIG. 5 is a flowchart (one) of a device upgrade method provided according to an embodiment of the present invention;
fig. 6 is a flow chart (two) of a data transmission method provided according to an embodiment of the present invention;
FIG. 7 is a flowchart of a device upgrade method according to an embodiment of the present invention (II);
fig. 8 is a block diagram (one) of the structure of a data transmission apparatus according to an embodiment of the present invention;
FIG. 9 is a block diagram (I) of the device upgrading apparatus according to an embodiment of the present invention;
fig. 10 is a block diagram (ii) of a data transmission apparatus according to an embodiment of the present invention;
fig. 11 is a block diagram (ii) of the device upgrading apparatus according to the embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements 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 following further explains application scenarios of the data transmission method, the device upgrading method, and the computer-readable storage medium in the embodiments of the present invention.
The first device in the embodiment of the present invention may be a mobile phone terminal, a tablet terminal, or another terminal device that has a bluetooth transmission function and is capable of managing or controlling the second device, and the present invention is not limited to this. The second device in the embodiment of the present invention, that is, the 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 respect.
Fig. 2 is a schematic view of a scenario of bluetooth device upgrade according to an embodiment of the present invention, as shown in fig. 2, a first device in the 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 a second device through bluetooth transmission for upgrading the second device.
In an exemplary embodiment, the second device is a smart speaker, and the first device is a mobile phone installed with an APP for controlling the smart speaker. After the user inquires about the smart sound box through smart sound box control APP on the first equipment and can upgrade, the upgrade package is downloaded to the mobile phone from the server through wireless communication or WiFi, and after the mobile phone is connected with the smart sound box through Bluetooth, the upgrade package is split into a plurality of fragments which are sequentially sent to the smart sound box, so that the smart sound box can be upgraded.
The following describes a data transmission method, an apparatus upgrading method, and a computer-readable storage medium in the embodiments of the present invention in detail.
Example 1
The present embodiment provides a data transmission method applied to a first device, and fig. 3 is a flowchart (one) of a data transmission method provided according to an embodiment of the present invention, as shown in fig. 3, 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 fragments of the upgrade package acquired by the first device, and the plurality of first data packets are partial fragments of the upgrade package, for example, for an upgrade package with a size of 102.4KB, the plurality of first data packets may be split into 200 fragments with a size of 512B, and each fragment is a data packet in this embodiment. In step S102, the first device may select a plurality of segments, for example, 20 segments, from the 200 segments, and send the selected segments as the first data packet to the second device.
It should be further noted that, in step S102, the first device may sequentially transmit the plurality of first data packets. Similarly, in step S106, the first device transmits a plurality of second packets sequentially.
S104, the first device sends an inquiry message to the second device to inquire the second device to receive the failed first data packet.
In an optional embodiment, in step S104, the sending a query message to the second device includes:
sending a query message to the second equipment to indicate the second equipment 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, in the process of splitting the upgrade package into a plurality of fragments, an identifier may be allocated to each fragment, for example, each fragment is identified by a fragment 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 whose reception is failed, 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 is successfully received by the second device, so that after receiving the confirmation message, the first device may determine, in a screening manner, the first data packet that is failed to be received by the second device; alternatively, the second device may also directly carry the identifier of the first data packet with failed reception in the acknowledgement message, which is not limited in this embodiment of 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 failed to receive, the second data packet includes the data packet to be transmitted and the first data packet that failed to receive. In another example, there is a data packet to be transmitted, and the query information indicates that there is no situation where the first data packet failed to be received by the second device, and the second data packet includes the data packet to be transmitted. In another example, in a case 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, in a case where there is no data packet to be transmitted and the query information indicates that there is no first data packet that the second device failed to receive, the transmission operation is stopped.
In an optional embodiment, in step S106, the sending, by the first device, the second data packet to the second device includes:
selecting a first data packet which fails to be received by the 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;
and sending the second data packet to the second device.
It should be further noted that, in the above optional embodiment, after knowing that the second device receives the first data packet that fails, the first device may resend the first data packet to the second device in the next sending process. For example, the first device still keeps sending 20 data packets to the second device each time, then in step S102, the first device defines the data packets identified as 1 to 20 as the first data packet to be sent to the second device, and the second device fails to receive the data packets identified as 18 and 19 successfully, then the first device may define the data packets identified as 18 and 19 as the second data packet in step S106, and at the same time, defines the data packets identified as 21 to 38 selected from the data packets to be sent as the second data packet to be sent to the second device.
In an alternative embodiment, the number of first data packets is the same as the number of second data packets except for the case where the number of data packets to be transmitted is insufficient, i.e. the number of data packets transmitted by the first device to the second device at a time is the same.
By the data transmission method in the embodiment of the present invention, after sending a plurality of first data packets to the second device according to the user instruction, an inquiry message may be sent to the second device to inquire about the first data packet that the second device failed to receive, so as 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. Therefore, in the process of sending the data packets to the second device by the first device for device upgrading, the first device determines which data packets are failed to be received in a mode of inquiring messages, and the second device does not need to respond to each data packet/upgrading packet fragment, so that the time for responding by the second device is not generated in the process, the transmission efficiency is obviously improved, and unnecessary network resources are avoided being occupied. Therefore, the invention can solve the problem that in the related technology, the upgrading time is too long because each upgrading packet fragment needs to be responded in the upgrading process of the Bluetooth equipment, thereby achieving the effect of remarkably improving the transmission efficiency of the upgrading packet 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 second device by the first device, on the premise of improving the transmission efficiency.
In an optional embodiment, in the step S102, the sending a plurality of first data packets to the second device according to a user instruction includes: sending N first data packets to second equipment according to a user instruction, wherein N is a positive integer; in step S102, before sending the N first data packets 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 (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 the upgrade packet.
In an optional embodiment, the determining the value of N according to the volume of the upgrade package, the maximum transmission unit MTU preset between the first device and the second device, and the preset polling 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 to S, and the MTU between the first device and the second device may perform negotiation during bluetooth connection, and is set to M; the query period may be represented by a preset progress query phase value, that is, the preset percentage of the query position in the total transmission progress of the upgrade package is set as P, and the query is performed once every time P (percentage) of the total transmission progress of the upgrade package is completed. Thus, N should satisfy:
N=(S/M)*P。
for example, if the size of the upgrade package is 102.4KB, that is, S is 102.4KB, and the MTU negotiated between the first device and the second device is 512B, it may be determined that the first device can transmit a file with a size of 512B to the second device at most each time, and therefore, the upgrade package needs to be split into 102400/512, that is, 200 fragments, each of which constitutes one data package. On the basis, according to the fact that the user sets the P to be 10%, namely, 10% of the total transmission progress of the upgrade package is inquired once.
Thus, it can be determined that N is (102400/512) × 10%, i.e. N is 20, and thus it can be determined that the first device sends an inquiry message to the second device for one inquiry every 20 packets sent 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 made with an exemplary embodiment:
example embodiment 1
Fig. 4 is an interaction diagram of a first device and a second device provided according to an exemplary embodiment of the present invention, and as shown in fig. 4, in the exemplary embodiment, the first device is a mobile phone, the second device is a certain bluetooth device, and a user performs an upgrade operation on the second device through a corresponding APP in the mobile phone. The mobile phone downloads the upgrade package from the server to the local in advance, and establishes Bluetooth connection with the Bluetooth equipment. 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 divided into 200 data packages to be transmitted sequentially. In the upgrading process, the data transmission process between the mobile phone and the Bluetooth device is as follows:
s1, the mobile phone selects 20 data packets with the identifiers of 1 to 20 and sends the data packets to the Bluetooth equipment one by one;
s2, the mobile phone actively issues an inquiry message to the Bluetooth device so as to read the data packet successfully received by the Bluetooth device from the Bluetooth device;
s3, if in step S2, the bluetooth device has received all 20 data packets, the mobile phone selects again 20 data packets labeled 21 to 40 to issue to the bluetooth device one by one; if in step S2, the bluetooth device only receives 15 data packets identified as 1 to 15, the mobile phone selects 20 data packets identified as 16 to 35 and issues the data packets to the bluetooth device one by one;
and S4, repeating the steps S1 to S3 until the upgrade package data is completely transmitted.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
This embodiment provides an apparatus upgrading method applied to a first apparatus, and fig. 5 is a flowchart (one) of an apparatus upgrading method provided according to an embodiment of the present invention, as shown in fig. 5, the apparatus upgrading method in this embodiment includes:
s202, the first equipment sends a plurality of first data packets to the second equipment according to a user instruction;
s204, the first equipment sends a query message to the second equipment to query the second equipment to receive the failed first data packet;
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 sending operation;
s208, the first device transmits the data packets to the second device through the steps S202 to S206, so that the second device can upgrade the devices 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 upgrading method in this embodiment, the remaining optional embodiments and technical effects of the data transmission method adopted in steps S202 to S206 are all corresponding to the data transmission method in embodiment 1, and therefore, no further description is provided herein.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 3
This embodiment provides a data transmission method applied to a second device, and fig. 6 is a flowchart (two) of a data transmission method provided according to an embodiment of the present invention, as shown in fig. 6, the data transmission method in this embodiment includes:
s302, the second equipment receives a plurality of first data packets sent by the first equipment 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 received by the second device in a failure mode;
s306, the second device receives a second data packet sent by the first device, where the second data packet includes at least one of the following: the second equipment receives the failed first data packet and the data packet to be sent; alternatively, the reception operation is stopped.
It should be further noted that 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, and therefore are not described herein again.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 4
This embodiment provides an apparatus upgrading method applied to a second apparatus, and fig. 7 is a flowchart (two) of the apparatus upgrading method provided according to the embodiment of the present invention, as shown in fig. 7, the apparatus upgrading method in this embodiment includes:
s402, the second equipment receives a plurality of first data packets sent by the first equipment according to a user instruction;
s404, the second equipment receives a query message sent by the first equipment, wherein the query message is used for querying a first data packet which is received by the second equipment in a failure mode;
s406, the second device receives a second data packet sent by the first device, where the second data packet includes 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 receiving operation;
s408, the second device receives the plurality of data packets sent by the first device through the steps S402 to S408, and 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 method in this embodiment, the remaining optional embodiments and technical effects of the data transmission method adopted in steps S402 to S406 all correspond to the data transmission method in embodiment 3, and therefore, no further description is provided herein.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 5
The present embodiment further provides a data transmission apparatus, which is disposed in the first device, and is used to implement the foregoing embodiments and preferred embodiments, which have already been described and are not described again. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an 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 apparatus according to an embodiment of the present invention, and as shown in fig. 8, the data transmission apparatus in this embodiment includes:
a first sending module 502, configured to send a plurality of first data packets to the second device according to a user instruction;
a second sending module 504, configured to send a query message to the second device to query that the second device receives the failed first data packet;
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 other optional embodiments and technical effects of the data transmission apparatus in this embodiment correspond to those of the data transmission method in embodiment 1, and therefore are not described herein again.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Example 6
The present embodiment provides an apparatus upgrading apparatus, which is disposed on a first device, and is used to implement the foregoing embodiments and preferred embodiments, which have already been described and are not described again. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an 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 upgrading apparatus according to an embodiment of the present invention, and as shown in fig. 9, the device upgrading apparatus in this embodiment includes:
a first sending module 502, configured to send a plurality of first data packets to the second device according to a user instruction;
a second sending module 504, configured to send a query message to the second device to query that the second device receives the failed first data packet;
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 sending operation;
a first upgrade module 508, configured to send multiple data packets to a 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 multiple 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 in this embodiment, other optional embodiments and technical effects of the first sending module 502, the second sending module 504, and the third sending module 506 all correspond to the data transmission apparatus in embodiment 5, and therefore, no further description is given here.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Example 7
The present embodiment further provides a data transmission device disposed in the second device, where the data transmission device is used to implement the foregoing embodiments and preferred embodiments, and the description of the data transmission device is omitted here. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 10 is a block diagram (ii) 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 an inquiry message sent by the first device, where the inquiry message is used to inquire a first data packet that the second device fails to receive;
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 following: the second equipment receives the failed first data packet and the data packet to be sent; alternatively, the reception operation is stopped.
It should be further noted that other optional embodiments and technical effects of the data transmission apparatus in this embodiment correspond to those of the data transmission method in embodiment 3, and therefore are not described herein again.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Example 8
The present embodiment provides an apparatus upgrading apparatus, which is disposed on a second device, and is used to implement the foregoing embodiments and preferred embodiments, which have already been described and are not described again. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 11 is a block diagram (ii) of a structure of an apparatus upgrading device according to an embodiment of the present invention, and as shown in fig. 11, the apparatus upgrading 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 an inquiry message sent by the first device, where the inquiry message is used to inquire a first data packet that the second device fails to receive;
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 following: the second equipment receives the failed first data packet and the data packet to be sent; or, stopping the receiving operation;
a second upgrading module 608, configured to receive, through the first receiving module 602, the second receiving module 604, and the third receiving module 606, multiple data packets sent by the first device, and upgrade the device according to the multiple 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 in this embodiment, other optional embodiments and technical effects of the first receiving module 602, the second receiving module 604 and the third receiving module 606 all correspond to the data transmission apparatus in embodiment 7, and therefore, no further description is given here.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Example 9
Embodiments of the present invention also provide a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to perform the steps of any of the above-mentioned method embodiments when executed.
Alternatively, in the present embodiment, the computer-readable storage medium may be configured to store a computer program for executing the computer program in the above-described embodiment.
Optionally, in this embodiment, the computer-readable storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Example 10
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Alternatively, in this embodiment, the processor may be configured to execute the steps in the above embodiments through a computer program.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A data transmission method, applied to a first device, the method comprising:
sending a plurality of first data packets to the second equipment according to the user instruction;
sending a query message to the second device to query the second device for receiving the first data packet which fails;
transmitting a second data packet to the second device, wherein the second data packet comprises 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.
2. The method of claim 1, wherein sending the 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; wherein the acknowledgement message is used to indicate that the second device failed to receive the first data packet.
3. The method of claim 1, wherein sending the second packet to the second device comprises:
selecting the first data packet which is failed to be received by the second device from the plurality of first data packets as the second data packet; selecting one or more data packets from a plurality of data packets to be transmitted as the second data packet;
and sending the second data packet to the second device.
4. The method of any of claims 1 to 3, wherein sending the first plurality of data packets to the second device according to the user command comprises: sending N first data packets to the second device according to the user instruction, wherein N is a positive integer;
before the sending N first data packets to the second device according to the user instruction, the method further includes:
determining the value of N according to the volume of an 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.
5. The method of claim 4, wherein the determining the value of N according to the volume of the upgrade package, a predetermined Maximum Transmission Unit (MTU) between the first device and the second device, and a predetermined polling period comprises:
determining the transmission times between the first device and the second device according to the volume of the upgrade package and the MTU between the first device and the second device, and splitting the upgrade package into a plurality of data packages according to the transmission times;
and determining the numerical value of the N according to the number of the data packets and the query period.
6. A device upgrade method, applied to a first device, the method comprising:
sending a plurality of data packets to the second device by the data transmission method according to any one of claims 1 to 5, so that the second device can perform device upgrade according to the plurality of data packets;
wherein the data packet comprises the first data packet and the second data packet.
7. 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 an inquiry message sent by the first device, wherein the inquiry message is used for inquiring the first data packet which is received by the second device in a failure manner;
receiving 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 reception operation is stopped.
8. A device upgrade method, 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 7, and performing device upgrade according to the plurality of data packets;
wherein the data packet comprises the first data packet and the second data packet.
9. A computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to carry out the method of any one of claims 1 to 8 when executed.
10. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 8.
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 true CN111885564A (en) 2020-11-03
CN111885564B 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)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112702143A (en) * 2020-12-16 2021-04-23 歌尔光学科技有限公司 Dial data management method and device, wearable device and storage medium
CN116132974A (en) * 2023-01-17 2023-05-16 青岛海尔智能家电科技有限公司 Method, apparatus and storage medium for over-the-air in a multi-node device network

Citations (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070053373A1 (en) * 2005-09-02 2007-03-08 Fitzgerald Cary W Packetizing media for a time slotted communication system
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
US20170055247A1 (en) * 2015-08-20 2017-02-23 Beijing Zhigu Tech Co., Ltd. Data transmission method and apparatus and data receiving method and apparatus
US20170185390A1 (en) * 2014-04-18 2017-06-29 Huawei Device Co., Ltd. Software upgrade method and apparatus, and device
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
US20200153562A1 (en) * 2017-06-26 2020-05-14 Autel Robotics Co., Ltd. Data transmission method and related device
CN111163387A (en) * 2019-12-29 2020-05-15 歌尔科技有限公司 TWS earphone upgrading method and device, charging box and storage medium

Patent Citations (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070053373A1 (en) * 2005-09-02 2007-03-08 Fitzgerald Cary W Packetizing media for a time slotted communication system
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
US20170185390A1 (en) * 2014-04-18 2017-06-29 Huawei Device Co., Ltd. Software upgrade method and apparatus, and device
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
US20170055247A1 (en) * 2015-08-20 2017-02-23 Beijing Zhigu Tech Co., Ltd. Data transmission method and apparatus and data receiving method and apparatus
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
US20200153562A1 (en) * 2017-06-26 2020-05-14 Autel Robotics Co., Ltd. Data transmission method and related device
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

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112702143A (en) * 2020-12-16 2021-04-23 歌尔光学科技有限公司 Dial data management method and device, wearable device and storage medium
CN112702143B (en) * 2020-12-16 2023-01-24 歌尔科技有限公司 Dial data management method and device, wearable device and storage medium
CN116132974A (en) * 2023-01-17 2023-05-16 青岛海尔智能家电科技有限公司 Method, apparatus and storage medium for over-the-air in a multi-node device network

Also Published As

Publication number Publication date
CN111885564B (en) 2024-03-22

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
CN102571996B (en) IP (Internet Protocol) address assignment method, IP address assignment device and network system
CN107861760A (en) BIOS collocation method, terminal and server
CN108376078A (en) Upgrade method, device and the household appliance of equipment
CN110365704B (en) Equipment binding method and device and electronic equipment
CN111885594A (en) Equipment binding method and device
CN111885564B (en) Data transmission method, equipment upgrading method and computer readable storage medium
WO2021019847A1 (en) Network slice control server, service server, and control method for same
CN111880446A (en) Control instruction sending method and control instruction receiving method
CN112764803A (en) Version upgrading method and device, storage medium and electronic device
US8005915B2 (en) Method for providing download and upload service in network control system
CN110493644B (en) Television application upgrading method, television terminal and server
CN104753804A (en) Data stream transmission control method, device and system
CN112637221B (en) Equipment control method and device
CN103096361A (en) Interactive method and device of performance statistic data in wireless local area network system
CN112671572A (en) Method and device for intelligent equipment network distribution, storage medium and electronic device
CN107005468B (en) Method and device for determining NSD (non-volatile memory) to be uploaded
CN109871288A (en) Execute method, apparatus, equipment and the medium of android system order
CN111061723A (en) Workflow implementation method and device
CN114257509A (en) Module upgrading method and device, storage medium and electronic device
WO2016206437A1 (en) Rom package generation method and device
CN109640339B (en) Method, device, system and storage medium for managing multiple Bluetooth antenna devices
CN113535402A (en) Load balancing processing method and device based on 5G MEC and electronic equipment
CN115550313A (en) Communication method and device of external equipment, electronic equipment and storage medium

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