Method, device and storage medium for upgrading

By detecting app upgrade anomalies on the terminal device and executing the corresponding repair process, the upgrade anomaly caused by power failure was resolved, ensuring the normal operation of the application and improving the device's processing power and user experience.

CN114741096BActive Publication Date: 2026-01-02ZHEJIANG MAOJING ARTIFICIAL INTELLIGENCE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210314880.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-28
Publication Date
2026-01-02
Estimated Expiration
2042-03-28

AI Technical Summary

Technical Problem

The terminal device experienced a power outage during the APP upgrade process, causing the upgrade to fail and the application to become unusable.

Method used

Before running the target application, determine if there were any anomalies during its most recent upgrade, obtain the status information when the application was shut down abnormally, and execute the corresponding upgrade repair process, including the installation, restoration, and update of file upgrade packages and the deletion of temporary files, to ensure the normal progress of the upgrade task.

Benefits of technology

This avoids the problem of applications becoming unusable due to upgrade anomalies, improves the device's ability to handle upgrade anomalies, reduces extra user operations, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114741096B_ABST
    Figure CN114741096B_ABST
Patent Text Reader

Abstract

The application provides an upgrading processing method, device and storage medium. For a terminal device, before running a target application, if it is determined that the target application has an abnormal shutdown in the last upgrading process, the terminal device acquires state information of the target application at the abnormal shutdown, and executes an upgrading repair process corresponding to the state information according to a preset upgrading repair process, thereby avoiding the problem that the application cannot be used due to the upgrading abnormality and improving the processing capability of the device for the upgrading abnormality. For a server, at least one processing function of the device can be automatically optimized based on user feedback information from the terminal device and a preset training algorithm, and a file upgrading package for the feedback information is generated, wherein the file upgrading package includes an upgrading file of the at least one processing function. Compared with an existing upgrading package, the specific small size advantage is that since only the upgrading file of a specific function is updated, the release cycle is greatly shortened, and the rapid repair of the device function is realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, and particularly relates to an upgrading processing method, device and storage medium. BACKGROUND

[0002] The upgrading process of a terminal device application program APP includes a downloading stage and an installation stage of an APP upgrade package. During the APP upgrading process, a user is usually prompted to "upgrade, please do not power off". If the terminal device suddenly powers off due to an unexpected situation during the APP upgrading process, the APP upgrading and use may be abnormal. Therefore, how to avoid the APP from being unable to be normally used due to the upgrading abnormality is a problem to be solved at present. SUMMARY

[0003] Embodiments of the present application provide an upgrading processing method, device and storage medium, which improve the processing capability of a device for an abnormal upgrading situation and avoid the application from being unable to be used due to the abnormal upgrading.

[0004] A first aspect of embodiments of the present application provides an upgrading processing method applied to a terminal device, and the method comprises the following steps.

[0005] Before running a target application, it is determined whether there is a closing abnormality of the target application in a last upgrading process.

[0006] If it is determined that there is the closing abnormality of the target application, state information of the target application at the abnormal closing is acquired, and the state information comprises a marked state of the target application in the upgrading process.

[0007] An upgrading repair process corresponding to the state information is executed.

[0008] In an optional embodiment of the first aspect of the present application, the marked state of the target application in the upgrading process comprises a marked state of a file upgrade package of the target application and / or a marked state of a historical file corresponding to the file upgrade package.

[0009] The file upgrade package comprises an upgrading file of at least one processing function of the target application, and the historical file is a file with the same processing function as the file upgrade package.

[0010] In an optional embodiment of the first aspect of the present application, the marked state of the file upgrade package comprises any one of the following: a downloading state; a verification state; an installation state; an information record state of completed installation; and the marked state of the historical file comprises a backup state.

[0011] In an optional embodiment of the first aspect of the present application, if the state information comprises a backup state of a historical file corresponding to a file upgrade package of the target application.

[0012] the execution of the upgrade repair process corresponding to the state information comprises:

[0013] if the history file is incomplete and the file upgrade package is complete, upgrading the target application according to the file upgrade package.

[0014] In an optional embodiment of the first aspect of the application, if the state information comprises an installation state of a file upgrade package of the target application,

[0015] the execution of the upgrade repair process corresponding to the state information comprises:

[0016] if none of the files in the file upgrade package is installed, reinstalling the target application according to the file upgrade package; or

[0017] if only part of the files in the file upgrade package is installed, the file upgrade package is incomplete and the system state is uncertain, restoring the history file corresponding to the file upgrade package.

[0018] In an optional embodiment of the first aspect of the application, if only part of the files in the file upgrade package is installed, the file upgrade package is incomplete, the system state is uncertain, and the history file is incomplete, the method further comprises:

[0019] deleting the part of the files of the file upgrade package that has been installed, and restoring an original file package corresponding to the file upgrade package based on a root file system of the terminal device, the original file package being an initial file having the same processing function as the file upgrade package.

[0020] In an optional embodiment of the first aspect of the application, if the state information comprises an information record state of a file upgrade package of the target application being installed completely, the execution of the upgrade repair process corresponding to the state information comprises:

[0021] updating file version information according to the file upgrade package;

[0022] deleting temporary files related to the current upgrade.

[0023] A second aspect of the embodiments of the application provides an upgrade processing method applied to a terminal device, the method comprising:

[0024] in response to a feedback operation of a user, obtaining feedback information, the feedback information comprising error data of at least one processing function in a target application of the terminal device;

[0025] sending the feedback information to a server;

[0026] receive a file upgrade package for the feedback information from the server, the file upgrade package including an upgrade file of at least one processing function of the target application;

[0027] upgrade the target application according to the file upgrade package.

[0028] A third aspect of the embodiments of the present application provides an upgrade processing method applied to a server, the method comprising:

[0029] receive feedback information from a terminal device, the feedback information including error data of at least one processing function of a target application of the terminal device;

[0030] optimize the at least one processing function according to a preset training algorithm and the feedback information, generate a file upgrade package for the feedback information, the file upgrade package including an upgrade file of the at least one processing function;

[0031] push the file upgrade package.

[0032] A fourth aspect of the embodiments of the present application provides an upgrade processing device, comprising:

[0033] a processing module, configured to determine whether there is an abnormal closing in a last upgrade process of a target application before running the target application;

[0034] if the processing module determines that there is an abnormal closing of the target application, an acquisition module is configured to acquire state information of the target application at the time of abnormal closing, the state information including a marked state of the target application in the upgrade process;

[0035] the processing module is further configured to execute an upgrade repair process corresponding to the state information.

[0036] A fifth aspect of the embodiments of the present application provides an upgrade processing device, comprising:

[0037] an acquisition module, configured to acquire feedback information in response to a feedback operation of a user, the feedback information including error data of at least one processing function of a target application of the terminal device;

[0038] a sending module, configured to send the feedback information to a server;

[0039] a receiving module, configured to receive a file upgrade package for the feedback information from the server, the file upgrade package including an upgrade file of at least one processing function of the target application;

[0040] an upgrade module, configured to upgrade the target application according to the file upgrade package.

[0041] The sixth aspect of the embodiment of the present application provides an upgrading processing device, comprising:

[0042] a receiving module configured to receive feedback information from a terminal device, wherein the feedback information comprises error data of at least one processing function in a target application of the terminal device;

[0043] a processing module configured to optimize the at least one processing function according to a preset training algorithm and the feedback information, and generate a file upgrade package for the feedback information, wherein the file upgrade package comprises an upgrade file of the at least one processing function;

[0044] a sending module configured to push the file upgrade package.

[0045] The seventh aspect of the embodiment of the present application provides a terminal device, comprising a memory, a processor and a computer program, wherein the computer program is stored in the memory and is configured to be executed by the processor to implement the method according to any one of the first aspect of the present application or the method according to the second aspect of the present application.

[0046] The eighth aspect of the embodiment of the present application provides a server, comprising a memory, a processor and a computer program, wherein the computer program is stored in the memory and is configured to be executed by the processor to implement the method according to the third aspect of the present application.

[0047] The ninth aspect of the embodiment of the present application provides a computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and the computer program is executed by a processor to implement the method according to any one of the first aspect of the present application or the method according to the second aspect of the present application or the method according to the third aspect of the present application.

[0048] The tenth aspect of the embodiment of the present application provides a computer program product, comprising a computer program, wherein the computer program is executed by a processor to implement the method according to any one of the first aspect of the present application or the method according to the second aspect of the present application or the method according to the third aspect of the present application.

[0049] The embodiment of the present application provides an upgrading processing method, wherein when a terminal device determines that a target application has an abnormal shutdown in a last upgrading process before running the target application, the terminal device acquires state information of the target application in the abnormal shutdown, the state information comprises a mark state of the target application in the upgrading process, and the terminal device executes an upgrading repair process corresponding to the state information according to a preset upgrading repair process. The above scheme can avoid the problem that the application cannot be used due to the upgrading abnormality, and improves the processing capability of the device for the upgrading abnormality.

[0050] The embodiment of the present application further provides an upgrading processing method, a server optimizes at least one processing function of a device based on user feedback information from a terminal device and a preset training algorithm, and generates a file upgrading package for the feedback information. The file upgrading package comprises an upgrading file of the at least one processing function, and has an obvious small size advantage compared with an existing upgrading package. Since only the upgrading file of a specific function is updated, the influence on the system is very small, only the specific function needs to be tested, the release cycle is shortened, and the rapid repair of the terminal device function is realized. BRIEF DESCRIPTION OF DRAWINGS

[0051] Figure 1 A system architecture schematic diagram of an upgrading processing method provided by the embodiment of the present application is provided.

[0052] Figure 2 A flowchart of the upgrading processing method provided by the embodiment of the present application is provided. Figure 1

[0053] A flowchart of the upgrading processing method provided by the embodiment of the present application is provided. Figure 3

[0054] A flowchart of the upgrading processing method provided by the embodiment of the present application is provided. Figure 4

[0055] A flowchart of the upgrading processing method provided by the embodiment of the present application is provided. Figure 5

[0056] A flowchart of the upgrading processing method provided by the embodiment of the present application is provided. Figure 6

[0057] A flowchart of the upgrading processing method provided by the embodiment of the present application is provided. Figure 7 Figure 2 A flowchart of the upgrading processing method provided by the embodiment of the present application is provided.

[0058] Figure 8 A flowchart of the upgrading processing method provided by the embodiment of the present application is provided. Figure 3

[0059] A structure schematic diagram of an upgrading processing device provided by the embodiment of the present application is provided. Figure 9 Figure 1 A structure schematic diagram of an upgrading processing device provided by the embodiment of the present application is provided.

[0060] Figure 10 A structure schematic diagram of an upgrading processing device provided by the embodiment of the present application is provided. Figure 2 A structure schematic diagram of an upgrading processing device provided by the embodiment of the present application is provided.

[0061] Figure 11 A structure schematic diagram of an upgrading processing device provided by the embodiment of the present application is provided. Figure 3 A structure schematic diagram of an upgrading processing device provided by the embodiment of the present application is provided.

[0062] Figure 12 ​​A hardware structure diagram of a terminal device provided for an embodiment of the present application is shown in FIG. 1.

[0063] Figure 13 A hardware structure diagram of a server provided for an embodiment of the present application is shown in FIG. 6. DETAILED DESCRIPTION

[0064] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below in connection with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.

[0065] It should be understood that the terms "include" and "have" and any variations thereof used herein are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units need not be limited to those clearly listed steps or units, but can include other steps or units not clearly listed or inherent to the process, method, product or device.

[0066] In the description of the embodiments of the present application, the term "corresponding" can represent a direct or indirect corresponding relationship between the two, can also represent an associated relationship between the two, or can be indicative of the indicated, configured and configured relationship.

[0067] First, the related solutions of the current product upgrade are briefly introduced.

[0068] First, the OTA (Over-the-Air Technology, space download technology) system upgrade. The entire system is upgraded, and the universality is strong, which is commonly used in Android, Linux, RTOS products. Since the entire system is upgraded, the upgrade is more thorough. For Linux, real-time operating system (Real Time Operating System, RTOS) products, there is no need to worry about compatibility issues. However, the upgrade package will also be very large, reaching several G. A common solution to solve the problem of too large upgrade package is to use differential package, that is, to push out an update package compared with a specific version, but the differential package also reaches hundreds of M. In addition, OTA upgrade upgrades the entire system, and needs to test the entire system before pushing, resulting in a large amount of testing work and a long release cycle.

[0069] Second, app upgrades. Commonly found in Android / some Linux products, app upgrade packages are significantly smaller than OTA system upgrades, but they have higher system requirements, making them unsuitable for RTOS. Furthermore, app upgrade solutions cannot be further refined to upgrade specific functions, and while the release cycle and testing workload are significantly less than OTA system upgrades, they are still considerable.

[0070] Third, resource upgrades. Resource upgrades are common on Linux / RTOS, used to upgrade independent resource packages such as dictionaries and speech libraries. In most cases, the upgrade unit is a single resource file. This approach is only suitable for upgrading independent resources, not for upgrading system-specific functions.

[0071] Fourth, upgrade the modified system files. Based on the resource upgrade, the system files are also extracted and upgraded separately. This approach can achieve similar functionality to the previous one, but upgrading each individual file requires extensive modifications to ensure the stability of dynamic loading of system files.

[0072] Upgrading mobile applications (APPs) for end devices typically requires consideration of user feedback. APP developers collect user feedback, and their team then fixes and updates the APP's functionality. Generally, APP feature fixes and updates require manual intervention, and the product upgrade cycle is usually quite long.

[0073] Beyond collecting feedback, rapid and seamless upgrades can enhance product competitiveness and user experience. To this end, this application provides an upgrade processing method applied to terminal devices to achieve rapid and seamless upgrades to various processing functions of the device. The main idea is as follows: The terminal device collects user feedback information and sends it to a server. The feedback information may include error data for different processing operations, allowing the server to optimize different processing functions based on a pre-trained algorithm, thereby generating a file upgrade package. Each processing function corresponds to at least one file in the file upgrade package. The terminal device completes the upgrade of various processing functions by receiving the file upgrade package from the server.

[0074] The above upgrade solution has the following advantages: the file upgrade package can update only specific functions, and its size is only a few hundred KB, which has a significant advantage in size compared to existing APP upgrade packages and OTA upgrade packages. Since only specific function files are updated, its impact is very limited, the risk is controllable, and it can be released after testing only the specific functions. The release cycle is very short, enabling rapid repair of terminal device functions.

[0075] Before introducing the upgrade processing method provided in the embodiments of this application, the system architecture of the method will be described first. Figure 1This is a schematic diagram of the system architecture for the upgrade processing method provided in an embodiment of this application. Figure 1 As shown, the system includes a terminal device 11 and a server 12. The terminal device 11 is communicatively connected to the server 12. The terminal device 11 is the terminal device belonging to the user of the application product, such as a scanning pen or a smartphone. As an example, the terminal device 11 is used to collect user feedback information regarding a certain processing function and send the feedback information to the server 12. The server 12 is used to automatically repair the processing function based on the user's feedback information and push an upgrade package to the terminal device, thereby updating the specific processing function.

[0076] Optionally, the server 12 includes a code repository 121 and a repair processing device 122, wherein the code repository 121 is used to convert user feedback information into code data related to processing functions, and the repair processing device 122 is used to repair the code data related to processing functions based on a pre-set training algorithm, thereby generating a file upgrade package.

[0077] Optionally, in some embodiments, the system further includes a terminal device 13. The terminal device 12 is the terminal device belonging to the application product developer, and the terminal device 13 is communicatively connected to the server 12. The developer accesses the server 12 through the terminal device 13, collects feedback information from different users, manually filters the user feedback information, returns valid feedback information to the server 12, and eliminates unreasonable or erroneous feedback information, which can improve the repair processing speed of the server 13.

[0078] Optionally, the terminal device 11 can be a terminal device with specific processing functions, such as a scanning pen, a screenless speaker, etc., or a smartphone, tablet computer, wearable device such as a smartwatch, smart glasses, etc. This application embodiment does not specifically limit this.

[0079] For example, taking terminal device 11 as a scanning pen, the scanning pen has translation function, OCR (Optical Character Recognition) function (or OCR text recognition function), TTS (Text To Speech) function, and speech recognition function. It should be understood that each processing function of the scanning pen corresponds to a set of processing algorithms. Users can provide feedback information to the server for different processing functions through the terminal device, so that the server can optimize and upgrade one or more processing functions in a targeted manner and generate corresponding file upgrade packages.

[0080] Based on the system architecture, the upgrading processing scheme provided by the embodiments of the present application is described in detail below through specific embodiments. It should be noted that the technical scheme provided by the embodiments of the present application can include part or all of the following contents, and the following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described in detail in some embodiments.

[0081] Figure 2 Flowchart of the upgrading processing method provided by the embodiments of the present application Figure 1 As shown in Figure 2 , the upgrading processing method provided by the embodiments includes the following steps:

[0082] Step 101, the terminal device acquires feedback information in response to the feedback operation of the user. The feedback information includes error data of at least one processing function in the target application of the terminal device.

[0083] In one possible case, the terminal device includes a display screen, such as a smart phone, a smart watch, etc., and the feedback operation of the user can be a click operation of the user on the graphical user interface of the display screen of the terminal device. In another possible case, the terminal device does not include a display screen, such as a screenless sound box, a screenless reading pen, etc., and the feedback operation of the user can be a trigger operation of the user on the physical key of the terminal device. Through any of the above feedback operations, the user's error data for at least one processing function of the target application of the terminal device is acquired.

[0084] In one optional embodiment, if the terminal device is in an offline state, i.e., the terminal device is not connected to the network, only the feedback information of the user can be collected, and when the terminal device is reconnected to the network, the feedback information of the user is packaged and uploaded to the server.

[0085] Step 102, the terminal device sends the feedback information to the server.

[0086] Step 103, the server optimizes at least one processing function in the target application of the terminal device according to the preset training algorithm and the feedback information, and generates a file upgrade package for the feedback information. The file upgrade package includes at least one upgrade file of the processing function of the target application.

[0087] For example, taking the terminal device as a reading pen, the feedback information of the user includes error data for the translation function, and the server repairs the translation function based on the error data of the translation function through the preset translation algorithm in the server, acquires an upgrade file for the translation function, and the size of the upgrade file is very small, which can realize the rapid repair of the translation function.

[0088] Optionally, in some embodiments, the server collects feedback information from different terminal devices, and optimizes the function according to the error data of the same processing function fed back by different users, to obtain an upgrade file for the processing function by using a training algorithm preset in the server. The upgrade file for a processing function includes at least one file.

[0089] In step 104, the server sends a file upgrade package for the feedback information to the terminal device.

[0090] As an example, after the server obtains the upgrade files for all the processing functions to be updated in the feedback information, the server sends a total file upgrade package for the feedback information to the terminal device.

[0091] As an example, after the server obtains an upgrade file for a processing function, the server sends the upgrade file for the processing function to the terminal device. This example can avoid the problem of repair delay caused by repair of an abnormal processing function.

[0092] It should be noted that the file upgrade package is an upgrade in units of processing functions, which can achieve a smaller and faster upgrade effect than OTA system upgrade and APP upgrade, and can also be compatible with RTOS and all Linux platforms. The processing function is usually a collection of several files, and only specific files need to be updated at a time.

[0093] In step 105, the terminal device upgrades the target application according to the file upgrade package.

[0094] In the embodiments of the present application, the terminal device upgrades the upgrade file of at least one processing function of the target application according to the file upgrade package.

[0095] Optionally, in order to avoid the problem of inconsistency between memory and flash caused by runtime upgrade, the upgrade task needs to be executed before the target application is run. The upgrade process can be divided into two stages:

[0096] 1. Download stage: When there is a network, the terminal device obtains the file upgrade package from the server.

[0097] 2. Installation stage: When the target application is restarted, the file upgrade package is installed.

[0098] The upgrading processing method provided in the embodiments of the present application comprises the following steps: a terminal device acquires feedback information in response to a feedback operation of a user, the feedback information comprising error data of at least one processing function in a target application of the terminal device, and the terminal device uploads the feedback information to a server. The server optimizes the at least one processing function according to the feedback information of the user and a preset training algorithm, generates a file upgrading package for the feedback information, and pushes the file upgrading package to the terminal device. The file upgrading package comprises an upgrading file of the at least one processing function, and has a small size advantage compared with an existing upgrading package. Since only the upgrading file of the specific function is updated, the influence on the system is small, and only the specific function needs to be tested to be released, thereby shortening the release cycle and realizing the rapid repair of the terminal device function.

[0099] It should be noted that the file upgrading package and the OTA upgrading package of the above embodiments exist simultaneously, the file upgrading package is used for upgrading the processing function of the device, the OTA upgrading package is used for overall upgrading of the device system, and the sizes of the upgrading packages are different. Both the two kinds of upgrading need operating system files, and simultaneous upgrading will cause upgrading conflict. In order to realize the compatibility of the file upgrading package and the OTA system upgrading, the upgrading repair of the file upgrading package can be used as a supplement of the OTA system upgrading, and the specific processing function is rapidly iterated before the next OTA upgrading. Figure 3 The schematic diagram of the upgrading package iteration provided in the embodiments of the present application is shown in FIG. 1. Figure 3 As shown in FIG. 1, after the system upgrading of OTA v1.0 is completed, the specific processing function of the device can be rapidly repaired through the file upgrading package, such as the file upgrading package "file v1.1, …, file v1.x" in FIG. 1, and then the system upgrading of OTA v2.0 is performed. Figure 3

[0100] The repair based on the file upgrading package can be regarded as a supplement of the OTA system upgrading, and when the upgrading of the system file is involved, the compatible OTA system version needs to be specified. In this regard, the server needs to match the system version to determine whether to push the upgrading package. Figure 4 The flowchart of the server pushing the upgrading package provided in the embodiments of the present application is shown in FIG. 2. Figure 4 As shown in FIG. 2, after the server acquires the upgrading package, it first determines whether the device system version matches the upgrading package version, and if it is determined that the device system version matches the upgrading package version, it further determines whether the upgrading package version is greater than the current file version of the device, and if it is determined that the upgrading package version is greater than the current file version of the device, it is determined to push the upgrading package. The upgrading package in the embodiments of the present application can be the file upgrading package.

[0101] Based on the embodiments shown in FIG. 1, the following describes the downloading process of the file upgrading package. Figure 2 The flowchart of the device downloading the file upgrading package provided in the embodiments of the present application is shown in FIG. 3. Figure 5 The flowchart of the device downloading the file upgrading package provided in the embodiments of the present application is shown in FIG. 3.​Figure 5 As shown in the file upgrade package download process, the following steps are included:

[0102] Step 1, the server queries the file upgrade package, and pushes the file upgrade package to the terminal device according to the configuration rule. The configuration rule can refer to Figure 4 Embodiments.

[0103] Step 2, the terminal device downloads the file upgrade package.

[0104] The file upgrade package download supports breakpoint continuation.

[0105] Step 3, the terminal device checks the MD5 of the file upgrade package. The MD5 of the file upgrade package is checked to ensure the integrity of the downloaded file upgrade package. MD5 is an information digest algorithm.

[0106] Step 4, the terminal device decompresses the file upgrade package, and checks the signature, size, and MD5 of each file to be installed.

[0107] Step 5, the terminal device creates a mark state of the completion of the file upgrade package download.

[0108] That is, the state information of the file upgrade package is created, and the current state of the file upgrade package is updated when the download is completed. Usually, the upgrade is completed when the device is restarted next time or when an application of the device is restarted.

[0109] It should be noted that if any of the above steps is abnormal, the file upgrade package download of this time will fail, and the file upgrade package download needs to be performed again, so as to avoid using illegal and incomplete file upgrade packages.

[0110] Based on Figure 2 the embodiments shown, the installation (upgrade) process of the file upgrade package is described below. Figure 6 The flowchart of the device installation file upgrade package provided by the embodiments of the present application is shown in FIG. 1. As shown in Figure 6 in the device startup stage, the installation and upgrade of the file upgrade package are performed before the application runs, mainly including the following steps:

[0111] Step 1, the terminal device checks the legality and integrity of the file upgrade package.

[0112] Specifically, the terminal device checks the system version to which the file upgrade package is applicable, the signature, size, and MD5 of each file, to avoid incomplete or damaged file upgrade packages due to abnormal restart.

[0113] Step 2, the terminal device backs up the historical files.

[0114] The history file is also referred to as an old file or a file to be replaced. The terminal device copies the history file to the backup directory one by one, and prevents the original file from being restored due to installation abnormity.

[0115] Step 3, the terminal device installs the new file in the file upgrade package.

[0116] The file upgrade package includes a plurality of new files. The terminal device renames each new file in the file upgrade package one by one, and covers the corresponding history file, so as to realize installation. If the installation is abnormal, the corresponding history file can be restored.

[0117] Step 4, the terminal device updates the file version record.

[0118] Step 5, the terminal device deletes the temporary file.

[0119] The temporary file includes a state marker file, a backup file and a downloaded installation file.

[0120] The state marker file corresponds to state information, and the state information records the marker state of the application in the entire upgrade process. In general, the marker state in the state marker file is updated in real time. For example, the marker state is a verification state when a certain upgrade file package is completed. When the verification of the upgrade file package is completed, the marker state is updated to an installation state. The backup file includes the history file corresponding to the file upgrade package. The downloaded installation file is the file upgrade package.

[0121] The following will be described in combination with a specific example. The following example relates to the interaction of a first terminal device, a second terminal device and a server. The first terminal device is a product terminal to be upgraded, such as a scanning pen. The second terminal device is a test terminal of a developer, such as a notebook computer. The file upgrade package is used to repair the translation function of the scanning pen.

[0122] Figure 7 Flowchart of the upgrade processing method provided by the embodiment of the application Figure 2 As shown in FIG. 8, the upgrade processing method of the embodiment includes the following steps: Figure 7

[0123] Step 201, the first terminal device sends the user feedback translation error to the server.

[0124] Step 202, the second terminal device acquires the user feedback translation error from the server.

[0125] Step 203, the second terminal device sends the valid translation error to the server.

[0126] ​In the above steps, the user feeds back the translation error to the server through the first terminal device, the developer accesses the server through the second terminal device, obtains and screens the effective translation error, and uploads the effective translation error through the second terminal device.

[0127] In step 204, the second terminal device triggers the packaging file upgrade package to the server.

[0128] In step 205, the repair processing device of the server obtains the translation error to be repaired from the code repository.

[0129] In step 206, the repair processing device of the server repairs the translation error by using the translation algorithm.

[0130] In step 207, the repair processing device of the server creates a file upgrade package.

[0131] In step 208, the server creates an upgrade order based on the file upgrade package.

[0132] In step 209, the server sends prompt information to the second terminal device, and the prompt information is used to prompt that the file upgrade package is built.

[0133] In step 210, the second terminal device sends upgrade order supplement information to the server to push the upgrade. The upgrade order supplement information includes upgrade content description, system version range, etc.

[0134] In step 211, the server pushes the file upgrade package to the first terminal device (silent upgrade).

[0135] In the above upgrade processing scheme, the server is preinstalled with a translation algorithm repair tool, which can realize self-repair of the translation algorithm within 1 hour. The developer can operate on the server platform to realize user-unaware upgrade. The processing action of the developer can be standardized to be automatically executed by the server, thereby improving the function of the scanning pen based on user feedback, enhancing the product competitiveness, and improving the user experience.

[0136] When performing the upgrade task, the terminal device needs to be kept powered on. If the device suddenly powers off due to an unexpected situation, it may cause upgrade and use abnormalities.

[0137] To solve the above problems, the embodiment of the application further provides an upgrade processing method to cope with upgrade abnormalities caused by power failure. The main invention idea is as follows: before restarting the device to run the device application, if it is determined that there is a shutdown abnormality, the state information of the device at the time of the abnormal shutdown can be read. If the state information records that the device is in a certain state of the upgrade process, a preset processing flow corresponding to the state can be executed to ensure that the device continues to perform the upgrade task or recovers to the state before the upgrade.

[0138] The upgrading processing scheme has the following beneficial effects: the application cannot be used due to the upgrading exception can be avoided, the processing capability of the device for the upgrading exception condition is improved, and the user's additional operation is reduced, i.e., the user does not need to manually repair when restarting the application, and the user's experience is improved.

[0139] The processing procedure of the upgrading exception is described in detail below through a specific embodiment.

[0140] Figure 8 The flowchart of the upgrading processing method provided by the embodiment of the application Figure 3 . As shown in Figure 8 , the upgrading processing method provided by the embodiment includes the following steps:

[0141] In step 301, the terminal device determines whether the target application has a closing exception in the last upgrading process before running the target application.

[0142] In step 302, if the terminal device determines that the target application has a closing exception, the state information of the target application at the time of the abnormal closing is acquired, and the state information includes the marking state of the target application in the upgrading process.

[0143] In the embodiment of the application, the target application abnormal closing can have the following conditions: the device battery is exhausted, the device application has a bug, the device operating system has a bug, etc. If any of the above conditions exists, the target application of the device will be abnormally closed. Before the abnormal closing, the target application of the device is executing the upgrading task, and the state information of the target application at the time of the abnormal closing can be acquired by querying the state marking file.

[0144] Optionally, the marking state of the target application in the upgrading process includes the marking state of the file upgrading package of the target application, and / or the marking state of the historical file corresponding to the file upgrading package. The file upgrading package includes at least one upgrading file of the processing function of the target application, and the historical file is the file with the same processing function as the file upgrading package.

[0145] The marking state of the file upgrading package includes any of the following: a downloading state; a checking state; an installing state; and an information recording state after installation.

[0146] It should be noted that the marking state in the downloading state indicates that the file upgrading package is being downloaded; the marking state in the checking state indicates that the file upgrading package has been downloaded and is being checked; the marking state in the installing state indicates that the file upgrading package has been checked and is being installed; and the marking state in the information recording state after installation indicates that the file upgrading package has been installed and is recording information. The marking state is dynamically updated, for example, after the file upgrading package is checked, the marking state is updated from the checking state to the installing state.

[0147] The mark state of the historical file corresponding to the file upgrade package includes a backup state. The backup state indicates that the historical file is being backed up.

[0148] It should be understood that the exception occurs in different states, and the corresponding upgrade repair process is different.

[0149] In step 303, the terminal device executes the upgrade repair process corresponding to the state information.

[0150] In an optional embodiment of the present embodiment, if the state information includes the backup state of the historical file corresponding to the file upgrade package of the target application, the terminal device executes the upgrade repair process corresponding to the state information, including: if the historical file is incomplete and the file upgrade package is complete, the terminal device upgrades the target application according to the file upgrade package.

[0151] The present embodiment shows the processing flow of the abnormal closing in the historical file backup process. The historical file corresponding to the file upgrade package is being backed up but has not been backed up completely. As long as the file upgrade package is complete, the application can be directly upgraded according to the file upgrade package.

[0152] In an optional embodiment of the present embodiment, if the state information includes the installation state of the file upgrade package of the target application, the terminal device executes the upgrade repair process corresponding to the state information, including:

[0153] In a possible case, if none of the files in the file upgrade package is installed completely, the terminal device re-installs the target application according to the file upgrade package.

[0154] The file upgrade package usually includes multiple files, and each file needs to be installed one by one. If the device is abnormally closed when installing the first file, since the file upgrade package has completed the verification and enters the installation stage, after the device is restarted, the installation process can be directly executed again according to the file upgrade package.

[0155] In a possible case, if only the installation of part of the files in the file upgrade package is completed, the file upgrade package is incomplete, and the system state is uncertain, the terminal device restores the historical file corresponding to the file upgrade package.

[0156] If the device is abnormally closed after installing part of the multiple files, since the installation is implemented in the form of renaming, at this time, the file upgrade package has already been incomplete. Therefore, when it is determined that the file upgrade package is incomplete, if the historical file corresponding to the file upgrade package, i.e., the backup file, is complete, the historical file corresponding to the file upgrade package can be restored, thereby avoiding the problem that the application cannot be used due to the installation exception.

[0157] The second case has the following special case: if only part of the files in the file upgrade package is installed, the file upgrade package is incomplete, the system state is uncertain, and the historical files are incomplete, the terminal device can perform the following steps: delete the part of the file upgrade package that has been installed, and restore the original file package corresponding to the file upgrade package based on the root file system of the terminal device.

[0158] The original file package is an initial file with the same processing function as the file upgrade package.

[0159] The special case shows the remedial measures when the historical files are damaged or incomplete due to abnormal closing when the device determines that the historical files corresponding to the file upgrade package need to be restored, ensuring that the device application can be normally started and used.

[0160] The embodiment shows several preset processing methods for abnormal closing during the file upgrade package installation process, ensuring that the device application can be automatically upgraded after restarting, or at least ensuring that it can be normally used.

[0161] In an optional embodiment of the embodiment, if the state information includes the information record state of the file upgrade package installation of the target application being completed, the terminal device performs the upgrade repair process corresponding to the state information, including: updating the file version information according to the file upgrade package, and deleting the temporary files related to this upgrade.

[0162] The embodiment shows the processing flow for abnormal closing during the file version record process. Since the file upgrade package has been installed, only the file version information record is incomplete, so the file version information can be recorded again according to the file upgrade package, and finally the space occupied by the temporary files is released.

[0163] In an optional embodiment of the embodiment, if the state information includes the download state of the file upgrade package of the target application, the terminal device initiates a request to the server again to obtain the file upgrade package. The terminal device supports breakpoint resume.

[0164] In an optional embodiment of the embodiment, if the state information includes the verification state of the file upgrade package of the target application, the terminal device performs the upgrade repair process corresponding to the state information, including: the terminal device re-executes the verification task of the file upgrade package.

[0165] It should be understood that if the verification is successful, the terminal device performs the installation task of the file upgrade package. If the verification fails, the terminal device initiates a request to the server again to obtain the file upgrade package, and re-executes the download task of the file upgrade package.

[0166] The upgrade processing method provided in the embodiments of the present application can avoid the problem that the application cannot be used due to upgrade abnormality, and improve the processing capability of the device for the upgrade abnormality. Meanwhile, the additional operation of the user is reduced, and the use experience of the user is improved.

[0167] It should be noted that the upgrade processing scheme provided in the embodiments of the present application supports not only the file upgrade of the writable partition, but also the upgrade of the read-only root file system.

[0168] In the embedded Linux system, in order to ensure the power-off safety, it is generally required that the root file system is read-only. At this time, the traditional file modification method cannot be implemented. The conventional method is to place the file to be upgraded into the writable partition, and to be dynamically loaded at runtime. However, each file to be dynamically loaded needs to be matched with a large number of compatible and stable logic, which undoubtedly increases the upgrade risk and upgrade threshold.

[0169] In order to solve this problem, the overlayfs file system supported by Linux is used to implement the superimposed display of multiple file systems. The bottom layer is the read-only root file system, and the upper layer is the writable file system. The file upgrade package is installed into the upper layer writable file system, and after the overlayfs superimposed display, the updated state can be presented, so as to implement the upgrade.

[0170] The upgrade processing scheme based on the above-mentioned embodiments can implement the upgrade of the specific function of the root file system. Compared with the function upgrade of the read-only root file system by modification, the complex code logic added for dynamic loading of the system file can be avoided.

[0171] The upgrade processing method provided in the embodiments of the present application is described above, and the upgrade processing device provided in the embodiments of the present application will be described below.

[0172] The embodiments of the present application can divide the upgrade processing device into functional modules according to the above-mentioned method embodiments. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The integrated module can be implemented in the form of hardware or in the form of a software functional module. It should be noted that the division of the modules in the embodiments of the present application is illustrative, and is only a logical function division. When actually implemented, another division mode can be used. The following will be described by taking the division of each functional module corresponding to each function as an example.

[0173] Figure 9Structure diagram of the upgrading processing device provided in the embodiment of the present application Figure 1 As shown in Figure 9 the embodiment, the upgrading processing device 400 provided in the embodiment includes an acquisition module 401, a sending module 402, a receiving module 403, and an upgrading module 404.

[0174] The acquisition module 401 is configured to acquire feedback information in response to a feedback operation of a user, the feedback information including error data of at least one processing function in a target application of the terminal device.

[0175] The sending module 402 is configured to send the feedback information to a server.

[0176] The receiving module 403 is configured to receive a file upgrade package for the feedback information from the server, the file upgrade package including an upgrade file of the at least one processing function in the target application.

[0177] The upgrading module 404 is configured to upgrade the target application according to the file upgrade package.

[0178] The upgrading processing device provided in the embodiment can perform Figure 2 the technical solution of the terminal device in the embodiment, and has similar implementation principles and technical effects, which will not be described herein.

[0179] Figure 10 Structure diagram of the upgrading processing device provided in the embodiment of the present application Figure 2 As shown in Figure 10 the embodiment, the upgrading processing device 500 provided in the embodiment includes a receiving module 501, a processing module 502, and a sending module 503.

[0180] The receiving module 501 is configured to receive feedback information from a terminal device, the feedback information including error data of at least one processing function in a target application of the terminal device.

[0181] The processing module 502 is configured to optimize the at least one processing function according to a preset training algorithm and the feedback information, and generate a file upgrade package for the feedback information, the file upgrade package including an upgrade file of the at least one processing function.

[0182] The sending module 503 is configured to push the file upgrade package.

[0183] The upgrading processing device provided in the embodiment can perform Figure 2 the technical solution of the server in the embodiment, and has similar implementation principles and technical effects, which will not be described herein.

[0184] Figure 11Structural schematic of an upgrading processing apparatus provided by an embodiment of the present application Figure 3 As shown in Figure 11 The upgrading processing apparatus 600 provided by the embodiment includes a processing module 601 and an acquisition module 602.

[0185] The processing module 601 is configured to determine, before running a target application, whether the target application has an abnormal closing during a last upgrading process.

[0186] If the processing module 601 determines that the target application has an abnormal closing, the acquisition module 602 is configured to acquire state information of the target application during the abnormal closing, the state information including a marked state of the target application during the upgrading process.

[0187] The processing module 601 is further configured to execute an upgrading repair process corresponding to the state information.

[0188] Optionally, the marked state of the target application during the upgrading process includes:

[0189] a marked state of a file upgrading package of the target application, and / or a marked state of a historical file corresponding to the file upgrading package.

[0190] The file upgrading package includes an upgrading file of at least one processing function of the target application, and the historical file is a file with the same processing function as that of the file upgrading package.

[0191] Optionally, the marked state of the file upgrading package includes any one of the following: a downloading state; a checking state; an installing state; and an information recording state of completed installation.

[0192] The marked state of the historical file includes a backup state.

[0193] In an optional embodiment of the present embodiment, if the state information includes a backup state of a historical file corresponding to a file upgrading package of the target application, the processing module 601 is configured to:

[0194] If the historical file is incomplete and the file upgrading package is complete, the target application is upgraded according to the file upgrading package.

[0195] In an optional embodiment of the present embodiment, if the state information includes an installing state of a file upgrading package of the target application, the processing module 601 is configured to:

[0196] If none of the files in the file upgrading package is installed, the target application is re-installed according to the file upgrading package; or

[0197] If only part of the files in the file upgrade package is installed, the file upgrade package is incomplete, the system state is uncertain, and the historical files corresponding to the file upgrade package are incomplete, the processing module 601 is configured to:

[0198] In an optional embodiment of the present embodiment, if only part of the files in the file upgrade package is installed, the file upgrade package is incomplete, the system state is uncertain, and the historical files are incomplete, the processing module 601 is configured to:

[0199] delete the part of the files in the file upgrade package that has been installed, and restore the original file package corresponding to the file upgrade package based on the root file system of the terminal device, the original file package being an initial file having the same processing function as the file upgrade package.

[0200] In an optional embodiment of the present embodiment, if the state information includes information record state of the file upgrade package of the target application being installed completely, the processing module 601 is configured to:

[0201] update file version information according to the file upgrade package;

[0202] delete temporary files related to the current upgrade.

[0203] The upgrade processing apparatus provided by the present embodiment can perform Figure 8 The technical solutions of the terminal device in the illustrated embodiments are similar in principle and effects, and thus will not be described herein.

[0204] Figure 12 A hardware structure diagram of the terminal device provided by the present embodiment is shown in FIG. 7. Figure 12 The terminal device 700 provided by the present embodiment includes:

[0205] The memory 701, the processor 702, and the computer program; the computer program is stored in the memory 701 and configured to be executed by the processor 702 to implement the technical solutions of the terminal device in any of the above method embodiments, which are similar in principle and effects, and thus will not be described herein.

[0206] Optionally, the memory 701 can be independent or integrated with the processor 702. When the memory 701 is independent of the processor 702, the terminal device 700 further includes a bus 703 for connecting the memory 701 and the processor 702.

[0207] The present embodiment provides a computer readable storage medium having a computer program stored thereon, and the computer program is executed by the processor 702 to implement the technical solutions of the terminal device in any of the above method embodiments.

[0208] The embodiment of the present application provides a computer program product, comprising a computer program, which realizes the technical scheme of the terminal device in any preceding method embodiment when executed by a processor.

[0209] The embodiment of the present application provides a chip, comprising: a processing module and a communication interface, the processing module can execute the technical scheme of the terminal device in any preceding method embodiment.

[0210] Optionally, the chip further comprises a storage module (such as a memory), the storage module is used for storing instructions, the processing module is used for executing the instructions stored in the storage module, and the execution of the instructions stored in the storage module causes the processing module to execute the technical scheme of the terminal device in any preceding method embodiment.

[0211] Figure 13 The hardware structure diagram of the server provided by the embodiment of the present application is shown in the figure. Figure 13 As shown in the figure, the server 800 provided by the embodiment of the present application comprises:

[0212] a memory 801, a processor 802 and a computer program; wherein the computer program is stored in the memory 801 and is configured to be executed by the processor 802 to realize the technical scheme of the server in any preceding method embodiment, the implementation principle and technical effect are similar, and details are not repeated here.

[0213] Optionally, the memory 801 can be independent or integrated with the processor 802. When the memory 801 is a device independent of the processor 802, the server 800 further comprises a bus 803 for connecting the memory 801 and the processor 802.

[0214] The embodiment of the present application provides a computer readable storage medium, which stores a computer program, the computer program is executed by the processor 802 to realize the technical scheme of the server in any preceding method embodiment.

[0215] The embodiment of the present application provides a computer program product, comprising a computer program, which realizes the technical scheme of the server in any preceding method embodiment when executed by a processor.

[0216] The embodiment of the present application provides a chip, comprising: a processing module and a communication interface, the processing module can execute the technical scheme of the server in any preceding method embodiment.

[0217] Optionally, the chip further comprises a storage module (such as a memory), the storage module is used for storing instructions, the processing module is used for executing the instructions stored in the storage module, and the execution of the instructions stored in the storage module causes the processing module to execute the technical scheme of the server in any preceding method embodiment.

[0218] It should be understood that the above-mentioned processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the application can be directly embodied as hardware processor execution or executed by a combination of hardware and software modules in the processor.

[0219] The memory can include a high-speed RAM memory, and can also include a non-volatile storage NVM, such as at least one disk memory, and can also be a U disk, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.

[0220] The bus can be an industry standard architecture (ISA) bus, a peripheral component (PCI) bus, or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, the bus in the drawings of the present application does not limit only one bus or one type of bus.

[0221] The above-mentioned storage medium can be realized by any type of volatile or non-volatile storage device or their combination, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0222] An exemplary storage medium is coupled to the processor, so that the processor can read information from the storage medium and can write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in the electronic device.

[0223] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit the present application; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can still be modified, or some or all of the technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. An upgrade processing method characterized by, The method is applied to a terminal device and comprises the following steps: Before running a target application, it is determined whether there is an abnormal closing in a last upgrade process of the target application; If it is determined that there is an abnormal closing of the target application, state information of the target application at the time of abnormal closing is acquired, the state information comprising a marked state of the target application in the upgrade process; An upgrade repair process corresponding to the state information is executed; The marked state of the target application in the upgrade process comprises a marked state of a file upgrade package of the target application and / or a marked state of a historical file corresponding to the file upgrade package; The file upgrade package comprises at least one upgrade file of a processing function of the target application generated based on feedback information of a user, the feedback information comprising error data of at least one processing function of the target application of the terminal device, and the historical file is a file with the same processing function as the file upgrade package; If the state information comprises an installation state of the file upgrade package of the target application; The execution of the upgrade repair process corresponding to the state information comprises: If none of the files in the file upgrade package is installed, the target application is reinstalled according to the file upgrade package; or If only part of the files in the file upgrade package is installed, the file upgrade package is incomplete, the system state is uncertain, and the historical file corresponding to the file upgrade package is restored; If only part of the files in the file upgrade package is installed, the file upgrade package is incomplete, the system state is uncertain, and the historical file is incomplete, the method further comprises the following steps: The part of the files of the file upgrade package that has been installed is deleted, and an original file package corresponding to the file upgrade package is restored based on a root file system of the terminal device, the original file package being an initial file with the same processing function as the file upgrade package.

2. The method of claim 1, wherein: The marked state of the file upgrade package comprises any one of the following: a download state, a check state, an installation state, and an information record state of installation completion; The marked state of the historical file comprises a backup state.

3. The method according to claim 1 or 2, characterized in that, If the state information comprises a backup state of the historical file corresponding to the file upgrade package of the target application; The execution of the upgrade repair process corresponding to the state information comprises: If the historical file is incomplete and the file upgrade package is complete, the target application is upgraded according to the file upgrade package.

4. The method according to claim 1 or 2, characterized in that, If the state information comprises an information record state of installation completion of the file upgrade package of the target application, the execution of the upgrade repair process corresponding to the state information comprises: File version information is updated according to the file upgrade package; Temporary files related to the current upgrade are deleted.

5. An upgrade processing method characterized by, The method is applied to a terminal device and comprises the following steps: In response to a feedback operation of a user, feedback information is acquired, the feedback information comprising error data of at least one processing function of a target application of the terminal device; The feedback information is sent to a server. receiving a file upgrade package for the feedback information from the server, the file upgrade package including an upgrade file of at least one processing function of the target application; upgrading the target application according to the file upgrade package; wherein, if the feedback information includes an installation state of the file upgrade package of the target application, the upgrading the target application according to the file upgrade package includes: if none of the files in the file upgrade package is installed, reinstalling the target application according to the file upgrade package; or if only part of the files in the file upgrade package is installed, the file upgrade package is incomplete, the system state is uncertain, and the historical file corresponding to the file upgrade package is restored; if only part of the files in the file upgrade package is installed, the file upgrade package is incomplete, the system state is uncertain, and the historical file is incomplete, the method further includes: deleting the part of the installed file upgrade package, and restoring an original file package corresponding to the file upgrade package based on a root file system of the terminal device, the original file package being an initial file with the same processing function as the file upgrade package.

6. An upgrade processing method characterized by comprising: application to a server, the method including: receiving feedback information from a terminal device, the feedback information including error data of at least one processing function of a target application of the terminal device; optimizing the at least one processing function according to a preset training algorithm and the feedback information, generating a file upgrade package for the feedback information, the file upgrade package including an upgrade file of the at least one processing function; if it is determined that a system version of the terminal device matches a version of the file upgrade package, and the version of the file upgrade package is greater than a current file version of the terminal device, pushing the file upgrade package; wherein, if the feedback information includes an installation state of the file upgrade package of the target application, the upgrading the target application according to the file upgrade package includes: if none of the files in the file upgrade package is installed, reinstalling the target application according to the file upgrade package; or if only part of the files in the file upgrade package is installed, the file upgrade package is incomplete, the system state is uncertain, and the historical file corresponding to the file upgrade package is restored; if only part of the files in the file upgrade package is installed, the file upgrade package is incomplete, the system state is uncertain, and the historical file is incomplete, the method further includes: deleting the part of the installed file upgrade package, and restoring an original file package corresponding to the file upgrade package based on a root file system of the terminal device, the original file package being an initial file with the same processing function as the file upgrade package.

7. A terminal device, characterized by, including: a memory, a processor, and a computer program; the computer program is stored in the memory and is configured to be executed by the processor to implement the method of any one of claims 1-5.

8. A server, characterized by including: a memory, a processor, and a computer program; the computer program is stored in the memory and is configured to be executed by the processor to implement the method of claim 6.

9. A computer readable storage medium having stored thereon a computer program, the computer program being executable by a processor to implement the method of any one of claims 1-5, or the method of claim 6.

10. A computer program product, characterised in that, The computer program product comprises a computer program which, when executed by a processor, implements the method of any one of claims 1-5, or the method of claim 6.

Citation Information

Patent Citations

  • Device and method for upgrading network management software

    CN101616018A

  • Automatic upgrading method and device for software and mobile terminal

    CN104239098A