CN111865646A - Terminal upgrading method and related device - Google Patents

Terminal upgrading method and related device Download PDF

Info

Publication number
CN111865646A
CN111865646A CN201911399054.9A CN201911399054A CN111865646A CN 111865646 A CN111865646 A CN 111865646A CN 201911399054 A CN201911399054 A CN 201911399054A CN 111865646 A CN111865646 A CN 111865646A
Authority
CN
China
Prior art keywords
terminal
firmware
current
difference
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.)
Pending
Application number
CN201911399054.9A
Other languages
Chinese (zh)
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.)
Beijing Qisheng Technology Co Ltd
Original Assignee
Beijing Qisheng Technology 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 Beijing Qisheng Technology Co Ltd filed Critical Beijing Qisheng Technology Co Ltd
Priority to CN201911399054.9A priority Critical patent/CN111865646A/en
Publication of CN111865646A publication Critical patent/CN111865646A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Landscapes

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

Abstract

The invention provides a terminal upgrading method and a related device, and relates to the field of firmware upgrading. The terminal upgrading method is applied to a terminal, the terminal is in communication connection with a cloud, and the terminal upgrading method comprises the following steps: acquiring a difference upgrade package of a target firmware; the difference upgrading packet is generated by the cloud according to the current firmware and the target firmware of the terminal; judging whether the difference upgrading packet is matched with the hardware information of the terminal; and if so, upgrading the current firmware into the target firmware according to the difference upgrading package. According to the terminal upgrading method provided by the invention, by using the difference upgrading package of the original firmware and the target firmware, the terminal only needs to download the difference upgrading package without downloading the whole package of the target firmware, so that the data downloading amount required by firmware upgrading is greatly reduced; by comparing the difference upgrading packet with the hardware information of the terminal, the upgrading of a certain firmware of the terminal to a wrong manufacturer and a wrong hardware model is avoided, and the upgrading accuracy of the firmware is improved.

Description

Terminal upgrading method and related device
Technical Field
The invention relates to the field of firmware upgrading, in particular to a terminal upgrading method and a related device.
Background
In the using process of the terminal, a plurality of problems occur, wherein the problem related to the firmware has the greatest influence on the operation condition of the terminal, and the firmware of the terminal needs to be upgraded in order to solve the existing loophole or compatibility problem or improve the operation mode of the terminal so as to provide more convenient and humanized functions.
Each terminal has its own vendor and hardware model for different terminals, and if a certain firmware of the terminal is upgraded to the wrong vendor and hardware model, the terminal will have a condition of changing into a 'brick'. The Over-the-Air (FOTA) upgrading of mobile terminals is a common technical scheme for Firmware upgrading at present, but the upgrading packages of FOTA are all complete packages, generally speaking, one Firmware upgrading package is from several Megabytes (MB) to tens of MB, and the situation that the network condition of a terminal is poor or the electric quantity is small is solved; the firmware upgrade package of the FOTA occupies a large storage area, so that the download failure of the firmware upgrade package can often occur, and the firmware upgrade failure of the terminal is caused.
Disclosure of Invention
In view of the above, the present invention provides a terminal upgrading method and a related apparatus. In order to achieve the purpose, the technical scheme adopted by the invention is as follows:
In a first aspect, the present invention provides a terminal upgrading method, applied to a terminal, where the terminal is in communication connection with a cloud, and the method includes: acquiring a difference upgrade package of a target firmware; the difference upgrading packet is generated by the cloud according to the current firmware and the target firmware of the terminal; judging whether the difference upgrading packet is matched with the hardware information of the terminal; and if so, upgrading the current firmware into the target firmware according to the difference upgrading package.
In an optional embodiment, the obtaining the difference upgrade package of the target firmware includes: downloading the difference upgrading package from the cloud, and marking a current downloading point of the difference upgrading package and a current saving point of the terminal; the current downloading point is used for confirming the downloading condition of the difference upgrading packet at the cloud end; the current saving point is used for confirming the file saving condition of the difference upgrading packet at the terminal; judging whether the current downloading point is the downloading end point of the terminal or not; if yes, judging whether the current storage point is a storage end point of the terminal; and if so, determining that the difference upgrading packet is successfully obtained.
In an optional embodiment, when the current download point is not the download end point, the obtaining a differential upgrade package of the target firmware further includes: saving the current download point; and when a continuous downloading request of the user is received, continuously downloading the difference upgrading package from the current downloading point.
In an optional embodiment, when the current saving point is not the saving end point, the obtaining a differential upgrade package of the target firmware further includes: and sending download failure information to the cloud.
In an optional embodiment, upgrading the current firmware to the target firmware according to the difference upgrade package includes: acquiring the data offset of the current firmware; the data offset represents a unit to be upgraded of the current firmware; and adding the difference upgrading packet to a unit to be upgraded corresponding to the data offset so as to upgrade the current firmware into the target firmware.
In an optional implementation manner, when the difference upgrade package does not match the data offset, the upgrading the current firmware to the target firmware according to the difference upgrade package further includes: and sending upgrading failure information to the cloud.
In an optional embodiment, when the difference upgrade package does not match the hardware information of the terminal, the method further includes: and sending verification failure information to the cloud.
In a second aspect, the present invention provides a terminal upgrading method, applied to a cloud, where the cloud is in communication connection with a terminal, and the method includes: when a firmware upgrading request of the terminal is received, judging whether hardware information of the terminal is matched with a difference upgrading packet of a target firmware; if so, judging whether the current state of the terminal is a state to be upgraded; and if so, sending the difference upgrade package to the terminal so that the terminal upgrades the current firmware of the terminal to the target firmware according to the difference upgrade package.
In an optional embodiment, before the determining, when the firmware upgrade request of the terminal is received, whether the hardware information of the terminal matches a differential upgrade package of a target firmware, the method further includes: acquiring the difference upgrade package according to the current firmware and the target firmware; the difference upgrading packet comprises version information of the current firmware and hardware information of the terminal.
In an optional implementation manner, the sending the difference upgrade package to the terminal includes: sending the difference upgrading packet to the terminal, and marking the current downloading point of the difference upgrading packet; the current downloading point is used for confirming the downloading condition of the difference upgrading packet at the cloud end; if the current downloading point is the downloading end point of the terminal, determining that the difference upgrading packet is successfully sent; and if the current downloading point is not the downloading end point of the terminal, receiving downloading failure information sent by the terminal.
In an optional embodiment, when the hardware information of the terminal does not match the difference upgrade package, the method further includes: and receiving the verification failure information sent by the terminal.
In an optional embodiment, when the difference upgrade package does not match the data offset of the target firmware, the data offset characterizes a unit to be upgraded of the current firmware, and the method further includes: and receiving upgrade failure information sent by the terminal.
In a third aspect, the present invention provides a terminal, where the terminal is connected to a cloud in a communication manner, and the terminal includes: the device comprises a first communication module, a first judgment module and a first execution module. The first communication module is used for acquiring a difference upgrade package of the target firmware; the difference upgrading packet is generated by the cloud according to the current firmware and the target firmware of the terminal; the first judging module is used for judging whether the difference upgrading packet is matched with the hardware information of the terminal; and the first execution module is used for upgrading the current firmware into the target firmware according to the difference upgrade package when the difference upgrade package is matched with the hardware information of the terminal.
In an optional embodiment, the first communication module is further configured to download the difference upgrade package from the cloud, and mark a current download point of the difference upgrade package and a current save point of the terminal; the current downloading point is used for confirming the downloading condition of the difference upgrading packet at the cloud end; and the current saving point is used for confirming the file saving condition of the difference upgrading packet at the terminal. The first judging module is further configured to judge whether the current download point is a download end point of the terminal; the first judging module is further configured to judge whether the current saving point is the saving end point of the terminal if the current downloading point is the downloading end point; the first execution module is further configured to determine that the difference upgrade package is successfully acquired if the current saving point is the saving end point.
In an optional embodiment, when the current download point is not the download end point, the first execution module is further configured to save the current download point; and the first communication module is also used for continuously downloading the difference upgrading package from the current downloading point when a continuous downloading request of a user is received.
In an optional implementation manner, when the current saving point is not the saving end point, the first communication module is further configured to send a download failure message to the cloud.
In an optional embodiment, the first execution module is further configured to obtain a data offset of the current firmware; the data offset represents a unit to be upgraded of the current firmware; the first execution module is further configured to add the difference upgrade package to a unit to be upgraded corresponding to the data offset, so as to upgrade the current firmware to the target firmware.
In an optional embodiment, when the difference upgrade package does not match the data offset, the first communication module is further configured to send upgrade failure information to the cloud.
In an optional implementation manner, when the difference upgrade package does not match the hardware information of the terminal, the first communication module is further configured to send verification failure information to the cloud.
In a fourth aspect, the present invention provides a cloud, where the cloud is connected to a terminal in a communication manner, and the cloud includes: the device comprises a second communication module and a second judgment module. The second communication module is used for judging whether the hardware information of the terminal is matched with the difference upgrade package of the target firmware or not when the firmware upgrade request of the terminal is received; the second judging module is used for judging whether the current state of the terminal is a state to be upgraded or not if the hardware information of the terminal is matched with the difference upgrading packet; and the second communication module is also used for sending the difference upgrading packet to the terminal if the current state of the terminal is the state to be upgraded, so that the terminal upgrades the current firmware of the terminal to the target firmware according to the difference upgrading packet.
In an alternative embodiment, the method further comprises: a second execution module; the second execution module is configured to obtain the difference upgrade package according to the current firmware and the target firmware; the difference upgrading packet comprises version information of the current firmware and hardware information of the terminal.
In an alternative embodiment, the method further comprises: a second execution module; the second communication module is further configured to send the difference upgrade package to the terminal, and mark a current download point of the difference upgrade package; the current downloading point is used for confirming the downloading condition of the difference upgrading packet at the cloud end; the second execution module is configured to determine that the difference upgrade package is successfully sent if the current download point is a download end point of the terminal; the second communication module is further configured to receive download failure information sent by the terminal if the current download point is not the download end point of the terminal.
In an optional implementation manner, when the hardware information of the terminal does not match the difference upgrade package, the second communication module is further configured to receive verification failure information sent by the terminal.
In an optional implementation manner, when the difference upgrade package does not match the data offset of the target firmware, the data offset represents a unit to be upgraded of the current firmware, and the second communication module is further configured to receive upgrade failure information sent by the terminal.
In a fifth aspect, the present invention provides an electronic device comprising a processor and a memory, the memory storing machine executable instructions executable by the processor to implement the method of any one of the preceding embodiments.
In a sixth aspect, the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of any of the preceding embodiments.
Compared with the prior art, the invention provides a terminal upgrading method and a related device, and relates to the field of firmware upgrading. The terminal upgrading method is applied to a terminal, the terminal is in communication connection with a cloud, and the terminal upgrading method comprises the following steps: acquiring a difference upgrade package of a target firmware; the difference upgrading packet is generated by the cloud according to the current firmware and the target firmware of the terminal; judging whether the difference upgrading packet is matched with the hardware information of the terminal; and if so, upgrading the current firmware into the target firmware according to the difference upgrading package. According to the terminal upgrading method provided by the invention, by using the difference upgrading package of the original firmware and the target firmware, the terminal only needs to download the difference upgrading package without downloading the whole package of the target firmware, so that the data downloading amount required by firmware upgrading is greatly reduced; by comparing the difference upgrading packet with the hardware information of the terminal, the upgrading of a certain firmware of the terminal to a wrong manufacturer and a wrong hardware model is avoided, and the upgrading accuracy of the firmware is improved.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a terminal upgrading method according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of another terminal upgrading method according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of another terminal upgrading method according to an embodiment of the present invention;
fig. 5 is a schematic flowchart of another terminal upgrading method according to an embodiment of the present invention;
fig. 6 is a schematic flowchart of another terminal upgrading method according to an embodiment of the present invention;
Fig. 7 is a schematic flowchart of another terminal upgrading method according to an embodiment of the present invention;
fig. 8 is a block diagram of a terminal according to an embodiment of the present invention;
fig. 9 is a schematic block diagram of a cloud according to an embodiment of the present invention;
fig. 10 is a schematic block diagram of another cloud according to an embodiment of the present invention.
Icon: 100-electronic device, 110-processor, 120-external memory interface, 121-internal memory, 130-USB interface, 140-charging management module, 141-power management module, 142-battery, 150-mobile communication module, 160-wireless communication module, 170-audio module, 170A-speaker, 170B-receiver, 170C-microphone, 170D-earphone interface, 180-sensor module, 190-button, 191-motor, 192-indicator, 193-camera, 194-display screen, 50-terminal, 51-first communication module, 52-first judgment module, 53-first execution module, 60-cloud, 61-second communication module, 62-second judgment module, 63-a second execution module.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It is noted that relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
In the using process of the terminal, a plurality of problems occur, wherein the problem related to the firmware has the greatest influence on the operation condition of the terminal, and the firmware of the terminal needs to be upgraded in order to solve the existing loophole or compatibility problem or improve the operation mode of the terminal so as to provide more convenient and humanized functions. Each terminal has its own vendor and hardware model for different terminals, and if a certain firmware of the terminal is upgraded to the wrong vendor and hardware model, the terminal will have a condition of changing into a 'brick'. The Over-the-Air (FOTA) upgrading of mobile terminals is a common technical scheme for Firmware upgrading at present, but the upgrading packages of FOTA are all complete packages, generally speaking, one Firmware upgrading package is from several Megabytes (MB) to tens of MB, and the situation that the network condition of a terminal is poor or the electric quantity is small is solved; the firmware upgrade package of the FOTA occupies a large storage area, so that the download failure of the firmware upgrade package can often occur, and the firmware upgrade failure of the terminal is caused.
In order to solve the above problem, an embodiment of the present invention provides a terminal upgrading method, where the method is applied to a terminal, and the terminal is an electronic device, please refer to fig. 1, where fig. 1 is a schematic structural diagram of an electronic device provided in an embodiment of the present invention. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management Module 140, a power management Module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication Module 150, a wireless communication Module 160, an audio Module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor Module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identity Module (SIM) card interface, and the like. Wherein the sensor module 180 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, etc.
The terminal upgrading method provided by the embodiment of the invention can be applied to electronic devices such as Mobile phones, tablet computers, wearable devices, vehicle-mounted devices, Augmented Reality (AR)/Virtual Reality (VR) devices, notebook computers, Ultra-Mobile Personal computers (UMPC), netbooks, Personal Digital Assistants (PDAs), and the like, and the embodiment of the invention does not have any limitation on the specific types of the electronic devices.
It is to be understood that the illustrated structure of the embodiment of the present invention does not specifically limit the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the Processor 110 may include an Application Processor (AP), a modem Processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a memory, a video codec, a Digital Signal Processor (DSP), a baseband Processor, and/or a Neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors. The controller may be, among other things, a neural center and a command center of the electronic device 100. The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The Interface may include an Integrated Circuit (I2C) Interface, an Inter-Integrated Circuit built-in audio (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 Universal Serial Bus (USB) Interface, etc.
The I2C interface is a bidirectional synchronous Serial bus that includes a Serial Data Line (SDA) and a Serial Clock Line (SCL). In some embodiments, processor 110 may include multiple sets of I2C buses. The processor 110 may be coupled to a touch sensor, a charger, a flash, a camera 193, etc., respectively, through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor via an I2C interface, such that the processor 110 and the touch sensor communicate via an I2C bus interface to implement touch functionality of the electronic device 100.
The I2S interface may be used for audio communication. In some embodiments, processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 via an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may communicate audio signals to the wireless communication module 160 via the I2S interface, enabling answering of calls via a bluetooth headset.
The PCM interface may also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled by a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to implement a function of answering a call through a bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus used for asynchronous communications. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit the audio signal to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a bluetooth headset.
MIPI interfaces may be used to connect processor 110 with peripheral devices such as display screen 194, camera 193, and the like. The MIPI Interface includes a Camera Serial Interface (CSI), a display screen Serial Interface (DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the capture functionality of electronic device 100. The processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal and may also be configured as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, and the like.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transmit data between the electronic device 100 and a peripheral device. And the earphone can also be used for connecting an earphone and playing audio through the earphone. The interface may also be used to connect other electronic devices, such as AR devices and the like.
It should be understood that the connection relationship between the modules according to the embodiment of the present invention is only illustrative, and is not limited to the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The charging management module 140 is configured to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be used to monitor parameters such as battery capacity, battery cycle count, battery state of health (leakage, impedance), etc. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power Amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the same device as at least some of the modules of the processor 110. The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional modules, independent of the processor 110.
The Wireless Communication module 160 may provide solutions for Wireless Communication applied to the electronic device 100, including Wireless Local Area Networks (WLANs) (e.g., Wireless Fidelity (Wi-Fi) network), Bluetooth (BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and the like. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves.
In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150 and antenna 2 is coupled to wireless communication module 160 so that electronic device 100 can communicate with networks and other devices through wireless communication techniques. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Multiple Access (TDSCDMA), Long Term Evolution (Long Term Evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. The GNSS may include a Global Positioning System (GPS), a Global Navigation Satellite System (GLONASS), a beidou Navigation Satellite System (BDS), a Quasi-Zenith Satellite System (QZSS), and/or a Satellite Based Augmentation System (SBAS).
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The Display panel may be a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), an Active matrix Organic Light-Emitting Diode (Active-matrix Organic Light-Emitting Diode, AMOLED), a flexible Light-Emitting Diode (FLED), a miniature, a Micro-oeled, a Quantum Dot Light-Emitting Diode (Quantum Dot Light-Emitting Diodes, QLED), or the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, with N being a positive integer greater than 1.
The electronic device 100 may implement a shooting function through the ISP, the camera 193, the video codec, the GPU, the display 194, the application processor, and the like.
The ISP is used to process the data fed back by the camera 193. For example, when a photo is taken, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converting into an image visible to naked eyes. The ISP can also carry out algorithm optimization on the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a Complementary Metal-Oxide-Semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into image signal in standard RGB, YUV and other formats. In some embodiments, the electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a neural-network (NN) computing processor that processes input information quickly by using a biological neural network structure, for example, by using a transfer mode between neurons of a human brain, and can also learn by itself continuously. Applications such as intelligent recognition of the electronic device 100 can be realized through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capability of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The storage data area may store data (such as audio data, phone book, etc.) created during use of the electronic device 100, and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like.
The electronic device 100 may implement audio functions via the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also called a "horn", is used to convert the audio electrical signal into an acoustic signal. The electronic apparatus 100 can listen to music through the speaker 170A or listen to a handsfree call.
The receiver 170B, also called "earpiece", is used to convert the electrical audio signal into an acoustic signal. When the electronic apparatus 100 receives a call or voice information, it can receive voice by placing the receiver 170B close to the ear of the person.
The microphone 170C, also referred to as a "microphone," is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can input a voice signal to the microphone 170C by speaking the user's mouth near the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C to achieve a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further include three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, perform directional recording, and so on.
The headphone interface 170D is used to connect a wired headphone. The headset interface 170D may be the USB interface 130, or may be a 3.5mm open mobile electronic device platform (OMTP) standard interface, a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor is used for sensing a pressure signal and converting the pressure signal into an electric signal. In some embodiments, the pressure sensor may be disposed on the display screen 194. There are many types of pressure sensors, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, and the like. The capacitive pressure sensor may be a sensor comprising at least two parallel plates having an electrically conductive material. When a force acts on the pressure sensor, the capacitance between the electrodes changes. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the intensity of the touch operation according to the pressure sensor. The electronic apparatus 100 may also calculate the touched position based on the detection signal of the pressure sensor. In some embodiments, the touch operations that are applied to the same touch position but different touch operation intensities may correspond to different operation instructions. For example: and when the touch operation with the touch operation intensity smaller than the first pressure threshold value acts on the short message application icon, executing an instruction for viewing the short message. And when the touch operation with the touch operation intensity larger than or equal to the first pressure threshold value acts on the short message application icon, executing an instruction of newly building the short message.
The gyro sensor may be used to determine the motion pose of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 about three axes (i.e., the x, y, and z axes) may be determined by a gyroscope sensor. The gyro sensor may be used for photographing anti-shake. For example, when the shutter is pressed, the gyroscope sensor detects a shake angle of the electronic device 100, calculates a distance to be compensated for by the lens module according to the shake angle, and allows the lens to counteract the shake of the electronic device 100 through a reverse movement, thereby achieving anti-shake. The gyroscope sensor can also be used for navigation and body feeling game scenes.
The air pressure sensor is used for measuring air pressure. In some embodiments, the electronic device 100 calculates altitude, aiding in positioning and navigation, from barometric pressure values measured by a barometric pressure sensor.
The magnetic sensor includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip holster using a magnetic sensor. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor. And then according to the opening and closing state of the leather sheath or the opening and closing state of the flip cover, the automatic unlocking of the flip cover is set.
The acceleration sensor may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. The method can also be used for recognizing the posture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
The distance sensor is used for measuring distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, taking a picture of a scene, electronic device 100 may utilize a range sensor to range to achieve fast focus.
The proximity Light sensor may comprise, for example, a Light-Emitting Diode (LED) and a Light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light to the outside through the light emitting diode. The electronic device 100 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 may determine that there are no objects near the electronic device 100. The electronic device 100 can utilize the proximity light sensor to detect that the user holds the electronic device 100 close to the ear for talking, so as to automatically turn off the screen to achieve the purpose of saving power. The proximity light sensor can also be used in a holster mode, a pocket mode automatically unlocks and locks the screen.
The ambient light sensor is used for sensing the ambient light brightness. Electronic device 100 may adaptively adjust the brightness of display screen 194 based on the perceived ambient light level. The ambient light sensor can also be used to automatically adjust the white balance when taking a picture. The ambient light sensor may also cooperate with the proximity light sensor to detect whether the electronic device 100 is in a pocket to prevent inadvertent contact.
The fingerprint sensor is used for collecting fingerprints. The electronic device 100 can utilize the collected fingerprint characteristics to unlock the fingerprint, access the application lock, photograph the fingerprint, answer an incoming call with the fingerprint, and so on.
The temperature sensor is used for detecting temperature. In some embodiments, the electronic device 100 implements a temperature processing strategy using the temperature detected by the temperature sensor. For example, when the temperature reported by the temperature sensor exceeds the threshold, the electronic device 100 performs a reduction in performance of a processor located near the temperature sensor, so as to reduce power consumption and implement thermal protection. In other embodiments, the electronic device 100 heats the battery 142 when the temperature is below another threshold to avoid the low temperature causing the electronic device 100 to shut down abnormally. In other embodiments, when the temperature is lower than a further threshold, the electronic device 100 performs boosting on the output voltage of the battery 142 to avoid abnormal shutdown due to low temperature.
Touch sensors, also known as "touch panels". The touch sensor may be disposed on the display screen 194, and the touch sensor and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor is used to detect a touch operation applied thereto or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor may be disposed on a surface of the electronic device 100, different from the position of the display screen 194.
The bone conduction sensor may acquire a vibration signal. In some embodiments, the bone conduction sensor may acquire a vibration signal of a human voice vibrating a bone mass. The bone conduction sensor can also contact the pulse of the human body to receive the blood pressure pulsation signal. In some embodiments, the bone conduction sensor may also be disposed in a headset, integrated into a bone conduction headset. The audio module 170 may analyze a voice signal based on the vibration signal of the bone block vibrated by the sound part obtained by the bone conduction sensor, so as to implement a voice function. The application processor can analyze heart rate information based on the blood pressure beating signals acquired by the bone conduction sensor, and a heart rate detection function is realized.
The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys. Or may be touch keys. The electronic apparatus 100 may receive a key input, and generate a key signal input related to user setting and function control of the electronic apparatus 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration cues, as well as for touch vibration feedback. For example, touch operations applied to different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also respond to different vibration feedback effects for touch operations applied to different areas of the display screen 194. Different application scenes (such as time reminding, receiving information, alarm clock, game and the like) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc.
The SIM card interface is used for connecting the SIM card. The SIM card can be brought into and out of contact with the electronic apparatus 100 by being inserted into and pulled out of the SIM card interface. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface can support a Nano SIM card, a Micro SIM card, a SIM card and the like. Multiple cards can be inserted into the same SIM card interface at the same time. The types of the plurality of cards may be the same or different. The SIM card interface may also be compatible with different types of SIM cards. The SIM card interface may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
The software system of the electronic device 100 may employ a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention uses an Android system with a layered architecture as an example to exemplarily illustrate a software structure of the electronic device 100.
Taking the terminal as the electronic device shown in fig. 1 as an example, an embodiment of the present invention provides a terminal upgrading method, where the terminal is in communication connection with a cloud, please refer to fig. 2, and fig. 2 is a schematic flow diagram of the terminal upgrading method provided in the embodiment of the present invention. The cloud end can be a self-built cloud end or a public cloud end, and the specific form of the cloud end is not limited by the invention. The terminal upgrading method comprises the following steps:
and S31, acquiring the difference upgrade package of the target firmware.
The difference upgrade package is generated by the cloud according to the current firmware and the target firmware of the terminal. For example, the differential upgrade package may be generated by a Diff algorithm according to an original firmware package (current firmware package) and a target firmware package by a cloud, and the storage space occupied by the differential upgrade package is generally small, such as ten or several Kilobytes (KB), or several tens of KB.
And S32, judging whether the difference upgrade package is matched with the hardware information of the terminal.
The hardware information may include, but is not limited to, a manufacturer of the terminal, a hardware signal, hardware resource information, and the like.
If so, then S33 is performed.
And S33, upgrading the current firmware into the target firmware according to the difference upgrading package.
It can be understood that, according to the terminal upgrading method provided by the invention, by using the difference upgrading package of the original firmware and the target firmware, the terminal only needs to download the difference upgrading package, and does not need to download the whole package of the target firmware, so that the data downloading amount required by firmware upgrading is greatly reduced. On the other hand, by comparing the difference upgrading packet with the hardware information of the terminal, the situation that a certain firmware of the terminal is upgraded to a wrong manufacturer and a wrong hardware model is avoided, and the accuracy of the terminal in firmware upgrading is improved.
In an alternative embodiment, the difference upgrade package may not match the hardware information of the terminal, for example, the terminal corresponding to the target firmware in the difference upgrade package is a "photo wheel 2000" model made by a first manufacturer, and the hardware information of the terminal describes a "wind-fire wheel 2100" model made by a second manufacturer. In order to determine that such a situation occurs, please continue referring to fig. 2, when the difference upgrade package does not match the hardware information of the terminal, the terminal upgrade method may further include:
and S34, sending verification failure information to the cloud.
It should be understood that the mismatch between the hardware information of the difference upgrade package and the hardware information of the terminal is an Error Code (Error Code) of the current round of terminal upgrade process, and when the cloud receives the verification failure information, it is determined that the current round of terminal upgrade fails. For example, the determination process of S32 described above, and thus the subsequent S33 and S34, may be implemented by using a strong check.
In an optional implementation manner, when the terminal downloads the difference upgrade package from the cloud, a situation that the terminal is suddenly powered off or a network failure may occur, and in order to download the difference upgrade package to the terminal, a possible implementation manner is provided on the basis of fig. 2, please refer to fig. 3, and fig. 3 is a schematic flow diagram of another terminal upgrade method provided in an embodiment of the present invention. The above S31 may include:
S311, downloading the difference upgrading package from the cloud, and marking the current downloading point of the difference upgrading package and the current saving point of the terminal.
The current download point is used for confirming the download condition of the difference upgrade package at the cloud end, and the current save point is used for confirming the file save condition of the difference upgrade package at the terminal.
And S312, judging whether the current downloading point is the downloading end point of the terminal.
If yes, S313 is performed.
S313, judging whether the current saving point is the saving end point of the terminal.
If yes, go to S314.
And S314, determining that the difference upgrading packet is successfully acquired.
It should be understood that, by marking the first download point and the first save point of the differential upgrade package, the download condition of the differential upgrade package can be monitored, and thus, the complete acquisition of the differential upgrade package is realized.
In an optional embodiment, after the cloud recording terminal finishes downloading, the terminal may not completely store the difference upgrade package, or a fault occurs when the terminal stores the difference upgrade package, please refer to fig. 3 continuously, and if the current storage point is not the storage end point, the above S31 may further include:
and S315, sending the downloading failure information to the cloud.
It can be understood that the current saving point is not a saving end point, and is also an Error Code (Error Code) of the terminal for performing the firmware upgrading process, and the downloading failure information is sent to the cloud, and the cloud can monitor the firmware upgrading process of the corresponding terminal.
In addition, in an optional embodiment, in the case that the terminal is powered off or has a network failure, if the current download point is not the download end point, please continue to refer to fig. 3, where the above S31 may further include:
and S316, saving the current download point.
And S317, when a continuous downloading request of the user is received, continuously downloading the difference upgrading package from the current downloading point.
It can be understood that, if the terminal is suddenly powered off or has a network fault when the terminal downloads the difference upgrade package from the cloud, the current download point is already stored, and when the terminal recovers power supply or network recovery, the terminal can receive a continuous download request of a user, continuously download the difference upgrade package from the current download point, and then completely download the difference upgrade package to the terminal, and perform a subsequent terminal upgrade process.
In an optional embodiment, when the terminal successfully acquires the complete difference upgrade package, a possible implementation manner is provided for firmware upgrade of the terminal on the basis of fig. 2, please refer to fig. 4, and fig. 4 is a schematic flow diagram of another terminal upgrade method provided in the embodiment of the present invention. The above S33 may include:
s331, acquiring the data offset of the current firmware.
The data offset characterizes a unit of current firmware to be upgraded.
And S332, adding the difference upgrading package to a unit to be upgraded corresponding to the data offset so as to upgrade the current firmware into the target firmware.
For example, the terminal strongly verifies the downloaded difference upgrade package in combination with the hardware information of the terminal itself and information of the manufacturer, the hardware model, the original version, and the like of the current firmware in the difference upgrade package, and only when the difference upgrade package is matched with the hardware information of the terminal itself, the difference upgrade package is used for carrying out difference reduction, so that the firmware upgrade of the terminal is realized. For example, after the verification is passed (i.e. when the difference upgrade package is matched with the hardware information of the terminal), the target firmware is restored through the Patch algorithm, and the difference upgrade is performed to support the power-off protection.
In an optional implementation manner, the difference upgrade package may not match the data offset, for example, when performing differential reduction, a fault occurs, and the like, and a possible implementation manner is provided for firmware upgrade on a terminal on the basis of fig. 4, please refer to fig. 5, where fig. 5 is a schematic flow diagram of another terminal upgrade method provided in an embodiment of the present invention. The above S33 may further include:
And S333, when the difference upgrading package is not matched with the data offset, sending upgrading failure information to the cloud.
It can be understood that the mismatch between the difference upgrade package and the data offset is also an Error Code (Error Code) in the firmware upgrade process of the terminal, and when the cloud receives the upgrade failure information, it determines that the firmware upgrade of the terminal fails.
Next, on the basis of the cloud terminal provided above, in order to implement firmware upgrade of the terminal, taking the cloud terminal in communication connection with the terminal, and taking tag data of manufacturers of target firmware, hardware signals, and the like managed by the cloud terminal as an example, the present invention provides another terminal upgrade method, please refer to fig. 6, where fig. 6 is a schematic flow diagram of another terminal upgrade method provided in an embodiment of the present invention. The terminal upgrading method is applied to a cloud end, and when a firmware upgrading request of a terminal is received, the terminal upgrading method comprises the following steps:
and S42, judging whether the hardware information of the terminal is matched with the difference upgrade package of the target firmware.
If so, then S43 is performed.
And S43, judging whether the current state of the terminal is the state to be upgraded.
If yes, go to S44.
And S44, sending the difference upgrade package to the terminal, so that the terminal upgrades the current firmware of the terminal into the target firmware according to the difference upgrade package.
As can be understood, the cloud receives the device hardware information reported by the terminal in real time: such as manufacturer, hardware model, firmware version, etc., judging whether the difference upgrade package is matched with the hardware information reported by the terminal, and then sending the difference upgrade package to the terminal to realize the firmware upgrade of the terminal.
In an alternative embodiment, in order to obtain the difference upgrade package, please continue to refer to fig. 6, before the foregoing S42, the terminal upgrade method may further include:
and S41, acquiring the difference upgrade package according to the current firmware and the target firmware.
The difference upgrade package includes version information of the current firmware and hardware information of the terminal. For example, the cloud generates a difference upgrade package by using a Siff algorithm through the original firmware package and the target firmware package, and the difference upgrade package is written with a manufacturer, a hardware signal, original version information and the like corresponding to the target firmware. Compared with the FOTA whole package transmission in the prior art, the generated difference upgrade package greatly reduces the transmission data volume and effectively improves the firmware upgrade speed of the terminal by the terminal upgrade method provided by the embodiment of the invention.
In an alternative embodiment, in order to implement the cloud monitoring on the firmware upgrade process of the terminal, please continue to refer to fig. 6, when the hardware information of the terminal does not match the difference upgrade package, the process returns to execute S41.
In an optional embodiment, when the cloud sends the difference upgrade package to the terminal, the terminal may not download successfully, and in order to monitor a firmware upgrade process of the terminal, a possible implementation manner is provided on the basis of fig. 6, please refer to fig. 7, and fig. 7 is a flowchart of another terminal upgrade method provided in an embodiment of the present invention. The above S44 may include:
s441, the difference upgrading packet is sent to the terminal, and the current downloading point of the difference upgrading packet is marked.
The current download point is used for confirming the download condition of the difference upgrade package at the cloud.
And S442, if the current downloading point is the downloading end point of the terminal, determining that the difference upgrading packet is successfully sent.
And S443, if the current download point is not the terminal download end point, receiving the download failure information sent by the terminal.
It can be understood that after the cloud sends the difference upgrade package, the current download point is monitored, so that the firmware upgrade process of the terminal is monitored, whether the difference upgrade package is sent successfully or not is determined, and when the difference upgrade package is sent successfully, the terminal is waited to finish the firmware upgrade process of the current round.
In an optional embodiment, when the differential upgrade package does not match the data offset of the target firmware, the data offset represents a unit to be upgraded of the current firmware, and the method further includes: and receiving upgrade failure information sent by the terminal.
In an optional implementation manner, if the terminal determines that the hardware information of the terminal is not matched with the difference upgrade package, the cloud may further receive verification failure information sent by the terminal.
In order to implement the foregoing S31-S34 and possible sub-steps thereof, an embodiment of the present invention provides a terminal, and the terminal is communicatively connected to a cloud end, please refer to fig. 8, and fig. 8 is a block diagram of the terminal provided in the embodiment of the present invention. The terminal 50 includes: a first communication module 51, a first judgment module 52 and a first execution module 53.
The first communication module 51 is used for acquiring the difference upgrade package of the target firmware. The difference upgrade package is generated by the cloud according to the current firmware and the target firmware of the terminal 50. The first judging module 52 is used for judging whether the difference upgrade package is matched with the hardware information of the terminal 50. The first executing module 53 is configured to upgrade the current firmware to the target firmware according to the difference upgrade package when the difference upgrade package matches with the hardware information of the terminal 50. It should be understood that the above-mentioned S31-S34 may be cooperatively realized by the first communication module 51, the first judging module 52 and the first executing module 53.
In an optional embodiment, the first communication module 51 is further configured to download the difference upgrade package from the cloud, and mark a current download point of the difference upgrade package and a current save point of the terminal 50. The current download point is used for confirming the download condition of the difference upgrade package at the cloud. The current save point is used to confirm the file save status of the differential upgrade package at the terminal 50. The first determining module 52 is further configured to determine whether the current downloading point is the downloading end point of the terminal 50. The first determining module 52 is further configured to determine whether the current saving point is the saving end point of the terminal 50 if the current downloading point is the downloading end point. The first executing module 53 is further configured to determine that the difference upgrade package is successfully acquired if the current saving point is the saving end point.
In an optional embodiment, if the current download point is not the download end point, the first executing module 53 is further configured to save the current download point. The first communication module 51 is further configured to continue downloading the differential upgrade package from the current download point when a request for continuing downloading by the user is received.
In an optional embodiment, if the current saving point is not the saving end point, the first communication module 51 is further configured to send a download failure message to the cloud. It should be understood that the above-mentioned S311 to S317 may be cooperatively realized by the first communication module 51, the first judging module 52 and the first executing module 53.
In an alternative embodiment, the first execution module 53 is further configured to obtain a data offset of the current firmware. The data offset characterizes a unit of current firmware to be upgraded. The first execution module 53 is further configured to add the difference upgrade package to the unit to be upgraded corresponding to the data offset, so as to upgrade the current firmware to the target firmware.
In an optional embodiment, when the differential upgrade package does not match the data offset, the first communication module 51 is further configured to send upgrade failure information to the cloud. It should be understood that the above-mentioned S331 to S333 may be cooperatively realized by the first communication module 51, the first judging module 52 and the first executing module 53.
In an optional embodiment, when the difference upgrade package does not match the hardware information of the terminal 50, the first communication module 51 is further configured to send verification failure information to the cloud.
In order to implement the foregoing S41-S44 and possible sub-steps thereof, an embodiment of the present invention provides a cloud end, and the cloud end is in communication connection with a terminal, please refer to fig. 9, and fig. 9 is a block diagram of the cloud end provided in the embodiment of the present invention. The cloud 60 includes: a second communication module 61 and a second decision module 62.
The second communication module 61 is configured to determine whether the hardware information of the terminal matches the difference upgrade patch of the target firmware when receiving a firmware upgrade request of the terminal. The second judging module 62 is configured to judge whether the current state of the terminal is a state to be upgraded if the hardware information of the terminal is matched with the difference upgrade package. The second communication module 61 is further configured to send the difference upgrade package to the terminal if the current state of the terminal is the state to be upgraded, so that the terminal upgrades the current firmware of the terminal to the target firmware according to the difference upgrade package.
In an alternative implementation, please refer to fig. 10, where fig. 10 is a schematic block diagram of another cloud terminal provided in an embodiment of the present invention. The cloud 60 further includes: a second execution module 63. The second execution module 63 is configured to obtain the difference upgrade package according to the current firmware and the target firmware. The difference upgrade package includes version information of the current firmware and hardware information of the terminal.
In an alternative embodiment, please continue to refer to fig. 10, the second communication module 61 is further configured to send the difference upgrade package to the terminal, and mark a current download point of the difference upgrade package. The current download point is used to confirm the download status of the differential upgrade package at the cloud 60. The second executing module 63 is configured to determine that the difference upgrade package is successfully sent if the current download point is the download end point of the terminal. The second communication module 61 is further configured to receive download failure information sent by the terminal if the current download point is not the terminal download end point.
In an optional embodiment, when the hardware information of the terminal does not match with the difference upgrade package, the second communication module 61 is further configured to receive the verification failure information sent by the terminal.
In an optional embodiment, when the difference upgrade package does not match the data offset of the target firmware, the data offset represents a unit to be upgraded of the current firmware, and the second communication module 61 is further configured to receive upgrade failure information sent by the terminal.
It should be understood that the second communication module 61, the second determination module 62 and the second execution module 63 may cooperatively implement the above-mentioned S41-S44 and possible sub-steps thereof.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. 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 and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In summary, the present invention provides a terminal upgrading method and a related apparatus, and relates to the field of firmware upgrading. The terminal upgrading method is applied to a terminal, the terminal is in communication connection with a cloud, and the terminal upgrading method comprises the following steps: acquiring a difference upgrade package of a target firmware; the difference upgrading packet is generated by the cloud according to the current firmware and the target firmware of the terminal; judging whether the difference upgrading packet is matched with the hardware information of the terminal; and if the difference is matched with the target firmware, upgrading the current firmware into the target firmware according to the difference upgrading package. According to the terminal upgrading method provided by the invention, by using the difference upgrading package of the original firmware and the target firmware, the terminal only needs to download the difference upgrading package without downloading the whole package of the target firmware, so that the data downloading amount required by firmware upgrading is greatly reduced; by comparing the difference upgrading packet with the hardware information of the terminal, the upgrading of a certain firmware of the terminal to a wrong manufacturer and a wrong hardware model is avoided, and the upgrading accuracy of the firmware is improved.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (16)

1. A terminal upgrading method is applied to a terminal, the terminal is in communication connection with a cloud end, and the method comprises the following steps:
acquiring a difference upgrade package of a target firmware; the difference upgrading packet is generated by the cloud according to the current firmware and the target firmware of the terminal;
judging whether the difference upgrading packet is matched with the hardware information of the terminal;
and if so, upgrading the current firmware into the target firmware according to the difference upgrading package.
2. The method of claim 1, wherein obtaining the differential upgrade package for the target firmware comprises:
downloading the difference upgrading package from the cloud, and marking a current downloading point of the difference upgrading package and a current saving point of the terminal; the current downloading point is used for confirming the downloading condition of the difference upgrading packet at the cloud end; the current saving point is used for confirming the file saving condition of the difference upgrading packet at the terminal;
Judging whether the current downloading point is the downloading end point of the terminal or not;
if yes, judging whether the current storage point is a storage end point of the terminal;
and if so, determining that the difference upgrading packet is successfully obtained.
3. The method of claim 2, wherein when the current download point is not the download end point, the obtaining the differential upgrade package of the target firmware further comprises:
saving the current download point;
and when a continuous downloading request of the user is received, continuously downloading the difference upgrading package from the current downloading point.
4. The method of claim 3, wherein when the current saving point is not the saving end point, the obtaining the differential upgrade package of the target firmware further comprises:
and sending download failure information to the cloud.
5. The method according to any one of claims 1-4, wherein upgrading the current firmware to the target firmware according to the difference upgrade package comprises:
acquiring the data offset of the current firmware; the data offset represents a unit to be upgraded of the current firmware;
and adding the difference upgrading packet to a unit to be upgraded corresponding to the data offset so as to upgrade the current firmware into the target firmware.
6. The method of claim 5, wherein when the difference upgrade package does not match the data offset, the upgrading the current firmware to the target firmware according to the difference upgrade package, further comprises:
and sending upgrading failure information to the cloud.
7. The method of claim 1, wherein when the difference upgrade package does not match hardware information of the terminal, the method further comprises:
and sending verification failure information to the cloud.
8. A terminal upgrading method is applied to a cloud end, the cloud end is in communication connection with a terminal, and the method comprises the following steps:
when a firmware upgrading request of the terminal is received, judging whether hardware information of the terminal is matched with a difference upgrading packet of a target firmware;
if so, judging whether the current state of the terminal is a state to be upgraded;
and if so, sending the difference upgrade package to the terminal so that the terminal upgrades the current firmware of the terminal to the target firmware according to the difference upgrade package.
9. The method of claim 8, wherein before the determining whether the hardware information of the terminal matches the differential upgrade package of the target firmware when the firmware upgrade request of the terminal is received, the method further comprises:
Acquiring the difference upgrade package according to the current firmware and the target firmware; the difference upgrading packet comprises version information of the current firmware and hardware information of the terminal.
10. The method of claim 8, wherein sending the differential upgrade package to the terminal comprises:
sending the difference upgrading packet to the terminal, and marking the current downloading point of the difference upgrading packet; the current downloading point is used for confirming the downloading condition of the difference upgrading packet at the cloud end;
if the current downloading point is the downloading end point of the terminal, determining that the difference upgrading packet is successfully sent;
and if the current downloading point is not the downloading end point of the terminal, receiving downloading failure information sent by the terminal.
11. A terminal, characterized in that, terminal and high in the clouds communication connection, the terminal includes: the device comprises a first communication module, a first judgment module and a first execution module;
the first communication module is used for acquiring a difference upgrade package of the target firmware; the difference upgrading packet is generated by the cloud according to the current firmware and the target firmware of the terminal;
The first judging module is used for judging whether the difference upgrading packet is matched with the hardware information of the terminal;
and the first execution module is used for upgrading the current firmware into the target firmware according to the difference upgrade package when the difference upgrade package is matched with the hardware information of the terminal.
12. The terminal of claim 11, wherein the first communication module is further configured to download the upgrade package from the cloud, and mark a current download point of the upgrade package and a current save point of the terminal; the current downloading point is used for confirming the downloading condition of the difference upgrading packet at the cloud end; the current saving point is used for confirming the file saving condition of the difference upgrading packet at the terminal;
the first judging module is further configured to judge whether the current download point is a download end point of the terminal;
the first judging module is further configured to judge whether the current saving point is the saving end point of the terminal if the current downloading point is the downloading end point;
the first execution module is further configured to determine that the difference upgrade package is successfully acquired if the current saving point is the saving end point.
13. The terminal according to claim 11 or 12, wherein the first executing module is further configured to obtain a data offset of the current firmware; the data offset represents a unit to be upgraded of the current firmware;
the first execution module is further configured to add the difference upgrade package to a unit to be upgraded corresponding to the data offset, so as to upgrade the current firmware to the target firmware.
14. A cloud, wherein the cloud is in communication with a terminal, the cloud comprising: the second communication module and the second judgment module;
the second communication module is used for judging whether the hardware information of the terminal is matched with the difference upgrade package of the target firmware or not when the firmware upgrade request of the terminal is received;
the second judging module is used for judging whether the current state of the terminal is a state to be upgraded or not if the hardware information of the terminal is matched with the difference upgrading packet;
and the second communication module is also used for sending the difference upgrading packet to the terminal if the current state of the terminal is the state to be upgraded, so that the terminal upgrades the current firmware of the terminal to the target firmware according to the difference upgrading packet.
15. An electronic device comprising a processor and a memory, the memory storing machine executable instructions executable by the processor to implement the method of any one of claims 1-7 or the method of any one of claims 8-10.
16. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of any one of claims 1 to 7 or the method of any one of claims 8 to 10.
CN201911399054.9A 2019-12-30 2019-12-30 Terminal upgrading method and related device Pending CN111865646A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911399054.9A CN111865646A (en) 2019-12-30 2019-12-30 Terminal upgrading method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911399054.9A CN111865646A (en) 2019-12-30 2019-12-30 Terminal upgrading method and related device

Publications (1)

Publication Number Publication Date
CN111865646A true CN111865646A (en) 2020-10-30

Family

ID=72970850

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911399054.9A Pending CN111865646A (en) 2019-12-30 2019-12-30 Terminal upgrading method and related device

Country Status (1)

Country Link
CN (1) CN111865646A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112383439A (en) * 2020-11-24 2021-02-19 重庆前卫表业有限公司 Air upgrading system and method for intelligent gas meter
CN113438296A (en) * 2021-06-22 2021-09-24 青岛海信传媒网络技术有限公司 Upgrade package downloading method and display device
CN113590165A (en) * 2021-09-27 2021-11-02 成都千嘉科技有限公司 Remote upgrading method for embedded software of intelligent remote transmitting meter
CN113721966A (en) * 2021-08-27 2021-11-30 杭州华橙软件技术有限公司 Node upgrading method and device, storage medium and electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080216066A1 (en) * 2006-07-14 2008-09-04 Samsung Electronics Co., Ltd. Program upgrade system and method for ota-capable mobile terminal
CN109857443A (en) * 2019-01-25 2019-06-07 深圳市泰比特科技有限公司 A kind of upgrade method and system of shared motor bicycle whole-control system
CN110134418A (en) * 2019-05-10 2019-08-16 上海擎感智能科技有限公司 Vehicle upgrade method and device, storage medium and terminal based on space download technology
CN110602209A (en) * 2019-09-09 2019-12-20 合肥移瑞通信技术有限公司 Firmware over-the-air upgrading method and system based on DMP

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080216066A1 (en) * 2006-07-14 2008-09-04 Samsung Electronics Co., Ltd. Program upgrade system and method for ota-capable mobile terminal
CN109857443A (en) * 2019-01-25 2019-06-07 深圳市泰比特科技有限公司 A kind of upgrade method and system of shared motor bicycle whole-control system
CN110134418A (en) * 2019-05-10 2019-08-16 上海擎感智能科技有限公司 Vehicle upgrade method and device, storage medium and terminal based on space download technology
CN110602209A (en) * 2019-09-09 2019-12-20 合肥移瑞通信技术有限公司 Firmware over-the-air upgrading method and system based on DMP

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112383439A (en) * 2020-11-24 2021-02-19 重庆前卫表业有限公司 Air upgrading system and method for intelligent gas meter
CN112383439B (en) * 2020-11-24 2023-07-25 重庆前卫表业有限公司 Intelligent gas meter air upgrading system and upgrading method
CN113438296A (en) * 2021-06-22 2021-09-24 青岛海信传媒网络技术有限公司 Upgrade package downloading method and display device
CN113721966A (en) * 2021-08-27 2021-11-30 杭州华橙软件技术有限公司 Node upgrading method and device, storage medium and electronic device
CN113721966B (en) * 2021-08-27 2024-03-29 杭州华橙软件技术有限公司 Node upgrading method and device, storage medium and electronic device
CN113590165A (en) * 2021-09-27 2021-11-02 成都千嘉科技有限公司 Remote upgrading method for embedded software of intelligent remote transmitting meter

Similar Documents

Publication Publication Date Title
CN111434129B (en) Method for controlling express cabinet based on express message and electronic equipment
CN110347269B (en) Empty mouse mode realization method and related equipment
CN112289313A (en) Voice control method, electronic equipment and system
CN111742361B (en) Method for updating wake-up voice of voice assistant by terminal and terminal
CN111030990B (en) Method for establishing communication connection, client and server
CN110515646B (en) Differential upgrading method and related equipment
CN111865646A (en) Terminal upgrading method and related device
CN110742580A (en) Sleep state identification method and device
WO2022089000A1 (en) File system check method, electronic device, and computer readable storage medium
CN114422340A (en) Log reporting method, electronic device and storage medium
CN115589051B (en) Charging method and terminal equipment
CN111343326A (en) Method and related device for acquiring test log
CN113126948B (en) Audio playing method and related equipment
WO2022022319A1 (en) Image processing method, electronic device, image processing system and chip system
CN111104295A (en) Method and equipment for testing page loading process
CN114221402A (en) Charging method and device of terminal equipment and terminal equipment
CN114077519B (en) System service recovery method and device and electronic equipment
CN113467735A (en) Image adjusting method, electronic device and storage medium
CN114915721A (en) Method for establishing connection and electronic equipment
CN109285563B (en) Voice data processing method and device in online translation process
CN113901485B (en) Application program loading method, electronic device and storage medium
CN114915747A (en) Video call method and related equipment
CN111432156A (en) Image processing method and device, computer readable medium and terminal equipment
CN113364067B (en) Charging precision calibration method and electronic equipment
CN114329595B (en) Application program detection method, device, storage medium and program product

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20201030

RJ01 Rejection of invention patent application after publication