TW201500916A - Method and device for software repair - Google Patents

Method and device for software repair Download PDF

Info

Publication number
TW201500916A
TW201500916A TW102145461A TW102145461A TW201500916A TW 201500916 A TW201500916 A TW 201500916A TW 102145461 A TW102145461 A TW 102145461A TW 102145461 A TW102145461 A TW 102145461A TW 201500916 A TW201500916 A TW 201500916A
Authority
TW
Taiwan
Prior art keywords
main program
software
file
running
running file
Prior art date
Application number
TW102145461A
Other languages
Chinese (zh)
Other versions
TWI494755B (en
Inventor
Dan-Hua Li
Original Assignee
Tencent Tech Shenzhen Co Ltd
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 Tencent Tech Shenzhen Co Ltd filed Critical Tencent Tech Shenzhen Co Ltd
Publication of TW201500916A publication Critical patent/TW201500916A/en
Application granted granted Critical
Publication of TWI494755B publication Critical patent/TWI494755B/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1004Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1469Backup restoration techniques

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Debugging And Monitoring (AREA)

Abstract

A method for software repair is provided. The method includes: determining whether a major program has faults in software according to eigenvalues of the major program; if the major program has faults, acquiring a pre-backup major program and related information of the major program; repairing the major program by the pre-backup major program and the related information of the major program; and performing the repaired major program. A device for software repair is also provided.

Description

軟體修復方法和裝置 Software repair method and device

本發明涉及電腦應用技術,特別是涉及一種軟體修復方法和裝置。 The present invention relates to computer application technology, and in particular to a software repair method and apparatus.

作業系統平臺中常常透過安裝大量軟體為使用者提供越來越豐富的功能,給使用者帶來了極大的方便。但與此同時,使用者無法運行安裝的軟體的情況也時有發生,因此,需要對安裝的軟體進行修復。 In the operating system platform, users are often provided with more and more functions by installing a large number of softwares, which brings great convenience to the user. At the same time, however, the user cannot run the installed software, and the installed software needs to be repaired.

傳統的軟體修復是透過互聯網路存取伺服器,以下載得到相應的安裝包實現的,需要耗費流量,脫離互聯網路則無法進行軟體的修復。有鑑於此,如何在脫離互聯網路的情況下進行軟體修復,是為本案發展之一目的。 The traditional software repair is realized by accessing the server through the Internet, downloading and obtaining the corresponding installation package, and it takes a lot of traffic, and the software can not be repaired without leaving the Internet. In view of this, how to carry out software repair in the case of leaving the Internet is one of the purposes of the development of this case.

為了解決現有技術的問題,本發明之一目的在於提供一種軟體修復方法,其包括根據軟體的主程式的特徵值判斷軟體的主程式是否破損,若是,則獲取預先備份的主程式以及主程式的關係訊息;透過預先備份的主程式以及主程式的關係訊息修復破損的主程式;以及運行修復後的主程式。 In order to solve the problems of the prior art, an object of the present invention is to provide a software repair method, which includes determining whether a main program of a software is damaged according to a feature value of a main program of the software, and if so, acquiring a main program backed up by the main program and a main program. Relational message; repair the broken main program through the pre-backed main program and the relationship information of the main program; and run the repaired main program.

在本發明之一實施例中,前述之軟體修復方法更包括,根據該主程式的特徵值判斷到該軟體的主程式未破損,則運行該軟體的該主程 式。 In an embodiment of the present invention, the software repair method further includes: if the main program of the software is not damaged according to the feature value of the main program, the main program of the software is run. formula.

在本發明之一實施例中,前述之軟體修復方法更包括,透過主程式的運行觸發對軟體的運行檔案進行掃描校驗,得到異常的運行檔案;以及修復異常的運行檔案。 In an embodiment of the present invention, the foregoing software repair method further includes: performing scan verification on the software running file through the running of the main program, obtaining an abnormal running file; and repairing the abnormal running file.

本發明之一目的在於提供一種軟體修復裝置,其包括主程式判斷模組、訊息獲取模組、主程式修復模組以及修復運行模組。其中,主程式判斷模組用於根據軟體的主程式的特徵值判斷軟體的主程式是否破損,若是,則通知訊息獲取模組;訊息獲取模組用於獲取預先備份的主程式以及主程式的關係訊息;主程式修復模組用於透過預先備份的主程式以及主程式的關係訊息修復破損的主程式;修復運行模組用於運行修復後的主程式。 An object of the present invention is to provide a software repair device including a main program determination module, a message acquisition module, a main program repair module, and a repair operation module. The main program judging module is configured to judge whether the main program of the software is damaged according to the characteristic value of the main program of the software, and if so, notify the message acquiring module; the message obtaining module is configured to obtain the pre-backed main program and the main program. Relationship message; the main program repair module is used to repair the damaged main program through the pre-backup main program and the relationship information of the main program; the repair operation module is used to run the repaired main program.

在本發明之一實施例中,前述之軟體修復裝置更包括主程式運行模組,用於根據主程式的特徵值判斷到軟體的主程式未破損,則運行軟體的主程式。 In an embodiment of the present invention, the software repairing apparatus further includes a main program running module, configured to run the main program of the software according to the characteristic value of the main program to determine that the main program of the software is not damaged.

在本發明之一實施例中,前述之軟體修復裝置更包括掃描校驗模組以及運行檔案修復模組。其中,掃描校驗模組用於透過主程式的運行觸發對軟體的運行檔案進行掃描校驗,得到異常的運行檔案;運行檔案修復模組用於修復異常的運行檔案。 In an embodiment of the invention, the software repairing device further includes a scan verification module and a running file repair module. The scan verification module is configured to scan and verify the running file of the software through the running of the main program to obtain an abnormal running file; and the running file repairing module is used to repair the abnormal running file.

本發明之一目的在於提供一種電腦可讀取存儲介質,其存儲有電腦可執行之一個或複數個指令片段,使得一個或複數個處理單元執行如前述之軟體修復方法。 It is an object of the present invention to provide a computer readable storage medium storing one or more instruction segments executable by a computer such that one or more processing units perform the software repair method as described above.

為讓本發明之上述和其他目的、特徵和優點能更明顯易懂,下文特舉較佳實施例,並配合所附圖式,作詳細說明如下。 The above and other objects, features and advantages of the present invention will become more <RTIgt;

10、20、30‧‧‧軟體修復裝置 10, 20, 30‧‧‧ software repair device

90‧‧‧手機 90‧‧‧Mobile phones

110‧‧‧主程式判斷模組 110‧‧‧Main program judgment module

130‧‧‧訊息獲取模組 130‧‧‧Message Acquisition Module

150‧‧‧主程式修復模組 150‧‧‧Main program repair module

170‧‧‧修復運行模組 170‧‧‧Repair operation module

190‧‧‧主程式運行模組 190‧‧‧Main program running module

210‧‧‧備份模組 210‧‧‧Backup module

310‧‧‧掃描校驗模組 310‧‧‧Scan verification module

311‧‧‧特徵獲取單元 311‧‧‧Feature acquisition unit

313‧‧‧一致性判斷單元 313‧‧‧Consistency judgment unit

315‧‧‧檔案定位單元 315‧‧‧File Positioning Unit

317‧‧‧檔案運行單元 317‧‧‧File Operations Unit

330‧‧‧運行檔案修復模組 330‧‧‧Run file repair module

331‧‧‧關係訊息獲取單元 331‧‧‧Relational information acquisition unit

333‧‧‧查找單元 333‧‧‧Search unit

335‧‧‧替換單元 335‧‧‧Replacement unit

910‧‧‧射頻電路 910‧‧‧RF circuit

920‧‧‧記憶體 920‧‧‧ memory

930‧‧‧輸入單元 930‧‧‧Input unit

931‧‧‧觸控面板 931‧‧‧Touch panel

932‧‧‧其他輸入裝置 932‧‧‧Other input devices

940‧‧‧顯示單元 940‧‧‧Display unit

941‧‧‧顯示面板 941‧‧‧ display panel

950‧‧‧感測器 950‧‧‧ sensor

960‧‧‧音訊電路 960‧‧‧Optical circuit

961‧‧‧揚聲器 961‧‧‧Speaker

962‧‧‧傳聲器 962‧‧‧Microphone

970‧‧‧無線相容性認證模組 970‧‧‧Wireless Compatibility Certification Module

980‧‧‧處理器 980‧‧‧ processor

990‧‧‧電源 990‧‧‧Power supply

S110、S130、S150、S170、S190‧‧‧本發明一實施例中軟體修復方法的流程步驟 S110, S130, S150, S170, S190‧‧‧ flow steps of the software repairing method in an embodiment of the present invention

S210、S230‧‧‧本發明一實施例中軟體修復方法的流程步驟 S210, S230‧‧‧ flow steps of the software repairing method in an embodiment of the present invention

S211、S213、S215、S217‧‧‧本發明一實施例中透過主程式的運行觸發對軟體的運行檔案進行掃描校驗,得到異常的運行檔案方法的流程步驟 S211, S213, S215, S217‧‧ In the embodiment of the present invention, the running file of the software is triggered to scan and verify the running file of the software, and the process step of the abnormal running file method is obtained.

S231、S233、S235‧‧‧本發明一實施例中修復異常的運行檔案的方法流程步驟 S231, S233, S235‧‧‧ Method flow steps for repairing an abnormal running file in an embodiment of the present invention

圖1為本發明一實施例中軟體修復方法的流程圖;圖2為本發明一實施例中軟體修復方法的流程圖;圖3為圖2中透過主程式的運行觸發對軟體的運行檔案進行掃描校驗,得到異常的運行檔案的方法流程圖;圖4為圖2中修復異常的運行檔案的方法流程圖;圖5為本發明一實施例中軟體修復裝置的結構示意圖;圖6為本發明一實施例中軟體修復裝置的結構示意圖;圖7為本發明一實施例中軟體修復裝置的結構示意圖;圖8為圖7中掃描校驗模組的結構示意圖;圖9為圖7中運行檔案修復模組的結構示意圖;圖10為本發明一實施例中運行軟體修復裝置的終端的結構示意圖。 1 is a flow chart of a software repairing method according to an embodiment of the present invention; FIG. 2 is a flowchart of a software repairing method according to an embodiment of the present invention; and FIG. 3 is a running file of the software running by the running of the main program in FIG. FIG. 4 is a flowchart of a method for repairing an abnormal operation file in FIG. 2; FIG. 5 is a schematic structural diagram of a software restoration device according to an embodiment of the present invention; FIG. 7 is a schematic structural view of a software repairing apparatus according to an embodiment of the present invention; FIG. 8 is a schematic structural view of the scan verifying module of FIG. 7; FIG. FIG. 10 is a schematic structural diagram of a terminal for operating a software repairing device according to an embodiment of the present invention; FIG.

有關本發明之前述及其他技術內容、特點與功效,在以下配合參考圖式之一較佳實施例的詳細說明中,將可清楚的呈現。以下實施例中所提到的方向用語,例如:上、下、左、右、前或後等,僅是參考附加圖式的方向。因此,使用的方向用語是用來說明並非用來限制本發明。 The above and other technical contents, features and advantages of the present invention will be apparent from the following detailed description of the preferred embodiments. The directional terms mentioned in the following embodiments, such as up, down, left, right, front or back, etc., are only directions referring to the additional drawings. Therefore, the directional terminology used is for the purpose of illustration and not limitation.

請參考圖1,圖1係本發明一實施例中軟體修復方法的流程圖。於本實施例中,軟體修復方法可包括如下步驟:步驟S110,根據主程式的特徵值判斷軟體的主程式(program)是否破損,若是,則進入步驟S130,若否,則進入步驟S190。本實施例中,透過觸發軟體運行的操作運行軟體時,將獲取主程式的特徵值以及存儲於本地的與主程式對應的特徵值,進而透過判斷主程式的特徵值和存儲於本地的與主程式對應的特徵值是否一致,若不相一致,則說明主程式不可運行,軟體的主程式已經破損,需要對主程式進行修復,若主程式可運行,則直接運行該軟體的主程式(如步驟S190)即可。 Please refer to FIG. 1. FIG. 1 is a flowchart of a software repairing method according to an embodiment of the present invention. In the embodiment, the software repairing method may include the following steps: Step S110: determining whether the software main program is damaged according to the feature value of the main program, and if yes, proceeding to step S130, and if no, proceeding to step S190. In this embodiment, when the software is operated by the operation of the trigger software, the feature value of the main program and the feature value corresponding to the main program stored in the local program are acquired, and then the feature value of the main program is determined and stored locally. Whether the eigenvalues of the program are consistent. If they are not consistent, the main program is not executable. The main program of the software is damaged. The main program needs to be repaired. If the main program can run, run the main program of the software directly. Step S190) is sufficient.

步驟S130,獲取預先備份的主程式以及主程式的關係訊息。本實施例中,由於主程式破損而導致了當前主程式是無法運行的,因此將獲取備份於本地的主程式和該主程式的關係訊息。其中,該主程式的關係訊息將包括了該軟體安裝完成時主程式所在的目錄訊息和安裝檔案結構訊息,該主程式所在的目錄訊息將指示了安裝時主程式被放置在哪裡,安裝檔案案結構訊息則用於指示軟體在安裝時會在主程式相關的目錄中產生的檔案以及產生的檔案是否需要與系統交互註冊。 Step S130, acquiring a pre-backup main program and a relationship information of the main program. In this embodiment, since the main program is inoperable due to the damage of the main program, the relationship between the main program backed up locally and the main program is obtained. The relationship information of the main program will include the directory information and the installation file structure information of the main program when the software is installed. The directory information of the main program indicates where the main program is placed during installation, and the installation file is installed. The structure message is used to indicate whether the software will generate files in the main program-related directory during installation and whether the generated files need to be registered with the system.

步驟S150,透過預先備份的主程式以及主程式的關係訊息修復破損的主程式。本實施例中,根據主程式的關係訊息得到該軟體完成安裝時主程式所對應的目錄,以得到該軟體安裝完成時主程式的放置位置,按照這一放置位置將破損的主程式替換為獲取得到的預先備份的主程式,此時,軟體的主程式將恢復為安裝時的狀態。 In step S150, the damaged main program is repaired through the pre-backed main program and the relationship information of the main program. In this embodiment, according to the relationship information of the main program, the directory corresponding to the main program when the software is installed is obtained, so as to obtain the placement position of the main program when the software is installed, and the damaged main program is replaced by the placement position. The obtained pre-backed main program, at this time, the software main program will be restored to the state at the time of installation.

步驟S170,運行修復後的主程式。 Step S170, running the repaired main program.

步驟S190,運行軟體的主程式。 In step S190, the main program of the software is run.

本實施例中,判斷到軟體的主程式未破損,則不需要對主程式進行任何修復,直接運行主程式即可。 In this embodiment, if it is determined that the main program of the software is not damaged, it is not necessary to perform any repair on the main program, and the main program can be directly run.

於本發明一實施例中,上述步驟S110之前,該方法還包括:備份安裝後得到的主程式和運行檔案,以及主程式和運行檔案所對應的特徵值和關係訊息。 In an embodiment of the present invention, before the step S110, the method further includes: backing up the main program and the running file obtained after the installation, and the feature values and relationship information corresponding to the main program and the running file.

本實施例中,作業系統平臺中軟體安裝完成時,將收集軟體初始的所有資料以及關係訊息,並存儲於本地以完成軟體的備份,其中,所收集的資料包括了安裝後得到的主程式和區別於主程式的其它檔案,即運行檔案;所收集的關係訊息則是安裝後所產生的目錄訊息和安裝檔案結構訊息,安裝後產生的目錄訊息用於指示安裝後產生的目錄樹結構,透過目錄樹結構可獲知某一檔案所放置的位置;安裝檔案結構訊息用於標識哪些目錄將產生檔案,以及產生的檔案是否需要與系統交互註冊。 In this embodiment, when the software installation in the operating system platform is completed, all the initial information of the software and the relationship information are collected and stored locally to complete the backup of the software, wherein the collected data includes the main program obtained after installation and The other files that are different from the main program are the running files. The collected relationship information is the directory information and the installation file structure information generated after the installation. The directory information generated after the installation is used to indicate the directory tree structure generated after the installation. The directory tree structure can be used to know where a file is placed; the installation file structure message is used to identify which directories will generate the file, and whether the generated file needs to be registered with the system.

請參考圖2,圖2為本發明一實施例中軟體修復方法的流程圖,在本實施例中,軟體修復方法還包括:步驟S210,透過主程式的運行觸發對軟體的運行檔案進行掃描校驗,得到異常的運行檔案。本實施例中,掃描軟體的運行檔案,以校驗軟體的運行檔案是否正確,進而得到發生了異常的運行檔案,該異常的運行檔案可能發生了破損、缺失和冗餘等。 Referring to FIG. 2, FIG. 2 is a flowchart of a software repairing method according to an embodiment of the present invention. In the embodiment, the software repairing method further includes: Step S210: triggering a scan of the running file of the software by running the main program. Check, get an abnormal running file. In this embodiment, the running file of the software is scanned to verify whether the running file of the software is correct, and then an abnormal running file is obtained, and the abnormal running file may be damaged, missing, and redundant.

步驟S230,修復異常的運行檔案。本實施例中,透過本地備份的資料和關係訊息對異常的運行檔案進行修復,以使得掃描校驗所得到的異常的運行檔案均被修復,實現了軟體的本地修復,進而保證了軟體的順序運行,使得使用者即使無法連接互聯網路仍然能夠順利修復發生了異常的軟體。 In step S230, the abnormal running file is repaired. In this embodiment, the abnormal running file is repaired through the locally backed up data and the relationship information, so that the abnormal running files obtained by the scan verification are all repaired, and the local repair of the software is realized, thereby ensuring the order of the software. The operation makes it possible for the user to successfully repair the abnormal software even if the user cannot connect to the Internet.

如圖3所示,在本發明一實施例中,上述步驟S210可包括:步驟S211,獲取運行檔案所對應的特徵值和備份於本地的特徵值。本實施例中,備份於本地的特徵值是軟體安裝完成時備份的與運行檔案所對應的正確的運行檔案的特徵值,可以是正確的運行檔案的訊息摘要值,例如,雜湊值(HASH值);也可以是對運行檔案的大小、創建日期和簽名等透過訊息摘要演算法進行計算得到的數值,相應的,備份於本地的特徵值與運行檔案所對應的特徵值將是一樣的形式,即備份於本地的特徵值與運行檔案所對應的特徵值將同為特徵值的形式,也可以同為其它的一些形式。 As shown in FIG. 3, in an embodiment of the present invention, the step S210 may include: Step S211: Acquire a feature value corresponding to the running file and a feature value backed up locally. In this embodiment, the feature value backed up locally is the feature value of the correct running file corresponding to the running file that is backed up when the software is installed, and may be the message digest value of the correct running file, for example, the hash value (HASH value). ); it can also be a value calculated by the message digest algorithm such as the size, creation date, and signature of the running file. Correspondingly, the feature value backed up locally will be the same as the feature value corresponding to the running file. That is, the feature values backed up locally and the feature values corresponding to the running file will be in the form of feature values, or may be in other forms.

步驟S213,判斷運行檔案所對應的特徵值和備份於本地的特徵值是否一致,若否,則進入步驟S215,若是,則進入步驟S217。本實施例中,根據特徵值判斷運行檔案是否異常,也就是說,將運行檔案的特徵值和備份於本地的正確的運行檔案所對應的特徵值進行一致性判斷,以得到特徵值與備份於本地的正確的運行檔案所對應的特徵值不相一致的運行檔案,該運行檔案即為異常的運行檔案。 In step S213, it is determined whether the feature value corresponding to the running file and the feature value backed up locally are consistent. If not, the process proceeds to step S215, and if yes, the process proceeds to step S217. In this embodiment, it is determined whether the running file is abnormal according to the feature value, that is, the feature value of the running file and the feature value corresponding to the correct running file backed up locally are consistently judged to obtain the feature value and backed up. The running file of the local correct running file corresponding to the feature value is not consistent, and the running file is an abnormal running file.

步驟S215,定位得到異常的運行檔案。本實施例中,在若干個運行檔案中定位出異常的運行檔案,以便於後續直接對異常的運行檔案進行修復。 In step S215, the abnormal running file is located. In this embodiment, an abnormal running file is located in a plurality of running files, so as to directly repair the abnormal running file.

步驟S217,運行該運行檔案。本實施例中,若運行檔案無異常,直接運行該運行檔案即可,不需要進行任何的修復。 In step S217, the running file is run. In this embodiment, if there is no abnormality in the running file, the running file can be directly run without any repair.

如圖4所示,在本發明一實施例中,上述步驟S230可包括:步驟S231,獲取異常的運行檔案所在的關係訊息。本實施例中,在得到異常的運行檔案之後,需要對運行檔案進行修復方可順序運行的運行檔案所在的軟體。根據異常的運行檔案所在的目錄得到對應的關係訊息。 As shown in FIG. 4, in an embodiment of the present invention, the foregoing step S230 may include: Step S231, acquiring a relationship message where an abnormal running file is located. In this embodiment, after the abnormal running file is obtained, the software of the running file that needs to be repaired in order to be sequentially run needs to be repaired. Corresponding relationship information is obtained according to the directory where the abnormal running file is located.

步驟S233,根據關係訊息查找得到本地備份的運行檔案。本實施例中,由於異常的運行檔案大都是發生了破損、缺失或冗餘等狀況的,因此,異常的運行檔案和軟體安裝完成時正確的運行檔案是處於相同目錄的,即異常的運行檔案和正確的運行檔案是放置於同一位置的,根據關係訊息將能夠在本地查找得到與異常的運行檔案對應的本地備份的運行檔案。 Step S233, searching for a local backup running file according to the relationship information. In this embodiment, since the abnormal running files are mostly damaged, missing, or redundant, the correct running files and the correct running files when the software is installed are in the same directory, that is, the abnormal running files. And the correct running file is placed in the same location, according to the relationship message will be able to locally find the running file of the local backup corresponding to the abnormal running file.

步驟S235,替換異常的運行檔案為查找得到的運行檔案。本實施例中,根據關係訊息得到異常的運行檔案所在位置,以按照異常的運行檔案所在位置將異常的運行檔案替換為查找得到的運行檔案,進而完成對異常的運行檔案所進行的修復。 In step S235, the abnormal running file is replaced by the obtained running file. In this embodiment, the location of the abnormal running file is obtained according to the relationship information, and the abnormal running file is replaced with the found running file according to the location of the abnormal running file, thereby completing the repair of the abnormal running file.

此外,若監控到運行檔案缺失,則獲取缺失的運行檔案所在的關係訊息,進而根據關係訊息中的目錄獲取備份的運行檔案,透過備份的運行檔案對缺失的運行檔案進行還原恢復,以使得軟體中即使發生了運行檔案缺失的情況也能順利進行本地恢復,保證了軟體的順利運行。 In addition, if the running file is missing, the relationship information of the missing running file is obtained, and then the backup running file is obtained according to the directory in the relationship message, and the missing running file is restored and restored through the backup running file to make the software Even if the running file is missing, the local recovery can be smoothly performed, which ensures the smooth running of the software.

上述軟體修復方法中,對軟體進行監控以獲知發生了異常的主程式或運行檔案,根據本地備份的特徵值識別出異常的運行檔案,透過 所進行的本地備份對異常的程式或運行檔案進行修復,不需要訪問互聯網路即可準確識別出異常的主程式或運行檔案,進而透過本地備份即可對自身破損的軟體進行修復。 In the above software repair method, the software is monitored to obtain an abnormal main program or a running file, and an abnormal running file is identified according to the characteristic value of the local backup. The local backup is performed to repair the abnormal program or running file. You can accurately identify the abnormal main program or running file without accessing the Internet, and then repair the damaged software through local backup.

請參考圖5,圖5為本發明一實施例中軟體修復裝置的結構示意圖,於本實施例中,軟體修復裝置10包括主程式判斷模組110、訊息獲取模組130、主程式修復模組150、修復運行模組170和主程式運行模組190。 Please refer to FIG. 5. FIG. 5 is a schematic structural diagram of a software repairing apparatus according to an embodiment of the present invention. In the embodiment, the software repairing apparatus 10 includes a main program determining module 110, a message acquiring module 130, and a main program repairing module. 150. The repair operation module 170 and the main program execution module 190.

主程式判斷模組110可用於根據主程式的特徵值判斷軟體的主程式是否破損,若是,則通知訊息獲取模組130,若否,則通知主程式運行模組190。 The main program determining module 110 can be configured to determine whether the main program of the software is damaged according to the feature value of the main program. If yes, notify the message obtaining module 130, and if not, notify the main program running module 190.

本實施例中,透過觸發軟體運行的操作運行軟體時,主程式判斷模組110將獲取主程式的特徵值以及存儲於本地的與主程式對應的特徵值,進而透過判斷主程式的特徵值和存儲於本地的與主程式對應的特徵值是否一致,若不相一致,則說明主程式不可運行,該軟體的主程式已經破損,需要對主程式進行修復,若主程式可運行,則通知主程式運行模組190直接運行該軟體的主程式即可。 In this embodiment, when the software is operated by the operation of the trigger software, the main program determining module 110 acquires the feature value of the main program and the feature value corresponding to the main program stored in the local program, and then determines the feature value of the main program and Whether the eigenvalues corresponding to the main program stored in the locality are consistent. If they are not consistent, the main program is not executable. The main program of the software is damaged. The main program needs to be repaired. If the main program can be run, notify the main program. The program running module 190 can directly run the main program of the software.

訊息獲取模組130可用於獲取預先備份的主程式以及主程式的關係訊息。本實施例中,由於主程式破損而導致了當前主程式是無法運行的,因此訊息獲取模組130將獲取備份於本地的主程式和該主程式的關係訊息。其中,該主程式的關係訊息將包括了該軟體安裝完成時主程式所在的目錄訊息和安裝檔案結構訊息,該主程式所在的目錄訊息將指示了安裝時主程式被放置在哪裡,安裝檔案結構訊息則用於指示該軟體在安裝時會在主程式相關的目錄中產生的檔案以及產生的檔案是否需要與系統交互註冊。 The message acquisition module 130 can be used to obtain a pre-backed main program and a relationship information of the main program. In this embodiment, the main program is inoperable due to the damage of the main program, so the message acquisition module 130 will obtain the relationship information of the main program backed up locally and the main program. The relationship information of the main program will include the directory information and the installation file structure information of the main program when the software is installed. The directory information of the main program indicates where the main program is placed during installation, and the file structure is installed. The message is used to indicate whether the software will generate files in the main program-related directory during installation and whether the generated files need to be registered with the system.

主程式修復模組150可用於透過預先備份的主程式以及主程式的關係訊息修復破損的主程式。本實施例中,主程式修復模組150根 據主程式的關係訊息得到軟體完成安裝時主程式所對應的目錄,以得到軟體安裝完成時主程式的放置位置,按照這一放置位置將破損的主程式替換為獲取得到的預先備份的主程式,此時,該軟體的主程式將恢復為安裝時的狀態。 The main program repair module 150 can be used to repair the damaged main program through the pre-backed main program and the relationship information of the main program. In this embodiment, the main program repair module has 150 roots. According to the relationship information of the main program, the software corresponding to the main program is installed in the directory corresponding to the main program to obtain the location of the main program when the software installation is completed, and the damaged main program is replaced with the obtained pre-backed main program according to the placement position. At this time, the main program of the software will be restored to the state at the time of installation.

修復運行模組170可用於運行修復後的主程式。主程式運行模組190,用於透過觸發軟體運行的操作判斷到軟體的主程式未破損,則運行軟體的主程式。於本實施例中,判斷到軟體的主程式未破損,則不需要對主程式進行任何修復,主程式運行模組190直接運行主程式即可。 The repair run module 170 can be used to run the repaired main program. The main program running module 190 is configured to run the software main program without determining that the main program of the software is not broken by triggering the operation of the software running. In this embodiment, if it is determined that the main program of the software is not damaged, no repair of the main program is required, and the main program running module 190 directly runs the main program.

請參考圖6,在本發明一實施例中,軟體修復裝置20除了包含前述軟體修復裝置10的模組之外,還可包括備份模組210,該備份模組210可用於備份安裝後得到的主程式和運行檔案,以及主程式和運行檔案所對應的特徵值和關係訊息。 Referring to FIG. 6 , in an embodiment of the present invention, the software repair device 20 may include a backup module 210 in addition to the module of the software repair device 10 , and the backup module 210 may be used for backup and installation. The main program and the run file, as well as the feature values and relationship information corresponding to the main program and the run file.

本實施例中,作業系統平臺中軟體安裝完成時,備份模組210將收集該軟體初始的所有資料以及關係訊息,並存儲於本地以完成該軟體的備份,其中,備份模組210所收集的資料包括了安裝後得到的主程式和區別於主程式的其它檔案,即運行檔案;備份模組210所收集的關係訊息則是安裝後所產生的目錄訊息和安裝檔案結構訊息,安裝後產生的目錄訊息用於指示安裝後產生的目錄樹結構,透過目錄樹結構可獲知某一檔案所放置的位置;安裝檔案結構訊息用於標識哪些目錄將產生檔案,以及產生的檔案是否需要與系統交互註冊。 In this embodiment, when the software installation in the operating system platform is completed, the backup module 210 collects all the initial data and relationship information of the software, and stores it locally to complete the backup of the software, wherein the backup module 210 collects The data includes the main program obtained after installation and other files different from the main program, that is, the running file; the relationship information collected by the backup module 210 is the directory information and the installation file structure information generated after the installation, and is generated after the installation. The directory message is used to indicate the directory tree structure generated after installation. The directory tree structure can be used to know the location where a file is placed. The installation file structure message is used to identify which directories will generate files, and whether the generated files need to be registered with the system. .

如圖7所示,在本發明一實施例中,軟體修復裝置30除了包含軟體修復裝置20的模組外,還可包括掃描校驗模組310和運行檔案修復模組330。 As shown in FIG. 7 , in an embodiment of the present invention, the software repair device 30 includes a scan verification module 310 and a running file repair module 330 in addition to the module of the software repair device 20 .

掃描校驗模組310可用於透過主程式的運行觸發對軟體的運行檔案時行掃描校驗,得到異常的運行檔案。本實施例中,掃描校驗模組310掃描軟體的運行檔案,以校驗軟體的運行檔案是否正確,進而得到 發生了異常的運行檔案,該異常的運行檔案可能發生了破損、缺失和冗餘等。 The scan verification module 310 can be used to trigger a line scan verification on the running file of the software through the running of the main program, and obtain an abnormal running file. In this embodiment, the scan verification module 310 scans the running file of the software to verify whether the software running file is correct, and thus obtains An abnormal running file has occurred, and the abnormal running file may be damaged, missing, and redundant.

運行檔案修復模組330可用於修復異常的運行檔案。本實施例中,運行檔案修復模組330透過本地備份的資料和關係訊息對異常的運行檔案進行修復,以使得掃描校驗所得到的異常的運行檔案均被修復,實現了軟體的本地修復,進而保證了軟體的順序運行,使得使用者即使無法連接互聯網路仍然能夠順利修復發生了異常的軟體。 The run file repair module 330 can be used to repair an abnormal run file. In this embodiment, the running file repair module 330 repairs the abnormal running file through the locally backed up data and the relationship message, so that the abnormal running files obtained by the scan verification are all repaired, and the local repair of the software is realized. In addition, the sequential operation of the software is ensured, so that the user can smoothly repair the abnormal software even if the user cannot connect to the Internet.

如圖8所示,在本發明一實施例中,掃描校驗模組310包括特徵獲取單元311、一致性判斷單元313、檔案定位單元315和檔案運行單元317。 As shown in FIG. 8, in an embodiment of the present invention, the scan verification module 310 includes a feature acquisition unit 311, a consistency determination unit 313, a file location unit 315, and a file execution unit 317.

特徵獲取單元311可用於獲取運行檔案所對應的特徵值和備份於本地的特徵值。本實施例中,備份於本地的特徵值是軟體安裝完成時備份的與運行檔案所對應的正確的運行檔案的特徵值,可以是正確的運行檔案的訊息摘要值,例如,雜湊值(HASH值);也可以是對運行檔案的大小、創建日期和簽名等透過訊息摘要演算法進行計算得到的數值,相應的,備份於本地的特徵值與運行檔案所對應的特徵值將是一樣的形式,即備份於本地的特徵值與運行檔案所對應的特徵值將同為特徵值的形式,也可以同為其它的一些形式。 The feature obtaining unit 311 can be configured to acquire the feature value corresponding to the running file and the feature value backed up locally. In this embodiment, the feature value backed up locally is the feature value of the correct running file corresponding to the running file that is backed up when the software is installed, and may be the message digest value of the correct running file, for example, the hash value (HASH value). ); it can also be a value calculated by the message digest algorithm such as the size, creation date, and signature of the running file. Correspondingly, the feature value backed up locally will be the same as the feature value corresponding to the running file. That is, the feature values backed up locally and the feature values corresponding to the running file will be in the form of feature values, or may be in other forms.

一致性判斷單元313可用於判斷運行檔案所對應的特徵值與備份於本地的特徵值是否一致,若否,則通知檔案定位單元315,若是,則通知檔案運行單元317。本實施例中,一致性判斷單元313根據特徵值判斷運行檔案是否異常,也就是說,將運行檔案的特徵值和備份於本地的正確的運行檔案所對應的特徵值進行一致性判斷,以得到特徵值與備份於本地的正確的運行檔案所對應的特徵值不相一致的運行檔案,該運行檔案即為異常的運行檔案。 The consistency determining unit 313 can be configured to determine whether the feature value corresponding to the running file is consistent with the feature value backed up locally, and if not, notify the file positioning unit 315, and if so, notify the file running unit 317. In this embodiment, the consistency determining unit 313 determines whether the running file is abnormal according to the feature value, that is, performs consistency judgment on the feature value of the running file and the feature value corresponding to the correct running file backed up locally, to obtain a consistency judgment. The running file is an abnormal running file with the feature value that is inconsistent with the feature value corresponding to the correct running file stored in the local.

檔案定位單元315可用於定位得到異常的運行檔案。本實施 例中,檔案定位單元315在若干個運行檔案中定位出異常的運行檔案,以便於後續直接對異常的運行檔案進行修復。 The file location unit 315 can be used to locate an abnormal running file. This implementation In the example, the file locating unit 315 locates an abnormal running file in a plurality of running files, so as to directly repair the abnormal running file.

檔案運行單元317可用於運行該運行檔案。本實施例中,若運行檔案無異常,檔案運行單元317直接運行該運行檔案即可,不需要進行任何的修復。 The file execution unit 317 can be used to run the run file. In this embodiment, if there is no abnormality in the running file, the file running unit 317 can directly run the running file, and no repair is needed.

如圖9所示,在本發明一實施例中,上述運行檔案修復模組330包括關係訊息獲取單元331、查找單元333和替換單元335。 As shown in FIG. 9, in an embodiment of the present invention, the running file repair module 330 includes a relationship information acquiring unit 331, a searching unit 333, and a replacing unit 335.

關係訊息獲取單元331可用於獲取異常的運行檔案所在的關係訊息。本實施例中,在得到異常的運行檔案之後,需要對運行檔案進行修復方可順序運行的運行檔案所在的軟體。關係訊息獲取單元331根據異常的運行檔案所在的目錄得到對應的關係訊息。 The relationship information obtaining unit 331 can be configured to acquire a relationship message in which the abnormal running file is located. In this embodiment, after the abnormal running file is obtained, the software of the running file that needs to be repaired in order to be sequentially run needs to be repaired. The relationship information obtaining unit 331 obtains a corresponding relationship message based on the directory in which the abnormal running file is located.

查找單元333可用於根據關係訊息查找得到本地備份的運行檔案。本實施例中,由於異常的運行檔案大都是發生了破損、缺失或冗餘等狀況的,因此,異常的運行檔案和軟體安裝完成時正確的運行檔案是處於相同目錄的,即異常的運行檔案和正確的運行檔案是放置於同一位置的,查找單元333根據關係訊息將能夠在本地查找得到與異常的運行檔案對應的本地備份的運行檔案。 The searching unit 333 can be configured to find a running file of the local backup according to the relationship information. In this embodiment, since the abnormal running files are mostly damaged, missing, or redundant, the correct running files and the correct running files when the software is installed are in the same directory, that is, the abnormal running files. And the correct running file is placed in the same location, the searching unit 333 will be able to locally find the running file of the local backup corresponding to the abnormal running file according to the relationship message.

替換單元335可用於替換異常的運行檔案為查找得到的運行檔案。本實施例中,替換單元335根據關係訊息得到異常的運行檔案所在位置,以按照異常的運行檔案所在位置將異常的運行檔案替換為查找得到的運行檔案,進而完成對異常的運行檔案所進行的修復。此外,替換單元335若監控到運行檔案缺失,則獲取缺失的運行檔案所在的關係訊息,進而根據關係訊息中的目錄獲取備份的運行檔案,透過備份的運行檔案對缺失的運行檔案進行還原恢復,以使得軟體中即使發生了運行檔案缺失的情況也能順利進行本地恢復,保證了軟體的順利運行。 The replacement unit 335 can be used to replace the abnormal running file to find the obtained running file. In this embodiment, the replacing unit 335 obtains the location of the abnormal running file according to the relationship message, and replaces the abnormal running file with the found running file according to the location of the abnormal running file, thereby completing the abnormal running file. repair. In addition, if the replacement unit 335 monitors that the running file is missing, the relationship information of the missing running file is obtained, and then the backup running file is obtained according to the directory in the relationship message, and the missing running file is restored and restored through the backup running file. In order to make the software recover smoothly even if the running file is missing in the software, the smooth running of the software is guaranteed.

上述軟體修復裝置中,對軟體進行監控以獲知發生了異常的 主程式或運行檔案,根據本地備份的特徵值識別出異常的運行檔案,透過所進行的本地備份對異常的程式或運行檔案進行修復,不需要訪問互聯網路即可準確識別出異常的主程式或運行檔案,進而透過本地備份即可對自身破損的軟體進行修復。 In the above software repair device, the software is monitored to know that an abnormality has occurred. The main program or the running file identifies an abnormal running file according to the characteristic value of the local backup, and repairs the abnormal program or the running file through the local backup performed, and can accurately identify the abnormal main program without accessing the Internet path or Run the file, and then repair the damaged software through local backup.

上述軟體修復方法和裝置,根據主程式的特徵值判斷該軟體的主程式是否破損,若判斷到該軟體的主程式是破損的,則獲取預先備份的主程式以及主程式的關係訊息,透過預先備份的主程式以及主程式的關係訊息修復破損的主程式,最後再運行修復後的主程式,此時脫離互聯網路也能夠進行軟體的修復,無需耗費流量。 The software repair method and device determine whether the main program of the software is damaged according to the characteristic value of the main program, and if it is determined that the main program of the software is damaged, the pre-backed main program and the relationship information of the main program are obtained, The main program of the backup and the relationship information of the main program repair the damaged main program, and finally run the repaired main program. At this time, the software can be repaired without leaving the Internet, and no traffic is required.

本領域普通技術人員可以理解實現上述實施例方法中的全部或部分流程,是可以透過電腦程式來指令相關的硬體來完成,所述的程式可存儲於一電腦可讀取存儲介質中,該程式在執行時,可包括如上述各方法的實施例的流程。其中,所述的存儲介質可為磁碟、光碟、唯讀存儲記憶體(Read-Only Memory,ROM)或隨機存儲記憶體(Random Access Memory,RAM)等。 A person skilled in the art can understand that all or part of the process of implementing the above embodiment method can be completed by using a computer program to instruct related hardware, and the program can be stored in a computer readable storage medium. The program, when executed, may include the flow of an embodiment of the methods as described above. The storage medium may be a magnetic disk, a optical disk, a read-only memory (ROM), or a random access memory (RAM).

本發明一實施例還提供了一種運行軟體修復裝置的終端,如圖10所示,為了便於說明,僅示出了與本發明實施例相關的部分,具體技術細節未揭示的,請參照本發明實施例方法部分。該終端可以為包括手機、平板電腦、PDA(Personal Digital Assistant,個人數位助理)、POS(Point of Sales,銷售終端)、車載電腦等任意終端設備,以終端為手機為例:圖10示出的是與本發明一實施例中運行軟體修復裝置的終端的結構示意圖。請參考圖10,終端,例如手機90,可包括:射頻(Radio Frequency,RF)電路910、記憶體920、輸入單元930、顯示單元940、感測器950、音訊電路960、無線相容性認證(wireless fidelity,WiFi)模組970、處理器980、以及電源990等部件。本領域技術人員可以理解,圖10中示出的手機結構並不構成對手機的限定,可以包括比圖示更多或更少的 部件,或者組合某些部件,或者不同的部件佈置。 An embodiment of the present invention further provides a terminal for operating a software repairing device. As shown in FIG. 10, for the convenience of description, only parts related to the embodiment of the present invention are shown. For details not disclosed, refer to the present invention. Example method section. The terminal may be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, and the terminal is a mobile phone as an example: FIG. It is a schematic structural diagram of a terminal that runs a software repairing device in an embodiment of the present invention. Referring to FIG. 10, the terminal, such as the mobile phone 90, may include: a radio frequency (RF) circuit 910, a memory 920, an input unit 930, a display unit 940, a sensor 950, an audio circuit 960, and a wireless compatibility authentication. (wireless fidelity, WiFi) module 970, processor 980, and power supply 990 and other components. Those skilled in the art can understand that the structure of the mobile phone shown in FIG. 10 does not constitute a limitation on the mobile phone, and may include more or less than the illustration. Parts, or combinations of parts, or different parts.

下面結合圖10對手機的各個構成部件進行具體的介紹:RF電路910可用於收發訊息或通話過程中,信號的接收和發送,特別地,將基地台的下行訊息接收後,給處理器980處理;另外,將設計上行的資料發送給基地台。通常,RF電路包括但不限於天線、至少一個放大器、收發信機、耦合器、低雜訊放大器(Low Noise Amplifier,LNA)、雙工器等。此外,RF電路910還可以透過無線通訊與網路和其他設備通信。上述無線通訊可以使用任一通信標準或協定,包括但不限於全球移動通訊系統(Global System of Mobile communication,GSM)、通用分組無線服務(General Packet Radio Service,GPRS)、碼分多址(Code Division Multiple Access,CDMA)、寬頻碼分多址(Wideband Code Division Multiple Access,WCDMA)、長期演進(Long Term Evolution,LTE))、電子郵件、短消息服務(Short Messaging Service,SMS)等。 The following describes the components of the mobile phone in detail with reference to FIG. 10: the RF circuit 910 can be used for receiving and transmitting signals during the transmission or reception of a message or a call, and in particular, after receiving the downlink message of the base station, the processor 980 processes the signal. In addition, the design of the uplink data is sent to the base station. Generally, RF circuits include, but are not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuit 910 can also communicate with the network and other devices via wireless communication. The above wireless communication may use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code Division). Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), e-mail, Short Messaging Service (SMS), and the like.

記憶體920可用於存儲軟體程式以及模組,處理器980透過運行存儲在記憶體920的軟體程式以及模組,從而執行手機的各種功能應用以及資料處理。記憶體920可主要包括存儲程式區和存儲資料區,其中,存儲程式區可存儲作業系統、至少一個功能所需的應用程式(比如聲音播放功能、圖像播放功能等)等;存儲資料區可存儲根據手機的使用所創建的資料(比如音訊資料、電話本等)等。此外,記憶體920可以包括高速隨機存取記憶體,還可以包括非揮發性記憶體,例如至少一個磁碟記憶體件、快閃記憶體器件、或其他揮發性固態記憶體件。 The memory 920 can be used to store software programs and modules. The processor 980 executes various software applications and data processing of the mobile phone by running software programs and modules stored in the memory 920. The memory 920 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.); and the storage data area may be Stores data created based on the use of the phone (such as audio data, phone book, etc.). In addition, memory 920 can include high speed random access memory, and can also include non-volatile memory, such as at least one disk memory device, flash memory device, or other volatile solid state memory device.

輸入單元930可用於接收輸入的數位或字元訊息,以及產生與手機90的使用者設置以及功能控制有關的鍵信號輸入。具體地,輸入單元930可包括觸控面板931以及其他輸入裝置932。觸控面板931,也稱為觸控式螢幕,可收集使用者在其上或附近的觸摸操作(比如使用者使用手指、觸筆等任何適合的物體或附件在觸控面板931上或在觸控面板931附 近的操作),並根據預先設定的程式驅動相應的連接裝置。可選的,觸控面板931可包括觸摸檢測裝置和觸摸控制器兩個部分。其中,觸摸檢測裝置檢測使用者的觸摸方位,並檢測觸摸操作帶來的信號,將信號傳送給觸摸控制器;觸摸控制器從觸摸檢測裝置上接收觸摸訊息,並將它轉換成觸點座標,再送給處理器980,並能接收處理器980發來的命令並加以執行。此外,可以採用電阻式、電容式、紅外線以及表面聲波等多種類型實現觸控面板931。除了觸控面板931,輸入單元930還可以包括其他輸入裝置932。具體地,其他輸入裝置932可以包括但不限於物理鍵盤、功能鍵(比如音量控制按鍵、開關按鍵等)、軌跡球、滑鼠、操作杆等中的一種或多種。 The input unit 930 can be configured to receive an input digit or character message and to generate a key signal input related to user settings and function control of the handset 90. Specifically, the input unit 930 may include a touch panel 931 and other input devices 932. The touch panel 931, also referred to as a touch screen, can collect touch operations on or near the user (such as the user using a finger, a stylus, or the like on the touch panel 931 or touching Control panel 931 attached Near operation), and drive the corresponding connecting device according to a preset program. Optionally, the touch panel 931 can include two parts: a touch detection device and a touch controller. Wherein, the touch detection device detects the touch orientation of the user, detects a signal from the touch operation, and transmits a signal to the touch controller; the touch controller receives the touch message from the touch detection device and converts it into a contact coordinate, The processor 980 is again sent and can receive commands from the processor 980 and execute them. In addition, the touch panel 931 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 931, the input unit 930 may also include other input devices 932. Specifically, other input devices 932 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and the like.

顯示單元940可用於顯示由使用者輸入的訊息或提供給使用者的訊息以及手機的各種功能表。顯示單元940可包括顯示面板941,可選的,可以採用液晶顯示器(Liquid Crystal Display,LCD)、有機發光二極體(Organic Light-Emitting Diode,OLED)等形式來配置顯示面板941。進一步的,觸控面板931可覆蓋顯示面板941,當觸控面板931檢測到在其上或附近的觸摸操作後,傳送給處理器980以確定觸摸事件的類型,隨後處理器980根據觸摸事件的類型在顯示面板941上提供相應的視覺輸出。雖然在圖10中,觸控面板931與顯示面板941是作為兩個獨立的部件來實現手機的輸入和輸入功能,但是在某些實施例中,可以將觸控面板931與顯示面板941集成而實現手機的輸入和輸出功能。 The display unit 940 can be used to display a message input by the user or a message provided to the user and various function tables of the mobile phone. The display unit 940 can include a display panel 941. Alternatively, the display panel 941 can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like. Further, the touch panel 931 can cover the display panel 941. When the touch panel 931 detects a touch operation on or near the touch panel 931, the touch panel 931 transmits to the processor 980 to determine the type of the touch event, and then the processor 980 according to the touch event. The type provides a corresponding visual output on display panel 941. Although the touch panel 931 and the display panel 941 are used as two independent components to implement the input and input functions of the mobile phone in FIG. 10, in some embodiments, the touch panel 931 and the display panel 941 may be integrated. Realize the input and output functions of the phone.

手機90還可包括至少一種感測器950,比如光感測器、運動感測器以及其他感測器。具體地,光感測器可包括環境光感測器及接近感測器,其中,環境光感測器可根據環境光線的明暗來調節顯示面板941的亮度,接近感測器可在手機移動到耳邊時,關閉顯示面板941和/或背光。作為運動感測器的一種,加速計感測器可檢測各個方向上(一般為三軸)加速度的大小,靜止時可檢測出重力的大小及方向,可用於識別手機姿態的應用(比如橫豎屏切換、相關遊戲、磁力計姿態校準)、振動識別相關功 能(比如計步器、敲擊)等;至於手機還可配置的陀螺儀、氣壓計、濕度計、溫度計、紅外線感測器等其他感測器,在此不再贅述。 The handset 90 can also include at least one sensor 950, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 941 according to the brightness of the ambient light, and the proximity sensor may move to the mobile phone to When the ear is closed, the display panel 941 and/or the backlight are turned off. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is still, it can detect the magnitude and direction of gravity. It can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen). Switching, related games, magnetometer attitude calibration), vibration recognition related work Can (such as pedometer, tap), etc.; other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which can be configured on the mobile phone, will not be described here.

音訊電路960、揚聲器961,傳聲器962可提供使用者與手機之間的音訊介面。音訊電路960可將接收到的音訊資料轉換後的電信號,傳輸到揚聲器961,由揚聲器961轉換為聲音信號輸出;另一方面,傳聲器962將收集的聲音信號轉換為電信號,由音訊電路960接收後轉換為音訊資料,再將音訊資料輸出處理器980處理後,經RF電路910以發送給比如另一手機,或者將音訊資料輸出至記憶體920以便進一步處理。 The audio circuit 960, the speaker 961, and the microphone 962 can provide an audio interface between the user and the mobile phone. The audio circuit 960 can transmit the received electrical signal converted to the audio data to the speaker 961, and is converted into a sound signal output by the speaker 961. On the other hand, the microphone 962 converts the collected sound signal into an electrical signal, and the audio circuit 960 is used by the audio circuit 960. After receiving, the data is converted into audio data, and then processed by the audio data output processor 980, sent to the mobile phone 910 via the RF circuit 910, or output to the memory 920 for further processing.

WiFi屬於短距離無線傳輸技術,手機90透過WiFi模組970可以說明使用者收發電子郵件、流覽網頁和訪問流式媒體等,它為使用者提供了無線的寬頻互聯網訪問。雖然圖10示出了WiFi模組970,但是可以理解的是,其並不屬於手機90的必須構成,完全可以根據需要在不改變發明的本質的範圍內而省略。 WiFi is a short-range wireless transmission technology, and the mobile phone 90 can explain the user to send and receive emails, browse web pages, and access streaming media through the WiFi module 970, which provides wireless broadband Internet access for users. Although FIG. 10 shows the WiFi module 970, it can be understood that it does not belong to the essential configuration of the mobile phone 90, and may be omitted as needed within the scope of not changing the essence of the invention.

處理器980是手機90的控制中心,利用各種介面和線路連接整個手機的各個部分,透過運行或執行存儲在記憶體920內的軟體程式和/或模組,以及調用存儲在記憶體920內的資料,執行手機的各種功能和處理資料,從而對手機進行整體監控。可選的,處理器980可包括一個或多個處理單元;優選的,處理器980可集成應用處理器和調製解調處理器,其中,應用處理器主要處理作業系統、使用者介面和應用程式等,調製解調處理器主要處理無線通訊。可以理解的是,上述調製解調處理器也可以不集成到處理器980中。 The processor 980 is a control center of the mobile phone 90. The various parts of the entire mobile phone are connected by various interfaces and lines, by running or executing software programs and/or modules stored in the memory 920, and calling the memory 920. Data, perform various functions of the mobile phone and process data to monitor the mobile phone as a whole. Optionally, the processor 980 may include one or more processing units; preferably, the processor 980 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, the user interface, and the application. Etc. The modem processor primarily handles wireless communications. It will be appreciated that the above described modem processor may also not be integrated into the processor 980.

手機90還包括給各個部件供電的電源990(比如電池),優選的,電源可以透過電源管理系統與處理器980邏輯相連,從而透過電源管理系統實現管理充電、放電、以及功耗管理等功能。儘管未示出,手機900還可以包括攝像頭、藍牙模組等,在此不再贅述。 The handset 90 also includes a power source 990 (such as a battery) that supplies power to the various components. Preferably, the power source can be logically coupled to the processor 980 via a power management system to manage charging, discharging, and power management functions through the power management system. Although not shown, the mobile phone 900 may further include a camera, a Bluetooth module, and the like, and details are not described herein.

在本發明實施例中,該終端所包括的處理器980還具有以下 功能:根據主程式的特徵值判斷軟體的主程式是否破損,若是,則獲取預先備份的主程式以及主程式的關係訊息;透過預先備份的主程式以及主程式的關係訊息修復破損的主程式;運行修復後的主程式。進一步的,透過觸發軟體運行的操作判斷到軟體的主程式未破損,則運行軟體的主程式。 In the embodiment of the present invention, the processor 980 included in the terminal further has the following Function: judging whether the main program of the software is damaged according to the characteristic value of the main program, if yes, acquiring the pre-backed main program and the relationship information of the main program; repairing the damaged main program through the pre-backed main program and the relationship information of the main program; Run the repaired main program. Further, by triggering the operation of the software to determine that the main program of the software is not broken, the main program of the software is run.

進一步的,還包括:透過主程式的運行觸發對軟體的運行檔案進行掃描校驗,得到異常的運行檔案;修復異常的運行檔案。 Further, the method further comprises: scanning and verifying the running file of the software through the running of the main program, obtaining an abnormal running file; and repairing the abnormal running file.

進一步的,透過主程式的運行觸發對軟體的運行檔案進行掃描校驗,得到異常的運行檔案的步驟包括:獲取運行檔案所對應的特徵值和備份於本地的特徵值;判斷運行檔案所對應的特徵值與備份於本地的特徵值是否一致,若否,則定位得到異常的運行檔案。 Further, the running of the main program is triggered to scan and verify the running file of the software, and the step of obtaining the abnormal running file includes: obtaining the feature value corresponding to the running file and the feature value backed up locally; determining the corresponding file of the running file Whether the feature value is consistent with the feature value backed up locally, and if not, the abnormal operation file is located.

進一步的,修復異常的運行檔案的步驟包括:獲取異常的運行檔案所在的關係訊息;根據關係訊息查找得到本地備份的運行檔案;替換異常的運行檔案為查找得到的運行檔案。 Further, the step of repairing the abnormal running file includes: obtaining a relationship message of the abnormal running file; searching for the local backup running file according to the relationship message; and replacing the abnormal running file to find the obtained running file.

進一步的,透過觸發軟體進行運行的操作判斷軟體的主程式是否破損的步驟之前,還包括:備份安裝後得到的主程式和運行檔案,以及主程式和運行檔案所對應的特徵值和關係訊息。 Further, before the step of determining whether the main program of the software is damaged by the operation of the trigger software, the method further includes: backing up the main program and the running file obtained after the installation, and the feature value and relationship information corresponding to the main program and the running file.

雖然本發明已以較佳實施例揭露如上,然其並非用以限定本發明,任何熟習此技藝者,在不脫離本發明之精神和範圍內,當可作些許之更動與潤飾,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。 While the present invention has been described in its preferred embodiments, the present invention is not intended to limit the invention, and the present invention may be modified and modified without departing from the spirit and scope of the invention. The scope of protection is subject to the definition of the scope of the patent application.

S110、S130、S150、S170、S190‧‧‧本發明一實施例中軟體修復方法的流程步驟 S110, S130, S150, S170, S190‧‧‧ flow steps of the software repairing method in an embodiment of the present invention

Claims (13)

一種軟體修復方法,其包括:根據一軟體的一主程式的特徵值判斷該軟體的該主程式是否破損,若是,則獲取一預先備份的主程式以及該主程式的關係訊息;透過該預先備份的主程式以及該主程式的關係訊息修復該破損的主程式;以及運行該修復後的主程式。 A software repair method includes: determining whether the main program of the software is damaged according to a characteristic value of a main program of a software, and if so, acquiring a pre-backed main program and a relationship information of the main program; The main program and the relationship information of the main program fix the broken main program; and run the repaired main program. 根據申請專利範圍第1項所述之軟體修復方法,其更包括:根據該主程式的特徵值判斷到該軟體的主程式未破損,則運行該軟體的該主程式。 The software repairing method according to claim 1, further comprising: running the main program of the software, if it is determined that the main program of the software is not broken according to the characteristic value of the main program. 根據申請專利範圍第1或2項所述之軟體修復方法,其更包括:透過該主程式的運行觸發對該軟體的一運行檔案進行掃描校驗,得到一異常的運行檔案;以及修復該異常的運行檔案。 According to the software repairing method of claim 1 or 2, the method further comprises: scanning and verifying a running file of the software through the running of the main program, obtaining an abnormal running file; and repairing the abnormality Running file. 根據申請專利範圍第3項所述之軟體修復方法,其中,透過該主程式的運行觸發對該軟體的該運行檔案進行掃描校驗,得到該異常的運行檔案,包括:獲取該運行檔案所對應的特徵值和備份於本地的特徵值;以及判斷該運行檔案所對應的特徵值與備份於本地的特徵值是否一致,若否,則定位得到該異常的運行檔案。 According to the software repairing method of claim 3, the running file of the software is triggered to scan and verify the running file of the software, and the abnormal running file is obtained, including: obtaining the corresponding file of the running file The feature value and the feature value backed up locally; and determining whether the feature value corresponding to the running file is consistent with the feature value backed up locally, and if not, positioning the abnormal running file. 根據申請專利範圍第3項所述之軟體修復方法,其中,修復該異常的運行檔案,包括:獲取該異常的運行檔案所在的一關係訊息;根據該關係訊息查找得到本地備份的運行檔案;以及替換該異常的運行檔案為該查找得到的運行檔案。 According to the software repairing method of claim 3, the repairing the abnormal running file includes: obtaining a relationship message of the abnormal running file; and finding a running file of the local backup according to the relationship message; The run file that replaces the exception is the run file obtained by the lookup. 根據申請專利範圍第1項所述之軟體修復方法,其中,在根據該軟體的主程式的特徵值判斷該軟體的主程式是否破損之前,其方法更包括:備份安裝後得到的該主程式和一運行檔案,以及該主程式和該運行檔案所對應的特徵值和關係訊息。 The software repairing method according to the first aspect of the invention, wherein, before determining whether the main program of the software is damaged according to the characteristic value of the main program of the software, the method further comprises: backing up the main program obtained after installation and A running file, and the feature value and relationship information corresponding to the main program and the running file. 一種軟體修復裝置,其包括:一主程式判斷模組,用於根據一軟體的一主程式的特徵值判斷該軟體的主程式是否破損;一訊息獲取模組,若該主程式判斷模組判斷該軟體的主程式已破損,則通知該訊息獲取模組,其訊息獲取模組用於獲取一預先備份的主程式以及該主程式的關係訊息;一主程式修復模組,用於透過該預先備份的主程式以及該主程式的關係訊息修復該破損的主程式;以及一修復運行模組,用於運行該修復後的主程式。 A software repairing device includes: a main program judging module for judging whether a main program of the software is damaged according to a feature value of a main program of a software; and a message obtaining module, if the main program judging module judges The main program of the software is broken, and the message acquisition module is notified, and the message acquisition module is configured to acquire a pre-backed main program and a relationship information of the main program; a main program repair module is configured to The backed up main program and the relationship information of the main program fix the broken main program; and a repair running module for running the repaired main program. 根據申請專利範圍第7項所述之軟體修復裝置,其更包括:一主程式運行模組,用於根據該主程式的特徵值判斷到該軟體的主程式未破損,則運行該軟體的主程式。 The software repairing device according to claim 7, further comprising: a main program running module, configured to determine, according to the characteristic value of the main program, that the main program of the software is not damaged, and run the main body of the software Program. 根據申請專利範圍第7或8項所述之軟體修復裝置,其更包括:一掃描校驗模組,用於透過該主程式的運行觸發對該軟體的一運行檔案進行掃描校驗,得到一異常的運行檔案;以及一運行檔案修復模組,用於修復該異常的運行檔案。 The software repairing device of claim 7 or 8, further comprising: a scan verification module, configured to scan and scan a running file of the software through the running of the main program, to obtain a An abnormal running file; and a running file repair module for repairing the running file of the exception. 根據申請專利範圍第9項所述之軟體修復裝置,其中,該掃描校驗模組包括;一特徵獲取單元,用於獲取該運行檔案所對應的特徵值和備份於本地的特徵值;一一致性判斷單元,用於判斷該運行檔案所對應的特徵值與備份於本地的特徵值是否一致;以及一檔案定位單元,用於定位得到所述異常的運行檔案,其中,若該一致性判斷單元判斷該運行檔案所對應的特徵值與備份於本地的特徵值為不一致,則通知該檔案定位單元。 The software repairing device of claim 9, wherein the scan verification module comprises: a feature acquisition unit, configured to acquire a feature value corresponding to the operation file and a feature value backed up locally; a determination unit, configured to determine whether the feature value corresponding to the running file is consistent with the feature value backed up locally; and a file positioning unit, configured to locate the running file of the abnormality, wherein, if the consistency is determined The unit determines that the feature value corresponding to the running file is inconsistent with the feature value backed up locally, and notifies the file positioning unit. 根據申請專利範圍第9項所述的裝置,其中,該運行檔案修復模組包括:一關係訊息獲取單元,用於獲取該異常的運行檔案所在的關係訊息;一查找單元,用於根據該關係訊息查找得到本地備份的運行檔案;以及一替換單元,用於替換該異常的運行檔案為該查找得到的運行檔案。 According to the device of claim 9, wherein the running file repairing module comprises: a relational message acquiring unit, configured to acquire a relationship message of the abnormal running file; and a searching unit for using the relationship The message finds the running file of the local backup; and a replacement unit is used to replace the running file of the exception as the running file obtained by the search. 根據申請專利範圍第7項所述的裝置,其更包括:一備份模組,用於備份安裝後得到的該主程式和一運行檔案,以及該主程式和該運行檔案所對應的特徵值和關係訊息。 The device of claim 7, further comprising: a backup module, configured to back up the main program and a running file obtained after the installation, and the feature values corresponding to the main program and the running file. Relationship message. 一種電腦可讀取存儲介質,其存儲有電腦可執行之一個或複數個指令片段,使得一個或複數個處理單元執行如申請專利範圍第1至6項任一項所述之軟體修復方法。 A computer readable storage medium storing one or a plurality of instruction segments executable by a computer, such that one or more processing units perform the software restoration method according to any one of claims 1 to 6.
TW102145461A 2013-06-19 2013-12-10 Method,device and computer readable storage component for software repair TWI494755B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310244544.8A CN104239163B (en) 2013-06-19 2013-06-19 Software repair and device

Publications (2)

Publication Number Publication Date
TW201500916A true TW201500916A (en) 2015-01-01
TWI494755B TWI494755B (en) 2015-08-01

Family

ID=52103922

Family Applications (1)

Application Number Title Priority Date Filing Date
TW102145461A TWI494755B (en) 2013-06-19 2013-12-10 Method,device and computer readable storage component for software repair

Country Status (3)

Country Link
CN (1) CN104239163B (en)
TW (1) TWI494755B (en)
WO (1) WO2014201915A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105183508B (en) * 2015-08-26 2019-02-15 北京元心科技有限公司 The monitoring method and intelligent terminal of application program in containment system
CN107276789B (en) * 2017-05-19 2020-12-01 太仓鸿羽智能科技有限公司 Log uploading method and device and computer readable storage medium
CN107608707A (en) * 2017-07-31 2018-01-19 努比亚技术有限公司 Application detection method, terminal and readable storage medium storing program for executing with hot repair function
CN108509291B (en) * 2018-02-27 2019-09-10 Oppo广东移动通信有限公司 Application program is operating abnormally restorative procedure and system and mobile terminal
CN110825396B (en) * 2019-10-31 2023-07-25 Oppo(重庆)智能科技有限公司 Exception handling method and related equipment
CN111679938A (en) * 2020-06-08 2020-09-18 深圳市豪恩汽车电子装备股份有限公司 Motor vehicle software operation device and method

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6067410A (en) * 1996-02-09 2000-05-23 Symantec Corporation Emulation repair system
JP2001297021A (en) * 2000-04-12 2001-10-26 Nec Software Hokkaido Ltd Data restoring method and recording medium having program for implementing data restoring method recorded thereon
CN1197006C (en) * 2001-02-20 2005-04-13 英业达股份有限公司 Method of generating application program with self test and self repair function
CN1277211C (en) * 2003-05-06 2006-09-27 联想(北京)有限公司 Repair method for computer operation system
US8255998B2 (en) * 2005-08-16 2012-08-28 Emc Corporation Information protection method and system
TW200723018A (en) * 2005-12-14 2007-06-16 Inventec Corp Image file data pre-installation system and method
TW200725406A (en) * 2005-12-27 2007-07-01 Inventec Besta Co Ltd Booting program backup system and method thereof
CN101425028B (en) * 2007-10-31 2012-01-25 华硕电脑股份有限公司 Computer system and method for repairing firmware of the computer system
US7472420B1 (en) * 2008-04-23 2008-12-30 Kaspersky Lab, Zao Method and system for detection of previously unknown malware components
CN101950263A (en) * 2010-09-27 2011-01-19 深圳市江波龙电子有限公司 Method and system for repairing storage equipment as well as storage equipment
CN103034560B (en) * 2011-09-29 2015-11-11 腾讯科技(深圳)有限公司 A kind of method, Apparatus and system repairing application software
CN102402470A (en) * 2011-12-19 2012-04-04 青岛海信网络科技股份有限公司 Method and device for automatically correcting error of program of flash memory and repairing program of flash memory

Also Published As

Publication number Publication date
TWI494755B (en) 2015-08-01
WO2014201915A1 (en) 2014-12-24
CN104239163B (en) 2016-04-13
CN104239163A (en) 2014-12-24

Similar Documents

Publication Publication Date Title
TWI494755B (en) Method,device and computer readable storage component for software repair
US10853437B2 (en) Method and apparatus for invoking application programming interface
CN104636047B (en) The method, apparatus and touch screen terminal operated to the object in list
CN106066686B (en) A kind of information processing method and terminal device
TWI519999B (en) Method and device for optimizing operating environment of terminal
WO2018049887A1 (en) Data transmission processing method and terminal device
CN104598262A (en) Method and device for updating mobile application
CN104516812A (en) Method and device for testing software
WO2015035835A1 (en) Method and apparatus for detecting application program
WO2019076293A1 (en) Differential upgrading method, device and system
CN106658354B (en) A kind of data transmission method and equipment
WO2021098360A1 (en) Application control method, electronic device, and server
CN105610878B (en) Directory uploading method, data publishing method, terminal and server
CN106953898B (en) Method and device for acquiring software package
CN110213313B (en) File uploading method, related device and system
US20160308879A1 (en) Application-Based Service Providing Method, Apparatus, and System
US20210019401A1 (en) Method and apparatus for displaying keyboard, and terminal device
CN105278925B (en) The method and device of rubbish removing is carried out to the software of unloading
EP3129883B1 (en) Method and apparatus for repairing dynamic link library file
CN108052430B (en) Mobile terminal restart positioning method, mobile terminal and computer readable storage medium
MX2014009372A (en) Method, device and terminal for protecting application program.
CN104951324A (en) Method and device for acquiring application calling relation table
CN106933626B (en) Application association method and device
CN110225106A (en) A kind of data transmission method, device and storage medium
CN107122204B (en) Application unloading state detection method and device