Software upgrading method, electronic device and communication system

By periodically transmitting upgrade installation package fragments and interactively verifying information after completion, the problem of long OTA upgrade time for electronic equipment is solved and a more efficient software upgrade process is achieved.

CN116737193BActive Publication Date: 2024-10-18HONOR DEVICE CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202211170971.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-23
Publication Date
2024-10-18
Estimated Expiration
2042-09-23

AI Technical Summary

Technical Problem

When electronic devices are undergoing software upgrades, due to limited hardware conditions, a large amount of data cannot be received and cached at one time, resulting in an OTA upgrade that takes too long, and a handshake response is required after each fragment of the upgrade installation package is received, which increases the interaction time.

Method used

By periodically transmitting each fragment of the upgrade installation package to the second electronic device, and then exchanging verification information after all fragments have been transmitted, interaction time between the electronic device and the server is saved, and software upgrade time is shortened.

Benefits of technology

It effectively shortens the time for software upgrade of electronic equipment, improves the efficiency of OTA upgrade, reduces the number of interactions, and increases the upgrade speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116737193B_ABST
    Figure CN116737193B_ABST
Patent Text Reader

Abstract

The present application discloses a software upgrade method, an electronic device and a communication system, which relate to the field of communication and are used to shorten the time for electronic devices to perform software upgrades. The software upgrade method comprises: a first electronic device receives upgrade indication information from a second electronic device, the upgrade indication information is used to indicate that an upgrade installation package is installed on the second electronic device to perform software upgrade; the first electronic device receives a transmission time interval and a verification waiting time from the second electronic device; the first electronic device sends each fragment of the upgrade installation package to the second electronic device according to the transmission time interval; the first electronic device receives verification information from the second electronic device before the verification waiting time after sending all fragments of the upgrade installation package, and the verification information is used to indicate whether the upgrade installation package is successfully verified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communications, and in particular to a software upgrade method, electronic equipment and a communication system. Background Art

[0002] More and more electronic devices support over the air (OTA) upgrades through mobile phone applications (APP), but some electronic devices have limited hardware conditions and cannot receive and cache large amounts of data at one time. Therefore, when performing OTA upgrades on electronic devices through mobile phone APPs, the mobile phone APP splits the upgrade installation package into multiple fragments and transmits them to the electronic devices one by one.

[0003] However, each time the electronic device receives a fragment of the upgrade installation package, it will perform a handshake response with the mobile phone APP, resulting in a very long upgrade time. Summary of the invention

[0004] Embodiments of the present application provide a software upgrade method, an electronic device, and a communication system, which are used to shorten the time required for performing software upgrades on an electronic device.

[0005] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:

[0006] In a first aspect, a software upgrade method is provided, comprising: a first electronic device receives upgrade indication information from a second electronic device, the upgrade indication information being used to instruct the second electronic device to install an upgrade installation package for software upgrade; the first electronic device receives a transmission time interval and a verification waiting time from the second electronic device; the first electronic device sends each fragment of the upgrade installation package to the second electronic device according to the transmission time interval; and the first electronic device receives verification information from the second electronic device after sending all fragments of the upgrade installation package but before the verification waiting time, the verification information being used to indicate whether the upgrade installation package has been successfully verified.

[0007] In the software upgrade method provided in the embodiment of the present application, a first electronic device periodically transmits each fragment of an upgrade installation package to a second electronic device, and after all the fragments are transmitted, interacts with the second electronic device to determine whether the entire upgrade installation package has been successfully verified, thereby saving the interaction time between the first electronic device and the second electronic device, and further shortening the time for the electronic devices to perform software upgrades.

[0008] In a possible implementation, before the first electronic device receives the upgrade indication information from the second electronic device, the process further includes: the first electronic device sends relevant information of the upgrade installation package to the second electronic device; and the relevant information of the upgrade installation package is used by the second electronic device to determine the upgrade indication information.

[0009] That is, the second electronic device determines whether to perform software upgrade, so that software upgrade can be performed for different electronic devices of the same type.

[0010] In one possible implementation, the relevant information of the upgrade installation package includes the type of the upgrade installation package, the version number of the upgrade installation package, and the size of the upgrade installation package; if the type of the upgrade installation package is the same as the software type of the second electronic device, and the version number of the upgrade installation package is higher than the version number of the software in the second electronic device, and the available storage space of the second electronic device is greater than the size of the upgrade installation package, then the upgrade indication information instructs the upgrade installation package to be installed on the second electronic device for software upgrading.

[0011] In a possible implementation, before the first electronic device sends each fragment of the upgrade installation package to the second electronic device according to the transmission time interval, it also includes: the first electronic device receives a request data duration from the second electronic device; the first electronic device sends an upgrade command to the second electronic device, and before the request data duration, receives the starting address and size of each fragment from the second electronic device; the first electronic device determines each fragment according to the starting address and size of each fragment.

[0012] If the first electronic device does not receive the start addresses and sizes of each segment of the upgrade installation package from the second electronic device before the request data duration, the software upgrade fails.

[0013] In a possible implementation, the method further includes: the first electronic device receives a restart waiting time from the second electronic device; and the first electronic device re-establishes communication with the second electronic device after receiving verification information from the second electronic device and before the restart waiting time.

[0014] For the firmware upgrade, the second electronic device may be restarted. If the second electronic device communicates normally with the first electronic device after the restart, it means that the software upgrade is successful. For the upgrade of some application software, the second electronic device may not be restarted, so this implementation is optional.

[0015] In a second aspect, a software upgrade method is provided, including: a second electronic device sends upgrade indication information to a first electronic device, the upgrade indication information is used to instruct the second electronic device to install an upgrade installation package for software upgrade; the second electronic device sends a transmission time interval and a verification waiting time to the first electronic device; the second electronic device receives each fragment of the upgrade installation package from the first electronic device according to the transmission time interval; the second electronic device verifies the upgrade installation package after receiving all fragments of the upgrade installation package, and before the verification waiting time, sends verification information to the first electronic device, the verification information is used to indicate whether the upgrade installation package has been successfully verified.

[0016] In a possible implementation, before the second electronic device sends the upgrade indication information to the first electronic device, the process further includes: the second electronic device receives relevant information of the upgrade installation package from the first electronic device; and the second electronic device determines the upgrade indication information according to the relevant information of the upgrade installation package.

[0017] In one possible implementation, the relevant information of the upgrade installation package includes the type of the upgrade installation package, the version number of the upgrade installation package, and the size of the upgrade installation package; if the type of the upgrade installation package is the same as the software type of the second electronic device, and the version number of the upgrade installation package is higher than the version number of the software (which may be firmware or application software) in the second electronic device, and the available storage space of the second electronic device is greater than the size of the upgrade installation package, then the upgrade indication information instructs the upgrade installation package to be installed on the second electronic device for software upgrading.

[0018] In a possible implementation, before the first electronic device sends each fragment of the upgrade installation package to the second electronic device according to the transmission time interval, it also includes: the second electronic device sends a request data duration to the first electronic device; the second electronic device receives the upgrade command from the first electronic device, and before requesting the data duration, sends the starting address and size of each fragment to the first electronic device, and the starting address and size of each fragment are used to determine each fragment.

[0019] In a possible implementation, the further step includes: the second electronic device sends a restart waiting time to the first electronic device; and the second electronic device re-establishes communication with the first electronic device after sending verification information to the first electronic device and before the restart waiting time expires.

[0020] According to a third aspect, a first electronic device is provided, comprising a processor and a memory, wherein instructions are stored in the memory, and when the processor executes the instructions, the method described in the first aspect and any embodiment thereof is executed.

[0021] In a fourth aspect, a second electronic device is provided, comprising a processor and a memory, wherein instructions are stored in the memory, and when the processor executes the instructions, the method described in the second aspect and any embodiment thereof is executed.

[0022] In a fifth aspect, a communication system is provided, comprising the first electronic device as described in the third aspect and the second electronic device as described in the fourth aspect, wherein the first electronic device is used to perform software upgrade on the second electronic device.

[0023] In a sixth aspect, a computer-readable storage medium is provided, comprising instructions, which, when executed on an electronic device, enable the electronic device to execute the method as described in the first aspect to the second aspect and any embodiment thereof.

[0024] In a seventh aspect, a computer program product comprising instructions is provided. When the instructions are executed on an electronic device, the electronic device executes the method as described in the first aspect to the second aspect and any embodiment thereof.

[0025] In an eighth aspect, a chip system is provided, the chip system including a processor for supporting an electronic device to implement the functions involved in the first aspect to the second aspect and any of the embodiments thereof. In a possible design, the device also includes an interface circuit, which can be used to receive signals from other devices (such as a memory) or send signals to other devices (such as a communication interface). The chip system may include a chip and may also include other discrete devices.

[0026] The technical effects of the second to eighth aspects refer to the technical effects of the first aspect and any of its embodiments, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 A schematic diagram of the architecture of a communication system provided in an embodiment of the present application;

[0028] Figure 2 A schematic diagram of the structure of a first electronic device provided in an embodiment of the present application;

[0029] Figure 3 A schematic diagram of a software architecture running on a first electronic device provided in an embodiment of the present application;

[0030] Figure 4 A schematic diagram of the structure of a second electronic device provided in an embodiment of the present application;

[0031] Figure 5 A flowchart of a software upgrade method provided in an embodiment of the present application;

[0032] Figure 6 A schematic diagram for indicating a successful software upgrade provided in an embodiment of the present application;

[0033] Figure 7 A schematic diagram of the structure of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0034] First, some concepts involved in this application are described.

[0035] The terms "first", "second", etc. involved in the embodiments of the present application are only used to distinguish features of the same type and cannot be understood as indicating relative importance, quantity, order, etc.

[0036] The terms "exemplary" or "for example" and the like in the embodiments of the present application are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the terms "exemplary" or "for example" is intended to present the related concepts in a specific way.

[0037] The terms "coupling" and "connection" involved in the embodiments of the present application should be understood in a broad sense. For example, they may refer to a direct physical connection, or an indirect connection achieved through electronic devices, such as a connection achieved through resistors, inductors, capacitors or other electronic devices.

[0038] like Figure 1 As shown, an embodiment of the present application provides a communication system, including: a first electronic device 101, a second electronic device 102 and a server 103. The first electronic device 101 is used to obtain an upgrade installation package from the server 103, and split it into multiple fragments and send it to the second electronic device 102, so as to implement OTA upgrade of the second electronic device 102. The first electronic device 101 and the second electronic device 102 can communicate via Bluetooth mesh. The first electronic device 101 and the server 103 can communicate via the Internet.

[0039] The server 103 is used to store the upgrade installation package. When the software version of the second electronic device 102 needs to be updated, the manufacturer of the second electronic device 102 stores the upgrade installation package on the server 103 for the first electronic device 101 to download and then transmit to the second electronic device 102 via OTA.

[0040] The first electronic device 101 can be a device with a communication function, and the first electronic device 101 can be mobile or fixed. The first electronic device 101 can be deployed on land (for example, indoors or outdoors, handheld or vehicle-mounted, etc.), on the water (for example, a ship, etc.), or in the air (for example, an airplane, a balloon, and a satellite, etc.). The first electronic device 101 can be called user equipment (UE), an access terminal, a terminal unit, a subscriber unit, a terminal station, a mobile station (MS), a mobile station, a terminal agent, or a terminal device, etc. For example, the electronic device can be a mobile phone, a tablet computer, a laptop computer, etc. The embodiments of the present application do not limit the specific type and structure of the electronic device. A possible structure of the electronic device is described below.

[0041] Taking the first electronic device as a mobile phone as an example, Figure 21 shows a possible structure of the first electronic device 101. The first electronic device 101 may include a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a power management module 240, a battery 241, a wireless charging coil 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, a sensor module 280, a button 290, a motor 291, an indicator 292, a camera 293, a display screen 294, and a subscriber identification module (SIM) card interface 295.

[0042] Among them, the sensor module 280 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.

[0043] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the first electronic device 101. In other embodiments of the present application, the first electronic device 101 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0044] The processor 210 may include one or more processing units, for example, the processor 210 may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processing unit (CPU), an application processor (AP), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a baseband processor, and a neural network processor (NPU). Among them, different processing units may be independent devices or integrated into one or more processors. For example, the processor 210 may be an application processor AP. Alternatively, the above-mentioned processor 210 may be integrated in a system on chip (SoC). Alternatively, the above-mentioned processor 210 may be integrated in an integrated circuit (IC) chip. The processor 210 may include an analog front end (AFE) and a micro-controller unit (MCU) in an IC chip.

[0045] The controller may be the nerve center and command center of the first electronic device 101. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0046] The processor 210 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory may store instructions or data that the processor 210 has just used or cyclically used. If the processor 210 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 210, and thus improves the efficiency of the system.

[0047] In some embodiments, the processor 210 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a USB interface, etc.

[0048] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the first electronic device 101. In other embodiments of the present application, the first electronic device 101 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0049] The power management module 240 is used to receive charging input from a charger. The charger may be a wireless charger (such as a wireless charging base of the first electronic device 101 or other device that can wirelessly charge the first electronic device 101), or a wired charger. For example, the power management module 240 may receive charging input from a wired charger through the USB interface 230. The power management module 240 may receive wireless charging input through the wireless charging coil 242 of the electronic device.

[0050] The power management module 240 can charge the battery 241 and also power the electronic device. The power management module 240 receives input from the battery 241 and powers the processor 210, the internal memory 221, the external memory interface 220, the display screen 294, the camera 293, and the wireless communication module 260. The power management module 240 can also be used to monitor parameters such as the battery capacity, the number of battery cycles, and the battery health status (leakage, impedance) of the battery 241. In some other embodiments, the power management module 240 can also be set in the processor 210.

[0051] The wireless communication function of the first electronic device 101 can be implemented through the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, the modem processor, the baseband processor, and the like.

[0052] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the first electronic device 101 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0053] The mobile communication module 250 may provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the first electronic device 101. The wireless communication module 260 may provide solutions for wireless communications including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., applied to the first electronic device 101. In some embodiments, the antenna 1 of the first electronic device 101 is coupled to the mobile communication module 250, and the antenna 2 is coupled to the wireless communication module 260, so that the first electronic device 101 can communicate with the network and other devices through wireless communication technology.

[0054] The first electronic device 101 implements the display function through a GPU, a display screen 294, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 294 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 210 may include one or more GPUs that execute program instructions to generate or change display information.

[0055] The display screen 294 is used to display images, videos, etc. The display screen 294 includes a display panel. In some embodiments, the first electronic device 101 may include 1 or N display screens 294, where N is a positive integer greater than 1.

[0056] The first electronic device 101 can implement a shooting function through an ISP, a camera 293, a video codec, a GPU, a display screen 294, and an application processor. The ISP is used to process data fed back by the camera 293. In some embodiments, the ISP can be set in the camera 293. The camera 293 is used to capture a static image or a video. In some embodiments, the first electronic device 101 may include 1 or N cameras 293, where N is a positive integer greater than 1. Exemplarily, the camera of the embodiment of the present application includes a wide-angle camera and a main camera.

[0057] The external memory interface 220 can be used to connect an external memory card, such as a micro SanDisk (Micro SD) card, to expand the storage capacity of the first electronic device 101. The external memory card communicates with the processor 210 through the external memory interface 220 to implement a data storage function. For example, files such as music and videos are stored in the external memory card.

[0058] The internal memory 221 may be used to store computer executable program codes, which include instructions. The processor 210 executes various functional applications and data processing of the first electronic device 101 by running the instructions stored in the internal memory 221. In addition, the internal memory 221 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0059] The memory involved in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0060] The first electronic device 101 can implement audio functions such as music playing and recording through the audio module 270, the speaker 270A, the receiver 270B, the microphone 270C, the earphone interface 270D and the application processor.

[0061] The audio module 270 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal. In some embodiments, the audio module 270 can be arranged in the processor 210, or some functional modules of the audio module 270 can be arranged in the processor 210. The speaker 270A, also known as the "speaker", is used to convert the audio electrical signal into a sound signal. The receiver 270B, also known as the "earpiece", is used to convert the audio electrical signal into a sound signal. The microphone 270C, also known as the "microphone", "microphone", is used to convert the sound signal into an electrical signal. The first electronic device 101 can be provided with at least one microphone 270C. The headphone interface 270D is used to connect a wired headset. The headphone interface 270D can be a USB interface 230, or it can be a 3.5mm open mobile terminal platform (open mobile terminal platform, OMTP) standard interface, the cellular telecommunications industry association of the USA (cellular telecommunications industry association of theUSA, CTIA) standard interface.

[0062] The button 290 includes a power button, a volume button, etc. The button 290 may be a mechanical button. It may also be a touch button. The first electronic device 101 may receive a button input and generate a key signal input related to the user settings and function control of the first electronic device 101. The motor 291 may generate a vibration prompt. The motor 291 may be used for an incoming call vibration prompt or for touch vibration feedback. The indicator 292 may be an indicator light, which may be used to indicate the charging status, power changes, messages, missed calls, notifications, etc. The SIM card interface 295 is used to connect a SIM card. The SIM card may be inserted into the SIM card interface 295 or pulled out from the SIM card interface 295 to achieve contact and separation with the first electronic device 101. The first electronic device 101 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 295 may support a Nano SIM card, a Micro SIM card, a SIM card, etc. In some embodiments, the first electronic device 101 uses an embedded SIM (eSIM) card. The eSIM card can be embedded in the first electronic device 101 and cannot be separated from the first electronic device 101.

[0063] The processor 210 executes the software upgrade method provided in the embodiment of the present application by executing the programs and instructions stored in the internal memory 221. The program run by the processor 210 can be based on an operating system, such as Windows operating system, etc. Figure 3As shown, the program executed by the processor 210 is based on For example, the programs run by the processor 210 are layered according to their functions, and may include an application layer, a framework layer, a local layer, a kernel layer, and a driver layer.

[0064] The application layer may include an upgrade program, and the upgrade program is used to obtain an upgrade installation package from the server 103 and transmit it to the second electronic device 102, so as to implement OTA upgrade of the second electronic device 102.

[0065] The framework layer is used to provide APIs and system resource services to applications in the application layer, such as providing communication APIs to upgrade programs.

[0066] The local layer can provide a static link library or a dynamic link library for the application programming interface (API) of the framework layer to call, for example, providing a static link library or a dynamic link library to the communication API in the framework layer.

[0067] The kernel layer includes the operating system (OS) kernel, which is used to manage the system's processes, memory, drivers, file systems, and network systems.

[0068] The driver layer is used to drive the hardware resources of the hardware layer. The driver layer may include a wireless communication driver, which is used to drive a Bluetooth communication circuit, a Wi-Fi communication circuit, a mobile communication circuit, and the like.

[0069] The second electronic device 102 may be a terminal device with simpler functions and configurations than the first electronic device 101. For example, the second electronic device 102 may be a smart bracelet, a smart watch, a headset, a smart speaker, a virtual reality (VR) device, an augmented reality (AR) device, a terminal in industrial control, a terminal in self-driving, a terminal in remote medical, a terminal in smart grid, a terminal in transportation safety, a terminal in smart city, a terminal in smart home, etc. In particular, the second electronic device 102 may be a Bluetooth low energy (BLE) device.

[0070] like Figure 4As shown, the second electronic device 102 may include a processor 401, a memory 402, and a communication interface 403. The processor 401 executes the software upgrade method provided in the embodiment of the present application by executing the program and instructions stored in the memory 402. The communication interface 403 uses any transceiver-like device for communicating with other devices, such as performing Bluetooth communication.

[0071] After the first electronic device 101 splits the upgrade installation package into multiple fragments and sends them to the second electronic device 102, the second electronic device 102 will verify the fragment after each transmission, and the first electronic device 101 will interact with the second electronic device 102 to confirm that the fragment is transmitted correctly. When the number of fragments is large, the transmission time of the upgrade installation package will be longer, which will cause the entire software upgrade process to take a longer time.

[0072] To this end, an embodiment of the present application provides a software upgrade method, wherein the second electronic device 102 verifies the entire upgrade installation package after all fragments of the upgrade installation package are transmitted, and after each intermediate fragment is transmitted, the first electronic device 101 will not interact with the second electronic device 102, and the first electronic device 101 will not interact with the second electronic device 102 until the last fragment is transmitted, thereby saving the interaction time between the first electronic device 101 and the second electronic device 102, and thereby shortening the time for electronic devices to perform software upgrades.

[0073] Specifically, Figure 5 As shown, the software upgrade method includes:

[0074] S101 . The first electronic device 101 sends relevant information of an upgrade installation package to the second electronic device 102 .

[0075] The first electronic device 101 (e.g., the management APP of the second electronic device 102 running in the first electronic device 101) can obtain first relevant information of the upgrade installation package from the server 103, including information such as the type of the upgrade installation package, the version number of the upgrade installation package, the size of the upgrade installation package, and the uniform resource locator (URL) download address of the upgrade installation package. The first electronic device 101 sends second relevant information of the upgrade installation package to the second electronic device 102 (e.g., through Bluetooth communication), including information such as the type of the upgrade installation package, the version number of the upgrade installation package, and the size of the upgrade installation package.

[0076] The type of the upgrade installation package may refer to the upgrade installation package being firmware (ie, solidified software, generally system software) or application software in the second electronic device 102. The present application does not limit the type of the upgrade installation package.

[0077] S102 . The second electronic device 102 determines upgrade instruction information according to relevant information of the upgrade installation package, and sends the information to the first electronic device 101 .

[0078] The second electronic device 102 determines whether the software version of the second electronic device 102 is updated according to the second related information of the upgrade installation package, and then determines the upgrade indication information, which is used to instruct the second electronic device 102 to install the upgrade installation package for software upgrade.

[0079] Specifically, if the type of the upgrade installation package is the same as the software type of the second electronic device 102, and the version number of the upgrade installation package is higher than the version number of the software (which may be firmware or application software) in the second electronic device 102, and the available storage space of the second electronic device 102 is larger than the size of the upgrade installation package, then the second electronic device 102 can determine to perform a software upgrade (i.e., the upgrade indication information indicates to install the upgrade installation package on the second electronic device 102 for software upgrade), otherwise the second electronic device 102 can determine not to perform a software upgrade (i.e., the upgrade indication information indicates not to install the upgrade installation package on the second electronic device 102).

[0080] Exemplarily, assuming that the type of the upgrade installation package and the software in the second electronic device 102 are both firmware, and the version number of the upgrade installation package is higher than the version number of the firmware in the second electronic device 102, and the available storage space of the second electronic device 102 is greater than the size of the upgrade installation package, the second electronic device 102 can determine to perform a software upgrade on the firmware.

[0081] S103: If the upgrade instruction information indicates to install the upgrade installation package on the second electronic device 102 to perform software upgrade, the first electronic device 101 obtains the upgrade installation package and negotiates with the second electronic device 102 about transmission parameters of the upgrade installation package.

[0082] The first electronic device can obtain the upgrade installation package from the server 103 through the network interface according to the URL download address. Alternatively, the first electronic device 101 can also obtain the upgrade installation package from other devices (such as a computer) through a wired communication interface (such as a USB interface). This application does not limit the way in which the first electronic device 101 obtains the upgrade installation package.

[0083] The first electronic device 101 sends a negotiation parameter command to the second electronic device 102, and the negotiation parameter command is used to instruct the second electronic device 102 to negotiate the transmission parameters of the upgrade installation package with the first electronic device 101, and the second electronic device 102 sends the transmission parameters of the upgrade installation package to the first electronic device 101. The transmission parameters of the upgrade installation package include but are not limited to: transmission time interval, verification waiting time, request data time, restart waiting time, etc. The role of these parameters is described in detail below.

[0084] S104: The first electronic device 101 sends an upgrade command to the second electronic device 102.

[0085] S105 . In response to the upgrade command, before requesting the data duration, the second electronic device 102 sends the start address and size of each fragment of the upgrade installation package to the first electronic device 101 .

[0086] Accordingly, the first electronic device 101 receives the starting addresses and sizes of each fragment of the upgrade installation package from the second electronic device 102 before requesting the data duration, and determines each fragment according to the starting addresses and sizes of each fragment. If the first electronic device 101 does not receive the starting addresses and sizes of each fragment of the upgrade installation package from the second electronic device 102 before requesting the data duration, the software upgrade fails.

[0087] It should be noted that the second electronic device 102 may divide the upgrade installation package into segments in an equal or unequal manner, which is not limited in this application.

[0088] S106: The first electronic device 101 sends each fragment of the upgrade installation package to the second electronic device 102 according to the transmission time interval.

[0089] Accordingly, the second electronic device 102 receives each fragment of the upgrade installation package from the first electronic device 101 according to the transmission time interval. That is, the first electronic device 101 does not need to wait for the second electronic device 102 to confirm each time it transmits a fragment, and can transmit the next fragment according to the transmission time interval until all the fragments of the upgrade installation package are transmitted. In this way, the interaction time between the first electronic device 101 and the second electronic device 102 can be reduced each time a fragment is transmitted. When the number of fragments is large, more interaction time is saved.

[0090] S107 . After receiving all the fragments of the upgrade installation package, the second electronic device 102 verifies the upgrade installation package and sends verification information to the first electronic device 101 .

[0091] The verification information is used to indicate whether the upgrade installation package has been successfully verified, that is, whether the upgrade installation package has been transmitted correctly.

[0092] If the first electronic device 101 receives verification information from the second electronic device 102 before the verification waiting time after sending all fragments of the upgrade installation package, it can be determined that the upgrade installation package is successfully transmitted; otherwise, it can be determined that the upgrade installation package is failed to be transmitted.

[0093] S108 . After installing the upgrade installation package, the second electronic device 102 may be restarted, and after restarting, communication with the first electronic device 101 may be reestablished.

[0094] The first electronic device 101 can discover the second electronic device 102 through near field communication. If the first electronic device 101 re-establishes communication with the second electronic device 102 after receiving verification information from the second electronic device 102 and before the restart waiting time, it can be determined that the software upgrade is successful. Otherwise, it can be determined that the software upgrade has failed.

[0095] It should be noted that the firmware upgrade may cause the second electronic device 102 to restart. If the second electronic device 102 communicates normally with the first electronic device 101 after the restart, it means that the software upgrade is successful. For the upgrade of some application software, the second electronic device 102 may not restart, so step S108 is optional.

[0096] It should also be noted that in any of the above steps S101-S108, if any abnormality occurs during the software upgrade process of the first electronic device 101, a termination upgrade command can be actively sent to the second electronic device 102 to terminate the software upgrade process. Alternatively, if any abnormality occurs during the software upgrade process of the second electronic device 102, the first electronic device 101 can also be actively notified to terminate the software upgrade process.

[0097] like Figure 6 As shown, after the first electronic device 101 determines that the software of the second electronic device 102 is successfully upgraded, a dialog box may pop up to indicate that the software of the second electronic device 102 is successfully upgraded.

[0098] The software upgrade method, electronic device and communication system provided in the embodiments of the present application, the first electronic device periodically transmits each fragment of the upgrade installation package to the second electronic device, and after all the fragments are transmitted, interacts with the second electronic device to determine whether the entire upgrade installation package has been successfully verified, thereby saving the interaction time between the first electronic device and the second electronic device, and further shortening the time for the electronic device to perform software upgrades.

[0099] like Figure 7As shown, the embodiment of the present application also provides a chip system. The chip system 60 includes at least one processor 601 and at least one interface circuit 602. The at least one processor 601 and the at least one interface circuit 602 can be interconnected through a line. The processor 601 is used to support the electronic device to implement each step in the above method embodiment, such as Figure 5 In the method shown, at least one interface circuit 602 may be used to receive signals from other devices (eg, memory) or to send signals to other devices (eg, communication interface). The chip system may include a chip and may also include other discrete devices.

[0100] The present application also provides a computer-readable storage medium, which includes instructions. When the instructions are executed on the electronic device, the electronic device executes each step in the method embodiment, such as executing Figure 5 The method shown.

[0101] The present application also provides a computer program product including instructions. When the instructions are executed on the electronic device, the electronic device executes each step in the method embodiment, such as executing Figure 5 The method shown.

[0102] Regarding the technical effects of the chip system, computer-readable storage medium, and computer program product, refer to the technical effects of the previous method embodiments.

[0103] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0104] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0105] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0106] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0107] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one device or distributed on multiple devices. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0108] In addition, each functional module in each embodiment of the present application may be integrated into one device, or each module may exist physically separately, or two or more modules may be integrated into one device.

[0109] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing a computer program instruction on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or may contain one or more servers, data centers and other data storage devices that can be integrated with a medium. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).

[0110] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A software upgrade method, characterized in that: include: The first electronic device receives upgrade instruction information from the second electronic device, where the upgrade instruction information is used to instruct the second electronic device to install an upgrade installation package to perform software upgrade; The first electronic device receives the request data duration, the restart waiting duration, the transmission time interval and the verification waiting duration from the second electronic device; The first electronic device sends an upgrade command to the second electronic device, and receives the starting address and size of each fragment of the upgrade installation package from the second electronic device before the request data duration; if the first electronic device does not receive the starting address and size of each fragment of the upgrade installation package from the second electronic device before the request data duration, it is determined that the software upgrade fails; The first electronic device sends each fragment of the upgrade installation package to the second electronic device at the transmission time interval; wherein the first electronic device does not wait for confirmation from the second electronic device after transmitting each fragment; After the first electronic device has sent all the fragments of the upgrade installation package, if the first electronic device receives verification information from the second electronic device before the verification waiting time, it is determined that the upgrade installation package is successfully transmitted; otherwise, it is determined that the upgrade installation package fails to be transmitted, and the verification information is used to indicate whether the upgrade installation package is successfully verified; After receiving the verification information from the second electronic device, the first electronic device waits for the second electronic device to restart, and if communication with the second electronic device is reestablished before the restart waiting time, it is determined that the software upgrade is successful, and a dialog box is popped up to indicate that the software upgrade of the second electronic device is successful, otherwise it is determined that the software upgrade fails; If an abnormality occurs during the software upgrade process, a termination upgrade command is sent to the second electronic device to terminate the software upgrade process.

2. The method according to claim 1, characterized in that Before the first electronic device receives the upgrade instruction information from the second electronic device, the method further includes: The first electronic device sends the relevant information of the upgrade installation package to the second electronic device; the relevant information of the upgrade installation package is used by the second electronic device to determine the upgrade indication information.

3. The method according to claim 2, characterized in that The relevant information of the upgrade installation package includes the type of the upgrade installation package, the version number of the upgrade installation package, and the size of the upgrade installation package; If the type of the upgrade installation package is the same as the software type of the second electronic device, and the version number of the upgrade installation package is higher than the version number of the software in the second electronic device, and the available storage space of the second electronic device is larger than the size of the upgrade installation package, then the upgrade indication information indicates to install the upgrade installation package on the second electronic device for software upgrade.

4. A software upgrade method, characterized in that: include: The second electronic device sends upgrade instruction information to the first electronic device, where the upgrade instruction information is used to instruct the second electronic device to install an upgrade installation package to perform software upgrade; The second electronic device sends the request data duration, the restart waiting duration, the transmission time interval and the verification waiting duration to the first electronic device; The second electronic device receives the upgrade command from the first electronic device, and sends the starting address and size of each fragment of the upgrade installation package to the first electronic device before the request data duration; if the second electronic device does not send the starting address and size of each fragment of the upgrade installation package to the first electronic device before the request data duration, it is determined that the software upgrade fails; The second electronic device receives each fragment of the upgrade installation package from the first electronic device at the transmission time interval; wherein the second electronic device does not send a confirmation to the first electronic device each time it receives a fragment; The second electronic device verifies the upgrade installation package after receiving all the fragments of the upgrade installation package, and if verification information is sent to the first electronic device before the verification waiting time, it is determined that the upgrade installation package is successfully transmitted; otherwise, it is determined that the upgrade installation package fails to be transmitted, and the verification information is used to indicate whether the upgrade installation package is successfully verified; The second electronic device is restarted after installing the upgrade installation package, and after sending the verification information to the first electronic device, if communication with the first electronic device is reestablished before the restart waiting time, it is determined that the software upgrade is successful, otherwise it is determined that the software upgrade fails; If an abnormality occurs during the software upgrade process, the first electronic device is notified to terminate the software upgrade process.

5. The method according to claim 4, characterized in that Before the second electronic device sends the upgrade instruction information to the first electronic device, the method further includes: The second electronic device receives the relevant information of the upgrade installation package from the first electronic device; The second electronic device determines the upgrade instruction information according to the relevant information of the upgrade installation package.

6. The method according to claim 5, characterized in that The relevant information of the upgrade installation package includes the type of the upgrade installation package, the version number of the upgrade installation package, and the size of the upgrade installation package; If the type of the upgrade installation package is the same as the software type of the second electronic device, and the version number of the upgrade installation package is higher than the version number of the software in the second electronic device, and the available storage space of the second electronic device is larger than the size of the upgrade installation package, then the upgrade indication information indicates to install the upgrade installation package on the second electronic device for software upgrade.

7. A first electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores instructions, and when the processor executes the instructions, the method according to any one of claims 1 to 3 is executed.

8. A second electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores instructions, and when the processor executes the instructions, the method according to any one of claims 4 to 6 is executed.

9. A communication system, characterized in that: The device comprises the first electronic device as claimed in claim 7 and the second electronic device as claimed in claim 8, wherein the first electronic device is used to perform software upgrade on the second electronic device.

10. A computer-readable storage medium, characterized in that: The method comprises instructions, which, when executed on an electronic device, cause the electronic device to execute the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Remote upgrade method and system

    CN107770279A

  • Firmware upgrading method, device and system of Internet of Things equipment and storage medium

    CN111510323A

  • Data processing method and device and storage medium

    CN113157300A

  • Sensor application program upgrading method and device, computer equipment and storage medium

    CN113986293A