Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application 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 present application and are not intended to limit the present application. 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 application.
It should be noted that the descriptions relating to "first", "second", etc. in the embodiments of the present application are only for descriptive purposes and are not to be construed as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present application.
In the description of the present application, it should be understood that the numerical references before the steps do not identify the order of performing the steps, but merely serve to facilitate the description of the present application and to distinguish each step, and therefore should not be construed as limiting the present application.
The following are explanations of terms referred to in the present application:
a magnetic disk is a memory for storing data, and data can be stored in the memory without being lost even after power is turned off. In this application, the magnetic Disk may be a Floppy Disk (Floppy Disk for short), a Hard Disk (Hard Disk for short), or other nonvolatile storage media for storing data such as software.
The memory, also called internal memory and main memory, is used for loading and running software, temporarily storing operation data of the processor, and the like.
Fig. 1 schematically shows an environment application diagram of a software installation method according to an embodiment of the present application. In an exemplary embodiment, as shown in FIG. 1, the software control center 2 may be connected to a plurality of electronic devices 6 via a network 4.
The software distribution service may be provided by the software control center 2 through one or more networks 4.
The software control center 2 may be composed of a single or multiple computer devices, such as a rack server, a blade server, a tower server, or a rack server (including an independent server, or a server cluster composed of multiple servers). The one or more computer devices may include a virtualized compute instance. The computer device may load the virtual machine based on a virtual image and/or other data that defines the particular software (e.g., operating system, dedicated application, server) used for emulation. As the demand for different types of processing services changes, different virtual machines may be loaded and/or terminated on the one or more computer devices.
As shown in fig. 2, the software control center 2 may be configured with a User Interface (User Interface). The user interface may include a first user interface and a second user interface. Wherein the first user interface is used for editing and controlling software distribution objects. The second user interface is used to control software distribution and execution. Taking the second user interface as an example, it is configured with a plurality of UI components for the user to configure distribution software information, such as: the method comprises the steps of storing a path of software, judging whether a file with the same name is replaced, and executing the software, wherein the executing modes of the software comprise various instructional information such as ' operating after receiving ', ' only receiving ', ' executing when the occupancy rate of terminal resources is not higher than 70% ' installing when the terminal is restarted ', and the like.
Network 4 may include various network devices such as routers, switches, multiplexers, hubs, modems, bridges, repeaters, firewalls, proxy devices, and/or the like. The network 4 may include physical links, such as coaxial cable links, twisted pair cable links, fiber optic links, combinations thereof, and/or the like. The network 4 may include wireless links such as cellular links, satellite links, Wi-Fi links, and/or the like.
The plurality of electronic devices 6 may be configured to access content and services of the software control center 2. The plurality of electronic devices 6 may comprise any type of computer device, such as a terminal-class device: mobile devices, tablet devices, laptop computers, smart devices (e.g., smart apparel, smart watches, smart speakers, smart glasses), virtual reality headsets, gaming devices, set-top boxes, digital streaming devices, robots, vehicle terminals, smart televisions, television boxes, e-book readers, MP3 (moving picture experts group audio layer III) players, MP4 (moving picture experts group audio layer IV) players, and the like. The plurality of electronic devices 6 may also include non-end devices such as gateways, switches, and the like.
The plurality of electronic devices 6 may be configured with associated account or identification information to facilitate control and management of the software control center.
The application provides a software installation scheme, which can monitor the occupation state of equipment resources according to software distribution information of a software control center 2, and download and install software according to the monitored occupation state of the equipment resources. Various embodiments are provided below, and the various embodiments provided below may be used to implement the software installation operations described above. For ease of understanding, the following description will be given by way of example with one of the electronic devices 6 as the execution subject.
Example one
Fig. 2 schematically shows a flowchart of a software installation method according to a first embodiment of the present application.
As shown in fig. 3, the vibration control method of the electronic device 6 may include steps S300 to S302, wherein:
and step S300, receiving the distribution software information issued by the server.
It should be noted that the server may be the software control center 2 in fig. 1 or be a part of the software control center 2.
In order to improve the software downloading and installing experience, before the software provider distributes the software to the electronic device 6 through the server, the software provider may configure the distributed software information, so that the electronic device 6 performs a detection operation on its own resource under the instruction of the distributed software information, thereby ensuring that the electronic device 6 can download or install the target software in a specified state.
The software information distribution can be configured according to specific requirements. For example, the distribution software information may include one or more of:
(1) the file size of the target software is used for indicating the physical storage capacity required for storing the target software;
(2) the storage path of the target software is used for indicating the storage path and/or the installation path and the like of the target software;
(3) an execution mode for instructing the electronic device 6 under which conditions to execute the installation operation, or what installation mode to execute;
(4) a memory occupancy rate threshold value, configured to indicate a highest memory occupancy rate when the electronic device 6 installs the target software;
(5) and the time interval is used for indicating when the resource detection operation is carried out or executing relevant operations such as downloading and installation of the target software.
Step S302, performing resource detection operation on the electronic equipment according to the distributed software information, and executing downloading operation and/or installation operation of target software based on the resource detection operation.
The electronic device 6, receiving the distribution software information sent by the server, may perform the following operations:
(1) analyzing the distributed software information to obtain one or more indication parameters;
(2) starting corresponding resource detection operation according to the indication parameters, and detecting the software or hardware state of the device;
(3) judging whether the software or hardware requirements corresponding to part of the indication parameters are met;
(4) if so, the associated operation of the part of the indication parameters is started, such as the downloading operation of the target software.
(5) If not, the association operation of the part of the indication parameters is not started, for example, the downloading operation of the target software is not executed.
Based on the software installation method of the embodiment, the electronic device 6 may download or install the target software according to the installation instruction desired by the server, in case that it is detected that the device resource meets the specific requirement, for example, in the idle state of the electronic device 6. That is, the solution described in this embodiment may be based on the software distribution information issued by the server, and may also consider normal operation of the device and downloading and installation of the target software, so that the user experience is good.
As an example, the distribution software information includes a file size of the target software. As shown in fig. 4, the step S302 may include steps S400 to S404. Step S400, detecting the disk residual space of the disk; step S400, determining whether to execute the downloading operation of the target software according to the residual space of the disk and the size of the file; step S404, if it is determined that the downloading operation of the target software is executed, downloading the target software from the server. In this embodiment, the electronic device 6 may first determine whether the disk thereof has enough space to store the target software. If the magnetic disk has enough space to store the target software, the electronic device 6 may send a download request of the target software to the server to execute a download operation. If the disk does not have enough space to store the target software, the downloading operation is not executed to prevent the target software from being downloaded unsuccessfully or equipment failure caused by the fact that the disk space is completely occupied after downloading, or the software with the same name of the target software in the disk is deleted under the instruction of the server.
As an example, the distribution software information includes a file size and a deposit path of the target software. As shown in fig. 5, the step S302 may include steps S500 to S506. Step S500, determining a target partition used for storing the target software in the disk according to the storage path; step S502, detecting the disk residual space of the target partition; step S504, according to the residual space of the magnetic disk and the size of the file, whether to execute the downloading operation of the target software is determined; and step S506, if the downloading operation of the target software is determined to be executed, downloading the target software from the server. In this embodiment, the electronic device 6 may first determine whether the target partition has enough space to store the target software. If the target partition has enough space to store the target software, the electronic device 6 may send a download request of the target software to the server to execute a download operation. If the target partition does not have enough space to store the target software, the downloading operation is not executed to prevent the target software from being downloaded unsuccessfully or equipment failure caused by the fact that the disk space is completely occupied after downloading, or the homonymous software of the target software in the disk is deleted under the instruction of the server, and the like. In addition, when the target partition does not have enough space to store the target software, the electronic device 6 may also send the states of the target partition and other partitions to the server, so that the server determines whether to change the storage or installation path of the target software.
As an example, the distribution software information includes a memory occupancy threshold. As shown in fig. 6, the step S302 may include steps S600 to S604. Step S600, when the target software is downloaded, detecting the current memory occupancy rate of a memory; step S602, determining whether to execute the installation operation of the target software according to the current memory occupancy rate and the memory occupancy rate threshold value; and step S604, if the installation operation of the target software is determined to be executed, the downloaded target software is subjected to installation operation. In this embodiment, after the target software is completely downloaded, the electronic device 6 needs to detect the current memory occupancy rate of the memory thereof. When the current memory occupancy rate is too high, it indicates that the electronic device 6 is in a high load state. In the high load state, the target software may be installed to cause installation failure and affect normal use of the device. In this embodiment, to solve this problem, when the current memory occupancy rate is lower than the memory occupancy rate threshold, the installation operation of the target software is started. Of course, in other embodiments, the memory occupancy threshold may be adjustable, for example, based on the importance of the target software. For example, when the target software is a major security patch, the memory occupancy threshold may be dynamically increased, so as to fix a bug in time.
As an example, as shown in fig. 7, the step S302 may further include a step S606. Wherein, in step S606: and if the installation operation of the target software is determined not to be executed, detecting the current memory occupancy rate at a preset frequency until the current memory occupancy rate is smaller than the memory occupancy rate threshold value and determining to execute the installation operation. By the method, the influence on the operation of the equipment caused by too frequent detection operation can be prevented. In other embodiments, the preset frequency may be dynamically adjusted according to the importance urgency level and the file size of the target software. For example, when the target software is a major security patch, the frequency of detecting the current memory occupancy rate may be increased. When the target software is large, the frequency of detecting the current memory occupancy rate can be reduced.
As an example, the distribution software information further includes a time interval for instructing the electronic device to perform the resource detection operation within the time interval, and to perform a download operation and/or an installation operation of the target software. It will be appreciated that during busy periods, the device resources may not meet the download and installation requirements on a frequent basis. Therefore, the embodiment can avoid frequent detection of the resource detection operation in the busy period so as to increase the installation success probability.
As an example, the distribution software information further includes an execution mode, which is used for indicating an installation mode of the electronic device after the target software download is completed. The embodiment is to provide various modes so that a user can flexibly select according to the requirement.
As shown in fig. 8, a specific example is provided below for ease of understanding.
Step S800, receiving distribution software information.
Step S802, detecting the disk residual space of the disk or the target partition.
Step S804, determining whether the disk remaining space can store the target software, for example, whether the disk remaining space is larger than the size of the target software file. If the target software can be stored, the step S806 is entered, otherwise, the process ends.
Step S806, downloading the target software.
Step S808, determining whether the current memory occupancy rate is less than the memory occupancy rate threshold. If not, the process proceeds to step S810, otherwise, the process proceeds to step S812.
Step S812, wait for a certain period of time, e.g., 1 minute, 3 minutes, etc. Step S808 is skipped.
Step S812, executing the installation operation of the target software.
According to the method, the size of the disk and the size of the memory are combined to download and install the target software, so that the installation power of the target software is effectively improved, the negative influence of software downloading and installation on equipment operation is reduced, and the user experience is improved.
Example two
Fig. 9 schematically shows a block diagram of a software installation system according to the second embodiment of the present application, which may be divided into one or more program modules, and the one or more program modules are stored in a storage medium and executed by one or more processors to implement the embodiments of the present application. The program modules referred to in the embodiments of the present application refer to a series of computer program instruction segments that can perform specific functions, and the following description will specifically describe the functions of the program modules in the embodiments.
As shown in fig. 9, the software installation system 900 may include a receiving module 902 and an executing module 904, wherein:
a receiving module 902, configured to receive distribution software information sent by a server; and
an executing module 904, configured to perform a resource detection operation on the electronic device according to the software distribution information, and execute a downloading operation and/or an installing operation of the target software based on the resource detection operation. .
In an exemplary embodiment, the distribution software information includes a file size of the target software. The executing module 904 is further configured to: detecting the disk residual space of the disk; determining whether to execute the downloading operation of the target software according to the residual space of the disk and the size of the file; and if the downloading operation of the target software is determined to be executed, downloading the target software from the server.
In an exemplary embodiment, the distribution software information includes a file size and a deposit path of the target software. The executing module 904 is further configured to: determining a target partition used for storing the target software in a disk according to the storage path; detecting the disk residual space of the target partition; determining whether to execute the downloading operation of the target software according to the residual space of the disk and the size of the file; and if the downloading operation of the target software is determined to be executed, downloading the target software from the server.
In an exemplary embodiment, the distribution software information further includes a memory occupancy threshold. The executing module 904 is further configured to: when the target software is downloaded, detecting the current memory occupancy rate of a memory; determining whether to execute the installation operation of the target software according to the current memory occupancy rate and the memory occupancy rate threshold value; and if the installation operation of the target software is determined to be executed, the downloaded target software is subjected to installation operation.
In an exemplary embodiment, the executing module 904 is further configured to: and if the installation operation of the target software is determined not to be executed, detecting the current memory occupancy rate at a preset frequency until the current memory occupancy rate is smaller than the memory occupancy rate threshold value and determining to execute the installation operation.
In an exemplary embodiment, the distribution software information further includes a time interval for instructing the electronic device to perform the resource detection operation and to perform the downloading operation and/or the installing operation of the target software within the time interval.
In an exemplary embodiment, the software information distribution further includes an execution mode for indicating an installation mode of the electronic device after the target software download is completed.
EXAMPLE III
Fig. 10 schematically shows a hardware architecture diagram of a computer device 1000 adapted to implement the software installation method according to the third embodiment of the present application. The computer device 1000 may be an electronic device 6, such as may be part of the electronic device 6. In this embodiment, the computer device 1000 is a device capable of automatically performing numerical calculation and/or information processing in accordance with a command set in advance or stored. For example, the server may be 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), a gateway, and the like. As shown in fig. 10, the computer device 1000 includes at least, but is not limited to: the memory 1010, processor 1020, network interface 1030, and vibrating element 1040 may be communicatively linked to each other via a system bus. Wherein:
the memory 1010 includes at least one type of computer-readable storage medium including flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), Static Random Access Memory (SRAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Programmable Read Only Memory (PROM), magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the storage 1010 may be an internal storage module of the computer device 1000, such as a hard disk or a memory of the computer device 1000. In other embodiments, the memory 1010 may be an external storage device of the computer device 1000, such as a plug-in hard disk provided on the computer device 1000, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Of course, the memory 1010 may also include both internal and external memory modules of the computer device 1000. In this embodiment, the memory 1010 is generally used for storing an operating system installed in the computer device 1000 and various types of application software, such as program codes of a software installation method. In addition, the memory 1010 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 1020 may be, in some embodiments, a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor, or other data Processing chip. The processor 1020 is generally configured to control the overall operation of the computer device 1000, such as performing control and processing related to data interaction or communication with the computer device 1000. In this embodiment, the processor 1020 is configured to execute program codes stored in the memory 1010 or process data.
The network interface 1030 may comprise a wireless network interface or a wired network interface, with the network interface 1030 typically being used to establish communications links between the computer device 1000 and other computer devices. For example, the network interface 1030 is used to connect the computer apparatus 1000 to an external terminal via a network, establish a data transmission channel and a communication link between the computer apparatus 1000 and the external terminal, and the like. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth (Bluetooth), or Wi-Fi.
It should be noted that FIG. 10 only shows a computer device having components 1010 and 1030, but it should be understood that not all of the shown components are required and that more or fewer components may be implemented instead.
In this embodiment, the software installation method stored in the memory 1010 may be further divided into one or more program modules and executed by one or more processors (in this embodiment, the processor 1020) to implement the embodiments of the present application.
Example four
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the software installation method in the embodiments.
In this embodiment, the computer-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 computer readable storage medium may be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. In other embodiments, the computer readable storage medium may be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the computer device. Of course, the computer-readable storage medium may also include both internal and external storage devices of the computer device. In this embodiment, the computer-readable storage medium is generally used for storing an operating system and various types of application software installed in the computer device, for example, the program code of the software installation method in the embodiment, and the like. Further, the computer-readable storage medium may also be used to temporarily store various types of data that have been output or are to be output.
It will be apparent to those skilled in the art that the modules or steps of the embodiments of the present application described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different from that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, embodiments of the present application are not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are included in the scope of the present application.