CN107239295B - Software upgrading method and software upgrading device - Google Patents

Software upgrading method and software upgrading device Download PDF

Info

Publication number
CN107239295B
CN107239295B CN201610185913.4A CN201610185913A CN107239295B CN 107239295 B CN107239295 B CN 107239295B CN 201610185913 A CN201610185913 A CN 201610185913A CN 107239295 B CN107239295 B CN 107239295B
Authority
CN
China
Prior art keywords
executable program
software
target software
subdirectory
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610185913.4A
Other languages
Chinese (zh)
Other versions
CN107239295A (en
Inventor
尚子峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology 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 Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201610185913.4A priority Critical patent/CN107239295B/en
Publication of CN107239295A publication Critical patent/CN107239295A/en
Application granted granted Critical
Publication of CN107239295B publication Critical patent/CN107239295B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Abstract

The embodiment of the invention discloses a method for upgrading software, which comprises the following steps: acquiring a data packet to be installed of target software; when the target software is in a running state, installing a data package to be installed in an installation catalog of the target software, and generating a first executable program corresponding to the data package to be installed; modifying the attribute of the second executable program under the installation directory to obtain a target file, wherein the target file is a non-executable program; after the target software is closed, receiving a starting instruction of the target software; and starting the first executable program according to the starting instruction. The embodiment of the invention also provides a software upgrading device. The embodiment of the invention can continue to perform the task in the original process and perform the software upgrading and installation in the background under the condition that the user does not sense the task, and after the upgrading is successful, the upgraded first executable program can be directly executed when the system is restarted, so that the target software upgrading is completed, the user experience is improved, and the installation process is more flexible.

Description

Software upgrading method and software upgrading device
Technical Field
The present invention relates to the field of software management technologies, and in particular, to a software installation method and a software upgrading apparatus.
Background
With the rapid development of computer technology and network technology, the internet technology plays an increasingly important role in people's daily life, study and work. The endless variety of software layers on networks has also indirectly prompted the need for software management. The management software is a tool integrating software downloading and software management, and the functions of the management software are mainly divided into four parts of software detection, downloading, installation and unloading.
In the prior art, when software needs to be upgraded, the software process needs to be exited first, and then the installation package needs to be operated, or the installation package needs to be automatically operated after the software process exits, or the software process needs to be updated before the software process is started, and the software process cannot be started in the updating process.
However, because the software process and the installation process in the prior art are mutually exclusive, the two processes cannot exist simultaneously. When a task is not completed in a software process used by a user, once the software has an upgrading requirement, the user needs to quit the software process which has not completed the task, and then the incomplete task is continued after the upgrading is successful, so that the time for completing the task is delayed, and meanwhile, the quality of completing the task can be influenced, and the user experience is not facilitated.
Disclosure of Invention
The embodiment of the invention provides a software upgrading method and a software upgrading device, which can finish the upgrading of target software under the condition that a user does not sense, improve the user experience and enable the installation process to be more flexible.
In view of the above, a first aspect of the present invention provides a method for upgrading software, including:
acquiring a data packet to be installed of target software;
when the target software is in a running state, installing the data package to be installed in an installation directory of the target software, and generating a first executable program corresponding to the data package to be installed;
modifying the attribute of the second executable program under the installation directory to obtain a target file, wherein the target file is a non-executable program;
after the target software is closed, receiving a starting instruction of the target software;
and starting the first executable program according to the starting instruction.
In a second aspect, an embodiment of the present invention further provides a software upgrading apparatus, including:
the acquisition module is used for acquiring a data packet to be installed of the target software;
the installation module is used for installing the data packet to be installed acquired by the acquisition module under the installation directory of the target software when the target software is in the running state, and generating a first executable program corresponding to the data packet to be installed;
the modification module is used for modifying the attribute of the second executable program under the installation directory and obtaining a target file, wherein the target file is a non-executable program;
the receiving module is used for receiving a starting instruction of the target software after the target software is closed;
the starting module is used for starting the first executable program installed by the installation module according to the starting instruction received by the receiving module.
In a third aspect, an embodiment of the present invention further provides a software upgrading apparatus, including: a memory, a transceiver, a processor, and a bus system;
wherein the memory is used for storing programs;
the processor is used for executing the program in the memory, and specifically comprises the following steps:
acquiring a data packet to be installed of target software;
when the target software is in a running state, installing the data package to be installed in an installation directory of the target software, and generating a first executable program corresponding to the data package to be installed;
modifying the attribute of the second executable program under the installation directory to obtain a target file, wherein the target file is a non-executable program;
after the target software is closed, controlling the transceiver to receive a starting instruction of the target software;
and starting the first executable program according to the starting instruction.
According to the technical scheme, the embodiment of the invention has the following advantages:
the embodiment of the invention provides a software upgrading method, wherein a software upgrading device firstly obtains a data package to be installed of target software, when the target software is in an operating state, the data package to be installed is installed under an installation directory of the target software, a first executable program corresponding to the data package to be installed is generated, attribute modification is carried out on a second executable program under the installation directory, a target file is obtained, the target file is a non-executable program, and after the target software is closed, a starting instruction of the target software is received, and the first executable program is started according to the starting instruction. By means of the method for upgrading and installing the target software, the user can continue to perform tasks in the original process without perception, upgrade and install the software in the background, after upgrade is successful, when the system is restarted, the upgraded first executable program can be directly executed, the original second executable program cannot be operated due to attribute change, and therefore the target software is upgraded, user experience is improved, and the installation process is flexible.
Drawings
FIG. 1 is a diagram of an embodiment of a method for upgrading software according to an embodiment of the present invention;
FIG. 2 is a diagram of another embodiment of a method for upgrading software according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a software upgrade flow in an embodiment of the present invention;
FIG. 4 is a schematic diagram of a software installation process in an embodiment of the invention;
FIG. 5 is a schematic diagram of a software upgrade interface (1) display in an application scenario of the present invention;
FIG. 6 is a schematic diagram of a software upgrade interface (2) display in an application scenario of the present invention;
FIG. 7 is a schematic diagram of a software upgrade interface (3) display in an application scenario of the present invention;
FIG. 8 is a schematic diagram of a software upgrade interface (4) display in an application scenario of the present invention;
FIG. 9 is a diagram of an embodiment of a software upgrading apparatus according to the embodiment of the present invention;
FIG. 10 is a diagram of an embodiment of a software upgrading apparatus according to the embodiment of the present invention;
FIG. 11 is a diagram of an embodiment of a software upgrading apparatus according to the embodiment of the present invention;
FIG. 12 is a diagram of an embodiment of a software upgrading apparatus according to the embodiment of the present invention;
FIG. 13 is a diagram of an embodiment of a software upgrading apparatus according to the embodiment of the present invention;
FIG. 14 is a diagram of an embodiment of a software upgrading apparatus according to the embodiment of the present invention;
FIG. 15 is a diagram of an embodiment of a software upgrading apparatus according to the embodiment of the present invention;
FIG. 16 is a diagram of an embodiment of a software upgrading apparatus according to the embodiment of the invention;
FIG. 17 is a diagram of an embodiment of a software upgrading apparatus according to the embodiment of the present invention;
fig. 18 is a schematic structural diagram of a software upgrading apparatus in an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a software upgrading method and a software upgrading device, which can finish the upgrading of target software under the condition that a user does not sense, improve the user experience and enable the installation process to be more flexible.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that the embodiments of the present invention may be applied to different User Equipments (UE), such as a mobile phone, a tablet Computer, or a Personal Computer (PC), and thus are not limited herein.
For the PC, the scheme of the present invention may be implemented in different operating environments, for example, in an environment of a Windows operating system 2000 (Windows 2000), or in an environment of a Windows operating system Experience (Windows Experience, Windows XP), or in an environment of Windows 7 or Windows 8, which is not limited herein.
In addition, if the scheme is applied to the mobile phone, the scheme can be applied to not only an Operating System (hereinafter, referred to as android) developed by google corporation, but also a mobile Operating System (hereinafter, referred to as iOS) developed by Apple corporation, or other types of Operating systems, and thus the scheme is not limited herein.
Referring to fig. 1, an embodiment of a method for upgrading software according to an embodiment of the present invention includes:
101. acquiring a data packet to be installed of target software;
in this embodiment, the software upgrading apparatus may obtain a to-be-installed data package of target software, where the target software is software that can be upgraded currently, such as browser software, chat software, or social software, and the to-be-installed data package is a software installation package of the target software, and is a set of files that can be decompressed by itself, where the software installation package includes all files of the software installation, and the to-be-installed data package is run, and all files of the software may be released to a hard disk, so as to complete operations such as modifying a registry, modifying system settings, and creating shortcuts.
102. When the target software is in a running state, installing a data package to be installed in an installation catalog of the target software, and generating a first executable program corresponding to the data package to be installed;
in this embodiment, when the target software is in the running state, the software upgrading apparatus installs the to-be-installed data packet in the installation directory of the target software, at this time, the target software has already been upgraded in the background, but at this time, the user can still continue to use the target software that is not upgraded, and the user does not perceive that the target software of the new version has been upgraded.
After the target software is upgraded, the software upgrading device generates a first executable program corresponding to the data packet to be installed.
103. Modifying the attribute of the second executable program under the installation directory to obtain a target file, wherein the target file is a non-executable program;
in this embodiment, after the target software is upgraded, the old version running program corresponding to the target software may be deleted, so as to avoid occupying the system memory. The software upgrading device modifies the attribute of an original running program of target software under an installation directory, namely a second executable program, and obtains a target file after modification, wherein the target file is a non-executing program, namely the target file loses the function of the original running target software.
104. After the target software is closed, receiving a starting instruction of the target software;
in this embodiment, after the target software is closed, when a user needs to use the target software again, a start instruction may be sent to the software upgrading apparatus through the input device, and the software upgrading apparatus receives the start instruction corresponding to the target software.
105. And starting the first executable program according to the starting instruction.
In this embodiment, the software upgrading apparatus starts a corresponding first executable program according to the received start instruction, where the first executable program is an operating program corresponding to the upgraded target software, and thus, the process of upgrading the target software in the background is completed without being perceived by the user.
The embodiment of the invention provides a software upgrading method, wherein a software upgrading device firstly obtains a data package to be installed of target software, when the target software is in an operating state, the data package to be installed is installed under an installation directory of the target software, a first executable program corresponding to the data package to be installed is generated, attribute modification is carried out on a second executable program under the installation directory, a target file is obtained, the target file is a non-executable program, and after the target software is closed, a starting instruction of the target software is received, and the first executable program is started according to the starting instruction. By means of the method for upgrading and installing the target software, the user can continue to perform tasks in the original process without perception, upgrade and install the software in the background, after upgrade is successful, when the system is restarted, the upgraded first executable program can be directly executed, the original second executable program cannot be operated due to attribute change, and therefore the target software is upgraded, user experience is improved, and the installation process is flexible.
Referring to fig. 2, another embodiment of the method for upgrading software according to the embodiment of the present invention includes:
201. detecting whether the target software has a data packet to be installed;
in this embodiment, the software upgrading apparatus starts to detect whether a data packet to be installed currently exists after the target software process is started. A process is a process that is both the basis of an operating system architecture and the execution of a program or the activity of a program and its data when executed sequentially on a processor or a process running on a collection of data. It is an independent unit for resource allocation and scheduling by the system.
202. If the target software has a data packet to be installed, downloading the data packet to be installed;
in this embodiment, if the target software has a to-be-installed data package, the to-be-installed data package may be downloaded in the background.
Referring to fig. 3, the specific processes of step 201 and step 202 may be referred to, where fig. 3 is a schematic diagram of a software upgrading process in an embodiment of the present invention, as shown in the following drawings:
step 301: starting the process of the target software by a user initiating a process starting instruction;
step 302: just as the operation of detecting whether the target software has the data package to be installed in step 201, that is, detecting whether a new version exists on line, the process of detecting on line may be a continuous detection, so that although the new version can be found more quickly, more network resources are occupied, and therefore, an intermittent detection may be set, for example, the detection of the new version is performed every 15 minutes, if a new version is detected, step 303 is entered, and if no new version is detected, step 305 is skipped;
step 303: if the target software has the data package to be installed, downloading the data package to be installed in step 202, and if the current target software has a new version of the data package to be installed, directly downloading the data package to be installed;
step 304: installing a new version of the data packet to be installed under the default path;
step 305, if the current target software does not have a new version of the data packet to be installed, the software upgrading is quitted, or the operation of software upgrading is not performed within a certain preset time.
203. Acquiring a data packet to be installed of target software;
in this embodiment, in step 304, when a new version of the to-be-installed package is installed and installed in the default path, it means that the software upgrading apparatus acquires the installation package that has completed downloading.
204. When the target software is in a running state, installing a data package to be installed in an installation catalog of the target software, and generating a first executable program corresponding to the data package to be installed;
in this embodiment, step 204 is similar to step 102 corresponding to fig. 1 in the above embodiment, and therefore is not described herein again.
205. Modifying the attribute of the second executable program under the installation directory to obtain a target file, wherein the target file is a non-executable program;
in this embodiment, step 205 is similar to step 103 corresponding to fig. 1 in the above embodiment, and therefore is not described herein again.
206. After the target software is closed, receiving a starting instruction of the target software;
in this embodiment, step 206 is similar to step 104 corresponding to fig. 1 in the above embodiment, and therefore is not described herein again.
207. And starting the first executable program according to the starting instruction.
In this embodiment, step 207 is similar to step 105 corresponding to fig. 1 in the above embodiment, and therefore is not described herein again.
Secondly, in the embodiment of the present invention, before the software upgrading device obtains the to-be-installed data packet of the target software, it is further specifically described that whether the target software has the to-be-installed data packet is detected, and if the target software has the to-be-installed data packet, the to-be-installed data packet is downloaded and subsequent imperceptible upgrading is performed. Therefore, the scheme of the invention has stronger operability in practical application, can also embody that the invention does not need related operations such as upgrading installation and the like of a user, conveniently and quickly finishes software upgrading, improves the practicability of the scheme and strengthens user experience.
Optionally, on the basis of the embodiment corresponding to fig. 1 or fig. 2, in a first optional embodiment of the method for upgrading software according to the embodiment of the present invention, after acquiring the to-be-installed data packet of the target software, the method may further include:
creating a first subdirectory under the installation directory;
installing the data package to be installed under the installation catalog of the target software may include:
and installing the data package to be installed in a first subdirectory under the installation directory.
In this embodiment, after obtaining the to-be-installed data package of the target software, the software upgrading device creates a first sub-directory under the installation directory, and it can be understood that the installation directory can be used as a parent directory, so that the sub-directory is a directory in the parent directory, and there may be sub-directories in the sub-directories, so that the sub-directories are not limited. For example, in a PC, C: \ Windows is a parent directory, then C: \ Windows is a child directory of C: \, and C: \ Windows \ System32 is a child directory of C: \ Windows.
And after the first subdirectory is built under the installation directory, installing the data package to be installed in the first subdirectory under the installation directory.
Secondly, in the embodiment of the invention, a first sub-directory is created under the installation directory, and then the data package to be installed can be installed under the first sub-directory. On one hand, all files in the data package to be installed are classified into the first subdirectory, so that the data package to be installed can be conveniently processed at one time, for example, the data package to be installed can be directly deleted by deleting the subdirectory, on the other hand, the data package to be installed is placed in the subdirectory, so that the data package to be installed can be conveniently distinguished from other files, and the feasibility of the scheme is improved.
Optionally, on the basis of the first embodiment corresponding to fig. 1 or fig. 2, in a second optional embodiment of the method for upgrading software provided in the embodiment of the present invention, the installation directory may include a first sub-directory and a second sub-directory, where the first sub-directory corresponds to the first executable program, the second sub-directory corresponds to the second executable program, and the second sub-directory is used to store the original data of the target software.
In this embodiment, the installation directory further includes a second sub-directory in addition to the first sub-directory, the first sub-directory is used to store the content of the data package to be installed, the first sub-directory corresponds to the first executable program, and when the first executable program is run, the data of the first executable program is sourced from the first sub-directory. The second sub-directory is used for storing original data of the target software before upgrading, and the second sub-directory corresponds to a second executable program, and the target software currently in use is operated through the second executable program.
It will be understood that the first executable program can be either saved in the first subdirectory or automatically copied from the first subdirectory to the installation directory as a shortcut, and is not limited herein.
In the embodiment of the invention, the first subdirectory and the second subdirectory are established under the installation directory, and the first subdirectory and the second subdirectory respectively store different data, so that files before and after upgrading can be conveniently distinguished, the working efficiency of the system can be favorably improved during subsequent processing, and the feasibility and the operability of the scheme can be improved.
Optionally, on the basis of the first embodiment corresponding to fig. 1 or fig. 2, in a third optional embodiment of the method for upgrading software provided in the embodiment of the present invention, the method may further include:
and when the attribute modification of the second executable program fails, deleting the first subdirectory and ending the process.
In this embodiment, the software upgrading apparatus may automatically modify the attribute of the second executable program in the background, and if an operation interruption or an operation error occurs during the attribute modification, it is determined that the attribute modification of the second executable program fails, and at this time, the first sub-directory is deleted.
In the embodiment of the present invention, a case is set, that is, when the attribute modification of the second executable program fails, the first subdirectory is deleted, and the process is ended. By carrying out software upgrading in such a way, conflict between the second executable program and the first executable program can be effectively prevented, and if the first executable program is also valid when the second executable program is still valid, conflict operation can occur. Therefore, the practicability and flexibility of the scheme are enhanced, and the user experience is improved.
Optionally, on the basis of the first embodiment corresponding to fig. 1 or fig. 2, in a fourth optional embodiment of the method for upgrading software according to the embodiment of the present invention, after creating the first sub-directory under the installation directory, the method may further include:
decompressing the data packet to be installed under the first subdirectory;
and when the data packet to be installed fails to be decompressed, deleting the first subdirectory and ending the process.
In this embodiment, after the software upgrading apparatus creates the first sub-directory under the installation directory, the to-be-installed data package needs to be decompressed under the first sub-directory first, and when the to-be-installed data package fails to be decompressed, the first sub-directory is automatically deleted, and the relevant process is ended.
The decompression is to restore a document, a file and other things compressed by software to the form before compression, and the form is favorable for transmission or storage. The principle is that the same character string in binary information is marked with special characters by using compression software to achieve the purpose of compression.
In the embodiment of the present invention, when the data packet to be installed fails to be decompressed under the first sub-directory, the first sub-directory is deleted, and the process is ended. Through the mode, the problem that invalid files are remained in the disk space due to the fact that decompression fails and system resources are occupied can be solved, and the problem can be effectively avoided by deleting the data packet to be installed which is subjected to decompression failure in time according to actual conditions, so that the scheme is higher in practicability, and the performance of user equipment is improved.
Optionally, on the basis of the embodiment corresponding to fig. 1 or fig. 2, in a fifth optional embodiment of the method for upgrading software according to the embodiment of the present invention, modifying the attribute of the second executable program in the installation directory may include:
and changing the first suffix name corresponding to the second executable program under the installation directory into the second suffix name.
In this embodiment, the specific way for the software upgrading apparatus to modify the attribute of the second executable program in the installation directory may be to change a first suffix name corresponding to the second executable program in the installation directory to a second suffix name.
The second executable program is an executable program (english full name: executable program, english abbreviation: exe) corresponding to the old version, the first suffix name may also be called a file extension, that is, exe, and the second suffix name is a modified file extension, for example, exe may be modified to exe.
It will be appreciated that the suffix name of a file, also referred to as a file extension, is one mechanism that the operating system uses to flag the file type. Typically, an extension follows the main file name, separated by a separator. In a file name like "read me. txt", read me is the main file name,. txt is the extension (Text or foreign language full: Text), indicating that this file is considered a plain Text file. An extension may be considered a type of metadata,
some File systems limit the length of the extensions, such as the personal computer disk operating system and the File Allocation Table (FAT) on microsoft disk operating system (File Allocation Table) File systems do not allow more than three characters, international business machines corporation) or the ten thousand business machines corporation (english full: international Business Machines Corporation, acronym for English: IBM) (english full name: virtual Manufacturing, english abbreviation: VM)/content management system (english full name: content Management System, english abbreviation: CMS) does not allow more than eight characters, while others such as new technology file systems (english-language full: new Technology File System, English abbreviation: NTFS) is not limited.
Secondly, in the embodiment of the present invention, a way of how to modify the attribute of the second executable program is specifically provided, and the function may be implemented by modifying the suffix name of the second executable program. And the modified suffix name can not only change the attribute of the second executable program, but also carry out flexible attribute configuration according to actual needs, meanwhile, the mode of modifying the suffix is simple and effective, the effect is realized without occupying excessive computing resources, and the practicability of the scheme is improved.
Optionally, on the basis of any one of the first to fifth embodiments corresponding to fig. 1 or fig. 2, in a sixth optional embodiment of the method for upgrading software according to the embodiment of the present invention, after the first executable program is started according to the start instruction, the method may further include:
and deleting the target file and the second subdirectory.
In this embodiment, when the user restarts the process of the target software, the first executable program is started according to the start instruction triggered by the user, and the system runs the target software of the new version. Then, at this time, for the old version of the file, the deletion process may be performed to delete the target file and the second sub-directory. The target file is the non-executable file modified by the suffix name in the fifth optional embodiment corresponding to fig. 1, and the second subdirectory stores the original data of the target software before upgrading. Because the new version of the target software has been successfully used, the old version of the target software can be deleted, thereby freeing up system space.
Further, in the embodiment of the present invention, after the software upgrading apparatus receives the start instruction and executes the first executable program, the target file and the second sub-directory are automatically deleted. Therefore, the system can be timely thinned, the system capacity is increased, excessive space is not occupied, the resource utilization rate is improved, and the flexibility and the practicability of the scheme are enhanced.
Optionally, on the basis of the second embodiment corresponding to fig. 1 or fig. 2, in a seventh optional embodiment of the method for upgrading software according to the embodiment of the present invention, after the first executable program is started, the method may further include:
and if the first executable program fails to run, restoring the target file into a second executable program and executing the second executable program.
In this embodiment, after the first executable program is started, if the first executable program fails to operate, the target file is restored to obtain a second executable program. In other words, when the target software of the new version fails to operate, the target software of the old version can be operated without the target software being unavailable due to the failure of the upgrade.
Specifically, the second suffix name is changed to the first suffix name, for example, the second suffix name is. exe.old, which indicates a non-executable program, and therefore, the. exe.old, which is changed to. exe, is required to execute the second executable file.
Further, in the embodiment of the present invention, an alternative is provided when the first executable program fails to run, if the first executable program cannot run normally, the software upgrading apparatus automatically restores the target file to the second executable program again, and the user opens the old version of the target software by opening the second executable program. By means of the software upgrading method, the situation that target software cannot run due to special situations is avoided, even if installation fails, the old version can be automatically recovered, normal use of the old version is not affected, and therefore flexibility of the scheme is improved.
Optionally, on the basis of the seventh embodiment corresponding to fig. 1 or fig. 2, in an eighth optional embodiment of the method for upgrading software according to the embodiment of the present invention, after the second executable program is executed, the method may further include:
the first executable program and the first subdirectory are deleted.
In this embodiment, on the basis of the seventh embodiment corresponding to fig. 1 or fig. 2, it can be known that if the first executable program fails to run, the target file is restored to the second executable program, the second executable program is executed, and finally the first executable program and the first sub-directory are deleted.
When the first executable program fails to operate, the upgrading of the target software is not successful, and the first executable program and the corresponding first subdirectory can be automatically deleted at the time, so that the target software is returned to the old version. Referring to fig. 4, fig. 4 is a schematic diagram of a software installation flow in an embodiment of the present invention, and as shown in the diagram, we will describe in detail:
step 401: starting target software, and if the background detects that the target software has a new version and can be downloaded at the moment, starting to download a data package to be installed of the new version corresponding to the target software, so that an installation process is started;
step 402: after the new version of the data package to be installed is downloaded successfully, the software upgrading device creates 9.
Step 403: decompressing the data packet to be installed into the subdirectory of 9. once;
step 404: abnormal decompression or other errors may occur during the decompression process, so that whether the decompression is successful or not needs to be detected in this step, if the decompression is successful, the step 405 is continued, otherwise, if the decompression is failed, the step 410 is skipped;
step 405: if the decompression in step 404 is successful, renaming the executable file corresponding to the old version, for example, exe may be renamed to exe.
Step 406: of course, a renaming exception may also be encountered during the renaming process in step 405, or there may be other types of problems, so that it is necessary to detect whether the renaming is successful in this step, if the renaming is successful, step 407 is continued, otherwise, if the decompression fails, step 410 is skipped;
step 407: if the renaming of the executable program of the old version is successful, 9.
Step 408: installation-related operations such as setting up firewalls, which are network security systems between internal and external networks, registries, shortcuts, and the like are performed in the background. The information security protection system allows or limits the passing of transmitted data according to a specific rule, and the registry is used for storing the setting information of the system and the application program;
step 409: in this way, the upgrade and installation of the target software are completed completely, and the upgrade is successful;
step 410: this step will be performed, i.e., delete 9. times.subdirectory, whether decompression failure occurred at step 404 during decompression or renaming failure of step 406 in the old version of the executable program;
step 411: after deleting 9. multidata.subdirectory in step 410, it means that the upgrade has failed to be installed, and this time, the target software can be returned to the old version, and the content of the old version is still obtained when the target software is started next time, but the background upgrade of the target software can still be implemented with reference to the process described in steps 401 to 411.
Furthermore, in the embodiment of the present invention, when the first executable program cannot run normally, the target file is automatically restored to the second executable program, and after the target software of the old version is opened by the second executable program, the first executable program and the first subdirectory may also be deleted, so as to achieve the effect of saving system resources, improve the computing efficiency, and enhance the user experience.
For convenience of understanding, the following describes a software upgrading method in a specific application scenario in detail, specifically:
the user A downloads the Tencent browser for use on the PC of the user A, and the user A habitually searches the Tencent browser for financial news every day. When the user A turns on the Tencent browser again this time, the browser background detects that a new version of content is available for downloading, with a version number of 9.3.6438.400, without being aware of the fact that the new version of content has appeared. Referring to fig. 5, fig. 5 is a schematic display diagram of a software upgrade interface (1) in an application scenario of the present invention, where as shown, a software upgrade apparatus starts a to-be-installed package process, obtains a version of the to-be-installed package, and creates a sub-directory under the current installation directory C: \ Program Files (× 86)/tengent/QQBrower, which can also be understood as a folder with a name of a new version number 9.3.6438.400.
At this time, the files in the data package to be installed are decompressed into the new subfolder 9.3.6438.400, specifically referring to fig. 6, fig. 6 is a schematic diagram illustrating a display of the software upgrade interface (2) in the application scenario of the present invention, of course, if the decompression fails, the newly generated subfolder 9.3.6438.400 is deleted, and the upgrade flow is directly exited, and conversely, if the decompression succeeds, the subfolder 9.3.6438.400 includes all complete installation programs, and of course, executable programs.
Because the old version 9.3.6400.400 corresponds to an executable program and the new version 9.3.6438.400 also corresponds to an executable program, the old version of the executable program needs to be treated as a non-executable program to ensure the new version is operating properly. Specifically, the executable program of the old version may be modified by renaming an exe file according to the principle under the directory to obtain a named exe.old, as shown in fig. 7, fig. 7 is a display diagram of a software upgrade interface (3) in the application scenario of the present invention, and it is easy to see that the icon qqbtower.exe.old is already a modified file, and at this time, the modified file cannot be normally operated. It will be appreciated that in the case of an old version running, renaming can still succeed without requiring the installation process to be exited.
Inevitably, a renaming failure for an old version of an executable file may occur, and at this time, the newly created subfolder 9.3.6438.400 may be deleted and the installation failure may be accounted for. If the renaming is successful, the QQQWERER. exe. old file corresponding to the old version 9.3.6400.400 and other related data are automatically deleted after the system is restarted.
Referring to fig. 8, fig. 8 is a schematic display diagram of a software upgrade interface (4) in an application scenario of the present invention, and when the user a restarts the Tencent browser process, the user a can only open the Tencent browser through the updated exe and load a file in the new directory 9.3.6438.400. While old versions of the qqbtower.exe.old file cannot be opened or the qqbtower.exe.old file is directly deleted.
Referring to fig. 9, the software upgrading apparatus according to the embodiment of the present invention is described in detail below, and includes:
an obtaining module 501, configured to obtain a to-be-installed data packet of target software;
the installing module 502 is configured to, when the target software is in an operating state, install the to-be-installed data packet obtained by the obtaining module 501 in an installation directory of the target software, and generate a first executable program corresponding to the to-be-installed data packet;
a modifying module 503, configured to modify an attribute of a second executable program in the installation directory after the installing module 502 generates the first executable program corresponding to the to-be-installed data packet, and obtain an object file, where the object file is a non-executable program;
a receiving module 504, configured to receive a starting instruction of the target software after the target software is closed after the modification module 503 modifies the attribute of the second executable program in the installation directory;
a starting module 505, configured to start the first executable program installed by the installation module according to the starting instruction received by the receiving module 504.
In this embodiment, the obtaining module 501 obtains a to-be-installed data package of target software, when the target software is in an operating state, the installing module 502 installs the to-be-installed data package obtained by the obtaining module 501 in an installation directory of the target software, and generates a first executable program corresponding to the to-be-installed data package, after the installing module 502 generates the first executable program corresponding to the to-be-installed data package, the modifying module 503 performs attribute modification on a second executable program in the installation directory, and obtains a target file, the target file is a non-executable program, after the modifying module 503 performs attribute modification on the second executable program in the installation directory, when the target software is closed, the receiving module 504 receives a starting instruction of the target software, and the starting module 505 starts the first executable program installed by the installing module according to the starting instruction received by the receiving module 504.
The embodiment of the invention provides a software upgrading method, wherein a software upgrading device firstly obtains a data package to be installed of target software, when the target software is in an operating state, the data package to be installed is installed under an installation directory of the target software, a first executable program corresponding to the data package to be installed is generated, attribute modification is carried out on a second executable program under the installation directory, a target file is obtained, the target file is a non-executable program, and after the target software is closed, a starting instruction of the target software is received, and the first executable program is started according to the starting instruction. By means of the method for upgrading and installing the target software, the user can continue to perform tasks in the original process without perception, upgrade and install the software in the background, after upgrade is successful, when the system is restarted, the upgraded first executable program can be directly executed, the original second executable program cannot be operated due to attribute change, and therefore the target software is upgraded, user experience is improved, and the installation process is flexible.
Optionally, on the basis of the embodiment corresponding to fig. 9, please refer to another embodiment of the software upgrading apparatus 50 provided in the embodiment of fig. 10, where the software upgrading apparatus 50 further includes:
a detecting module 506, configured to detect whether the target software has a to-be-installed data packet before the obtaining module 501 obtains the to-be-installed data packet of the target software;
a downloading module 507, configured to download the to-be-installed data package if the detection module 506 detects that the target software has the to-be-installed data package.
Secondly, in the embodiment of the present invention, before the software upgrading device obtains the to-be-installed data packet of the target software, it is further specifically described that whether the target software has the to-be-installed data packet is detected, and if the target software has the to-be-installed data packet, the to-be-installed data packet is downloaded and subsequent imperceptible upgrading is performed. Therefore, the scheme of the invention has stronger operability in practical application, can also embody that the invention does not need related operations such as upgrading installation and the like of a user, conveniently and quickly finishes software upgrading, improves the practicability of the scheme and strengthens user experience.
Optionally, on the basis of the embodiment corresponding to fig. 9, please refer to another embodiment of the software upgrading apparatus 50 provided in the embodiment of fig. 11, where the software upgrading apparatus 50 further includes:
a creating module 508, configured to create a first subdirectory under the installation directory after the obtaining module 501 obtains the to-be-installed data packet of the target software;
the installation module 502 includes:
a mounting unit 5021, configured to mount the to-be-mounted data package in the first sub-directory under the mounting directory.
Secondly, in the embodiment of the invention, a first sub-directory is created under the installation directory, and then the data package to be installed can be installed under the first sub-directory. On one hand, all files in the data package to be installed are classified into the first subdirectory, so that the data package to be installed can be conveniently processed at one time, for example, the data package to be installed can be directly deleted by deleting the subdirectory, on the other hand, the data package to be installed is placed in the subdirectory, so that the data package to be installed can be conveniently distinguished from other files, and the feasibility of the scheme is improved.
Optionally, on the basis of the embodiment corresponding to fig. 9, in an embodiment of the present invention, the installation directory includes the first sub-directory and a second sub-directory, where the first sub-directory corresponds to the first executable program, the second sub-directory corresponds to the second executable program, and the second sub-directory is used to store the original data of the target software.
In the embodiment of the invention, the first subdirectory and the second subdirectory are established under the installation directory, and the first subdirectory and the second subdirectory respectively store different data, so that files before and after upgrading can be conveniently distinguished, the working efficiency of the system can be favorably improved during subsequent processing, and the feasibility and the operability of the scheme can be improved.
Optionally, on the basis of the embodiment corresponding to fig. 11, please refer to another embodiment of the software upgrading apparatus 50 provided in the embodiment of fig. 12, where the software upgrading apparatus 50 further includes:
a first deleting module 509, configured to delete the first sub-directory and end the process when the property modification of the second executable program fails.
In the embodiment of the present invention, a case is set, that is, when the attribute modification of the second executable program fails, the first subdirectory is deleted, and the process is ended. By carrying out software upgrading in such a way, conflict between the second executable program and the first executable program can be effectively prevented, and if the first executable program is also valid when the second executable program is still valid, conflict operation can occur. Therefore, the practicability and flexibility of the scheme are enhanced, and the user experience is improved.
Optionally, on the basis of the embodiment corresponding to fig. 11, please refer to another embodiment of the software upgrading apparatus 50 provided in the embodiment of fig. 13, where the software upgrading apparatus 50 further includes:
a decompression module 510, configured to decompress, by the creation module 508, the to-be-installed data packet under the first sub-directory after the creation module creates the first sub-directory under the installation directory;
a second deleting module 511, configured to delete the first sub-directory and end the process when the decompressing module 510 fails to decompress the to-be-installed data packet.
In the embodiment of the present invention, when the data packet to be installed fails to be decompressed under the first sub-directory, the first sub-directory is deleted, and the process is ended. Through the mode, the problem that invalid files are remained in the disk space due to the fact that decompression fails and system resources are occupied can be solved, and the problem can be effectively avoided by deleting the data packet to be installed which is subjected to decompression failure in time according to actual conditions, so that the scheme is higher in practicability, and the performance of user equipment is improved.
Optionally, on the basis of the embodiment corresponding to fig. 9, please refer to another embodiment of the software upgrading apparatus 50 provided in the embodiment of fig. 14,
the modification module 503 includes:
an updating unit 5031, configured to change a first suffix name corresponding to the second executable program in the installation directory to a second suffix name.
Secondly, in the embodiment of the present invention, a way of how to modify the attribute of the second executable program is specifically provided, and the function may be implemented by modifying the suffix name of the second executable program. And the modified suffix name can not only change the attribute of the second executable program, but also carry out flexible attribute configuration according to actual needs, meanwhile, the mode of modifying the suffix is simple and effective, the effect is realized without occupying excessive computing resources, and the practicability of the scheme is improved.
Optionally, on the basis of the embodiment corresponding to fig. 11, 12 or 13, please refer to another embodiment of the software upgrading device 50 provided in the embodiment of fig. 15, where the software upgrading device 50 further includes:
a third deleting module 512, configured to delete the target file and the second sub-directory after the starting module 505 starts the first executable program according to the starting instruction.
Further, in the embodiment of the present invention, after the software upgrading apparatus receives the start instruction and executes the first executable program, the target file and the second sub-directory are automatically deleted. Therefore, the system can be timely thinned, the system capacity is increased, excessive space is not occupied, the resource utilization rate is improved, and the flexibility and the practicability of the scheme are enhanced.
Alternatively, on the basis of the embodiment corresponding to fig. 9, please refer to another embodiment of the software upgrading device 50 provided in the embodiment of fig. 16,
a restoring module 513, configured to, after the starting module 505 starts the first executable program, restore the target file to the second executable program and execute the second executable program if the first executable program fails to run.
Further, in the embodiment of the present invention, an alternative is provided when the first executable program fails to run, if the first executable program cannot run normally, the software upgrading apparatus automatically restores the target file to the second executable program again, and the user opens the old version of the target software by opening the second executable program. By means of the software upgrading method, the situation that target software cannot run due to special situations is avoided, even if installation fails, the old version can be automatically recovered, normal use of the old version is not affected, and therefore flexibility of the scheme is improved.
Alternatively, on the basis of the embodiment corresponding to fig. 16, please refer to another embodiment of the software upgrading device 50 provided in the embodiment of fig. 17,
a fourth deleting module 514, configured to delete the first executable program and the first sub-directory after the restoring module 513 executes the second executable program.
Furthermore, in the embodiment of the present invention, when the first executable program cannot run normally, the target file is automatically restored to the second executable program, and after the target software of the old version is opened by the second executable program, the first executable program and the first subdirectory may also be deleted, so as to achieve the effect of saving system resources, improve the computing efficiency, and enhance the user experience.
As shown in fig. 18, for convenience of description, only the parts related to the embodiment of the present invention are shown, and details of the specific technology are not disclosed, please refer to the method part of the embodiment of the present invention. The terminal may be any terminal device including a mobile phone, a tablet computer, a Personal Digital Assistant (PDA, abbreviated as "Personal Digital Assistant"), a Sales terminal (POS, abbreviated as "Point of Sales"), a vehicle-mounted computer, etc., and the terminal is taken as a mobile phone as an example:
fig. 18 is a block diagram showing a partial structure of a cellular phone related to a terminal provided by an embodiment of the present invention. Referring to fig. 18, the cellular phone includes: radio Frequency (RF) circuit 610, memory 620, input unit 630, display unit 640, sensor 650, audio circuit 660, wireless fidelity (WiFi) module 670, processor 680, and power supply 690. Those skilled in the art will appreciate that the handset configuration shown in fig. 18 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile phone in detail with reference to fig. 18:
the RF circuit 610 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, receives downlink information of a base station and then processes the received downlink information to the processor 680; in addition, the data for designing uplink is transmitted to the base station. In general, RF circuit 610 includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (Low Noise Amplifier, LNA), a duplexer, and the like. In addition, the RF circuitry 610 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), e-mail, Short Message Service (SMS), etc.
The memory 620 may be used to store software programs and modules, and the processor 680 may execute various functional applications and data processing of the mobile phone by operating the software programs and modules stored in the memory 620. The memory 620 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 620 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 630 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the cellular phone. Specifically, the input unit 630 may include a touch panel 631 and other input devices 632. The touch panel 631, also referred to as a touch screen, may collect touch operations of a user (e.g., operations of the user on the touch panel 631 or near the touch panel 631 by using any suitable object or accessory such as a finger or a stylus) thereon or nearby, and drive the corresponding connection device according to a preset program. Alternatively, the touch panel 631 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 680, and can receive and execute commands sent by the processor 680. In addition, the touch panel 631 may be implemented using various types, such as resistive, capacitive, infrared, and surface acoustic wave. The input unit 630 may include other input devices 632 in addition to the touch panel 631. In particular, other input devices 632 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 640 may be used to display information input by the user or information provided to the user and various menus of the mobile phone. The Display unit 640 may include a Display panel 641, and optionally, the Display panel 641 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch panel 631 can cover the display panel 641, and when the touch panel 631 detects a touch operation thereon or nearby, the touch panel is transmitted to the processor 680 to determine the type of the touch event, and then the processor 680 provides a corresponding visual output on the display panel 641 according to the type of the touch event. Although in fig. 6, the touch panel 631 and the display panel 641 are two independent components to implement the input and output functions of the mobile phone, in some embodiments, the touch panel 631 and the display panel 641 may be integrated to implement the input and output functions of the mobile phone.
The handset may also include at least one sensor 650, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display panel 641 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 641 and/or the backlight when the mobile phone is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
Audio circuit 660, speaker 661, and microphone 662 can provide an audio interface between a user and a cell phone. The audio circuit 660 may transmit the electrical signal converted from the received audio data to the speaker 661, and convert the electrical signal into an audio signal through the speaker 661 for output; on the other hand, the microphone 662 converts the collected sound signals into electrical signals, which are received by the audio circuit 660 and converted into audio data, which are processed by the audio data output processor 680 and then transmitted via the RF circuit 610 to, for example, another cellular phone, or output to the memory 620 for further processing.
WiFi belongs to short-distance wireless transmission technology, and the mobile phone can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 670, and provides wireless broadband Internet access for the user. Although fig. 6 shows the WiFi module 670, it is understood that it does not belong to the essential constitution of the handset, and can be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 680 is a control center of the mobile phone, and connects various parts of the entire mobile phone by using various interfaces and lines, and performs various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 620 and calling data stored in the memory 620, thereby performing overall monitoring of the mobile phone. Optionally, processor 680 may include one or more processing units; preferably, the processor 680 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 680.
The handset also includes a power supply 690 (e.g., a battery) for powering the various components, which may preferably be logically connected to the processor 680 via a power management system, such that the power management system may be used to manage charging, discharging, and power consumption.
Although not shown, the mobile phone may further include a camera, a bluetooth module, etc., which are not described herein.
In the embodiment of the present invention, the processor 680 included in the terminal further has the following functions:
acquiring a data packet to be installed of target software;
when the target software is in a running state, installing the data package to be installed in an installation directory of the target software, and generating a first executable program corresponding to the data package to be installed;
modifying the attribute of the second executable program under the installation directory to obtain a target file, wherein the target file is a non-executable program;
when the target software is closed, controlling the input unit 630 to receive a starting instruction of the target software;
and starting the first executable program according to the starting instruction.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (16)

1. A method of software upgrade, comprising:
acquiring a data packet to be installed of target software, and creating a first subdirectory under an installation directory of the target software;
when the target software is in a running state, installing the data package to be installed in the first subdirectory, and generating a first executable program corresponding to the data package to be installed, wherein the first executable program is a new running program obtained after the target software is upgraded; the first subdirectory corresponds to the first executable program and is used for storing the content of the data package to be installed; the installation directory also comprises a second sub-directory, and the second sub-directory corresponds to a second executable program and is used for storing original data of the target software;
modifying the attribute of the second executable program under the installation directory to obtain a target file, wherein the target file is a non-executable program, and the second executable program is an original running program of the target software; when the attribute modification of the second executable program fails, deleting the first subdirectory and ending the process;
after the target software is closed, receiving a starting instruction of the target software;
and starting the first executable program according to the starting instruction, wherein when the first executable program is operated, the data of the first executable program is sourced from the first subdirectory.
2. The method of claim 1, wherein before obtaining the data package to be installed of the target software, the method further comprises:
detecting whether the target software has the data packet to be installed or not;
and if the target software has the data packet to be installed, downloading the data packet to be installed.
3. The method of claim 1, wherein after creating the first subdirectory under the installation directory, the method further comprises:
decompressing the data packet to be installed under the first subdirectory;
and when the data packet to be installed fails to be decompressed, deleting the first subdirectory and ending the process.
4. The method of claim 1, wherein the modifying the property of the second executable program under the installation catalog comprises:
and changing a first suffix name corresponding to the second executable program in the installation directory into a second suffix name.
5. The method of any of claims 1-4, wherein after the launching of the first executable program according to the launch instruction, the method further comprises:
and deleting the target file and the second subdirectory.
6. The method of claim 1, after the launching of the first executable program, the method further comprising:
and if the first executable program fails to run, restoring the target file into the second executable program, and executing the second executable program.
7. The method of claim 6, wherein after the executing the second executable program, the method further comprises:
deleting the first executable program and the first subdirectory.
8. A software upgrading apparatus, comprising:
the acquisition module is used for acquiring a data packet to be installed of the target software;
the creating module is used for creating a first subdirectory under the installation directory after the acquisition module acquires the data packet to be installed of the target software;
the installation module is used for installing the data package to be installed in the first subdirectory when the target software is in an operating state, and generating a first executable program corresponding to the data package to be installed, wherein the first executable program is a new operating program obtained after the target software is upgraded; the first subdirectory corresponds to the first executable program and is used for storing the content of the data package to be installed; the installation directory also comprises a second sub-directory, and the second sub-directory corresponds to a second executable program and is used for storing original data of the target software;
the modification module is used for modifying the attribute of the second executable program under the installation directory to obtain a target file, wherein the target file is a non-executable program, and the second executable program is an original running program of the target software;
a first deleting module, configured to delete the first sub-directory and end the process when the attribute modification of the second executable program fails;
the receiving module is used for receiving a starting instruction of the target software after the target software is closed;
and the starting module is used for starting the first executable program installed by the installation module according to the starting instruction received by the receiving module, wherein when the first executable program is operated, the data of the first executable program comes from the first subdirectory.
9. The software upgrading apparatus according to claim 8, further comprising:
the detection module is used for detecting whether the target software has the data packet to be installed before the acquisition module acquires the data packet to be installed of the target software;
and the downloading module is used for downloading the data packet to be installed if the detection module detects that the target software has the data packet to be installed.
10. The software upgrading apparatus according to claim 8, further comprising:
the decompression module is used for decompressing the data packet to be installed under the first subdirectory after the creation module creates the first subdirectory under the installation directory;
and the second deleting module is used for deleting the first subdirectory and ending the flow when the decompressing module fails to decompress the data packet to be installed.
11. The software upgrading apparatus according to claim 8, wherein the modification module comprises:
and the updating unit is used for changing a first suffix name corresponding to the second executable program in the installation catalog into a second suffix name.
12. The software upgrading apparatus according to any one of claims 8 to 11, further comprising:
and the third deleting module is used for deleting the target file and the second subdirectory after the starting module starts the first executable program according to the starting instruction.
13. The software upgrading apparatus according to claim 8, further comprising:
and the restoring module is used for restoring the target file into the second executable program and executing the second executable program if the first executable program fails to run after the starting module starts the first executable program.
14. The software upgrading apparatus according to claim 13, further comprising:
and the fourth deleting module is used for deleting the first executable program and the first subdirectory after the restoring module executes the second executable program.
15. A software upgrading apparatus, comprising: a memory, a transceiver, a processor, and a bus system;
wherein the memory is used for storing programs;
the processor is used for executing the program in the memory, and specifically comprises the following steps:
acquiring a data packet to be installed of target software, and creating a first subdirectory under an installation directory of the target software;
when the target software is in a running state, installing the data package to be installed in the first subdirectory, and generating a first executable program corresponding to the data package to be installed, wherein the first executable program is a new running program obtained after the target software is upgraded; the first subdirectory corresponds to the first executable program and is used for storing the content of the data package to be installed; the installation directory also comprises a second sub-directory, and the second sub-directory corresponds to a second executable program and is used for storing original data of the target software;
modifying the attribute of the second executable program under the installation directory to obtain a target file, wherein the target file is a non-executable program, and the second executable program is an original running program of the target software; when the attribute modification of the second executable program fails, deleting the first subdirectory and ending the process;
after the target software is closed, controlling the transceiver to receive a starting instruction of the target software;
and starting the first executable program according to the starting instruction, wherein when the first executable program is operated, the data of the first executable program is sourced from the first subdirectory.
16. A computer-readable storage medium, in which a computer program is stored, the computer program being for causing a computer device to perform the method of software upgrade of any one of claims 1 to 7.
CN201610185913.4A 2016-03-29 2016-03-29 Software upgrading method and software upgrading device Active CN107239295B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610185913.4A CN107239295B (en) 2016-03-29 2016-03-29 Software upgrading method and software upgrading device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610185913.4A CN107239295B (en) 2016-03-29 2016-03-29 Software upgrading method and software upgrading device

Publications (2)

Publication Number Publication Date
CN107239295A CN107239295A (en) 2017-10-10
CN107239295B true CN107239295B (en) 2020-12-25

Family

ID=59982940

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610185913.4A Active CN107239295B (en) 2016-03-29 2016-03-29 Software upgrading method and software upgrading device

Country Status (1)

Country Link
CN (1) CN107239295B (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107832068A (en) * 2017-10-27 2018-03-23 努比亚技术有限公司 A kind of application upgrade method, mobile terminal and computer-readable recording medium
CN108595195B (en) * 2018-04-09 2022-01-21 国泰新点软件股份有限公司 Application program updating method, device, terminal and storage medium
CN109343885B (en) * 2018-11-01 2022-02-25 阿波罗智能技术(北京)有限公司 System upgrading method and multi-system equipment
CN109542677B (en) * 2018-11-05 2021-08-13 北京炎黄盈动科技发展有限责任公司 Method and device for upgrading application medium in high-reliability container and storage medium
CN111475220B (en) * 2019-01-23 2023-04-25 阿里巴巴集团控股有限公司 Cold start method and device, electronic equipment and computer storage medium
CN110222009B (en) * 2019-05-28 2021-08-06 咪咕文化科技有限公司 Method and device for automatically processing Hive warehousing abnormal file
CN110806888A (en) * 2019-12-23 2020-02-18 北京奇艺世纪科技有限公司 Application program upgrading method and device and electronic equipment
CN111240729B (en) * 2020-01-21 2023-03-14 维沃移动通信有限公司 Software updating method, electronic device and medium
CN112631627B (en) * 2020-12-10 2023-02-24 武汉联影医疗科技有限公司 Software upgrading method and device, computer equipment and storage medium
CN112799600A (en) * 2021-02-09 2021-05-14 珠海豹趣科技有限公司 Software moving method, and moving software restoration method and device
CN113064615B (en) * 2021-03-26 2023-09-26 西安万像电子科技有限公司 Software updating method and device, storage medium and electronic device
CN112988213B (en) * 2021-04-13 2023-11-14 荣耀终端有限公司 Program data updating method, electronic equipment and computer storage medium
CN116132971B (en) * 2023-02-03 2023-06-27 深圳市卡思诺数码有限公司 OTA upgrading method and system for Bluetooth sound equipment
CN117725014A (en) * 2024-02-04 2024-03-19 珠海星云智联科技有限公司 PCIE equipment attribute modification method and related device in DPU scene

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102955702A (en) * 2011-08-23 2013-03-06 腾讯科技(深圳)有限公司 Method and device for installing and upgrading software

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7765592B2 (en) * 2004-01-10 2010-07-27 Microsoft Corporation Changed file identification, software conflict resolution and unwanted file removal
CN103488467B (en) * 2012-06-12 2017-12-15 华为终端(东莞)有限公司 A kind of processing method and processing device of JAVA applications
CN104731626B (en) * 2015-03-31 2018-11-13 百度在线网络技术(北京)有限公司 The installation method and device of application
CN105068819A (en) * 2015-09-10 2015-11-18 北京金山安全软件有限公司 Application calling method and device and terminal

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102955702A (en) * 2011-08-23 2013-03-06 腾讯科技(深圳)有限公司 Method and device for installing and upgrading software

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
[搜片神器]winform程序自己如何更新自己的方法代码;Miao31;《https://www.bbsmax.com/A/VGzlYkeOJb/》;20130918;第1-7页 *

Also Published As

Publication number Publication date
CN107239295A (en) 2017-10-10

Similar Documents

Publication Publication Date Title
CN107239295B (en) Software upgrading method and software upgrading device
CN106095458B (en) The management method and device of plug-in unit in a kind of application program
US10320719B2 (en) Message withdrawal method, apparatus and storage medium
CN107992308B (en) Plug-in management method for android terminal application program
WO2019037724A1 (en) Method for upgrading application of mobile terminal, storage device, and mobile terminal
CN103544033A (en) Method, device and associated equipment for rolling back application program
WO2017206899A1 (en) Information processing method and related device
CN103677903A (en) Mobile terminal intelligent upgrade method and device, and electronic equipment
US10684838B2 (en) Dynamic application deployment
WO2019076293A1 (en) Differential upgrading method, device and system
CN106850800B (en) Method for determining download path and client
CN103473163A (en) Application program detection method and device
CN103455348A (en) Subarea adjustment method, device, terminal, server and system
CN106953898B (en) Method and device for acquiring software package
CN110780940A (en) Application program loading method, electronic device and storage medium
EP2869604B1 (en) Method, apparatus and device for processing a mobile terminal resource
CN108431767A (en) A kind of method, user terminal and the storage medium of load software program
CN111124753A (en) Application program control method, electronic equipment and server
CN109144596B (en) Quick starting method, device, terminal, server and system
CN106933636B (en) Method and device for starting plug-in service and terminal equipment
EP3129883B1 (en) Method and apparatus for repairing dynamic link library file
CN110609694A (en) BUG repairing method and device, terminal equipment and storage medium
US20200310771A1 (en) Application Processing Method for Terminal Device, and Terminal Device
CN104133693A (en) Installation state detection method, device and terminal
CN105700895B (en) The adaptation method and terminal and system server of a kind of terminal system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant