CN107368389A - Control method, control device and the EMMC of operating system One-key recovery function - Google Patents
Control method, control device and the EMMC of operating system One-key recovery function Download PDFInfo
- Publication number
- CN107368389A CN107368389A CN201710497197.8A CN201710497197A CN107368389A CN 107368389 A CN107368389 A CN 107368389A CN 201710497197 A CN201710497197 A CN 201710497197A CN 107368389 A CN107368389 A CN 107368389A
- Authority
- CN
- China
- Prior art keywords
- data
- emmc
- key recovery
- size
- partition
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1415—Saving, restoring, recovering or retrying at system level
- G06F11/1438—Restarting or rejuvenating
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/24—Resetting means
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Retry When Errors Occur (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
本发明提供了一种操作系统一键恢复功能的控制方法、控制装置和EMMC。其中,一种所述控制方法,包括:接收一键恢复功能的控制指令,进入一键恢复模式;当操作系统启动到bootloader阶段时,从bootloader阶段的分区表中获取系统备份数据的首地址及其大小,根据系统备份数据的首地址及其大小,从EMMC中读取系统备份数据到内存中;同时从分区表中获取系统数据的首地址,根据系统数据的首地址,将读取到内存中的系统备份数据,分别写入到系统数据在EMMC中的分区;写入完成后,重新启动操作系统。通过本发明的技术方案,能够保证系统的稳定性,可以使冰箱在操作系统崩溃后,通过一个按键就能重新恢复系统,从而解决冰箱售后的一大难题,以及消费电子系统的稳定性问题。
The invention provides a control method, a control device and an EMMC for the one-key recovery function of an operating system. Wherein, a kind of described control method comprises: receiving the control command of one-key recovery function, enters one-key recovery mode; Its size, according to the first address of the system backup data and its size, read the system backup data from the EMMC into the memory; at the same time obtain the first address of the system data from the partition table, and read it into the memory according to the first address of the system data The system backup data in the EMMC are respectively written to the partition of the system data in the EMMC; after the writing is completed, restart the operating system. The technical solution of the present invention can ensure the stability of the system, and can restore the system by pressing a button after the operating system of the refrigerator crashes, thereby solving a major problem of refrigerator after-sales and the stability of consumer electronics systems.
Description
技术领域technical field
本发明涉及冰箱技术领域,具体而言,涉及一种操作系统一键恢复功能的控制方法、一种操作系统一键恢复功能的控制装置、一种EMMC、一种冰箱、一种计算机设备、一种计算机可读存储介质。The present invention relates to the technical field of refrigerators, in particular, to a method for controlling the one-key recovery function of the operating system, a control device for the one-key recovery function of the operating system, an EMMC, a refrigerator, a computer device, a A computer readable storage medium.
背景技术Background technique
目前,随着智能冰箱的广泛使用,特别是带android操作系统的智能冰箱越来越多,宽大的屏幕和精美机身加上酷炫的界面,受到很多人的喜爱,越来越多的冰箱厂商也逐渐加大这类冰箱的生产。随着用户的增多,android系统在使用过程中出现崩溃的概率也越来越大。当出现崩溃之时,靠目前的技术并没有合适的解决方案。At present, with the widespread use of smart refrigerators, especially more and more smart refrigerators with an android operating system, the large screen, exquisite body and cool interface are loved by many people, and more and more refrigerators Manufacturers are gradually increasing the production of such refrigerators. With the increase of users, the probability of the Android system crashing during use is also increasing. When there is a crash, there is no suitable solution with current technology.
目前能对Android系统数据操作的无非有两个方法:(1)恢复出厂设置,此方法无非是清空用户数据空间,即系统目录下的/data目录;(2)通过OTA下载最新的系统数据,再通过recovery模式升级。这两个方法有个共同缺点就是,必须在系统能正常运行情况下才能进行,若是系统崩溃了就无法通过这两个方法重新恢复数据了。At present, there are only two ways to operate Android system data: (1) restore factory settings, this method is nothing more than emptying the user data space, that is, the /data directory under the system directory; (2) download the latest system data through OTA, Then upgrade through recovery mode. These two methods have a common disadvantage that they must be performed when the system is running normally. If the system crashes, the data cannot be recovered through these two methods.
因此,如何提供一键恢复功能,可以使智能冰箱在系统崩溃时,通过一个按键就能恢复系统,为我们的智能冰箱保驾护航,成为目前亟待解决的技术问题。Therefore, how to provide a one-key recovery function, so that when the system crashes, the smart refrigerator can restore the system with one button, and protect our smart refrigerators, which has become an urgent technical problem to be solved.
发明内容Contents of the invention
本发明旨在至少解决现有技术或相关技术中存在的技术问题之一。The present invention aims to solve at least one of the technical problems existing in the prior art or related art.
为此,本发明的第一个目的在于提出了一种操作系统一键恢复功能的控制方法。For this reason, the first object of the present invention is to propose a control method for the one-key recovery function of the operating system.
本发明的第二个目的在于提出了一种操作系统一键恢复功能的控制装置。The second object of the present invention is to provide a control device for the one-key recovery function of the operating system.
本发明的第三个目的在于提出了一种EMMC(Embedded Multi Media Card,嵌入式存储器)。The third object of the present invention is to propose an EMMC (Embedded Multi Media Card, embedded memory).
本发明的第四个目的在于提出了一种冰箱。The fourth object of the present invention is to provide a refrigerator.
本发明的第五个目的在于提出了一种计算机设备。A fifth object of the present invention is to propose a computer device.
本发明的第六个目的在于提出了一种计算机可读存储介质。The sixth object of the present invention is to provide a computer-readable storage medium.
有鉴于此,本发明的第一个目的,提出了一种操作系统一键恢复功能的控制方法,操作系统存储在EMMC中,该控制方法包括:接收一键恢复功能的控制指令,进入一键恢复模式;当操作系统启动到bootloader阶段时,从bootloader阶段的分区表中获取系统备份数据的首地址及其大小,根据系统备份数据的首地址及其大小,从EMMC中读取系统备份数据到内存中;同时从分区表中获取系统数据的首地址,根据系统数据的首地址,将读取到内存中的系统备份数据,分别写入到系统数据在EMMC中的分区;写入完成后,重新启动操作系统。In view of this, the first object of the present invention proposes a control method for one-key recovery function of the operating system, the operating system is stored in the EMMC, and the control method includes: receiving a control command for one-key recovery function, entering the one-key Recovery mode; when the operating system starts to the bootloader stage, the first address and size of the system backup data are obtained from the partition table of the bootloader stage, and the system backup data is read from the EMMC according to the first address and size of the system backup data. In the memory; at the same time, the first address of the system data is obtained from the partition table, according to the first address of the system data, the system backup data read into the memory is respectively written to the partition of the system data in the EMMC; after the writing is completed, Restart the operating system.
根据本发明的操作系统一键恢复功能的控制方法,通过按键触发进入一键恢复模式,在系统启动到bootloader阶段,根据bootloader中的分区表检索到备份系统数据的首地址,采用EMMC read函数,将备份在EMMC中的系统数据(该系统数据包括但不限于kernel.img、boot.img、system.img)读取到内存中,再通过EMMC write函数分别写入到之前EMMC中的各个系统数据所在的分区中;其中,EMMC的存贮是分页的方式,每页的大小都是固定的,因此,需要根据页的大小读取数据到内存中,再将内存中的数据写回到EMMC中;此外,硬件平台的不同,读写函数以及页的大小要做相应的改变;并且读写是同时进行的,避免内存空间的不足,以保证备份数据顺利写到原先存放系统数据的EMMC中。其中,操作系统优选地为Android,由于一级boot之时,并未进入Android阶段,而一键恢复功能是在bootloader中完成的,因此,该功能可以使智能冰箱在Android系统崩溃后,通过一个按键就能重新恢复系统,而无需售后人员到现场进行维修,从而解决了智能冰箱售后的一大难题,另外,从保证系统稳定性的角度,该功能有效解决了消费电子系统的稳定性问题。According to the control method of the one-key recovery function of the operating system of the present invention, the one-key recovery mode is triggered by a button, and the system is started to the bootloader stage, and the first address of the backup system data is retrieved according to the partition table in the bootloader, and the EMMC read function is adopted. Read the system data backed up in EMMC (the system data includes but not limited to kernel.img, boot.img, system.img) into the memory, and then write to each system data in the previous EMMC through the EMMC write function In the partition where it is located; among them, the storage of EMMC is paging, and the size of each page is fixed. Therefore, it is necessary to read the data into the memory according to the size of the page, and then write the data in the memory back to the EMMC ;In addition, depending on the hardware platform, the read and write functions and the page size should be changed accordingly; and the read and write are carried out at the same time to avoid insufficient memory space, so as to ensure that the backup data is successfully written to the EMMC where the system data was originally stored. Wherein, the operating system is preferably Android, because the first-level boot does not enter the Android stage, and the one-key recovery function is completed in the bootloader, so this function can make the smart refrigerator after the Android system crashes, through a The system can be restored by pressing a button, without the need for after-sales personnel to go to the site for maintenance, thus solving a major problem in the after-sales service of smart refrigerators. In addition, from the perspective of ensuring system stability, this function effectively solves the stability problem of consumer electronics systems.
另外,根据本发明上述的操作系统一键恢复功能的控制方法,还可以具有如下附加的技术特征:In addition, according to the control method of the above-mentioned operating system one-key recovery function of the present invention, it may also have the following additional technical features:
在上述技术方案中,优选地,在接收一键恢复功能的控制指令,进入一键恢复模式的步骤之前,该控制方法还包括:存储系统备份数据;存储系统备份数据的步骤,具体包括:获取系统备份数据的大小,根据系统备份数据的大小在分区表中新建第一分区;根据第一分区的首地址及其大小,将第一分区及系统备份数据导入到EMMC中。In the above technical solution, preferably, before the step of receiving the control command of the one-key recovery function and entering the one-key recovery mode, the control method further includes: storing the system backup data; the step of storing the system backup data, specifically including: obtaining According to the size of system backup data, create a new first partition in the partition table; according to the first address and size of the first partition, import the first partition and system backup data into EMMC.
在该技术方案中,由于android系统数据大部分是存储在EMMC中,在存储数据之前需要建立一个分区表,再通过软件工具将Android系统数据以及分区表导入到EMMC中,系统在启动时候就会通过这个分区表加载系统数据到内存中运行,因此,在接收一键恢复功能的控制指令,进入一键恢复模式的步骤之前,还需要将系统数据的备份数据存储到EMMC中,这样在通过按键触发一键恢复模式后,系统启动到bootloader阶段时,能够确保将备份的系统数据顺利写到原先存放系统数据的EMMC中,这样在系统进入Android阶段时,崩溃的系统数据得以恢复,系统实现重启。具体的,需要在分区表中新建一个分区(第一分区),该分区的大小根据具体的Android系统数据大小来定,再将系统数据(包括kernel.img,boot.img,system.img等)打包在一起,根据第一分区的首地址及其大小,通过软件工具按照分页存储的方式将第一分区以及打包在一起的系统数据导入到EMMC中。In this technical solution, since most of the android system data is stored in EMMC, a partition table needs to be established before storing data, and then the Android system data and partition table are imported into EMMC through software tools, and the system will Load the system data through this partition table and run it in the memory. Therefore, before receiving the control command of the one-key recovery function and entering the step of the one-key recovery mode, it is necessary to store the backup data of the system data in the EMMC, so that after pressing the key After the one-button recovery mode is triggered, when the system starts to the bootloader stage, it can ensure that the backup system data is successfully written to the EMMC where the system data was originally stored, so that when the system enters the Android stage, the crashed system data can be restored and the system can be restarted . Specifically, a new partition (the first partition) needs to be created in the partition table. The size of the partition is determined according to the size of the specific Android system data, and then the system data (including kernel.img, boot.img, system.img, etc.) Package them together, and import the first partition and the system data packaged together into EMMC through software tools according to the paging storage method according to the first address and size of the first partition.
在上述任一技术方案中,优选地,该控制方法还包括:存储系统数据;存储系统数据的步骤,具体包括:获取系统数据的类型及其大小,根据系统数据的类型及其大小,建立分区表;根据分区表各分区的首地址及其大小,将分区表及系统数据导入到EMMC中。In any of the above technical solutions, preferably, the control method further includes: storing system data; the step of storing system data, specifically including: obtaining the type and size of system data, and establishing partitions according to the type and size of system data table; import the partition table and system data into EMMC according to the first address and size of each partition in the partition table.
在该技术方案中,根据系统数据的类型(该系统数据包括kernel.img,boot.img,system.img等)及其大小,建立分区表,根据分区表各分区的首地址及其大小,通过软件工具将系统数据以及分区表导入到EMMC中,这样,系统在启动时候就会通过这个分区表加载系统数据到内存中运行。In this technical solution, according to the type of system data (the system data includes kernel.img, boot.img, system.img, etc.) The software tool imports the system data and the partition table into the EMMC, so that the system will load the system data into the memory through the partition table to run when the system is started.
在上述任一技术方案中,优选地,系统数据及系统备份数据在EMMC中的存储方式为分页的存储方式。In any of the above technical solutions, preferably, the storage mode of the system data and the system backup data in the EMMC is a paging storage mode.
在该技术方案中,EMMC的存储是分页的方式,每页的大小都是固定的,因此,需要根据页的大小读取数据到内存中,再将内存中的数据写回到EMMC中;此外,硬件平台的不同,读写函数以及页的大小要做相应的改变;并且读写是同时进行的,避免内存空间的不足,以保证备份数据顺利写到原先存放系统数据的EMMC中。In this technical solution, the storage of EMMC is in paging mode, and the size of each page is fixed. Therefore, it is necessary to read data into the memory according to the size of the page, and then write the data in the memory back to the EMMC; in addition According to different hardware platforms, read and write functions and page size should be changed accordingly; and read and write are carried out at the same time to avoid insufficient memory space, so as to ensure that the backup data is successfully written to the EMMC where the system data was originally stored.
本发明的第二个目的,提出了一种操作系统一键恢复功能的控制装置,操作系统存储在EMMC中,该控制装置包括:接收单元,用于接收一键恢复功能的控制指令,进入一键恢复模式;读取单元,用于当操作系统启动到bootloader阶段时,从bootloader阶段的分区表中获取系统备份数据的首地址及其大小,根据系统备份数据的首地址及其大小,从EMMC中读取系统备份数据到内存中;同时处理单元,用于从分区表中获取系统数据的首地址,根据系统数据的首地址,将读取到内存中的系统备份数据,分别写入到系统数据在EMMC中的分区;处理单元,还用于写入完成后,重新启动操作系统。The second object of the present invention is to propose a control device for one-key recovery function of the operating system. The operating system is stored in EMMC. Key recovery mode; the reading unit is used to obtain the first address and size of the system backup data from the partition table of the bootloader stage when the operating system starts to the bootloader stage, and obtain the first address and size of the system backup data from the EMMC according to the first address and the size of the system backup data. Read the system backup data from the memory into the memory; at the same time, the processing unit is used to obtain the first address of the system data from the partition table, and write the system backup data read into the memory into the system respectively according to the first address of the system data. The partition of data in EMMC; the processing unit is also used to restart the operating system after the writing is completed.
根据本发明的操作系统一键恢复功能的控制系统,通过按键触发进入一键恢复模式,在系统启动到bootloader阶段,根据bootloader中的分区表检索到备份系统数据的首地址,采用EMMC read函数,将备份在EMMC中的系统数据(该系统数据包括但不限于kernel.img、boot.img、system.img)读取到内存中,再通过EMMC write函数分别写入到之前EMMC中的各个系统数据所在的分区中;其中,EMMC的存贮是分页的方式,每页的大小都是固定的,因此,需要根据页的大小读取数据到内存中,再将内存中的数据写回到EMMC中;此外,硬件平台的不同,读写函数以及页的大小要做相应的改变;并且读写是同时进行的,避免内存空间的不足,以保证备份数据顺利写到原先存放系统数据的EMMC中。其中,操作系统优选地为Android,由于一级boot之时,并未进入Android阶段,而一键恢复功能是在bootloader中完成的,因此,该功能可以使智能冰箱在Android系统崩溃后,通过一个按键就能重新恢复系统,而无需售后人员到现场进行维修,从而解决了智能冰箱售后的一大难题,另外,从保证系统稳定性的角度,该功能有效解决了消费电子系统的稳定性问题。According to the control system of the one-key recovery function of the operating system of the present invention, the one-key recovery mode is triggered by a button, and the system is started to the bootloader stage, and the first address of the backup system data is retrieved according to the partition table in the bootloader, and the EMMC read function is adopted. Read the system data backed up in EMMC (the system data includes but not limited to kernel.img, boot.img, system.img) into the memory, and then write to each system data in the previous EMMC through the EMMC write function In the partition where it is located; among them, the storage of EMMC is paging, and the size of each page is fixed. Therefore, it is necessary to read the data into the memory according to the size of the page, and then write the data in the memory back to the EMMC ;In addition, depending on the hardware platform, the read and write functions and the page size should be changed accordingly; and the read and write are carried out at the same time to avoid insufficient memory space, so as to ensure that the backup data is successfully written to the EMMC where the system data was originally stored. Wherein, the operating system is preferably Android, because the first-level boot does not enter the Android stage, and the one-key recovery function is completed in the bootloader, so this function can make the smart refrigerator after the Android system crashes, through a The system can be restored by pressing a button, without the need for after-sales personnel to go to the site for maintenance, thus solving a major problem in the after-sales service of smart refrigerators. In addition, from the perspective of ensuring system stability, this function effectively solves the stability problem of consumer electronics systems.
在该技术方案中,In this technical scheme,
在上述技术方案中,优选地,该控制装置还包括:第一存储单元,用于在接收一键恢复功能的控制指令,进入一键恢复模式的步骤之前,存储系统备份数据;第一存储单元,具体用于:获取系统备份数据的大小,根据系统备份数据的大小在分区表中新建第一分区;根据第一分区的首地址及其大小,将第一分区及系统备份数据导入到EMMC中。In the above technical solution, preferably, the control device further includes: a first storage unit, used to store the system backup data before receiving the control instruction of the one-key recovery function and entering the one-key recovery mode; the first storage unit , specifically used to: obtain the size of the system backup data, create a new first partition in the partition table according to the size of the system backup data; import the first partition and the system backup data into EMMC according to the first address and size of the first partition .
在该技术方案中,由于android系统数据大部分是存储在EMMC中,在存储数据之前需要建立一个分区表,再通过软件工具将Android系统数据以及分区表导入到EMMC中,系统在启动时候就会通过这个分区表加载系统数据到内存中运行,因此,在接收一键恢复功能的控制指令,进入一键恢复模式的步骤之前,还需要将系统数据的备份数据存储到EMMC中,这样在通过按键触发一键恢复模式后,系统启动到bootloader阶段时,能够确保将备份的系统数据顺利写到原先存放系统数据的EMMC中,这样在系统进入Android阶段时,崩溃的系统数据得以恢复,系统实现重启。具体的,需要在分区表中新建一个分区(第一分区),该分区的大小根据具体的Android系统数据大小来定,再将系统数据(包括kernel.img,boot.img,system.img等)打包在一起,根据第一分区的首地址及其大小,通过软件工具按照分页存储的方式将第一分区以及打包在一起的系统数据导入到EMMC中。In this technical solution, since most of the android system data is stored in EMMC, a partition table needs to be established before storing data, and then the Android system data and partition table are imported into EMMC through software tools, and the system will Load the system data through this partition table and run it in the memory. Therefore, before receiving the control command of the one-key recovery function and entering the step of the one-key recovery mode, it is necessary to store the backup data of the system data in the EMMC, so that after pressing the key After the one-button recovery mode is triggered, when the system starts to the bootloader stage, it can ensure that the backup system data is successfully written to the EMMC where the system data was originally stored, so that when the system enters the Android stage, the crashed system data can be restored and the system can be restarted . Specifically, a new partition (the first partition) needs to be created in the partition table. The size of the partition is determined according to the size of the specific Android system data, and then the system data (including kernel.img, boot.img, system.img, etc.) Package them together, and import the first partition and the system data packaged together into EMMC through software tools according to the paging storage method according to the first address and size of the first partition.
在上述任一技术方案中,优选地,该控制装置还包括:第二存储单元,用于存储系统数据;第二存储单元,具体用于:获取系统数据的类型及其大小,根据系统数据的类型及其大小,建立分区表;根据分区表各分区的首地址及其大小,将分区表及系统数据导入到EMMC中。In any of the above technical solutions, preferably, the control device further includes: a second storage unit for storing system data; the second storage unit is specifically used for: acquiring the type and size of the system data, according to the system data Type and size, establish a partition table; import the partition table and system data into EMMC according to the first address and size of each partition in the partition table.
在该技术方案中,根据系统数据的类型(该系统数据包括kernel.img,boot.img,system.img等)及其大小,建立分区表,根据分区表各分区的首地址及其大小,通过软件工具将系统数据以及分区表导入到EMMC中,这样,系统在启动时候就会通过这个分区表加载系统数据到内存中运行。In this technical solution, according to the type of system data (the system data includes kernel.img, boot.img, system.img, etc.) The software tool imports the system data and the partition table into the EMMC, so that the system will load the system data into the memory through the partition table to run when the system is started.
在上述任一技术方案中,优选地,系统数据及系统备份数据在EMMC中的存储方式为分页的存储方式。In any of the above technical solutions, preferably, the storage mode of the system data and the system backup data in the EMMC is a paging storage mode.
在该技术方案中,EMMC的存储是分页的方式,每页的大小都是固定的,因此,需要根据页的大小读取数据到内存中,再将内存中的数据写回到EMMC中;此外,硬件平台的不同,读写函数以及页的大小要做相应的改变;并且读写是同时进行的,避免内存空间的不足,以保证备份数据顺利写到原先存放系统数据的EMMC中。In this technical solution, the storage of EMMC is in paging mode, and the size of each page is fixed. Therefore, it is necessary to read data into the memory according to the size of the page, and then write the data in the memory back to the EMMC; in addition According to different hardware platforms, read and write functions and page size should be changed accordingly; and read and write are carried out at the same time to avoid insufficient memory space, so as to ensure that the backup data is successfully written to the EMMC where the system data was originally stored.
本发明的第三个目的,提出了一种EMMC,包括如上述任一技术方案中的操作系统一键恢复功能的控制装置。The third object of the present invention is to propose an EMMC, including a control device for the one-key recovery function of the operating system in any of the above-mentioned technical solutions.
根据本发明的EMMC,采用上述任一技术方案中的操作系统一键恢复功能的控制装置,因而具备该操作系统一键恢复功能的控制装置的全部有益效果,在此不再赘述。According to the EMMC of the present invention, the control device with the one-key recovery function of the operating system in any of the above technical solutions is adopted, so all the beneficial effects of the control device with the one-key recovery function of the operating system will not be repeated here.
本发明的第四个目的,提出了一种冰箱,包括如上述技术方案中的EMMC。The fourth object of the present invention is to propose a refrigerator, including the EMMC in the above technical solution.
根据本发明的冰箱,采用上述技术方案中的EMMC,因而具备该EMMC的全部有益效果,在此不再赘述。According to the refrigerator of the present invention, the EMMC in the above technical solution is adopted, so it has all the beneficial effects of the EMMC, which will not be repeated here.
本发明的第五个目的,提出了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器用于执行如上述任一技术方案中的操作系统一键恢复功能的控制方法的步骤。The fifth object of the present invention is to propose a computer device, including a memory, a processor, and a computer program stored on the memory and operable on the processor, and the processor is used to execute the operating system in any of the above technical solutions The steps of the control method of the one-key recovery function.
根据本发明的计算机设备,可以使智能冰箱在Android系统崩溃后,通过一个按键就能重新恢复系统,而无需售后人员到现场进行维修,从而解决了智能冰箱售后的一大难题,另外,从保证系统稳定性的角度,有效解决了消费电子系统的稳定性问题。According to the computer equipment of the present invention, after the Android system crashes, the smart refrigerator can restore the system by pressing a button, without the need for after-sales personnel to go to the scene for maintenance, thereby solving a major problem of after-sales of smart refrigerators. In addition, from the guarantee From the perspective of system stability, it effectively solves the stability problem of consumer electronics systems.
本发明的第六个目的,提出了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现了如上述任一技术方案中的操作系统一键恢复功能的控制方法的步骤。The sixth object of the present invention is to propose a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the control of the one-key recovery function of the operating system in any of the above-mentioned technical solutions is realized. method steps.
根据本发明的计算机可读存储介质,可以使智能冰箱在Android系统崩溃后,通过一个按键就能重新恢复系统,而无需售后人员到现场进行维修,从而解决了智能冰箱售后的一大难题,另外,从保证系统稳定性的角度,有效解决了消费电子系统的稳定性问题。According to the computer-readable storage medium of the present invention, after the Android system crashes, the smart refrigerator can restore the system by pressing a button, without the need for after-sales personnel to go to the scene for maintenance, thereby solving a major problem in the after-sales service of smart refrigerators. , from the perspective of ensuring system stability, it effectively solves the stability problem of the consumer electronics system.
本发明的附加方面和优点将在下面的描述部分中变得明显,或通过本发明的实践了解到。Additional aspects and advantages of the invention will become apparent in the description which follows, or may be learned by practice of the invention.
附图说明Description of drawings
本发明的上述和/或附加的方面和优点从结合下面附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present invention will become apparent and comprehensible from the description of the embodiments in conjunction with the following drawings, wherein:
图1示出了根据本发明的一个实施例的操作系统一键恢复功能的控制方法的流程示意图;FIG. 1 shows a schematic flow chart of a method for controlling a one-key recovery function of an operating system according to an embodiment of the present invention;
图2示出了根据本发明的另一个实施例的操作系统一键恢复功能的控制方法的流程示意图;FIG. 2 shows a schematic flowchart of a method for controlling the one-key recovery function of the operating system according to another embodiment of the present invention;
图3示出了根据本发明的一个实施例的操作系统一键恢复功能的控制方法的原理示意图;FIG. 3 shows a schematic diagram of the principle of a method for controlling the one-key recovery function of the operating system according to an embodiment of the present invention;
图4示出了根据本发明的一个实施例的操作系统一键恢复功能的控制装置的示意框图;FIG. 4 shows a schematic block diagram of a control device for the one-key recovery function of the operating system according to an embodiment of the present invention;
图5示出了根据本发明的另一个实施例的操作系统一键恢复功能的控制装置的示意框图;FIG. 5 shows a schematic block diagram of a control device for the one-key recovery function of the operating system according to another embodiment of the present invention;
图6示出了根据本发明的再一个实施例的操作系统一键恢复功能的控制装置的示意框图;FIG. 6 shows a schematic block diagram of a control device for the one-key recovery function of the operating system according to yet another embodiment of the present invention;
图7示出了根据本发明的一个实施例的EMMC的示意框图;Fig. 7 shows the schematic block diagram of the EMMC according to one embodiment of the present invention;
图8示出了根据本发明的一个实施例的冰箱的示意框图;Fig. 8 shows a schematic block diagram of a refrigerator according to an embodiment of the present invention;
图9示出了根据本发明的一个实施例的计算机设备的示意图。Fig. 9 shows a schematic diagram of a computer device according to an embodiment of the present invention.
具体实施方式detailed description
为了能够更清楚地理解本发明的上述目的、特征和优点,下面结合附图和具体实施方式对本发明进行进一步的详细描述。需要说明的是,在不冲突的情况下,本申请的实施例及实施例中的特征可以相互组合。In order to understand the above-mentioned purpose, features and advantages of the present invention more clearly, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that, in the case of no conflict, the embodiments of the present application and the features in the embodiments can be combined with each other.
在下面的描述中阐述了很多具体细节以便于充分理解本发明,但是,本发明还可以采用其他不同于在此描述的其他方式来实施,因此,本发明的保护范围并不受下面公开的具体实施例的限制。In the following description, many specific details are set forth in order to fully understand the present invention. However, the present invention can also be implemented in other ways different from those described here. Therefore, the protection scope of the present invention is not limited by the specific details disclosed below. EXAMPLE LIMITATIONS.
如图1所示,根据本发明的一个实施例的操作系统一键恢复功能的控制方法的流程示意图。其中,该操作系统存储在EMMC中,该控制方法100包括:As shown in FIG. 1 , it is a schematic flowchart of a method for controlling a one-key recovery function of an operating system according to an embodiment of the present invention. Wherein, the operating system is stored in the EMMC, and the control method 100 includes:
步骤102,接收一键恢复功能的控制指令,进入一键恢复模式;Step 102, receiving a control command of the one-key recovery function, and entering the one-key recovery mode;
步骤104,当操作系统启动到bootloader阶段时,从bootloader阶段的分区表中获取系统备份数据的首地址及其大小,根据系统备份数据的首地址及其大小,从EMMC中读取系统备份数据到内存中;同时Step 104, when the operating system starts to the bootloader stage, obtain the first address of the system backup data and its size from the partition table of the bootloader stage, and read the system backup data from the EMMC according to the first address of the system backup data and its size in memory; at the same time
步骤106,从分区表中获取系统数据的首地址,根据系统数据的首地址,将读取到内存中的系统备份数据,分别写入到系统数据在EMMC中的分区;Step 106, obtain the first address of the system data from the partition table, according to the first address of the system data, the system backup data in the internal memory will be read into the partitions of the system data in the EMMC respectively;
步骤108,写入完成后,重新启动操作系统。Step 108, after the writing is completed, restart the operating system.
本发明提供的操作系统一键恢复功能的控制方法100,通过按键触发进入一键恢复模式,在系统启动到bootloader阶段,根据bootloader中的分区表检索到备份系统数据的首地址,采用EMMC read函数,将备份在EMMC中的系统数据(该系统数据包括但不限于kernel.img、boot.img、system.img)读取到内存中,再通过EMMC write函数分别写入到之前EMMC中的各个系统数据所在的分区中;其中,EMMC的存贮是分页的方式,每页的大小都是固定的,因此,需要根据页的大小读取数据到内存中,再将内存中的数据写回到EMMC中;此外,硬件平台的不同,读写函数以及页的大小要做相应的改变;并且读写是同时进行的,避免内存空间的不足,以保证备份数据顺利写到原先存放系统数据的EMMC中。其中,操作系统优选地为Android,由于一级boot之时,并未进入Android阶段,而一键恢复功能是在bootloader中完成的,因此,该功能可以使智能冰箱在Android系统崩溃后,通过一个按键就能重新恢复系统,而无需售后人员到现场进行维修,从而解决了智能冰箱售后的一大难题,另外,从保证系统稳定性的角度,该功能有效解决了消费电子系统的稳定性问题。The control method 100 of the one-key recovery function of the operating system provided by the present invention is triggered by a button to enter the one-key recovery mode. When the system starts to the bootloader stage, the first address of the backup system data is retrieved according to the partition table in the bootloader, and the EMMC read function is used. , read the system data backed up in EMMC (the system data includes but not limited to kernel.img, boot.img, system.img) into the memory, and then write them to each system in the previous EMMC through the EMMC write function In the partition where the data is located; among them, the storage of EMMC is paging, and the size of each page is fixed. Therefore, it is necessary to read the data into the memory according to the size of the page, and then write the data in the memory back to EMMC In addition, depending on the hardware platform, the read and write functions and the size of the page should be changed accordingly; and the read and write are carried out at the same time to avoid insufficient memory space, so as to ensure that the backup data is successfully written to the EMMC where the system data was originally stored . Wherein, the operating system is preferably Android, because the first-level boot does not enter the Android stage, and the one-key recovery function is completed in the bootloader, so this function can make the smart refrigerator after the Android system crashes, through a The system can be restored by pressing a button, without the need for after-sales personnel to go to the site for maintenance, thus solving a major problem in the after-sales service of smart refrigerators. In addition, from the perspective of ensuring system stability, this function effectively solves the stability problem of consumer electronics systems.
如图2所示,根据本发明的另一个实施例的操作系统一键恢复功能的控制方法的流程示意图。其中,该操作系统存储在EMMC中,该控制方法200包括:As shown in FIG. 2 , it is a schematic flowchart of a method for controlling the one-key recovery function of the operating system according to another embodiment of the present invention. Wherein, the operating system is stored in the EMMC, and the control method 200 includes:
步骤202,在接收一键恢复功能的控制指令,进入一键恢复模式的步骤之前,存储系统备份数据;存储系统备份数据的步骤,具体包括:获取系统备份数据的大小,根据系统备份数据的大小在分区表中新建第一分区;根据第一分区的首地址及其大小,将第一分区及系统备份数据导入到EMMC中;Step 202, before receiving the control command of the one-key recovery function and entering the one-key recovery mode, store the system backup data; the step of storing the system backup data specifically includes: obtaining the size of the system backup data, according to the size of the system backup data Create a new first partition in the partition table; import the first partition and system backup data into EMMC according to the first address and size of the first partition;
步骤204,接收一键恢复功能的控制指令,进入一键恢复模式;Step 204, receiving a control command of the one-key recovery function, and entering the one-key recovery mode;
步骤206,当操作系统启动到bootloader阶段时,从bootloader阶段的分区表中获取系统备份数据的首地址及其大小,根据系统备份数据的首地址及其大小,从EMMC中读取系统备份数据到内存中;同时Step 206, when the operating system starts to the bootloader stage, obtain the first address of the system backup data and its size from the partition table of the bootloader stage, and read the system backup data from the EMMC according to the first address of the system backup data and its size in memory; at the same time
步骤208,从分区表中获取系统数据的首地址,根据系统数据的首地址,将读取到内存中的系统备份数据,分别写入到系统数据在EMMC中的分区;Step 208, obtain the first address of the system data from the partition table, according to the first address of the system data, the system backup data in the internal memory will be read into the partition of the system data in the EMMC respectively;
步骤210,写入完成后,重新启动操作系统。Step 210, after the writing is completed, restart the operating system.
在该实施例中,由于android系统数据大部分是存储在EMMC中,在存储数据之前需要建立一个分区表,再通过软件工具将Android系统数据以及分区表导入到EMMC中,系统在启动时候就会通过这个分区表加载系统数据到内存中运行,因此,在接收一键恢复功能的控制指令,进入一键恢复模式的步骤之前,还需要将系统数据的备份数据存储到EMMC中,这样在通过按键触发一键恢复模式后,系统启动到bootloader阶段时,能够确保将备份的系统数据顺利写到原先存放系统数据的EMMC中,这样在系统进入Android阶段时,崩溃的系统数据得以恢复,系统实现重启。具体的,需要在分区表中新建一个分区(第一分区),该分区的大小根据具体的Android系统数据大小来定,再将系统数据(包括kernel.img,boot.img,system.img等)打包在一起,根据第一分区的首地址及其大小,通过软件工具按照分页存储的方式将第一分区以及打包在一起的系统数据导入到EMMC中。In this embodiment, since most of the android system data are stored in the EMMC, a partition table needs to be set up before storing the data, and then the Android system data and the partition table are imported into the EMMC by software tools, and the system will Load the system data through this partition table and run it in the memory. Therefore, before receiving the control command of the one-key recovery function and entering the step of the one-key recovery mode, it is necessary to store the backup data of the system data in the EMMC, so that after pressing the key After the one-button recovery mode is triggered, when the system starts to the bootloader stage, it can ensure that the backup system data is successfully written to the EMMC where the system data was originally stored, so that when the system enters the Android stage, the crashed system data can be restored and the system can be restarted . Specifically, a new partition (the first partition) needs to be created in the partition table. The size of the partition is determined according to the size of the specific Android system data, and then the system data (including kernel.img, boot.img, system.img, etc.) Package them together, and import the first partition and the system data packaged together into EMMC through software tools according to the paging storage method according to the first address and size of the first partition.
在上述任一实施例中,优选地,该控制方法还包括:存储系统数据;存储系统数据的步骤,具体包括:获取系统数据的类型及其大小,根据系统数据的类型及其大小,建立分区表;根据分区表各分区的首地址及其大小,将分区表及系统数据导入到EMMC中。In any of the above embodiments, preferably, the control method further includes: storing system data; the step of storing system data, specifically including: obtaining the type and size of system data, and establishing partitions according to the type and size of system data table; import the partition table and system data into EMMC according to the first address and size of each partition in the partition table.
在该实施例中,根据系统数据的类型(该系统数据包括kernel.img,boot.img,system.img等)及其大小,建立分区表,根据分区表各分区的首地址及其大小,通过软件工具将系统数据以及分区表导入到EMMC中,这样,系统在启动时候就会通过这个分区表加载系统数据到内存中运行。In this embodiment, according to the type of system data (the system data includes kernel.img, boot.img, system.img, etc.) The software tool imports the system data and the partition table into the EMMC, so that the system will load the system data into the memory through the partition table to run when the system is started.
在上述任一实施例中,优选地,系统数据及系统备份数据在EMMC中的存储方式为分页的存储方式。In any of the above embodiments, preferably, the storage mode of the system data and the system backup data in the EMMC is a paging storage mode.
在该实施例中,EMMC的存储是分页的方式,每页的大小都是固定的,因此,需要根据页的大小读取数据到内存中,再将内存中的数据写回到EMMC中;此外,硬件平台的不同,读写函数以及页的大小要做相应的改变;并且读写是同时进行的,避免内存空间的不足,以保证备份数据顺利写到原先存放系统数据的EMMC中。In this embodiment, the storage of EMMC is the mode of paging, and the size of each page is all fixed, therefore, need to read data in memory according to the size of page, then write the data in memory back in EMMC; In addition According to different hardware platforms, read and write functions and page size should be changed accordingly; and read and write are carried out at the same time to avoid insufficient memory space, so as to ensure that the backup data is successfully written to the EMMC where the system data was originally stored.
如图3所示,根据本发明的一个实施例的操作系统一键恢复功能的控制方法的原理示意图。As shown in FIG. 3 , it is a schematic schematic diagram of a method for controlling the one-key recovery function of the operating system according to an embodiment of the present invention.
在该实施例中,操作系统一键恢复功能的控制方法的原理,具体的包括:通过按键触发进入一键恢复模式,将备份在EMMC中的系统数据(包括但不限于kernel.img,boot.img,system.img)通过EMMC read函数读取到内存中,再通过EMMC write函数重新写到原先存放Android系统数据的EMMC中,并且读写是同时进行的,写入完成后,重新启动操作系统。其中,操作系统优选地为Android,由于一级boot之时,并未进入Android阶段,而一键恢复功能是在bootloader中完成的,因此,该一键恢复功能可以使智能冰箱在Android系统崩溃后,通过一个按键就能重新恢复系统,而无需售后人员到现场进行维修,从而解决了智能冰箱售后的一大难题,另外,从保证系统稳定性的角度,该功能有效解决了消费电子系统的稳定性问题。In this embodiment, the principle of the control method of the one-key recovery function of the operating system specifically includes: entering the one-key recovery mode by triggering a key, and backing up the system data in the EMMC (including but not limited to kernel.img, boot. img, system.img) is read into the memory through the EMMC read function, and then rewritten into the EMMC where the Android system data was originally stored through the EMMC write function, and the reading and writing are carried out at the same time. After the writing is completed, restart the operating system . Wherein, the operating system is preferably Android, because the first-level boot does not enter the Android stage, and the one-key recovery function is completed in the bootloader, so this one-key recovery function can make the smart refrigerator crash after the Android system crashes. , the system can be restored with a single button, without the need for after-sales personnel to go to the site for maintenance, thus solving a major problem in the after-sales of smart refrigerators. In addition, from the perspective of ensuring system stability, this function effectively solves the problem of consumer electronics system stability. sexual issues.
如图4所示,根据本发明的一个实施例的操作系统一键恢复功能的控制装置的示意框图。其中,该操作系统存储在EMMC中,该控制装置400包括:As shown in FIG. 4 , it is a schematic block diagram of a device for controlling the one-key recovery function of the operating system according to an embodiment of the present invention. Wherein, the operating system is stored in the EMMC, and the control device 400 includes:
接收单元402,用于接收一键恢复功能的控制指令,进入一键恢复模式;The receiving unit 402 is configured to receive a control instruction of the one-key recovery function, and enter the one-key recovery mode;
读取单元404,用于当操作系统启动到bootloader阶段时,从分区表中获取系统备份数据的首地址及其大小,根据系统备份数据的首地址及其大小,从EMMC中读取系统备份数据到内存中;同时The reading unit 404 is used to obtain the first address and the size of the system backup data from the partition table when the operating system starts to the bootloader stage, and read the system backup data from the EMMC according to the first address and the size of the system backup data into memory; at the same time
处理单元406,用于从分区表中获取系统数据的首地址,根据系统数据的首地址,将读取到内存中的系统备份数据,分别写入到系统数据在EMMC中的分区;The processing unit 406 is used to obtain the first address of the system data from the partition table, and write the system backup data read into the memory into the partitions of the system data in the EMMC according to the first address of the system data;
处理单元406,还用于写入完成后,重新启动操作系统。The processing unit 406 is further configured to restart the operating system after the writing is completed.
根据本发明的操作系统一键恢复功能的控制系统400,通过按键触发进入一键恢复模式,在系统启动到bootloader阶段,根据bootloader中的分区表检索到备份系统数据的首地址,采用EMMC read函数,将备份在EMMC中的系统数据(该系统数据包括但不限于kernel.img、boot.img、system.img)读取到内存中,再通过EMMC write函数分别写入到之前EMMC中的各个系统数据所在的分区中;其中,EMMC的存贮是分页的方式,每页的大小都是固定的,因此,需要根据页的大小读取数据到内存中,再将内存中的数据写回到EMMC中;此外,硬件平台的不同,读写函数以及页的大小要做相应的改变;并且读写是同时进行的,避免内存空间的不足,以保证备份数据顺利写到原先存放系统数据的EMMC中。其中,操作系统优选地为Android,由于一级boot之时,并未进入Android阶段,而一键恢复功能是在bootloader中完成的,因此,该功能可以使智能冰箱在Android系统崩溃后,通过一个按键就能重新恢复系统,而无需售后人员到现场进行维修,从而解决了智能冰箱售后的一大难题,另外,从保证系统稳定性的角度,该功能有效解决了消费电子系统的稳定性问题。According to the control system 400 of the one-key recovery function of the operating system of the present invention, the one-key recovery mode is triggered by a button, and when the system starts to the bootloader stage, the first address of the backup system data is retrieved according to the partition table in the bootloader, and the EMMC read function is adopted , read the system data backed up in EMMC (the system data includes but not limited to kernel.img, boot.img, system.img) into the memory, and then write them to each system in the previous EMMC through the EMMC write function In the partition where the data is located; among them, the storage of EMMC is paging, and the size of each page is fixed. Therefore, it is necessary to read the data into the memory according to the size of the page, and then write the data in the memory back to EMMC In addition, depending on the hardware platform, the read and write functions and the size of the page should be changed accordingly; and the read and write are carried out at the same time to avoid insufficient memory space, so as to ensure that the backup data is successfully written to the EMMC where the system data was originally stored . Wherein, the operating system is preferably Android, because the first-level boot does not enter the Android stage, and the one-key recovery function is completed in the bootloader, so this function can make the smart refrigerator after the Android system crashes, through a The system can be restored by pressing a button, without the need for after-sales personnel to go to the site for maintenance, thus solving a major problem in the after-sales service of smart refrigerators. In addition, from the perspective of ensuring system stability, this function effectively solves the stability problem of consumer electronics systems.
如图5所示,根据本发明的一个实施例的操作系统一键恢复功能的控制装置的示意框图。其中,该操作系统存储在EMMC中,该控制装置500包括:As shown in FIG. 5 , it is a schematic block diagram of a device for controlling the one-key recovery function of the operating system according to an embodiment of the present invention. Wherein, the operating system is stored in the EMMC, and the control device 500 includes:
接收单元502,用于接收一键恢复功能的控制指令,进入一键恢复模式;The receiving unit 502 is configured to receive a control instruction of the one-key recovery function, and enter the one-key recovery mode;
读取单元504,用于当操作系统启动到bootloader阶段时,从分区表中获取系统备份数据的首地址及其大小,根据系统备份数据的首地址及其大小,从EMMC中读取系统备份数据到内存中;同时The reading unit 504 is used to obtain the first address and the size of the system backup data from the partition table when the operating system starts to the bootloader stage, and read the system backup data from the EMMC according to the first address and the size of the system backup data into memory; at the same time
处理单元506,用于从分区表中获取系统数据的首地址,根据系统数据的首地址,将读取到内存中的系统备份数据,分别写入到系统数据在EMMC中的分区;The processing unit 506 is used to obtain the first address of the system data from the partition table, and write the system backup data read into the memory into the partitions of the system data in the EMMC according to the first address of the system data;
处理单元506,还用于写入完成后,重新启动操作系统;The processing unit 506 is further configured to restart the operating system after the writing is completed;
第一存储单元508,用于在接收一键恢复功能的控制指令,进入一键恢复模式的步骤之前,存储系统备份数据;其中,第一存储单元508,具体用于:The first storage unit 508 is used to store the system backup data before receiving the control instruction of the one-key recovery function and entering the one-key recovery mode; wherein, the first storage unit 508 is specifically used for:
获取系统备份数据的大小,根据系统备份数据的大小在分区表中新建第一分区;根据第一分区的首地址及其大小,将第一分区及系统备份数据导入到EMMC中。Obtain the size of system backup data, create a new first partition in the partition table according to the size of system backup data; import the first partition and system backup data into EMMC according to the first address and size of the first partition.
在该实施例中,由于android系统数据大部分是存储在EMMC中,在存储数据之前需要建立一个分区表,再通过软件工具将Android系统数据以及分区表导入到EMMC中,系统在启动时候就会通过这个分区表加载系统数据到内存中运行,因此,在接收一键恢复功能的控制指令,进入一键恢复模式的步骤之前,还需要将系统数据的备份数据存储到EMMC中,这样在通过按键触发一键恢复模式后,系统启动到bootloader阶段时,能够确保将备份的系统数据顺利写到原先存放系统数据的EMMC中,这样在系统进入Android阶段时,崩溃的系统数据得以恢复,系统实现重启。具体的,需要在分区表中新建一个分区(第一分区),该分区的大小根据具体的Android系统数据大小来定,再将系统数据(包括kernel.img,boot.img,system.img等)打包在一起,根据第一分区的首地址及其大小,通过软件工具按照分页存储的方式将第一分区以及打包在一起的系统数据导入到EMMC中。In this embodiment, since most of the android system data are stored in the EMMC, a partition table needs to be set up before storing the data, and then the Android system data and the partition table are imported into the EMMC by software tools, and the system will Load the system data through this partition table and run it in the memory. Therefore, before receiving the control command of the one-key recovery function and entering the step of the one-key recovery mode, it is necessary to store the backup data of the system data in the EMMC, so that after pressing the key After the one-button recovery mode is triggered, when the system starts to the bootloader stage, it can ensure that the backup system data is successfully written to the EMMC where the system data was originally stored, so that when the system enters the Android stage, the crashed system data can be restored and the system can be restarted . Specifically, a new partition (the first partition) needs to be created in the partition table. The size of the partition is determined according to the size of the specific Android system data, and then the system data (including kernel.img, boot.img, system.img, etc.) Package them together, and import the first partition and the system data packaged together into EMMC through software tools according to the paging storage method according to the first address and size of the first partition.
如图6所示,根据本发明的一个实施例的操作系统一键恢复功能的控制装置的示意框图。其中,该操作系统存储在EMMC中,该控制装置600包括:As shown in FIG. 6 , it is a schematic block diagram of a device for controlling the one-key recovery function of the operating system according to an embodiment of the present invention. Wherein, the operating system is stored in the EMMC, and the control device 600 includes:
接收单元602,用于接收一键恢复功能的控制指令,进入一键恢复模式;The receiving unit 602 is configured to receive a control command of the one-key recovery function, and enter the one-key recovery mode;
读取单元604,用于当操作系统启动到bootloader阶段时,从分区表中获取系统备份数据的首地址及其大小,根据系统备份数据的首地址及其大小,从EMMC中读取系统备份数据到内存中;同时The reading unit 604 is used to obtain the first address and the size of the system backup data from the partition table when the operating system starts to the bootloader stage, and read the system backup data from the EMMC according to the first address and the size of the system backup data into memory; at the same time
处理单元606,用于从分区表中获取系统数据的首地址,根据系统数据的首地址,将读取到内存中的系统备份数据,分别写入到系统数据在EMMC中的分区;The processing unit 606 is used to obtain the first address of the system data from the partition table, and write the system backup data read into the memory into the partitions of the system data in the EMMC according to the first address of the system data;
处理单元606,还用于写入完成后,重新启动操作系统;The processing unit 606 is further configured to restart the operating system after the writing is completed;
第一存储单元608,用于在接收一键恢复功能的控制指令,进入一键恢复模式的步骤之前,存储系统备份数据;其中,第一存储单元608,具体用于:The first storage unit 608 is configured to store system backup data before receiving a control instruction of the one-key recovery function and entering the one-key recovery mode; wherein, the first storage unit 608 is specifically used for:
获取系统备份数据的大小,根据系统备份数据的大小在分区表中新建第一分区;根据第一分区的首地址及其大小,将第一分区及系统备份数据导入到EMMC中Obtain the size of the system backup data, create a new first partition in the partition table according to the size of the system backup data; import the first partition and system backup data into EMMC according to the first address and size of the first partition
第二存储单元610,用于存储系统数据;其中,第二存储单元610,具体用于:获取系统数据的类型及其大小,根据系统数据的类型及其大小,建立分区表;根据分区表各分区的首地址及其大小,将分区表及系统数据导入到EMMC中。The second storage unit 610 is used to store system data; wherein, the second storage unit 610 is specifically used to: obtain the type and size of the system data, and establish a partition table according to the type and size of the system data; The first address and size of the partition, and import the partition table and system data into EMMC.
在该实施例中,根据系统数据的类型(该系统数据包括kernel.img,boot.img,system.img等)及其大小,建立分区表,根据分区表各分区的首地址及其大小,通过软件工具将系统数据以及分区表导入到EMMC中,这样,系统在启动时候就会通过这个分区表加载系统数据到内存中运行。In this embodiment, according to the type of system data (the system data includes kernel.img, boot.img, system.img, etc.) The software tool imports the system data and the partition table into the EMMC, so that the system will load the system data into the memory through the partition table to run when the system is started.
在上述任一实施例中,优选地,系统数据及系统备份数据在EMMC中的存储方式为分页的存储方式。In any of the above embodiments, preferably, the storage mode of the system data and the system backup data in the EMMC is a paging storage mode.
在该实施例中,EMMC的存储是分页的方式,每页的大小都是固定的,因此,需要根据页的大小读取数据到内存中,再将内存中的数据写回到EMMC中;此外,硬件平台的不同,读写函数以及页的大小要做相应的改变;并且读写是同时进行的,避免内存空间的不足,以保证备份数据顺利写到原先存放系统数据的EMMC中。In this embodiment, the storage of EMMC is the mode of paging, and the size of each page is all fixed, therefore, need to read data in memory according to the size of page, then write the data in memory back in EMMC; In addition According to different hardware platforms, read and write functions and page size should be changed accordingly; and read and write are carried out at the same time to avoid insufficient memory space, so as to ensure that the backup data is successfully written to the EMMC where the system data was originally stored.
如图7所示,根据本发明的一个实施例的EMMC的示意框图。其中,该EMMC700,包括如上述任一实施例中的操作系统一键恢复功能的控制装置702。As shown in FIG. 7 , a schematic block diagram of an EMMC according to an embodiment of the present invention. Wherein, the EMMC 700 includes a control device 702 with a one-key recovery function of the operating system as in any of the above-mentioned embodiments.
本发明提供的EMMC700,采用上述任一实施例中的操作系统一键恢复功能的控制装置702,因而具备该操作系统一键恢复功能的控制装置702的全部有益效果,在此不再赘述。The EMMC700 provided by the present invention adopts the control device 702 with the one-key recovery function of the operating system in any of the above-mentioned embodiments, so all the beneficial effects of the control device 702 with the one-key recovery function of the operating system will not be repeated here.
如图8所示,根据本发明的一个实施例的冰箱的示意框图。其中,该冰箱800,包括如上述任一实施例中的EMMC802。As shown in FIG. 8 , it is a schematic block diagram of a refrigerator according to an embodiment of the present invention. Wherein, the refrigerator 800 includes the EMMC 802 in any of the above-mentioned embodiments.
本发明的冰箱800,采用上述实施例中的EMMC802,因而具备该EMMC802的全部有益效果,在此不再赘述。The refrigerator 800 of the present invention adopts the EMMC802 in the above-mentioned embodiment, so it has all the beneficial effects of the EMMC802, which will not be repeated here.
如图9所示,根据本发明的一个实施例的计算机设备的示意图。该计算机设备1包括存储器12、处理器14及存储在存储器12上并可在处理器14上运行的计算机程序,处理器14用于执行如上述任一实施例中的操作系统一键恢复功能的控制方法的步骤。As shown in FIG. 9 , a schematic diagram of a computer device according to an embodiment of the present invention. The computer device 1 includes a memory 12, a processor 14, and a computer program stored on the memory 12 and operable on the processor 14. The processor 14 is used to execute the one-key recovery function of the operating system as in any of the above-mentioned embodiments. The steps of the control method.
本发明提供的计算机设备1,可以使智能冰箱在Android系统崩溃后,通过一个按键就能重新恢复系统,而无需售后人员到现场进行维修,从而解决了智能冰箱售后的一大难题,另外,从保证系统稳定性的角度,有效解决了消费电子系统的稳定性问题。The computer device 1 provided by the present invention can make the smart refrigerator restore the system by pressing a button after the Android system crashes, without the need for after-sales personnel to go to the scene for maintenance, thereby solving a major problem in the after-sales service of smart refrigerators. In addition, from From the perspective of ensuring system stability, it effectively solves the stability problem of consumer electronics systems.
本发明的第六个目的,提出了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现了如上述任一实施例中的操作系统一键恢复功能的控制方法的步骤。The sixth object of the present invention is to propose a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the control of the one-key recovery function of the operating system as in any of the above-mentioned embodiments is realized. method steps.
根据本发明的计算机可读存储介质,可以使智能冰箱在Android系统崩溃后,通过一个按键就能重新恢复系统,而无需售后人员到现场进行维修,从而解决了智能冰箱售后的一大难题,另外,从保证系统稳定性的角度,有效解决了消费电子系统的稳定性问题。According to the computer-readable storage medium of the present invention, after the Android system crashes, the smart refrigerator can restore the system by pressing a button, without the need for after-sales personnel to go to the scene for maintenance, thereby solving a major problem of after-sales of smart refrigerators. In addition, , from the perspective of ensuring system stability, it effectively solves the stability problem of the consumer electronics system.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims (12)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710497197.8A CN107368389B (en) | 2017-06-26 | 2017-06-26 | Control method and control device for one-key recovery function of operating system and EMMC |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710497197.8A CN107368389B (en) | 2017-06-26 | 2017-06-26 | Control method and control device for one-key recovery function of operating system and EMMC |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107368389A true CN107368389A (en) | 2017-11-21 |
CN107368389B CN107368389B (en) | 2020-11-06 |
Family
ID=60305000
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710497197.8A Active CN107368389B (en) | 2017-06-26 | 2017-06-26 | Control method and control device for one-key recovery function of operating system and EMMC |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107368389B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110083374A (en) * | 2019-03-25 | 2019-08-02 | 深圳猛犸电动科技有限公司 | A kind of upgrading rollback method, system and terminal device |
CN113867816A (en) * | 2021-09-17 | 2021-12-31 | 北京鲸鲮信息系统技术有限公司 | Flash startup method, device, equipment and storage medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101251813A (en) * | 2008-03-31 | 2008-08-27 | 宇龙计算机通信科技(深圳)有限公司 | Device and method for mobile telephone system recovery |
CN102520778A (en) * | 2011-12-09 | 2012-06-27 | 山东大学 | One-key reset method suitable for embedded Linux operating system |
CN102622281A (en) * | 2011-01-28 | 2012-08-01 | 北京云系天瑞科技有限公司 | Intelligent terminal and method of data backup and restore thereof |
CN103645972A (en) * | 2013-12-17 | 2014-03-19 | 广州商科信息科技有限公司 | Method and device for automatic recovery of system |
CN103853584A (en) * | 2014-01-17 | 2014-06-11 | 深圳市同洲电子股份有限公司 | Master system recovery method and terminal |
CN104866431A (en) * | 2015-06-12 | 2015-08-26 | 联想(北京)有限公司 | Data processing method and device |
CN106095620A (en) * | 2013-09-23 | 2016-11-09 | 恒鸿达科技有限公司 | A kind of development approach of built-in Linux partition holding |
CN106776133A (en) * | 2016-12-09 | 2017-05-31 | 浪潮电子信息产业股份有限公司 | A kind of system and method for operating system recovery |
-
2017
- 2017-06-26 CN CN201710497197.8A patent/CN107368389B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101251813A (en) * | 2008-03-31 | 2008-08-27 | 宇龙计算机通信科技(深圳)有限公司 | Device and method for mobile telephone system recovery |
CN102622281A (en) * | 2011-01-28 | 2012-08-01 | 北京云系天瑞科技有限公司 | Intelligent terminal and method of data backup and restore thereof |
CN102520778A (en) * | 2011-12-09 | 2012-06-27 | 山东大学 | One-key reset method suitable for embedded Linux operating system |
CN106095620A (en) * | 2013-09-23 | 2016-11-09 | 恒鸿达科技有限公司 | A kind of development approach of built-in Linux partition holding |
CN103645972A (en) * | 2013-12-17 | 2014-03-19 | 广州商科信息科技有限公司 | Method and device for automatic recovery of system |
CN103853584A (en) * | 2014-01-17 | 2014-06-11 | 深圳市同洲电子股份有限公司 | Master system recovery method and terminal |
CN104866431A (en) * | 2015-06-12 | 2015-08-26 | 联想(北京)有限公司 | Data processing method and device |
CN106776133A (en) * | 2016-12-09 | 2017-05-31 | 浪潮电子信息产业股份有限公司 | A kind of system and method for operating system recovery |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110083374A (en) * | 2019-03-25 | 2019-08-02 | 深圳猛犸电动科技有限公司 | A kind of upgrading rollback method, system and terminal device |
CN113867816A (en) * | 2021-09-17 | 2021-12-31 | 北京鲸鲮信息系统技术有限公司 | Flash startup method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN107368389B (en) | 2020-11-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2998861B1 (en) | Implementing and deleting method and device for intelligent terminal multi-operation system | |
US8738883B2 (en) | Snapshot creation from block lists | |
CN102707990B (en) | Container based processing method and device | |
CN105630632B (en) | The method and virtual machine administration device that a kind of virtual machine recovers | |
CN109445861B (en) | System starting method, device, computer device and storage medium | |
CN110704161B (en) | Virtual machine creation method and device and computer equipment | |
US10860447B2 (en) | Database cluster architecture based on dual port solid state disk | |
CN109683983B (en) | Method and equipment for generating and loading mirror image file | |
CN113626256A (en) | Virtual machine disk data backup method, device, terminal and storage medium | |
CN112162773A (en) | Differential upgrading method and device, storage medium and terminal | |
CN107148612B (en) | A method and device for extending user partition | |
CN102880530B (en) | Terminal and terminal backup and restoration methods | |
CN113791934A (en) | Data recovery method, computing device and storage medium | |
CN104866388B (en) | Data processing method and device | |
CN107368389B (en) | Control method and control device for one-key recovery function of operating system and EMMC | |
CN112416527A (en) | Data recovery method, device, equipment and storage medium | |
CN103235703B (en) | Preset resource storage method and apparatus | |
US9235349B2 (en) | Data duplication system, data duplication method, and program thereof | |
CN103838639B (en) | A kind of method, apparatus and system for recovering virtual disk metadata | |
CN108509252B (en) | Virtual machine startup device, method and host | |
CN105488047A (en) | Metadata read-write method and device | |
CN116089135A (en) | Function control method, device, equipment and storage medium | |
CN102902607A (en) | Data backup and recovery method for Android thin client | |
CN110704249A (en) | Method, device and system for ensuring application consistency | |
US10592329B2 (en) | Method and electronic device for continuing executing procedure being aborted from physical address where error occurs |
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 | ||
CB02 | Change of applicant information |
Address after: 230088 Building No. 198, building No. 198, Mingzhu Avenue, Anhui high tech Zone, Anhui Applicant after: Hefei Midea Intelligent Technology Co.,Ltd. Address before: 230601 R & D building, No. 176, Jinxiu Road, Hefei economic and Technological Development Zone, Anhui 501 Applicant before: Hefei Midea Intelligent Technology Co.,Ltd. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address |
Address after: 230601 floor 2, building G2, 198 Pearl Road, hi tech Zone, Hefei, Anhui. Patentee after: Hefei Meizhi Intelligent Technology Co.,Ltd. Country or region after: China Address before: 2nd Floor, Building G2, No. 198 Mingzhu Avenue, High tech Zone, Hefei City, Anhui Province Patentee before: Hefei Midea Intelligent Technology Co.,Ltd. Country or region before: China |
|
CP03 | Change of name, title or address |