[go: up one dir, main page]

CN103677879B - Software installation method and corresponding software mounting device - Google Patents

Software installation method and corresponding software mounting device Download PDF

Info

Publication number
CN103677879B
CN103677879B CN201210341447.6A CN201210341447A CN103677879B CN 103677879 B CN103677879 B CN 103677879B CN 201210341447 A CN201210341447 A CN 201210341447A CN 103677879 B CN103677879 B CN 103677879B
Authority
CN
China
Prior art keywords
installation
software
thread
software installation
file
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
CN201210341447.6A
Other languages
Chinese (zh)
Other versions
CN103677879A (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 CN201210341447.6A priority Critical patent/CN103677879B/en
Publication of CN103677879A publication Critical patent/CN103677879A/en
Application granted granted Critical
Publication of CN103677879B publication Critical patent/CN103677879B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The present invention relates to a kind of software installation method and corresponding software installation devices, the software installation method is comprising steps of receive software installation request, and it is requested according to software installation while starting first thread and the second thread, first thread executes the operation being configured to the installation of software, the execution of second thread decompresses the file in the installation kit of software, and by the operation of the file copy after decompression to temporary folder;After first thread and the second thread are finished, by the file copy in temporary folder to installation directory;And modify to the registry information of computer, the state of the computer after logging software installation.The invention further relates to a kind of software installation devices.Software installation method of the invention and corresponding software installation device realize the Fast Installation of software by multiple threads.

Description

Software installation method and corresponding software mounting device
Technical field
The present invention relates to field of computer technology, fill more particularly to a kind of quick software installation method and software installation It sets.
Background technique
In today's society, pass through the various demands of software realization various on computer user.With computer technology Rapid development, in order to meet the needs of users, the capacity of corresponding software is also increasing.
As shown in FIG. 1, FIG. 1 is the existing software installation methods based on nsis installation kit for existing software installation method Flow chart, nsis are the production process of installation procedure under the Windows system increased income, it is possible to provide the peace loading, unloading of program It carries, system is arranged and the functions such as file decompression.In the flow chart, after user double-clicks operation installation kit, first to software Installation be configured, such as check and consenting user permission agreement, selection mounting assembly and setting installation path etc.;Then The current state of backup computer, for cancel installation when installation rollback (installation rollback refer to when user cancel install when, will The computer of user is restored to initial state, including folder content and registration table content etc.);Then by the installation of software Installation directory is integrally copied to after file decompression in packet;It finally modifies to registry information, after recording the software installation Computer state.
Above-mentioned whole installation process is that sequence executes, and the capacity such as software is larger, and the file in software installation packet is whole It copies installation directory to and modifies to registry information, the two steps of the state of the computer after recording the software installation It will devote a tremendous amount of time, and lead to the overlong time of entire software installation, and influence the experience of user.
Therefore, it is necessary to a kind of software installation method and software installation device are provided, to solve to ask present in the prior art Topic.
Summary of the invention
The purpose of the present invention is to provide a kind of software installation sides of Fast Installation that software is realized by multiple threads Method and software installation device;The software installation for solving existing software installation method and software installation device takes a long time, shadow The technical issues of ringing user experience.
To solve the above problems, technical solution provided by the invention is as follows:
The present invention relates to a kind of software installation methods comprising step:
Software installation request is received, and first thread and the second thread are requested while started according to the software installation, The first thread executes the operation being configured to the installation of software, and second thread is executed the installation kit of the software In file decompressed, and by the operation of the file copy after decompression to temporary folder;
After the first thread and second thread are finished, by the file copy in the temporary folder to peace Fill catalogue.
It, will after the first thread and second thread are finished in software installation method of the present invention File copy in the temporary folder was specifically included to the step of installation directory:
After second thread is finished, processing is grouped to the file in the temporary folder, obtains multiple groups File to be copied;And
After the first thread is finished, multiple groups file multithreading to be copied is copied to installation directory.
In software installation method of the present invention, the software installation method is further comprised the steps of:
Software installation request is received, and is requested according to the software installation while starting third thread, the third thread Execute the operation for backing up the current state of the computer.
It is after the first thread is finished, the multiple groups are to be copied in software installation method of the present invention In the step of file multithreading copies installation directory to, using single thread by file copy to be copied described in one group to the installation Catalogue.
In software installation method of the present invention, the installation of software as described in cancelling, then according to the third thread The state of the computer of middle backup executes installation rollback.
The invention further relates to a kind of software installation devices comprising:
First thread execution module is executed for receiving software installation request, and according to software installation request to soft The operation that the installation of part is configured;
Second thread execution module is executed for receiving software installation request, and according to software installation request by institute The file stated in the installation kit of software is decompressed, and by the operation of the file copy after decompression to temporary folder;And
Module is copied, for by the file copy in the temporary folder to installation directory.
In software installation device of the present invention, the copy module includes:
Grouped element obtains multiple groups file to be copied for being grouped processing to the file in the temporary folder; And
Multithreading copy cell, for copying multiple groups file multithreading to be copied to installation directory.
In software installation device of the present invention, the software installation device further include:
Third thread execution module executes backup for receiving software installation request, and according to software installation request The operation of the current state of the computer.
In software installation device of the present invention, the multithreading copy cell using single thread by described in one group to Copied files copy the installation directory to.
In software installation device of the present invention, the software installation device further include:
Roll-back module is installed, for the installation of the software as described in cancelling, is then backed up according to the third thread execution module The computer state, execute installation rollback.
Compared to the prior art, software installation method of the invention and software installation device are realized soft by multiple threads The Fast Installation of part;The software installation for solving existing software installation method and software installation device takes a long time, and influences to use The technical issues of family is experienced.
For above content of the invention can be clearer and more comprehensible, preferred embodiment is cited below particularly, and cooperate institute's accompanying drawings, makees Detailed description are as follows:
Detailed description of the invention
Fig. 1 is the flow chart of the existing software installation method based on nsis installation kit;
Fig. 2 is the flow chart of the first preferred embodiment of software installation method of the invention;
Fig. 3 is the flow chart of the second preferred embodiment of software installation method of the invention;
Fig. 4 is the flow chart of the specific embodiment of software installation method of the invention;
Fig. 5 is the structural schematic diagram of the first preferred embodiment of software installation device of the invention;
Fig. 6 is the structural schematic diagram of the second preferred embodiment of software installation device of the invention;
Wherein, the reference numerals are as follows:
51, first thread execution module;
52, the second thread execution module;
53, module is copied;
54, state recording module;
61, third thread execution module
62, roll-back module is installed.
Specific embodiment
The explanation of following embodiment is to can be used to the particular implementation of implementation to illustrate the present invention with reference to additional schema Example.The direction term that the present invention is previously mentioned, such as "upper", "lower", "front", "rear", "left", "right", "inner", "outside", " side " Deng being only the direction with reference to annexed drawings.Therefore, the direction term used be to illustrate and understand the present invention, rather than to The limitation present invention.
The similar unit of structure is to be given the same reference numerals in the figure.
Referring to figure 2., Fig. 2 is the flow chart of the first preferred embodiment of software installation method of the invention.Software peace Dress method starts from:
Step 201, software installation request is received, and is requested according to software installation while starting first thread and the second line Journey, first thread execute the operation being configured to the installation of software, and the second thread is executed the file in the installation kit of software It is decompressed, and by the operation of the file copy after decompression to temporary folder;
Step 202, after first thread and the second thread are finished, by the file copy in temporary folder to installation mesh Record;
Step 203, it modifies to the registry information of computer, the state of the computer after logging software installation;
The software installation method ends at step 203.
The following detailed description of the detailed process of the first preferred embodiment of software installation method of the invention.
In step 201, receive user software installation request (such as user double-click software installation kit carry out software Installation), at this moment requested according to above-mentioned software installation, while starting two threads, i.e. first thread and the second thread.Wherein First thread such as checks for executing the operation being configured to the installation of software and consenting user permission agreement, selection is installed Component and the setting operation such as installation path, but must be manually operated by user, therefore the concrete operations time is according to user Operating process determine.Second thread starts simultaneously with first thread, and the second thread is used for the file in the installation kit of software Decompression processing is carried out, and by the file copy after decompression to temporary folder (i.e. pre-copy operation), this is decompressed and copy Operation receive user software installation request after automatically backstage carry out.Since the operation in first thread occupies system Resource is less, therefore taking place without for the second thread influences user in the operation of first thread.
Then come step 202.
In step 202, after first thread and the second thread are finished, the installation file of software is all copied Into temporary folder, then again by being copied under installation directory in temporary folder, discharged due to first decompressing installation file It is copied under installation directory again after to temporary folder, thus the file fragmentation for reducing disk (directly carries out the installation of software File fragmentation can be generated in a hard disk).In addition, due in this step, directly by the file copy in temporary folder to peace The installation that catalogue realizes software is filled, to save the time of the installation kit of decoder software.
In this step, before by the file copy to installation directory in temporary folder, further preferably to temporary file File in folder is grouped processing, to obtain multiple groups file to be copied.Here grouping only by installation file by size It is combined, so that the total capacity of the All Files in every group is similar, such as every group of file total capacity is 8,000,000 to 12,000,000. Then above-mentioned each group file multithreading to be copied is copied in the installation directory of software, it is preferable to use single threads by one group here File copy to be copied is such as provided with 5 groups of files to be copied into installation directory, that is, opens 5 threads and copy file to be copied Shellfish is to installation directory, and since every group of file total capacity is similar, the copy of every group of file the spent time also should be similar.This Sample can utilize the resource of system to greatest extent, further save the time of software installation.
Then come step 203.
In step 203, it modifies to the registry information of computer, the shape of the computer after logging software installation State completes the installation of the software in this way.
Referring to figure 3., Fig. 3 is the flow chart of the second preferred embodiment of software installation method of the invention.Software peace Dress method starts from:
Step 301, software installation request is received, and is requested according to software installation while opening first thread, the second thread And third thread, first thread execute the operation being configured to the installation of software, the second thread is executed the installation of software File in packet is decompressed, and by the operation of the file copy after decompression to temporary folder, third thread executes backup meter The operation of the current state of calculation machine;
Step 302, after first thread and the second thread are finished, by the file copy in temporary folder to installation mesh Record;
Step 303, it modifies to the registry information of computer, the state of the computer after logging software installation;
The software installation method ends at step 303.
The difference of this preferred embodiment and first preferred embodiment is, after the software installation request for receiving user, removes Starting first thread and the second thread also while starting third thread.Third thread is for executing the current of backup computer The operation of state, in order to cancel installation rollback when software installation.
The current state for starting backup computer when receiving user software mount request, after can further saving The time of the current state of continuous backup computer.Generally after first thread, the second thread and third thread are performed both by, Again by the file copy in temporary folder into installation directory.Such as by the file copy in temporary folder to installation directory During, user determines to cancel the installation of the software, then the shape before software is installed according to the computer backed up in third thread State, execute installation rollback, i.e., termination current file copy operation, delete installation directory under installed All Files and will State before the folder content and registration table content recovery of computer to installation.
In the preferred embodiment, the operation of the current state of backup computer is made by way of multithreading and to software The operation that is configured of installation and meanwhile carry out, on the basis of guaranteeing the reliability and restorability of software installation, further Save the time of software installation.
Carry out the specific embodiment that the present invention will be described in detail below by Fig. 4, Fig. 4 is software installation method of the invention The flow chart of specific embodiment.
After user double-clicks the installation kit of runs software, first thread starts to be configured the installation of software, such as checks use Family permission agreement selects mounting assembly setting etc.;Second thread starts to decompress installation kit, and installation file is discharged into interim text In part folder;Third thread starts the current state (before installation) of backup computer, for installing rollback.Then to temporary folder In installation file be grouped processing, the similar file to be copied of multiple groups size is obtained, then by above-mentioned each group text to be copied Part multithreading copies in the installation directory of software.Such as in copy procedure, user determines to cancel the installation of the software, then basis State before the computer installation backed up in third thread, executes the installation of end software after installation rollback.As user completes Entire copy procedure then records the installation of end software after the state of current computer.
The invention further relates to a kind of software installation device, as shown in figure 5, Fig. 5 is the of software installation device of the invention The structural schematic diagram of one preferred embodiment.The software installation device includes first thread execution module 51, the second thread execution mould Block 52, copy module 53 and state recording module 54.First thread execution module 51 is for receiving software installation request, and root The operation being configured to the installation of software is executed according to software installation request;Second thread execution module 52 is for receiving software peace Dress request, and executed according to software installation request and decompress the file in the installation kit of software, and by the file after decompression Copy the operation of temporary folder to;Module 53 is copied to be used for the file copy in temporary folder to installation directory;State Computer mode of the logging modle 54 for modifying to the registry information of computer, after logging software installation.
Wherein copy module 53 includes grouped element and multithreading copy cell.Grouped element is used for temporary folder In file be grouped processing, obtain multiple groups file to be copied;Multithreading copy cell is used for multiple groups file to be copied is more Thread copies installation directory to, wherein multithreading copy cell it is preferable to use single thread by one group of file copy to be copied to installation Catalogue.
The software installation device of this preferred embodiment in use, receiving the software installation request of user, hold by first thread Row module 51 can execute the operation being configured to the installation of software;The second thread execution module 52 is by the installation of software simultaneously File in packet carries out decompression processing, and by the file copy after decompression to temporary folder.
After first thread execution module 51 and the second thread execution module 52 are finished, the grouping list of module 53 is copied Member is grouped processing to the file in temporary folder, to obtain multiple groups file to be copied.Then copy module 53 Multithreading copy cell copies above-mentioned each group file multithreading to be copied in the installation directory of software to, and it is preferable to use lists here Thread is by one group of file copy to be copied into installation directory.
Finally, state recording module 54 modifies to the registry information of computer, the calculating after logging software installation The state of machine completes the installation of the software by software installation device in this way.
The first of the specifically used process of software installation device in this preferred embodiment and above-mentioned software installation method Preferred embodiment is same or similar, and for details, reference can be made to the associated descriptions of the first preferred embodiment of above-mentioned software installation method.
As shown in fig. 6, Fig. 6 is the structural schematic diagram of the second preferred embodiment of software installation device of the invention.This is excellent The difference of embodiment and first preferred embodiment is selected to be, which further includes third thread execution module 61 and peace Fill roll-back module 62.The third thread execution module 61 is used to execute the operation of the current state of backup computer, in order to take Installation rollback when the software installation that disappears;Roll-back module 62 is installed and is used for the installation such as cancellation software, then is executed according to third thread The state for the computer that module 61 backs up executes installation rollback.
The software installation device of this preferred embodiment is in use, third thread execution module 61 is receiving user software peace Dress request when beginning backup computer current state, can further save the current state of subsequent backup computer when Between.Such as during copying module 53 for the file copy in temporary folder to installation directory, user determines cancellation, and this is soft The installation of part, then installing roll-back module 62 can hold according to the state before the computer installation that third thread execution module 61 backs up Row installation rollback.
The second of the specifically used process of software installation device in this preferred embodiment and above-mentioned software installation method Preferred embodiment is same or similar, and for details, reference can be made to the associated descriptions of the second preferred embodiment of above-mentioned software installation method.
Software installation method and software installation device of the invention realizes the Fast Installation of software by multiple threads, Multithreading copy process is grouped to installation file during the installation process simultaneously, further improves software installation speed;Solution The software installation for existing software installation method and the software installation device of having determined takes a long time, and the technology for influencing user experience is asked Topic.
In conclusion although the present invention has been disclosed above in the preferred embodiment, but above preferred embodiment is not to limit The system present invention, those skilled in the art can make various changes and profit without departing from the spirit and scope of the present invention Decorations, therefore protection scope of the present invention subjects to the scope of the claims.

Claims (10)

1. a kind of software installation method, which is characterized in that comprising steps of
Software installation request is received, and is requested according to the software installation while starting first thread and the second thread, it is described First thread executes the operation being configured to the installation of software, and the second thread execution will be in the installation kit of the software File is decompressed, and by the operation of the file copy after decompression to temporary folder;The operation of decompression and copy is receiving It is carried out automatically on backstage after to the software installation request of user;
After the first thread and second thread are finished, by the file copy in the temporary folder to installation mesh Record.
2. software installation method according to claim 1, which is characterized in that the first thread and second thread are held After row, the file copy in the temporary folder to the step of installation directory is specifically included:
After second thread is finished, processing is grouped to the file in the temporary folder, multiple groups is obtained and waits copying Buddhist script written on pattra leaves part;And
After the first thread is finished, multiple groups file multithreading to be copied is copied to installation directory.
3. software installation method according to claim 1, which is characterized in that the software installation method further comprises the steps of:
Software installation request is received, and third thread is requested while started according to the software installation, the third thread executes The operation of the current state of backup computer.
4. software installation method according to claim 2, which is characterized in that after the first thread is finished, by institute It states in the step of multiple groups file multithreading to be copied copies installation directory to, is copied file to be copied described in one group using single thread Shellfish is to the installation directory.
5. software installation method according to claim 3, which is characterized in that the installation of software, then basis as described in cancelling The state of the computer backed up in the third thread executes installation rollback.
6. a kind of software installation device characterized by comprising
First thread execution module is executed for receiving software installation request, and according to software installation request to software The operation being configured is installed;
Second thread execution module, for receiving software installation request, and being executed according to software installation request will be described soft File in the installation kit of part is decompressed, and by the operation of the file copy after decompression to temporary folder;It decompresses and copies The operation of shellfish carries out on backstage automatically after the software installation request for receiving user;And
Module is copied, for by the file copy in the temporary folder to installation directory.
7. software installation device according to claim 6, which is characterized in that the copy module includes:
Grouped element obtains multiple groups file to be copied for being grouped processing to the file in the temporary folder;And
Multithreading copy cell, for copying multiple groups file multithreading to be copied to installation directory.
8. software installation device according to claim 6, which is characterized in that the software installation device further include:
Third thread execution module for receiving software installation request, and requests to execute backup calculating according to the software installation The operation of the current state of machine.
9. software installation device according to claim 7, which is characterized in that the multithreading copy cell uses single thread By file copy to be copied described in one group to the installation directory.
10. software installation device according to claim 8, which is characterized in that the software installation device further include:
Roll-back module is installed, for the installation of the software as described in cancelling, then according to the institute of third thread execution module backup The state of computer is stated, installation rollback is executed.
CN201210341447.6A 2012-09-14 2012-09-14 Software installation method and corresponding software mounting device Active CN103677879B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210341447.6A CN103677879B (en) 2012-09-14 2012-09-14 Software installation method and corresponding software mounting device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210341447.6A CN103677879B (en) 2012-09-14 2012-09-14 Software installation method and corresponding software mounting device

Publications (2)

Publication Number Publication Date
CN103677879A CN103677879A (en) 2014-03-26
CN103677879B true CN103677879B (en) 2019-03-26

Family

ID=50315541

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210341447.6A Active CN103677879B (en) 2012-09-14 2012-09-14 Software installation method and corresponding software mounting device

Country Status (1)

Country Link
CN (1) CN103677879B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106599017B (en) * 2016-10-20 2019-09-17 广州优视网络科技有限公司 Scanning analytic method, device and the mobile terminal of installation kit
CN108108203B (en) * 2016-11-25 2021-02-26 斑马智行网络(香港)有限公司 Method, device and system for installation package download and installation process
CN107122205B (en) * 2017-04-11 2021-01-29 深圳市客一客信息科技有限公司 Installation time determining method and device for installation program
CN111200739A (en) * 2020-01-03 2020-05-26 上海小麦互动企业发展有限公司 Method for infinitely installing apk
CN114546419A (en) * 2020-11-18 2022-05-27 北京小米移动软件有限公司 Application installation method, device, electronic device and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1423192A (en) * 2001-12-05 2003-06-11 微软公司 Soft installatign on mobile computering apparatus using configuration manager rolling back and safety characteristic

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110265072A1 (en) * 2010-04-27 2011-10-27 Jack Matthew Dynamic Installation of Files for Running Programs
JP5610290B2 (en) * 2010-11-29 2014-10-22 内山工業株式会社 Water jacket spacer

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1423192A (en) * 2001-12-05 2003-06-11 微软公司 Soft installatign on mobile computering apparatus using configuration manager rolling back and safety characteristic

Also Published As

Publication number Publication date
CN103677879A (en) 2014-03-26

Similar Documents

Publication Publication Date Title
US10089183B2 (en) Method and apparatus for reconstructing and checking the consistency of deduplication metadata of a deduplication file system
CN103677879B (en) Software installation method and corresponding software mounting device
US10289684B2 (en) Live migration of virtual machine persistent data using mirrored input-output operations
CN103019888B (en) Backup method and device
US8977898B1 (en) Concurrent access to data during replay of a transaction log
US10445186B1 (en) Associating a guest application within a virtual machine to create dependencies in backup/restore policy
CN109032796B (en) Data processing method and device
US11449241B2 (en) Customizable lock management for distributed resources
CN111897558A (en) Container cluster management system Kubernetes upgrade method and device
US20120150804A1 (en) Multiple contexts in a redirect on write file system
WO2015102823A1 (en) Systems and methods for improving snapshot performance
CN104536852B (en) Data recovery method and device
WO2014153940A1 (en) Method and apparatus for processing redo data of database
CN105281949B (en) Mix the partition method and isolating device of host in memory module
CN100535863C (en) Method and apparatus for realizing configuring affair
CN118193537A (en) Method and system for parallel creating openGauss external partition table partition indexes
US8630982B2 (en) Individual object restore
US20150220517A1 (en) Efficient conflict resolution among stateless processes
CN115495436A (en) Database upgrading method and device
US9762436B2 (en) Unified and persistent network configuration
CN108733704B (en) Multi-database data processing method and device, storage medium and electronic equipment
CN106293535B (en) A performance optimization method and device for NAS
CN115951845B (en) Disk management method, device, equipment and storage medium
CN108121514B (en) Meta-information updating method, apparatus, computing device and computer storage medium
CN110119389B (en) Writing operation method of virtual machine block equipment, snapshot creation method and device

Legal Events

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