Software distribution method, system and equipment and computer readable storage medium
By determining the host of software installed in the computer network and using it for software distribution, the problem of cumbersome and inefficient installation of multiple computer software is solved, and efficient software distribution and network resource optimization are achieved.
Patent Information
- Application Number
- CN202411344947.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-01-03
AI Technical Summary
In the prior art, the installation of software for multiple computers is complicated and inefficient, resulting in a large workload for administrators and high network bandwidth consumption.
By obtaining information of each host in the network segment, a first host is determined for downloading and installing software packages, and using the host to broadcast instructions within its network segment, so that the host without software is not installed to download and install software from the installed host. , realize the automated distribution of software.
It improves software distribution efficiency, reduces the waste of resources for human participation and the load pressure of management equipment, optimizes network bandwidth utilization, and ensures that each host installs software in a timely manner.
Smart Images

Figure CN119248298A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a software distribution method, system, device and computer-readable storage medium. Background Art
[0002] With the continuous development of computer technology, network security has received more and more attention from users. Therefore, installing protection software on computers is crucial to the security of computer systems and personal data.
[0003] Since there may be a situation where multiple computers all need to install protection software, the user needs to manually download the installation package of the protection software on each computer one by one and install the software, which makes the entire implementation process relatively cumbersome and inefficient. Summary of the invention
[0004] In view of the above problems, the embodiments of the present invention provide a software distribution method, system, device and computer-readable storage medium, which are used to solve the technical problems existing in the prior art such as cumbersome and inefficient installation of software for multiple hosts.
[0005] According to a first aspect of an embodiment of the present invention, there is provided a software distribution method, which is applied to a control device, and the method includes:
[0006] Obtain host information of each host in at least one network segment;
[0007] For each network segment, according to the host information of each host in the network segment, determine a first host in the network segment for downloading and installing a software package;
[0008] Sending a first instruction to each first host in the at least one network segment, wherein the first instruction is used to instruct the first host to obtain the software package from the control device and install it;
[0009] After receiving the first installation completion information of the first host, a second instruction is sent to the first host, the second instruction is used to instruct the first host to broadcast a third instruction to the network segment where the first host is located, and the third instruction is used to instruct the hosts in the network segment that do not have the software installed to download and install the software package from the host that sends the third instruction.
[0010] According to a second aspect of an embodiment of the present invention, a software distribution method is provided, which is applied to any first host, and the method includes:
[0011] receiving a first instruction sent by a control device, wherein the first instruction is an instruction generated by the control device after determining the first host in the network segment for downloading and installing a software package based on host information of each host in the network segment where the first host is located, and the first instruction is used to instruct the first host to obtain the software package from the control device and install it;
[0012] According to the first instruction, the software package is obtained from the control device and installed, and after the installation is completed, first installation completion information is sent to the control device;
[0013] After the control device receives the first installation completion information, it receives a second instruction sent by the control device, wherein the second instruction is used to instruct the first host to broadcast a third instruction to the network segment where the first host is located, and the third instruction is used to instruct hosts in the network segment that do not have the software installed to download and install the software package from the host that sends the third instruction.
[0014] According to a third aspect of an embodiment of the present invention, a software distribution method is provided, which is applied to any second host, and the method includes:
[0015] Acquire a third instruction broadcasted in the network segment where the first host is located, the third instruction being used to instruct a host in the network segment that has not installed the software to download and install the software package from the host that sends the third instruction, the third instruction being an instruction generated after the first host receives the first instruction and downloads and installs the software package from the control device, the first instruction being an instruction generated after the control device determines the first host in the network segment for downloading and installing the software package based on host information of each host in the network segment where the first host is located, and the second host and the first host are located in the same network segment;
[0016] According to the third instruction, an installation request is sent to a host in the network segment on which the software has been installed;
[0017] The software package is obtained from any host that has installed the software and after installation, second installation completion information is sent to the control device, and a third instruction is sent to the network segment.
[0018] According to a fourth aspect of an embodiment of the present invention, there is provided a software distribution apparatus, which is applied to a control device, and the apparatus includes:
[0019] An acquisition module, used to acquire host information of each host in at least one network segment;
[0020] A determination module, configured to determine, for each network segment, a first host in the network segment for downloading and installing a software package according to host information of each host in the network segment;
[0021] a sending module, configured to send a first instruction to each first host in the at least one network segment, wherein for each first host, the first instruction is used to instruct the first host to obtain the software package from the control device and install it;
[0022] The sending module is also used to send a second instruction to the first host after receiving the first installation completion information of the first host, the second instruction is used to instruct the first host to broadcast a third instruction to the network segment where the first host is located, and the third instruction is used to instruct the hosts in the network segment that do not have the software installed to download and install the software package from the host that sends the third instruction.
[0023] According to a fifth aspect of an embodiment of the present invention, there is provided a software distribution device, which is applied to any first host, and the device includes:
[0024] an acquisition module, configured to receive a first instruction sent by a control device, wherein the first instruction is an instruction generated by the control device after determining the first host in the network segment for downloading and installing a software package based on host information of each host in the network segment where the first host is located, and the first instruction is used to instruct the first host to obtain and install the software package from the control device;
[0025] a sending module, configured to obtain the software package from the control device and install the software package according to the first instruction, and send first installation completion information to the control device after the installation is completed;
[0026] The acquisition module is also used to receive a second instruction sent by the control device after the control device receives the first installation completion information, the second instruction being used to instruct the first host to broadcast a third instruction to the network segment where the first host is located, and the third instruction being used to instruct the hosts in the network segment that do not have the software installed to download and install the software package from the host that sends the third instruction.
[0027] According to a sixth aspect of an embodiment of the present invention, there is provided a software distribution device, which is applied to any second host, and the device includes:
[0028] an acquisition module, configured to acquire a third instruction broadcasted in a network segment where a first host is located, the third instruction being used to instruct a host in the network segment that has no software installed to download and install the software package from a host that sends the third instruction, the third instruction being an instruction generated after the first host receives the first instruction and downloads and installs the software package from a control device, the first instruction being an instruction generated after the control device determines the first host in the network segment for downloading and installing the software package based on host information of each host in the network segment where the first host is located, and the second host and the first host are located in the same network segment;
[0029] A sending module, configured to send an installation request to a host in the network segment on which the software has been installed according to the third instruction;
[0030] The sending module is also used to obtain the software package from any host that has installed the software and, after installation, send second installation completion information to the control device and send a third instruction to the network segment where the software package is located.
[0031] According to a seventh aspect of an embodiment of the present invention, there is provided a software distribution system, the system comprising: a control device, a first host, and a second host;
[0032] The control device is used to execute the method described in the first aspect;
[0033] The first host is used to execute the method described in the second aspect;
[0034] The second host is used to execute the method described in the third aspect.
[0035] According to an eighth aspect of an embodiment of the present invention, there is provided an electronic device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;
[0036] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the operations of the software distribution method as described in the first to fourth aspects.
[0037] According to a ninth aspect of an embodiment of the present invention, there is provided a computer-readable storage medium, wherein the storage medium stores at least one executable instruction, wherein the executable instruction enables a device / apparatus to perform the operations of the software distribution method as described in the first to fourth aspects.
[0038] The software distribution method, system, device and computer-readable storage medium provided by the embodiments of the present invention can enable the control device to determine the first host for downloading and installing the software package on each network segment based on the host information of each host on at least one network segment obtained, and enable each first host to install the software first. Then, based on each first host, other hosts on their respective network segments are controlled to install the software, thereby improving the distribution efficiency to ensure that each host can obtain and install the required software in a timely and effective manner, while avoiding the waste of resources caused by human participation in the entire process, and reducing the load pressure of the management device required to install all hosts and the pressure of network bandwidth consumption.
[0039] The above description is only an overview of the technical solution of the embodiment of the present invention. In order to more clearly understand the technical means of the embodiment of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present invention. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings. In the accompanying drawings:
[0041] Figure 1 A flowchart of a first embodiment of a software distribution method provided by the present invention is shown;
[0042] Figure 2 A flowchart of a second embodiment of the software distribution method provided by the present invention is shown;
[0043] Figure 3 A flowchart of a third embodiment of the software distribution method provided by the present invention is shown;
[0044] Figure 4 A schematic diagram showing the structure of the software distribution system provided by the present invention is shown;
[0045] Figure 5 A flowchart of a fourth embodiment of the software distribution method provided by the present invention is shown;
[0046] Figure 6 A schematic structural diagram of a first embodiment of a software distribution device provided by the present invention is shown;
[0047] Figure 7 A schematic diagram showing the structure of a second embodiment of a software distribution device provided by the present invention is shown;
[0048] Figure 8 A schematic structural diagram of a third embodiment of a software distribution device provided by the present invention is shown;
[0049] Fig. 9 A schematic structural diagram of an embodiment of the electronic device of the present invention is shown. DETAILED DESCRIPTION
[0050] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0051] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0052] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the embodiments provided herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the embodiments provided below are partial embodiments for implementing the present invention, rather than providing all embodiments for implementing the present invention. In the absence of conflict, the technical solutions recorded in the embodiments of the present invention can be implemented in any combination.
[0053] It should be noted that, in the embodiments of the present invention, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a method or apparatus including a series of elements includes not only the elements explicitly recorded, but also includes other elements not explicitly listed, or also includes elements inherent to the implementation of the method or apparatus. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other related elements (such as steps in a method or modules in an apparatus, such as a module that can be a part of a circuit, a part of a processor, a part of a program or software, etc.) in the method or apparatus including the element.
[0054] For example, the software distribution method provided by the embodiment of the present invention includes a series of steps, but the software distribution method provided by the embodiment of the present invention is not limited to the steps described in this document. Similarly, the software distribution device provided by the embodiment of the present invention includes a series of modules, but the software distribution device provided by the embodiment of the present invention is not limited to including the modules explicitly described, and may also include modules required to obtain relevant information or perform processing based on information.
[0055] Before introducing the software distribution method, the application background of the present invention is first explained.
[0056] The installation of software applications is of great significance to the use of devices (i.e., hosts). When there are a large number of devices, it takes a lot of time to install software for each device. Therefore, there are usually the following two possible implementations:
[0057] 1. Manual installation: The administrator manually downloads the software installation package on each host, or uses the command line to install the agent;
[0058] 2. Remote push: The administrator writes automated installation scripts and executes these scripts in batches through management tools to install the software agent on all target hosts at the same time.
[0059] Then, in actual implementation, the related technologies have the following technical problems:
[0060] 1. Although the manual installation method is intuitive and simple, it undoubtedly increases a lot of manpower and workload for administrators, especially when managing a large number of hosts, the efficiency is extremely low;
[0061] 2. The remote push method is more efficient than manual push, but when deployed on a large scale, it will bring a higher load to the host of the management software, and will also put greater pressure on the network bandwidth, affecting the overall network performance.
[0062] Based on the above technical problems, the technical concept of the present invention is as follows: during large-scale deployment, the management device can determine the host where the software is installed for the first time in each network segment based on different network segments, and install the software on the host, so as to reduce the load pressure of the management device that needs to install all hosts, and the pressure of network bandwidth consumption; then, the host with the software installed is used to provide software installation services to other hosts in the corresponding network segment, and provide software installation services to achieve installation of all hosts.
[0063] The technical solution of the present invention is described in detail below through specific embodiments. The execution subject of the present invention is an electronic device, which can be a control device or a host in the following implementation, etc. The execution subject is different based on the solutions of the corresponding embodiments.
[0064] It should be noted that the following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0065] Figure 1 A flowchart of a first embodiment of the software distribution method provided by the present invention is shown. Figure 1 As shown, the method comprises the following steps:
[0066] The interaction between the first host and the control device is used for illustration.
[0067] Step 11, the control device obtains host information of each host in at least one network segment;
[0068] In this step, the control device provides software installation services for each host. In order to accurately install software for each host, it is necessary to obtain host information corresponding to all hosts.
[0069] Optionally, the control device may control all hosts in at least one network segment; the host information may be basic information of the host.
[0070] In a possible implementation, it may be resource usage information and software information; the software information may include: whether the software exists, and the software version when the software exists, etc.; it may also include: Internet Protocol (IP) address, operating system version, etc.
[0071] The network segment may be a part of the pre-division of the IP address space to facilitate management and allocation of software installation. That is, the hosts in the IP address space controlled by the control device are the hosts on each network segment.
[0072] Optionally, step 11 may be implemented as follows:
[0073] Step 1: broadcast query information to at least one network segment at a preset frequency, where the query information is used to request host information of each host;
[0074] In this implementation, for each network segment, all hosts in the network can be dynamically discovered and identified by periodically polling the current network segment and sending query information, such as broadcast packets.
[0075] Step 2: Receive host information sent by each host in at least one network segment.
[0076] In this implementation, the host information of each host, such as the IP address and operating system version, is obtained to provide support for subsequent software installation.
[0077] Step 12: For each network segment, the control device determines the first host in the network segment for downloading and installing the software package according to the host information of each host in the network segment;
[0078] In this step, for each network segment, in order to determine the host in the network segment that is beneficial to providing installation services to other hosts, it is necessary to obtain host information based on each host obtained in the network segment, and determine the host used to download and install the software package, which is recorded as the first host.
[0079] In order to effectively balance the network load and avoid excessive pressure on a single point, the first host can be determined in each network segment.
[0080] For example, the software can be protection software, application software, management software, etc.
[0081] The number of the first hosts may be one or more.
[0082] Step 13: The control device sends a first instruction to each first host in at least one network segment;
[0083] Among them, for each first host, the first instruction is used to instruct the first host to obtain and install the software package from the control device; the first instruction is an instruction generated by the control device after determining the first host in the network segment for downloading and installing the software package based on the host information of each host in the network segment where the first host is located.
[0084] In this step, for each network segment, after the control device determines the first host, it sends a first instruction to the first host, and then the first host receives the first instruction.
[0085] Step 14: The first host obtains the software package from the control device according to the first instruction and installs it, and after the installation is completed, sends first installation completion information to the control device;
[0086] In this step, after receiving the first instruction, the first host downloads the software package from the control device and installs the software.
[0087] Optionally, the installation may be implemented by dynamically adjusting the installation parameters of the software package according to the operating system version and hardware configuration of the first host to ensure that the installation process is completed smoothly.
[0088] Furthermore, after completion, relevant information about the installation completion is returned to the control device, which is recorded as first installation completion information, so as to facilitate the management and maintenance of the first host by the control device.
[0089] In addition, the returned information may also include the running status of the software after installation, so that the user can understand the running status of the software.
[0090] Step 15: After receiving the first installation completion information from the first host, the control device sends a second instruction to the first host;
[0091] The second instruction is used to instruct the first host to broadcast the third instruction to the network segment where the first host is located, and the third instruction is used to instruct other hosts in the network segment that have not installed the software to download and install the software package from the host that has installed the software.
[0092] Here, the host on which the software has been installed may be the first host.
[0093] In this step, after the first host completes the software installation, the control device will send a second instruction to the first host so that the second instruction can access all IPs (i.e. all hosts) in the network segment to broadcast the third instruction. This broadcast mechanism ensures that hosts in the network segment that have not installed the software can promptly discover and obtain the installation package.
[0094] Optionally, the download can be implemented based on a peer-to-peer (P2P) protocol, through which other hosts can download the software package in parallel from the installed host. This method can make full use of network resources, significantly increase the download speed, and reduce the load on a single host.
[0095] In one implementation, the third instruction carries basic information required for downloading the software, such as a download address, a file verification code, and the like.
[0096] The software package may be an agent package.
[0097] According to the software distribution method provided by the embodiment of the present invention, a control device obtains host information of each host in at least one network segment, and for each network segment, the control device determines a first host in the network segment for downloading and installing a software package based on the host information of each host in the network segment, and the control device sends a first instruction to each first host in the at least one network segment, wherein for each first host, the first instruction is used to instruct the first host to obtain the software package from the control device and install it, and then the first host receives the first instruction sent by the control device, and then the first host obtains the software package from the control device and installs it according to the first instruction, and after the installation is completed, sends a first installation completion message to the control device, and finally, after receiving the first installation completion message from the first host, the control device sends a second instruction to the first host, and the second instruction is used to instruct the first host to broadcast a third instruction to the network segment where the first host is located, and the third instruction is used to instruct other hosts in the network segment to download and install the software package from the host that sends the third instruction. In this embodiment, the control device can determine the first host for downloading and installing the software package on each network segment based on the host information of each host on at least one network segment obtained, and enable each first host to install the software first. Then, based on each first host, other hosts on their respective network segments are controlled to install the software, thereby improving the distribution efficiency to ensure that each host can obtain and install the required software in a timely and effective manner, while avoiding the waste of resources caused by human participation in the entire process and reducing the load pressure of the management device required to install all hosts and the pressure of network bandwidth consumption.
[0098] Based on the above implementation, Figure 2 A flowchart of a second embodiment of the software distribution method provided by the present invention is shown. Figure 2 As shown, the above step 12 includes the following steps:
[0099] The execution subject is a control device; the following embodiments are described for any network segment.
[0100] Step 21: taking a host whose software information does not contain the software corresponding to the installation package, or / and a host whose software version in the software information is inconsistent with the version of the software corresponding to the installation package, as at least one candidate host for the software package to be installed in the network segment;
[0101] In this step, when determining the first host, it is first necessary to determine the host on which the software needs to be installed in the network segment, which is recorded as a candidate host.
[0102] Optionally, the software information may be information displayed in the host computer indicating whether the software exists, or whether the version of the existing software is consistent with the version to be installed.
[0103] For example, if the software information in host 01 shows that the software does not exist, then host 01 can be used as a candidate host; for another example, if the software information in host 02 shows that the software version is too low, then host 02 can be used as a candidate host.
[0104] It should be understood that each host corresponds to a different IP address.
[0105] Step 22: Determine the candidate host with the smallest resource occupancy information among the candidate hosts as the first host in the network segment for downloading and installing the software package.
[0106] In this step, in order to improve installation efficiency, a predetermined algorithm may be used to determine a host in the network segment that can represent the control device for installation from at least one candidate host, and use it as a representative to download and install the initial agent package.
[0107] Optionally, the predetermined algorithm is determined based on resource occupancy information. One implementation is that the resource occupancy information of the host shows that the lower the current resource occupancy is, the more suitable it is to provide installation services for the network segment.
[0108] Exemplarily, the resource usage information may be processor usage, memory usage, network bandwidth, and the like.
[0109] For example, if the current processor usage is low, more available capacity can be provided, providing higher efficiency for the installation service; the current memory usage shows that the more available memory is, the higher the available space is provided for the installation service, and so on.
[0110] In a possible implementation, the candidate host whose resource occupation information shows that the current resource occupation is lower is selected as the first host.
[0111] The software distribution method provided by the embodiment of the present invention controls the host whose software information does not contain the software corresponding to the installation package, or / and the host whose software version in the software information is inconsistent with the version of the software corresponding to the installation package, as at least one candidate host for the software package to be installed in the network segment, and then determines the candidate host with the smallest resource occupancy information among the candidate hosts as the first host in the network segment for downloading and installing the software package. In this embodiment, for each network segment, the candidate hosts that need to install the software are first determined, and based on the resource occupancy information of these hosts, the hosts suitable for installation by the controlled device and as the hosts that subsequently provide installation services for the network segment are determined, which can improve the distribution efficiency.
[0112] Based on the above implementation, Figure 3 A flowchart of a third embodiment of the software distribution method provided by the present invention is shown. Figure 3 As shown, the method further comprises the following steps:
[0113] The interaction between a first host and a second host is used for illustration, and the first host and the second host are located in the same network segment.
[0114] Step 31, the first host broadcasts the third instruction to the network segment where the first host is located;
[0115] Among them, the third instruction is an instruction generated after the first host receives the first instruction and downloads and installs the software package from the control device, and the first instruction is an instruction generated by the control device after determining the first host in the network segment for downloading and installing the software package based on the host information of each host in the network segment where the first host is located.
[0116] In this step, after the first host completes the software installation, it broadcasts the third instruction to the network segment where it is located, so that the hosts that have not installed the software can download and install the software from the host that broadcasts the third instruction.
[0117] Step 32: The second host obtains the third instruction broadcasted in the network segment where the first host is located;
[0118] In this step, the second host monitors the network segment in real time and obtains the third instruction;
[0119] Among them, the third instruction can be sent from the first host or from other hosts that have installed the software, which can be known based on the download address obtained by parsing.
[0120] Step 33: The second host sends an installation request to the host in the network segment that has installed the software according to the third instruction;
[0121] In this step, the second host parses the third instruction, and then sends an installation request to the host in the network segment that has installed the software, that is, initiates a request to the download address in the third instruction to obtain the software package.
[0122] Optionally, if the first host receives the installation request, the software package is sent to the second host.
[0123] In this implementation, if the download address indicates the first host in the network segment, the installation request is sent to the first host, and after the first host obtains the software package, the software package is sent to the second host.
[0124] Step 34: The second host obtains the software package from any host that has installed the software and after installing it, sends a second installation completion message to the control device and sends a third instruction to the network segment where it is located.
[0125] In this step, after the host with the installed software obtains the installation request, it sends the installation package to the second host so that the second host performs the installation based on the installation package. After the installation is completed, the installation completion information is sent to the control device, recorded as the second installation completion information, to facilitate the management and maintenance of the control device.
[0126] Furthermore, if the second host is a host on which the software has been installed, the following implementation may also be included:
[0127] Step 1: The second host receives an installation request sent by any host that does not have the software installed;
[0128] In this implementation, the second host has already installed the software and can also provide installation services for hosts that have not installed the software, that is, it receives an installation request sent by any host that has not installed the software.
[0129] The installation request is a request sent by any host that has not installed the software to the second host corresponding to the download address carried in the third instruction received by the host.
[0130] Step 2: The second host sends a software package to the host without the software installed, so that the host without the software installed installs the software based on the installation package, sends third installation completion information to the control device, and sends a third instruction to the network segment.
[0131] In this implementation, after the second host sends the software package to the host that has not installed the software, the host that has not installed the software installs the software, and after the installation is complete, sends installation completion information to the control device, recorded as third installation completion information, to facilitate management and maintenance by the control device.
[0132] At this point, the host that has been successfully installed can also serve as the host on which the software has been installed.
[0133] Furthermore, the second host on which the software has been installed broadcasts a third instruction to the network segment where it is located to indicate that it is a host on which the software has been installed and can participate in the installation service for hosts on which the software has not been installed.
[0134] It should be understood that the third instruction carries the address of the host that sends the instruction, that is, the download address.
[0135] The software distribution method provided by the embodiment of the present invention is that the first host broadcasts the third instruction to the network segment where the first host is located, the second host obtains the third instruction broadcasted in the network segment where the first host is located, and then the second host sends an installation request to the host in the network segment that has installed the software according to the third instruction, and the second host obtains the software package from any host that has installed the software and after installing it, sends the second installation completion information to the control device, and sends the third instruction to the network segment where it is located. In this embodiment, after the second host obtains and installs the software from the first host, as a host that has installed the software, it participates in the installation steps of the host that has not installed the software, that is, the installed host is used as a distribution node, which significantly improves the efficiency and speed of software distribution, while reducing the dependence on the control device and optimizing the utilization of the overall network resources.
[0136] Based on the above implementation, Figure 4 The structural diagram of the software distribution system provided by the present invention is shown as follows: Figure 4 As shown, the system includes the following: a control device, a first host in each network segment, and a second host in each network segment.
[0137] Exemplarily, the control device is used to execute the software distribution method applied to the control device involved in the above embodiment; the first host is used to execute the software distribution method applied to the first host involved in the above embodiment; the second host is used to execute the software distribution method applied to the second host involved in the above embodiment.
[0138] Among them, the control device can be a host protection server (that is, the software can be protection software); the first host in each network segment and the second host in each network segment are both cloud hosts.
[0139] In one possible implementation, the host protection server sends a core script to each cloud host in each network segment, and determines the cloud host for initial installation in each network segment. The determined cloud host then requests the host protection server to download the agent package, and then broadcasts the agent package to each network segment. Each network segment downloads the agent package P2P to achieve the installation of protection software for all cloud hosts.
[0140] Among them, one implementation of the core script is the above-mentioned polling broadcast and security service agent installation.
[0141] Based on the above embodiments, Figure 5 A flowchart of a fourth embodiment of the software distribution method provided by the present invention is shown. Figure 5 As shown, a specific possible implementation of the software distribution method is described;
[0142] This includes control devices (such as host protection servers) and various hosts (such as various cloud hosts, including cloud hosts in various network segments).
[0143] Step 1: The host protection server sends core service scripts to each cloud host;
[0144] The main functions of the core service script include polling broadcast and security service agent installation. The core service script dynamically discovers and identifies all hosts in the network by regularly polling the current network segment and sending broadcast packets. This process ensures that basic information of each host, such as IP address and operating system version, can be obtained, providing necessary data support for subsequent agent installation.
[0145] Step 2: The host protection server determines the network segment representative (i.e., the first host) in each network segment;
[0146] Among them, by polling and broadcasting the collected host information, the core service script can accurately identify the target host and determine whether it needs to install the protection software agent; the core service script uses a custom intelligent algorithm to calculate the network segment where each IP is located, and selects an IP from each network segment as a representative to download the agent package. This method can effectively balance the network load and avoid excessive pressure on a single point.
[0147] Step 3: The network segment in the cloud host requests the host protection server to download the agent package;
[0148] Step 4: The host protection server sends an agent package to the network segment representative in the cloud host;
[0149] Step 5: The network segment representative in the cloud host broadcasts the agent package to the network segment;
[0150] Step 6: Execute the P2P download agent package in the network segment.
[0151] Among them, the target host selected in the above steps 3.4.5.6 will receive the agent package and automatically start the download and installation process; during the installation process, the script will dynamically adjust the installation parameters according to the operating system and hardware configuration of the target host to ensure the smooth completion of the installation process; after the installation is completed, the host will report the installation status to the core service script, including whether the installation is successful and the current running status, for subsequent management and maintenance; the P2P download mechanism makes the host with the agent installed become a new distribution node; the host without the agent installed receives the broadcast package from the installed host, which contains the basic information required for downloading, such as the download address, file verification code, etc.; the host without the agent installed initiates a request to the download address in the broadcast package through the P2P network to obtain the agent installation package; through the P2P protocol, the host without the agent installed can download the agent package from multiple installed hosts in parallel, which can make full use of network resources, significantly improve the download speed, and reduce the load of a single node; after the download is completed, the host without the agent installed automatically executes the installation process of the agent installation package and reports the installation status to the core service script.
[0152] The software distribution system and method provided by the embodiments of the present invention can achieve the following technical effects:
[0153] Technical effect 1. Intelligent distribution management: Through the intelligent algorithm and polling broadcast technology of the core service script, automatic identification of hosts in the network and accurate distribution of security service agents are achieved, ensuring that each host can obtain and install the required protection software in a timely and effective manner;
[0154] Technical effect 2: Efficient network resource utilization: The P2P download mechanism is adopted, and the installed host is used as the distribution node, which significantly improves the efficiency and speed of agent distribution, reduces the dependence on core services, and optimizes the overall network resource utilization;
[0155] Technical effect 3, automated deployment and adjustment: During the automated deployment of the security service agent, the installation parameters are dynamically adjusted according to the operating system and hardware environment of the target host, ensuring a safe and reliable installation process and reducing installation failures and maintenance costs caused by environmental differences;
[0156] Technical effect 4, security and stability guarantee: through strict security policies and status feedback mechanisms, ensure that the protection software agent installed on each host runs reliably, effectively preventing malicious attacks and security threats;
[0157] Technical effect 5, effectively integrates polling broadcast, intelligent algorithm, P2P download and other technologies to form an innovative distribution system, providing new solutions and technical paths for host security protection in large-scale network environments.
[0158] Figure 6 FIG. 1 is a schematic diagram showing the structure of the first embodiment of the software distribution device provided by the present invention. Figure 6 As shown, the device is applied to a control device, including:
[0159] An acquisition module 61, used to acquire host information of each host in at least one network segment;
[0160] A determination module 62, configured to determine, for each network segment, a first host in the network segment for downloading and installing a software package according to host information of each host in the network segment;
[0161] A sending module 63, configured to send a first instruction to each first host in at least one network segment, wherein for each first host, the first instruction is used to instruct the first host to obtain a software package from the control device and install it;
[0162] The sending module 63 is also used to send a second instruction to the first host after receiving the first installation completion information from the first host, the second instruction is used to instruct the first host to broadcast a third instruction to the network segment where the first host is located, and the third instruction is used to instruct the hosts in the network segment that have not installed the software to download and install the software package from the host that sends the third instruction.
[0163] In one or more embodiments, the determination module 62 is specifically configured to:
[0164] The host whose software information does not contain the software corresponding to the installation package, or / and the host whose software version in the software information is inconsistent with the version of the software corresponding to the installation package, is used as at least one candidate host for the software package to be installed in the network segment;
[0165] A candidate host with the smallest resource occupancy information among the candidate hosts is determined as a first host in the network segment for downloading and installing the software package.
[0166] In one or more embodiments, the acquisition module 61 is specifically configured to:
[0167] Broadcasting query information to at least one network segment at a preset frequency, the query information being used to request host information of each host;
[0168] Receive host information sent by each host in at least one network segment.
[0169] From the above, it can be seen that the software distribution device provided by the embodiment of the present invention enables the control device to determine the first host for downloading and installing the software package on each network segment based on the host information of each host on at least one network segment obtained, and enable each first host to install the software first. Then, based on each first host, other hosts on their respective network segments are controlled to install the software, thereby improving the distribution efficiency to ensure that each host can obtain and install the required software in a timely and effective manner, while avoiding the waste of resources caused by human participation in the entire process, and reducing the load pressure of the management device required to install all hosts and the pressure of network bandwidth consumption.
[0170] Figure 7 FIG. 2 is a schematic diagram showing the structure of a second embodiment of the software distribution device provided by the present invention. Figure 7 As shown, applied to any first host, the device includes:
[0171] an acquisition module 71, configured to receive a first instruction sent by a control device, the first instruction being an instruction generated by the control device after determining a first host in the network segment for downloading and installing a software package based on host information of each host in the network segment where the first host is located, and the first instruction being configured to instruct the first host to obtain and install the software package from the control device;
[0172] The sending module 72 is used to obtain and install the software package from the control device according to the first instruction, and send first installation completion information to the control device after the installation is completed;
[0173] The acquisition module 71 is also used to receive a second instruction sent by the control device after the control device receives the first installation completion information, the second instruction is used to instruct the first host to broadcast a third instruction to the network segment where the first host is located, and the third instruction is used to instruct the hosts in the network segment that do not have the software installed to download and install the software package from the host that sends the third instruction.
[0174] In one or more embodiments, the sending module 72 is further configured to:
[0175] Broadcasting the third instruction to the network segment where the first host is located;
[0176] After receiving an installation request based on the third instruction from at least one second host among other hosts in the network segment, a software package is sent to the at least one second host.
[0177] From the above, it can be seen that the software distribution device provided in the embodiment of the present invention enables the first host to serve as a host for installing software for other hosts after the software is installed, thereby replacing the installation pressure on the control device side, reducing dependence on core services, and optimizing the utilization of overall network resources.
[0178] Figure 8 FIG. 2 is a schematic diagram showing the structure of the third embodiment of the software distribution device provided by the present invention. Figure 8 As shown, applied to any second host, the device includes:
[0179] an acquisition module 81, configured to acquire a third instruction broadcasted in the network segment where the first host is located, the third instruction being used to instruct a host in the network segment that has not installed the software to download and install the software package from the host that sends the third instruction, the third instruction being an instruction generated after the first host receives the first instruction and downloads and installs the software package from the control device, the first instruction being an instruction generated after the control device determines the first host in the network segment for downloading and installing the software package based on host information of each host in the network segment where the first host is located, and the second host and the first host are located in the same network segment;
[0180] A sending module 82, configured to send an installation request to a host in the network segment where the software has been installed according to a third instruction;
[0181] The sending module 82 is further configured to obtain a software package from any host that has installed the software and, after installing the software package, send a second installation completion message to the control device and send a third instruction to the network segment where the software package is located.
[0182] In one or more embodiments, if the second host is a host on which the software has been installed; the acquisition module 71 is further used to: receive an installation request sent by any host on which the software has not been installed;
[0183] The sending module 82 is further configured to send a software package to a host without software installed, so that the host without software installed installs the software based on the installation package, send third installation completion information to the control device, and send a third instruction to the network segment.
[0184] From the above, it can be seen that the software distribution device provided in the embodiment of the present invention enables the second host to provide installation services for other hosts that have not installed the software after the software is installed based on the first host, and when the software is not installed, it can also download and obtain the installation package from other hosts that have installed the software to achieve installation, thereby improving the source of installation.
[0185] It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, all or part of them can be integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software called by processing elements. They can also be implemented in the form of hardware. Some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. In addition, all or part of these modules can be integrated together or implemented independently. The processing element here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.
[0186] Fig. 9 The schematic diagram of the structure of an embodiment of the electronic device of the present invention is shown, and the specific embodiment of the present invention does not limit the specific implementation of the electronic device.
[0187] like Fig. 9 As shown, the electronic device may be the above-mentioned control device, the first host or the second host.
[0188] It may include: a processor (processor) 902 , a communication interface (Communications Interface) 904 , a memory (memory) 906 , and a communication bus 908 .
[0189] The processor 902, the communication interface 904, and the memory 906 communicate with each other via the communication bus 908. The communication interface 904 is used to communicate with other devices such as a client or other server network elements. The processor 902 is used to execute the program 910, which can specifically execute the relevant steps in the above method embodiment.
[0190] Specifically, the program 910 may include program code, which includes computer-executable instructions.
[0191] The processor 902 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiment of the present invention. The one or more processors included in the electronic device may be processors of the same type, such as one or more CPUs. They may also be processors of different types, such as one or more CPUs and one or more ASICs.
[0192] The memory 906 is used to store the program 910. The memory 906 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0193] The program 910 can be specifically called by the processor 902 to enable the electronic device to perform the following operations:
[0194] 1. When the electronic device is a control device, execute:
[0195] Obtain host information of each host in at least one network segment;
[0196] For each network segment, according to the host information of each host in the network segment, determine a first host in the network segment for downloading and installing a software package;
[0197] Sending a first instruction to each first host in the at least one network segment, wherein the first instruction is used to instruct the first host to obtain the software package from the control device and install it;
[0198] After receiving the first installation completion information of the first host, a second instruction is sent to the first host, the second instruction is used to instruct the first host to broadcast a third instruction to the network segment where the first host is located, and the third instruction is used to instruct the hosts in the network segment that do not have the software installed to download and install the software package from the host that sends the third instruction.
[0199] In one or more embodiments, determining, based on host information of each host in the network segment, a first host in the network segment for downloading and installing a software package includes:
[0200] A host on which the software corresponding to the installation package does not exist in the software information, or / and a host on which the software version in the software information is inconsistent with the version of the software corresponding to the installation package, is selected as at least one candidate host on which the software package is to be installed in the network segment;
[0201] A candidate host with the smallest resource occupancy information among the candidate hosts is determined as a first host in the network segment for downloading and installing the software package.
[0202] In one or more embodiments, obtaining host information of each host in at least one network segment includes:
[0203] broadcasting query information to the at least one network segment at a preset frequency, the query information being used to request obtaining host information of each host;
[0204] Receive host information sent by each host in the at least one network segment.
[0205] 2. When the electronic device is any first host, execute:
[0206] receiving a first instruction sent by a control device, wherein the first instruction is an instruction generated by the control device after determining the first host in the network segment for downloading and installing a software package based on host information of each host in the network segment where the first host is located, and the first instruction is used to instruct the first host to obtain the software package from the control device and install it;
[0207] According to the first instruction, the software package is obtained from the control device and installed, and after the installation is completed, first installation completion information is sent to the control device;
[0208] After the control device receives the first installation completion information, it receives a second instruction sent by the control device, wherein the second instruction is used to instruct the first host to broadcast a third instruction to the network segment where the first host is located, and the third instruction is used to instruct hosts in the network segment that do not have the software installed to download and install the software package from the host that sends the third instruction.
[0209] In one or more embodiments, the method further comprises:
[0210] Broadcasting a third instruction to the network segment where the first host is located;
[0211] After receiving an installation request based on the third instruction from at least one second host among other hosts in the network segment, the software package is sent to the at least one second host.
[0212] 3. When the electronic device is any second host, execute:
[0213] Acquire a third instruction broadcasted in the network segment where the first host is located, the third instruction being used to instruct a host in the network segment that has not installed the software to download and install the software package from the host that sends the third instruction, the third instruction being an instruction generated after the first host receives the first instruction and downloads and installs the software package from the control device, the first instruction being an instruction generated after the control device determines the first host in the network segment for downloading and installing the software package based on host information of each host in the network segment where the first host is located, and the second host and the first host are located in the same network segment;
[0214] According to the third instruction, an installation request is sent to a host in the network segment on which the software has been installed;
[0215] The software package is obtained from any host that has installed the software and after installation, second installation completion information is sent to the control device, and a third instruction is sent to the network segment.
[0216] In one or more embodiments, if the second host is a host on which software has been installed;
[0217] Accordingly, the method further includes:
[0218] Receive installation requests from any host that does not have the software installed;
[0219] The software package is sent to the host without the software installed, so that the host without the software installed installs the software based on the installation package, and third installation completion information is sent to the control device, and a third instruction is sent to the network segment.
[0220] From the above, it can be seen that the electronic device provided by the embodiment of the present invention can enable the control device to determine the first host for downloading and installing the software package on each network segment based on the host information of each host on at least one network segment obtained, and enable each first host to install the software first. Then, based on each first host, control other hosts on their respective network segments to install the software, thereby improving the distribution efficiency to ensure that each host can obtain and install the required software in a timely and effective manner, and avoid the waste of resources caused by human participation in the entire process, and reduce the load pressure of the management device required to install all hosts and the network bandwidth consumption pressure.
[0221] An embodiment of the present invention provides a computer-readable storage medium storing at least one executable instruction. When the executable instruction is executed on a software distribution apparatus / device, the software distribution apparatus / device executes the software distribution method in any of the above method embodiments.
[0222] The executable instructions can be specifically used to enable the software distribution device / equipment to perform the following operations:
[0223] 1. When the electronic device is a control device, or the software distribution device is a device corresponding to the control device, execute:
[0224] Obtain host information of each host in at least one network segment;
[0225] For each network segment, according to the host information of each host in the network segment, determine a first host in the network segment for downloading and installing a software package;
[0226] Sending a first instruction to each first host in the at least one network segment, wherein the first instruction is used to instruct the first host to obtain the software package from the control device and install it;
[0227] After receiving the first installation completion information of the first host, a second instruction is sent to the first host, the second instruction is used to instruct the first host to broadcast a third instruction to the network segment where the first host is located, and the third instruction is used to instruct the hosts in the network segment that do not have the software installed to download and install the software package from the host that sends the third instruction.
[0228] In one or more embodiments, determining, based on host information of each host in the network segment, a first host in the network segment for downloading and installing a software package includes:
[0229] A host on which the software corresponding to the installation package does not exist in the software information, or / and a host on which the software version in the software information is inconsistent with the version of the software corresponding to the installation package, is selected as at least one candidate host on which the software package is to be installed in the network segment;
[0230] A candidate host with the smallest resource occupancy information among the candidate hosts is determined as a first host in the network segment for downloading and installing the software package.
[0231] In one or more embodiments, obtaining host information of each host in at least one network segment includes:
[0232] broadcasting query information to the at least one network segment at a preset frequency, the query information being used to request obtaining host information of each host;
[0233] Receive host information sent by each host in the at least one network segment.
[0234] 2. When the electronic device is any first host, or the software distribution device is a device corresponding to the first host, execute:
[0235] receiving a first instruction sent by a control device, wherein the first instruction is an instruction generated by the control device after determining the first host in the network segment for downloading and installing a software package based on host information of each host in the network segment where the first host is located, and the first instruction is used to instruct the first host to obtain the software package from the control device and install it;
[0236] According to the first instruction, the software package is obtained from the control device and installed, and after the installation is completed, first installation completion information is sent to the control device;
[0237] After the control device receives the first installation completion information, it receives a second instruction sent by the control device, wherein the second instruction is used to instruct the first host to broadcast a third instruction to the network segment where the first host is located, and the third instruction is used to instruct hosts in the network segment that do not have the software installed to download and install the software package from the host that sends the third instruction.
[0238] In one or more embodiments, the method further comprises:
[0239] Broadcasting a third instruction to the network segment where the first host is located;
[0240] After receiving an installation request based on the third instruction from at least one second host among other hosts in the network segment, the software package is sent to the at least one second host.
[0241] 3. When the electronic device is any second host, or the software distribution device is a device corresponding to the second host, execute:
[0242] Acquire a third instruction broadcasted in the network segment where the first host is located, the third instruction being used to instruct a host in the network segment that has not installed the software to download and install the software package from the host that sends the third instruction, the third instruction being an instruction generated after the first host receives the first instruction and downloads and installs the software package from the control device, the first instruction being an instruction generated after the control device determines the first host in the network segment for downloading and installing the software package based on host information of each host in the network segment where the first host is located, and the second host and the first host are located in the same network segment;
[0243] According to the third instruction, an installation request is sent to a host in the network segment on which the software has been installed;
[0244] The software package is obtained from any host that has installed the software and after installation, second installation completion information is sent to the control device, and a third instruction is sent to the network segment.
[0245] In one or more embodiments, if the second host is a host on which software has been installed;
[0246] Accordingly, the method further includes:
[0247] Receive installation requests from any host that does not have the software installed;
[0248] The software package is sent to the host without the software installed, so that the host without the software installed installs the software based on the installation package, and third installation completion information is sent to the control device, and a third instruction is sent to the network segment.
[0249] From the above, it can be seen that the execution instructions in the computer-readable storage medium provided in the embodiment of the present invention can be specifically used to control the device based on the host information of each host on at least one network segment obtained, and the first host for downloading and installing the software package can be determined on each network segment, and each first host is given priority to install the software. Then, based on each first host, other hosts on their respective network segments are controlled to install the software, thereby improving the distribution efficiency to ensure that each host can obtain and install the required software in a timely and effective manner, and the whole process avoids the waste of resources caused by human participation, and reduces the load pressure of the management device required to install all hosts and the pressure of network bandwidth consumption.
[0250] An embodiment of the present invention provides a computer program product, including a computer program, which implements the operations of the above-mentioned software distribution method when executed by a processor.
[0251] Its implementation principle and technical effects are shown in the above disclosure.
[0252] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.
[0253] The methods disclosed in the various method embodiments provided by the present invention can be arbitrarily combined without conflict to obtain new method embodiments.
[0254] The features disclosed in the various product embodiments provided by the present invention can be arbitrarily combined without conflict to obtain new product embodiments.
[0255] The features disclosed in the various method or device embodiments provided by the present invention can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0256] It should be noted that the computer-readable storage medium may be a ROM, a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM), etc. It may also be various electronic devices including one or any combination of the above memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.
[0257] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0258] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0259] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus necessary general hardware nodes, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, vehicle terminal or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0260] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices, apparatuses, and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as a combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0261] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0262] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0263] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A software distribution method, characterized in that: Applied to a control device, the method comprises: Obtain host information of each host in at least one network segment; For each network segment, according to the host information of each host in the network segment, determine a first host in the network segment for downloading and installing a software package; Sending a first instruction to each first host in the at least one network segment, wherein the first instruction is used to instruct the first host to obtain the software package from the control device and install it; After receiving the first installation completion information of the first host, a second instruction is sent to the first host, the second instruction is used to instruct the first host to broadcast a third instruction to the network segment where the first host is located, and the third instruction is used to instruct the hosts in the network segment that do not have the software installed to download and install the software package from the host that sends the third instruction.
2. The method according to claim 1, characterized in that: The host information includes: software information and resource occupancy information; Correspondingly, determining a first host in the network segment for downloading and installing a software package according to host information of each host in the network segment includes: A host whose software information does not contain the software corresponding to the installation package, or / and a host whose software version in the software information is inconsistent with the version of the software corresponding to the installation package, is selected as at least one candidate host in the network segment for installing the software package; A candidate host with the smallest resource occupancy information among the candidate hosts is determined as a first host in the network segment for downloading and installing the software package.
3. The method according to claim 1 or 2, characterized in that: The obtaining of host information of each host in at least one network segment includes: broadcasting query information to the at least one network segment at a preset frequency, the query information being used to request obtaining host information of each host; Receive host information sent by each host in the at least one network segment.
4. A software distribution method, characterized in that: Applied to a first host, the method comprises: receiving a first instruction sent by a control device, wherein the first instruction is an instruction generated by the control device after determining the first host in the network segment for downloading and installing a software package based on host information of each host in the network segment where the first host is located, and the first instruction is used to instruct the first host to obtain the software package from the control device and install it; According to the first instruction, the software package is obtained from the control device and installed, and after the installation is completed, first installation completion information is sent to the control device; After the control device receives the first installation completion information, it receives a second instruction sent by the control device, wherein the second instruction is used to instruct the first host to broadcast a third instruction to the network segment where the first host is located, and the third instruction is used to instruct hosts in the network segment that do not have the software installed to download and install the software package from the host that sends the third instruction.
5. The method according to claim 4, characterized in that The method further comprises: Broadcasting a third instruction to the network segment where the first host is located; After receiving an installation request based on the third instruction from at least one second host among other hosts in the network segment, the software package is sent to the at least one second host.
6. A software distribution method, characterized in that: Applied to the second host, the method comprises: Acquire a third instruction broadcasted in the network segment where the first host is located, the third instruction being used to instruct a host in the network segment that has not installed the software to download and install the software package from the host that sends the third instruction, the third instruction being an instruction generated after the first host receives the first instruction and downloads and installs the software package from the control device, the first instruction being an instruction generated after the control device determines the first host in the network segment for downloading and installing the software package based on host information of each host in the network segment where the first host is located, and the second host and the first host are located in the same network segment; According to the third instruction, an installation request is sent to a host in the network segment on which the software has been installed; The software package is obtained from any host that has installed the software and after installation, second installation completion information is sent to the control device, and a third instruction is sent to the network segment.
7. The method according to claim 6, characterized in that If the second host is a host on which the software has been installed; Accordingly, the method further includes: Receive installation requests from any host that does not have the software installed; The software package is sent to the host without the software installed, so that the host without the software installed installs the software based on the installation package, and third installation completion information is sent to the control device, and a third instruction is sent to the network segment.
8. A software distribution system, characterized in that: The system comprises: a control device, a first host, and a second host; The control device is used to execute the method according to any one of claims 1 to 3; The first host is used to execute the method according to claim 4 or 5; The second host is used to execute the method according to claim 6 or 7.
9. An electronic device, characterized in that: include: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform the operation of the software distribution method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The storage medium stores at least one executable instruction, and when the executable instruction is executed on the electronic device / apparatus, the electronic device / apparatus executes the operation of the software distribution method according to any one of claims 1 to 7.
