1246001 玖、發明說明: 【發明所屬之技術領域】 本發明係關於一種下載安裝軟體之方法,特別指一種 針對記憶體空間有限之電子裝置所提供之下載安裝軟體之 5 方法。 【先前技術】 個人數位助理機(PDA)及行動電話(ceU—ph〇ne)等手持 式電子裝置(hand-held device),與桌上型個人電腦 (DeskTop PC)相較雖更為輕便而易於攜帶,然其體積小巧 10 之特性相對亦形成其設計製造上之^干限制。就個人電腦 而言,包括系統程式、應用軟體及資料等所有資訊皆可儲 存於硬碟,且由於現今硬碟容量不斷呈倍數提高且價格相 對下降,故可供龐大數量之資訊儲存而少有容量不足之情 形發生,即令既有硬碟容量已告不足,其更新擴充亦極為 15 方便。 相對之下,由於手持式電子裝置並無硬碟設計,故不 論軟體程式或各種資料皆完全儲存於容量有限且價格相較 硬碟明顯昂貴之記憶體中,故往往於長久操作後因記憶體 過度累積耗用而導致當機,或剩餘空間+足以下載儲存所 20 _較大之軟體程式。進-步以軟體之下载更新為例, -般重要之軟體程式係儲存於手持式電子裝置之非揮發性 記憶體’如快閃記憶體(Flash Memory)中,以防重新開機 (油)〇t)後程式遺失而無法復原。#該軟體有新版本發行 ,手持式電子裝置欲透過網路連線自—伺服端(如一個I電 1246001 腦)下載新版本以更新該軟體時,現行程序錢自伺服端下 載軟體新版本之安裝程式(通常為-執行檔,如檔名為 setup.exe),並將該安裝程式儲存於上述之非揮發性記憶 體,而後再執行該安裝程式,而將執行後產生之播案覆蓋 既有舊版本軟體檔案而儲存於非揮發性記憶體,藉此完成 軟體之安裝更新。 惟如前所述,由於重要之軟體程式(包括系統程式及應 =程式)皆儲存於非揮發性記憶體,使揮發性記憶體之剩餘 空間極為有限,故-旦非揮發性記憶體之剩餘空間不足以 儲存該軟體新版本安裝程式時,除非犧牲刪除非揮發性記 ,體内既有之部分程式’否則即無法將該安裝程式自飼服 端下載,更不可能執行後續之新版軟體安裝更新動作。是 故,如何在記憶體容量有限之現實下,供具較高容量需求 之車人體順利下載更新,是為本發明之研發重點。 【發明内容】 因此,本發明之首一目的,在提供一種於非揮發性記 憶體空間不足下’亦可順利安裝更新較高容量需求軟體之 下載安裝軟體之方法。 本發明之次一目的,在提供一種不擴增既有記憶體容 5·而此下載女裝軟體之下載安裝軟體之方法。 於是,本發明下載安裝軟體之方法,係供一具有一揮 毛性圮憶體及一非揮發性記憶體之電子裝置更新一軟體, 該方法包括下述步驟:a•儲存一配置設定,該設定係將該 揮發性記憶體規劃一足以供該軟體之安裝程式下載後暫存 1246001 之暫存區域;b.於該電子裝置重開機後依據該設定於該揮 i性屺憶體形成該暫存區域;c•將該軟體安裝程式下載而 儲存至该暫存區域;d•執行該軟體安裝程式而將該軟體安 裝至該非揮發性記憶體。 本發明並揭示一種下載安裝軟體之方法,係應用於可 相互傳遞資訊之一電子裝置及一伺服端,電子裝置具有一 揮發性記憶體及一非揮發性記憶體,該方法包括下述步驟 • a•伺服端預先於揮發性記憶體規劃足夠供一新版本軟體 女衣耘式下載後暫存之一暫存區域,藉此產生一配置設定鲁 ’ b·電子裝置自伺服端下載並儲存該配置設定;c.電子裝 置重開機;d·電子裝置依據該設定於揮發性記憶體形成暫 存區域;e·電子裝置自伺服端下載新版本軟體安裝程式而 儲存至暫存區域;f.電子裝置執行軟體安裝程式而將軟體 安裝至非揮發性記憶體。 本發明亦揭示一種下載安裝軟體之方法,係應用於一 具有一揮發性記憶體及一非揮發性記憶體之電子裝置,非 揮發性圮憶體安張有一舊版本軟體,該方法包括下述步驟 鲁 • a.下載一相對於該舊版本軟體之新版本軟體安裝程式; b·將新版本軟體安裝程式暫存於揮發性記憶體;c•執行新 版本軟體安裝程式,而將新版本軟體覆蓋舊版本軟體而安 裝至非揮發性記憶體。 【實施方式】 本發明之技術内容與功效,將於以下配合圖式之較佳 實施例詳細說明中詳述。 6 1246001 5 10 15 如圖丄所示,本發明下載安裝軟體之方法較佳實施例 ’係供-電子裝置1自-伺服端2下栽—新版本軟體安裝 程式3卜而後以覆蓋電子裝置i内既有之同一舊版本軟體 32方式,將新版本軟體安裝程式31安裝於電子妒置工。 本實施例中電子裝置1係以一個人數位機(m)為例’ 然如打動電話、電子辭典、傳呼機(page〇或其他以記憶體 為主要储存元件之電子裝置亦可適用。如圖2所示,電子 襄置1主要包括一處理器u、一揮發性記憶體12、一非揮 發性記憶體13、一使用介面14、一通訊介面15及一供上 述各兀件間傳遞交換訊息之匯流排16。 處理器11_用以控制電子装置i之運作,以配合兩 記憶體12、13及其他必要元件’而執行如個人資訊管理、 料通訊及其他預設功能。本實施例中揮發性記憶體12係 二隨機存取記憶體⑽)為例,主要用以儲存隨機資料 了、‘使用者規劃為虛擬硬碟(Ramdisk)w儲存部分程式 M V,13 (Flash :二面i4包含一顯示幕⑷及複數操作請(圓2中 顯示幕⑷除經處理器η之控制而顯示資 控點選或手,覽外’並供使用者藉一觸控筆(圖未示)以觸 。摔作鍵】4?方讀人選項衫訊,供處理器η接收處理 作=八42則供使用者按遷,以選取選項或執行特定彭 無線連接切f知無線通訊協S(fi⑴與錢端2 ’貝艰,然如行動通訊協定(如GSM)或其他適 20 5 10 15 20 1246001 當之有線、無線通訊系統亦可適用。本實施例中伺服端2 則為一桌上型個人電腦,然不以此為限。 經上述就電子裝置1主要元件說明後,以下即就本發 明下載安裝軟體之方法較佳實施例主要實施步驟配合圖3 之流程圖予以詳述。首先如步驟4〇丨至405所示,電子裝 置1向伺服端2發出下載儲存於伺服端2之新版本軟體安 裝程式31(示於圖1)要求後,伺服端2將先依據該新版本 軟體安裝程式31之檔案大小,預先計算規劃電子裝置i中 揮發性記憶體12足夠供該新版本軟體安裝程式31下載後 暫存所需之一虛擬硬碟型態之暫存區域12ι(示於圖2),藉 此就揮發性記憶體12產生一配置設定,並將該設定下傳至 電子裝置1中,由電子裝置丨將該設定儲存於非揮發性記 憶體13中·,再如步驟406至409所示,伺服端2將下傳一 令電子裝置1重開機(reboot)之指令,電子裝置丄收到後 即進行重開機動作,且在重開機同時,依據非揮發性記憶 體13中儲存之配置設定重新配置揮發性記憶體12,使揮發 性記憶體12中形成前述足夠供新版本軟體安裝程式31下 載後暫存之-暫存區域m,揮發性記憶體12完成配置後 將通知伺服端2 ;如步驟410至411所示,飼服端2將新版 t軟體安裝程式31下傳至電子裝置i,並暫存於揮發性記 憶體12中之暫存區域121 ;如步驟412所示,電子裝置】 而後將以非揮發性記憶體13為目的地而執行新版本軟體安 f程式3卜並將執行後產生之㈣覆蓋(咖⑽⑻既有之 舊版本軟體32而儲存於非揮發性記憶體μ ;如步驟似、1246001 (1) Description of the invention: [Technical field to which the invention belongs] The present invention relates to a method for downloading and installing software, and particularly to a method for downloading and installing software provided for an electronic device with limited memory space. [Prior technology] Hand-held devices such as personal digital assistants (PDAs) and mobile phones (ceU-phone) are more portable and more convenient than DeskTop PCs It is easy to carry, but its small size and small size also relatively form its design and manufacturing restrictions. As far as personal computers are concerned, all information including system programs, application software and data can be stored on the hard disk, and since the capacity of the hard disk is constantly increasing and the price is relatively lower, it can be stored for a large amount of information, which is rare. Insufficient capacity occurs, which makes the existing hard disk capacity insufficient, and it is extremely convenient to update and expand. In contrast, because handheld electronic devices have no hard disk design, regardless of software programs or various data, they are completely stored in memory with limited capacity and significantly more expensive than hard disks. Crash due to excessive accumulation of consumption, or the remaining space + enough to download the 20_larger software program in the storage. Take the software download and update as an example. The software program that is so important is stored in the non-volatile memory of the handheld electronic device, such as flash memory, to prevent restart (oil). t) The program is lost and cannot be recovered afterwards. #The software has a new version released. When a handheld electronic device wants to download a new version from a server (such as an I-1246001 brain) to update the software through a network connection, the current program downloads the new version of the software from the server. Installer (usually an -exe file, such as file setup.exe), save the installer in the above non-volatile memory, and then execute the installer, and overwrite the generated program after execution Old software files are stored in non-volatile memory to complete the software installation and update. However, as mentioned above, because important software programs (including system programs and applications) are stored in non-volatile memory, the remaining space of volatile memory is extremely limited, so the remaining non-volatile memory When there is not enough space to store the installer of the new version of the software, the installer cannot be downloaded from the feeding server unless it is sacrificed to delete the non-volatile memory and some existing programs in the body, and it is impossible to perform subsequent new software installation. Update action. Therefore, under the reality of limited memory capacity, how to smoothly download and update the car body with higher capacity requirements is the focus of research and development of the present invention. [Summary of the Invention] Therefore, the first object of the present invention is to provide a method for downloading and installing software that can smoothly install and update software with higher capacity requirements even when the space of non-volatile memory is insufficient. A second object of the present invention is to provide a method for downloading and installing software that does not amplify the existing memory capacity 5 and download the women's software. Therefore, the method for downloading and installing software according to the present invention is for an electronic device having a fluffy memory and a non-volatile memory to update a software. The method includes the following steps: a. Storing a configuration setting, the setting The volatile memory is planned to be temporarily stored in the 1260001 temporary storage area after the software installation program is downloaded; b. After the electronic device is restarted, the temporary memory is formed according to the setting to form the temporary storage. Area; c • download the software installer and store it in the temporary storage area; d • run the software installer and install the software in the non-volatile memory. The invention also discloses a method for downloading and installing software, which is applied to an electronic device and a server that can transmit information to each other. The electronic device has a volatile memory and a non-volatile memory. The method includes the following steps: a • The server pre-plans a temporary storage area in the volatile memory enough for a new version of the software to be temporarily downloaded after hard downloading, thereby generating a configuration setting. 'b · The electronic device downloads and stores the configuration from the server. Configuration settings; c. Restart of the electronic device; d. The electronic device forms a temporary storage area in the volatile memory according to the setting; e. The electronic device downloads a new version of the software installation program from the server and stores it in the temporary storage area; f. Electronic The device runs a software installer to install the software into non-volatile memory. The invention also discloses a method for downloading and installing software, which is applied to an electronic device having a volatile memory and a non-volatile memory. The non-volatile memory has an old version of the software. The method includes the following: Step Lu • a. Download a new version of the software installer relative to the old version of the software; b. Temporarily store the new version of the software installer in the volatile memory; c • Run the new version of the software installer and save the new version of the software Overwrite the old software and install it into non-volatile memory. [Embodiment] The technical content and effect of the present invention will be described in detail in the following detailed description of the preferred embodiments in conjunction with the drawings. 6 1246001 5 10 15 As shown in Figure 丄, the preferred embodiment of the method for downloading and installing software of the present invention is' for-electronic device 1 from-server 2 download-new version of software installation program 3 and then cover the electronic device i In the same way as the old software version 32, the new software installation program 31 is installed in the electronic jealousy. In this embodiment, the electronic device 1 uses a personal computer (m) as an example. Of course, such as a mobile phone, an electronic dictionary, a pager (page 0 or other electronic devices with a memory as the main storage element) can also be applied. See Figure 2 As shown, the electronic device 1 mainly includes a processor u, a volatile memory 12, a non-volatile memory 13, a use interface 14, a communication interface 15, and a means for transmitting and exchanging messages between the above-mentioned components. Bus 16. The processor 11_ is used to control the operation of the electronic device i to cooperate with the two memories 12, 13 and other necessary components to perform functions such as personal information management, data communication, and other preset functions. The volatilization in this embodiment Sex memory 12 is two random access memories.) As an example, it is mainly used to store random data. 'Users plan to use a virtual hard disk (Ramdisk) w to store some programs MV, 13 (Flash: two sides i4 contains one Display screen and plural operations (except for the display screen in circle 2 which is controlled by the processor η to display the data control point or hand, view it 'and let the user borrow a stylus (not shown) to touch. Wrestling key] 4? Fang read people option shirt news, for the office The receiving process of the processor η = 82 is provided for the user to select an option or perform a specific wireless connection with the wireless communication protocol S (fi⑴ and money 2). However, such as mobile communication protocols (such as GSM ) Or other suitable wired and wireless communication systems of 20 5 10 15 20 1246001. In this embodiment, the server 2 is a desktop personal computer, but it is not limited to this. The electronic device 1 is described above. After the main components are described, the following describes the main implementation steps of the preferred embodiment of the method for downloading and installing software in accordance with the flowchart of FIG. 3. First, as shown in steps 40 to 405, the electronic device 1 goes to the servo terminal 2 After sending a request to download the new version of the software installer 31 (shown in Figure 1) stored on the server 2, the server 2 will first calculate the volatile memory in the planning electronic device i according to the file size of the new version of the software installer 31 The body 12 is sufficient for the temporary storage area 12m (shown in FIG. 2) of a virtual hard disk type temporarily needed after the new version of the software installer 31 is downloaded, thereby generating a configuration setting for the volatile memory 12, and Download this setting to In the sub-device 1, the setting is stored in the non-volatile memory 13 by the electronic device. Then, as shown in steps 406 to 409, the server 2 will issue a command to restart the electronic device 1 (reboot). After the electronic device is received, it will perform a restart operation, and at the same time as the restart, the volatile memory 12 is reconfigured according to the configuration settings stored in the non-volatile memory 13, so that the foregoing sufficient supply is formed in the volatile memory 12. The new version of the software installer 31 is temporarily stored after downloading-the temporary storage area m. After the volatile memory 12 is configured, the server 2 will be notified; as shown in steps 410 to 411, the feeding server 2 will install the new version of the software installer 31. Download to the electronic device i and temporarily store it in the temporary storage area 121 in the volatile memory 12; as shown in step 412, the electronic device], and then a new version of the software security will be executed with the non-volatile memory 13 as the destination f Program 3 will store the overwrite generated after execution (the old version of the software 32 is stored in the non-volatile memory μ; as the steps,
8 1246001 414所不’新版本軟體安裝程式31安裝完成電子裝置1 將自動再-人進行重開機動作,並使開機後揮發性記憶體12 重新恢復至初始步冑4Q1 i傷狀態下之預設配置而釋放 新版本权體安裝程式31,如此即完成該軟體之升級程序。 於此須特別指出者,本實施例中係以伺服端2相對電 子衣置1形成一主從(host_client)架構,亦即如上述步驟 402至404中係由伺服端2就揮發性記憶體12產生配置設 疋而下傳至電子裝置1,於步驟權中亦係由伺服端2下達 7電子波置1重開機之指令;然如熟悉本技藝人士所熟知 者,於其他變化财,亦可將上述主從架料以調整,如 上述步驟402 S 4〇4中改由電子裝置!先自伺服端2取得 新版本|人體女裝程式31檔案大小資訊後,由電子裝置1自 行規劃揮發性記憶體12之配置設^,或於步驟彻中係由 電子哀置1不經伺服端2之命令而自動重開機,或其他就 上述主從關係之改變,皆屬自本發明揭示者所易於思及者 。至於伺服端2進行上述步驟術至綱或其他步驟之技 術’係藉由-軟體程式即可達成者,於此不另詳述。 綜合上述,本發明提供-種下載安褒軟體之方法,里 先於揮發性記憶體12關—足夠之暫存區域i2i,將新版 =軟體安裝程式31㈣存於暫存區域⑵,而後再安裝健 j非揮發性記憶體13並覆蓋原有之舊版本軟體犯。藉此 發性記憶體13空間不足以儲存新版本軟體安裝程 由於新版本軟體安裝程式31係先暫存於揮發性 之暫存區域121,完全不需耗用非揮發性記憶體 1246001 13之任何空間,故可順利完成新版本軟體安裝程式31之下 載及安裝程序。 同時,原暫存於揮發性記憶體12之新版本軟體安裝程 式31、經重開機後亦將自動釋放消失,而不致繼續佔用揮發 性記憶體12之有限空間。易言之,本發明在不擴增既有:己 憶體U、12容量之前提下,可供容量需求較高之軟體順利 下載更新,而無須預先犧牲刪除非揮發性記憶體丨3内之部 分程式,以空出足夠供新版本軟體安裝程式31儲存之空間 ,故可明顯提升記憶體容量有限之電子裝置丨之使用便利 性及實用價值。 上述實施例僅係為方便說明而舉例而已,本發明所主 張之權利範圍自應以申請專利範圍所述為準,而非僅限於 上述實施例。 【圖式簡單說明】 圖1係由本發明下載安裝軟體之方法較佳實施例應用 於一電子裝置及一伺服端之系統示意圖; 圖2係圖1中該電子裝置之—之主要方塊組態圖; 圖3係該較佳實施例之一實施流程圖。 【圖式之主要元件代表符號說明】 1電子裝置 2伺服端 31新版本軟體安裝程式 32舊版本軟體 1246001 11處理器 12揮發性記憶體 13非揮發性記憶體 14使用介面 5 15通訊介面 16匯流排 141顯示幕 142操作鍵 121暫存區域 401-414實施步驟 108 1246001 414 The new version of the software installation program 31 The electronic device 1 is installed. The device will automatically restart, and the volatile memory 12 will be restored to the initial step after booting. 4Q1 Default setting under injury. Configure and release the new version right body installer 31, so the software upgrade process is completed. It should be particularly noted here that in this embodiment, the server 2 is used to form a host-client structure with respect to the electronic clothing 1. That is, as described in steps 402 to 404, the server 2 uses the volatile memory 12 Generate configuration settings and download to electronic device 1. In the right of the step, the server 2 also issues a command of 7 electronic waves to reset 1; however, as is familiar to those skilled in the art, it can also be used in other changes. Adjust the above-mentioned master-slave material, and change to the electronic device as in the above steps 402 S 404! First obtain the new version from the server 2 | After the file size information of the human body women's clothing program 31, the electronic device 1 will automatically plan the configuration of the volatile memory 12 ^, or it will be set by the electronic device 1 without going through the server Command 2 automatically restarts, or other changes to the above-mentioned master-slave relationship are easy to think of by the presenter of the present disclosure. As for the technique of performing the above steps to the outline or other steps by the server 2 is achieved by a software program, it will not be described in detail here. To sum up, the present invention provides a method for downloading security software, which is 12 levels before the volatile memory—sufficient temporary storage area i2i, and the new version = software installation program 31 is stored in the temporary storage area, and then the health software j Non-volatile memory 13 and overwrites the original software version. As a result, the memory 13 does not have enough space to store the new version of the software installation process. Because the new version of the software installation program 31 is temporarily stored in the volatile temporary storage area 121, there is no need to consume any of the nonvolatile memory 1246001 13 Space, so you can successfully download and install the new version of the software installer 31. At the same time, the new version of the software installation method 31 temporarily stored in the volatile memory 12 will be automatically released and disappeared after rebooting, so that it will not continue to occupy the limited space of the volatile memory 12. In other words, the present invention does not expand the existing: memory capacity U, 12 before it can be downloaded and updated by software with higher capacity requirements without the need to sacrifice the deletion of non-volatile memory in advance. Some programs have enough space for the new version of the software installation program 31 to be stored, so it can significantly improve the convenience and practical value of electronic devices with limited memory capacity. The above embodiments are merely examples for the convenience of description. The scope of the rights claimed in the present invention shall be based on the scope of the patent application, rather than being limited to the above embodiments. [Brief description of the figure] FIG. 1 is a schematic diagram of a system in which a preferred embodiment of the method for downloading and installing software is applied to an electronic device and a server; FIG. 2 is a main block configuration diagram of the electronic device in FIG. 1 Figure 3 is an implementation flowchart of one of the preferred embodiments. [Description of the main components of the diagram] 1 Electronic device 2 Server 31 New software installation program 32 Old software 12460001 11 Processor 12 Volatile memory 13 Non-volatile memory 14 Use interface 5 15 Communication interface 16 Confluence Row 141 display screen 142 operation keys 121 temporary storage area 401-414 implementation step 10