CN112423290B - Wireless upgrading method, terminal equipment, device to be upgraded and medium - Google Patents

Wireless upgrading method, terminal equipment, device to be upgraded and medium Download PDF

Info

Publication number
CN112423290B
CN112423290B CN202011221927.XA CN202011221927A CN112423290B CN 112423290 B CN112423290 B CN 112423290B CN 202011221927 A CN202011221927 A CN 202011221927A CN 112423290 B CN112423290 B CN 112423290B
Authority
CN
China
Prior art keywords
upgraded
upgrade
upgrade package
acquisition request
upgrading
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
CN202011221927.XA
Other languages
Chinese (zh)
Other versions
CN112423290A (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.)
Goertek Techology Co Ltd
Original Assignee
Goertek Techology 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 Goertek Techology Co Ltd filed Critical Goertek Techology Co Ltd
Priority to CN202011221927.XA priority Critical patent/CN112423290B/en
Publication of CN112423290A publication Critical patent/CN112423290A/en
Application granted granted Critical
Publication of CN112423290B publication Critical patent/CN112423290B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/22Processing or transfer of terminal data, e.g. status or physical capabilities
    • H04W8/24Transfer of terminal data
    • H04W8/245Transfer of terminal data from a network towards a terminal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a wireless upgrading method, terminal equipment, a device to be upgraded and a readable storage medium, wherein the wireless upgrading method comprises the following steps: acquiring address information of a device to be upgraded, and establishing point-to-point connection with the device to be upgraded according to the address information; sending an upgrading instruction to the device to be upgraded so that the device to be upgraded sends an upgrading packet acquisition request to the terminal equipment according to the upgrading instruction; receiving an upgrade package acquisition request sent by the device to be upgraded; and obtaining an upgrade package according to the upgrade package obtaining request, and sending the upgrade package to the device to be upgraded so that the device to be upgraded is upgraded according to the received upgrade package, and the upgrade cost of the device to be upgraded is reduced.

Description

Wireless upgrading method, terminal equipment, device to be upgraded and medium
Technical Field
The present invention relates to the field of wireless upgrade technologies, and in particular, to a wireless upgrade method, a terminal device, a device to be upgraded, and a readable storage medium.
Background
In the existing wireless upgrade method, OTA (Over-the-Air Technology ) upgrade Technology is commonly used. The OTA upgrading technology is a technology for downloading an upgrading packet on a remote server by a device to be upgraded through a wireless network and upgrading a system or an application, and requires the remote server to set up a file server to store the upgrading packet of the device to be upgraded and requires the device to be upgraded to pre-store a server address of the remote server so that the device to be upgraded is connected with the remote server through a router to realize the upgrading of the system or the application. Therefore, the existing wireless upgrading technology requires the remote server to open the file service for a long time, which results in higher upgrading cost of the device to be upgraded.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a wireless upgrading method, terminal equipment, a device to be upgraded and a readable storage medium, and aims to reduce the upgrading cost of the device to be upgraded.
In order to achieve the above object, the present invention provides a wireless upgrade method, applied to a terminal device, the wireless upgrade method including the following steps:
acquiring address information of a device to be upgraded, and establishing point-to-point connection with the device to be upgraded according to the address information;
sending an upgrading instruction to the device to be upgraded so that the device to be upgraded sends an upgrading packet acquisition request to the terminal equipment according to the upgrading instruction;
receiving an upgrade package acquisition request sent by the device to be upgraded;
and acquiring an upgrade package according to the upgrade package acquisition request, and sending the upgrade package to the device to be upgraded so that the device to be upgraded is upgraded according to the received upgrade package.
Optionally, the step of obtaining the upgrade package according to the upgrade package obtaining request includes:
acquiring an upgrade file according to the initial position and the end position in the upgrade package acquisition request;
packaging the upgrade file into an upgrade package;
and adding the upgrade package identification in the upgrade package acquisition request to the upgrade package.
Optionally, before the step of sending the upgrade instruction to the device to be upgraded, the method further includes:
acquiring a target upgrade version of the device to be upgraded, and generating version confirmation information according to the target upgrade version;
sending the version confirmation information to the device to be upgraded so that the device to be upgraded confirms the target upgrade version;
when version abnormal information sent by the device to be upgraded is received, outputting prompt information of the target upgrading version abnormity;
and when the correct version information sent by the device to be upgraded is received, executing the step of sending an upgrading instruction to the device to be upgraded.
Optionally, the step of obtaining the address information of the device to be upgraded includes:
acquiring a device identifier of the device to be upgraded through a scanning device or a camera;
generating an address acquisition request of the device to be upgraded according to the device identification, and sending the address acquisition request to a server to acquire address information of the device to be upgraded;
and receiving the address information of the device to be upgraded sent by the server.
In addition, in order to achieve the above object, the present invention further provides a wireless upgrade method applied to a device to be upgraded, the wireless upgrade method comprising the steps of:
when a connection request sent by terminal equipment is received, point-to-point connection is established with the terminal equipment;
receiving an upgrading instruction sent by the terminal equipment, and generating an upgrading packet acquisition request according to the upgrading instruction;
sending the upgrade package acquisition request to the terminal equipment to acquire an upgrade package corresponding to the upgrade package acquisition request;
and receiving an upgrade package sent by the terminal equipment, and upgrading according to the upgrade package.
Optionally, the upgrade package acquisition request includes a start position, an end position, and an upgrade package identifier, and the step of generating the upgrade package acquisition request according to the upgrade instruction includes:
acquiring a current initial position according to an end position in an upgrade package acquisition request generated last time, wherein the current initial position is the initial position of a target file when the upgrade package acquisition request is transmitted for the first time;
acquiring a current ending position according to the current starting position, the data packet capacity in the upgrading instruction and the target file capacity;
acquiring the current upgrade package identification according to the upgrade package identification in the upgrade package acquisition request generated last time;
and generating a current upgrading packet obtaining request according to the current starting position, the current ending position and the current upgrading packet identification.
Optionally, before the step of receiving the upgrade instruction sent by the terminal device, the method further includes:
receiving version confirmation information sent by terminal equipment;
when the target upgrading version in the version confirmation information does not meet the preset condition, sending version abnormal information to the terminal equipment;
and when the target upgrading version in the version confirmation information meets the preset condition, sending version correct information to the terminal equipment.
In addition, to achieve the above object, the present invention further provides a terminal device, including: the wireless upgrade system comprises a memory, a processor and a wireless upgrade program stored on the memory and operable on the processor, wherein the wireless upgrade program realizes the steps of the wireless upgrade method when executed by the processor.
In addition, in order to achieve the above object, the present invention further provides a device to be upgraded, including: the wireless upgrade system comprises a memory, a processor and a wireless upgrade program stored on the memory and operable on the processor, wherein the wireless upgrade program realizes the steps of the wireless upgrade method when executed by the processor.
In addition, to achieve the above object, the present invention further provides a readable storage medium, which stores thereon a wireless upgrade program, which when executed by a processor implements the steps of the wireless upgrade method as described above.
According to the wireless upgrading method, the terminal equipment, the device to be upgraded and the readable storage medium, when the terminal equipment is used for address information of the device to be upgraded, point-to-point connection is established between the terminal equipment and the device to be upgraded according to the address information, and then an upgrading instruction is sent to the device to be upgraded; the device to be upgraded generates an upgrade package acquisition request according to the upgrade instruction and sends the upgrade package acquisition request to the terminal equipment; the terminal equipment acquires an upgrade package according to the upgrade package acquisition request and sends the upgrade package to a device to be upgraded; and upgrading the device to be upgraded according to the upgrade package. The method and the device have the advantages that the point-to-point connection between the terminal equipment and the device to be upgraded is established, the upgrade package is transmitted between the terminal equipment and the device to be upgraded through the point-to-point wireless network, and the file service started by the server for a long time is removed, so that the upgrade cost for building the server is removed, and the upgrade cost of the device to be upgraded is reduced.
Drawings
Fig. 1 is a schematic diagram of a hardware architecture of a terminal device according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a hardware architecture of a device to be upgraded according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a wireless upgrade method according to a first embodiment of the present invention;
fig. 4 is a schematic diagram of data interaction of a terminal device, a device to be upgraded, and a server according to an embodiment of the present invention;
fig. 5 is a flowchart illustrating a wireless upgrade method according to a fourth embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the existing wireless upgrade method, an Over-the-Air Technology (OTA) upgrade technique is often used. The OTA upgrading technology is a technology for downloading an upgrading packet on a remote server by a device to be upgraded through a wireless network and upgrading a system or an application, and requires the remote server to set up a file server to store the upgrading packet of the device to be upgraded and requires the device to be upgraded to pre-store a server address of the remote server so that the device to be upgraded is connected with the remote server through a router to realize the upgrading of the system or the application. Therefore, the existing wireless upgrading technology requires the remote server to open the file service for a long time, which results in higher upgrading cost of the device to be upgraded.
In order to solve the foregoing drawbacks, an embodiment of the present invention provides a wireless upgrade method, a terminal device, a device to be upgraded, and a readable storage medium, where the wireless upgrade method is applied to the terminal device, and mainly includes the following steps:
acquiring address information of a device to be upgraded, and establishing point-to-point connection with the device to be upgraded according to the address information;
sending an upgrading instruction to the device to be upgraded so that the device to be upgraded sends an upgrading packet acquisition request to the terminal equipment according to the upgrading instruction;
receiving an upgrade package acquisition request sent by the device to be upgraded;
and acquiring an upgrade package according to the upgrade package acquisition request, and sending the upgrade package to the device to be upgraded so that the device to be upgraded is upgraded according to the received upgrade package.
The wireless upgrading method is applied to a device to be upgraded and mainly comprises the following steps:
when a connection request sent by terminal equipment is received, point-to-point connection is established with the terminal equipment;
receiving an upgrading instruction sent by the terminal equipment, and generating an upgrading packet acquisition request according to the upgrading instruction;
sending the upgrade package acquisition request to the terminal equipment to acquire an upgrade package corresponding to the upgrade package acquisition request;
and receiving an upgrade package sent by the terminal equipment, and upgrading according to the upgrade package.
When the terminal equipment is used for address information of the device to be upgraded, point-to-point connection is established with the device to be upgraded according to the address information, and then an upgrading instruction is sent to the device to be upgraded; the device to be upgraded generates an upgrade package acquisition request according to the upgrade instruction and sends the upgrade package acquisition request to the terminal equipment; the terminal equipment acquires an upgrade package according to the upgrade package acquisition request and sends the upgrade package to a device to be upgraded; and upgrading the device to be upgraded according to the upgrade package. The method and the device have the advantages that the point-to-point connection between the terminal equipment and the device to be upgraded is established, the upgrade package is transmitted between the terminal equipment and the device to be upgraded through the point-to-point wireless network, and the file service started by the server for a long time is removed, so that the upgrade cost for building the server is removed, and the upgrade cost of the device to be upgraded is reduced.
As shown in fig. 1, fig. 1 is a schematic diagram of a hardware architecture of a terminal device according to an embodiment of the present invention.
The terminal equipment can be a PC, a tablet computer, a smart phone and the like.
As shown in fig. 1, the terminal device may include: a processor 1001, such as a CPU, a user interface 1003, a network interface 1004, a memory 1005, a communication bus 1002. The communication bus 1002 is used to implement connection communication among these components. The user interface 1003 may comprise a Display screen (Display), an input unit such as a keyboard, etc., and the optional user interface 1003 may also comprise a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may optionally be a memory to upgrade device independent of the processor 1001 described above.
Those skilled in the art will appreciate that the hardware architecture of the terminal device shown in fig. 1 does not constitute a limitation of the terminal device, and may include more or fewer components than those shown, or some components in combination, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a wireless upgrade program.
In the terminal device shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; processor 1001 may be configured to invoke a wireless upgrade program stored in memory 1005 and perform the following operations:
acquiring address information of a device to be upgraded, and establishing point-to-point connection with the device to be upgraded according to the address information;
sending an upgrading instruction to the device to be upgraded so that the device to be upgraded sends an upgrading packet acquisition request to the terminal equipment according to the upgrading instruction;
receiving an upgrade package acquisition request sent by the device to be upgraded;
and acquiring an upgrade package according to the upgrade package acquisition request, and sending the upgrade package to the device to be upgraded so that the device to be upgraded is upgraded according to the received upgrade package.
Further, processor 1001 may be configured to invoke a wireless upgrade program stored in memory 1005 to also perform the following operations:
acquiring an upgrade file according to the initial position and the end position in the upgrade package acquisition request;
packaging the upgrade file into an upgrade package;
and adding the upgrade package identification in the upgrade package acquisition request to the upgrade package.
Further, processor 1001 may be configured to invoke a wireless upgrade program stored in memory 1005 to also perform the following operations:
acquiring a target upgrading version of the device to be upgraded, and generating version confirmation information according to the target upgrading version;
sending the version confirmation information to the device to be upgraded so that the device to be upgraded confirms the target upgrade version;
when version abnormal information sent by the device to be upgraded is received, outputting prompt information of the target upgrading version abnormity;
and when the correct version information sent by the device to be upgraded is received, executing the step of sending an upgrading instruction to the device to be upgraded.
Further, processor 1001 may be configured to invoke a wireless upgrade program stored in memory 1005 to also perform the following operations:
acquiring a device identifier of the device to be upgraded through a scanning device or a camera;
generating an address acquisition request of the device to be upgraded according to the device identification, and sending the address acquisition request to a server to acquire address information of the device to be upgraded;
and receiving the address information of the device to be upgraded sent by the server.
As shown in fig. 2, fig. 2 is a schematic diagram of a hardware architecture of a device to be upgraded according to an embodiment of the present invention.
The device to be upgraded can be a smart phone, a tablet computer, a smart watch, a gamepad, a VR device (virtual reality device), an AR device (augmented reality device), a smart band, a smart sound box, a smart headset and the like.
As shown in fig. 2, the device to be upgraded may include: a processor 2001, e.g., a CPU, a user interface 2003, a network interface 2004, a memory 2005, a communication bus 2002. The communication bus 2002 is used to implement connection communication between these components. The user interface 2003 may include a Display screen (Display), an input unit such as a keyboard, etc., and the optional user interface 2003 may also include a standard wired interface, a wireless interface. The network interface 2004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 2005 may be a high-speed RAM memory or a non-volatile memory (e.g., a disk memory). The memory 2005 may alternatively be a memory to upgrade device independent of the processor 2002 described above.
Those skilled in the art will appreciate that the hardware architecture of the device to be upgraded shown in fig. 2 does not constitute a limitation of the device to be upgraded, and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
As shown in fig. 2, the memory 2005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a wireless upgrade program.
In the device to be upgraded shown in fig. 2, the network interface 2004 is mainly used for connecting to the backend server and performing data communication with the backend server; processor 2001 may be used to invoke the wireless upgrade program stored in memory 2005 and perform the following operations:
when a connection request sent by terminal equipment is received, point-to-point connection is established with the terminal equipment;
receiving an upgrading instruction sent by the terminal equipment, and generating an upgrading packet acquisition request according to the upgrading instruction;
sending the upgrade package acquisition request to the terminal equipment to acquire an upgrade package corresponding to the upgrade package acquisition request;
and receiving an upgrade package sent by the terminal equipment, and upgrading according to the upgrade package.
Further, processor 2001 may be used to invoke the wireless upgrade program stored in memory 2005 to also perform the following operations:
acquiring a current initial position according to an end position in an upgrade package acquisition request generated last time, wherein the current initial position is the initial position of a target file when the upgrade package acquisition request is transmitted for the first time;
acquiring a current ending position according to the current starting position, the data packet capacity in the upgrading instruction and the target file capacity;
acquiring the current upgrade package identification according to the upgrade package identification in the upgrade package acquisition request generated last time;
and generating a current upgrading packet obtaining request according to the current starting position, the current ending position and the current upgrading packet identification.
Further, the processor 2001 may be configured to invoke the wireless upgrade program stored in the memory 2005, and also perform the following operations:
receiving version confirmation information sent by terminal equipment;
when the target upgrading version in the version confirmation information does not meet the preset condition, sending version abnormal information to the terminal equipment;
and when the target upgrading version in the version confirmation information meets the preset condition, sending version correct information to the terminal equipment.
As shown in fig. 3, in a first embodiment of the wireless upgrade method of the present invention, the method is applied to a terminal device, and includes the following steps:
step S101, address information of a device to be upgraded is obtained, and point-to-point connection is established with the device to be upgraded according to the address information;
step S102, sending an upgrading instruction to the device to be upgraded so that the device to be upgraded sends an upgrading packet acquisition request to the terminal equipment according to the upgrading instruction;
step S103, receiving an upgrade patch acquisition request sent by the device to be upgraded;
and step S104, acquiring an upgrade package according to the upgrade package acquisition request, and sending the upgrade package to the device to be upgraded so that the device to be upgraded is upgraded according to the received upgrade package.
In this embodiment, the address information is a MAC address of the device to be upgraded; the point-to-point connection is WiFi Direct (WiFi Direct connection), specifically, the WiFi Direct connection is a point-to-point connection technology, a TCP/IP link is directly established between two devices, and data can be transmitted without participation of a wireless access point (such as a router); the upgrading instruction comprises target file capacity, upgrading packet capacity, transmission time interval, waiting response information and the like; the target file capacity is the file size of a target file corresponding to a target upgrade version of the device to be upgraded; the upgrade package acquisition request comprises a version identification of a target upgrade version, a starting position of target data and an ending position of the target data; the upgrade package includes an upgrade package identifier and target data.
The method comprises the steps that a first processor firstly obtains address information of a device to be upgraded, then full-channel scanning is carried out according to the obtained address information so as to determine the device to be upgraded corresponding to the address information, then a WiFi direct connection request is sent to the device to be upgraded according to a scanning result, and when a connection response sent by the device to be upgraded is received, point-to-point connection with the device to be upgraded is established.
The first processor generates an upgrading instruction according to a target upgrading version of the device to be upgraded and sends the upgrading instruction to the device to be upgraded so that the device to be upgraded sends an upgrading packet acquisition request to the terminal equipment according to the upgrading instruction, then receives the upgrading packet acquisition request sent by the device to be upgraded, acquires an upgrading packet in a target file according to the upgrading packet acquisition request, and sends the upgrading packet to the device to be upgraded so that the device to be upgraded is upgraded according to the upgrading packet.
Illustratively, the step of obtaining the upgrade package according to the upgrade package obtaining request further includes:
step S1041, obtaining an upgrade file according to the initial position and the end position in the upgrade package obtaining request;
step S1042, packaging the upgrade file into an upgrade package;
and S1043, adding the upgrade package identification in the upgrade package acquisition request to the upgrade package.
In this embodiment, the first processor obtains a start position, an end position, an upgrade package identifier, and a version identifier of a target upgrade version in an upgrade package obtaining request, determines a target file corresponding to the version identifier, then determines file data in the target file according to the start position and the end position, and uses the file data as an upgrade file, then encapsulates the obtained upgrade file into an upgrade package, and adds the upgrade package identifier in the upgrade package obtaining request to the upgrade package.
Optionally, the upgrade package obtaining request may include a start position, an upgrade package capacity, an upgrade package identifier, and a version identifier of the target upgrade file, and accordingly, the end position may be calculated according to the start position and the upgrade package capacity, and then the process of obtaining the upgrade package is executed.
In the technical scheme disclosed by the embodiment, the file service started by the server for a long time is removed by establishing the point-to-point connection between the terminal equipment and the device to be upgraded and then transmitting the upgrade package between the terminal equipment and the device to be upgraded through the point-to-point wireless network, so that the upgrade cost for building the server is removed, namely the upgrade cost for the device to be upgraded is reduced.
Optionally, based on the first embodiment, in a second embodiment of the wireless upgrade method of the present invention, before the step S102, the method further includes:
step S105, acquiring a target upgrading version of the device to be upgraded, and generating version confirmation information according to the target upgrading version;
step S106, sending the version confirmation information to the device to be upgraded so that the device to be upgraded confirms the target upgrade version;
s107, when version abnormal information sent by the device to be upgraded is received, outputting prompt information of the target upgrading version abnormality;
and S108, when the correct version information sent by the device to be upgraded is received, executing the step of sending an upgrading instruction to the device to be upgraded.
In this embodiment, the first processor first obtains a target upgrade version of the device to be upgraded, and may, for example, first display a selection interface of the upgradable version, so that a user selects the target upgrade version of the device to be upgraded based on the selection interface; and then, generating version confirmation information according to the version identification of the target upgrading version and the device identification of the device to be upgraded, and then sending the version confirmation information to the device to be upgraded so that the device to be upgraded determines whether the target upgrading version is legal or not according to the version confirmation information. When the first processor receives version abnormity information sent by a device to be upgraded, prompt information of abnormity of a target upgrading version is output, so that a user can reselect the target upgrading version based on a selection interface; specifically, the version confirmation information may include a version identifier of the target upgrade version and a module identifier of a module in the target upgrade version, and the version exception information may be a target version exception and a target module exception. And when receiving the correct version information of the device to be upgraded, the first processor executes the process of sending the upgrade instruction to the device to be upgraded so as to perform wireless upgrade.
In the technical scheme disclosed in the embodiment, whether the target upgrade version selected by the user is legal or not is verified, so that the upgrade error or equipment failure caused by the wrong version is avoided, and the reliability of the wireless upgrade process is improved.
Optionally, after the step S104, the method further includes:
step S109, updating the capacity of the sent file according to the data packet capacity of the upgrade packet;
and step S110, acquiring a sent progress according to the sent file capacity and the target file capacity corresponding to the target upgrading version.
In this embodiment, after sending the upgrade package, the first processor updates the sent file capacity according to the data package capacity of the upgrade package, then obtains the target file capacity corresponding to the target upgrade version, and calculates the sent progress according to the sent file capacity and the target file capacity.
Optionally, after the step S104, the method further includes:
step S111, adding one to the retransmission times when receiving the retransmission request sent by the device to be upgraded;
step S112, when the retransmission times are less than the preset times, sending the upgrade package corresponding to the upgrade package identification in the retransmission request to the device to be upgraded;
step S113, outputting error information when the retransmission times are more than or equal to the preset times;
and step S115, resetting the retransmission times to zero when receiving a retransmission success prompt sent by the device to be upgraded.
In this embodiment, the retransmission request includes an upgrade package identifier of an upgrade package to be retransmitted.
When receiving a retransmission request sent by a device to be upgraded, a first processor adds one to the retransmission times, then compares the retransmission times with a preset time, and when the retransmission times are smaller than the preset times, acquires an upgrade package corresponding to an upgrade package identifier of the retransmission request and sends the upgrade package to the device to be upgraded; and when the retransmission times are more than or equal to the preset times, the first processor generates error information of transmission faults according to the upgrade package identification of the retransmission request, so that a user can select whether to continuously retransmit the upgrade package corresponding to the upgrade package identification or not on an upgrade interface according to the error information, or whether to restart target file transmission or stop the target version upgrade process.
Specifically, when the first processor receives the retransmission success prompt, the retransmission times in the memory are reset to zero.
In the technical solution disclosed in this embodiment, the success rate of wireless transmission is improved by setting a retransmission mechanism.
Optionally, based on the first embodiment, in a third embodiment of the wireless upgrade method of the present invention, the step of obtaining address information of a device to be upgraded further includes:
step S1011, acquiring a device identifier of the device to be upgraded through a scanning device or a camera;
step S1012, generating an address obtaining request of the device to be upgraded according to the device identifier, and sending the address obtaining request to a server to obtain address information of the device to be upgraded;
and step S1013, receiving the address information of the device to be upgraded sent by the server.
In this embodiment, the terminal device may be externally connected with a scanning device, and may also be in communication connection with a server; the server stores the mapping relation between the device identification and the address information.
As shown in fig. 4, fig. 4 is a schematic data interaction diagram of a terminal device, a device to be upgraded, and a server according to an embodiment of the present invention, where the PC is the terminal device, the DUT is the device to be upgraded, the Scanner is the scanning device, the Router is the Router, and the Source is the server. The terminal equipment sends a scanning control instruction to the scanning device; the method comprises the steps that a scanning device receives a scanning control instruction sent by terminal equipment, then scans a current picture to obtain a device identifier of a device to be upgraded, and then sends the device identifier to the terminal equipment; the terminal equipment receives the device identification, generates an address acquisition request of the device to be upgraded according to the device identification, and then sends the address acquisition request to the server; the server receives the address acquisition request, then acquires address information corresponding to the device identifier carried in the address acquisition request, and sends the acquired address information to the terminal equipment; and the terminal equipment executes the process of establishing point-to-point connection with the device to be upgraded according to the received address information and the received address information.
Optionally, the terminal device may include a camera, and the first processor controls the camera to acquire current image data, then identifies a device identifier of the device to be upgraded according to the image data, and then executes the process of acquiring address information corresponding to the device identifier as described above.
Alternatively, the terminal device may also directly receive the device identifier input by the user, and then perform the process of acquiring the address information corresponding to the device identifier as described above.
Optionally, the terminal device may further store a mapping relationship between the device identifier and the address information, and after the terminal device acquires the device identifier, the terminal device acquires the address information corresponding to the device identifier from the memory, and then executes the aforementioned process of establishing the peer-to-peer connection with the device to be upgraded according to the acquired address information.
In the technical scheme disclosed in this embodiment, the device identifier is set, and the address information is obtained through the mapping relationship between the preset device identifier and the address information, so that it is avoided that illegal terminal equipment easily obtains the address information of the device to be upgraded, and then the terminal equipment is connected with the device to be upgraded to illegally control the device to be upgraded, and the security of the device to be upgraded is improved.
As shown in fig. 5, in a fourth embodiment of the wireless upgrade method of the present invention, the method is applied to a device to be upgraded, and includes the following steps:
step S201, when a connection request sent by a terminal device is received, point-to-point connection is established with the terminal device;
step S202, receiving an upgrading instruction sent by the terminal equipment, and generating an upgrading packet acquisition request according to the upgrading instruction;
step S203, sending the upgrade package acquisition request to the terminal equipment to acquire an upgrade package corresponding to the upgrade package acquisition request;
and step S204, receiving the upgrade package sent by the terminal equipment, and upgrading according to the upgrade package.
In this embodiment, the second processor of the device to be upgraded starts the peer-to-peer connection function, and establishes a peer-to-peer connection with the terminal device when receiving a connection request sent by the terminal device. The second processor receives an upgrade instruction sent by the terminal equipment, generates an upgrade package acquisition request according to the received upgrade instruction, sends the upgrade package acquisition request to the terminal equipment to acquire an upgrade package corresponding to the upgrade package acquisition request, receives the upgrade package sent by the terminal equipment, and performs system or application upgrade according to the received upgrade package.
Illustratively, the step of generating an upgrade package acquisition request according to the upgrade instruction further includes:
step S2021, acquiring a current initial position according to an end position in an upgrade package acquisition request generated last time, wherein the current initial position is an initial position of a target file when the upgrade package acquisition request is transmitted for the first time;
step S2022, acquiring a current end position according to the current start position, the data packet capacity in the upgrading instruction and the target file capacity;
step S2023, obtaining the current upgrade package identification according to the upgrade package identification in the upgrade package obtaining request generated last time;
step S2024, generating a current upgrade package obtaining request according to the current starting position, the current ending position and the current upgrade package identifier.
In this embodiment, the second processor obtains an end position in the upgrade package acquisition request generated last time, determines an offset position according to upgrade file data in the upgrade package received last time, and then determines a current start position of the upgrade package acquisition request this time according to the end position and the offset position last time, specifically, when the upgrade package acquisition request is generated first time, takes the start position of the target file as the current start position of the upgrade package acquisition request this time; then determining the current ending position of the upgrade package acquisition request according to the upgrade package capacity and the current starting position in the upgrade instruction; and then, generating a current upgrade package identification of the upgrade package acquisition request according to the upgrade package identification of the upgrade package acquisition request generated last time, wherein specifically, each upgrade package acquisition request is numbered in sequence. And the second processor generates a current upgrading packet obtaining request according to the current starting position, the current ending position and the current upgrading packet identifier.
In the technical scheme disclosed by the embodiment, the file service started by the server for a long time is removed by establishing the point-to-point connection between the terminal equipment and the device to be upgraded and then transmitting the upgrade package between the terminal equipment and the device to be upgraded through the point-to-point wireless network, so that the upgrade cost for building the server is removed, namely the upgrade cost for the device to be upgraded is reduced.
Optionally, based on the fourth embodiment, in a fifth embodiment of the wireless upgrade method of the present invention, before step 202, the method further includes:
step S205, receiving version confirmation information sent by the terminal equipment;
step S206, when the target upgrading version in the version confirmation information does not meet the preset condition, sending version abnormal information to the terminal equipment;
step S207, when the target upgrade version in the version confirmation information meets the preset condition, sending version correctness information to the terminal device.
In the embodiment, the preset condition is that the target upgrade version is legal and is higher than the current use version; the version confirmation information may include a version identification of the target upgrade version.
The second processor receives the version confirmation information sent by the terminal equipment and then acquires the version identification of the target upgrading version in the version confirmation information; and then judging whether the version identification of the target upgrading version is legal or not according to the version identification stored in the memory, acquiring the current version identification of the device to be upgraded when the version identification of the target upgrading version is legal, and sending version correct information to the terminal equipment when the version identification of the target upgrading version is higher than the current version identification.
And the second processor sends version abnormal information to the terminal equipment when the version identification of the target upgrading version is illegal or the version identification of the target upgrading version is lower than or equal to the current version identification.
In the technical scheme disclosed by the embodiment, whether the target upgrading version selected by the user is legal or not is verified, so that upgrading errors or equipment faults caused by wrong versions are avoided, and the reliability of the wireless upgrading process is improved.
Optionally, after step S203, the method further includes:
step S208, starting timing;
step S209, when the timing duration reaches a preset duration and an upgrade package sent by the terminal equipment is not received, generating a retransmission request according to an upgrade package identifier in the upgrade package acquisition request, and sending the retransmission request to the terminal equipment;
step S210, when receiving the upgrade package corresponding to the retransmission request sent by the terminal device, sending a retransmission success prompt to the terminal device.
In this embodiment, the second processor starts timing after sending the upgrade package acquisition request, and when the timing duration reaches a preset duration and does not receive the upgrade package sent by the terminal device, acquires the upgrade package acquisition request sent last time, acquires an upgrade package identifier in the upgrade package acquisition request, generates a retransmission request according to the upgrade package identifier, and then sends the retransmission request to the terminal device, so that the terminal device sends the upgrade package corresponding to the upgrade package identifier to the device to be upgraded; and when an upgrade packet corresponding to the retransmission request sent by the terminal equipment is received, sending a retransmission success prompt to the terminal equipment.
Illustratively, the second processor starts timing after sending the retransmission request, and performs the retransmission process again when the timing duration reaches the preset duration.
In the technical solution disclosed in this embodiment, the success rate of wireless transmission is improved by setting a retransmission mechanism.
In addition, an embodiment of the present invention further provides a terminal device, where the terminal device includes a memory, a processor, and a wireless upgrade program that is stored in the memory and is executable on the processor, and when the wireless upgrade program is executed by the processor, the steps of the wireless upgrade method according to the foregoing embodiments are implemented.
In addition, an embodiment of the present invention further provides a device to be upgraded, where the device to be upgraded includes a memory, a processor, and a wireless upgrade program that is stored in the memory and can be run on the processor, and when the wireless upgrade program is executed by the processor, the steps of the wireless upgrade method according to the above embodiments are implemented.
In addition, an embodiment of the present invention further provides a readable storage medium, where a wireless upgrade program is stored on the readable storage medium, and the wireless upgrade program, when executed by a processor, implements the steps of the wireless upgrade method according to the foregoing embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution 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) as described above and includes instructions for causing a terminal device, a network-enabled apparatus, to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A wireless upgrading method is applied to terminal equipment and comprises the following steps:
acquiring address information of a device to be upgraded, and establishing point-to-point connection with the device to be upgraded according to the address information, wherein the terminal equipment performs full channel scanning based on the address information to determine the device to be upgraded corresponding to the address information, sends a wifi direct connection request to the device to be upgraded according to a scanning result, and establishes point-to-point connection with the device to be upgraded when receiving a connection response sent by the device to be upgraded;
sending an upgrade instruction to the device to be upgraded to enable the device to be upgraded to generate an upgrade package acquisition request according to the upgrade instruction, and sending the upgrade package acquisition request to the terminal equipment, wherein the generation of the upgrade package acquisition request by the device to be upgraded according to the upgrade instruction comprises the following steps: acquiring a current initial position according to an end position in an upgrade package acquisition request generated last time, wherein the current initial position is the initial position of a target file when the upgrade package acquisition request is transmitted for the first time; acquiring a current end position according to the current start position, the data packet capacity in the upgrading instruction and the target file capacity; acquiring the current upgrade package identification according to the upgrade package identification in the upgrade package acquisition request generated last time; generating a current upgrade package acquisition request according to the current starting position, the current ending position and the current upgrade package identification; the upgrading instruction comprises target file capacity, upgrading packet capacity, transmission time interval and waiting response information, and the upgrading packet acquisition request comprises a version identifier of a target upgrading version, and a starting position and an ending position of target data;
receiving an upgrade package acquisition request sent by the device to be upgraded;
and acquiring an upgrade package according to the upgrade package acquisition request, and sending the upgrade package to the device to be upgraded so that the device to be upgraded is upgraded according to the received upgrade package.
2. The wireless upgrade method according to claim 1, wherein the step of acquiring an upgrade package according to the upgrade package acquisition request comprises:
acquiring an upgrade file according to the initial position and the end position in the upgrade package acquisition request;
packaging the upgrade file into an upgrade package;
and adding the upgrade package identification in the upgrade package acquisition request to the upgrade package.
3. The wireless upgrade method according to claim 2, wherein said step of sending upgrade instructions to the device to be upgraded is preceded by the step of:
acquiring a target upgrading version of the device to be upgraded, and generating version confirmation information according to the target upgrading version;
sending the version confirmation information to the device to be upgraded so that the device to be upgraded confirms the target upgrade version;
when version abnormal information sent by the device to be upgraded is received, outputting prompt information of the target upgrading version abnormity;
and when the correct version information sent by the device to be upgraded is received, executing the step of sending an upgrading instruction to the device to be upgraded.
4. The wireless upgrade method according to claim 1, wherein the step of acquiring address information of a device to be upgraded comprises:
acquiring a device identifier of the device to be upgraded through a scanning device or a camera;
generating an address acquisition request of the device to be upgraded according to the device identification, and sending the address acquisition request to a server to acquire address information of the device to be upgraded;
and receiving the address information of the device to be upgraded, which is sent by the server.
5. A wireless upgrading method is applied to a device to be upgraded and comprises the following steps:
when a connection request sent by terminal equipment is received, point-to-point connection is established with the terminal equipment, wherein the connection request is a connection request of wifi direct connection;
receiving an upgrade instruction sent by the terminal device, generating an upgrade package acquisition request according to the upgrade instruction, wherein the generation of the upgrade package acquisition request according to the upgrade instruction comprises the following steps: acquiring a current initial position according to an end position in an upgrade package acquisition request generated last time, wherein the current initial position is the initial position of a target file when the upgrade package acquisition request is transmitted for the first time; acquiring a current ending position according to the current starting position, the data packet capacity in the upgrading instruction and the target file capacity; acquiring the current upgrade package identification according to the upgrade package identification in the upgrade package acquisition request generated last time; generating a current upgrade package acquisition request according to the current starting position, the current ending position and the current upgrade package identification; the upgrading instruction comprises target file capacity, upgrading packet capacity, transmission time interval and waiting response information, and the upgrading packet acquisition request comprises a version identifier of a target upgrading version, and a starting position and an ending position of target data;
sending the upgrade package acquisition request to the terminal equipment to acquire an upgrade package corresponding to the upgrade package acquisition request;
and receiving an upgrade package sent by the terminal equipment, and upgrading according to the upgrade package.
6. The wireless upgrade method according to claim 5, wherein the upgrade package acquisition request includes a start position, an end position, and an upgrade package identifier, and the step of generating the upgrade package acquisition request according to the upgrade instruction includes:
acquiring a current initial position according to an end position in an upgrade package acquisition request generated last time, wherein the current initial position is the initial position of a target file when the upgrade package acquisition request is transmitted for the first time;
acquiring a current ending position according to the current starting position, the data packet capacity in the upgrading instruction and the target file capacity;
acquiring a current upgrade package identifier according to an upgrade package identifier in the upgrade package acquisition request generated last time;
and generating a current upgrading packet obtaining request according to the current starting position, the current ending position and the current upgrading packet identification.
7. The wireless upgrading method of claim 5, wherein the step of receiving the upgrading instruction sent by the terminal device is preceded by:
receiving version confirmation information sent by terminal equipment;
when the target upgrading version in the version confirmation information does not meet the preset condition, sending version abnormal information to the terminal equipment;
and when the target upgrading version in the version confirmation information meets the preset condition, sending version correct information to the terminal equipment.
8. A terminal device, characterized in that the terminal device comprises: memory, a processor and a wireless upgrade program stored on the memory and executable on the processor, the wireless upgrade program when executed by the processor implementing the steps of the wireless upgrade method according to any one of claims 1 to 4.
9. A device to be upgraded, comprising: a memory, a processor and a wireless upgrade program stored on the memory and executable on the processor, the wireless upgrade program when executed by the processor implementing the steps of the wireless upgrade method according to any one of claims 5 to 7.
10. A readable storage medium having a wireless upgrade program stored thereon, which when executed by a processor implements the steps of the wireless upgrade method according to any one of claims 1 to 7.
CN202011221927.XA 2020-11-05 2020-11-05 Wireless upgrading method, terminal equipment, device to be upgraded and medium Active CN112423290B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011221927.XA CN112423290B (en) 2020-11-05 2020-11-05 Wireless upgrading method, terminal equipment, device to be upgraded and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011221927.XA CN112423290B (en) 2020-11-05 2020-11-05 Wireless upgrading method, terminal equipment, device to be upgraded and medium

Publications (2)

Publication Number Publication Date
CN112423290A CN112423290A (en) 2021-02-26
CN112423290B true CN112423290B (en) 2022-10-18

Family

ID=74827994

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011221927.XA Active CN112423290B (en) 2020-11-05 2020-11-05 Wireless upgrading method, terminal equipment, device to be upgraded and medium

Country Status (1)

Country Link
CN (1) CN112423290B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017198015A1 (en) * 2016-05-17 2017-11-23 中兴通讯股份有限公司 Software upgrading method and apparatus
CN111327454A (en) * 2020-01-20 2020-06-23 深圳市广和通无线股份有限公司 File upgrading method and device, computer equipment and storage medium
CN111682965A (en) * 2020-05-25 2020-09-18 青岛海信日立空调系统有限公司 FOTA controller

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103051723B (en) * 2012-12-27 2016-08-31 广州市动景计算机科技有限公司 A kind of method for updating increment and server, terminal
CN105677375A (en) * 2014-11-18 2016-06-15 中兴通讯股份有限公司 Update control device, terminal, terminal update method and system
CN109901853A (en) * 2017-12-07 2019-06-18 飞狐信息技术(天津)有限公司 A kind of upgrade method and equipment, system
CN111314895A (en) * 2020-01-17 2020-06-19 杭州涂鸦信息技术有限公司 Bluetooth-based wireless upgrading method and device, server and electronic equipment
CN111683114A (en) * 2020-04-21 2020-09-18 视联动力信息技术股份有限公司 Method and device for upgrading equipment program, terminal equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017198015A1 (en) * 2016-05-17 2017-11-23 中兴通讯股份有限公司 Software upgrading method and apparatus
CN111327454A (en) * 2020-01-20 2020-06-23 深圳市广和通无线股份有限公司 File upgrading method and device, computer equipment and storage medium
CN111682965A (en) * 2020-05-25 2020-09-18 青岛海信日立空调系统有限公司 FOTA controller

Also Published As

Publication number Publication date
CN112423290A (en) 2021-02-26

Similar Documents

Publication Publication Date Title
CN108345632B (en) Method, device and equipment for calling H5 page and computer readable storage medium
TW472489B (en) Method and system for identifying and downloading appropriate software or firmware specific to a particular model of set-top box in a cable television system
CN107730859B (en) Wireless device pairing method, device and storage medium
CN109345813B (en) Method and device for pairing playing device and Bluetooth remote controller and readable storage medium
US20090209294A1 (en) Transportable type base station device and terminal device
US8810839B2 (en) Information processing apparatus for transferring image data, server apparatus for receiving transferred image data, and control methods and storage media therefor
US10462319B2 (en) Image reading apparatus transmitting device identification information and reading information to push notification server, and method for controlling the image reading apparatus
US11064361B2 (en) Electronic device binding method, electronic device, mobile terminal and server
CN112448873A (en) Equipment binding method and device and computer readable storage medium
US20090138720A1 (en) Method and apparatus for detecting movement of downloadable conditional access system host in dcas network
JP2010200114A (en) Wireless terminal and server
TW480887B (en) Method and system for targeted or universal upgrades of programming in a population of advanced set-top boxes in a cable television system
CN112423290B (en) Wireless upgrading method, terminal equipment, device to be upgraded and medium
CN111061504B (en) Multi-system version matching method, system, server, client and electronic equipment
CN109495798B (en) ONU system upgrading method, device, equipment and computer readable storage medium
CN109861999B (en) Data transmission control method, device and storage medium
CN112738581A (en) Equipment configuration method, smart television, universal remote controller and system
KR20110042617A (en) Display apparatus, system and control method for application programs thereof
CN113098869B (en) Production test method, wireless intelligent device, upper computer, electronic device and medium
KR101206639B1 (en) Server and Method for updating firmware in Mobile communication terminal
CN109885326B (en) Method and device for upgrading auxiliary screen control system and computer readable storage medium
CN114257509A (en) Module upgrading method and device, storage medium and electronic device
CN114722363A (en) Remote locking method, system, device, equipment and computer readable storage medium
CN111586484A (en) Method, device and equipment for upgrading auxiliary screen system of display equipment and storage medium
CN113709088A (en) Data transmission method, device, equipment and storage medium based on wearable equipment

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