OTA upgrading method and device, electronic equipment and storage medium

By performing OTA upgrades when the smart device is not moving and the status and network environment are good, and pausing the upgrade when the device is moving, the problem of OTA upgrade affecting the user experience is solved, and a safe and reliable upgrade process is achieved.

CN119415118APending Publication Date: 2025-02-11GEER TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411526137.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

When upgrading using OTA upgrade technology, the equipment is unavailable during the upgrade process, which affects the user's normal usage experience.

Method used

When the smart device is not moved and the device status and network environment verification passes, the upgrade is exited when the device starts moving, and the checksum is re-checked after the device stops moving again.

Benefits of technology

It realizes OTA upgrade without affecting the normal use of the device by users, avoiding upgrade failures due to device status or network environment factors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119415118A_ABST
    Figure CN119415118A_ABST
Patent Text Reader

Abstract

The invention discloses an OTA upgrading method and device, electronic equipment and a storage medium, and relates to the technical field of data processing.The method comprises the steps that when intelligent equipment is not moved, verification before OTA upgrading is carried out on the intelligent equipment, and the verification before OTA upgrading comprises equipment state verification and network environment verification; if the verification results of the equipment state verification and the network environment verification both pass the verification, upgrading the to-be-upgraded software version in the intelligent equipment according to an upgrade package obtained from the OTA cloud; if it is detected that the intelligent device starts to move in the upgrading process of the to-be-upgraded software version, the upgrading of the to-be-upgraded software version is quitted, and after it is detected that the intelligent device stops moving again and the moving stopping time is longer than the preset time, the step of conducting verification before OTA upgrading on the intelligent device continues to be executed till upgrading is completed. According to the method and the device, OTA upgrading can be realized under the condition that normal use of equipment by a user is not influenced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to an OTA upgrade method, device, electronic device and storage medium. Background Art

[0002] OTA (Over-the-Air Technology) upgrade technology is a technology that remotely upgrades devices through the network, which can effectively improve the functionality and safety of devices. Therefore, OTA upgrade technology can be used to upgrade the application software in devices (such as VR devices and AR devices).

[0003] However, when OTA upgrade technology is used for upgrading, the device will become unavailable during the upgrade process, and users who want to use the device normally can only wait until the device upgrade is completed before they can use the device normally. Therefore, how to achieve OTA upgrade without affecting the user's normal use of the device has become an urgent problem to be solved.

[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0005] The main purpose of this application is to provide an OTA upgrade method, device, electronic device and storage medium, aiming to solve the technical problem of how to achieve OTA upgrade without affecting the user's normal use of the device.

[0006] To achieve the above objectives, the present application proposes an OTA upgrade method, which includes the following steps:

[0007] When the smart device is not moved, performing a pre-OTA upgrade check on the smart device, wherein the pre-OTA upgrade check includes a device status check and a network environment check;

[0008] If the verification results of the device status verification and the network environment verification are both verified to be passed, the software version to be upgraded in the smart device is upgraded according to the upgrade package obtained from the OTA cloud;

[0009] If during the upgrade process of the software version to be upgraded, it is detected that the smart device starts to move, the upgrade of the software version to be upgraded is exited, and after it is detected that the smart device stops moving again and the stopping time is greater than the preset time, the step of performing OTA pre-upgrade verification on the smart device is continued until the upgrade is completed.

[0010] Optionally, the step of performing a pre-OTA upgrade verification on the smart device includes:

[0011] Detecting whether the power consumption state of the smart device is a low power consumption state;

[0012] If it is in a low power consumption state, detecting whether the remaining power value of the smart device is greater than a preset power threshold;

[0013] If the remaining power value is greater than a preset power threshold, it is determined that the verification result of the device status verification of the smart device is a verification pass.

[0014] Optionally, the step of performing a pre-OTA upgrade verification on the smart device includes:

[0015] Detecting the network status of the smart device, wherein the network status includes bandwidth and latency;

[0016] If the bandwidth is greater than a preset bandwidth threshold and the delay is less than a preset delay threshold, it is determined that the verification result of the network environment verification of the smart device is a verification pass.

[0017] Optionally, the upgrade package includes a whole package or a differential package, and before the step of upgrading the software version to be upgraded in the smart device according to the upgrade package obtained from the OTA cloud, the step includes:

[0018] Receive a whole package or a differential package sent by the OTA cloud, wherein, when the OTA cloud detects that the software version of at least one application software in the smart device is different from the latest software version of the application software, it detects whether the difference between the latest software version and the software version is greater than a preset difference threshold; if the difference is greater than the preset difference threshold, compress the latest software version according to a preset high compression ratio algorithm to obtain a whole package; if the difference is less than or equal to the preset difference threshold, compress the difference version data between the latest software version and the software version according to a preset differential compression algorithm to obtain a differential package.

[0019] Optionally, the step of exiting the upgrade of the software version to be upgraded includes:

[0020] The upgrade process of the software version to be upgraded is interrupted, and an interruption node in the upgrade process is determined, a breakpoint mark is assigned to the interruption node, and the breakpoint mark corresponding to the interruption node is added to the upgrade progress record corresponding to the software version to be upgraded.

[0021] Optionally, the step of upgrading the software version to be upgraded in the smart device using the upgrade package obtained in the OTA cloud includes:

[0022] Detecting whether there is a breakpoint mark in the upgrade progress record corresponding to the software version to be upgraded;

[0023] If there is a breakpoint mark, the remaining upgrade data corresponding to the breakpoint mark in the upgrade package is determined according to a preset breakpoint resume mode, and the software version to be upgraded is upgraded according to the remaining upgrade data.

[0024] Optionally, the OTA upgrade method further includes:

[0025] During the upgrade process of the software version to be upgraded, detecting the posture parameters of the smart device in real time;

[0026] If the posture parameter is updated, determining that the smart device starts to move, and executing the step of exiting the upgrade of the software version to be upgraded;

[0027] If the posture parameters are not updated within a preset time range, it is determined that the smart device has not moved, and the step of performing a pre-OTA upgrade verification on the smart device is continued until the upgrade is completed.

[0028] In addition, to achieve the above purpose, the present application also proposes an OTA upgrade device, including:

[0029] A verification module, used to perform a pre-OTA upgrade verification on the smart device when the smart device is not moved, wherein the pre-OTA upgrade verification includes a device status verification and a network environment verification;

[0030] An upgrade module, configured to upgrade the software version to be upgraded in the smart device according to the upgrade package obtained from the OTA cloud if the verification results of the device status verification and the network environment verification are both verified to be passed;

[0031] The re-upgrade module is used to exit the upgrade of the software version to be upgraded if it is detected that the smart device starts to move during the upgrade process of the software version to be upgraded, and continue to perform the steps of pre-OTA upgrade verification of the smart device after detecting that the smart device stops moving again and the stopping time is greater than a preset time until the upgrade is completed.

[0032] In addition, to achieve the above objectives, the present application also proposes an electronic device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the OTA upgrade method described above.

[0033] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the OTA upgrade method described above are implemented.

[0034] In the present application, by performing a pre-OTA upgrade check on the smart device when the smart device is not moving, and only when the pre-OTA upgrade check passes, the OTA upgrade is performed, and the pre-OTA upgrade check includes a device status check and a network environment check, so that the OTA upgrade is performed only when the smart device is not moving and its device status check and network environment check are passed, thereby avoiding the user from performing an OTA upgrade during the process of using the smart device, affecting the user's use of the smart device, and by verifying the device status and network environment of the smart device, it can be determined that the subsequent OTA upgrade is effective, avoiding the phenomenon of OTA upgrade failure due to device status or network environment factors. And in the process of upgrading the software version to be upgraded, when it is detected that the smart device starts to move, the upgrade of the software version to be upgraded is exited, and after detecting that the smart device stops moving again, and the stop movement time is greater than the preset time, the OTA pre-upgrade check step is continued until the upgrade is completed, thereby ensuring that the user can use the smart device at any time, and the OTA upgrade process of the smart device does not affect the user's normal use of the device. That is, the OTA upgrade process of the smart device is upgraded when the user is not using the smart device, so it can be achieved without affecting the user's normal use of the device. OTA upgrade. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0036] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0037] Figure 1 A flowchart of the first embodiment of the OTA upgrade method of the present application is provided;

[0038] Figure 2 This is a schematic diagram of the device status verification process provided in the second embodiment of the OTA upgrade method of this application;

[0039] Figure 3 This is a schematic diagram of the network environment verification process provided in the second embodiment of the OTA upgrade method of this application;

[0040] Figure 4 This is a complete flowchart of the OTA upgrade method for this application;

[0041] Figure 5This is a schematic diagram of the module architecture of the OTA upgrade device for this application;

[0042] Figure 6 This is a schematic diagram of the device structure of the hardware operating environment involved in the OTA upgrade method in the embodiment of the present application.

[0043] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0044] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0045] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0046] The OTA upgrade method in this embodiment is an adaptive and seamless OTA upgrade method, which can dynamically select the most appropriate upgrade strategy according to factors such as the current status of the smart device, network environment, and user usage habits, and can upgrade the smart device without affecting the user's normal usage experience.

[0047] Optionally, the OTA upgrade method in this embodiment can be applied to smart devices in an OTA upgrade system.

[0048] Optionally, the OTA upgrade system may include a cloud OTA platform, an OTA master control, and a smart device to be upgraded.

[0049] Optionally, the cloud OTA platform (i.e., OTA cloud) is responsible for functions such as OTA upgrade package management and OTA task release. Optionally, OTA upgrade package management can be firmware version (such as target software version) control, signature authentication, and encrypted storage. OTA task release can be to formulate an update plan for OTA upgrade of smart devices based on factors such as device type and geographical location of smart devices, and push it to smart devices.

[0050] Optionally, the OTA master control, i.e. the controller, is used to complete the reception and release of software data, ensuring that the upgrade process can be completed safely without the operation of professional personnel.

[0051] Optionally, the OTA upgrade system is also provided with various functional modules, such as an upgrade condition detection module, an exception handling detection mechanism module and a differential upgrade module. Optionally, the upgrade condition detection module can be used to detect the current smart device before performing the OTA upgrade, such as detecting whether the smart device is being used by the user, as well as device status verification and network environment verification, and determine whether the smart device meets the upgrade conditions based on the detection results. Optionally, the exception handling mechanism module can be used to support the handling of abnormal situations, such as the exception handling mechanism including breakpoint resumption and other processing mechanisms, to deal with the situation in which the user uses the smart device to save the progress during the upgrade process, exit the current upgrade, and continue the upgrade when the upgrade conditions are met again. Optionally, the differential upgrade module can support the smart device to upgrade using differential upgrade technology, which can save internal resource space, reduce power consumption during downloading and upgrading, and improve upgrade efficiency.

[0052] Optionally, the process of upgrading the smart device using the OTA upgrade system may include the following process. Prepare a new firmware version (such as the target software version of an application or system) on the cloud OTA platform, and send an update notification to the smart device through the OTA master to inform that a new firmware version is available. The smart device downloads the new firmware version, i.e. the target software version, from the cloud OTA platform through the OTA master. The target software version is verified, and after the verification is passed, the update is automatically installed at an appropriate time. The appropriate time may be when the smart device is not moved and the OTA pre-upgrade verification passes.

[0053] Based on this, the embodiment of the present application provides an OTA upgrade method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the OTA upgrade method of the present application.

[0054] In this embodiment, the OTA upgrade method includes steps S10 to S40.

[0055] Step S10, when the smart device is not moved, performing a pre-OTA upgrade check on the smart device, wherein the pre-OTA upgrade check includes a device status check and a network environment check;

[0056] Optionally, the smart device may be a VR device, an AR device, an XR device, a wearable device, or a vehicle or other device that can be upgraded using an OTA upgrade method.

[0057] Optionally, the device status check may be to use the device status detection rule of the advance device to check the status of the smart device itself, such as checking the power, power consumption and CPU usage of the smart device.

[0058] Optionally, the network environment check may be to detect the network environment of the smart device using a pre-set network environment detection rule, such as detecting network speed, bandwidth, and latency.

[0059] Optionally, before performing an OTA upgrade on a smart device, the smart device may be detected to determine whether the user is using the smart device. For example, whether the user is using the smart device may be indirectly determined by detecting whether the smart device is moving. Optionally, if the smart device is not moving, it is determined that the user is not using the smart device. If the smart device is moving, it is determined that the user is using the smart device.

[0060] For example, if the smart device is an AR glasses. The posture parameters of the AR glasses can be detected. If the posture parameters are updated, it is determined that the AR glasses have moved, that is, it can be considered that the user is using the AR glasses. If the posture parameters are not updated, it can be determined that the AR glasses have not moved, and it can be considered that the user is not using the AR glasses. Optionally, the posture parameters may include the position and posture of the AR glasses. If the position or posture of the AR glasses changes within a first preset time range (such as 1s, 5s, etc.), it is determined that the posture parameters are updated.

[0061] Optionally, in order to more accurately determine whether the user is using the smart device, the use status of the smart device can also be detected when it is determined that the smart device is not moving. For example, it is determined whether the smart device is in a standby state, and whether the smart device receives a command input by the user (such as a command generated by the user touching a virtual button in the display interface of the smart device) within a second preset time range (a time range set in advance by the user, such as 5s, 8s, etc.). If the smart device is in a standby state and the smart device does not receive a command input by the user within the second preset time range, it can be determined that the user is not using the smart device.

[0062] Optionally, after determining that the user is not using the smart device, a pre-OTA upgrade verification may be performed on the smart device, and after the verification passes, the OTA upgrade may be performed.

[0063] Optionally, when it is detected that the smart device has not moved and it is determined that the user has not used the smart device, a pre-OTA upgrade check can be performed on the smart device to determine whether the upgrade environment of the smart device meets the normal OTA upgrade, such as performing a device status check on the smart device and a network environment check on the smart device.

[0064] If the device status check fails, or the network environment check fails, it can be determined that the upgrade environment of the smart device does not meet the normal OTA upgrade. At this time, the OTA upgrade of the smart device can be stopped, and a corresponding prompt message can be output on the display interface of the smart device to inform the user that the smart device cannot automatically perform OTA upgrades.

[0065] Optionally, if the device status check passes and the network environment check passes, it can be determined that the upgrade environment of the smart device satisfies the normal progress of the OTA upgrade, and the smart device can be OTA upgraded at this time.

[0066] Step S20: If the verification results of the device status verification and the network environment verification are both verified to be passed, the software version to be upgraded in the smart device is upgraded according to the upgrade package obtained from the OTA cloud;

[0067] Optionally, if the verification result of the device status verification of the smart device is passed, and the verification result of the network environment verification of the smart device is passed, it can be determined that the upgrade environment of the smart device meets the normal progress of the OTA upgrade. Then, the target software version can be obtained through the OAT upgrade technology to upgrade the software version to be upgraded in the smart device.

[0068] Optionally, the OTA cloud can monitor the software version of each application software in the smart device. When it is detected that there is at least one application software with the latest software version, and the latest software version is different from the software version of the application software, it can be determined that the software version of the application software in the smart device needs to be updated and used as the software version to be upgraded. For example, if the smart device is AR glasses, and the system version of the AR glasses is version 3.0. If the system version of the AR glasses in the OTA cloud is version 3.2. And there are differences between the 3.2 version system and the 3.0 version system, it can be determined that the system in the AR glasses needs to be upgraded from version 3.0 to version 3.2.

[0069] Optionally, the smart device can obtain the upgrade package in the OTA cloud and upgrade the software version to be upgraded according to the upgrade package when it detects that it has not moved and the device status check and network environment check have passed. For example, the upgrade package is decompressed to obtain the latest software version, and the software version to be upgraded is upgraded according to the latest software version, so that the upgraded software version in the smart device is consistent with the latest software version.

[0070] Step S30, if during the upgrade process of the software version to be upgraded, it is detected that the smart device starts to move, then the upgrade of the software version to be upgraded is exited, and after it is detected that the smart device stops moving again, and the stop movement time is greater than the preset time, the step of performing OTA upgrade pre-verification on the smart device is continued until the upgrade is completed.

[0071] Optionally, if the smart device detects that the smart device starts to move during the upgrade process of the software version to be upgraded, it can be determined that the user needs to use the smart device at this time, so the upgrade process of the software version to be upgraded in the smart device can be interrupted and the software version to be upgraded before the upgrade process can be restored. That is, at this time, the user can use the smart device normally and can use the software to be upgraded in the smart device normally.

[0072] Optionally, the movement state of the smart device can be detected in real time. If it is detected that the smart device stops moving again and the stopping time is greater than the preset time, the above step S10 can be continued, that is, the smart device continues to be verified before the OTA upgrade. If the OTA pre-upgrade verification passes, the software version to be upgraded is upgraded according to the upgrade package obtained from the OTA cloud until the upgrade is completed. Optionally, the stopping time can be the time when the smart device stops moving this time, such as the time range from the time node when it stops moving again to the current time node. The preset time can be the time set by the user in advance, such as 1 hour.

[0073] Optionally, in one scenario, if it is detected that the smart device stops moving again and the time of stopping movement is greater than a preset time, a pop-up window containing prompt information for upgrading the software version to be upgraded can also be output. If no instructions input by the user are received within a certain time range (such as 5 minutes, 10 minutes), the smart device will continue to be verified before the OTA upgrade. If the OTA pre-upgrade verification passes, the software version to be upgraded will be upgraded according to the upgrade package obtained from the OTA cloud until the upgrade is completed.

[0074] In this embodiment, by performing a pre-OTA upgrade check on the smart device when the smart device is not moving, and only when the pre-OTA upgrade check passes, the OTA upgrade is performed, and the pre-OTA upgrade check includes a device status check and a network environment check, so that the OTA upgrade is performed only when the smart device is not moving and both the device status check and the network environment check pass, thereby avoiding the user from performing an OTA upgrade during the process of using the smart device, which affects the user's use of the smart device, and by verifying the device status and network environment of the smart device, it can be determined that the subsequent OTA upgrade is effective, and the phenomenon of OTA upgrade failure due to device status or network environment factors can be avoided. In addition, during the upgrade process of the software version to be upgraded, when it is detected that the smart device starts to move, the upgrade of the software version to be upgraded is exited, and after detecting that the smart device stops moving again, and the stop movement time is greater than the preset time, the step of pre-OTA upgrade check is continued until the upgrade is completed, thereby ensuring that the user can use the smart device at any time, and the OTA upgrade process of the smart device does not affect the user's normal use of the device. That is, the OTA upgrade process of the smart device is upgraded only when the user is not using the smart device, so it can be achieved without affecting the user's normal use of the device.

[0075] Based on the first embodiment of the present application, a second embodiment of the present application is proposed. In the second embodiment of the present application, the same or similar contents as those in the above embodiment can be referred to the above introduction, and will not be repeated in the following. Figure 2 In step S10, the step of performing OTA pre-upgrade verification on the smart device includes steps a10-a30.

[0076] Step a10, detecting whether the power consumption state of the smart device is a low power consumption state;

[0077] Optionally, if there is software to be upgraded in the smart device and the latest version of the software to be upgraded exists in the OTA cloud, the smart device can be verified before the OTA upgrade, and after the OTA pre-upgrade verification passes, the software version of the software to be upgraded can be upgraded.

[0078] Optionally, when performing the pre-OTA upgrade check, the device state check may be performed on the smart device. Optionally, when performing the device state check, the power consumption state of the smart device may be detected to determine whether the power consumption state of the smart device is in a low power consumption state.

[0079] Optionally, the power consumption state of the smart device is different in different working modes. When the smart device is in normal working mode, since the user is using the smart device, the CPU and other components of the smart device are in an active state, so the power consumption is high, that is, the power consumption state at this time is a high power consumption state. When the smart device is in idle mode, since the user is not using the smart device, the CPU of the smart device may be in a dormant state, so the power consumption is low, that is, the power consumption state at this time is a low power consumption state. When the smart device is in shutdown mode, the power consumption of the smart device is zero.

[0080] Step a20, if it is in a low power consumption state, detecting whether the remaining power value of the smart device is greater than a preset power threshold;

[0081] Optionally, if the power consumption state of the smart device is a high power consumption state, it is determined that the pre-OTA upgrade verification has not passed, and the software version to be upgraded is not upgraded at this time.

[0082] Optionally, if the power consumption state of the smart device is a low power consumption state, it is determined to continue to detect the remaining power of the smart device to determine whether the remaining power of the smart device meets the requirement of upgrading the software version to be upgraded. That is, it is detected whether the remaining power value of the smart device is greater than a preset power threshold. Optionally, the preset power threshold can be a power value set in advance by the user.

[0083] Step a30: if the remaining power value is greater than the preset power threshold, it is determined that the verification result of the device status verification of the smart device is verification passed.

[0084] Optionally, if it is detected that the remaining power value is greater than a preset power threshold, it can be determined that the remaining power of the smart device meets the requirements of upgrading the software version to be upgraded. At this time, it can be determined that the device status verification result of the smart device is passed, and when it is detected that the verification result of the network environment verification is passed, it is determined that the verification result of the OTA pre-upgrade verification of the smart device is passed, and then the subsequent OTA upgrade process is carried out, that is, the process of upgrading the software version to be upgraded.

[0085] Optionally, when performing a verification before an OTA upgrade, when it is detected that the power consumption state of the smart device is a low power consumption state and the remaining power value is greater than a preset power threshold, the verification result of the device status of the smart device is determined to be a passed verification, thereby ensuring the effective implementation of the device status verification of the smart device.

[0086] Furthermore, in step S10, the step of performing a pre-OTA upgrade verification on the smart device includes steps b10-b20.

[0087] Step b10, detecting the network status of the smart device, wherein the network status includes bandwidth and latency;

[0088] Step b20: If the bandwidth is greater than the preset bandwidth threshold and the delay is less than the preset delay threshold, it is determined that the verification result of the network environment verification of the smart device is passed.

[0089] Optionally, when performing the OTA pre-upgrade check, the network environment check of the smart device can be performed to determine whether the current network environment meets the network requirements for upgrading the software version to be upgraded.

[0090] Optionally, when performing the pre-OTA upgrade verification, the device status verification may be performed first, and then the network environment verification may be performed, or the network environment verification may be performed first, and then the device status verification may be performed. Alternatively, the device status verification and the network environment verification may be performed simultaneously.

[0091] Optionally, when performing the network environment check, the network status of the smart device may be detected, such as the bandwidth, delay, and network speed of the smart device. In this embodiment, only the network status of bandwidth and delay is used as an example for illustration.

[0092] Optionally, a preset bandwidth threshold and a preset delay threshold may be set in advance. The preset bandwidth threshold may be a bandwidth value set by a user, such as 10 Mbps. The preset delay threshold may be a delay value set by a user, such as 100 ms.

[0093] Optionally, if it is detected that the bandwidth is less than or equal to the preset bandwidth threshold, or the delay is greater than the preset delay threshold, it can be determined that the verification result of the network environment verification is a verification failure, that is, it can be determined that the verification result of the OTA upgrade check is a verification failure, and therefore the upgrade of the software version to be upgraded can be omitted.

[0094] Optionally, if the bandwidth is detected to be greater than a preset bandwidth threshold and the delay is less than a preset time domain threshold, it can be determined that the verification result of the network environment of the smart device is passed. When the verification result of the device status verification is detected to be passed, it is determined that the verification result of the pre-OTA upgrade verification of the smart device is passed, and then the subsequent OTA upgrade process is carried out, that is, the process of upgrading the software version to be upgraded.

[0095] Optionally, when performing a check before an OTA upgrade, the network status of the smart device is detected, and when it is determined that the bandwidth is greater than a preset bandwidth threshold and the delay is less than a preset delay threshold, the check result of the network environment check of the smart device is determined to be passed, thereby ensuring the effectiveness of the network environment check of the smart device.

[0096] Furthermore, the upgrade package includes a full package and a differential package.

[0097] Optionally, in step S20, before the step of upgrading the software version to be upgraded in the smart device according to the upgrade package obtained from the OTA cloud, step c10 is included.

[0098] Step c10, receiving a whole package or a differential package sent by the OTA cloud, wherein the OTA cloud detects that there is a difference between the software version of at least one application software in the smart device and the latest software version of the application software, then detects whether the difference between the latest software version and the software version is greater than a preset difference threshold; if the difference is greater than the preset difference threshold, the latest software version is compressed according to a preset high compression ratio algorithm to obtain a whole package; if the difference is less than or equal to the preset difference threshold, the difference version data between the latest software version and the software version is compressed according to a preset differential compression algorithm to obtain a differential package.

[0099] Optionally, in the OTA cloud, the software version of each application software in the smart device will be detected in real time. If it is detected that the software version of at least one application software is not the latest software version, that is, there is a difference between the software version of at least one application software and the latest software version of the application software, it is determined that the application software in the smart device needs to be upgraded, that is, the software version of the application software is used as the software version to be upgraded, and the software version to be upgraded is upgraded according to the latest software version of the application software, so that the software version of the upgraded application software is consistent with the latest software version.

[0100] Optionally, if the OTA cloud detects that the software version of at least one application software in the smart device is different from the latest software version of the application software, the difference between the latest software version and the software version of the same application software can be determined. Optionally, the latest software version can be a software version that is determined in advance by the manufacturer or user of the application software and uploaded to the OTA cloud. Optionally, the difference can be the difference between the latest software version and the software version. Optionally, when determining the difference between the latest software version and the current software version of the same application software, a preset difference algorithm can be used for calculation and determination. It is also possible to perform a byte comparison between the latest software version and the software version, determine the different bytes, and determine the difference between the latest software version and the current software version based on the different bytes.

[0101] Optionally, after determining the difference, the OTA cloud can compare the difference with a preset difference threshold. Optionally, the preset difference threshold can be a difference set in advance by the user, such as 20%. Optionally, the preset difference threshold is not equal to 0.

[0102] Optionally, when the OTA cloud determines that the difference is greater than a preset difference threshold, it can determine that the latest software version and the software version to be upgraded of the application software in the smart device are quite different. At this time, the latest software version can be directly compressed as a whole to obtain a whole package. In addition, a high compression ratio algorithm can be used to compress the latest software version as a whole to obtain a compressed firmware package, and the compressed firmware package is used as a whole package for the smart device to download the whole package, and the downloaded whole package is decompressed to obtain the latest software version, and then the software version to be upgraded of the application software corresponding to the latest software version in the smart device is upgraded according to the latest software version.

[0103] Optionally, when the OTA cloud determines that the difference is less than or equal to the preset difference threshold, it can determine that the difference between the latest software version and the software version to be upgraded of the application software in the smart device is small. At this time, the difference version data between the latest software version and the software version (i.e., the difference data between the latest software version and the software version, such as new components, etc.) can be compressed to obtain a differential package. And a differential compression algorithm can be used to compress the difference version data to obtain a compressed firmware package, and the compressed firmware package is used as a differential package for the smart device to download the differential package, and the downloaded differential package is decompressed to obtain the difference version data, and then the software version to be upgraded of the application software corresponding to the difference version data in the smart device is upgraded according to the difference version data.

[0104] Optionally, since the upgrade package includes a whole package or a differential package, when the OTA cloud detects that the difference between the software version of at least one application software in the smart device and the latest software version of the application software is greater than zero, it determines that the software version of the application software is the software version to be upgraded, and when the difference is greater than a preset difference threshold, a high compression ratio algorithm can be used to compress the latest software version to obtain a whole package. The smart device can download the whole package in the OTA cloud and decompress it to upgrade the software version to be upgraded. When the difference is less than or equal to the preset difference threshold, a differential compression algorithm can be used to compress the difference version data between the latest software version and the software version to obtain a differential package. The smart device can download the differential package in the OTA cloud and decompress it to upgrade the software version to be upgraded. This ensures the effective implementation of the OTA upgrade process.

[0105] Further, in step S30, the step of upgrading the software version to be upgraded is exited, including step d10.

[0106] Step d10, interrupting the upgrade process of the software version to be upgraded, determining the interruption node in the upgrade process, assigning a breakpoint mark to the interruption node, and adding the breakpoint mark corresponding to the interruption node to the upgrade progress record corresponding to the software version to be upgraded.

[0107] Optionally, during the process of upgrading the software version to be upgraded of the smart device, if it is detected that the smart device starts to move, it can be determined that the user needs to use the smart device, so the upgrade process of the software version to be upgraded can be directly interrupted. And determine the interruption point in the upgrade process and use it as the interruption node. For example, if 30% of the upgrade of the software version to be upgraded has been completed, the node where the 30% is located can be used as the interruption node, and a breakpoint mark is given to the interruption node, and it is added to the upgrade progress record corresponding to the software version to be upgraded. Optionally, the upgrade progress record can be embodied in the form of a table. Optionally, when the smart device subsequently upgrades the software version to be upgraded, it can determine the interruption node when the software version to be upgraded was upgraded last time according to the latest breakpoint mark stored in the upgrade progress record, and continue to upgrade the software version to be upgraded at this interruption node until the upgrade is completed.

[0108] Optionally, when the smart device starts to move, the upgrade process of the software version to be upgraded will be interrupted, and the interruption nodes in the upgrade process will be marked with breakpoints and added to the upgrade progress record, so that when the software version to be upgraded is upgraded subsequently, it can be upgraded directly according to the upgrade progress record without continuing to upgrade the software version to be upgraded as a whole.

[0109] Furthermore, in step S20, the step of upgrading the software version to be upgraded in the smart device using the upgrade package obtained in the OTA cloud includes steps e10-e20.

[0110] Step e10, detecting whether there is a breakpoint mark in the upgrade progress record corresponding to the software version to be upgraded;

[0111] Step e20: if there is a breakpoint mark, the remaining upgrade data corresponding to the breakpoint mark in the upgrade package is determined according to the preset breakpoint resume mode, and the software version to be upgraded is upgraded according to the remaining upgrade data.

[0112] Optionally, when upgrading the software version to be upgraded in the smart device, it is necessary to obtain the upgrade progress record of the application software to which the software version to be upgraded belongs. And detect whether there is a breakpoint mark corresponding to the current software version to be upgraded in the upgrade progress record. If there is no breakpoint mark, the software version to be upgraded in the smart device can be upgraded according to the upgrade package obtained in the OTA cloud.

[0113] Optionally, if there is a breakpoint mark in the upgrade progress record, it is necessary to obtain the latest breakpoint mark in the upgrade progress record. And the upgrade process of the software version to be upgraded is continued for the interrupted node corresponding to the breakpoint mark by using the breakpoint resume method until the upgrade is completed. Optionally, when upgrading by using the breakpoint resume method, it is necessary to determine the upgrade package obtained in the OTA cloud, and the remaining upgrade data corresponding to the breakpoint mark in the decompressed data. And continue to upgrade the software version to be upgraded based on the remaining upgrade data. Optionally, the remaining upgrade data can be the data of the software version to be upgraded that has not been completed.

[0114] Optionally, when continuing the OTA upgrade of the software version to be upgraded, it is possible to detect whether there is a breakpoint mark in the corresponding upgrade progress record. When it is determined that there is a breakpoint mark, the breakpoint resumption method is directly used to determine the remaining upgrade data, and the software version to be upgraded is upgraded based on the remaining upgrade data, thereby improving the upgrade efficiency.

[0115] Furthermore, the OTA upgrade method also includes steps f10-f30.

[0116] Step f10, during the upgrade process of the software version to be upgraded, detecting the posture parameters of the smart device in real time;

[0117] Step f20, if the posture parameter is updated, determining that the smart device starts to move, and executing the step of exiting the upgrade of the software version to be upgraded;

[0118] Step f30: If the posture parameters are not updated within the preset time range, it is determined that the smart device has not moved, and the step of performing a pre-OTA upgrade verification on the smart device is continued until the upgrade is completed.

[0119] Optionally, during the process of upgrading the software version to be upgraded in the smart device, the posture parameters of the smart device are detected in real time. Optionally, the posture parameters of the smart device include the position and direction of the smart device.

[0120] Optionally, if it is detected that the posture parameters of the smart device are updated, it can be determined that the smart device starts to move, that is, the smart device is in a moving state, and at this time it can be considered that the user needs to use the smart device normally. Therefore, the process of upgrading the software version to be upgraded can be exited.

[0121] Optionally, if the posture parameters of the smart device are not updated within a preset time range, it can be determined that the smart device has not moved. At this time, the step of upgrading the software version to be upgraded can be executed, that is, if the smart device passes the OTA upgrade before verification, the software version to be upgraded in the smart device can be upgraded according to the target software version obtained in the OTA cloud until the upgrade is completed.

[0122] Optionally, during the upgrade process of the software version to be upgraded, the posture parameters of the smart device are detected in real time, and when the posture parameters are updated, the OTA upgrade process is exited, that is, the upgrade process of the software version to be upgraded is exited. If it is detected that the posture parameters have not been updated within the preset time, it can be determined that the smart device has not moved, and the OTA upgrade process can be continued, that is, the upgrade process of the software version to be upgraded. This can avoid the phenomenon that the user cannot use the smart device when the OTA upgrade is performed when the user is using the smart device normally.

[0123] In addition, based on the above embodiment, a preferred OTA upgrade process is provided. Figure 4 As shown, when starting the OTA upgrade, first check whether the device (i.e., smart device) is moving. If so, exit the OTA upgrade process. If not, continue to detect the device status of the smart device, including detecting whether it has entered low power consumption, and detecting whether the power of the smart device is >20% or is charging. If the smart device has not entered a low-power state, continue to execute the step of detecting whether it has entered a low-power state. If the smart device enters a low-power state, detect whether the power of the smart device is >20% or is charging. If not, exit the OTA upgrade process. If so, perform a network status check on the smart device to determine whether the network condition is good. The detection conditions may include running an iperf script to determine whether the network condition satisfies bandwidth >10Mbps and latency <100ms. If not, exit the OTA upgrade process. If so, in the OTA cloud, the difference between the software version of the application software in the smart device and the latest software version is detected, such as whether there is an upgrade difference of >20%. If so, the latest software version can be directly compressed using a high compression ratio algorithm to obtain a whole package. If not, the difference version data between the latest software version and the software version can be compressed using a differential compression algorithm to obtain a differential package. Optionally, the smart device can download the whole package or differential package in the OTA cloud and decompress it to obtain the decompressed data. Optionally, in the process of upgrading the software version to be upgraded in the smart device, it is detected whether there is an upgrade progress record. If so, the breakpoint can be continued according to the upgrade progress record until the upgrade is completed. If not, the upgrade is performed directly. And in the process of upgrading the software version to be upgraded, it is detected whether the device is moved. If so, the upgrade is exited and the breakpoint is set. At this time, the application software in the smart device runs according to the software version to be upgraded until the device stops moving, and the OTA upgrade is performed again. If the device does not move during the upgrade process, the upgrade of the software version to be upgraded continues until the upgrade is completed, thereby ending the OTA upgrade process.

[0124] In addition, the present application embodiment provides an OTA upgrade device, referring to Figure 5 , the OTA upgrade device includes:

[0125] The verification module A10 is used to perform a pre-OTA upgrade verification on the smart device when the smart device is not moved, wherein the pre-OTA upgrade verification includes a device status verification and a network environment verification;

[0126] The upgrade module A20 is used to upgrade the software version to be upgraded in the smart device according to the upgrade package obtained from the OTA cloud if the verification results of the device status verification and the network environment verification are both verified to pass;

[0127] The re-upgrade module A30 is used to exit the upgrade of the software version to be upgraded if it is detected that the smart device starts to move during the upgrade process of the software version to be upgraded, and continue to perform the steps of OTA pre-upgrade verification of the smart device after detecting that the smart device stops moving again and the stopping time is greater than a preset time until the upgrade is completed.

[0128] Optionally, the verification module A10 is used to:

[0129] Detect whether the power consumption state of the smart device is a low power consumption state;

[0130] If it is in a low power consumption state, detecting whether the remaining power value of the smart device is greater than a preset power threshold;

[0131] If the remaining power value is greater than the preset power threshold, it is determined that the verification result of the device status verification of the smart device is verification passed.

[0132] Optionally, the verification module A10 is used to:

[0133] Detecting the network status of the smart device, where the network status includes bandwidth and latency;

[0134] If the bandwidth is greater than the preset bandwidth threshold and the delay is less than the preset delay threshold, it is determined that the verification result of the network environment verification of the smart device is passed.

[0135] Optionally, the upgrade package includes a whole package or a differential package, and an upgrade module A20 is used to:

[0136] Receive a whole package or a differential package sent by the OTA cloud, wherein, when the OTA cloud detects that the software version of at least one application software in the smart device is different from the latest software version of the application software, it detects whether the difference between the latest software version and the software version is greater than a preset difference threshold; if the difference is greater than the preset difference threshold, the latest software version is compressed according to a preset high compression ratio algorithm to obtain a whole package; if the difference is less than or equal to the preset difference threshold, the difference version data between the latest software version and the software version is compressed according to a preset differential compression algorithm to obtain a differential package.

[0137] Optionally, upgrade module A30 to:

[0138] The upgrade process of the software version to be upgraded is interrupted, and an interruption node in the upgrade process is determined, a breakpoint mark is assigned to the interruption node, and the breakpoint mark corresponding to the interruption node is added to the upgrade progress record corresponding to the software version to be upgraded.

[0139] Optionally, upgrade module A20 to:

[0140] Check whether there is a breakpoint mark in the upgrade progress record corresponding to the software version to be upgraded;

[0141] If there is a breakpoint mark, the remaining upgrade data corresponding to the breakpoint mark in the upgrade package is determined according to the preset breakpoint resume mode, and the software version to be upgraded is upgraded according to the remaining upgrade data.

[0142] Optionally, the verification module A10 is used to:

[0143] During the upgrade process of the software version to be upgraded, the posture parameters of the smart device are detected in real time;

[0144] If the posture parameter is updated, it is determined that the smart device starts to move, and the step of exiting the upgrade of the software version to be upgraded is executed;

[0145] If the posture parameters are not updated within the preset time range, it is determined that the smart device has not moved, and the steps of performing pre-OTA upgrade verification on the smart device are continued until the upgrade is completed.

[0146] The OTA upgrade device provided by the present application adopts the OTA upgrade method in the above embodiment, which can solve the technical problem of how to realize OTA upgrade without affecting the normal use of the device by the user. Compared with the prior art, the beneficial effects of the OTA upgrade device provided by the present application are the same as the beneficial effects of the OTA upgrade method provided by the above embodiment, and the other technical features in the OTA upgrade device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0147] The present application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the OTA upgrade method in the above-mentioned embodiment one.

[0148] Reference below Figure 6 , which shows a schematic diagram of the structure of an electronic device suitable for implementing an embodiment of the present application. The electronic device in the embodiment of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. The device shown in the figure is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0149] The electronic device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM) 1004. In RAM 1004, various programs and data required for device operation are also stored. The processing device 1001, ROM 1002, and RAM 1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an electronic device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0150] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0151] The electronic device provided by the present application adopts the OTA upgrade method in the above embodiment to solve the technical problem of how to improve the accuracy of OTA upgrade. Compared with the prior art, the beneficial effects of the electronic device provided by the present application are the same as the beneficial effects of the OTA upgrade method provided by the above embodiment, and the other technical features in the electronic device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0152] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0153] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0154] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the OTA upgrade method in the above-mentioned embodiment.

[0155] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0156] The computer-readable storage medium may be included in the electronic device, or may exist independently without being installed in the electronic device.

[0157] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by an electronic device, the electronic device can execute the steps in the OTA upgrade method.

[0158] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0159] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0160] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0161] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned OTA upgrade method, and can solve the technical problem of how to implement OTA upgrades without affecting the normal use of the device by the user. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the OTA upgrade method provided in the above-mentioned embodiment, and will not be repeated here.

[0162] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned OTA upgrade method when the computer program is executed by a processor.

[0163] The computer program product provided by this application can solve the technical problem of how to implement OTA upgrade without affecting the normal use of the device by the user. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the OTA upgrade method provided by the above embodiment, which will not be repeated here.

[0164] The above are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.

Claims

1. An OTA upgrade method, characterized in that: The OTA upgrade method comprises the following steps: When the smart device is not moved, performing a pre-OTA upgrade check on the smart device, wherein the pre-OTA upgrade check includes a device status check and a network environment check; If the verification results of the device status verification and the network environment verification are both verified to be passed, the software version to be upgraded in the smart device is upgraded according to the upgrade package obtained from the OTA cloud; If during the upgrade process of the software version to be upgraded, it is detected that the smart device starts to move, the upgrade of the software version to be upgraded is exited, and after it is detected that the smart device stops moving again and the stopping time is greater than the preset time, the step of performing OTA pre-upgrade verification on the smart device is continued until the upgrade is completed.

2. The OTA upgrade method according to claim 1, characterized in that: The step of performing OTA pre-upgrade verification on the smart device includes: Detecting whether the power consumption state of the smart device is a low power consumption state; If it is in a low power consumption state, detecting whether the remaining power value of the smart device is greater than a preset power threshold; If the remaining power value is greater than a preset power threshold, it is determined that the verification result of the device status verification of the smart device is a verification pass.

3. The OTA upgrade method according to claim 1, characterized in that: The step of performing OTA pre-upgrade verification on the smart device includes: Detecting the network status of the smart device, wherein the network status includes bandwidth and latency; If the bandwidth is greater than a preset bandwidth threshold and the delay is less than a preset delay threshold, it is determined that the verification result of the network environment verification of the smart device is a verification pass.

4. The OTA upgrade method according to claim 1, characterized in that: The upgrade package includes a whole package or a differential package. Before the step of upgrading the software version to be upgraded in the smart device according to the upgrade package obtained from the OTA cloud, the step includes: Receive a whole package or a differential package sent by the OTA cloud, wherein, when the OTA cloud detects that the software version of at least one application software in the smart device is different from the latest software version of the application software, it detects whether the difference between the latest software version and the software version is greater than a preset difference threshold; if the difference is greater than the preset difference threshold, compress the latest software version according to a preset high compression ratio algorithm to obtain a whole package; if the difference is less than or equal to the preset difference threshold, compress the difference version data between the latest software version and the software version according to a preset differential compression algorithm to obtain a differential package.

5. The OTA upgrade method according to claim 1, characterized in that: The step of exiting the upgrade of the software version to be upgraded includes: The upgrade process of the software version to be upgraded is interrupted, and an interruption node in the upgrade process is determined, a breakpoint mark is assigned to the interruption node, and the breakpoint mark corresponding to the interruption node is added to the upgrade progress record corresponding to the software version to be upgraded.

6. The OTA upgrade method according to claim 1, characterized in that: The step of upgrading the software version to be upgraded in the smart device using the upgrade package obtained in the OTA cloud includes: Detecting whether there is a breakpoint mark in the upgrade progress record corresponding to the software version to be upgraded; If there is a breakpoint mark, the remaining upgrade data corresponding to the breakpoint mark in the upgrade package is determined according to a preset breakpoint resume mode, and the software version to be upgraded is upgraded according to the remaining upgrade data.

7. The OTA upgrade method according to claim 1, characterized in that: The OTA upgrade method further includes: During the upgrade process of the software version to be upgraded, detecting the posture parameters of the smart device in real time; If the posture parameter is updated, determining that the smart device starts to move, and executing the step of exiting the upgrade of the software version to be upgraded; If the posture parameters are not updated within a preset time range, it is determined that the smart device has not moved, and the step of performing OTA pre-upgrade verification on the smart device is continued until the upgrade is completed.

8. An OTA upgrade device, characterized in that: The OTA upgrade device comprises: A verification module, used to perform a pre-OTA upgrade verification on the smart device when the smart device is not moved, wherein the pre-OTA upgrade verification includes a device status verification and a network environment verification; An upgrade module, configured to upgrade the software version to be upgraded in the smart device according to the upgrade package obtained from the OTA cloud if the verification results of the device status verification and the network environment verification are both verified to be passed; The re-upgrade module is used to exit the upgrade of the software version to be upgraded if it is detected that the smart device starts to move during the upgrade process of the software version to be upgraded, and continue to perform the steps of pre-OTA upgrade verification of the smart device after detecting that the smart device stops moving again and the stopping time is greater than a preset time until the upgrade is completed.

9. An electronic device, characterized in that: The electronic device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the OTA upgrade method according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the OTA upgrade method according to any one of claims 1 to 7 are implemented.