WO2021249266A1 - 系统更新方法、装置、电子设备和计算机可读存储介质 - Google Patents
系统更新方法、装置、电子设备和计算机可读存储介质 Download PDFInfo
- Publication number
- WO2021249266A1 WO2021249266A1 PCT/CN2021/098029 CN2021098029W WO2021249266A1 WO 2021249266 A1 WO2021249266 A1 WO 2021249266A1 CN 2021098029 W CN2021098029 W CN 2021098029W WO 2021249266 A1 WO2021249266 A1 WO 2021249266A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- update
- file
- path
- storage area
- module
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 64
- 230000006870 function Effects 0.000 claims description 68
- 238000004590 computer program Methods 0.000 claims description 12
- 238000011084 recovery Methods 0.000 claims description 11
- 238000012795 verification Methods 0.000 claims description 4
- 238000005192 partition Methods 0.000 description 16
- 239000010410 layer Substances 0.000 description 11
- 238000010586 diagram Methods 0.000 description 9
- 230000008569 process Effects 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 5
- 238000012545 processing Methods 0.000 description 4
- 239000012792 core layer Substances 0.000 description 3
- 230000007246 mechanism Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000010276 construction Methods 0.000 description 2
- 230000007613 environmental effect Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 239000011230 binding agent Substances 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000017525 heat dissipation Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
Definitions
- This application relates to the field of computer technology, and in particular to a system update method, device, electronic equipment, and computer-readable storage medium.
- the current system software update is mainly through OTA (Over the Air, air download technology) to update the whole package or differential update; no matter which method, you need to enter the recovery mode (recovery) to upgrade; even if you update a file, you also need Download-restart into the recovery update to achieve the update.
- OTA Over the Air, air download technology
- the purpose of this application is to provide a system update method, device, electronic equipment, and computer-readable storage medium, which can improve the convenience of system update.
- an embodiment of the present application provides a system update method, including:
- the target function is updated according to the system update path after the handover.
- the update boot file includes: an update path and a download address of the module update file; the determination of the resource storage area containing the update file according to the update boot file includes:
- the module update file is stored in the resource storage area.
- the system update method provided in this embodiment can construct the latest resource storage area dedicated to storing the update files by analyzing the update boot file, so that it is convenient for the system to accurately obtain the latest update file when it needs to be updated. Can improve the accuracy of system updates.
- the storing the module update file in the resource storage area includes:
- the updating the target function according to the system update path after the handover includes:
- the update file corresponding to the target function is read from the system update path to update the target function.
- the constructing a resource storage area according to the update path includes:
- the updating the target function according to the system update path after the handover includes:
- the target function is updated according to the switched system update path.
- the system update method provided in this embodiment determines whether the currently running firmware is the latest firmware, and when the currently running firmware is the latest firmware, updates each function in the system, thereby reducing the need for lower firmware versions. After the update is performed, since there is a newer version of the firmware, the firmware needs to be updated again, and redundant function update actions are performed, which causes a waste of resources.
- the update path of the switching system to the path where the resource storage area is located includes:
- the probability that the update file is a complete file can be increased, so that the accuracy of the system update can be improved.
- the method further includes:
- update boot file contains a firmware download address, download the update file of the firmware
- the system update method provided in this embodiment first determines whether the firmware needs to be updated. When the firmware needs to be updated, the firmware can be updated first. After the firmware is updated, the validity of the update file in the system update path is determined, thereby improving The effectiveness of the function update improves the accuracy of the function update.
- an embodiment of the present application provides a system update device, including:
- the sending module is used to send device information to the server at the first time node
- a receiving module configured to receive an update guide file corresponding to the device information sent by the server
- An obtaining module configured to obtain a resource storage area containing an update file according to the update guide file
- a switching module for switching the system update path to the path where the resource storage area is located
- the first update module is configured to update the target function at the second time node according to the system update path after the switch.
- an embodiment of the present application provides an electronic device, including: a processor and a memory, the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the machine-readable instructions When executed by the processor, the steps of the method described in any of the foregoing embodiments are executed.
- an embodiment of the present application provides a computer-readable storage medium with a computer program stored on the computer-readable storage medium, and the computer program executes the steps of the method described in any of the foregoing embodiments when the computer program is run by a processor .
- the beneficial effect of the embodiments of the present application is that by obtaining the update file available for the device at a specified time node, when it is needed, the update file can be found from the pre-allocated storage area for storing the update file, and no download is required. -Restart into the recovery mode to update, then the software or modules in the system can be updated.
- FIG. 1 is a schematic block diagram of an electronic device provided by an embodiment of the application.
- Fig. 2 is a flowchart of a system update method provided by an embodiment of the application.
- FIG. 3 is a detailed flowchart of step 203 of the system update method provided by an embodiment of the application.
- Fig. 4 is a partial flowchart of a system update method provided by an embodiment of the application.
- FIG. 5 is a schematic diagram of functional modules of a system update apparatus provided by an embodiment of the application.
- the electronic device 100 may include a memory 111 and a processor 113.
- the structure shown in FIG. 1 is only for illustration, and does not limit the structure of the electronic device 100.
- the electronic device 100 may also include more or fewer components than shown in FIG. 1, or have a different configuration from that shown in FIG.
- the aforementioned components of the memory 111 and the processor 113 are directly or indirectly electrically connected to each other to realize data transmission or interaction.
- these components can be electrically connected to each other through one or more communication buses or signal lines.
- the aforementioned processor 113 is used to execute executable modules stored in the memory.
- the memory 111 may be, but is not limited to, random access memory (Random Access Memory, RAM for short), Read Only Memory (ROM for short), Programmable Read-Only Memory (PROM for short) ), Erasable Programmable Read-Only Memory (EPROM), Electric Erasable Programmable Read-Only Memory (EEPROM), etc.
- the memory 111 is used to store a program, and the processor 113 executes the program after receiving an execution instruction.
- the method executed by the electronic device 100 of the process definition disclosed in any embodiment of the present application can be applied to processing In the processor 113, or implemented by the processor 113.
- the aforementioned processor 113 may be an integrated circuit chip with signal processing capability.
- the aforementioned processor 113 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; it may also be a digital signal processor (DSP for short). ), Application Specific Integrated Circuit (ASIC for short), Field Programmable Gate Array (FPGA for short) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
- the methods, steps, and logical block diagrams disclosed in the embodiments of the present application can be implemented or executed.
- the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
- the electronic device 100 in this embodiment may be a projector.
- the projector may also include components such as a collection unit and an optical machine.
- the aforementioned collection unit is used to collect environmental data around the electronic device 100.
- the environmental data may include an image of the projection area.
- the foregoing optical machine may include DMD (Digital Micromirror Device) display core, light source, lens optical path and other mechanisms.
- the optical engine may also include a heat dissipation mechanism and the like.
- the electronic device 100 may also be a personal computer (PC), tablet computer, smart phone, personal digital assistant (personal digital assistant, PDA) and other devices. At this time, the electronic device 100 may further include: an input and output unit and a display unit.
- PC personal computer
- PDA personal digital assistant
- the above-mentioned input and output unit is used to provide the user with input data.
- the input and output unit may be, but is not limited to, a mouse, a keyboard, and the like.
- the above-mentioned display unit provides an interactive interface (such as a user operation interface) between the electronic device 100 and the user or is used to display image data for the user's reference.
- an interactive interface such as a user operation interface
- the aforementioned program stored in the memory may include an operating system.
- the operating system may be the Android operating system.
- a system patch service partition is added to the memory, and the update file downloaded from the server is placed in the system patch service partition.
- the system or function module is searched from the system patch service partition, and the update file of the corresponding module of the system patch service partition is used to complete the hot update of the code.
- the update file may be the code that needs to be updated.
- the electronic device 100 in this embodiment can be used to execute each step in each method provided in the embodiment of this application.
- the following describes the implementation process of the system update method in detail through several embodiments.
- This embodiment first introduces some concepts.
- Hot fix A technology that allows the installed client to be dynamically updated by issuing a patch package, so that users can fix software defects without reinstalling the APP.
- FIG. 2 is a flowchart of a system update method provided by an embodiment of the present application. The specific process shown in FIG. 2 will be described in detail below.
- Step 201 At the first time node, send device information to the server.
- the aforementioned first time node may be when the electronic device is started; or when the designated button is triggered.
- the device information may include: firmware version number, model name (modelname), product name (productname), patch version (patchver) and other information.
- the aforementioned device information may also include the names of programs or functional modules in the device that need to be updated.
- the device information may include: model, serial number, wired and wireless MAC (Media Access Control Address, LAN address), version number, area code, Android Ver, system root identification and other information.
- model serial number
- wired and wireless MAC Media Access Control Address, LAN address
- version number version number
- area code Android Ver
- system root identification other information.
- the aforementioned device information may also include the current remaining space in the storage area for storing the update file, and the like.
- Step 202 Receive an update guide file corresponding to the device information sent by the server.
- the aforementioned update guide file may include the download address of the update file of the function that needs to be updated, MD5 (Message-Digest Algorithm), and the storage path of the update file.
- MD5 Message-Digest Algorithm
- the download address of the update file of the updated function may include: the download address of the patch used by the application layer (System Apps), the download address of the patch used by the interface layer (Java API Framework), and the core layer (Linux Kernel). ) One or more of the download address of the patch that needs to be used, the download address of the patch that needs to be used by the native library (Native C/C++Libraries), and the download address of the patch that needs to be used by the Hardware Abstraction Layer (Hardware Abstraction Layer) address.
- the application layer may include one or more of applications such as dialer, email, calendar, and camera.
- the core layer may include one or more of audio, Binder communication mechanism, display technology, and the like.
- the interface layer may include: Content Providers, View System, Resource, Telephony, Window, Notification, Package, etc. One or more.
- the local library layer may include: one or more of webkit, OpenMAX AL, Libc, Media Framework, OpenGL ES, and so on.
- the hardware abstraction layer may include one or more of audio (Audio), Bluetooth (Bluetooth), camera (Camera), and sensors (Sensors).
- Audio Audio
- Bluetooth Bluetooth
- Camera Camera
- Sensors Sensors
- the update boot file may be an xml file.
- the update boot file can be a patch_xxxx.xml file.
- the aforementioned update boot file may also include the download address of the firmware update file.
- Step 203 Obtain a resource storage area containing the update file according to the update guide file.
- the update file may be a patch of a function in the firmware, or an update file of the firmware version.
- the update file may be the update code of the function that needs to be updated.
- the update boot file may include: an update path and a download address of the module update file.
- step 203 may include the following steps.
- Step 2031 Construct a resource storage area according to the update path.
- a system patch service partition can be set for storing update files in advance.
- a resource storage area can be constructed in a storage area of a designated size according to the update path.
- the storage area of the designated size may be the aforementioned system patch service partition.
- the size of the system patch service partition may be a preset size.
- the size of the system patch service partition can be 100M, 200M, etc.
- the historical update file may be deleted, so that the remaining space of the system patch service partition meets the storage requirement of the current update file.
- the update file with the earliest download time may be deleted, so that the remaining space of the system patch service partition meets the storage requirement of the current update file.
- the resource storage area may be named after time, for example, p20200311.
- the updated boot file can also be stored in the resource storage area.
- Step 2032 parse the update boot file to obtain the download address of the module update file.
- Step 2033 Download the module update file according to the download address.
- Step 2034 Store the module update file in the resource storage area.
- the update file stored in the resource storage area may be provided with an identifier.
- the identifier of each update file is used to indicate the function to which the update file corresponds.
- step 2034 may include the following steps.
- Step a Set an update flag for the module update file.
- the update identifier may use the name of the function corresponding to the module update file.
- the update identifier may use a matching identifier of the function corresponding to the module update file.
- the above-mentioned module update file may be an update code corresponding to a function.
- Step b Store the update identifier and the module update file in the resource storage area.
- Step 204 Switch the system update path to the path where the resource storage area is located.
- the current system update path may be the path where the previously created resource storage area is located. Then the system update path can be switched from the path where the previously created resource storage area is located to the path where the current resource storage area is located.
- the current system update path can point to the file P20200101, and the newly created resource storage area is P20200201, then the system update path can be switched from P20200101 to P20200201.
- P20200101 and P20200201 can represent folder names.
- the integrity of the update file can also be checked.
- step 204 may include: using an information digest algorithm to verify the update file; after the verification is successful, switching the system update path to the path where the resource storage area is located.
- the information digest algorithm can be used to check the integrity of multiple update files one by one.
- the files are all updated files in the newly constructed resource storage area. Therefore, the multiple resource storage areas in the system patch service partition take effect only for the newly created resource storage area.
- Step 205 At the second time node, update the target function according to the system update path after the handover.
- the aforementioned second time node may be a time node after the electronic device is started and the latest resource storage area is constructed.
- the aforementioned second time node may be when any function in the electronic device is activated.
- the aforementioned second time node may also be when the operating system of the electronic device is restarted.
- the aforementioned target function may be any software function in the electronic device.
- any part of the application layer, interface layer, core layer, local library, and hardware abstraction layer can be updated at the second time node.
- Step 205 may include: when a target function is activated, searching from the system update path whether there is an update identifier corresponding to the target function; if the corresponding update identifier exists, reading all updates from the system update path.
- the update file corresponding to the target function is used to update the target function.
- any update file in the resource storage area pointed to by the system update path may not be executed, and the designated function is Start with the original path.
- the method of updating the target module in step 205 may be by executing the content in the update file to realize the update of the target function.
- Bluetooth App Application
- Bluetooth App is based on bluetooth.apk, and its storage location is relatively relatively large. fixed. If the update file in the resource storage area is the update file of the Bluetooth APP, when the Bluetooth App is started, the Bluetooth App directly obtains the update file from the resource storage area according to the current system update path, and executes it to realize the update of the Bluetooth App .
- each functional module the requirements or use conditions of each functional module are also different, so each function can be updated when the firmware is the latest version or does not need to be updated.
- step 205 may include: determining whether the update boot file includes a firmware download address; if the update boot file does not include a firmware download address, update the target function according to the switched system update path .
- the server can send an update boot file to determine whether the firmware needs to be updated. If the firmware needs to be updated, it means that the current firmware is not the latest version; if the firmware does not need to be updated, it means that the current firmware is the latest version.
- the update boot file it is determined whether there is a firmware download address in the update boot file. If the update boot file does not contain the firmware download address, it means that the current firmware does not need to be updated, and it means that the current firmware is the latest version ; If the update boot file contains the firmware download address, it means that the current firmware needs to be updated, which means that the current firmware is not the latest version.
- system update method in this embodiment may further include the following steps.
- Step 206 Determine whether the update boot file contains a firmware download address.
- step 207 is executed.
- Step 207 download the update file of the firmware.
- Step 208 Determine whether the update file in the system update path is a valid update file of the latest firmware.
- step 209 is executed. If the update file in the system update path is a valid update file of the latest firmware, step 210 is executed.
- Step 209 Delete the update file in the system update path.
- Step 210 Use the recovery mode to update the firmware using the firmware update file.
- the firmware update can be updated in an update manner different from that of other functions.
- the firmware update may be performed in a recovery mode (recovery) mode.
- the method in this embodiment directly replaces the entire file as a whole by updating the file replacement form to achieve the function update, which is different from the existing function-based level, which changes the hook implementation when the function is loaded; the existing function implementation method is different Terminal manufacturers have customized parts that cannot be implemented; such as wifi drivers.
- the system patch service partition adopted in the embodiment of this application realizes hot/cold update of multiple objects according to the system classification (the update priority of firmware is higher than the update priority of other functions), which is different from the prior art only for APP or other Individual or specific objects, the methods provided in the embodiments of this application are more adaptable.
- a system patch service partition independent of the original android system is provided, and the partition can be used to store update files.
- the partition can be used to store update files.
- it is added to determine whether there is an update file in the resource storage area. If there is an update that can realize the function unconsciously, there is no need to enter the independent Recovery mode.
- the embodiment of the application also provides a system update device corresponding to the system update method. Since the device in the embodiment of the application solves the problem in principle similar to the foregoing embodiment of the system update method, in this embodiment
- the implementation of the device can refer to the description in the embodiment of the above method, and the repetition will not be repeated.
- FIG. 5 is a schematic diagram of the functional modules of the system update apparatus provided by the embodiment of the present application.
- Each module in the system update apparatus in this embodiment is used to execute each step in the foregoing method embodiment.
- the system update device includes: a sending module 301, a receiving module 302, an obtaining module 303, a switching module 304, and a first update module 305; among them,
- the sending module 301 is used to send device information to the server at the first time node;
- the receiving module 302 is configured to receive an update guide file corresponding to the device information sent by the server;
- the obtaining module 303 is configured to obtain the resource storage area containing the update file according to the update guide file;
- the switching module 304 is configured to switch the system update path to the path where the resource storage area is located;
- the first update module 305 is configured to update the target function according to the system update path after the switch at the second time node.
- the update guide file includes: an update path and a download address of the module update file;
- the obtaining module 303 includes: a construction unit, a parsing unit, a download unit, and a storage unit;
- a parsing unit configured to parse the update guide file to obtain the download address of the module update file
- the download unit is configured to download the module update file according to the download address
- the storage unit is configured to store the module update file in the resource storage area.
- the storage unit is used for:
- the first update module 305 is used to:
- the update file corresponding to the target function is read from the system update path to update the target function.
- the building unit is used to:
- the switching module 304 is configured to:
- the target function is updated according to the switched system update path.
- the switching module 304 is configured to:
- system update apparatus in this embodiment may further include:
- the first judgment module is used to judge whether the update boot file contains a firmware download address
- the download module is used to download the firmware update file if the update boot file contains the firmware download address
- the second judgment module is used to judge whether the update file in the system update path is a valid update file of the latest firmware
- a deletion module configured to delete the update file in the system update path if the update file in the system update path is not a valid update file for the latest firmware
- the second update module is used to update the firmware using the update file of the firmware in the recovery mode.
- an embodiment of the present application also provides a computer-readable storage medium having a computer program stored on the computer-readable storage medium, and the computer program executes the steps of the system update method described in the above method embodiment when the computer program is run by a processor. .
- the computer program product of the system update method provided by the embodiment of the present application includes a computer-readable storage medium storing program code.
- the program code includes instructions that can be used to execute the steps of the system update method described in the above method embodiment For details, please refer to the above method embodiment, which will not be repeated here.
- each block in the flowchart or block diagram may represent a module, program segment, or part of the code, and the module, program segment, or part of the code contains one or more modules for realizing the specified logical function.
- Executable instructions may also occur in a different order from the order marked in the drawings.
- each block in the block diagram and/or flowchart, and the combination of the blocks in the block diagram and/or flowchart can be implemented by a dedicated hardware-based system that performs the specified functions or actions Or it can be realized by a combination of dedicated hardware and computer instructions.
- the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist alone, or two or more modules may be integrated to form an independent part.
- the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer readable storage medium.
- the technical solution of this application essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
- the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disks or optical disks and other media that can store program codes.
- ROM read-only memory
- RAM random access memory
- relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply one of these entities or operations. There is any such actual relationship or order between.
- the terms “including”, “including” or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device that includes a series of elements includes not only those elements, but also those that are not explicitly listed Other elements of, or also include elements inherent to this process, method, article or equipment. If there are no more restrictions, the element defined by the sentence "including" does not exclude the existence of other same elements in the process, method, article, or equipment that includes the element.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
本申请提供了一种系统更新方法、装置、电子设备和计算机可读存储介质,其中,该方法包括:在第一时间节点,向服务器发送设备信息;接收服务器发送的关于设备信息对应的更新引导文件;根据更新引导文件得到包含更新文件的资源存储区域;切换系统更新路径至资源存储区域所在路径;在第二时间节点,根据切换后的系统更新路径对目标功能进行更新。通过本实施例中的方法,能提高系统更新的便利性。
Description
本申请涉及计算机技术领域,具体而言,涉及一种系统更新方法、装置、电子设备和计算机可读存储介质。
当前系统软件更新主要是通过OTA(Over the Air,空中下载技术)的方式更新整包或差分更新;不管是那种方式,都需要进入恢复模式(recovery)进行升级;即使更新一个文件,也需要下载-重启进recovery更新,以实现更新。
申请内容
本申请的目的在于提供一种系统更新方法、装置、电子设备和计算机可读存储介质,能够提高系统更新的便利性。
第一方面,本申请实施例提供一种系统更新方法,包括:
在第一时间节点,向服务器发送设备信息;
接收所述服务器发送的关于所述设备信息对应的更新引导文件;
根据所述更新引导文件得到包含更新文件的资源存储区域;
切换系统更新路径至所述资源存储区域所在路径;
在第二时间节点,根据切换后的所述系统更新路径对目标功能进行更新。
在可选的实施方式中,所述更新引导文件包括:更新路径、模块更新文件的下载地址;所述根据所述更新引导文件确定包含更新文件的资源存储区域,包括:
根据所述更新路径构建资源存储区域;
对所述更新引导文件进行解析,以得到所述模块更新文件的所述下载地址;
根据所述下载地址下载所述模块更新文件;
将所述模块更新文件存储至所述资源存储区域中。
本实施例提供的系统更新方法,通过对更新引导文件的解析,从而可以构建专门用于存放更新文件的最新的资源存储区域,从而可以方便系统在需要更新时能够准确获取最新的更新文件,从而可以提高系统更新的准确性。
在可选的实施方式中,所述将所述模块更新文件存储至所述资源存储区域中,包括:
为所述模块更新文件设置更新标识;
将所述更新标识与所述模块更新文件存入所述资源存储区域中;
所述根据切换后的所述系统更新路径对目标功能进行更新,包括:
在启动一目标功能时,从所述系统更新路径查找是否存在与所述目标功能对应的更新标识;
若存在所述对应的更新标识,则从所述系统更新路径读取所述目标功能对应的更新文件,以对所述目标功能进行更新。
本实施例提供的系统更新方法,通过为更新文件设置更新标识,从而可以方便对应的功能能够根据更新标识,更准确地获得需要使用的更新文件。
在可选的实施方式中,所述根据所述更新路径构建资源存储区域,包括:
在指定大小的存储区域中根据所述更新路径构建资源存储区域。
本实施例提供的系统更新方法,通过设定用于存放更新文件的大小,从而可以避免更新文件占用较大的存储区域。
在可选的实施方式中,所述根据切换后的所述系统更新路径对目标功能进行更新,包括:
判断所述更新引导文件中是否包含固件下载地址;
若所述更新引导文件中不包含固件下载地址,则根据切换后的所述系统更新路径对目标功能进行更新。
本实施例提供的系统更新方法,通过确定当前运行的固件是不是最新的固件,在当前运行的固件是最新固件的情况下,再进行系统中各功能进行更新,从而减少对较低版本的固件进行更新后,由于有更新版本的固件,又需要再次对固件更新,则进行多余功能更新动作,造成资源的浪费。
在可选的实施方式中,所述切换系统更新路径至所述资源存储区域所在路径,包括:
使用信息摘要算法,对所述更新文件进行校验;
校验成功后,切换系统更新路径至所述资源存储区域所在路径。
本实施例提供的系统更新方法,通过对更新文件进行校验,从而可以增加更新文件是完整文件的概率,从而可以提高系统更新的准确性。
在可选的实施方式中,所述方法还包括:
判断所述更新引导文件中是否包含固件下载地址;
若所述更新引导文件中包含固件下载地址,则下载固件的更新文件;
判断所述系统更新路径中的更新文件是否为所述最新固件有效的更新文件;
若所述系统更新路径中的更新文件不为所述最新固件有效的更新文件,则删除所述系统更新路径中的更新文件;
采用恢复模式使用所述固件的更新文件对固件进行更新。
本实施例提供的系统更新方法,通过先判断固件是否需要更新,在固件需要更新时,可以先对固件进行更新,在固件更新后对系统更新路径内的更新文件进行有效性判断,从而可以提高功能更新的有效性,提高功能更新的准确率。
第二方面,本申请实施例提供一种系统更新装置,包括:
发送模块,用于在第一时间节点,向服务器发送设备信息;
接收模块,用于接收所述服务器发送的关于所述设备信息对应的更新引导文件;
得到模块,用于根据所述更新引导文件得到包含更新文件的资源存储区域;
切换模块,用于切换系统更新路径至所述资源存储区域所在路径;
第一更新模块,用于在第二时间节点,根据切换后的所述系统更新路径对目标功能进行更新。
第三方面,本申请实施例提供一种电子设备,包括:处理器、存储器,所述存储器存储有所述处理器可执行的机器可读指令,当电子设备运行时,所述机器可读指令被所述处理器执行时执行如前述实施方式任一所述的方法的步骤。
第四方面,本申请实施例提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行如前述实施方式任一所述的方法的步骤。
本申请实施例的有益效果是:通过在指定时间节点获取可用于设备的更新文件,在需要使用时,则可以从预先分配的用于存放更新文件的存储区域中寻找更新文件,则不需要下载-重启进恢复模式更新,就能够实现系统中的软件或模块的更新。
为了更清楚地说明本申请实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本申请的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。
图1为本申请实施例提供的电子设备的方框示意图。
图2为本申请实施例提供的系统更新方法的流程图。
图3为本申请实施例提供的系统更新方法的步骤203的详细流程图。
图4为本申请实施例提供的系统更新方法的部分流程图。
图5为本申请实施例提供的系统更新装置的功能模块示意图。
下面将结合本申请实施例中附图,对本申请实施例中的技术方案进行描述。
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。同时,在本申请的描述中,术语“第一”、“第二”等仅用于区分描述,而不能理解为指示或暗示相对重要性。
实施例一
为便于对本实施例进行理解,首先对执行本申请实施例所公开的系统更新方法的电子设备进行详细介绍。
如图1所示,是电子设备的方框示意图。电子设备100可以包括存储器111、处理器113。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对电子设备100的结构造成限定。例如,电子设备100还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。
上述的存储器111、处理器113各元件相互之间直接或间接地电性连接,以实现数据的传输或交互。例如,这些元件相互之间可通过一条或多条通讯总线或信号线实现电性连接。上述的处理器113用于执行存储器中存储的可执行模块。
其中,存储器111可以是,但不限于,随机存取存储器(Random Access Memory,简称RAM),只读存储器(Read Only Memory,简称ROM),可编程只读存储器(Programmable Read-Only Memory,简称PROM),可擦除只读存储器(Erasable Programmable Read-Only Memory,简称EPROM),电可擦除只读存储器(Electric Erasable Programmable Read-Only Memory,简称EEPROM)等。其中,存储器111用于存储程序,所述处理器113在 接收到执行指令后,执行所述程序,本申请实施例任一实施例揭示的过程定义的电子设备100所执行的方法可以应用于处理器113中,或者由处理器113实现。
上述的处理器113可能是一种集成电路芯片,具有信号的处理能力。上述的处理器113可以是通用处理器,包括中央处理器(Central Processing Unit,简称CPU)、网络处理器(Network Processor,简称NP)等;还可以是数字信号处理器(digital signal processor,简称DSP)、专用集成电路(Application Specific Integrated Circuit,简称ASIC)、现场可编程门阵列(Field Programmable Gate Array,简称:FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
可选地,本实施例中的电子设备100可以是投影仪。示例性地,若电子设备100为投影仪时,投影仪则还可以包括采集单元、光机等组件。
上述的采集单元用于采集电子设备100周边的环境数据。示例性地,该环境数据可以包括投影区域的图像。
示例性地,上述的光机可以包括DMD(Digital Micromirror Device,数字微镜器件)显示核心、光源、镜头光路等机构。可选地,光机中还可以包括散热机构等。
可选地,电子设备100还可以是个人电脑(personal computer,PC)、平板电脑、智能手机、个人数字助理(personal digital assistant,PDA)等设备。此时,电子设备100还可以包括:输入输出单元、显示单元。
上述的输入输出单元用于提供给用户输入数据。所述输入输出单元可以是,但不限于,鼠标和键盘等。
上述的显示单元在电子设备100与用户之间提供一个交互界面(例如用户操作界面)或用于显示图像数据给用户参考。
可选地,上述的存储器存储的程序可以包括操作系统。示例性地,操作系统可以是Android操作系统。
本实施例中,存储器中增设一个系统补丁服务分区,将从服务器中下载的更新文件放置在系统补丁服务分区中。对应的系统或功能模块被启动时,系统或功能模块从系统补丁服务分区寻找,使用系统补丁服务分区的对应模块的更新文件,以此完成了代码的热更新。可选地,更新文件可以是需要更新的代码。
本实施例中的电子设备100可以用于执行本申请实施例提供的各个方法中的各个步骤。下面通过几个实施例详细描述系统更新方法的实现过程。
实施例二
本实施例首先对一些概念进行介绍。
热修复:通过下发补丁包,让已安装的客户端动态更新,让用户可以不用重新安装APP,就能够修复软件缺陷的一种技术。
请参阅图2,是本申请实施例提供的系统更新方法的流程图。下面将对图2所示的具体流程进行详细阐述。
步骤201,在第一时间节点,向服务器发送设备信息。
可选地,上述的第一时间节点可以是电子设备启动时;还可以是指定按钮被触发时。
示例性地,设备信息可包括:固件版本号、型号名称(modelname)、产品名称(productname)、补丁版本(patchver)等信息。
可选地,上述的设备信息还可以包括该设备中需要更新的程序或功能模块的名称。
在一个实例中,若电子设备是Android手机。则设备信息可以包括:机型、序列号、有线和无线MAC(Media Access Control Address,局域网地址)、版本号、区域码、Android Ver、系统root标识等信息。
可选地,上述的设备信息还可以包括用于存放更新文件的存储区域中当前剩余空间等。
步骤202,接收所述服务器发送的关于所述设备信息对应的更新引导文件。
本实施例中,上述的更新引导文件可以包含需要更新的功能的更新文件的下载地址、MD5(Message-Digest Algorithm,信息摘要算法)、以及更新文件的存储路径。
示例性地,更新的功能的更新文件的下载地址可以包括:应用层(System Apps)需要使用的补丁的下载地址、接口层(Java API Framework)需要使用的补丁的下载地址、核心层(Linux Kernel)需要使用的补丁的下载地址、本地库(Native C/C++Libraries)需要使用的补丁的下载地址、硬件抽象层(Hardware Abstraction Layer)需要使用的补丁的下载地址中的一种或多种地址。
示例性地,应用层中可以包括:拨号盘(Dialer)、邮件(Email)、日历(calendar)、相机(Camera)等应用中的一种或多种。
示例性地,核心层可以包括:音频(Audio)、Binder通信机制、display技术等中的一种或多种。
示例性地,接口层可以包括:内容提供(Content Providers)、视图系统(View System)、资源(resource)、电话(telephony)、窗口(window)、通知(notification)、包(package)等中的一种或多种。
示例性地,本地库层可以包括:webkit、OpenMAX AL、Libc、Media Framework、OpenGL ES等中的一种或多种。
示例性地,硬件抽象层可以包括:音频(Audio)、蓝牙(Bluetooth)、相机(Camera)、传感器(Sensors)中的一种或多种。
在一个实例中,更新引导文件可以是xml文件。例如,更新引导文件可以是patch_xxxx.xml文件。
可选地,上述的更新引导文件也可以包含固件更新文件的下载地址。
步骤203,根据所述更新引导文件得到包含更新文件的资源存储区域。
可选地,更新文件可以是固件中的一个功能的补丁,也可以是固件版本的更新文件。
可选地,更新文件可以是需要更新的功能的更新代码。
在一种实施方式中,更新引导文件可以包括:更新路径、模块更新文件的下载地址。如图3所示,步骤203可以包括以下步骤。
步骤2031,根据所述更新路径构建资源存储区域。
可选地,可以预先为存放更新文件设置系统补丁服务分区。
因此,可以在在指定大小的存储区域中根据所述更新路径构建资源存储区域。该指定大小的存储区域可以是上述的系统补丁服务分区。
示例性地,系统补丁服务分区的大小可以是预先设定的大小。例如,系统补丁服务分区的大小可以是100M、200M等大小。
可选地,若系统补丁服务分区的剩余空间已经不满足当前的更新文件的存储需求,则可以将历史更新文件进行删除,以使系统补丁服务分区的剩余空间满足当前的更新文件的存储需求。示例性地,可以删除下载时间最早的更新文件,以使系统补丁服务分区的剩余空间满足当前的更新文件的存储需求。
可选地,该资源存储区域的命名可以以时间命名,例如,p20200311。
进一步地,还可以将更新引导文件存储至资源存储区域中。
步骤2032,对所述更新引导文件进行解析,以得到所述模块更新文件的所述下载地址。
步骤2033,根据所述下载地址下载所述模块更新文件。
步骤2034,将所述模块更新文件存储至所述资源存储区域中。
可选地,存入资源存储区域中的更新文件可以设置有标识。示例性地,每个更新文件的标识用于表示该更新文件对应所属的功能。
在一实施方式中,步骤2034可以包括以下步骤。
步骤a,为所述模块更新文件设置更新标识。
可选地,更新标识可以使用模块更新文件对应的功能的名称。可选地,更新标识可以使用模块更新文件对应的功能的匹配的标识符。
可选地,上述的模块更新文件可以是对应一功能的更新代码。
步骤b,将所述更新标识与所述模块更新文件存入所述资源存储区域中。
步骤204,切换系统更新路径至所述资源存储区域所在路径。
可选地,当前的系统更新路径可以是之前创建的资源存储区域所在路径。则可以将系统更新路径由之前创建的资源存储区域所在路径切换至当前的资源存储区域所在路径。
示例性地,当前的系统更新路径可以是指向文件P20200101,最新创建的资源存储区域是P20200201,则可以将系统更新路径由P20200101切换至P20200201。其中,P20200101和P20200201可以表示文件夹名。
可选地,在切换系统更新路径之前还可以对更新文件的完整性进行检测。
可选地,步骤204可以包括:使用信息摘要算法,对所述更新文件进行校验;校验成功后,切换系统更新路径至所述资源存储区域所在路径。
当下载了多个更新文件时,则可以使用信息摘要算法逐一对多个更新文件的完整性进行检测。
本实施例中,系统补丁服务分区中可能存在一个或多个资源存储区域,但是由于在每次创建新的资源存储区域后,会将系统更新路径进行切换,以使能够实现功能模块更新的更新文件均为最新构建的资源存储区域中的更新文件。因此,在系统补丁服务分区中的多个资源存储区域生效的仅为最新创建的资源存储区域。
步骤205,在第二时间节点,根据切换后的所述系统更新路径对目标功能进行更新。
可选地,上述的第二时间节点可以是在电子设备启动后,且构建最新的资源存储区域后的时间节点。
可选地,上述的第二时间节点可以是在电子设备中的任意一功能被启动时。
可选地,上述的第二时间节点还可以是电子设备的操作系统被重启时。
可选地,上述的目标功能可以是电子设备中的任一软件功能。
示例性地,则可以在第二时间节点对应用层、接口层、核心层、本地库、硬件抽象层中的任意部分进行更新。
可选地,当资源存储区域中的更新文件设置有对应的标识时,则可以对根据标识在资源存储区域查找需要的更新文件。步骤205可以包括:在启动一目标功能时,从所述系统更新路径查找是否存在与所述目标功能对应的更新标识;若存在所述对应的更新标识,则从所述系统更新路径读取所述目标功能对应的更新文件,以对所述目标功能进行更新。
可选地,就其中一指定功能而言,当系统更新路径指向的资源存储区域中不包含其更新文件时,则可以不执行系统更新路径指向的资源存储区域中的任何更新文件,按照指定功能原始的路径进行启动。
本实施例中,步骤205中对目标模块进行更新的方式可以是通过执行更新文件中的内容,以实现对目标功能的更新。
示例性地,以电子设备的操作系统是Android为例,Android启动都是以文件为基础,各模块相对较为独立;比如蓝牙App(Application,应用)以bluetooth.apk为基础,其存放位置相对较为固定。若资源存储区域中的更新文件为蓝牙APP的更新文件时,在启动蓝牙App时,蓝牙App直接从根据当前的系统更新路径从资源存储区域获得更新文件,并执行,以实现对蓝牙App的更新。
可选地,由于不同的固件的情况下,各个功能模块的需求或使用条件也不同,因此,可以在固件为最新版本、或不需要更新的情况下再对各个功能进行更新。
可选地,步骤205可以包括:判断所述更新引导文件中是否包含固件下载地址;若所述更新引导文件中不包含固件下载地址,则根据切换后的所述系统更新路径对目标功能进行更新。
可选地,可以通过服务器发送更新引导文件判断固件是否需要更新。若固件需要更新,则表示当前固件不是最新版本;若固件不需要更新,则表示当前固件是最新版本。
示例性地,通过对更新引导文件进行识别,判断更新引导文件中是否存在固件的下载地址,若更新引导文件中不包含固件下载地址,则表示当前固件不需要更新,则表示当前固件是最新版本;若更新引导文件中包含固件下载地址,则表示当前固件需要更新,则表示当前固件不是最新版本。
本实施例中,若当前固件不是最新版本,则可以先不对其它功能进行更新,先对固件进行更新。
可选地,如图4所示,本实施例中的系统更新方法还可以包括以下步骤。
步骤206,判断所述更新引导文件中是否包含固件下载地址。
若所述更新引导文件中包含固件下载地址,则执行步骤207。
步骤207,下载固件的更新文件。
步骤208,判断所述系统更新路径中的更新文件是否为所述最新固件有效的更新文件。
若所述系统更新路径中的更新文件不为所述最新固件有效的更新文件,则执行步骤209。若所述系统更新路径中的更新文件是所述最新固件有效的更新文件,则执行步骤210。
步骤209,删除所述系统更新路径中的更新文件。
步骤210,采用恢复模式使用所述固件的更新文件对固件进行更新。
本实施例中,固件更新可以采用与其它功能的更新方式不同的更新方式更新。示例性地,固件更新可以采用恢复模式(recovery)方式进行更新。
本实施例中的方法,通过更新文件替换形式,直接整体替换整个文件以实现功能的更新,区别于现有的基于函数级别,在函数加载的时候改变hook实现;现有的函数的实现方式对于终端厂家有定制的部分,无法实现;比如wifi驱动。本申请实施例采用的系统补丁服务分区根据系统分级(固件的更新优先级高于其它功能的更新优先级),实现多种对象的热/冷更新,与现有技术中的仅仅针对APP或者其他单独或者特定对象,本申请实施例提供的方式适应性更强。
本实施例中,提供了独立于原有android系统之外的一个系统补丁服务分区,该分区可以用于存放更新文件。在启动每一个功能时,增加可以从而资源存储区域中确定是否有更新文件,如果有可以无感知的实现功能的更新,不需要进入独立的Recovery模式。
实施例三
基于同一申请构思,本申请实施例中还提供了与系统更新方法对应的系统更新装置,由于本申请实施例中的装置解决问题的原理与前述的系统更新方法实施例相似,因此本实施例中的装置的实施可以参见上述方法的实施例中的描述,重复之处不再赘述。
请参阅图5,是本申请实施例提供的系统更新装置的功能模块示意图。本实施例中的系统更新装置中的各个模块用于执行上述方法实施例中的各个步骤。系统更新装置包括:发送模块301、接收模块302、得到模块303、切换模块304以及第一更新模块305;其中,
发送模块301,用于在第一时间节点,向服务器发送设备信息;
接收模块302,用于接收所述服务器发送的关于所述设备信息对应的更新引导文件;
得到模块303,用于根据所述更新引导文件得到包含更新文件的资源存储区域;
切换模块304,用于切换系统更新路径至所述资源存储区域所在路径;
第一更新模块305,用于在第二时间节点,根据切换后的所述系统更新路径对目标功能进行更新。
一种可能的实施方式中,所述更新引导文件包括:更新路径、模块更新文件的下载地址;得到模块303包括:构建单元、解析单元、下载单元以及存储单元;
构建单元,用于根据所述更新路径构建资源存储区域;
解析单元,用于对所述更新引导文件进行解析,以得到所述模块更新文件的所述下载地址;
下载单元,用于根据所述下载地址下载所述模块更新文件;
存储单元,用于将所述模块更新文件存储至所述资源存储区域中。
一种可能的实施方式中,存储单元,用于:
为所述模块更新文件设置更新标识;
将所述更新标识与所述模块更新文件存入所述资源存储区域中;
第一更新模块305,用于:
在启动一目标功能时,从所述系统更新路径查找是否存在与所述目标功能对应的更新标识;
若存在所述对应的更新标识,则从所述系统更新路径读取所述目标功能对应的更新文件,以对所述目标功能进行更新。
一种可能的实施方式中,构建单元,用于:
在指定大小的存储区域中根据所述更新路径构建资源存储区域。
一种可能的实施方式中,切换模块304,用于:
判断所述更新引导文件中是否包含固件下载地址;
若所述更新引导文件中不包含固件下载地址,则根据切换后的所述系统更新路径对目标功能进行更新。
一种可能的实施方式中,切换模块304,用于:
使用信息摘要算法,对所述更新文件进行校验;
校验成功后,切换系统更新路径至所述资源存储区域所在路径。
一种可能的实施方式中,本实施例中的系统更新装置还可以包括:
第一判断模块,用于判断所述更新引导文件中是否包含固件下载地址;
下载模块,用于若所述更新引导文件中包含固件下载地址,则下载固件的更新文件;
第二判断模块,用于判断所述系统更新路径中的更新文件是否为所述最新固件有效的更新文件;
删除模块,用于若所述系统更新路径中的更新文件不为所述最新固件有效的更新文件,则删除所述系统更新路径中的更新文件;
第二更新模块,用于采用恢复模式使用所述固件的更新文件对固件进行更新。
此外,本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行上述方法实施例中所述的系统更新方法的步骤。
本申请实施例所提供的系统更新方法的计算机程序产品,包括存储了程序代码的计算机可读存储介质,所述程序代码包括的指令可用于执行上述方法实施例中所述的系统更新方法的步骤,具体可参见上述方法实施例,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,也可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,附图中的流程图和框图显示了根据本申请的多个实施例的装置、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现方式中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
另外,在本申请各个实施例中的各功能模块可以集成在一起形成一个独立的部分,也可以是各个模块单独存在,也可以两个或两个以上模块集成形成一个独立的部分。
所述功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申 请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
以上所述仅为本申请的优选实施例而已,并不用于限制本申请,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。
Claims (10)
- 一种系统更新方法,其特征在于,包括:在第一时间节点,向服务器发送设备信息;接收所述服务器发送的关于所述设备信息对应的更新引导文件;根据所述更新引导文件得到包含更新文件的资源存储区域;切换系统更新路径至所述资源存储区域所在路径;在第二时间节点,根据切换后的所述系统更新路径对目标功能进行更新。
- 根据权利要求1所述的方法,其特征在于,所述更新引导文件包括:更新路径、模块更新文件的下载地址;所述根据所述更新引导文件确定包含更新文件的资源存储区域,包括:根据所述更新路径构建资源存储区域;对所述更新引导文件进行解析,以得到所述模块更新文件的所述下载地址;根据所述下载地址下载所述模块更新文件;将所述模块更新文件存储至所述资源存储区域中。
- 根据权利要求2所述的方法,其特征在于,所述将所述模块更新文件存储至所述资源存储区域中,包括:为所述模块更新文件设置更新标识;将所述更新标识与所述模块更新文件存入所述资源存储区域中;所述根据切换后的所述系统更新路径对目标功能进行更新,包括:在启动一目标功能时,从所述系统更新路径查找是否存在与所述目标功能对应的更新标识;若存在所述对应的更新标识,则从所述系统更新路径读取所述目标功能对应的更新文件,以对所述目标功能进行更新。
- 根据权利要求2所述的方法,其特征在于,所述根据所述更新路径构建资源存储区域,包括:在指定大小的存储区域中根据所述更新路径构建资源存储区域。
- 根据权利要求1所述的方法,其特征在于,所述根据切换后的所述系统更新路径对目标功能进行更新,包括:判断所述更新引导文件中是否包含固件下载地址;若所述更新引导文件中不包含固件下载地址,则根据切换后的所述系统更新路径对目标功能进行更新。
- 根据权利要求1所述的方法,其特征在于,所述切换系统更新路径至所述资源存储区域所在路径,包括:使用信息摘要算法,对所述更新文件进行校验;校验成功后,切换系统更新路径至所述资源存储区域所在路径。
- 根据权利要求1-6任意一项所述的方法,其特征在于,所述方法还包括:判断所述更新引导文件中是否包含固件下载地址;若所述更新引导文件中包含固件下载地址,则下载固件的更新文件;判断所述系统更新路径中的更新文件是否为最新固件有效的更新文件;若所述系统更新路径中的更新文件不为所述最新固件有效的更新文件,则删除所述系统更新路径中的更新文件;采用恢复模式使用所述固件的更新文件对固件进行更新。
- 一种系统更新装置,其特征在于,包括:发送模块,用于在第一时间节点,向服务器发送设备信息;接收模块,用于接收所述服务器发送的关于所述设备信息对应的更新引导文件;得到模块,用于根据所述更新引导文件得到包含更新文件的资源存储区域;切换模块,用于切换系统更新路径至所述资源存储区域所在路径;第一更新模块,用于在第二时间节点,根据切换后的所述系统更新路径对目标功能进行更新。
- 一种电子设备,其特征在于,包括:处理器、存储器,所述存储器存储有所述处理器可执行的机器可读指令,当电子设备运行时,所述机器可读指令被所述处理器执行时执行如权利要求1至7任一所述的方法的步骤。
- 一种计算机可读存储介质,其特征在于,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行如权利要求1至7任一所述的方法的步骤。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010539674.4 | 2020-06-12 | ||
CN202010539674.4A CN111666091B (zh) | 2020-06-12 | 2020-06-12 | 系统更新方法、装置、电子设备和计算机可读存储介质 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021249266A1 true WO2021249266A1 (zh) | 2021-12-16 |
Family
ID=72387525
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/098029 WO2021249266A1 (zh) | 2020-06-12 | 2021-06-03 | 系统更新方法、装置、电子设备和计算机可读存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111666091B (zh) |
WO (1) | WO2021249266A1 (zh) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115242775A (zh) * | 2022-07-04 | 2022-10-25 | 中国银联股份有限公司 | 资源文件获取方法、装置、设备、介质及产品 |
WO2024087234A1 (zh) * | 2022-10-29 | 2024-05-02 | 华为技术有限公司 | 更新软件的方法、装置和智能设备 |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111666091B (zh) * | 2020-06-12 | 2023-08-29 | 成都极米科技股份有限公司 | 系统更新方法、装置、电子设备和计算机可读存储介质 |
CN113703821B (zh) * | 2021-08-26 | 2025-04-01 | 北京百度网讯科技有限公司 | 云手机更新方法、装置、设备以及存储介质 |
CN113821246A (zh) * | 2021-09-22 | 2021-12-21 | 四川虹美智能科技有限公司 | 软件无感增量式更新方法、装置、系统及存储介质 |
CN113992516B (zh) * | 2021-10-21 | 2023-07-28 | 远景智能国际私人投资有限公司 | 物联网设备的固件更新方法、装置及物联网 |
CN115033259A (zh) * | 2022-05-31 | 2022-09-09 | 珠海视熙科技有限公司 | 固件升级方法、装置、存储介质及电子设备 |
CN115113907A (zh) * | 2022-07-06 | 2022-09-27 | 深圳市创维电器科技有限公司 | 设备系统的更新方法、电子设备及存储介质 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107205057A (zh) * | 2017-08-02 | 2017-09-26 | 无锡江南影视传播有限公司 | 一种游戏资源更新方法、装置及客户端 |
CN109391509A (zh) * | 2018-04-16 | 2019-02-26 | 深圳思为科技有限公司 | 一种更新应用程序的方法、系统及应用服务器 |
CN110347414A (zh) * | 2019-07-15 | 2019-10-18 | 西安易朴通讯技术有限公司 | 固件更新方法、装置、设备及计算机可读存储介质 |
CN110825419A (zh) * | 2019-11-15 | 2020-02-21 | 苏州浪潮智能科技有限公司 | 一种固件刷新方法、装置及电子设备和存储介质 |
US20200133686A1 (en) * | 2018-10-30 | 2020-04-30 | Hewlett Packard Enterprise Development Lp | Remote deployment of operating systems |
CN111666091A (zh) * | 2020-06-12 | 2020-09-15 | 成都极米科技股份有限公司 | 系统更新方法、装置、电子设备和计算机可读存储介质 |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4710688B2 (ja) * | 2006-03-28 | 2011-06-29 | 沖電気工業株式会社 | 冗長システムのファイル更新方法 |
KR100782080B1 (ko) * | 2006-09-07 | 2007-12-04 | 삼성전자주식회사 | 이동 통신 단말기 및 시스템의 펌웨어 갱신 방법 |
BR112014012772A8 (pt) * | 2011-12-01 | 2017-06-20 | Tencent Tech Shenzhen Co Ltd | método e sistema para aprimorar software |
CN108363545B (zh) * | 2017-01-26 | 2021-12-03 | 华为技术有限公司 | 一种数据配置方法及数据配置装置 |
US10409586B1 (en) * | 2018-02-16 | 2019-09-10 | Wipro Limited | Method and system for developing and delivering an update on human machine interface (HMI) application |
CN108845824A (zh) * | 2018-07-10 | 2018-11-20 | 平安科技(深圳)有限公司 | 应用更新方法和装置及计算机可读存储介质 |
CN109933348B (zh) * | 2019-01-21 | 2023-02-14 | 宁波普瑞均胜汽车电子有限公司 | 一种电子控制单元中Bootloader的更新方法和装置 |
CN111010423A (zh) * | 2019-11-20 | 2020-04-14 | 远景智能国际私人投资有限公司 | 更新包的下载系统、方法、装置、设备及可读存储介质 |
CN111045714B (zh) * | 2019-12-19 | 2022-03-01 | 歌尔股份有限公司 | 一种固件更新方法、装置、耳机及计算机可读存储介质 |
-
2020
- 2020-06-12 CN CN202010539674.4A patent/CN111666091B/zh active Active
-
2021
- 2021-06-03 WO PCT/CN2021/098029 patent/WO2021249266A1/zh active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107205057A (zh) * | 2017-08-02 | 2017-09-26 | 无锡江南影视传播有限公司 | 一种游戏资源更新方法、装置及客户端 |
CN109391509A (zh) * | 2018-04-16 | 2019-02-26 | 深圳思为科技有限公司 | 一种更新应用程序的方法、系统及应用服务器 |
US20200133686A1 (en) * | 2018-10-30 | 2020-04-30 | Hewlett Packard Enterprise Development Lp | Remote deployment of operating systems |
CN110347414A (zh) * | 2019-07-15 | 2019-10-18 | 西安易朴通讯技术有限公司 | 固件更新方法、装置、设备及计算机可读存储介质 |
CN110825419A (zh) * | 2019-11-15 | 2020-02-21 | 苏州浪潮智能科技有限公司 | 一种固件刷新方法、装置及电子设备和存储介质 |
CN111666091A (zh) * | 2020-06-12 | 2020-09-15 | 成都极米科技股份有限公司 | 系统更新方法、装置、电子设备和计算机可读存储介质 |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115242775A (zh) * | 2022-07-04 | 2022-10-25 | 中国银联股份有限公司 | 资源文件获取方法、装置、设备、介质及产品 |
WO2024087234A1 (zh) * | 2022-10-29 | 2024-05-02 | 华为技术有限公司 | 更新软件的方法、装置和智能设备 |
Also Published As
Publication number | Publication date |
---|---|
CN111666091A (zh) | 2020-09-15 |
CN111666091B (zh) | 2023-08-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021249266A1 (zh) | 系统更新方法、装置、电子设备和计算机可读存储介质 | |
US20180196665A1 (en) | Managing, using, and updating application resources | |
US11645245B2 (en) | Container software discovery and cataloging | |
JP5483116B2 (ja) | メンテナンスシステム、メンテナンス方法、及びメンテナンス用プログラム | |
CN102541596A (zh) | 一种操作系统升级方法及装置 | |
CN108196878A (zh) | 应用程序安装包的生成方法、装置、电子设备及存储介质 | |
WO2019001138A1 (zh) | 应用程序处理方法、装置和存储介质 | |
JP5376258B2 (ja) | メンテナンスシステム、メンテナンス方法、及びメンテナンス用プログラム | |
CN112328217A (zh) | 一种代码部署方法、装置、系统、计算机设备和介质 | |
CN112015534B (zh) | 配置化平台调度方法、系统及存储介质 | |
CN111897846A (zh) | 缓存数据校验方法、装置、设备及存储介质 | |
CN110990346A (zh) | 基于区块链的文件数据处理方法、装置、设备及存储介质 | |
CN115454827B (zh) | 兼容性检测方法、系统、设备和介质 | |
WO2023060893A1 (zh) | 存储空间管理方法、装置、设备及存储介质 | |
CN115129348A (zh) | 应用程序的资源更新方法、装置、设备及可读存储介质 | |
CN109032693B (zh) | 一种加载展示信息方法、装置、电子设备及可读存储介质 | |
CN112433741B (zh) | 页面处理方法、装置、系统、电子设备及存储介质 | |
CN114780019A (zh) | 电子设备的管理方法、装置、电子设备及存储介质 | |
US11803429B2 (en) | Managing alert messages for applications and access permissions | |
CN113448849A (zh) | 页面元素测试方法、装置、设备及存储介质 | |
CN111737303A (zh) | 数据查询方法、装置、计算机设备及存储介质 | |
CN112558975B (zh) | 组件的代码切换方法、装置、电子设备及可读存储介质 | |
KR101369254B1 (ko) | 악성 애플리케이션 진단장치 및 방법 | |
CN112100479A (zh) | 应用访问方法、装置、电子设备及存储介质 | |
CN115421785B (zh) | 应用程序的移植处理方法、装置和介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21821577 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 21821577 Country of ref document: EP Kind code of ref document: A1 |