OTA upgrading method and equipment of intelligent equipment, medium and program product
By managing function sets and upgrade packages in the OTA server, smart devices can be upgraded when function files are not in use, solving the high upgrade risk problem caused by dual-system switching and achieving imperceptible device upgrades.
Patent Information
- Application Number
- CN202510882013.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-09-30
AI Technical Summary
In the existing technology, OTA upgrades of smart devices require dual system switching, which leads to high upgrade risks and may affect user usage.
By placing function sets and upgrade packages in the OTA server, smart devices will first upgrade unused function files after obtaining the upgrade package or version number, and then upgrade the used function files after they are used, avoiding system switching.
It reduces upgrade risks, ensures the continuous availability of user functions, and improves the reliability and efficiency of upgrades.
Smart Images

Figure CN120730291A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of smart home / intelligent family technology, and in particular to an OTA upgrade method, device, medium, and program product for smart devices. Background Art
[0002] Over-the-Air (OTA) technology is a technology that transmits data to devices through wireless communication networks (such as Wi-Fi, cellular networks, etc.) to update software or firmware. This method can be used in smart devices so that users can update the device's software without physical connection.
[0003] The existing technology for seamless over-the-air downloading requires that smart devices have two systems; one system is in an active state and is used to provide services, etc.; the other system is in an inactive state and is used for backup and upgrades. The inactive system is switched to an active state after the upgrade, and the originally active system is switched to an inactive state. The granularity of the two systems is too large, the upgrade risk is high, and the system switching may affect user usage.
[0004] Therefore, this application proposes an OTA upgrade method for smart devices to solve the above problems. Summary of the Invention
[0005] The present application provides an OTA upgrade method, device, medium and program product for a smart device, which is used to solve the problem in the prior art that the upgrade risk is high and the system switching may affect user use.
[0006] In a first aspect, the present application provides an OTA upgrade method for a smart device, characterized in that it is applied to the smart device and includes:
[0007] Obtain the OTA upgrade package or OTA upgrade version number from the OTA server;
[0008] Upon obtaining the OTA upgrade package, determining each target upgrade function file from the OTA upgrade package; upon obtaining the OTA upgrade version number, determining an identifier of each target upgrade function file from the functions to be upgraded, and obtaining, from the OTA server, target upgrade function files corresponding to all target upgrade functions based on the identifier;
[0009] When the functions corresponding to one or more target upgrade function files are in use, the functions corresponding to other target upgrade function files that are not in use are upgraded, and after the functions corresponding to the one or more target upgrade function files are used up, the functions corresponding to the corresponding target upgrade function files are upgraded.
[0010] In one possible implementation, obtaining the OTA upgrade package or OTA upgrade version number from the OTA server includes:
[0011] Based on the trigger condition, initiating an upgrade query request to the OTA server, and obtaining the OTA upgrade package or the OTA upgrade version number fed back by the OTA server, wherein the upgrade query request is used to request obtaining the OTA upgrade package or the OTA upgrade version number;
[0012] The trigger condition includes one of the following conditions: a preset period, or detecting a successful network connection.
[0013] In one possible implementation, upon obtaining the OTA upgrade package, determining each target upgrade function file from the OTA upgrade package includes:
[0014] If the function meets a first preset upgrade condition, the function is determined to be a function to be upgraded, and each target upgrade function file corresponding to the function to be upgraded is determined from the OTA upgrade package; wherein the first preset upgrade condition includes: a first preset range of function usage frequency and / or a user's desired upgrade;
[0015] When the OTA upgrade version number is obtained, the identifier of each target upgrade function file is determined from the functions to be upgraded, including:
[0016] If the function meets the second preset upgrade condition, the function is determined to be a function to be upgraded, and the identifier of each target upgrade function file is determined from the functions to be upgraded; wherein the second preset upgrade condition includes: a second preset range of function usage frequency and / or the user's expected upgrade and / or the usage time range corresponding to the function.
[0017] In one possible implementation, when the OTA upgrade package is obtained, the method further includes:
[0018] The OTA upgrade package is reserved according to a preset time, and the OTA upgrade package is deleted until the target upgrade function in the OTA upgrade package is upgraded or the preset time is reached.
[0019] In one possible implementation, obtaining the OTA upgrade package or OTA upgrade version number from the OTA server includes:
[0020] Initiate an upgrade query request to the OTA server, so that the OTA server obtains the OTA upgrade package corresponding to the smart device based on the upgrade query request, and returns the OTA upgrade package to the smart device when the memory occupied by the OTA upgrade package corresponding to the smart device is less than or equal to a first threshold or the upgrade frequency of the function in the OTA upgrade package corresponding to the smart device is greater than or equal to a second threshold; return the OTA upgrade version number to the smart device when the memory occupied by the OTA upgrade package corresponding to the smart device is greater than the first threshold and the upgrade frequency of each function in the OTA upgrade package corresponding to the smart device is less than the second threshold.
[0021] In a second aspect, the present application provides an OTA upgrade method for a smart device, characterized in that it is applied to an OTA server and includes:
[0022] Determining a function set of the smart device according to a device type corresponding to the smart device, wherein the function set includes multiple functions corresponding to the smart device;
[0023] Creating an OTA upgrade package and an OTA upgrade version number according to at least one function to be upgraded in the function set, wherein the OTA upgrade package includes target upgrade function files corresponding to each function to be upgraded, and the OTA upgrade version number includes the version number corresponding to each function to be upgraded;
[0024] Send the OTA upgrade package or OTA upgrade version number to the smart device, so that the smart device is used to:
[0025] Upon obtaining the OTA upgrade package, determining each target upgrade function file from the OTA upgrade package; upon obtaining the OTA upgrade version number, determining an identifier of each target upgrade function file from the functions to be upgraded, and obtaining, from the OTA server, target upgrade function files corresponding to all target upgrade functions based on the identifier;
[0026] When the functions corresponding to one or more target upgrade function files are in use, the functions corresponding to other target upgrade function files that are not in use are upgraded, and after the functions corresponding to the one or more target upgrade function files are used up, the functions corresponding to the corresponding target upgrade function files are upgraded.
[0027] In one possible implementation, determining a function set of the smart device according to a device type corresponding to the smart device includes:
[0028] Acquire a sub-function set of the smart device according to a device type corresponding to the smart device, wherein the sub-function set includes a plurality of sub-functions;
[0029] Grouping multiple sub-functions in the sub-function set, each group of sub-functions forming one function;
[0030] The smart device uses one function in the function set at any time during operation.
[0031] In a third aspect, the present application provides an electronic device, comprising: at least one processor and a memory;
[0032] The memory stores computer-executable instructions;
[0033] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the OTA upgrade method for the smart device as described above.
[0034] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the OTA upgrade method for a smart device as described above.
[0035] In a fifth aspect, the present application provides a computer program product, which includes instructions. When the instructions are executed on an electronic device, the electronic device implements the OTA upgrade method for a smart device as described above.
[0036] The present application provides an OTA upgrade method, device, medium and program product for a smart device, which obtains an OTA upgrade package or OTA upgrade version number from an OTA server; when the OTA upgrade package is obtained, each target upgrade function file is determined from the OTA upgrade package; when the OTA upgrade version number is obtained, the identifier of each target upgrade function file is determined from the functions to be upgraded, and the target upgrade function files corresponding to all target upgrade functions are obtained from the OTA server according to the identifier; when the functions corresponding to one or more target upgrade function files are in use, the functions corresponding to other target upgrade function files that are not in use are upgraded, and after the functions corresponding to the one or more target upgrade function files are used up, the functions corresponding to the corresponding target upgrade function files are upgraded.
[0037] In the above method, a dual system is not configured, but a function set and an OTA upgrade package are arranged in the OTA server; the OTA upgrade package or the OTA upgrade version number is obtained from the OTA server, and when the OTA upgrade package is obtained, each target upgrade function file is determined from the OTA upgrade package, or when the OTA upgrade version number is obtained, the identifier of each target upgrade function file is determined from each function to be upgraded, and the target upgrade function files corresponding to all target upgrade functions are obtained from the OTA server according to the identifier; during the upgrade process, the functions to be upgraded that are not in use in the system of the smart device can be upgraded first, and the functions to be upgraded that are in use can be upgraded after use. In this way, small function points can be upgraded, which is conducive to upgrading without affecting the use of functions and reducing upgrade risks. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0039] Figure 1 A hardware environment diagram for OTA upgrade of a smart device provided in an embodiment of the present application;
[0040] Figure 2 Schematic diagram of the process of OTA upgrade method of a smart device provided in the embodiment of the present application Figure 1 ;
[0041] Figure 3 A schematic diagram of an OTA upgrade scenario for a smart device provided in an embodiment of the present application;
[0042] Figure 4 Schematic diagram of the process of OTA upgrade method of a smart device provided in the embodiment of the present application Figure 2 ;
[0043] Figure 5 An example diagram of a function set provided in an embodiment of the present application;
[0044] Figure 6 An example diagram of an OTA upgrade package provided in an embodiment of the present application;
[0045] Figure 7 An OTA upgrade device for a smart device provided by an embodiment of the present invention Figure 1 ;
[0046] Figure 8An OTA upgrade device for a smart device provided by an embodiment of the present invention Figure 2 ;
[0047] Figure 9 A hardware diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0048] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0049] It should be noted that the terms "first", "second" etc. of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable in appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprise" and "have" and any of their variations are intended to cover non-exclusive inclusions, for example, the process, method, system, product or equipment comprising a series of steps or units need not be limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or that are intrinsic to these processes, methods, products or equipment.
[0050] Common over-the-air downloading in existing technologies requires smart devices to have two systems; one system is in an active state, that is, in the working area, used for services, etc.; the other system is in an inactive state, that is, in the standby area, used for backup and upgrades. While the active system is working, the inactive system can be upgraded when needed. The upgraded standby area system can be switched to the active state at an appropriate time, and the active system can be switched to the inactive state at the same time. However, the granularity of the two systems is too large (i.e., the data volume is large), the upgrade risk is high, and the system switching may affect user experience.
[0051] Or some smart devices have specifically designed non-dual system seamless over-the-air download methods, but they lack universality and can only be used in specific smart devices.
[0052] Therefore, the present application proposes a universal and seamless over-the-air download method that does not require dual systems and reduces risks.
[0053] The following describes an implementation process of an OTA upgrade method for a smart device proposed in this application with reference to the accompanying drawings and specific embodiments.
[0054] Figure 1 A hardware environment diagram for OTA upgrade of a smart device provided in an embodiment of the present application; according to one aspect of an embodiment of the present application, an OTA upgrade method for a smart device is provided. The OTA upgrade method for a smart device is widely used in smart home (Smart Home), smart home, smart home device ecology, smart residence (IntelligenceHouse) ecology and other whole-house smart digital control application scenarios. Optionally, in this embodiment, the OTA upgrade method for the smart device can be applied to Figure 1 In the hardware environment shown in FIG. 1 , which is composed of a terminal device 102 and a server 104. Figure 1 As shown, the server 104 is connected to the terminal device 102 via a network, and can be used to provide services (such as application services, etc.) for the terminal or a client installed on the terminal. A database can be set up on the server or independently of the server to provide data storage services for the server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data computing services for the server 104.
[0055] The aforementioned network may include, but is not limited to, at least one of the following: a wired network and a wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: a wide area network, a metropolitan area network, and a local area network. The aforementioned wireless network may include, but is not limited to, at least one of the following: Wi-Fi (Wireless Fidelity) and Bluetooth. The terminal device 102 may include, but is not limited to, a PC, a mobile phone, a tablet computer, a smart air conditioner, a smart range hood, a smart refrigerator, a smart oven, a smart stove, a smart washing machine, a smart water heater, a smart washing machine, a smart dishwasher, a smart projector, a smart TV, a smart clothes drying rack, smart curtains, a smart audio / video system, a smart socket, a smart speaker, a smart fresh air system, smart kitchen and bathroom equipment, smart bathroom equipment, a smart robot vacuum, a smart window cleaning robot, a smart robot mop, a smart air purifier, a smart steamer, a smart microwave oven, a smart kitchen appliance, a smart purifier, a smart water dispenser, a smart door lock, and the like.
[0056] Figure 2 Schematic diagram of the process of OTA upgrade method of a smart device provided in the embodiment of the present application Figure 1 . Figure 3 A schematic diagram of an OTA upgrade scenario for a smart device provided in an embodiment of the present application. Figure 2 and Figure 3 As shown, applied to a smart device, the method includes:
[0057] S201. Obtain an OTA upgrade package or OTA upgrade version number from an OTA server.
[0058] The OTA server can be set up in the cloud server, and the OTA server can define function sets according to the device type; smart devices of different device types have corresponding functions, that is, packaged functions for providing specific services to users; because the functions corresponding to smart devices of each device type are different, the functions of the corresponding smart devices can be packaged according to the device type corresponding to the smart device to obtain multiple function sets, each function set has at least one function; for example, standard wash and quick wash on a washing machine can be two different functions.
[0059] The OTA upgrade package includes the upgrade function files corresponding to each function to be upgraded, and the OTA upgrade version number includes the version number corresponding to each function to be upgraded. Due to the different contents of the OTA upgrade package and the OTA upgrade version number, the methods for obtaining the upgrade function files are different. To obtain the upgrade function files via the OTA upgrade package, the upgrade function files must first be downloaded to the smart device, temporarily occupying a large amount of memory on the smart device. To obtain the upgrade function files via the OTA upgrade version number, the version number must first be given to the smart device, temporarily occupying a small amount of memory on the smart device.
[0060] For example, obtaining the OTA upgrade package or OTA upgrade version number from the OTA server includes:
[0061] Initiate an upgrade query request to the OTA server, so that the OTA server obtains the OTA upgrade package corresponding to the smart device based on the upgrade query request, and returns the OTA upgrade package to the smart device when the memory occupied by the OTA upgrade package corresponding to the smart device is less than or equal to a first threshold or the upgrade frequency of the function in the OTA upgrade package corresponding to the smart device is greater than or equal to a second threshold; return the OTA upgrade version number to the smart device when the memory occupied by the OTA upgrade package corresponding to the smart device is greater than the first threshold and the upgrade frequency of each function in the OTA upgrade package corresponding to the smart device is less than the second threshold.
[0062] The smart device sends an upgrade query request to the OTA server to inquire whether there is an available upgrade. The OTA server obtains the OTA upgrade package corresponding to the smart device based on the received query request. The upgrade function file is in the OTA upgrade package.
[0063] If the size of the OTA upgrade package (the storage space it occupies) is less than or equal to a preset first threshold, or the upgrade frequency of certain functions in the upgrade package (which can be the number of times these functions are updated or their importance) is greater than or equal to a preset second threshold, the OTA upgrade package can be directly fed back to the smart device so that the smart device can be upgraded as soon as possible.
[0064] If the size of the OTA upgrade package is greater than the first threshold and the upgrade frequency of certain functions in the upgrade package is less than the second threshold, the OTA upgrade version number can be fed back to the smart device first, and then the upgrade function file can be obtained based on the OTA upgrade version number.
[0065] Based on the trigger, the smart device can obtain the OTA upgrade package or OTA upgrade version number from the OTA server:
[0066] For example, obtaining an OTA upgrade package or an OTA upgrade version number from an OTA server includes:
[0067] Based on the trigger condition, an upgrade query request is initiated to the OTA server, and the upgrade package OTA upgrade package or the upgrade version number OTA upgrade version number fed back by the OTA server is obtained, wherein the upgrade query request is used to request the upgrade package OTA upgrade package or the upgrade version number OTA upgrade version number;
[0068] The trigger condition includes one of the following conditions: a preset period, or detecting a successful network connection.
[0069] The trigger condition for the smart device to obtain the OTA upgrade package or OTA upgrade version number can be to set a preset period on the smart device. At each preset period, the smart device initiates an upgrade query request to the OTA server and waits for the upgrade package OTA upgrade package or upgrade version number OTA upgrade version number to be fed back by the OTA server; or, when the smart device detects that the network connection is successful, it initiates an upgrade query request to the OTA server and waits for the upgrade package OTA upgrade package or upgrade version number OTA upgrade version number to be fed back by the OTA server.
[0070] S202. When the OTA upgrade package is obtained, each target upgrade function file is determined from the OTA upgrade package; when the OTA upgrade version number is obtained, the identifier of each target upgrade function file is determined from the functions to be upgraded, and the target upgrade function files corresponding to all target upgrade functions are obtained from the OTA server according to the identifier.
[0071] Whether a smart device obtains an OTA upgrade package or an OTA upgrade version number depends on the device's needs. If the smart device has sufficient memory and a good network connection, the target upgrade function files can be obtained through the OTA upgrade package. This means downloading the OTA upgrade package packaged by the OTA server for the smart device and identifying each target upgrade function file in it.
[0072] If the smart device has a small memory and a relatively poor network connection, you can obtain the target upgrade function file by upgrading the version number via OTA. That is, first download the version number, then search the OTA server for the target upgrade function file based on the version number, and then download the update function.
[0073] For example, upon obtaining the OTA upgrade package, determining each target upgrade function file from the OTA upgrade package and determining the target upgrade function from the functions to be upgraded include:
[0074] If the function meets a first preset upgrade condition, determining the function as a function to be upgraded, and determining each target upgrade function file corresponding to the function to be upgraded from the OTA upgrade package; wherein the first preset upgrade condition includes: a first preset range of function usage frequency and / or a user's desired upgrade;
[0075] Upon obtaining the OTA upgrade version number, determining the identifier of each target upgrade function file from the functions to be upgraded. Determining the target upgrade function from the functions to be upgraded includes:
[0076] If a function meets the second preset upgrade condition, the function is determined to be a function to be upgraded, and the identifier of each target upgrade function file is determined from the functions to be upgraded; wherein the second preset upgrade condition includes: a second preset range of function usage frequency and / or the user's expectation of upgrade and / or the usage time range corresponding to the function. In the case where the smart device obtains an OTA upgrade package, it is necessary to confirm each target upgrade function file to be used from the multiple upgrade function files in the OTA upgrade package. The confirmation method is to select the function that meets the first preset upgrade condition from the smart device as the function to be upgraded, and the function to be upgraded corresponds to a target upgrade function file in the OTA upgrade package for the smart device upgrade;
[0077] The first preset upgrade condition includes: the first preset range of function usage frequency and / or user expectation of upgrade. When the usage frequency of each function to be upgraded reaches the first preset range, it is determined to need to be upgraded, or the user hopes that a certain function needs to be upgraded frequently, and it can be marked as a frequently upgraded function. When the frequently upgraded function has a corresponding target upgrade function file and is not in use, it will be upgraded; the first preset range of function usage frequency and user expectation of upgrade can coexist.
[0078] The upgrade version number is used to identify the version of the entire OTA upgrade package or upgrade process. It can help the system determine the difference between the current device's software version and the available upgrade version. The identifier is used to identify specific functional files or components. In an OTA upgrade package, there may be multiple functional files, each with its own specific identifier, so that these files can be accurately obtained and updated during the upgrade process. When the smart device obtains the OTA upgrade version number, the function is determined to be the function to be upgraded based on whether the function meets the second preset upgrade condition. According to the identifier of each target upgrade function file corresponding to the function to be upgraded, the target upgrade function files corresponding to all target upgrade functions can be obtained from the OTA server for smart device upgrades.
[0079] The second preset upgrade condition includes: a second preset range of function usage frequency and / or the user's expected upgrade and / or the usage time range corresponding to the function; the usage time range corresponding to the function can be the season. In summer, the heating-related functions can be set to not update, and in winter, the heating-related functions can be set to be frequently updated, so as to reduce unnecessary updates.
[0080] S203. When one or more functions corresponding to the target upgrade function files are in use, upgrade the functions corresponding to other target upgrade function files that are not in use, and after the one or more functions corresponding to the target upgrade function files are used up, upgrade the functions corresponding to the corresponding target upgrade function files.
[0081] When a smart device is updating its functions, some functions to be upgraded may be running. In this case, without disturbing their operation, the functions not in use can be updated first, and the target upgrade function files corresponding to the functions not in use can be used to upgrade them. The remaining functions to be upgraded that are in use can be upgraded immediately after the functions have finished running.
[0082] If a smart device receives an OTA upgrade package but does not use it in a timely manner, the smart device will not retain the OTA upgrade package:
[0083] For example, when the OTA upgrade package is obtained, the method further includes:
[0084] The OTA upgrade package is reserved according to a preset time, and the OTA upgrade package is deleted until the target upgrade function in the OTA upgrade package is upgraded or the preset time is reached.
[0085] If the OTA upgrade package is not used and updated within the preset time length, the OTA upgrade package will be deleted. Alternatively, if the OTA upgrade package is used within the preset time length, it can be deleted immediately after use to clear the cache in time to avoid excessive memory usage.
[0086] In the embodiment of the present application, a dual system is not configured, but a function set and an upgrade package OTA upgrade package are arranged in the OTA server; the OTA upgrade package or the OTA upgrade version number is obtained from the OTA server, and when the OTA upgrade package is obtained, each target upgrade function file is determined from the OTA upgrade package, or when the OTA upgrade version number is obtained, the identifier of each target upgrade function file is determined from each function to be upgraded, and the target upgrade function files corresponding to all target upgrade functions are obtained from the OTA server according to the identifier; during the upgrade process, the functions to be upgraded that are not in use in the system of the smart device can be upgraded first, and the functions to be upgraded that are in use can be upgraded after use. In this way, small function points can be upgraded, which is conducive to upgrading without affecting the use of functions and reducing upgrade risks.
[0087] Figure 4 Schematic diagram of the process of OTA upgrade method of a smart device provided in the embodiment of the present application Figure 2 .like Figure 4 As shown, applied to an OTA server, the method includes:
[0088] S401: Determine a function set of the smart device according to a device type corresponding to the smart device, wherein the function set includes multiple functions corresponding to the smart device.
[0089] OTA services can be set up in cloud servers, and OTA services can define function sets based on device types. Smart devices of different device types have corresponding functions, that is, packaged functions for providing specific services to users. Because the functions corresponding to smart devices of each device type are different, the functions of the corresponding smart devices can be packaged according to the device type corresponding to the smart devices to obtain multiple function sets, each function set has at least one function. For example, standard wash and quick wash on a washing machine can be two different functions.
[0090] S402. Create an OTA upgrade package and an OTA upgrade version number based on at least one function to be upgraded in the function set, wherein the OTA upgrade package includes target upgrade function files corresponding to each function to be upgraded, and the OTA upgrade version number includes version numbers corresponding to each function to be upgraded.
[0091] The OTA service can create OTA upgrade packages based on function sets; smart devices correspond to multiple function sets, some of which may need to be upgraded. These function sets that need to be upgraded have corresponding target upgrade function files; all target upgrade function files are packaged to obtain an OTA upgrade package; when there are multiple or only one target upgrade function files, they can be packaged into one OTA upgrade package; one function corresponds to one target upgrade function file.
[0092] S403: Send the OTA upgrade package or the OTA upgrade version number to the smart device.
[0093] Send the OTA upgrade package or OTA upgrade version number to the smart device, so that the smart device is used to:
[0094] Upon obtaining the OTA upgrade package, determining each target upgrade function file from the OTA upgrade package; upon obtaining the OTA upgrade version number, determining an identifier of each target upgrade function file from the functions to be upgraded, and obtaining, from the OTA server, target upgrade function files corresponding to all target upgrade functions based on the identifier;
[0095] When the functions corresponding to one or more target upgrade function files are in use, the functions corresponding to other target upgrade function files that are not in use are upgraded, and after the functions corresponding to the one or more target upgrade function files are used up, the functions corresponding to the corresponding target upgrade function files are upgraded.
[0096] Smart devices can pull OTA upgrade packages from the OTA service and split the OTA upgrade packages according to the function set definition, separating out multiple target upgrade function files corresponding to the function sets to be upgraded; if the separated target upgrade function files have corresponding functions that are being used by the smart device, then they can be marked as not upgraded and upgraded at a suitable time; if the separated target upgrade function files have corresponding functions that are not being used by the smart device, then they can be upgraded directly without affecting the currently used functions.
[0097] In the embodiment of the present application, a dual system is not configured, but a function set and an OTA upgrade package are arranged in the OTA service; function sets are created for different smart devices according to the device type corresponding to the smart device, and the functions are packaged in a manner suitable for the device type; the function set is used as the minimum upgrade unit. If there is a function set that needs to be upgraded, the target upgrade function file corresponding to the function set to be upgraded is packaged as an OTA upgrade package; the OTA upgrade package is sent to the smart device for upgrading. During the upgrade process, the function set to be upgraded that is not in use in the system of the smart device can be upgraded first. In this way, upgrading with small function points can reduce the upgrade risk and will not affect the use of functions.
[0098] For example, determining the function set of the smart device according to the device type corresponding to the smart device includes:
[0099] Acquire a sub-function set of the smart device according to a device type corresponding to the smart device, wherein the sub-function set includes a plurality of sub-functions;
[0100] Grouping multiple sub-functions in the sub-function set, each group of sub-functions forming one function;
[0101] The smart device uses one function in the function set at any time during operation.
[0102] Smart devices of different types have different sub-function sets, each of which includes multiple sub-functions. The service scope implemented by each function can be defined in the OTA service. For example, the functions of a washing machine include smart delivery and smart washing, and smart washing includes standard washing and quick washing. Here, it can be defined as two sub-functions including smart delivery and smart washing, or three sub-functions including smart delivery, standard washing, and quick washing.
[0103] There are multiple sub-functions in the sub-function set. You can group them directly into a function set according to each function, or you can group them according to actual engineering requirements and engineering experience:
[0104] For example, the grouping of the multiple functions of the sub-function set to obtain the multiple function sets includes:
[0105] Obtaining the number of functions accommodated by each group based on the device computing capability, wherein the device computing capability includes the computing capability of the smart device and / or the computing capability of the device that creates the OTA upgrade package;
[0106] The multiple functions of the sub-function set are grouped according to the accommodated quantity to obtain multiple function sets.
[0107] The device where the OTA service is located is the device that creates the OTA upgrade package. The device computing capability can consider any one or more of the computing capability of the smart device and the computing capability of the device that creates the OTA upgrade package; based on the selected device computing capability, confirm the number of functions that each function set can accommodate, and obtain the function capacity of each group; each function set accommodates the corresponding functions according to the capacity.
[0108] Functions may be packaged into a function set in such a way that each function set is not used simultaneously in the smart device.
[0109] By defining the function set and the functions therein in an appropriate manner, the smart device can understand the scope of different function sets according to the defined function sets, which is convenient for upgrading by function sets.
[0110] In one embodiment, the smart device identifies the target upgrade function file according to the identifier:
[0111] For example, the OTA upgrade package further includes an identifier corresponding to at least one function to be upgraded; and the method further includes:
[0112] Send a corresponding function definition to the smart device, where the function definition is used to indicate the identifiers of multiple functions in the function set of the smart device, so that after obtaining the OTA upgrade package, the smart device can determine the target upgrade function file corresponding to at least one function to be upgraded from the OTA upgrade package according to the function definition.
[0113] The identifier is the unique identifier of the target upgrade function file. The smart device can find the corresponding target upgrade function file based on the identifier. When the smart device needs to be upgraded, it obtains the function definition from the OTA service;
[0114] Each function set has at least one function. If a function set has multiple functions, not all functions need to be updated together. First, confirm the new version of the function to be upgraded, and then replace the original function with the new version in the function set to obtain the target upgraded function file.
[0115] Regardless of whether there is one or more target upgrade function files, they can be packaged into an OTA upgrade package and actively sent to the smart device, or the smart device can actively obtain the OTA upgrade package.
[0116] Alternatively, in one embodiment, the OTA upgrade package may be packaged into multiple:
[0117] For example, the OTA upgrade package carries the version number corresponding to the OTA upgrade package and the version number corresponding to each function to be upgraded, so that the smart device stores the version number corresponding to the OTA upgrade package and the version number corresponding to each function to be upgraded, and initiates an upgrade request when any stored version number is inconsistent with the corresponding version number in the OTA service.
[0118] If some functions are not updated in time, it may affect the use, while some functions may have little impact. In this case, different preset priorities can be set. Functions that need to be upgraded in time can be set with higher preset priorities so that they can be updated first. Function sets corresponding to functions with the same preset priority can be created in the same OTA upgrade package and sent to smart devices for upgrade. In this way, instead of upgrading all functions at the same time, some functions with high preset priorities can be upgraded first, which allows functions with high preset priorities to be upgraded faster.
[0119] If the smart device finds that the version number corresponding to its stored OTA upgrade package and the version number corresponding to each function to be upgraded are lower than the corresponding version number in the OTA service, it can initiate a request to obtain the OTA upgrade package corresponding to the new version number.
[0120] After packaging the function set in an appropriate manner, and confirming the function set to be upgraded based on the functions to be upgraded, an OTA upgrade package is assembled according to the function set to be upgraded for use in smart device upgrades.
[0121] Figure 5 An example diagram of a function set provided for an embodiment of the present application. Figure 6 This is an example diagram of an OTA upgrade package provided in the embodiment of the present application. Figure 5 and Figure 6 As shown, taking a washing machine as an example, developers can set the definition of each function set on the management platform where the OTA server is located:
[0122] Remote control definition: Users can remotely control the operation of the washing machine through a mobile phone APP, monitor the washing progress and make adjustments anytime and anywhere, and flexibly respond to different washing needs.
[0123] Smart delivery definition: Automatically measures the amount of laundry and detergent required, ensuring the cleaning effect while saving users the trouble of adding detergent themselves.
[0124] Definition of smart washing: It can automatically adjust washing parameters according to the material and degree of stains of clothes, and use additives such as color liquid and flame retardant liquid to achieve better washing results.
[0125] Set up the OTA upgrade package according to the function set. For example, the OTA upgrade package v5.1 includes the target upgrade function files: smart delivery v2.3 and the smart washing v3.5 to be upgraded. Among them, each time there is a function upgrade (not necessarily all functions are upgraded), a new OTA upgrade package will be generated, so the version number of the OTA upgrade package (such as v5.1) will be greater than the version number of the function point (such as v2.3, v3.5).
[0126] Figure 7 An OTA upgrade device for a smart device provided by an embodiment of the present invention Figure 1 ,like Figure 7 As shown, the apparatus is applied to a smart device and includes: an acquisition module 701, a first processing module 702, and an upgrade module 703;
[0127] The acquisition module 701 is used to obtain the OTA upgrade package or the OTA upgrade version number from the OTA server.
[0128] The first processing module 702 is used to determine each target upgrade function file from the OTA upgrade package when the OTA upgrade package is obtained; when the OTA upgrade version number is obtained, determine the identifier of each target upgrade function file from the functions to be upgraded, and obtain the target upgrade function files corresponding to all target upgrade functions from the OTA server according to the identifier.
[0129] The upgrade module 703 is used to upgrade the corresponding functions of other target upgrade function files that are not in use when the corresponding functions of one or more target upgrade function files are in use, and to upgrade the corresponding functions of the corresponding target upgrade function files after the corresponding functions of the one or more target upgrade function files have been used.
[0130] Figure 8 An OTA upgrade device for a smart device provided by an embodiment of the present invention Figure 2 ,like Figure 8 As shown, applied to an OTA server, the device includes: a determination module 801, a second processing module 802 and a third processing module 803;
[0131] The determination module 801 is configured to determine a function set of the smart device according to a device type corresponding to the smart device, wherein the function set includes multiple functions corresponding to the smart device.
[0132] The second processing module 802 is used to create an OTA upgrade package and an OTA upgrade version number based on at least one function to be upgraded in the function set, wherein the OTA upgrade package includes target upgrade function files corresponding to each function to be upgraded, and the OTA upgrade version number includes version numbers corresponding to each function to be upgraded.
[0133] The third processing module 803 is configured to send the OTA upgrade package or the OTA upgrade version number to the smart device, so that the smart device is used to:
[0134] Upon obtaining the OTA upgrade package, determining each target upgrade function file from the OTA upgrade package; upon obtaining the OTA upgrade version number, determining an identifier of each target upgrade function file from the functions to be upgraded, and obtaining, from the OTA server, target upgrade function files corresponding to all target upgrade functions based on the identifier;
[0135] When the functions corresponding to one or more target upgrade function files are in use, the functions corresponding to other target upgrade function files that are not in use are upgraded, and after the functions corresponding to the one or more target upgrade function files are used up, the functions corresponding to the corresponding target upgrade function files are upgraded.
[0136] The present application also provides an electronic device, comprising: at least one processor and a memory;
[0137] The memory stores computer-executable instructions;
[0138] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the OTA upgrade method for the smart device.
[0139] Figure 9 Schematic diagram of the hardware of the electronic device provided by the embodiment of the present invention. Figure 9 As shown, the electronic device 90 provided in this embodiment includes: at least one processor 901 and a memory 902. The device 90 also includes a communication component 903. The processor 901, the memory 902, and the communication component 903 are connected via a bus 904.
[0140] In a specific implementation process, at least one processor 901 executes the computer-executable instructions stored in the memory 902, so that at least one processor 901 executes the above-mentioned OTA upgrade method for smart devices.
[0141] The specific implementation process of the processor 901 can be found in the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here in this embodiment.
[0142] In the above Figure 9In the illustrated embodiment, it should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASICs), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention may be directly executed by a hardware processor or by a combination of hardware and software modules within the processor.
[0143] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage.
[0144] A bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be categorized as address buses, data buses, and control buses. For ease of illustration, the buses in the drawings of this application are not limited to just one bus or just one type of bus.
[0145] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the method described above is implemented.
[0146] The computer-readable storage medium mentioned above can be implemented by any type of volatile or non-volatile memory device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The computer-readable storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0147] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be an integral part of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0148] The division of units described above is merely a logical functional division. In actual implementation, other divisions may be employed. For example, multiple units or components may be combined or integrated into another system, or some features may be omitted or not implemented. Furthermore, any coupling or direct coupling or communication connection shown or discussed between units may be an indirect coupling or communication connection via an interface, device, or unit, and may be electrical, mechanical, or other.
[0149] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0150] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0151] Finally, it should be noted that other embodiments of the present invention will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structure described above and shown in the drawings. Various modifications and variations may be made without departing from the scope of the present invention.
Claims
1. A method for OTA upgrade of a smart device, characterized in that: Applied to smart devices, including: Obtain the OTA upgrade package or OTA upgrade version number from the OTA server; Upon obtaining the OTA upgrade package, determining each target upgrade function file from the OTA upgrade package; upon obtaining the OTA upgrade version number, determining an identifier of each target upgrade function file from the functions to be upgraded, and obtaining, from the OTA server, target upgrade function files corresponding to all target upgrade functions based on the identifier; When the functions corresponding to one or more target upgrade function files are in use, the functions corresponding to other target upgrade function files that are not in use are upgraded, and after the functions corresponding to the one or more target upgrade function files are used up, the functions corresponding to the corresponding target upgrade function files are upgraded.
2. The method according to claim 1, characterized in that Obtain the OTA upgrade package or OTA upgrade version number from the OTA server, including: Based on the trigger condition, initiating an upgrade query request to the OTA server, and obtaining the OTA upgrade package or the OTA upgrade version number fed back by the OTA server, wherein the upgrade query request is used to request obtaining the OTA upgrade package or the OTA upgrade version number; The trigger condition includes one of the following conditions: a preset period, or detecting a successful network connection.
3. The method according to claim 1, characterized in that When the OTA upgrade package is obtained, each target upgrade function file is determined from the OTA upgrade package, including: If the function meets a first preset upgrade condition, the function is determined to be a function to be upgraded, and each target upgrade function file corresponding to the function to be upgraded is determined from the OTA upgrade package; wherein the first preset upgrade condition includes: a first preset range of function usage frequency and / or a user's desired upgrade; When the OTA upgrade version number is obtained, the identifier of each target upgrade function file is determined from the functions to be upgraded, including: If the function meets the second preset upgrade condition, the function is determined to be a function to be upgraded, and the identifier of each target upgrade function file is determined from the functions to be upgraded; wherein the second preset upgrade condition includes: a second preset range of function usage frequency and / or the user's expected upgrade and / or the usage time range corresponding to the function.
4. The method according to claim 1, wherein When the OTA upgrade package is obtained, the method further includes: The OTA upgrade package is reserved according to a preset time, and the OTA upgrade package is deleted until the target upgrade function in the OTA upgrade package is upgraded or the preset time is reached.
5. The method according to claim 1, wherein Obtain the OTA upgrade package or OTA upgrade version number from the OTA server, including: Initiate an upgrade query request to the OTA server, so that the OTA server obtains the OTA upgrade package corresponding to the smart device based on the upgrade query request, and returns the OTA upgrade package to the smart device when the memory occupied by the OTA upgrade package corresponding to the smart device is less than or equal to a first threshold or the upgrade frequency of the function in the OTA upgrade package corresponding to the smart device is greater than or equal to a second threshold; return the OTA upgrade version number to the smart device when the memory occupied by the OTA upgrade package corresponding to the smart device is greater than the first threshold and the upgrade frequency of each function in the OTA upgrade package corresponding to the smart device is less than the second threshold.
6. A method for OTA upgrade of a smart device, characterized in that: Applied to OTA servers, including: Determining a function set of the smart device according to a device type corresponding to the smart device, wherein the function set includes multiple functions corresponding to the smart device; Creating an OTA upgrade package and an OTA upgrade version number according to at least one function to be upgraded in the function set, wherein the OTA upgrade package includes target upgrade function files corresponding to each function to be upgraded, and the OTA upgrade version number includes the version number corresponding to each function to be upgraded; Send the OTA upgrade package or OTA upgrade version number to the smart device, so that the smart device is used to: Upon obtaining the OTA upgrade package, determining each target upgrade function file from the OTA upgrade package; upon obtaining the OTA upgrade version number, determining an identifier of each target upgrade function file from the functions to be upgraded, and obtaining, from the OTA server, target upgrade function files corresponding to all target upgrade functions based on the identifier; When the functions corresponding to one or more target upgrade function files are in use, the functions corresponding to other target upgrade function files that are not in use are upgraded, and after the functions corresponding to the one or more target upgrade function files are used up, the functions corresponding to the corresponding target upgrade function files are upgraded.
7. The method according to claim 6, characterized in that Determine the function set of the smart device based on the device type corresponding to the smart device, including: Acquire a sub-function set of the smart device according to a device type corresponding to the smart device, wherein the sub-function set includes a plurality of sub-functions; Grouping multiple sub-functions in the sub-function set, each group of sub-functions forming one function; The smart device uses one function in the function set at any time during operation.
8. An electronic device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the OTA upgrade method for the smart device according to any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the OTA upgrade method for a smart device as described in any one of claims 1 to 7 are implemented.
10. A computer program product, characterized in that The computer program product includes instructions, and when the instructions are executed on an electronic device, the electronic device implements the OTA upgrade method for a smart device according to any one of claims 1 to 7.
Citation Information
Patent Citations
OTA upgrading method for MCU firmware
CN111769962A
Vehicle OTA upgrade control method and related equipment
CN116643775A
Vehicle software upgrading method and device, equipment and storage medium
CN119065692A
Electronic rearview mirror upgrading method and device, electronic equipment and storage medium
CN119512596A
Partition upgrading method and device for vehicle-mounted service, computer equipment and storage medium
CN119902788A
Cited By
Upgrading method, system and device of privatized smart home center and medium
CN122240157A