Disclosure of Invention
The invention aims to provide a method, a device and a system for installing software and a readable storage medium, and provides a more convenient and efficient software installation mode.
According to an aspect of the present invention, there is provided a method for installing software, applied to a user terminal, the method including:
receiving a software installation task sent by a software management server;
analyzing the software installation task to obtain installation attribute information and installation opportunity information of the software to be installed;
when the installation opportunity information points to the software to be installed and needs to be restarted, storing the installation attribute information to a local preset storage space;
and after detecting that the user terminal is restarted, acquiring the installation attribute information from the local preset storage space, and installing the software to be installed on the user terminal according to the installation attribute information.
Optionally, before the receiving the software installation task sent by the software management server, the method further includes:
receiving a software uninstalling task sent by the software management server; wherein the software offloading task comprises: uninstalling attribute information of installed software, wherein the installed software and the software to be installed cannot be installed in the user terminal at the same time;
and uninstalling the installed software from the user terminal according to the uninstalling attribute information.
Optionally, the storing the installation attribute information to a local preset storage space specifically includes:
acquiring an installation package of the software to be installed from the software management server according to the installation attribute information, and storing the installation package to the local preset storage space;
the acquiring the installation attribute information from the local preset storage space and installing the software to be installed at the user terminal according to the installation attribute information specifically includes:
and acquiring the installation package from the local preset storage space, and executing the installation package to install the software to be installed on the user terminal.
Optionally, the obtaining the installation attribute information from the local preset storage space, and installing the software to be installed at the user terminal according to the installation attribute information specifically includes:
acquiring the installation attribute information from the local preset storage space;
acquiring an installation package of the software to be installed from the software management server according to the installation attribute information;
and executing the installation package to install the software to be installed on the user terminal.
Optionally, after analyzing the software installation task and obtaining the installation attribute information and the installation opportunity information of the software to be installed, the method further includes:
and when the installation opportunity information points to the software to be installed and the installation is not required to be restarted, installing the software to be installed at the user terminal according to the installation attribute information.
Optionally, after the software to be installed is installed on the user terminal according to the installation attribute information, the method further includes:
acquiring a software installation result; wherein the software installation result comprises: software installation success information or software installation failure information;
and sending the software installation result to the software management server.
In order to achieve the above object, the present invention further provides an apparatus for installing software, which is applied to a user terminal, and comprises:
the receiving module is used for receiving the software installation task sent by the software management server;
the analysis module is used for analyzing the software installation task to obtain installation attribute information and installation opportunity information of the software to be installed;
the processing module is used for storing the installation attribute information to a local preset storage space when the installation opportunity information points to the software to be installed and needs to be restarted and installed;
the detection module is used for detecting whether the user terminal is restarted or not and sending a starting instruction to the installation module after detecting that the user terminal is restarted;
and the installation module is used for acquiring the installation attribute information from the local preset storage space when the starting instruction is received, and installing the software to be installed on the user terminal according to the installation attribute information.
Optionally, the installation module is specifically configured to:
judging whether the starting instruction is received for the first time after the user terminal is restarted;
and if so, acquiring the installation attribute information from the local preset storage space, and installing the software to be installed at the user terminal according to the installation attribute information.
In order to achieve the above object, the present invention also provides a system for installing software, the system comprising: a software management server and a user terminal; wherein:
the software management server is used for acquiring installation attribute information of software to be installed, setting installation opportunity information to point to the software to be installed to be restarted and installed when detecting that the software to be installed needs to be restarted and installing, and sending a software installation task containing the installation attribute information and the installation opportunity information to the user terminal;
the user terminal is used for executing the steps of the method for installing the software.
In order to achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, realizes the above-described steps of the method of installing software.
According to the method, the device and the system for installing the software and the readable storage medium, the software management server can inform the user terminal whether the software to be installed needs to be restarted or not through the installation opportunity information carried in the software installation task, and when the installation opportunity information points to that the software to be installed needs to be restarted and installed, the user terminal automatically stores the installation attribute information of the software to be installed to the local and waits for the user terminal to be restarted; after the restart is detected, the user terminal can automatically acquire the installation attribute information from the local and automatically execute the software installation operation according to the installation attribute information, so that the supervision and operation of a user are not needed, the software installation operation can be automatically completed even if the software to be installed needs to be installed after the restart, and a more convenient and efficient software installation mode is provided.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
An embodiment of the present invention provides a method for installing software, which is applied to a user terminal, and as shown in fig. 1, the method specifically includes the following steps:
step S101: receiving a software installation task sent by a software management server; and the software installation task is used for installing the software to be installed on the user terminal.
Specifically, the software management server is configured to issue a software installation task and a software uninstallation task to the user terminal, so as to manage the software on the user terminal.
Step S102: and analyzing the software installation task to obtain the installation attribute information and the installation opportunity information of the software to be installed.
Wherein the installation attribute information includes: software name information, installation package address information, software storage position information, software version information, software update time information and the like;
the installation opportunity information includes: information for pointing to whether the software to be installed needs to be restarted for installation, information for pointing to the installation time point, and the like.
As shown in fig. 2, the administrator may configure the installation attribute information and the installation opportunity information through the software management server, for example, configure in the installation opportunity information whether the user terminal immediately installs the software to be installed or installs the software to be installed at a designated time, configure storage location information of the software in the installation attribute information, configure in the installation opportunity information whether the software to be installed needs to be installed after the user terminal is restarted.
Specifically, before step S101, the method further includes:
step A1: receiving a software uninstalling task sent by the software management server; wherein the software offloading task comprises: uninstalling attribute information of installed software, wherein the installed software and the software to be installed cannot be installed in the user terminal at the same time;
step A2: and uninstalling the installed software from the user terminal according to the uninstalling attribute information.
In practical application, the installed software may be a low-version software and the software to be installed may be a high-version software, and when a user installs the high-version software, the user is required to uninstall the low-version software installed in the user terminal first; in addition, the installed software and the software to be installed can also be competitive product software, and the installed software and the software to be installed conflict with each other and cannot be installed on the same user terminal at the same time.
In this embodiment, when the administrator issues the software installation task to the user terminal through the software management server, it may be determined first whether there is installed software that conflicts with the software to be installed on the user terminal, and if so, the administrator issues the software uninstallation task to the user terminal first to uninstall the conflicting installed software; in addition, in order to ensure that the software is completely unloaded, the user terminal is required to be restarted after the software is unloaded, and new software is installed after the user terminal is restarted; therefore, when the administrator issues the software installation task to the user terminal through the software management server, the installation opportunity information is set to point to the software to be installed and the installation needs to be restarted.
Step S103: and when the installation opportunity information points to the software to be installed and needs to be restarted and installed, storing the installation attribute information to a local preset storage space.
Specifically, the method further comprises:
and when the installation opportunity information points to the software to be installed and the installation is not required to be restarted, installing the software to be installed at the user terminal according to the installation attribute information.
In this embodiment, the user terminal determines, according to configuration information of an administrator in the software management server, whether the software to be installed needs to be installed after the user terminal is restarted, if yes, the user terminal temporarily stores the installation attribute information in a locally specified storage address, and if not, the user terminal may immediately install the software to be installed or install the software to be installed at a specified time point.
Step S104: and after detecting that the user terminal is restarted, acquiring the installation attribute information from the local preset storage space, and installing the software to be installed on the user terminal according to the installation attribute information.
Specifically, step S104 includes:
step B1: when the user terminal is detected to be started, acquiring first starting time;
step B2: acquiring second starting time recorded in a preset storage table;
step B3: when the first startup time is different from the second startup time, judging whether installation attribute information is stored in the local preset storage space or not;
step B4: and if so, acquiring the installation attribute information, and installing the software to be installed on the user terminal according to the installation attribute information.
In this embodiment, the startup time of the user terminal is recorded by a preset storage table, and only one latest startup time is recorded in the preset storage table; when the current boot time (i.e., the first boot time) is inconsistent with the boot time (i.e., the second boot time) recorded in the preset storage table, the user terminal is considered to be restarted, and the current boot time is recorded in the preset storage table to replace the original boot time in the preset storage table.
Further, in an optional implementation, the storing the installation attribute information to a local preset storage space in step S103 specifically includes:
acquiring an installation package of the software to be installed from the software management server according to the installation attribute information, and storing the installation package to the local preset storage space;
meanwhile, the acquiring the installation attribute information from the local preset storage space in step S104, and installing the software to be installed in the user terminal according to the installation attribute information specifically includes:
and acquiring the installation package from the local preset storage space, and executing the installation package to install the software to be installed on the user terminal.
In addition, in another optional implementation, the acquiring the installation attribute information from the local preset storage space in step S104, and installing the software to be installed in the user terminal according to the installation attribute information specifically includes:
step D1: acquiring the installation attribute information from the local preset storage space;
step D2: acquiring an installation package of the software to be installed from the software management server according to the installation attribute information;
step D3: and executing the installation package to install the software to be installed on the user terminal.
In this embodiment, the software may be installed at the user terminal in the above two manners, on one hand, the corresponding installation package may be obtained from the software management server according to the installation package address information in the installation attribute information, and then the installation package is stored in the local preset storage space, and finally, after the user terminal is restarted, the software is installed directly according to the installation package in the local preset storage space; and on the other hand, directly storing the installation attribute information into the local preset storage space, after the user terminal is restarted, acquiring the corresponding installation package from the software management server according to the installation package address information in the installation attribute information of the local preset storage space, and finally installing the software according to the installation package.
Further, after the installing the software to be installed in the user terminal according to the installation attribute information, the method further includes:
step C1: acquiring a software installation result; wherein the software installation result comprises: software installation success information or software installation failure information;
step C2: and sending the software installation result to the software management server.
In this embodiment, the user terminal sends the software installation result to the software management server, and when the software installation fails, obtains the reason information of the installation failure, and reports the software installation identification information containing the reason information of the installation failure to the software management server for the administrator to refer.
After the software installation fails, the method for automatically and repeatedly executing the software installation in any one of the above embodiments can be set until the software installation is successful, or a threshold value of the number of times of repeatedly executing the method for installing the software can be set, and when the number of times of repeatedly executing the software installation reaches the threshold value of the number of times, the software installation process can be ended under the condition that the software installation still cannot be successfully installed.
It should be noted that, after each installation failure, the software installation may be performed again directly, or the installation package of the software to be installed may be re-downloaded and repaired according to the acquired reason information of the installation failure, or after repairing or processing the user terminal system, environment, plug-in, etc., the repeated installation operation is performed.
In this embodiment, the software management server may inform the user terminal whether the software to be installed needs to be restarted or not through the installation opportunity information carried in the software installation task, and when the installation opportunity information points to that the software to be installed needs to be restarted and installed, the user terminal automatically stores the installation attribute information of the software to be installed to the local and waits for the user terminal to be restarted; after the restart is detected, the user terminal can automatically acquire the installation attribute information from the local and automatically execute software installation operation according to the installation attribute information, so that the supervision and operation of a user are not needed, the software installation operation can be automatically completed even if the software to be installed needs to be installed after the restart, and a more convenient and efficient software installation mode is provided.
Example two
An embodiment of the present invention provides another method for installing software, which is applied to a user terminal, and as shown in fig. 3, the method specifically includes the following steps:
step S301: receiving a software installation task sent by a software management server; wherein the software installation task comprises: installation attribute information and installation opportunity information of software to be installed;
specifically, the installation attribute information includes: software name information, installation package address information, software storage position information, software version information and software updating time information;
the installation opportunity information includes: the information used for pointing to whether the software to be installed needs to be restarted and the information used for pointing to the installation time point.
The administrator can configure the installation attribute information and the installation opportunity information through the software management server, for example, configure whether the user terminal immediately installs the software to be installed or installs the software to be installed at a designated time in the installation opportunity information, configure storage location information of the software in the installation attribute information, and configure whether the software to be installed needs to be installed after the user terminal is restarted in the installation opportunity information.
Step S302: judging whether the installation opportunity information points to the software to be installed and needs to be restarted and installed;
it should be noted that some software needs to be installed after the computer is restarted when being installed, and some software can be installed without restarting the computer when being installed.
Step S303: if so, storing the software installation task into a local preset installation list;
preferably, the installation attribute information in the software installation task may be stored in a hard disk of the user terminal;
in the embodiment, the software installation task is stored in the designated storage space of the user terminal.
Step S304: if not, the software to be installed is installed on the user terminal according to the software installation task, and a software installation result is reported to the software management server.
Specifically, the installing the software to be installed at the user terminal according to the software installation task includes:
and acquiring an installation package of the software to be installed from a software management server according to the installation attribute information in the software installation task, and executing the installation package to install the software to be installed on the user terminal.
Further, after storing the installation attribute information in a local preset installation list, the method further includes:
step S305: detecting whether the user terminal is restarted or not, and sending a starting instruction after detecting that the user terminal is restarted;
step S306: judging whether the starting instruction is received for the first time after the user terminal is restarted;
in the embodiment, the software installation operation is executed only once after the user terminal is restarted, in order to avoid repeatedly executing the software installation operation, the user terminal sends out the starting instruction after being restarted, the software installation operation is executed only when the starting instruction is sent out for the first time after the user terminal is detected to be started, and otherwise, the software installation operation is not executed;
step S307: if yes, loading the local preset installation list;
step S308: judging whether a software installation task exists in the local preset installation list or not;
step S309: if so, acquiring a software installation task from the local preset installation list, installing the software to be installed on the user terminal according to installation attribute information in the software installation task, and reporting an installation result to a software management server;
step S310: and deleting the software installation task from the local preset installation list, and re-executing the step S308.
In this embodiment, a plurality of software installation tasks may be stored in the local preset installation list, and when the user terminal is restarted, each software installation task in the local preset installation list may be sequentially executed, so as to automatically install a plurality of software at the user terminal at one time.
EXAMPLE III
An embodiment of the present invention provides a device for installing software, and as shown in fig. 4, the device specifically includes the following components:
a receiving module 401, configured to receive a software installation task sent by a software management server;
an analyzing module 402, configured to analyze the software installation task to obtain installation attribute information and installation opportunity information of the software to be installed;
the processing module 403 is configured to store the installation attribute information to a local preset storage space when the installation opportunity information indicates that the software to be installed needs to be restarted and installed;
a detecting module 404, configured to detect whether the user terminal is restarted, and send a start instruction to an installation module after detecting that the user terminal is restarted;
an installation module 405, configured to, when the start instruction is received, obtain the installation attribute information from the local preset storage space, and install the software to be installed in the user terminal according to the installation attribute information.
Specifically, the apparatus further comprises:
the unloading module is used for receiving the software unloading task sent by the software management server; wherein the software offloading task comprises: uninstalling attribute information of installed software, wherein the installed software and the software to be installed cannot be installed in the user terminal at the same time; and uninstalling the installed software from the user terminal according to the uninstalling attribute information.
Further, the processing module 403 is specifically configured to:
when the installation opportunity information points to that the software to be installed needs to be restarted and installed, acquiring an installation package of the software to be installed from the software management server according to the installation attribute information, and storing the installation package to the local preset storage space;
at this time, the installation module 405 is specifically configured to:
and acquiring the installation package from the local preset storage space, and executing the installation package to install the software to be installed on the user terminal.
Further, the installation module 405 is further configured to:
acquiring the installation attribute information from the local preset storage space; acquiring an installation package of the software to be installed from the software management server according to the installation attribute information; and executing the installation package to install the software to be installed on the user terminal.
Further, the processing module 403 is further configured to:
and when the installation opportunity information points to the software to be installed and the installation is not required to be restarted, installing the software to be installed at the user terminal according to the installation attribute information.
Further, the apparatus further comprises:
the feedback module is used for acquiring a software installation result; wherein the software installation result comprises: software installation success information or software installation failure information; and sending the software installation result to the software management server.
Further, the installation module 405 is further configured to:
judging whether the starting instruction is received for the first time after the user terminal is restarted; and if so, acquiring the installation attribute information from the local preset storage space, and installing the software to be installed at the user terminal according to the installation attribute information.
Example four
An embodiment of the present invention provides a system for installing software, and as shown in fig. 5, the system specifically includes the following components: a software management server 501 and a user terminal 502; wherein:
the software management server 501 is configured to obtain installation attribute information of software to be installed, set installation opportunity information to point to the software to be installed and to be restarted to install when it is detected that the software to be installed needs to be restarted to install, and send a software installation task including the installation attribute information and the installation opportunity information to the user terminal;
a user terminal 502 for receiving a software installation task transmitted by the software management server; analyzing the software installation task to obtain installation attribute information and installation opportunity information of the software to be installed; when the installation opportunity information points to the software to be installed and needs to be restarted, storing the installation attribute information to a local preset storage space; and after detecting that the user terminal is restarted, acquiring the installation attribute information from the local preset storage space, and installing the software to be installed on the user terminal according to the installation attribute information.
Specifically, the software management server 501 is further configured to:
when acquiring installation attribute information of software to be installed, acquiring installed software on the user terminal; judging whether the installed software and the software to be installed can be installed in the user terminal at the same time; if not, sending a software unloading task to the user terminal; wherein the software offloading task comprises: uninstalling attribute information of installed software, and the installed software and the software to be installed cannot be installed in the user terminal at the same time.
For specific functions that can be realized by the user terminal 502, reference may be made to the first embodiment, and details of this embodiment are not repeated herein.
EXAMPLE five
The embodiment also provides a computer device, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server or a rack server (including an independent server or a server cluster composed of a plurality of servers) capable of executing programs, and the like. As shown in fig. 6, the computer device 60 of the present embodiment includes at least, but is not limited to: a memory 601, a processor 602 communicatively coupled to each other via a system bus. It should be noted that FIG. 6 only shows the computer device 60 having components 601 and 602, but it should be understood that not all of the shown components are required to be implemented, and that more or fewer components can be implemented instead.
In this embodiment, the memory 601 (i.e., a readable storage medium) includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the storage 601 may be an internal storage unit of the computer device 60, such as a hard disk or a memory of the computer device 60. In other embodiments, the memory 601 may also be an external storage device of the computer device 60, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. provided on the computer device 60. Of course, the memory 601 may also include both internal and external storage devices for the computer device 60. In the present embodiment, the memory 601 is generally used for storing an operating system and various types of application software installed in the computer device 60. In addition, the memory 601 can also be used to temporarily store various types of data that have been output or are to be output.
Processor 602 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 602 is typically used to control the overall operation of the computer device 60.
Specifically, in the present embodiment, the processor 602 is configured to execute the program of the method for installing software stored in the memory 601, and when the program of the method for installing software is executed, the following steps are implemented:
receiving a software installation task sent by a software management server;
analyzing the software installation task to obtain installation attribute information and installation opportunity information of the software to be installed;
when the installation opportunity information points to the software to be installed and needs to be restarted, storing the installation attribute information to a local preset storage space;
and after the restart of the user terminal is detected, acquiring the installation attribute information from the local preset storage space, and installing the software to be installed in the user terminal according to the installation attribute information.
The specific embodiment process of the above method steps can be referred to in the first embodiment, and the detailed description of this embodiment is not repeated here.
EXAMPLE six
The present embodiments also provide a computer readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application mall, etc., having stored thereon a computer program that when executed by a processor implements the method steps of:
receiving a software installation task sent by a software management server;
analyzing the software installation task to obtain installation attribute information and installation opportunity information of the software to be installed;
when the installation opportunity information points to the software to be installed and needs to be restarted, storing the installation attribute information to a local preset storage space;
and after detecting that the user terminal is restarted, acquiring the installation attribute information from the local preset storage space, and installing the software to be installed on the user terminal according to the installation attribute information.
The specific embodiment process of the above method steps can be referred to in the first embodiment, and the detailed description of this embodiment is not repeated here.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.