CN114281391A - An electronic device and a system software upgrade method, device and medium thereof - Google Patents
An electronic device and a system software upgrade method, device and medium thereof Download PDFInfo
- Publication number
- CN114281391A CN114281391A CN202210102086.3A CN202210102086A CN114281391A CN 114281391 A CN114281391 A CN 114281391A CN 202210102086 A CN202210102086 A CN 202210102086A CN 114281391 A CN114281391 A CN 114281391A
- Authority
- CN
- China
- Prior art keywords
- software
- partition
- upgrade
- upgrading
- simulation verification
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Stored Programmes (AREA)
Abstract
Description
技术领域technical field
本发明涉及软件升级管理技术领域,具体涉及一种电子设备及其系统软件升级方法、装置和介质。The invention relates to the technical field of software upgrade management, in particular to an electronic device and a system software upgrade method, device and medium thereof.
背景技术Background technique
机器人等电子设备通过内置的系统软件控制运行,为了不断增加新功能,优化产品体验,提供更加优质的服务,其系统软件经常需要进行升级更新。Robots and other electronic devices are controlled and operated by built-in system software. In order to continuously add new functions, optimize product experience, and provide better services, their system software often needs to be updated.
近年来,随着网络通信技术的发现,很多的电子设备,特别是移动设备,越来越多地采用空间下载技术(Over-the-Air Technology,OTA)升级系统软件。然而,由于电子设备的系统软件,可能存在当前版本与升级版本兼容性的问题,或者升级版本与个别硬件存在冲突等原因,会造成系统软件升级后,实际运行异常,造成系统软件升级不稳定。In recent years, with the discovery of network communication technology, many electronic devices, especially mobile devices, increasingly use Over-the-Air Technology (OTA) to upgrade system software. However, due to the compatibility of the current version and the upgraded version of the system software of the electronic device, or the conflict between the upgraded version and individual hardware, etc., the actual operation of the system software after the upgrade may be abnormal, resulting in unstable system software upgrade.
为了保证机器人等电子设备软件升级的稳定性和可靠性,中国发明专利CN106020865B公开了一种系统升级方法和装置,至少包括第一系统分区和第二系统分区,升级之前,对上一次正常启动的启动参数进行备份,设置升级标志位;依据运行系统信息,判断正在运行的系统所在的系统分区为第一系统分区,对第二系统分区进行数据擦除和新的系统镜像的写入;若新的系统镜像写入成功,则针对第二系统分区修改启动参数并清除升级标志位;在所述嵌入式设备启动时,若所述升级标志位被设置,则利用备份的启动参数进行启动,第一系统分区作为正在运行的系统分区。该方案存在以下问题:In order to ensure the stability and reliability of software upgrade of electronic equipment such as robots, Chinese invention patent CN106020865B discloses a system upgrade method and device, which at least includes a first system partition and a second system partition. Backup the startup parameters, and set the upgrade flag; according to the operating system information, determine that the system partition where the running system is located is the first system partition, and perform data erasing and new system image writing on the second system partition; The system image of the second system is successfully written, then modify the startup parameters for the second system partition and clear the upgrade flag; when the embedded device is started, if the upgrade flag is set, then use the backup boot parameters to start, and the first A system partition as the running system partition. The scheme has the following problems:
第一系统分区(系统运行分区)和第二系统分区(系统备份分区)分别保存A101系统软件和A100系统软件,其中A100系统软件为备份软件。当通过OTA接收A102系统软件升级指令时,将A102系统软件下载到系统备份分区覆盖掉A100系统软件,并进行系统运行分区与系统备份分区互换,于是A101系统软件变成了存储在系统备份分区内,而系统运行分区内为A102系统软件,由于发现A102系统软件异常,于是从系统备份分区内运行A101系统软件。当再次收到A103系统软件升级指令时,再次将A103系统软件下载到系统备份分区覆盖A101系统软件,而如果此时发现A103系统软件运行异常,则要么运行异常的A103系统软件,要么切换回异常的A102系统软件,无论哪种方式都无法保证机器人等电子设备的正常运行。The first system partition (system running partition) and the second system partition (system backup partition) store A101 system software and A100 system software respectively, wherein A100 system software is backup software. When receiving the A102 system software upgrade instruction through OTA, download the A102 system software to the system backup partition to overwrite the A100 system software, and exchange the system running partition with the system backup partition, so the A101 system software becomes stored in the system backup partition. The A102 system software is in the system running partition. Since the A102 system software is found to be abnormal, the A101 system software is run from the system backup partition. When receiving the A103 system software upgrade instruction again, download the A103 system software to the system backup partition again to overwrite the A101 system software, and if the A103 system software is found to be running abnormally at this time, either run the abnormal A103 system software, or switch back to the abnormal The A102 system software cannot guarantee the normal operation of electronic equipment such as robots in any way.
有鉴于此,需要对现有的电子设备的系统软件升级方法进行改进,以保证系统软件升级的稳定性和可靠性,确保系统软件升级后,电子设备能够正常运行。In view of this, it is necessary to improve the system software upgrade method of the existing electronic equipment to ensure the stability and reliability of the system software upgrade, and to ensure that the electronic equipment can operate normally after the system software upgrade.
发明内容SUMMARY OF THE INVENTION
针对上述缺陷,本发明所要解决的技术问题在于提供一种电子设备及系统软件升级方法、装置和计算机可读介质,以解决现有技术系统软件升级的稳定性和可靠性有待进一步提高的问题。In view of the above defects, the technical problem to be solved by the present invention is to provide an electronic equipment and system software upgrade method, device and computer readable medium to solve the problem that the stability and reliability of system software upgrade in the prior art need to be further improved.
为此,本发明提供的一种系统软件升级方法,包括以下步骤:To this end, a system software upgrade method provided by the present invention includes the following steps:
收到系统软件升级消息后,将系统备份分区备份至存储器中的临时存放区,所述存储器具有系统运行分区和系统备份分区,所述系统运行分区内存储有电子设备的当前可正常启动和稳定运行的系统当前软件,所述系统备份分区内存储有电子设备的可正常启动和稳定运行的系统备份软件;After receiving the system software upgrade message, back up the system backup partition to the temporary storage area in the memory, the memory has a system operation partition and a system backup partition, and the system operation partition stores the current normally startable and stable electronic equipment. The current software of the running system, and the system backup software that can normally start and run stably of the electronic device is stored in the system backup partition;
下载系统升级软件并将所述系统升级软件覆盖所述系统备份分区;Download system upgrade software and cover the system backup partition with the system upgrade software;
切换系统备份分区和系统运行分区,以所述系统升级软件自动重启系统,并在重启系统的过程中对所述系统升级软件进行功能模拟校验;Switching the system backup partition and the system running partition, automatically restarting the system with the system upgrade software, and performing function simulation verification on the system upgrade software during the process of restarting the system;
在所述系统升级软件通过所述功能模拟校验时,清空所述临时存放区;在所述系统升级软件未通过所述功能模拟校验时,从所述临时存放区还原所述系统运行分区,并再次切换系统备份分区和系统运行分区。When the system upgrade software passes the function simulation verification, clear the temporary storage area; when the system upgrade software fails the function simulation verification, restore the system running partition from the temporary storage area , and switch the system backup partition and the system running partition again.
在上述方法中,优选地,进行功能模拟校验步骤中的,进行所述功能模拟校验步骤中,进行所述功能模拟校验的软件,在电子设备出厂时,预设在存储器中的固定位置,所述功能模拟校验的软件包括电子设备的常规功能的模拟程序。In the above method, preferably, in the step of performing the function simulation verification, in the step of performing the function simulation verification, the software for performing the function simulation verification is preset in the memory when the electronic device leaves the factory. In place, the software for the functional simulation verification includes a simulation program for the conventional functions of the electronic device.
在上述方法中,优选地,所述在自动重启系统的过程中对所述系统升级软件进行功能模拟校验,包括以下步骤:In the above method, preferably, the function simulation verification is performed on the system upgrade software in the process of automatically restarting the system, including the following steps:
执行开机设备自检;Perform POST;
从所述存储器的固定位置,获取所述功能模拟校验的软件;Obtain the software for the function simulation verification from the fixed position of the memory;
运行所述功能模拟校验的软件。Run the software for the functional simulation verification.
由此使得,电子设备自动重启后,能够准确地获取到功能模拟校验的软件,并自动运行,以执行功能模拟校验的功能。As a result, after the electronic device is automatically restarted, the software for function simulation verification can be accurately obtained and run automatically to perform the function of function simulation verification.
在上述方法中,优选地,下载所述系统升级软件的步骤之后,还包括如下步骤:In the above method, preferably, after the step of downloading the system upgrade software, it further includes the following steps:
校验所述系统升级软件的完整性;Verifying the integrity of the system upgrade software;
所述系统升级软件的完整性校验通过,则将所述系统升级软件写入所述系统运行分区;所述系统升级软件的完整性校验不通过,则删除已下载的所述系统升级软件。If the integrity check of the system upgrade software passes, write the system upgrade software into the system operating partition; if the system upgrade software fails to pass the integrity check, delete the downloaded system upgrade software .
在上述方法中,优选地,校验所述系统升级软件的完整性采用文件长度和MD5进行联合核验。In the above method, preferably, the integrity of the system upgrade software is verified by joint verification using file length and MD5.
在上述方法中,优选地,对所述系统升级软件进行功能模拟校验还包括以下步骤:In the above method, preferably, the function simulation verification of the system upgrade software further includes the following steps:
系统升级软件写入系统备份分区成功,对升级标志位置位;The system upgrade software is successfully written into the system backup partition, and the upgrade flag is set;
系统升级软件升级成功,清除升级标志位;If the system upgrade software is successfully upgraded, clear the upgrade flag bit;
根据升级标志位执行所述功能模拟校验。The function simulation check is performed according to the upgrade flag bit.
本发明还提供了一种系统软件升级装置,包括:The present invention also provides a system software upgrade device, comprising:
备份模块,用于在收到系统软件升级消息后,将系统备份分区备份至存储器中的临时存放区,所述存储器具有系统运行分区和系统备份分区,所述系统运行分区内存储有电子设备的当前可正常启动和稳定运行的系统当前软件,所述系统备份分区内存储有电子设备的可正常启动和稳定运行的系统备份软件;The backup module is used for backing up the system backup partition to the temporary storage area in the memory after receiving the system software upgrade message, the memory has a system operation partition and a system backup partition, and the system operation partition stores the data of the electronic device. The current system software that can be normally started and run stably at present, and the system backup software of the electronic device that can be normally started and run stably is stored in the system backup partition;
下载模块,用于下载系统升级软件并将所述系统升级软件覆盖所述系统运行分区;a download module for downloading system upgrade software and covering the system operating partition with the system upgrade software;
功能模拟校验模块,用于在自动重启系统的过程中,对所述系统升级软件进行功能模拟校验;A function simulation verification module, used for performing function simulation verification on the system upgrade software in the process of automatically restarting the system;
处理模块,用于在所述系统升级软件通过功能模拟校验时,清空所述临时存放区;在所述系统升级软件未通过功能模拟校验时,从所述临时存放区还原所述系统运行分区;a processing module, used for clearing the temporary storage area when the system upgrade software passes the function simulation verification; when the system upgrade software fails the function simulation verification, restore the system operation from the temporary storage area partition;
切换模块,用于在系统升级软件覆盖系统运行分区后切换系统备份分区和系统运行分区,并发出自动重启系统指令;用于在系统升级软件升级不成功时,再次切换系统备份分区和系统运行分区,并发出自动重启系统指令。。The switching module is used to switch the system backup partition and the system running partition after the system upgrade software covers the system running partition, and issue an automatic restart system command; it is used to switch the system backup partition and the system running partition again when the system upgrade software upgrade fails. , and issue an automatic restart system command. .
在上述装置中,优选地,所述功能模拟校验模块在电子设备出厂时,预设在存储器中的固定位置,且嵌入到电子设备的开机自检查模块中。In the above device, preferably, the function simulation verification module is preset in a fixed position in the memory when the electronic device leaves the factory, and is embedded in the power-on self-checking module of the electronic device.
本发明还提供了一种电子设备,包括:存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器用于在执行所述存储器中存储的计算机程序时,实施上述的系统软件升级方法。The present invention also provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor being used to execute the computer stored in the memory During the program, the above-mentioned system software upgrade method is implemented.
本发明还提供了一种计算机可读介质,其上存储有计算机程序,其所述计算机程序在由处理器执行时,实施上述的系统软件升级方法。The present invention also provides a computer-readable medium on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned system software upgrade method is implemented.
由上述技术方案可知,本发明提供的一种电子设备及其系统软件升级方法、装置和介质,解决了现有技术中系统软件升级的稳定性和可靠性有待进一步提高的问题。与现有技术相比,本发明具有以下有益效果:As can be seen from the above technical solutions, an electronic device and a system software upgrade method, device and medium provided by the present invention solve the problem that the stability and reliability of system software upgrade in the prior art need to be further improved. Compared with the prior art, the present invention has the following beneficial effects:
收到软件升级消息后,将系统备份分区备份至存储器中的临时存放区,并添加了功能模拟检验机制,如果系统升级软件通过功能模拟校验,则保留该升级程序;如果发现功能异常,系统升级软件未通过功能模拟校验,则从临时存放区还原系统运行分区,以保证电子设备始终保留可正常运行的系统当前软件和系统备份软件,避免了系统升级软件虽然能够启动,但在不能实现全部功能或有硬件冲突的情况下取代了系统当前软件成为缺陷版本,使得电子设备在后续升级更新时,该缺陷版本变为系统备份软件,再次升级时再遇到有缺陷的系统升级软件,无法恢复获得可正常运行的系统软件,提高了系统升级的稳定性和可靠性。After receiving the software upgrade message, the system backup partition is backed up to the temporary storage area in the memory, and a function simulation verification mechanism is added. If the system upgrade software passes the function simulation verification, the upgrade program is retained; if the function is abnormal, the system If the upgrade software fails to pass the function simulation verification, the system operation partition will be restored from the temporary storage area to ensure that the electronic equipment always retains the current system software and system backup software that can operate normally, and avoids that the system upgrade software can be started, but cannot be realized. In the case of all functions or hardware conflicts, it replaces the current software of the system and becomes the defective version, so that when the electronic device is upgraded and updated later, the defective version becomes the system backup software. The system software that can run normally is recovered, and the stability and reliability of the system upgrade are improved.
附图说明Description of drawings
为了更清楚地说明本发明的实施例或现有技术中的技术方案,下面将对本发明实施例或现有技术描述中所需要使用的附图做出简单地介绍和说明。显而易见地,下面描述中的附图仅仅是本发明的部分实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to describe the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces and describes the accompanying drawings that are required in the description of the embodiments of the present invention or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can also be obtained from these drawings without creative efforts.
图1为本发明提供的一种机器人的系统软件升级方法流程图。FIG. 1 is a flowchart of a method for upgrading system software of a robot provided by the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例附图,对本发明实施例的技术方案进行清楚、完整地描述,显然,以下所描述的实施例,仅仅是本发明的一部分实施例,而不是全部的实施例。基于本发明的实施例,本领域普通技术人员在没有做出创造性劳动的前提下,所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the embodiments described below are only a part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present invention.
本发明的实现原理是:The realization principle of the present invention is:
电子设备收到升级消息后,将系统备份分区备份至存储器中的临时存放区;After receiving the upgrade message, the electronic device backs up the system backup partition to the temporary storage area in the memory;
下载系统升级软件并覆盖所述系统备份分区;Download the system upgrade software and overwrite the system backup partition;
切换系统备份分区和系统运行分区,自动重启系统,并对所述系统升级软件进行功能模拟校验;Switching the system backup partition and the system running partition, automatically restarting the system, and performing functional simulation verification on the system upgrade software;
根据所述功能模拟校验的结果,清空所述临时存放区或从所述临时存放区还原系统运行分区,并切换系统备份分区和系统运行分区。According to the result of the function simulation verification, the temporary storage area is emptied or the system running partition is restored from the temporary storage area, and the system backup partition and the system running partition are switched.
为了对本发明的技术方案和实现方式做出更清楚地解释和说明,以下介绍实现本发明技术方案的几个优选的具体实施例。In order to explain and illustrate the technical solutions and implementation manners of the present invention more clearly, several preferred specific embodiments for realizing the technical solutions of the present invention are introduced below.
需要说明的是,本文中“内、外”、“前、后”及“左、右”等方位词是以产品使用状态为基准对象进行的表述,显然,相应方位词的使用对本方案的保护范围并非构成限制。It should be noted that the orientation words such as "inside, outside", "front, rear" and "left and right" in this article are based on the product use state as the reference object. Obviously, the use of the corresponding orientation words protects this scheme. Scope is not intended to be limiting.
请参见图1,图1为本发明提供的一种系统软件升级方法流程图。Please refer to FIG. 1. FIG. 1 is a flowchart of a system software upgrade method provided by the present invention.
如图1所示,本发明提供的一种机器人的系统软件升级方法,用于电子设备的OTA升级更新,该方法包括以下步骤:As shown in Figure 1, a system software upgrade method of a robot provided by the present invention is used for OTA upgrade and update of electronic equipment, and the method includes the following steps:
步骤110,电子设备收到的系统升级消息后,将系统备份分区备份至存储器中的临时存放区。其中,升级消息可采用OTA推送方式实现。Step 110 , after receiving the system upgrade message, the electronic device backs up the system backup partition to a temporary storage area in the memory. The upgrade message may be implemented by OTA push.
电子设备的存储器具有系统运行分区和系统备份分区两个系统分区,其中系统运行分区内存储有电子设备当前可正常启动和稳定运行的系统当前软件A101,通常是电子设备目前可正常启动和稳定运行的最新软件版本。系统备份分区用于备份系统软件,存储有电子设备的可正常启动和稳定运行的系统备份软件A100,通常是电子设备的上一个软件版本。The memory of the electronic device has two system partitions: the system running partition and the system backup partition. The system running partition stores the current system software A101 that the electronic device can currently start normally and run stably. Usually, the electronic device can currently start normally and run stably. latest software version. The system backup partition is used to back up the system software, and stores the system backup software A100 of the electronic device that can start normally and run stably, usually the last software version of the electronic device.
此时,系统运行分区内为系统当前软件A101,系统备份分区内为系统备份软件A100。At this time, the system running partition is the current system software A101, and the system backup partition is the system backup software A100.
步骤120,电子设备下载系统升级软件A102并将系统升级软件A102覆盖系统备份分区。Step 120, the electronic device downloads the system upgrade software A102 and overwrites the system backup partition with the system upgrade software A102.
系统升级软件下载后,首先进行软件包完整性校验,如果软件包完整性校验通过,则说明系统升级软件下载完整,将系统升级软件写入系统备份分区,执行步骤130;否则,说明系统升级软件下载异常,例如系统升级软件下载不完整、丢失部分文件或文件有损坏等情况,对于这种情况,则删除已下载的系统升级软件,重新下载系统升级软件或退出系统升级。After the system upgrade software is downloaded, first perform the software package integrity check, if the software package integrity check passes, it means that the system upgrade software is downloaded completely, write the system upgrade software into the system backup partition, and execute step 130; otherwise, explain the system upgrade software The download of the upgrade software is abnormal, for example, the download of the system upgrade software is incomplete, some files are lost, or the files are damaged, etc. In this case, delete the downloaded system upgrade software, download the system upgrade software again, or exit the system upgrade.
软件包完整性校验可采用文件长度和MD5进行联合核验等常规方法实现。文件长度校验的方式是比较下载得到的升级文件大小是否与原文件一致,MD5校验的方式是服务端对文件进行MD5校验,将有关信息返回,客户端下载升级文件,并将升级文件的MD5与服务器端生成的MD5进行对比,如果二者一致则说明升级文件完整,如果不一致,则说明升级文件不完整,删除已下载的系统升级软件,重新下载系统升级软件或退出升级。其中,MD5(Message-Digest Algorithm 5,信息-摘要算法5),用于确保信息传输完整一致,是计算机广泛使用的杂凑算法之一(又称摘要算法、哈希算法)。The integrity check of the software package can be realized by conventional methods such as joint verification of file length and MD5. The method of file length verification is to compare whether the size of the downloaded upgrade file is consistent with the original file. The method of MD5 verification is that the server performs MD5 verification on the file, returns the relevant information, and the client downloads the upgrade file and updates the upgrade file. Compare the MD5 generated by the server with the MD5 generated by the server. If the two are consistent, the upgrade file is complete. If they are inconsistent, the upgrade file is incomplete. Delete the downloaded system upgrade software, download the system upgrade software again, or exit the upgrade. Among them, MD5 (Message-Digest Algorithm 5, Message-Digest Algorithm 5) is used to ensure complete and consistent information transmission, and is one of the hash algorithms widely used by computers (also known as digest algorithm, hash algorithm).
此时,系统运行分区内为系统当前软件A101,系统备份分区内为系统升级软件A102。At this time, the system running partition is the current system software A101, and the system backup partition is the system upgrade software A102.
步骤130,切换系统备份分区和系统运行分区,电子设备以系统升级软件自动重启系统,并在自动重启系统的过程中对系统升级软件进行功能模拟校验。In step 130, the system backup partition and the system running partition are switched, and the electronic device automatically restarts the system with the system upgrade software, and performs function simulation verification on the system upgrade software during the process of automatically restarting the system.
此时,系统运行分区内为系统当前软件A102,系统备份分区内为系统升级软件A101,系统以系统升级软件A102启动,如果能够正常启动和运行,则说明系统升级软件A102升级成功;否则,说明系统升级软件升级异常。At this time, the current system software A102 is in the system running partition, and the system upgrade software A101 is in the system backup partition. The system starts with the system upgrade software A102. If it can start and run normally, it means that the system upgrade software A102 has been upgraded successfully; otherwise, it means The system upgrade software upgrade is abnormal.
功能模拟校验由模拟软件实现,模拟该电子设备的所有常规功能,在电子设备出厂时预设在存储器中的固定位置。这里,存储器中的固定位置指的是存储器中的固定地址。The function simulation verification is realized by simulation software, which simulates all the normal functions of the electronic device, and is preset in a fixed position in the memory when the electronic device leaves the factory. Here, the fixed location in the memory refers to a fixed address in the memory.
步骤140,电子设备根据对系统升级软件的功能模拟校验结果,清空临时存放区或从临时存放区还原系统运行分区。具体过程如下:Step 140, the electronic device clears the temporary storage area or restores the system operating partition from the temporary storage area according to the function simulation verification result of the system upgrade software. The specific process is as follows:
如果系统升级软件A102通过了全部的功能模拟校验,说明电子设备的全部常规功能在新版本的系统升级软件A102下均可正常运行,系统升级软件A102升级成功,于是保留该系统升级软件A102,并清空临时存放区。此时,系统运行分区内为系统升级软件A102,系统备份分区内为升级前的系统当前软件A101,后续电子设备将通过系统升级软件A102启动。If the system upgrade software A102 has passed all the function simulation verification, it means that all the conventional functions of the electronic equipment can run normally under the new version of the system upgrade software A102, and the system upgrade software A102 has been upgraded successfully, so the system upgrade software A102 is retained. and empty the temporary storage area. At this time, the system running partition is the system upgrade software A102, the system backup partition is the current system software A101 before the upgrade, and subsequent electronic devices will be started through the system upgrade software A102.
如果发现电子设备的功能异常,则说明下载安装的新版本的系统升级软件A102,不适用于本电子设备或者与本电子设备的某些硬件存在冲突,系统升级软件A102未通过功能模拟校验,系统升级软件A102升级不成功,于是,从临时存放区还原此时的系统运行分区(由于下载系统升级软件并重启系统后,系统备份分区和系统运行分区已进行过切换,因此,此时的系统运行分区即为升级前的系统备份分区),将系统运行分区还原到升级前的系统备份软件,并再次切换系统备份分区和系统运行分区。此时,系统运行分区内为升级前的系统当前软件A101,系统备份分区内为升级前的系统备份软件A100,后续电子设备将通过升级前的系统当前软件A101启动,保证电子设备能够正常运行。且系统备份软件得以完整保留。If the function of the electronic device is found to be abnormal, it means that the downloaded and installed new version of the system upgrade software A102 is not suitable for the electronic device or conflicts with some hardware of the electronic device, and the system upgrade software A102 fails the function simulation verification. The upgrade of the system upgrade software A102 is unsuccessful, so the system running partition at this time is restored from the temporary storage area (because after downloading the system upgrade software and restarting the system, the system backup partition and the system running partition have been switched, so the system at this time The running partition is the system backup partition before the upgrade), restore the system running partition to the system backup software before the upgrade, and switch the system backup partition and the system running partition again. At this time, the system running partition is the current system software A101 before the upgrade, and the system backup partition is the system backup software A100 before the upgrade. Subsequent electronic devices will be started through the current system software A101 before the upgrade to ensure that the electronic devices can run normally. And the system backup software is kept intact.
在上述方法中,功能模拟校验功能嵌入到电子设备的开机设备自检程序中,具体实现方式是:在电子设备出厂时,将功能模拟校验的软件预设在电子设备的存储器中的固定位置,功能模拟校验的软件包括电子设备的常规功能的模拟程序。在开机设备自检的程序中添加功能模拟校验的软件在存储器中固定位置的地址。这样,在自动重启系统后,首先执行开机设备自检。在开机设备自检程序运行到功能模拟校验功能时,从存储器的固定位置获取该功能模拟校验的程序,通过运行功能模拟校验的程序,实现功能模拟校验功能。In the above method, the function simulation verification function is embedded in the power-on equipment self-check program of the electronic device. The specific implementation method is: when the electronic device leaves the factory, the software for the function simulation verification is preset in the memory of the electronic device. Location, function simulation verification software includes simulation programs for the conventional functions of electronic equipment. Add the address of the fixed location in the memory of the software for functional simulation verification in the POST procedure. In this way, after an automatic system restart, the power-on self-test is performed first. When the power-on equipment self-check program runs to the function simulation verification function, the function simulation verification program is obtained from the fixed position of the memory, and the function simulation verification function is realized by running the function simulation verification program.
为了使功能模拟校验更加合理化,避免每次电子设备启动都要进行功能模拟校验,本发明方法,通过升级标志位实现只有在系统升级软件第一次运行时才进行功能模拟校验,再次启动后则跳过功能模拟校验。具体作法是:In order to make the function simulation verification more rational and avoid the function simulation verification every time the electronic equipment is started, the method of the present invention realizes that the function simulation verification is only performed when the system upgrade software runs for the first time through the upgrade flag bit, and again After startup, function simulation verification is skipped. The specific method is:
系统升级软件写入系统备份分区成功,则升级标志位置位;If the system upgrade software is successfully written into the system backup partition, the upgrade flag will be set;
系统升级软件升级成功,则清除升级标志位;If the system upgrade software is successfully upgraded, the upgrade flag will be cleared;
根据升级标志位执行功能模拟校验。Perform a functional simulation check based on the upgrade flag bits.
也就是说,当系统升级软件写入系统备份分区后,升级标志位置位,于是电子设备开机启动后,会进入开机设备自检程序,由于升级标志位存在,则执行功能模拟校验。That is to say, when the system upgrade software is written into the system backup partition, the upgrade flag bit is set, so after the electronic device is turned on, it will enter the boot device self-check program. Since the upgrade flag bit exists, the function simulation verification will be performed.
当系统升级软件第一次启动成功后,即升级成功,则清除升级标志位,这样,当电子设备再次启动时,由于升级标志位置位被清除了,因此,开机设备自检程序会跳过功能模拟校验。也就是说,系统升级软件升级成功后,后续电子设备每次启动,都不会再执行功能模拟校验,节省开机时间,提高效率,提高用户体验度。When the system upgrade software is successfully started for the first time, that is, the upgrade is successful, the upgrade flag will be cleared. In this way, when the electronic device starts up again, since the upgrade flag is cleared, the power-on device self-check program will skip the function. Simulation verification. That is to say, after the system upgrade software is successfully upgraded, the subsequent electronic device will not perform function simulation verification every time it is started, which saves startup time, improves efficiency, and improves user experience.
本发明中,临时存放区可以在收到系统关机或重启指令时自动清除,以避免再次写入时冲突。In the present invention, the temporary storage area can be automatically cleared when a system shutdown or restart instruction is received, so as to avoid conflicts when writing again.
在上述方法的基础上,本发明还提供了一种系统软件升级装置,包括:On the basis of the above method, the present invention also provides a system software upgrade device, comprising:
备份模块,用于在收到系统软件升级消息后,将系统备份分区备份至存储器中的临时存放区,系统运行分区内存储有电子设备的当前可正常启动和稳定运行的系统当前软件A101,系统备份内存储有电子设备的可正常启动和稳定运行的系统备份软件A100。The backup module is used for backing up the system backup partition to the temporary storage area in the memory after receiving the system software upgrade message. The system running partition stores the current system current software A101 of the electronic device that can start normally and runs stably, and the system The system backup software A100 that can normally start and run stably of the electronic device is stored in the backup.
下载模块,用于下载系统升级软件A102,并将该系统升级软件A102覆盖系统运行分区。The download module is used to download the system upgrade software A102 and cover the system operation partition with the system upgrade software A102.
功能模拟校验模块,用于在自动重启系统的过程中,对系统升级软件A102执行功能模拟校验。The function simulation verification module is used to perform function simulation verification on the system upgrade software A102 in the process of automatically restarting the system.
处理模块,用于在系统升级软件A102通过功能模拟校验时,清空临时存放区;在系统升级软件A102未通过功能模拟校验时,从临时存放区还原此时的系统运行分区。The processing module is used to clear the temporary storage area when the system upgrade software A102 passes the function simulation verification; when the system upgrade software A102 fails the function simulation verification, restore the current system running partition from the temporary storage area.
切换模块,用于在系统升级软件A102覆盖系统运行分区后切换系统备份分区和系统运行分区,并发出自动重启系统指令;用于在系统升级软件A102升级不成功时,再次切换系统备份分区和系统运行分区,并发出自动重启系统指令。The switching module is used to switch the system backup partition and the system running partition after the system upgrade software A102 covers the system running partition, and issue an automatic restart system command; it is used to switch the system backup partition and the system again when the system upgrade software A102 fails to upgrade. Run the partition and issue an automatic reboot system command.
该装置进一步还可以包括开机设备自检模块,并在开机设备自检模块中添加进行功能模拟校验的软件的地址。功能模拟校验的软件预设在电子设备的存储器中的固定位置,该固定位置即为功能模拟校验的软件在存储器中的地址。The device may further include a power-on device self-test module, and the address of the software for performing function simulation verification is added to the power-on device self-test module. The software for function simulation verification is preset in a fixed position in the memory of the electronic device, and the fixed position is the address in the memory of the software for function simulation verification.
该装置进一步还可以包括升级标志位置位模块,用于:The device may further include an upgrade flag bit setting module for:
在系统升级软件写入系统备份分区成功时,对升级标志位置位;When the system upgrade software is successfully written into the system backup partition, the upgrade flag is set;
在系统升级软件升级成功时,清除升级标志位;When the system upgrade software is successfully upgraded, the upgrade flag is cleared;
功能模拟校验模块根据升级标志位执行功能模拟校验。The function simulation verification module performs function simulation verification according to the upgrade flag bit.
根据以上实施例的描述,本发明还提供了一种电子设备,包括存储器、处理器以及存储在存储器中并可在处理器上运行的计算机程序,其中,处理器用于在执行存储器中存储的计算机程序时,实施上述的系统软件升级方法。According to the description of the above embodiments, the present invention also provides an electronic device including a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor is used to execute the computer stored in the memory During the program, the above-mentioned system software upgrade method is implemented.
其中,机器人是本发明中电子设备的一种具体实例,当然,本发明中的电子设备并不唯一限定机器人,还可以是智能冰箱、智能空调等智能终端设备。The robot is a specific example of the electronic device in the present invention. Of course, the electronic device in the present invention is not limited to a robot, but can also be smart terminal devices such as smart refrigerators and smart air conditioners.
上述的系统软件升级方法,可以被实现为计算机软件程序。例如,本发明还提供了一种计算机可读介质,其上存储有计算机程序,该计算机程序在由处理器执行时,实施上述的系统软件升级方法。The above-mentioned system software upgrade method can be implemented as a computer software program. For example, the present invention also provides a computer-readable medium on which a computer program is stored, and when the computer program is executed by a processor, implements the above-mentioned system software upgrading method.
综合以上具体实施例的描述,本发明提供的一种机器人的系统软件升级方法和系统,与现有技术相比,具有如下优点:Based on the description of the above specific embodiments, the method and system for upgrading the system software of a robot provided by the present invention have the following advantages compared with the prior art:
第一,添加了功能模拟检验机制,保证电子设备系统软件升级的稳定性和可靠性。First, a functional simulation verification mechanism is added to ensure the stability and reliability of the software upgrade of the electronic equipment system.
第二,添加了分区还原保护机制,在电子设备发生系统异常时,能够恢复原版本系统软件,保证电子设备的正常运行。Second, a partition restoration protection mechanism is added, which can restore the original version of the system software in the event of a system abnormality in the electronic device to ensure the normal operation of the electronic device.
第三,通过升级标志位实现只有在系统升级软件第一次运行时才进行功能模拟校验,再次启动后则跳过功能模拟校验。节省开机时间,提高效率,提高用户体验度。Third, through the upgrade flag bit, the function simulation verification is only performed when the system upgrade software is run for the first time, and the function simulation verification is skipped after restarting. Save boot time, improve efficiency, and improve user experience.
最后,还需要说明的是,在本文中使用的术语"包括"、"包含"或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句"包括一个…"限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。Finally, it should also be noted that the terms "comprising", "comprising" or any other variation thereof used herein are intended to encompass non-exclusive inclusion such that a process, method, article or device comprising a series of elements not only Include those elements, but also other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprises a..." does not preclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.
本发明并不局限于上述最佳实施方式,任何人应该得知在本发明的启示下做出的结构变化,凡是与本发明具有相同或相近的技术方案,均落入本发明的保护范围之内。The present invention is not limited to the above-mentioned best embodiment. Anyone should be aware of the structural changes made under the inspiration of the present invention, and any technical solutions that are the same or similar to those of the present invention shall fall within the protection scope of the present invention. Inside.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210102086.3A CN114281391A (en) | 2022-01-27 | 2022-01-27 | An electronic device and a system software upgrade method, device and medium thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210102086.3A CN114281391A (en) | 2022-01-27 | 2022-01-27 | An electronic device and a system software upgrade method, device and medium thereof |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114281391A true CN114281391A (en) | 2022-04-05 |
Family
ID=80881768
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210102086.3A Pending CN114281391A (en) | 2022-01-27 | 2022-01-27 | An electronic device and a system software upgrade method, device and medium thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114281391A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114741239A (en) * | 2022-04-30 | 2022-07-12 | 苏州浪潮智能科技有限公司 | Enhanced system, method, apparatus and storage medium for storage device management stability |
CN118689550A (en) * | 2024-05-23 | 2024-09-24 | 北京智芯微电子科技有限公司 | Application loading method, device, computer equipment, chip and storage medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106020865A (en) * | 2016-05-10 | 2016-10-12 | 百度在线网络技术(北京)有限公司 | System upgrading method and device |
CN108121554A (en) * | 2017-12-20 | 2018-06-05 | 浙江亿邦通信科技股份有限公司 | A kind of upgrade method and upgrade-system of open air embedded device system |
CN110569051A (en) * | 2019-08-02 | 2019-12-13 | 山东航天电子技术研究所 | An on-orbit maintenance and verification method for flight procedures supporting pre-start |
CN110633209A (en) * | 2019-08-22 | 2019-12-31 | 惠州市德赛西威汽车电子股份有限公司 | Automatic testing method and system for vehicle-mounted android multimedia navigator |
CN111796852A (en) * | 2020-07-09 | 2020-10-20 | 佛山市顺德区美的洗涤电器制造有限公司 | Upgrading method for home appliance, home appliance and computer readable storage medium |
CN112988204A (en) * | 2021-05-19 | 2021-06-18 | 西安羚控电子科技有限公司 | Method for remotely upgrading and rolling back software of unmanned aerial vehicle |
CN113805922A (en) * | 2021-09-27 | 2021-12-17 | 一飞智控(天津)科技有限公司 | Method, system, terminal and application for upgrading and switching embedded linux dual-backup partition |
CN113961223A (en) * | 2021-12-09 | 2022-01-21 | 迪泰(浙江)通信技术有限公司 | Remote upgrading system and method for shipborne equipment |
-
2022
- 2022-01-27 CN CN202210102086.3A patent/CN114281391A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106020865A (en) * | 2016-05-10 | 2016-10-12 | 百度在线网络技术(北京)有限公司 | System upgrading method and device |
CN108121554A (en) * | 2017-12-20 | 2018-06-05 | 浙江亿邦通信科技股份有限公司 | A kind of upgrade method and upgrade-system of open air embedded device system |
CN110569051A (en) * | 2019-08-02 | 2019-12-13 | 山东航天电子技术研究所 | An on-orbit maintenance and verification method for flight procedures supporting pre-start |
CN110633209A (en) * | 2019-08-22 | 2019-12-31 | 惠州市德赛西威汽车电子股份有限公司 | Automatic testing method and system for vehicle-mounted android multimedia navigator |
CN111796852A (en) * | 2020-07-09 | 2020-10-20 | 佛山市顺德区美的洗涤电器制造有限公司 | Upgrading method for home appliance, home appliance and computer readable storage medium |
CN112988204A (en) * | 2021-05-19 | 2021-06-18 | 西安羚控电子科技有限公司 | Method for remotely upgrading and rolling back software of unmanned aerial vehicle |
CN113805922A (en) * | 2021-09-27 | 2021-12-17 | 一飞智控(天津)科技有限公司 | Method, system, terminal and application for upgrading and switching embedded linux dual-backup partition |
CN113961223A (en) * | 2021-12-09 | 2022-01-21 | 迪泰(浙江)通信技术有限公司 | Remote upgrading system and method for shipborne equipment |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114741239A (en) * | 2022-04-30 | 2022-07-12 | 苏州浪潮智能科技有限公司 | Enhanced system, method, apparatus and storage medium for storage device management stability |
CN118689550A (en) * | 2024-05-23 | 2024-09-24 | 北京智芯微电子科技有限公司 | Application loading method, device, computer equipment, chip and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5113700B2 (en) | Firmware update apparatus and method | |
US8041988B2 (en) | Firmware update for consumer electronic device | |
KR100750132B1 (en) | How to boot, automatically update software and recover from errors, and the system and computer-readable recording media recording the method | |
US8539471B2 (en) | Updating firmware of an electronic device | |
CN101377744B (en) | Method and apparatus for recovering terminal equipment software upgrade | |
US20100169709A1 (en) | System Of Updating Firmware And Method Thereof, And Method Of Creating Firmware | |
CN104915226B (en) | A kind of network device software starting method, apparatus and the network equipment | |
CN112612524A (en) | Method, device and equipment for starting Linux system and storage medium | |
EP3113018A1 (en) | Method and apparatus for running version file | |
CN110580167A (en) | system upgrading method, intelligent device and server | |
CN114281391A (en) | An electronic device and a system software upgrade method, device and medium thereof | |
CN112433739B (en) | A firmware upgrade method | |
CN112860291B (en) | Firmware upgrading method and device | |
CN114741096A (en) | Upgrade processing method, device and storage medium | |
JP2005284902A (en) | Terminal device, control method and control program thereof, host device, control method and control program thereof, and method, system, and program for remote updating | |
CN118656101A (en) | Baseboard management controller firmware upgrade method, device, equipment and medium | |
CN114296770A (en) | Differential upgrade method, apparatus, device and readable storage medium | |
KR20080023064A (en) | Program update method and system for wireless communication terminal | |
CN115437674A (en) | Firmware upgrading method, device, medium and electronic equipment | |
JP2003228490A (en) | Terminal equipment connected to network, and network system using the same | |
CN114327535A (en) | A BMC firmware update protection method and related components | |
CN114489717B (en) | A system upgrade method, device and system | |
CN112631637B (en) | OTA upgrading method, system, equipment and storage medium based on RTOS | |
JP2005242930A (en) | Information processor, program updating method, program updating program, and computer-readable storage medium recording program updating program | |
JP3589433B2 (en) | Database guarantee method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |