TWI575459B - Terminal device and system upgrading method thereof - Google Patents

Terminal device and system upgrading method thereof Download PDF

Info

Publication number
TWI575459B
TWI575459B TW105107797A TW105107797A TWI575459B TW I575459 B TWI575459 B TW I575459B TW 105107797 A TW105107797 A TW 105107797A TW 105107797 A TW105107797 A TW 105107797A TW I575459 B TWI575459 B TW I575459B
Authority
TW
Taiwan
Prior art keywords
memory partition
system file
terminal device
upgrade
memory
Prior art date
Application number
TW105107797A
Other languages
Chinese (zh)
Other versions
TW201732585A (en
Inventor
徐兵輝
Original Assignee
晨星半導體股份有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 晨星半導體股份有限公司 filed Critical 晨星半導體股份有限公司
Priority to TW105107797A priority Critical patent/TWI575459B/en
Application granted granted Critical
Publication of TWI575459B publication Critical patent/TWI575459B/en
Publication of TW201732585A publication Critical patent/TW201732585A/en

Links

Description

終端設備及其系統升級方法 Terminal device and system upgrade method thereof

本發明是有關於一種嵌入式設備,且特別是有關於一種終端設備及其系統升級方法。 The present invention relates to an embedded device, and more particularly to a terminal device and a system upgrade method thereof.

目前,在電視機中廣泛使用了嵌入式作業系統的,為使用者提供更加豐富的功能。在目前的智慧電視中,一般作業系統的更新程式由服務方統一提供,在出現新版本的作業系統時會由伺服器自動推送到終端電視機中。電視機在檢測到伺服器推送的新版本作業系統時,通常會提示使用者是否需要更新、升級系統。當使用者確定升級系統時,電視機此時首先會從伺服器上將新版本的系統檔下載到本地保存,然後再運行下載後的系統檔完成系統升級。但是,在如上所述的系統升級過程中,使用者此時無法觀看電視,只能等待系統檔的下載和安裝。並且,在下載系統檔的過程中斷電,需要在下次開機時重新下載。而在安裝系統檔的過程中斷電,系統有可能損壞而導致無法開機使用,用戶無法自行解決問題,只能等待維修人員來處理。 At present, the embedded operating system is widely used in television sets to provide users with more abundant functions. In the current smart TV, the update program of the general operating system is uniformly provided by the service party, and is automatically pushed by the server to the terminal television when a new version of the operating system appears. When the TV detects a new version of the operating system pushed by the server, it usually prompts the user whether to update or upgrade the system. When the user determines to upgrade the system, the TV will first download the new version of the system file from the server to the local save, and then run the downloaded system file to complete the system upgrade. However, during the system upgrade process described above, the user cannot watch the TV at this time, and can only wait for the download and installation of the system file. Also, the process of downloading the system file is interrupted, and it needs to be re-downloaded the next time it is turned on. However, in the process of installing the system file, the system may be damaged, and the system may be unable to be powered on. The user cannot solve the problem by himself, and can only wait for the maintenance personnel to handle it.

本發明主要解決的技術問題是提供一種終端設備及其系統升級方法,可以在下載升級檔時不影響用戶的使用,以減少系統升級所需時間,並且提高系統穩定性。 The technical problem to be solved by the present invention is to provide a terminal device and a system upgrade method thereof, which can not affect the user's use when downloading the upgrade file, thereby reducing the time required for system upgrade and improving system stability.

為解決上述技術問題,本發明採用的一個技術方案是:提供一種終端設備的系統升級方法,所述終端設備包括被預先至少分成用於保存系統檔的第一記憶體分區和第二記憶體分區,所述方法包括:所述終端設備工作時接收伺服器發送的一第一系統檔;其中,接收所述第一系統檔的事件不影響所述終端設備當前的工作狀態;確定當前運行的第二系統檔所佔用的記憶體分區是所述第一記憶體分區還是所述第二記憶體分區;保存接收的所述第一系統檔至所述第一記憶體分區、第二記憶體分區中當前未被佔用的記憶體分區;以及斷電重啟時若接收到使用者的升級指令,則運行所述第一系統檔,完成系統升級。 In order to solve the above technical problem, a technical solution adopted by the present invention is to provide a system upgrade method for a terminal device, where the terminal device includes a first memory partition and a second memory partition that are at least divided into at least two parts for saving a system file. The method includes: receiving, by the terminal device, a first system file sent by the server; wherein, receiving the event of the first system file does not affect a current working state of the terminal device; determining a current running Whether the memory partition occupied by the second system file is the first memory partition or the second memory partition; storing the received first system file to the first memory partition and the second memory partition The currently unoccupied memory partition; and if the user's upgrade command is received during the power-off restart, the first system file is run to complete the system upgrade.

為解決上述技術問題,本發明採用的另一個技術方案是:提供一種終端設備,所述終端設備包括:一接收器,用於在所述終端設備工作時接收一第一系統檔,其中,接收所述第一系統檔的事件不影響所述終端設備當前的工作狀態;一記憶體,至少包括第一記憶體分區和第二記憶體分區,分別用於保存一第一系統檔及一第二系統檔;一處理器,可用於執行以下步驟:確定當前運行的第二系統檔所佔用的記憶體分區是所述第一記憶體分區還是所述第二記憶體分區;保存接收的所述第一系統檔至所述第一記憶體分區、第二記憶體分區中當前未被佔用的記憶體 分區;以及斷電重啟時若接收到使用者的升級指令,則運行所述第一系統檔,完成系統升級。 In order to solve the above technical problem, another technical solution adopted by the present invention is to provide a terminal device, where the terminal device includes: a receiver, configured to receive a first system file when the terminal device operates, wherein receiving The event of the first system file does not affect the current working state of the terminal device; a memory body includes at least a first memory partition and a second memory partition, respectively, for storing a first system file and a second a system file, wherein the processor is configured to: determine whether the memory partition occupied by the currently running second system file is the first memory partition or the second memory partition; a system file to the first memory partition, the second memory partition currently unoccupied memory Partition; and if the user's upgrade command is received during the power-off restart, the first system file is run to complete the system upgrade.

本發明的有益效果是:區別於現有技術的情況,提供一種終端設備及其系統升級方法,預先將記憶體分成兩個分區,在工作時接收伺服器發送的第一系統檔,並將第一系統檔保存在當前未被佔用的分區,在斷電重啟時若接收到使用者的升級指令,則運行所述第一系統檔,完成系統升級。利用本發明,在系統升級時,將升級檔自動寫入空閒分區而不會影響終端設備的正常工作(如,使用者正常觀看電視),提高使用者體驗,並且記憶體的兩個獨立分區保存系統檔,提高了系統的安全性。 The utility model has the beneficial effects that: different from the prior art, a terminal device and a system upgrade method thereof are provided, the memory is divided into two partitions in advance, and the first system file sent by the server is received during operation, and the first The system file is saved in the currently unoccupied partition, and if the user's upgrade command is received during the power-off restart, the first system file is run to complete the system upgrade. By using the invention, when the system is upgraded, the upgrade file is automatically written into the free partition without affecting the normal operation of the terminal device (for example, the user normally watches the TV), the user experience is improved, and two independent partitions of the memory are saved. The system file improves the security of the system.

為了對本發明之上述及其他方面有更佳的瞭解,下文特舉較佳實施例,並配合所附圖式,作詳細說明如下: In order to better understand the above and other aspects of the present invention, the preferred embodiments are described below, and in conjunction with the drawings, the detailed description is as follows:

20‧‧‧終端設備 20‧‧‧ Terminal equipment

21‧‧‧接收器 21‧‧‧ Receiver

22‧‧‧處理器 22‧‧‧ Processor

23‧‧‧發送器 23‧‧‧Transmitter

24‧‧‧記憶體 24‧‧‧ memory

26‧‧‧匯流排 26‧‧‧ Busbar

S10、S11、S12、S12a、S13、S13a、S13b、S130a、S131a、S132a、S14、S15‧‧‧流程步驟 S10, S11, S12, S12a, S13, S13a, S13b, S130a, S131a, S132a, S14, S15‧‧‧ process steps

第1圖是本發明第一實施方式中的終端設備的系統升級方法的流程示意圖。 FIG. 1 is a flow chart showing a system upgrade method of a terminal device in the first embodiment of the present invention.

第2圖是本發明第二實施方式中的終端設備的系統升級方法的流程示意圖。 2 is a flow chart showing a system upgrade method of a terminal device in a second embodiment of the present invention.

第3圖是本發明第三實施方式中的終端設備的系統升級方法的流程示意圖。 FIG. 3 is a flow chart showing a system upgrade method of a terminal device in a third embodiment of the present invention.

第4圖是本發明第四實施方式中的終端設備的系統升級方法的流程示意圖。 4 is a flow chart showing a system upgrade method of a terminal device in a fourth embodiment of the present invention.

第5圖是本發明實施方式中的記憶體的結構示意圖。 Fig. 5 is a view showing the structure of a memory in the embodiment of the present invention.

第6圖是本發明實施方式中的終端設備的結構示意圖。 FIG. 6 is a schematic structural diagram of a terminal device in an embodiment of the present invention.

為詳細說明本發明的技術內容、構造特徵、所實現目的及效果,以下結合附圖和實施例對本發明進行詳細說明。 The present invention will be described in detail below with reference to the accompanying drawings and embodiments.

請參閱第1圖,為本發明第一實施方式中的終端設備的系統升級方法的流程示意圖。該實施方式示出的系統升級方法包括如下步驟: Referring to FIG. 1 , it is a schematic flowchart of a method for upgrading a system of a terminal device according to a first embodiment of the present invention. The system upgrade method shown in this embodiment includes the following steps:

步驟S10,終端設備在工作時接收一第一系統檔。其中,接收該第一系統檔的事件不影響該終端設備當前的工作狀態。 In step S10, the terminal device receives a first system file during operation. The event of receiving the first system file does not affect the current working state of the terminal device.

第一系統檔為系統升級檔,版本型號高於該終端設備當前運行的系統檔的版本型號。在本實施方式中,該終端設備為智慧電視機。互聯網電視公司伺服器更新用戶端電視的系統,提供升級檔,並通過網路把升級檔推送到用戶端。電視機工作時接收第一系統檔的過程是在後臺進行的,並不會對其播放電視節目造成影響。 The first system file is a system upgrade file, and the version model is higher than the version model of the system file currently running by the terminal device. In this embodiment, the terminal device is a smart TV. The Internet TV company server updates the system of the client TV, provides an upgrade file, and pushes the upgrade file to the client through the network. The process of receiving the first system file while the TV is working is in the background and does not affect the broadcast of the TV program.

步驟S11,確定當前運行的第二系統檔所佔用的記憶體分區是第一記憶體分區還是第二記憶體分區。 Step S11, determining whether the memory partition occupied by the currently running second system file is the first memory partition or the second memory partition.

其中,記憶體被預先分成第一記憶體分區和第二記憶體分區,兩個記憶體分區是相互獨立、互不影響的,均用於保存系統檔。該記憶體為終端設備中具有一定存儲空間、且掉電不 丟失資料的物理記憶體,如,硬碟、快閃記憶體flash等。 The memory is pre-divided into a first memory partition and a second memory partition. The two memory partitions are independent of each other and are not affected by each other, and are used to save system files. The memory has a certain storage space in the terminal device, and the power is not powered off. Physical memory of lost data, such as hard disk, flash memory flash, etc.

進一步地,該記憶體被平均分成第一記憶體分區和第二記憶體分區,即,兩個記憶體分區的存儲空間相同。當然,第一記憶體分區和第二記憶體分區的劃分方式並不僅限於此。 Further, the memory is equally divided into a first memory partition and a second memory partition, that is, the storage spaces of the two memory partitions are the same. Of course, the manner in which the first memory partition and the second memory partition are divided is not limited to this.

步驟S12,將接收的第一系統檔保存至第一記憶體分區、第二記憶體分區中當前未被佔用的記憶體分區。 Step S12: Save the received first system file to a memory partition that is not currently occupied in the first memory partition and the second memory partition.

在步驟S12中,當終端設備工作時運行的第二系統檔是保存在兩個記憶體分區中的其中一個分區的,下載的第一系統檔則保存在另一個分區中(下稱空閒分區)。若該空閒分區原來已經保存了一版本型號較低的系統檔,則第一系統檔覆蓋其原來的系統檔。 In step S12, the second system file that is running when the terminal device is working is saved in one of the two memory partitions, and the downloaded first system file is saved in another partition (hereinafter referred to as a free partition). . If the free partition has originally saved a system file with a lower version of the model, the first system file overwrites its original system file.

步驟S13,斷電重啟時若接收到使用者的升級指令,則運行該第一系統檔,完成系統升級。 In step S13, if the user's upgrade command is received during the power-off restart, the first system file is run to complete the system upgrade.

當終端設備斷電關機後重新啟動時,接收輸入的使用者的升級指令,運行該第一系統檔,完成系統升級。 When the terminal device is powered off and then restarted, the input user's upgrade instruction is received, and the first system file is run to complete the system upgrade.

可選地,若斷電重啟時沒有接收到使用者的升級指令,則運行斷電前運行的所述第二系統檔。本發明實施方式中的終端設備的系統升級方法,預先將記憶體劃分為第一記憶體分區和第二記憶體分區,終端設備工作時載入的系統檔保存在其中一個記憶體分區,同時後臺接收升級的系統檔保存在另一個記憶體分區中,二者相互不影響,使得在終端設備工作的同時完成升級的系統檔的下載,但是卻不會影響用戶使用。而在下一次斷電開 機後,在接收到使用者同意升級的指令時可以直接運行該升級的系統檔,不需要使用者等待其下載,從而加快系統升級進程,提升使用者體驗。進一步地,兩個記憶體分區保存不同版本的系統檔,也可以在其中一個系統檔損壞時由另外一個系統檔支援終端設備運行,從而提高終端設備的系統穩定性。 Optionally, if the upgrade instruction of the user is not received when the power is turned off and restarted, the second system file that is operated before the power failure is run. In the system upgrade method of the terminal device in the embodiment of the present invention, the memory is divided into the first memory partition and the second memory partition in advance, and the system file loaded when the terminal device works is saved in one of the memory partitions, and the background is The system file that receives the upgrade is saved in another memory partition, and the two do not affect each other, so that the download of the upgraded system file is completed while the terminal device is working, but the user's use is not affected. And the next power off After the machine is received, the upgraded system file can be directly run when receiving the instruction that the user agrees to upgrade, and the user is not required to wait for the download, thereby speeding up the system upgrade process and improving the user experience. Further, the two memory partitions save different versions of the system files, and may also be supported by the other system file when one of the system files is damaged, thereby improving the system stability of the terminal device.

請參閱第2圖,步驟S13,即,斷電重啟時若接收到使用者的升級指令,則運行該第一系統檔,完成系統升級,具體通過如下步驟實現: Please refer to FIG. 2, step S13, that is, if the user's upgrade instruction is received during the power-off restart, the first system file is run to complete the system upgrade, which is implemented by the following steps:

步驟S13a,斷電重啟時並當接收到使用者的升級指令時,比較第一記憶體分區和第二記憶體分區保存的系統檔的版本型號,在實際應用中,斷電重啟時,系統會詢問使用者是否升級,即顯示是否升級的對話方塊,用戶點擊同意升級,系統就收到使用者的升級指令。 Step S13a, when the power is turned off and restarted, and when the user's upgrade instruction is received, the version number of the system file saved in the first memory partition and the second memory partition is compared. In actual application, when the power is restarted, the system will Ask the user whether to upgrade, that is, whether to upgrade the dialog box, the user clicks to agree to upgrade, the system receives the user's upgrade instructions.

在步驟S13a中,由於在斷電之前,終端設備已經完成第一系統檔的下載,因此在斷電重啟後接收到使用者的升級指令時,該終端設備的應該升級指令分別讀取第一記憶體分區和第二記憶體分區中保存的系統檔的版本型號,並選擇版本型號較高的系統檔作為引導載入的系統檔,直接引導載入該選則的系統檔,實現系統升級。其中,系統檔的版本型號被寫入所在記憶體分區的chunk header標頭檔,引導載入程式可以從記憶體分區的chunk header標頭檔中獲取保存的系統檔的版本型號。 In step S13a, since the terminal device has completed the download of the first system file before the power is turned off, when the user's upgrade command is received after the power failure restart, the terminal device should read the first memory by the upgrade command. The version number of the system file saved in the body partition and the second memory partition, and the system file with the higher version model is selected as the system file for boot loading, and the system file loaded into the selection is directly guided to implement the system upgrade. The version model of the system file is written to the chunk header header file of the memory partition, and the boot loader can obtain the version model of the saved system file from the chunk header header file of the memory partition.

步驟S13b,運行版本型號較高的系統檔(第一系統 檔),完成系統升級。 Step S13b, running a system file with a higher version (first system) File), complete the system upgrade.

請參閱第3圖,在步驟S12,即,將接收的第一系統檔保存至第一記憶體分區、第二記憶體分區中當前未被佔用的記憶體分區之後,所述方法具體包括: Referring to FIG. 3, after the first system file is saved to the first memory partition and the memory partition that is not occupied in the second memory partition, the method specifically includes:

步驟S12a,將該保存該第一系統檔的記憶體分區對應的狀態標誌位元修改為第一狀態。其中,該第一狀態用於標識記憶體分區中保存的系統檔為最新下載的系統檔。 Step S12a, modifying the status flag bit corresponding to the memory partition in which the first system file is saved to the first state. The first state is used to identify the system file saved in the memory partition as the latest downloaded system file.

步驟S13,即,斷電重啟時若接收到使用者的升級指令,則運行所述第一系統檔,完成系統升級,具體通過如下步驟實現: Step S13, that is, if the user upgrade command is received during the power-off restart, the first system file is executed to complete the system upgrade, which is specifically implemented by the following steps:

步驟S130a,斷電重啟時檢測所述第一記憶體分區或所述第二記憶體分區的狀態標誌位元是否為第一狀態。當檢測到所述第一記憶體分區或所述第二記憶體分區的狀態標誌位元為第一狀態時,進入步驟S131a;當第一記憶體分區和第二記憶體分區的狀態標誌位元均不是第一狀態時,進入步驟S14。 Step S130a: detecting, when the power is turned off, whether the status flag bit of the first memory partition or the second memory partition is in the first state. When it is detected that the status flag bit of the first memory partition or the second memory partition is in the first state, the process proceeds to step S131a; when the first memory partition and the second memory partition are in the status flag bit If it is not the first state, the process proceeds to step S14.

例如,在步驟S130a中,在斷電重啟時,引導載入程式需要檢驗對應第一記憶體分區和第二記憶體分區的狀態標誌位元的狀態值,若兩個記憶體分區中的其中之一的狀態標誌位元為第一狀態時,說明該記憶體分區保存的系統檔是最新下載的系統檔,即,供升級的系統檔。此時,需要詢問使用者是否對系統進行升級。若兩個記憶體分區的狀態標誌位元都不是第一狀態時,說明記憶體中沒有新下載的系統檔。此時,將預設運行上一 次運行的系統檔。其中,引導載入程式通過記錄記憶體分區對應的狀態標誌為第二狀態,表示其保存的系統檔最近一次被運行過,即,斷電前正在運行。因此,引導載入程式只需要判斷兩個記憶體分區中的狀態標誌位元是否為第二狀態,以確定其保存的系統檔是否在斷電前運行過。 For example, in step S130a, when the power is turned off, the boot loader needs to check the status value of the status flag bit corresponding to the first memory partition and the second memory partition, if one of the two memory partitions When the status flag bit of the first state is the first state, it indicates that the system file saved by the memory partition is the latest downloaded system file, that is, the system file for upgrading. At this point, you need to ask the user whether to upgrade the system. If the status flag bits of the two memory partitions are not in the first state, there is no newly downloaded system file in the memory. At this point, the preset will run the previous one. System file that runs once. The boot loader is in the second state by recording the status flag corresponding to the memory partition, indicating that the saved system file has been run last time, that is, before the power is cut off. Therefore, the bootloader only needs to determine if the status flag bit in the two memory partitions is in the second state to determine if its saved system file has been run before powering down.

步驟S131a,比較所述第一記憶體分區和所述第二記憶體分區保存的系統檔的版本型號。 Step S131a, comparing the version models of the system files saved by the first memory partition and the second memory partition.

具體地,當檢測第一記憶體分區或第二記憶體分區的其中之一的狀態標誌位元為第一狀態時,說明終端設備已經下載安裝了系統升級檔。此時,通過彈出提示資訊對話方塊的方式產生提示使用者是否升級到第一系統檔,例如,該提示資訊對話方塊包括“同意”和“取消”,根據使用者對該資訊對話方塊的操作判斷是否接收到升級指令。例如,當檢測到用戶點擊或觸碰上述“同意”時,即接收到升級命令,故執行比較所述第一記憶體分區和所述第二記憶體分區保存的系統檔的版本型號。 Specifically, when the status flag bit of one of the first memory partition or the second memory partition is detected as the first state, it indicates that the terminal device has downloaded and installed the system upgrade file. At this time, by prompting the prompt information dialog box to generate a prompt to prompt the user to upgrade to the first system file, for example, the prompt information dialog box includes "agree" and "cancel", according to the user's operation on the information dialog box. Whether to receive the upgrade instruction. For example, when it is detected that the user clicks or touches the above "agree", that is, receives the upgrade command, the version model of the system file saved by comparing the first memory partition and the second memory partition is executed.

步驟S132a,運行版本型號較高的系統檔,完成系統升級。 Step S132a, running a system file with a higher version of the version to complete the system upgrade.

步驟S14,運行斷電前運行的系統檔(第二系統檔)。 In step S14, the system file (second system file) that is operated before the power failure is operated.

當斷電重啟時,若沒有接收到升級指令時則直接運行斷電前運行的系統檔;以及,當第一記憶體分區和第二記憶體分區的狀態標誌位元均不是第一狀態時,運行斷電前運行的系統檔。 When the power is restarted, if the upgrade command is not received, the system file running before the power failure is directly operated; and when the status flag bits of the first memory partition and the second memory partition are not the first state, Run the system file that was run before the power failure.

請參閱第4圖,步驟S131a,即,比較第一記憶體分區和第二記憶體分區保存的系統檔的版本型號之前,該方法還包括: Referring to FIG. 4, step S131a, that is, before comparing the version models of the system files saved by the first memory partition and the second memory partition, the method further includes:

步驟S15,校驗保存在第一記憶體分區或第二記憶體分區中的第一系統檔是否合法。若是,則進入步驟S131a。否則,則進入步驟S14。 In step S15, it is verified whether the first system file stored in the first memory partition or the second memory partition is legal. If yes, the process proceeds to step S131a. Otherwise, it proceeds to step S14.

在步驟S15中,在比較系統檔版本型號之前進行系統檔的校驗,判斷第一記憶體分區和第二記憶體分區中保存的系統檔是否正確、合法,是為了校驗新下載的系統檔(第一系統檔)的版本是否適合終端設備使用,防止載入後而不適合終端設備時導致系統崩潰。因此,通過設置步驟S15,可在下載的第一系統檔校驗不合格時強制終端設備不升級到新版本,而繼續使用原來的、較低的版本的系統檔。 In step S15, the system file is checked before comparing the system file version models, and it is determined whether the system file saved in the first memory partition and the second memory partition is correct and legal, in order to verify the newly downloaded system file. Whether the version of the (first system file) is suitable for the terminal device to prevent the system from crashing after loading and not suitable for the terminal device. Therefore, by setting step S15, the terminal device can be forced to not upgrade to the new version when the downloaded first system file fails, and the original, lower version of the system file can be used.

進一步地,當終端設備完成系統升級時,還將保存所述第一系統檔的記憶體分區對應的狀態標誌位元修改為第二狀態;其中,所述第二狀態用於標識記憶體分區中保存的系統檔已經被運行過。 Further, when the terminal device completes the system upgrade, the state flag bit corresponding to the memory partition of the first system file is also modified to a second state; wherein the second state is used to identify the memory partition. The saved system file has been run.

進一步地,若終端設備斷電時未完成第一系統檔的下載,則記錄當前運行的系統檔所佔用的記憶體分區為預設分區,以及記錄第一系統檔的下載進程。當恢復工作狀態時(重啟時),運行預設分區中保存的系統檔,並根據記錄的下載進程繼續下載第一系統檔。 Further, if the downloading of the first system file is not completed when the terminal device is powered off, the memory partition occupied by the currently running system file is recorded as a preset partition, and the download process of the first system file is recorded. When the working state is restored (when restarting), the system file saved in the preset partition is run, and the first system file is continuously downloaded according to the recorded downloading process.

下面對終端設備引導載入記憶體中的系統檔的工作原理進行詳細說明。 The following describes the working principle of the system file in the terminal device loading memory.

請同時參閱第5圖,為本發明實施方式的記憶體的結構示意圖。其中,AP Bin Code區一為第一記憶體分區,AP Bin Code區二為第二記憶體分區。如上所述,將第一系統檔保存至空閒分區時,該空閒分區的chunk header標頭檔寫入版本型號和校驗碼,作為標識。 Please refer to FIG. 5 at the same time, which is a schematic structural diagram of a memory according to an embodiment of the present invention. The AP Bin Code area is the first memory partition, and the AP Bin Code area 2 is the second memory partition. As described above, when the first system file is saved to the free partition, the chunk header header file of the free partition is written with the version number and the check code as the identifier.

進一步地,Bank1-PM區用於記錄並保存終端設備在斷電重啟前所使用的記憶體分區的情況。在發生非電源斷電的重啟情況(暖開機),終端設備的控制電路(圖未示)會選擇從Bank1-PM中記錄的上次使用的記憶體分區中保存的系統檔來啟動終端設備。 Further, the Bank1-PM area is used to record and save the memory partition used by the terminal device before the power-off restart. In the case of a non-power-off restart (warm-on), the control circuitry (not shown) of the terminal device selects to start the terminal device from the system file saved in the last used memory partition recorded in Bank1-PM.

Bank0-Sboot區用於保存引導載入程式,該引導載入程式用於在終端設備啟動時對記憶體的第一記憶體分區和第二記憶體分區中保存的資料進行校驗,從而確定引導載入第一記憶體分區或第二記憶體分區中保存的系統檔,完成終端設備的啟動。具體地,該引導載入程式對第一記憶體分區和第二記憶體分區的狀態標誌位元進行檢測、校驗保存的系統檔的合法性、比較系統檔的版本以及檢測使用者的升級指令,並結合上述的四個條件的檢測結果最終確定選擇的記憶體分區。進一步地,可以設置對這四個條件的檢測優先順序、組合方式等,使得引導載入程式可以在終端設備每次斷電重啟時對其中的一個或多個條件進行 檢測和判斷,選擇引導的記憶體分區。 The Bank0-Sboot area is used to save the boot loader. The boot loader is used to verify the data stored in the first memory partition and the second memory partition of the memory when the terminal device is booted. Loading the system file saved in the first memory partition or the second memory partition to complete the startup of the terminal device. Specifically, the boot loader detects the status flag bits of the first memory partition and the second memory partition, verifies the legality of the saved system file, compares the version of the system file, and detects the user's upgrade instruction. And combined with the detection results of the above four conditions, the selected memory partition is finally determined. Further, the detection priority order, the combination manner, and the like of the four conditions may be set, so that the boot loader may perform one or more conditions on the terminal device each time the power is turned off and restarted. Detect and judge, select the boot memory partition.

進一步地,記憶體的引導載入程式的指令資料格式如下:ab cde fgh Further, the instruction file format of the memory boot loader is as follows: ab cde fgh

其中,前兩位元(ab)記錄的資料用於表示選定的記憶體分區,例如,前兩位元記錄的資料為01,則表示選定的記憶體分區為第一存儲分區,前兩位元記錄的資料為10,則表示選定的記憶體分區為第二記憶體分區。進一步地,還可以利用第一位(a)記錄的資料表示選定的記憶體分區,例如,10表示選定的記憶體分區為第一存儲分區,00表示選定的記憶體分區為第二記憶體分區。 The data recorded by the first two digits (ab) is used to indicate the selected memory partition. For example, if the data of the first two meta-records is 01, the selected memory partition is the first storage partition, and the first two digits. If the recorded data is 10, the selected memory partition is the second memory partition. Further, the data recorded by the first bit (a) may also be used to represent the selected memory partition. For example, 10 indicates that the selected memory partition is the first storage partition, and 00 indicates that the selected memory partition is the second memory partition. .

中間三位(cde)和最後三位元(fgh)記錄的資料分別用於表示第一記憶體分區和第二記憶體分區(或第二記憶體分區和第一記憶體分區)的狀態,該狀態包括:第一狀態(是否升級成功)、第二狀態(斷電前是否運行)。例如,當cde分別為000時,表示第一記憶體分區升級成功,保存了第一系統檔;當fgh分別為111時,表示第二記憶體分區沒有升級,且斷電前運行。 The data recorded by the middle three bits (cde) and the last three bits (fgh) are respectively used to indicate the states of the first memory partition and the second memory partition (or the second memory partition and the first memory partition), The status includes: the first status (whether the upgrade is successful), and the second status (whether it is running before power off). For example, when cde is 000 respectively, it indicates that the first memory partition is upgraded successfully, and the first system file is saved; when fgh is 111 respectively, it indicates that the second memory partition is not upgraded, and runs before power off.

例如,斷電前,終端設備在第一記憶體分區中下載並保存的第一系統檔,故該第一系統檔為最新下載的系統檔,且正在運行的是第二記憶體分區中已保存的第二系統檔。則,此時的引導載入程式指令資料為10 000 111。斷電重啟後,引導載入 程式通過如上所述的校驗確定系統升級,並選擇運行第一記憶體分區中的第一系統檔完成系統升級後,則將指令資料修改為01 111 111。終端設備在本次啟動後沒有下載新的系統檔,則引導載入程式的指令資料不變。當再次斷電啟動時,引導載入程式根據指令資料01 111 111直接運行第一記憶體分區中的第一系統檔。 For example, before the power is cut off, the terminal device downloads and saves the first system file in the first memory partition, so the first system file is the latest downloaded system file, and the second memory partition is saved in the running. The second system file. Then, the bootloader command data at this time is 10 000 111. Boot load after power off and restart After the program determines the system upgrade by the verification as described above, and selects to run the first system file in the first memory partition to complete the system upgrade, the instruction data is modified to 01 111 111. After the terminal device does not download the new system file after this startup, the command data of the boot loader remains unchanged. When the power is turned off again, the boot loader directly runs the first system file in the first memory partition according to the instruction data 01 111 111.

請參閱第6圖,為本發明實施方式中的終端設備的結構示意圖。該實施方式中的終端設備可以是電視機、個人電腦、平板電腦、筆記型電腦、智慧手機等。該終端設備20包括接收器21、處理器22、發送器23、記憶體24以及匯流排26。 Please refer to FIG. 6 , which is a schematic structural diagram of a terminal device according to an embodiment of the present invention. The terminal device in this embodiment may be a television, a personal computer, a tablet computer, a notebook computer, a smart phone, or the like. The terminal device 20 includes a receiver 21, a processor 22, a transmitter 23, a memory 24, and a bus bar 26.

該接收器21用於在所述終端設備工作時接收一第一系統檔,其中,接收所述第一系統檔的事件不影響所述終端設備當前的工作狀態。 The receiver 21 is configured to receive a first system file when the terminal device is in operation, wherein the event of receiving the first system file does not affect the current working state of the terminal device.

該處理器22控制終端設備20的操作,該處理器22還可以成為CPU(Central Processing Unit,中央處理單元)。該處理器22可能是一種積體電路晶片,具有信號的處理能力。處理器22還可以是通用處理器、數位訊號處理器(DSP)、專用積體電路(ASIC)、現成可程式設計閘陣列(FPGA)或者其他可程式設計邏輯器件、分立門或者電晶體邏輯器件、分立硬體元件。通用處理器可以是微處理器或者該處理器也可以是任何常規的處理器等。 The processor 22 controls the operation of the terminal device 20, and the processor 22 can also be a CPU (Central Processing Unit). The processor 22 may be an integrated circuit chip with signal processing capabilities. The processor 22 can also be a general purpose processor, a digital signal processor (DSP), an application integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic device, a discrete gate, or a transistor logic device. , separate hardware components. The general purpose processor may be a microprocessor or the processor or any conventional processor or the like.

該發送器23用於發送資料。 The transmitter 23 is for transmitting data.

終端設備20的各個元件通過匯流排26耦合在一 起,其中,匯流排26除包括資料匯流排之外,還可以包括電源匯流排、控制匯流排和狀態信號匯流排等。但是為了清楚說明起見,在圖中將各種匯流排都標為匯流排26。 The various components of the terminal device 20 are coupled by a busbar 26 The bus bar 26 may include a power bus, a control bus, and a status signal bus, in addition to the data bus. However, for the sake of clarity, various bus bars are labeled as bus bars 26 in the figure.

記憶體存儲了如下的元素,可執行模組或者資料結構,或者它們的子集,或者它們的擴展集:操作指令:包括各種操作指令,用於實現各種操作。 The memory stores the following elements, executable modules or data structures, or a subset of them, or their extended set: Operational instructions: including various operational instructions for implementing various operations.

作業系統:包括各種系統程式,用於實現各種基礎業務以及處理基於硬體的任務。 Operating System: Includes a variety of system programs for implementing a variety of basic services and handling hardware-based tasks.

在本發明實施例中,該記憶體24至少包括第一記憶體分區和第二記憶體分區,分別用於保存系統檔。兩個記憶體分區是相互獨立、互不影響的,分別用於保存第一系統檔或第二系統檔。 In the embodiment of the present invention, the memory 24 includes at least a first memory partition and a second memory partition for respectively saving a system file. The two memory partitions are independent of each other and are not affected by each other, and are respectively used to save the first system file or the second system file.

進一步地,該記憶體被平均分成第一記憶體分區和第二記憶體分區,即,兩個記憶體分區的存儲空間相同。當然,第一記憶體分區和第二記憶體分區的劃分方式並不僅限於此。 Further, the memory is equally divided into a first memory partition and a second memory partition, that is, the storage spaces of the two memory partitions are the same. Of course, the manner in which the first memory partition and the second memory partition are divided is not limited to this.

進一步地,該處理器22通過調用記憶體存儲的操作指令(該操作指令可存儲在作業系統中),執行如下操作:處理器22在接收器21接收到所述第一系統檔時,確定當前運行的第二系統檔所佔用的記憶體分區是第一記憶體分區還是第二記憶體分區,將接收的第一系統檔保存至第一記憶體分區、第二記憶體分區中當前未被佔用的記憶體分區;以及斷電重啟時若接收到使用者的升級指令,則運行第一系統檔,完成 系統升級。 Further, the processor 22 performs an operation by calling an operation instruction stored in the memory (which can be stored in the operating system): the processor 22 determines the current when the receiver 21 receives the first system file. Whether the memory partition occupied by the running second system file is the first memory partition or the second memory partition, and the received first system file is saved to the first memory partition, and the second memory partition is currently not occupied. The memory partition; and if the user receives the upgrade command when the power is turned off, the first system file is run, and the completion is completed. System Upgrade.

其中,接收第一系統檔的事件不影響終端設備20當前的工作狀態。第一系統檔為系統升級檔,版本型號高於該終端設備當前運行的系統檔的版本型號。 The event of receiving the first system file does not affect the current working state of the terminal device 20. The first system file is a system upgrade file, and the version model is higher than the version model of the system file currently running by the terminal device.

可選地,該處理器22在斷電重啟時並當接收到使用者的升級指令時,比較所述第一記憶體分區和所述第二記憶體分區保存的系統檔的版本型號,並運行版本型號較高的系統檔,完成系統升級。 Optionally, the processor 22 compares the version model of the system file saved by the first memory partition and the second memory partition when the power is restarted and when receiving the upgrade instruction of the user, and runs The system file with a higher version number completes the system upgrade.

由於在斷電之前,終端設備20已經完成第一系統檔的下載,因此在斷電重啟後若接收到使用者的升級指令時,該處理器22分別讀取第一記憶體分區和第二記憶體分區中保存的系統檔的版本型號,並選擇版本型號較高的系統檔作為引導載入的系統檔,直接引導載入該選則的系統檔,實現系統升級。其中,系統檔的版本型號被寫入所在記憶體分區的chunk header標頭檔,該處理器22可以從記憶體分區的chunk header標頭檔中獲取保存的系統檔的版本型號。 Since the terminal device 20 has completed the downloading of the first system file before the power is turned off, the processor 22 reads the first memory partition and the second memory respectively when receiving the user's upgrade command after the power-off restart. The version number of the system file saved in the volume partition, and select the system file with the higher version model as the boot load system file, directly boot the system file loaded into the selection to realize the system upgrade. The version model of the system file is written to the chunk header header file of the memory partition, and the processor 22 can obtain the version model of the saved system file from the chunk header header file of the memory partition.

可選地,該處理器22在保存接收的所述第一系統檔至所述第一記憶體分區、第二記憶體分區中當前未被佔用的記憶體分區後,將所述記憶體分區對應的狀態標誌位元修改為第一狀態;其中,所述第一狀態用於標識記憶體分區中保存的系統檔為最新下載的系統檔。 Optionally, the processor 22 saves the memory partition after storing the received first system file to a memory partition that is not currently occupied in the first memory partition and the second memory partition. The status flag bit is modified to the first state; wherein the first state is used to identify the system file saved in the memory partition as the latest downloaded system file.

可選地,該處理器22在斷電重啟時檢測第一記憶體 分區或第二記憶體分區的狀態標誌位元是否為第一狀態;當檢測到第一記憶體分區或第二記憶體分區的其中之一的狀態標誌位元為第一狀態時,執行上述比較所述第一記憶體分區和所述第二記憶體分區保存的系統檔的版本型號,並運行版本型號較高的系統檔,完成系統升級的步驟。當第一記憶體分區和第二記憶體分區的狀態標誌位元均不是第一狀態時,運行斷電前運行的系統檔(第二系統檔)。 Optionally, the processor 22 detects the first memory when the power is turned off and restarted. Whether the status flag bit of the partition or the second memory partition is the first state; when detecting that the status flag bit of one of the first memory partition or the second memory partition is the first state, performing the above comparison The version of the system file saved by the first memory partition and the second memory partition, and running a system file with a higher version, completing the system upgrade step. When the status flag bit of the first memory partition and the second memory partition are not the first state, the system file (second system file) running before the power failure is run.

具體地,在斷電重啟時,需要檢驗對應第一記憶體分區和第二記憶體分區的狀態標誌位元的狀態值,若兩個記憶體分區中的其中之一的狀態標誌位元為第一狀態時,說明該記憶體分區保存的系統檔是新下載的系統檔,即,最新升級的系統檔。此時,需要詢問使用者是否對系統進行升級。若兩個記憶體分區的狀態標誌位元都不是第一狀態時,說明記憶體中沒有新下載的系統檔。此時,將預設運行上一次運行的系統檔。其中,若記憶體分區對應的狀態標誌為第二狀態,表示其保存的系統檔最近一次被運行過,即,斷電前正在運行。因此,引導載入程式只需要判斷兩個記憶體分區中的狀態標誌位元是否為第二狀態,以確定其保存的系統檔是否在斷電前運行過。 Specifically, when the power is restarted, the status value of the status flag bit corresponding to the first memory partition and the second memory partition needs to be checked, if the status flag bit of one of the two memory partitions is the first In a state, the system file saved by the memory partition is a newly downloaded system file, that is, the newly upgraded system file. At this point, you need to ask the user whether to upgrade the system. If the status flag bits of the two memory partitions are not in the first state, there is no newly downloaded system file in the memory. At this point, the system file that was last run will be preset. Wherein, if the status flag corresponding to the memory partition is the second state, it indicates that the saved system file has been run last time, that is, it is running before the power is cut off. Therefore, the bootloader only needs to determine if the status flag bit in the two memory partitions is in the second state to determine if its saved system file has been run before powering down.

可選地,該處理器22在斷電重啟時且沒有接收到用戶的升級指時,運行斷電前運行的所述第二系統檔。 Optionally, the processor 22 runs the second system file that is operated before the power failure when the power failure is restarted and the user's upgrade finger is not received.

可選地,該處理器22校驗保存在第一記憶體分區或第二記憶體分區中的第一系統檔是否合法。 Optionally, the processor 22 verifies whether the first system file saved in the first memory partition or the second memory partition is legal.

當保存在第一記憶體分區或第二記憶體分區中的第一系統檔合法時,該處理器22比較第一記憶體分區和第二記憶體分區保存的系統檔的版本型號,該處理器22運行版本型號較高的系統檔。當保存在第一記憶體分區或第二記憶體分區中的第一系統檔不合法時,該處理器22運行斷電前運行的系統檔(第二系統檔)。 When the first system file saved in the first memory partition or the second memory partition is legal, the processor 22 compares the version models of the system files saved by the first memory partition and the second memory partition, the processor 22 running version of the higher model system file. When the first system file stored in the first memory partition or the second memory partition is invalid, the processor 22 runs a system file (second system file) that was operated before the power-off.

在比較系統檔版本型號之前進行系統檔的校驗,該處理器22判斷第一記憶體分區和第二記憶體分區中保存的系統檔是否正確、合法,是為了校驗新下載的系統檔(第一系統檔)的版本是否適合終端設備使用,防止載入後而不適合終端設備時導致系統崩潰。因此,通過合法校驗,可在下載的第一系統檔校驗不合格時強制終端設備不升級到新版本,而繼續使用原來的、較低的版本的系統檔。 Performing verification of the system file before comparing the system file version models, the processor 22 determines whether the system file saved in the first memory partition and the second memory partition is correct and legal, in order to verify the newly downloaded system file ( Whether the version of the first system file is suitable for the terminal device to prevent the system from crashing after loading and not suitable for the terminal device. Therefore, by legal verification, the terminal device can be forced to not upgrade to the new version when the downloaded first system file fails, and the original, lower version of the system file is continued to be used.

可選地,當終端設備完成系統升級時,該處理器22還在完成升級之後,將保存第一系統檔的記憶體分區的狀態標誌位元修改為第二狀態。其中,該第二狀態用於標識記憶體分區中保存的系統檔已經被運行過。 Optionally, when the terminal device completes the system upgrade, the processor 22 further modifies the status flag bit of the memory partition of the first system file to the second state after completing the upgrade. The second state is used to identify that the system file saved in the memory partition has been run.

可選地,若終端設備斷電時未完成第一系統檔的下載時,該處理器22還記錄當前運行的系統檔所佔用的記憶體分區為預設分區,以及記錄第一系統檔的下載進程。當恢復工作狀態時,運行預設分區中保存的系統檔,並根據記錄的下載進程繼續下載第一系統檔。 Optionally, if the downloading of the first system file is not completed when the terminal device is powered off, the processor 22 also records the memory partition occupied by the currently running system file as a preset partition, and records the download of the first system file. process. When the working state is restored, the system file saved in the preset partition is run, and the first system file is continuously downloaded according to the recorded downloading process.

本發明提供的一種終端設備及其系統升級方法,預先將記憶體劃分為第一記憶體分區和第二記憶體分區,終端設備工作時載入的系統檔保存在其中一個記憶體分區,同時後臺接收升級的系統檔保存在另一個記憶體分區中,二者相互不影響,使得在終端設備工作的同時完成升級的系統檔的下載和安裝,但是卻不會影響用戶使用。而在下一次斷電開機後,在接收到使用者同意升級的指令時可以直接運行該升級的系統檔,不需要使用者等待其下載和安裝,從而加快系統升級進程,提升使用者體驗。進一步地,兩個記憶體分區保存不同版本的系統檔,也可以在其中一個系統檔損壞時由另外一個系統檔支援終端設備運行,從而提高終端設備的系統穩定性。 The terminal device and the system upgrade method thereof are provided, and the memory is divided into a first memory partition and a second memory partition in advance, and the system file loaded when the terminal device works is stored in one of the memory partitions, and the background is The system file that receives the upgrade is saved in another memory partition, and the two do not affect each other, so that the download and installation of the upgraded system file is completed while the terminal device is working, but the user is not affected. After the next power-off, after the user receives the instruction to agree to the upgrade, the upgraded system file can be directly run, and the user is not required to wait for the download and installation, thereby speeding up the system upgrade process and improving the user experience. Further, the two memory partitions save different versions of the system files, and may also be supported by the other system file when one of the system files is damaged, thereby improving the system stability of the terminal device.

綜上所述,雖然本發明已以較佳實施例揭露如上,然其並非用以限定本發明。本發明所屬技術領域中具有通常知識者,在不脫離本發明之精神和範圍內,當可作各種之更動與潤飾。因此,本發明之保護範圍當視後附之申請專利範圍所界定者為準。 In conclusion, the present invention has been disclosed in the above preferred embodiments, and is not intended to limit the present invention. A person skilled in the art can make various changes and modifications without departing from the spirit and scope of the invention. Therefore, the scope of the invention is defined by the scope of the appended claims.

S10、S11、S12、S13‧‧‧流程步驟 S10, S11, S12, S13‧‧‧ process steps

Claims (14)

一種終端設備的系統升級方法,所述終端設備包括被預先至少分成用於保存系統檔的第一記憶體分區和第二記憶體分區,所述方法包括:所述終端設備工作時接收一第一系統檔;其中,接收所述第一系統檔的事件不影響所述終端設備當前的工作狀態;確定當前運行的第二系統檔所佔用的記憶體分區是所述第一記憶體分區還是所述第二記憶體分區;保存接收的所述第一系統檔至所述第一記憶體分區、第二記憶體分區中當前未被佔用的記憶體分區;以及斷電重啟時若接收到使用者的升級指令,則運行所述第一系統檔,完成系統升級。 A system upgrade method for a terminal device, the terminal device comprising a first memory partition and a second memory partition that are at least divided into a system file for saving, the method comprising: receiving a first a system file; wherein the event of receiving the first system file does not affect the current working state of the terminal device; determining whether the memory partition occupied by the currently running second system file is the first memory partition or the a second memory partition; storing the received first system file to the first memory partition, the memory partition currently unoccupied in the second memory partition; and receiving the user when the power is restarted The upgrade command runs the first system file to complete the system upgrade. 如申請專利範圍第1項所述的終端設備的系統升級方法,其中,斷電重啟時若接收到使用者的升級指令,則運行所述第一系統檔,完成系統升級的步驟包括:斷電重啟時並當接收到使用者的升級指令時,比較所述第一記憶體分區和所述第二記憶體分區保存的系統檔的版本型號;以及運行版本型號較高的系統檔,完成系統升級。 The system upgrade method of the terminal device according to the first aspect of the invention, wherein, if the user upgrade command is received during the power-off restart, the first system file is run, and the step of completing the system upgrade includes: powering off Rebooting and when receiving the user's upgrade command, comparing the version number of the system file saved by the first memory partition and the second memory partition; and running a system file with a higher version of the version to complete the system upgrade . 如申請專利範圍第1項所述的終端設備的系統升級方法,其中,還包括:若斷電重啟時沒有接收到使用者的升級指令,則運行斷電前 運行的所述第二系統檔。 The system upgrade method of the terminal device according to the first aspect of the invention, further comprising: if the upgrade instruction of the user is not received when the power is turned off and restarted, before the power failure The second system file that is running. 如申請專利範圍第1項所述的終端設備的系統升級方法,其中,還包括:在保存接收的所述第一系統檔至所述第一記憶體分區、第二記憶體分區中當前未被佔用的記憶體分區後,將所述記憶體分區對應的狀態標誌位元修改為第一狀態;其中,所述第一狀態用於標識記憶體分區中保存的系統檔為最新下載的系統檔。 The system upgrade method of the terminal device of claim 1, further comprising: saving the received first system file to the first memory partition and the second memory partition After the occupied memory partition, the status flag bit corresponding to the memory partition is modified to the first state; wherein the first state is used to identify the system file saved in the memory partition as the latest downloaded system file. 如申請專利範圍第4項所述的終端設備的系統升級方法,其中,所述斷電重啟時若接收到使用者的升級指令,則運行所述第一系統檔,完成系統升級的步驟包括:斷電重啟時檢測所述第一記憶體分區或所述第二記憶體分區的狀態標誌位元是否為第一狀態;當檢測到所述第一記憶體分區或所述第二記憶體分區的狀態標誌位元為第一狀態時,比較所述第一記憶體分區和所述第二記憶體分區保存的系統檔的版本型號;以及運行版本型號較高的系統檔,完成系統升級。 The system upgrade method of the terminal device according to the fourth aspect of the invention, wherein, if the user upgrade command is received during the power-off restart, the first system file is executed, and the step of completing the system upgrade includes: Detecting whether the status flag bit of the first memory partition or the second memory partition is in a first state when the power is turned off; when detecting the first memory partition or the second memory partition When the status flag bit is in the first state, the version model of the system file saved by the first memory partition and the second memory partition is compared; and the system file with the higher running version model is completed, and the system upgrade is completed. 如申請專利範圍第1項所述的終端設備的系統升級方法,其中,在所述斷電重啟時若接收到使用者的升級指令,則運行所述第一系統檔,完成系統升級的步驟之前還包括:校驗保存在所述第一記憶體分區或第二記憶體分區中的所述第一系統檔是否合法。 The system upgrade method of the terminal device according to claim 1, wherein, if the upgrade instruction of the user is received during the power failure restart, the first system file is run to complete the system upgrade step. The method further includes: verifying whether the first system file saved in the first memory partition or the second memory partition is legal. 如申請專利範圍第1項所述的終端設備的系統升級方 法,其中,所述方法還包括:在完成升級之後,將保存所述第一系統檔的記憶體分區對應的狀態標誌位元修改為第二狀態;其中,所述第二狀態用於標識記憶體分區中保存的系統檔已經被運行過。 The system upgrade party of the terminal device as described in claim 1 of the patent application scope The method further includes: after completing the upgrading, modifying a status flag bit corresponding to the memory partition storing the first system file to a second state; wherein the second state is used to identify the memory The system file saved in the volume partition has been run. 如申請專利範圍第1項所述的終端設備的系統升級方法,其中,終端設備工作時接收伺服器發送的第一系統檔的步驟之後,所述方法還包括:所述終端設備斷電時,記錄當前運行的系統檔所佔用的記憶體分區為預設分區,以及記錄所述第一系統檔的下載進程;重啟時運行所述預設分區中保存的系統檔,並根據記錄的下載進程繼續下載所述第一系統檔。 The system upgrade method of the terminal device according to the first aspect of the invention, wherein, after the step of receiving the first system file sent by the server, the method further comprises: when the terminal device is powered off, Recording the memory partition occupied by the currently running system file as a preset partition, and recording the download process of the first system file; running the system file saved in the preset partition when restarting, and continuing according to the recorded download process Download the first system file. 一種終端設備,其中,所述終端設備包括:一接收器,用於在所述終端設備工作時接收一第一系統檔,其中,接收所述第一系統檔的事件不影響所述終端設備當前的工作狀態;一記憶體,至少包括第一記憶體分區和第二記憶體分區,分別用於保存一第一系統檔或及一第二系統檔;一處理器,用於執行以下步驟:確定當前運行的第二系統檔所佔用的記憶體分區是所述第一記憶體分區還是所述第二記憶體分區;保存接收的所述第一系統檔至所述第一記憶體分區、第二記憶體分區中當前未被佔用的記憶體分區;以及 斷電重啟時若接收到使用者的升級指令,則運行所述第一系統檔,完成系統升級。 A terminal device, wherein the terminal device includes: a receiver, configured to receive a first system file when the terminal device is in operation, wherein receiving the event of the first system file does not affect the current terminal device a working state; a memory comprising at least a first memory partition and a second memory partition, respectively for storing a first system file or a second system file; a processor for performing the following steps: determining Whether the memory partition occupied by the currently running second system file is the first memory partition or the second memory partition; storing the received first system file to the first memory partition and the second a memory partition that is currently unoccupied in the memory partition; If the user's upgrade command is received during the power-off restart, the first system file is run to complete the system upgrade. 如申請專利範圍第9項所述的終端設備,其中,所述處理器還用於:斷電重啟時並當接收到使用者的升級指令時,比較所述第一記憶體分區和所述第二記憶體分區保存的系統檔的版本型號,並運行版本型號較高的系統檔,完成系統升級。 The terminal device of claim 9, wherein the processor is further configured to compare the first memory partition and the first when the power is restarted and when an upgrade instruction of the user is received The version number of the system file saved in the second memory partition, and the system file with the higher version of the version is run to complete the system upgrade. 如申請專利範圍第9項所述的終端設備,其中,所述處理器還用於:若斷電重啟時沒有接收到使用者的升級指令,則運行斷電前運行的所述第二系統檔。 The terminal device of claim 9, wherein the processor is further configured to: if the upgrade instruction of the user is not received when the power is turned off and restarted, run the second system file that is operated before the power failure . 如申請專利範圍第9項所述的終端設備,其中,所述處理器還用於:在保存接收的所述第一系統檔至所述第一記憶體分區、第二記憶體分區中當前未被佔用的記憶體分區後,將所述記憶體分區對應的狀態標誌位元修改為第一狀態;其中,所述第一狀態用於標識記憶體分區中保存的系統檔為最新下載的系統檔。 The terminal device of claim 9, wherein the processor is further configured to: save the received first system file to the first memory partition and the second memory partition After the occupied memory is partitioned, the status flag bit corresponding to the memory partition is modified to the first state; wherein the first state is used to identify the system file saved in the memory partition as the latest downloaded system file . 如申請專利範圍第12項所述的終端設備,其中,所述處理器還用於:斷電重啟時檢測所述第一記憶體分區和所述第二記憶體分區的狀態標誌位元是否為第一狀態;當檢測到所述第一記憶體分區或所述第二記憶體分區的狀 態標誌位元為第一狀態時,比較所述第一記憶體分區和所述第二記憶體分區保存的系統檔的版本型號,並運行版本型號較高的系統檔,完成系統升級。 The terminal device of claim 12, wherein the processor is further configured to: detect, when the power is turned off, whether the status flag bit of the first memory partition and the second memory partition is a first state; when the first memory partition or the second memory partition is detected When the state flag bit is in the first state, the version model of the system file saved by the first memory partition and the second memory partition is compared, and a system file with a higher version model is run to complete the system upgrade. 如申請專利範圍第9項所述的終端設備,其中,所述終端設備為電視機。 The terminal device of claim 9, wherein the terminal device is a television.
TW105107797A 2016-03-14 2016-03-14 Terminal device and system upgrading method thereof TWI575459B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW105107797A TWI575459B (en) 2016-03-14 2016-03-14 Terminal device and system upgrading method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW105107797A TWI575459B (en) 2016-03-14 2016-03-14 Terminal device and system upgrading method thereof

Publications (2)

Publication Number Publication Date
TWI575459B true TWI575459B (en) 2017-03-21
TW201732585A TW201732585A (en) 2017-09-16

Family

ID=58766383

Family Applications (1)

Application Number Title Priority Date Filing Date
TW105107797A TWI575459B (en) 2016-03-14 2016-03-14 Terminal device and system upgrading method thereof

Country Status (1)

Country Link
TW (1) TWI575459B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6308265B1 (en) * 1998-09-30 2001-10-23 Phoenix Technologies Ltd. Protection of boot block code while allowing write accesses to the boot block
TWI220962B (en) * 2003-01-20 2004-09-11 Mediatek Inc Firmware updating method and related apparatus for checking content of replacing firmware before firmware updating
TWI460657B (en) * 2008-09-05 2014-11-11 Asustek Comp Inc Method for updating basic input/output system and method for repairing thereof
TWI489390B (en) * 2008-09-10 2015-06-21 Inventec Appliances Corp Electronic apparatus and system updating method thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6308265B1 (en) * 1998-09-30 2001-10-23 Phoenix Technologies Ltd. Protection of boot block code while allowing write accesses to the boot block
TWI220962B (en) * 2003-01-20 2004-09-11 Mediatek Inc Firmware updating method and related apparatus for checking content of replacing firmware before firmware updating
TWI460657B (en) * 2008-09-05 2014-11-11 Asustek Comp Inc Method for updating basic input/output system and method for repairing thereof
TWI489390B (en) * 2008-09-10 2015-06-21 Inventec Appliances Corp Electronic apparatus and system updating method thereof

Also Published As

Publication number Publication date
TW201732585A (en) 2017-09-16

Similar Documents

Publication Publication Date Title
US9858066B2 (en) Updating firmware of a hardware component
WO2017067448A1 (en) Firmware-over-the-air upgrade method, system and computer storage medium
US8136108B2 (en) Updating firmware with multiple processors
KR101626433B1 (en) Method and system for verifying proper operation of a computing device after a system change
US10437580B2 (en) Software updating methods and systems
CN106325929B (en) Firmware upgrading method, firmware upgrading device, refrigerator and server
US20110320794A1 (en) Flash System And Method For Updating The Flash System
US20110283274A1 (en) Firmware image update and management
TWI533216B (en) Operating system updating method
JPWO2013103023A1 (en) Information processing apparatus, information processing method, and computer program
CN105760200A (en) Terminal device and system updating method thereof
US20200250313A1 (en) Bios recovery and update
US9519786B1 (en) Firmware integrity ensurance and update
WO2018024198A1 (en) Application upgrade method and system for set-top box, and set-top box
WO2017219861A1 (en) Method and device for controlling system start-up mode
JP2009169524A (en) Network system for home appliance
WO2013013396A1 (en) Method and system for managing bios configuration data of basic input/output system
CN101807152A (en) Basic output and input system for self verification of selection read only memory and verification method thereof
US20130080751A1 (en) Method and device for updating bios program for computer system
US20060136892A1 (en) Embedded agent for self-healing software
TWI575459B (en) Terminal device and system upgrading method thereof
CN110659052B (en) Method and system for updating system software in network equipment and readable storage medium
WO2020096561A1 (en) Recovery image downloads via data chunks
JP5849449B2 (en) Information processing apparatus, control method therefor, and program
CN117130672A (en) Server start flow control method, system, terminal and storage medium

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees