CN1873613A - File preinstallation system and method for load balancing - Google Patents
File preinstallation system and method for load balancing Download PDFInfo
- Publication number
- CN1873613A CN1873613A CN 200510074606 CN200510074606A CN1873613A CN 1873613 A CN1873613 A CN 1873613A CN 200510074606 CN200510074606 CN 200510074606 CN 200510074606 A CN200510074606 A CN 200510074606A CN 1873613 A CN1873613 A CN 1873613A
- Authority
- CN
- China
- Prior art keywords
- installation
- server
- file
- file pre
- scheduling
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims description 30
- 238000009434 installation Methods 0.000 claims abstract description 201
- 238000004519 manufacturing process Methods 0.000 claims abstract description 40
- 230000036316 preload Effects 0.000 claims description 2
- 238000012544 monitoring process Methods 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 239000002699 waste material Substances 0.000 description 2
- 206010033799 Paralysis Diseases 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000000638 solvent extraction Methods 0.000 description 1
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Information Transfer Between Computers (AREA)
Abstract
Description
技术领域technical field
本发明关于一种文件预装系统及方法,尤其关于一种可均衡负载的文件预装系统及方法。The present invention relates to a file preinstallation system and method, in particular to a load balancing file preinstallation system and method.
背景技术Background technique
目前,计算机(包括笔记本型计算机和台式计算机)在出厂之前都要在计算机硬盘上预装操作系统和应用软件等文件,以便用户在购买一台计算机后,打开电源即可使用。为达这一目的,现有的做法是:首先在一台样机上进行常规的操作,包括硬盘分区、格式化、安装操作系统及随机软件等;然后在DOS下将样机硬盘复制成一个镜像文件,并将该镜像文件安装在一台或者多台文件预装服务器上;最后由客户机从文件预装服务器上下载镜像文件,并根据该镜像文件在客户机上恢复成一个出货镜像,从而完成客户机的文件预装任务。这样的方法使得操作系统和应用软件等预装文件只需一开始在样机上安装一次,减少了工序和工时。At present, computers (comprising notebook computers and desktop computers) all have files such as operating system and application software preinstalled on the computer hard disk before leaving the factory, so that after the user buys a computer, turn on the power supply and use it. In order to achieve this purpose, the existing method is: firstly perform routine operations on a prototype, including hard disk partitioning, formatting, installing operating system and random software, etc.; then copy the prototype hard disk into a mirror image file under DOS , and install the image file on one or more file pre-installation servers; finally, the client computer downloads the image file from the file pre-installation server, and restores a shipping image on the client computer according to the image file, thus completing File preinstallation tasks for client machines. Such a method enables preinstalled files such as an operating system and application software to be installed on the prototype only once at the beginning, thereby reducing procedures and man-hours.
然而常用技术的这种做法仍然存有诸多缺陷,特别是在进行多品种、大批量的预装文件下载任务时,其往往采用一台文件预装服务器同时响应多个客户机的下载请求来提供镜像文件的下载,如此会造成文件预装服务器的负载过大,不仅会使下载效率大大降低,甚至还会造成网络瘫痪。However, there are still many defects in this method of common technology, especially when carrying out multi-variety and large-scale pre-installed file download tasks, it often adopts a file pre-installed server to respond to the download requests of multiple clients at the same time to provide The download of the image file will cause the load of the file pre-installation server to be too large, which will not only greatly reduce the download efficiency, but even cause the network to be paralyzed.
此外,在进行多品种、大批量的预装文件下载任务时,为了在一定程度上提高下载效率,常用技术中也有采用多台文件预装服务器同时响应多个客户机的下载请求来提供镜像文件的下载,但是文件预装服务器之间往往不能很好的进行统一调度,有的处于空闲,有的却处于非常繁忙,文件预装服务器的有效资源没有得到合理地分配,从而造成资源上的浪费。以至于虽然增加了文件预装服务器的数量,提高了生产成本,但是却没有显著地提升生产效率。In addition, when performing multi-variety and large-volume pre-installed file download tasks, in order to improve download efficiency to a certain extent, common technologies also use multiple file pre-installed servers to simultaneously respond to download requests from multiple clients to provide image files. However, the unified scheduling between the file pre-installation servers is often not very good. Some are idle, while others are very busy. The effective resources of the file pre-installation servers are not allocated reasonably, resulting in a waste of resources. . As a result, although the number of file pre-installed servers has been increased and the production cost has been increased, the production efficiency has not been significantly improved.
而且,在常用技术中,当生产线上的客户机增多,下载任务量加大时,如果生产线网络中原有的文件预装服务器的数量不能满足要求时,也不能实时动态地对文件预装服务器的负载状况加以监测或主动发出应添加文件预装服务器的预警提示,从而限制了下载效率的提升。Moreover, in common technologies, when the number of clients on the production line increases and the amount of downloading tasks increases, if the number of original file pre-installation servers in the production line network cannot meet the requirements, it is impossible to dynamically update the number of file pre-installation servers in real time. The load status is monitored or an early warning prompt is issued to add a file pre-installation server, thereby limiting the improvement of download efficiency.
发明内容Contents of the invention
本发明的一个目的是提供一种均衡负载的文件预装系统,其应用于生产网络上的文件预安装中,该系统包括:多个文件预装服务器,该文件预装服务器中存储有多个预装文件,并可在连接至所述生产网络时发出一注册请求;多个客户机,该客户机用以在连接至所述生产网络时发出一预装请求;以及一调度服务器,用以根据所述注册请求建立一注册数据表,并在接收到所述预装请求时,根据所述注册数据表向所述各文件预装服务器发出一负载查询请求,要求各文件预装服务器传回一负载状况响应以进行一均衡负载调度,再根据该均衡负载调度指派各文件预装服务器执行所述客户机的文件预装;其中,所述调度服务器将指派负载状况最小的文件预装服务器执行所述客户机的文件预装。An object of the present invention is to provide a load-balanced file pre-installation system, which is applied to file pre-installation on a production network. The system includes: multiple file pre-installation servers, and multiple file pre-installation servers store Preloading files, and sending a registration request when connecting to the production network; multiple clients, the clients are used to send a preloading request when connecting to the production network; and a scheduling server, for Create a registration data table according to the registration request, and when receiving the pre-installation request, send a load query request to each file pre-installation server according to the registration data table, requiring each file pre-installation server to return A load status response to perform a balanced load scheduling, and then assign each file pre-installation server to execute the file pre-installation of the client according to the balanced load scheduling; wherein, the scheduling server will assign the file pre-installation server with the smallest load status to perform The client's files are preloaded.
本发明所述的文件预装系统,其中所述调度服务器记录并分析从所述各个文件预装服务器传回的负载状况响应,判断各个文件预装服务器中是否存在有等待下载所述预装文件的队列;当所述文件预装服务器中存在等待下载所述预装文件的队列时,所述调度服务器选择该文件预装服务器作为下载服务器以执行所述客户机的文件预装任务;当所述文件预装服务器中均不存在等待下载所述预装文件的队列时,所述调度服务器选择负载资源占用率最小的文件预装服务器作为下载服务器以执行所述客户机的文件预装任务。In the file pre-installation system of the present invention, the scheduling server records and analyzes the load status responses sent back from the various file pre-installation servers, and determines whether there is any pre-installation file waiting to be downloaded in each file pre-installation server queue; when there is a queue waiting to download the pre-installed file in the file pre-installation server, the scheduling server selects the file pre-installation server as the download server to perform the file pre-installation task of the client; When none of the file pre-installation servers has a queue waiting to download the pre-installation file, the scheduling server selects the file pre-installation server with the smallest load resource occupancy rate as the download server to perform the file pre-installation task of the client.
本发明所述的文件预装系统,其中所述调度服务器在建立所述注册数据表后,向发出注册请求的文件预装服务器返回一注册结果。In the file pre-installation system of the present invention, after the scheduling server establishes the registration data table, it returns a registration result to the file pre-installation server that sent the registration request.
本发明所述的文件预装系统,其中所述调度服务器可根据从所述各文件预装服务器传回的负载状况响应实时动态地监测各文件预装服务器的负载状况,并当所有文件预装服务器达到下载极限时主动发出应添加文件预装服务器的预警提示。In the file pre-installation system of the present invention, the scheduling server can dynamically monitor the load status of each file pre-installation server in real time according to the load status response returned from each file pre-installation server, and when all the file pre-installation servers When the server reaches the download limit, it will actively send out an early warning prompt that the file should be added to the pre-installed server.
本发明所述的文件预装系统,其中所述调度服务器透过TCP/IP协议的连接方式与所述文件预装服务器建立连接。In the file pre-installation system of the present invention, the scheduling server establishes a connection with the file pre-installation server through a TCP/IP protocol connection mode.
本发明所述的文件预装系统,其中所述注册数据表中保存有所述文件预装服务器的地址信息以及所述文件预装服务器中预装文件的路径信息。In the file pre-installation system of the present invention, the address information of the file pre-installation server and the path information of the pre-installation files in the file pre-installation server are stored in the registration data table.
本发明的另一目的是提供一种均衡负载的文件预装方法,其应用于生产网络上的文件预安装中,该方法包括以下步骤:连接多个存储有多个预装文件的文件预装服务器至所述生产网络,同时发出一注册请求;连接多个客户机至所述生产网络,同时发出一预装请求;在所述生产网络中建立一调度服务器,并根据所述文件预装服务器发出的注册请求建立一注册数据表;利用所述调度服务器接收所述客户机发出的预装请求,并根据所述注册数据表向所述各文件预装服务器发出一负载查询请求,要求各文件预装服务器传回一负载状况响应以进行一均衡负载调度;以及利用所述调度服务器根据所述均衡负载调度指派各文件预装服务器中负载状况最小的文件预装服务器执行所述客户机的文件预装。Another object of the present invention is to provide a load-balanced file preinstallation method, which is applied to the file preinstallation on the production network. The server sends a registration request to the production network at the same time; connects multiple clients to the production network and sends a pre-installation request at the same time; establishes a scheduling server in the production network and pre-installs the server according to the file Create a registration data table with the registration request sent; use the scheduling server to receive the pre-installation request sent by the client, and send a load query request to the file pre-installation server according to the registration data table, requesting each file The preinstallation server returns a load status response to perform a balanced load scheduling; and utilizes the scheduling server to assign the file preinstallation server with the smallest load status among the file preinstallation servers to execute the file of the client according to the balanced load scheduling preinstalled.
本发明所述的文件预装方法,其中进一步包括以下步骤:利用所述调度服务器记录并分析从所述各个文件预装服务器传回的负载状况响应,判断各个文件预装服务器中是否存在有等待下载所述预装文件的队列;当所述文件预装服务器中存在等待下载所述预装文件的队列时,利用所述调度服务器选择该文件预装服务器作为下载服务器以执行所述客户机的文件预装任务;以及当所述文件预装服务器中均不存在等待下载所述预装文件的队列时,利用所述调度服务器选择负载资源占用率最小的文件预装服务器作为下载服务器以执行所述客户机的文件预装任务。The file preloading method of the present invention further includes the following steps: using the scheduling server to record and analyze the load status responses sent back from the various file preloading servers, and judging whether there is a waiting time in each file preloading server Download the queue of the pre-installed file; when there is a queue waiting to download the pre-installed file in the file pre-installed server, utilize the scheduling server to select the file pre-installed server as the download server to execute the client computer File pre-installation task; and when there is no queue waiting to download the pre-installed file in the file pre-installation server, utilize the scheduling server to select the file pre-installation server with the smallest load resource occupancy rate as the download server to execute the file pre-installation Describes the file preinstallation task for the client.
本发明所述的文件预装方法,其中进一步包括所述调度服务器在建立所述注册数据表后,向发出注册请求的文件预装服务器返回一注册结果的步骤。The file pre-installation method of the present invention further includes the step of the scheduling server returning a registration result to the file pre-installation server sending the registration request after establishing the registration data table.
本发明所述的文件预装方法,其中进一步包括所述调度服务器根据从所述各文件预装服务器传回的负载状况响应实时动态地监测各文件预装服务器的负载状况,并当所有文件预装服务器达到下载极限时主动发出应添加文件预装服务器的预警提示的步骤。The file pre-installation method according to the present invention further includes that the scheduling server responds to the load status of each file pre-installation server in real time and dynamically monitors the load status of each file pre-installation server according to the load status returned from each file pre-installation server, and when all the file pre-installation servers When the pre-installation server reaches the download limit, the step of actively sending out an early warning prompt that a file should be added to the pre-installation server.
本发明所述的文件预装方法,其中所述调度服务器通过TCP/IP协议的连接方式与所述文件预装服务器建立连接。In the file pre-installation method of the present invention, the scheduling server establishes a connection with the file pre-installation server through a connection mode of TCP/IP protocol.
本发明所述的文件预装方法,其中所述注册数据表中保存有所述文件预装服务器的地址信息以及所述文件预装服务器中预装文件的路径信息。In the file pre-installation method of the present invention, the address information of the file pre-installation server and the path information of the pre-installation file in the file pre-installation server are stored in the registration data table.
本发明的优点在于:The advantages of the present invention are:
1、本发明可利用安装在生产网络中的多个文件预装服务器来响应客户机的下载预装文件的请求,并且由于采用了调度服务器并通过调度算法,因此可以根据各个文件预装服务器的负载状况,合理平衡负载选用最空闲的文件预装服务器执行预装文件的下载任务,从而达到提升下载效率的功效。1. The present invention can utilize a plurality of file preinstallation servers installed in the production network to respond to the client's request for downloading preinstallation files, and because the scheduling server is adopted and the scheduling algorithm is used, it can be preinstalled according to the requirements of each file preinstallation server. According to the load status, the load is reasonably balanced and the most idle file pre-installation server is selected to perform the download task of the pre-installed files, so as to achieve the effect of improving the download efficiency.
2、当本发明中的各文件预装服务器达到下载极限,不能很好地响应客户机的预装请求(下载请求)时,调度服务器可以实时动态地对文件预装服务器的负载状况加以监测,并主动发出应添加文件预装服务器的预警提示,从而便于使用者实时地增加文件预装服务器的数量,以使下载效率得到弹性调整,保证快速响应客户机的预装请求(下载请求),提高生产效率。2. When each file preloading server in the present invention reaches the download limit and cannot respond well to the preloading request (download request) of the client computer, the scheduling server can dynamically monitor the load status of the file preloading server in real time, And take the initiative to issue an early warning prompt that the file pre-installation server should be added, so that the user can increase the number of file pre-installation servers in real time, so that the download efficiency can be adjusted flexibly, ensuring a quick response to the client's pre-installation request (download request), improving Productivity.
附图说明Description of drawings
其中,附图标记说明如下:Wherein, the reference signs are explained as follows:
图1为本发明的均衡负载的文件预装系统及方法所运行的生产网络环境的示意图;Fig. 1 is the schematic diagram of the production network environment that the load-balanced file preinstallation system and method of the present invention operate;
图2为本发明的均衡负载的文件预装系统中文件预装服务器与调度服务器建立连接并进行注册的结构示意图;Fig. 2 is the structural diagram of establishing connection and registering between the file preloading server and the dispatching server in the file preloading system of the balanced load of the present invention;
图3为本发明的均衡负载的文件预装系统的整体结构示意图;Fig. 3 is the overall structure schematic diagram of the file preloading system of load balancing of the present invention;
图4为本发明的均衡负载的文件预装方法的步骤流程图;以及Fig. 4 is the flow chart of the steps of the file preinstallation method of load balancing of the present invention; and
图5为本发明一具体实施例的结构框图。Fig. 5 is a structural block diagram of a specific embodiment of the present invention.
图中标号说明:Explanation of symbols in the figure:
10文件预装服务器10 files pre-installed server
11客户机11 clients
12调度服务器12 scheduling server
13集线器13 hubs
步骤100连接文件预装服务器至生产网络,并发出注册请求Step 100 connects the file pre-installation server to the production network, and sends a registration request
步骤101连接客户机至生产网络,并发出预装请求Step 101: connect the client to the production network, and send a pre-installation request
步骤102在生产网络中建立一调度服务器,接收并根据文件预装服务器发出的注册请求建立注册数据表Step 102 establishes a scheduling server in the production network, receives and establishes a registration data table according to the registration request sent by the file pre-installation server
步骤103向发出注册请求的文件预装服务器返回一注册结果Step 103 returns a registration result to the file preloading server sending the registration request
步骤104调度服务器接收从客户机发出的预装请求,并根据注册数据表向各文件预装服务器发出负载查询请求,要求各文件预装服务器传回一负载状况响应Step 104: The scheduling server receives the preloading request sent from the client, and sends a load query request to each file preloading server according to the registration data table, and requires each file preloading server to return a load status response
步骤105根据负载状况响应主动发出添加文件预装服务器的预警提示Step 105: Respond to the load status and actively issue an early warning prompt for adding a file pre-installed server
步骤106调度服务器记录并分析从各个文件预装服务器传回的负载状况响应,判断各个文件预装服务器中是否存在等待下载预装文件的队列Step 106 dispatching server records and analyzes the load status response sent back from each file pre-installation server, and judges whether there is a queue waiting to download pre-installation files in each file pre-installation server
步骤107选择该文件预装服务器作为下载服务器以执行客户机的文件预装任务Step 107 selects this file preinstallation server as the download server to perform the client computer's file preinstallation task
步骤108选择负载资源占用率最小的文件预装服务器作为下载服务器以执行客户机的文件预装任务Step 108 selects the file preinstallation server with the minimum load resource occupancy rate as the download server to perform the file preinstallation task of the client computer
具体实施方式Detailed ways
以下,将结合附图对本发明的优选实施方式作详细说明。Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.
请参考图1和图2,图1表示了本发明的均衡负载的文件预装系统及方法所运行的生产网络环境,图3表示了本发明的均衡负载的文件预装系统的整体结构。如图所示,在生产网络中连接有多个文件预装服务器10(1……n),该各文件预装服务器10中存储有多个预装文件,并可在连接至生产网络时发出一注册请求;生产网络中还连接有多个客户机11(1……n),各客户机11在连接至生产网络时,如果要下载文件预装服务器10中的预装文件可发出一预装请求;此外,生产网络中还设有一调度服务器12,该调度服务器12和各文件预装服务器10分别通过同一集线器13与各客户机11相连接,该调度服务器12接收并根据从文件预装服务器10发出的注册请求建立一注册数据表,并在接收到客户机11发出的预装请求后根据注册数据表向各文件预装服务器10发出一负载查询请求,要求各文件预装服务器10传回一负载状况响应以进行一均衡负载调度,再根据均衡负载调度指派各文件预装服务器10中负载状况最小的文件预装服务器10执行客户机的文件预装。Please refer to FIG. 1 and FIG. 2. FIG. 1 shows the production network environment in which the load-balanced file pre-installation system and method of the present invention operate, and FIG. 3 shows the overall structure of the load-balanced file pre-installation system of the present invention. As shown in the figure, a plurality of file pre-installation servers 10 (1...n) are connected to the production network, and multiple pre-installation files are stored in each file pre-installation
现在请参考图2,图中表示了本发明的均衡负载的文件预装系统中调度服务器12与文件预装服务器10通过TCP/IP协议的连接方式建立连接,并且当文件预装服务器10与调度服务器12建立连接后向调度服务器12发出一注册请求,调度服务器12在接收该注册请求并建立一注册数据表后,向发出注册请求的文件预装服务器10返回一注册结果。Please refer to Fig. 2 now, in the file pre-installation system of load-balanced load of the present invention, dispatching
请参考图4,该图为本发明的均衡负载的文件预装方法的步骤流程图。如图所示,为了实现本发明的目的,该文件预装方法按顺序包括以下步骤:Please refer to FIG. 4 , which is a flow chart of the steps of the load-balancing file preinstallation method of the present invention. As shown in the figure, in order to achieve the purpose of the present invention, the file preinstallation method includes the following steps in order:
连接多个存储有多个预装文件的文件预装服务器至生产网络,同时由文件预装服务器发出一注册请求(步骤100);Connect multiple file preinstallation servers storing multiple preinstallation files to the production network, and send a registration request by the file preinstallation server at the same time (step 100);
连接多个客户机至所述生产网络,同时由客户机发出一预装请求(步骤101);Connect a plurality of client computers to the production network, and simultaneously send a preinstallation request (step 101) by the client computers;
在生产网络中建立一调度服务器,接收由各文件预装服务器发出的注册请求并建立一注册数据表,该注册数据表中保存有各文件预装服务器的地址信息以及各文件预装服务器中预装文件的路径信息(步骤102);Establish a scheduling server in the production network to receive registration requests sent by each file pre-installation server and create a registration data table, which stores the address information of each file pre-installation server and the pre-installed The path information (step 102) of loading file;
此外,在执行完步骤102后,可紧接着执行一步骤103,调度服务器在建立注册数据表后,向发出注册请求的文件预装服务器返回一注册结果;In addition, after step 102 is executed, a step 103 can be executed immediately, and the scheduling server returns a registration result to the file preloading server sending the registration request after establishing the registration data table;
利用调度服务器接收由客户机发出的预装请求,并根据所述注册数据表向各文件预装服务器发出一负载查询请求,要求各文件预装服务器传回一负载状况响应(步骤104);Utilize the scheduling server to receive the preloading request sent by the client, and send a load query request to each file preloading server according to the registration data table, and require each file preloading server to return a load status response (step 104);
此时还可具有一步骤105,通过调度服务器根据从各文件预装服务器传回的负载状况响应实时动态地监测各文件预装服务器的负载状况,并当所有文件预装服务器达到下载极限时主动发出应添加文件预装服务器的预警提示;At this time, a step 105 can also be provided to dynamically monitor the load status of each file pre-installation server in real time according to the load status response sent back from each file pre-installation server by the scheduling server, and when all file pre-installation servers reach the download limit, take the initiative Issue an early warning prompt that the file pre-installation server should be added;
利用调度服务器记录并分析从各个文件预装服务器传回的负载状况响应,判断各个文件预装服务器中是否存在有等待下载此预装文件的队列(步骤106);Utilize dispatching server to record and analyze the load status response sent back from each file preloading server, judge whether there is a queue waiting to download this preloading file in each file preloading server (step 106);
当文件预装服务器中存在等待下载此预装文件的队列时,利用调度服务器选择该文件预装服务器作为下载服务器以执行客户机的文件预装任务(步骤107);以及When there is a queue waiting to download this preinstalled file in the file preinstalled server, utilize the scheduling server to select the file preinstalled server as the download server to perform the client computer's file preinstalled task (step 107); and
当文件预装服务器中均不存在等待下载此预装文件的队列时,利用调度服务器选择负载资源占用率最小的文件预装服务器作为下载服务器以执行客户机的文件预装任务(步骤108)。When there is no queue waiting to download the pre-installed file in any of the file pre-installation servers, the scheduling server is used to select the file pre-installation server with the smallest load resource occupancy rate as the download server to perform the file pre-installation task of the client (step 108).
需要特别说明的是:上述方法步骤中所提到的每台文件预装服务器内都有一个独立的下载预装文件的工具,用以将此台文件预装服务器中的预装文件下载到客户机(client)端。各下载预装文件的工具之间不互相通信,不协同工作。It should be noted that each file pre-installation server mentioned in the above method steps has an independent tool for downloading pre-installation files, which is used to download the pre-installation files in this file pre-installation server to the client Machine (client) end. The tools for downloading pre-installed files do not communicate with each other and do not work together.
下载预装文件的工作方法为:1.预先设定可以同时开通几个下载队列,执行下载任务。2.每个队列响应客户机(client)的请求,为了提高下载效能,队列中的客户机数量不足时,不进行下载,此时此队列称为等待下载队列,当队列中的客户机数量到达默认值时,进行下载,此时此队列称为下载队列,队列中所有客户机的下载请求将被一次同时完成,节约了网络带宽以及服务器资源。3.设定等待队列变为下载队列的时间,因为当客户机数量短时间内无法达到预设数量时,为了快速执行文件预装任务以完成客户机的出货,必须进行下载。The working method of downloading pre-installed files is as follows: 1. It is pre-set that several download queues can be opened at the same time to perform download tasks. 2. Each queue responds to the client's request. In order to improve the download performance, when the number of clients in the queue is insufficient, the download will not be performed. At this time, this queue is called the waiting download queue. When the number of clients in the queue reaches The default value is to download. At this time, the queue is called the download queue, and the download requests of all clients in the queue will be completed at one time, saving network bandwidth and server resources. 3. Set the time when the waiting queue becomes a download queue, because when the number of clients cannot reach the preset number in a short period of time, downloading must be performed in order to quickly execute the file pre-installation task to complete the shipment of the clients.
每有一个通道进行下载,那么文件预装服务器的资源就要消耗一部分,所以进行负载状况评估时,以等待队列数占设定总队列数的百分比,以及正在下载队列数占设定总队列数的百分比作为参考指标。之所以用百分比而没有用等待队列数,以及正在下载队列数,是因为不同的文件预装服务器可能设定的总开通队列数不同,所以如果不是以百分比考虑,有可能等待队列数与正在下载队列数之和较小的文件预装服务器实际上其开通的队列数已经被占满,从而没有空余队列可以使用,这样后续下载任务必须等待之前某一队列下载完成,空余出新的队列之后才可以进行下载,从而浪费了下载时间,降低了出货效率。(注:负载状况及资源消耗的主要考虑指标为文件预装服务器硬盘的数据通信量,其工作队列的多少会直接影响硬盘的资源占用情况,从而影响下载效率,至于CPU的利用率,其并不是影响下载效率的指标,所以可不予考虑)。Every time there is a channel for downloading, a part of the resources of the file pre-installation server will be consumed. Therefore, when evaluating the load status, the percentage of the number of waiting queues to the total number of queues and the number of downloading queues to the total number of queues are calculated. The percentage is used as a reference indicator. The reason why percentages are used instead of the number of waiting queues and the number of downloading queues is that different file pre-installation servers may have different total opening queues, so if the percentage is not considered, the number of waiting queues may be different from the number of downloading queues. The file pre-installation server with a small sum of queues actually has its opened queues fully occupied, so there is no free queue to use, so subsequent download tasks must wait for a previous queue to be downloaded and a new queue is free. It can be downloaded, which wastes the download time and reduces the shipping efficiency. (Note: The main indicator of load status and resource consumption is the data communication volume of the hard disk of the file pre-installation server. The number of its work queue will directly affect the resource occupation of the hard disk, thereby affecting the download efficiency. As for the utilization rate of the CPU, it does not It is not an indicator that affects download efficiency, so it can be ignored).
下面将进一步详细说明本发明的均衡负载的文件预装系统及方法,本发明利用TCP/IP技术,并通过调度算法,得以在多个文件预装服务器之间实现负载均衡。本发明在多客户机/多文件预装服务器的生产网络中建立一台调度服务器,该调度服务器可保存生产网络中所有文件预装服务器的地址信息,以及所有文件预装服务器中预装文件的路径信息(不包括文件预装服务器的名称),例如,可以是:/HP/fenway/ch01.img。所述文件预装服务器的地址信息的取得方式为:当文件预装服务器安装完相应的镜像文件,并被连接到生产网络启动后,文件预装服务器通过TCP/IP协议的连接方式向调度服务器发送一注册请求,调度服务器接收到注册请求后会将文件预装服务器的地址信息保存起来以备后续的查询或调用,从而达到文件预装服务器的即插即用,使文件预装的下载效率得到弹性调整。此外,文件预装服务器中预装文件的路径信息(其可以是由文件预装服务器的品牌、型号,以及预装文件的语言版本所形成的相应的路径信息),也被保存到调度服务器中,然后建立预装文件的路径信息与文件预装服务器的编号的对应关系,并保存到调度服务器中。然后,各文件预装服务器将根据预装文件的路径信息,建立相应的预装文件下载文件,以供客户机下载使用。当客户机期望下载所需的预装文件时,向调度服务器发出一预装请求,并且给出所要下载的预装文件的编号或名称,调度服务器根据此编号或名称查出需要下载的预装文件的路径信息(此路径信息不包括文件预装服务器的名称),然后调度服务器顺序获得每一个文件预装服务器的地址信息,并将其加到预装文件路径信息的前面,形成一完整的路径信息,形式为://serverip/HP/fenway/ch01.img,然后通过TCP/IP协议与文件预装服务器通信,询问此服务器是否存在此预装文件?当前有多少个队列为正在执行下载任务的下载队列?有多少个队列为等待下载队列?以及是否存在正在等待下载此预装文件的队列?并将以上查询结果保存起来,然后以此方法依次访问所有文件预装服务器,并保存所有查询结果。最后分析查询结果的数据,如果某一文件预装服务器有等待下载此预装文件的队列,那么选择此文件预装服务器作为下载服务器,以使得队列中的所有客户机能够同时下载该预装文件,这样保证了以最大的限度利用带宽以及文件预装服务器中的负载资源;如果生产网络中不存在具有等待下载此预装文件的队列的文件预装服务器,那么调度服务器将计算各文件预装服务器中有多少个队列正在进行下载和等待下载,并分别计算出二者分别占总设定开通的队列数的百分比,然后选择二者百分比数量之和最小的文件预装服务器作为下载服务器,这样保证了执行下载任务的文件预装服务器始终是负载资源占用率最小的服务器,从而保证了最快速地执行下载任务,提升了生产效率。The load balancing file preloading system and method of the present invention will be further described in detail below. The present invention utilizes TCP/IP technology and a scheduling algorithm to achieve load balancing among multiple file preloading servers. The present invention establishes a scheduling server in the production network of multi-client/multi-file pre-installation servers, and the scheduling server can save the address information of all file pre-installation servers in the production network, as well as the address information of all file pre-installation servers in all file pre-installation servers. The path information (not including the name of the file preinstallation server), for example, can be: /HP/fenway/ch01.img. The way of obtaining the address information of the file pre-installed server is: when the file pre-installed server has installed the corresponding mirror image file and is connected to the production network to start, the file pre-installed server sends the dispatching server to the dispatching server through the connection mode of the TCP/IP protocol. Send a registration request, and after receiving the registration request, the scheduling server will save the address information of the file pre-installation server for subsequent query or call, so as to achieve the plug-and-play of the file pre-installation server and make the download efficiency of file pre-installation Get elastic adjustments. In addition, the path information of the pre-installed files in the file pre-installed server (it can be the corresponding path information formed by the brand, model of the file pre-installed server, and the language version of the pre-installed files) is also saved in the scheduling server , and then establish the corresponding relationship between the path information of the preinstalled file and the serial number of the file preinstalled server, and save it in the scheduling server. Then, each file pre-installation server will create a corresponding pre-installation file download file according to the path information of the pre-installation file for the client computer to download and use. When the client expects to download the required pre-installed file, it sends a pre-installed request to the scheduling server, and gives the number or name of the pre-installed file to be downloaded, and the scheduling server finds out the pre-installed file that needs to be downloaded according to the number or name. The path information of the file (this path information does not include the name of the file pre-installation server), and then the scheduling server sequentially obtains the address information of each file pre-installation server, and adds it to the front of the pre-installation file path information to form a complete The path information is in the form of: //serverip/HP/fenway/ch01.img, and then communicates with the file pre-installation server through TCP/IP protocol, asking whether this pre-installation file exists on this server? How many queues are currently downloading queues that are executing download tasks? How many queues are waiting for the download queue? And is there a queue waiting to download this preinstalled file? And save the above query results, and then visit all the file pre-installation servers in this way, and save all the query results. Finally, analyze the data of the query results, if a file pre-installation server has a queue waiting to download the pre-installation file, then select this file pre-installation server as the download server, so that all clients in the queue can download the pre-installation file at the same time , so as to ensure the maximum utilization of bandwidth and load resources in the file preinstallation server; if there is no file preinstallation server with a queue waiting to download the preinstallation file in the production network, then the scheduling server will calculate each file preinstallation How many queues are downloading and waiting to download in the server, and calculate the percentages of the two to the total number of queues set to open, and then select the file pre-installation server with the smallest sum of the two percentages as the download server, so that It is ensured that the file pre-installation server performing the download task is always the server with the smallest load resource occupancy, thereby ensuring the fastest execution of the download task and improving production efficiency.
以下将通过一具体实施例说明本发明均衡负载的文件预装系统及方法。The load balancing file preinstallation system and method of the present invention will be described below through a specific embodiment.
请参考图5,该图为本发明一具体实施例的结构框图。如图所示,假定本发明的均衡负载的文件预装系统中有两台文件预装服务器10(imageserver1和imageserver2),并且目前两台文件预装服务器10都处于无下载任务的状态,还都预设了6个下载队列,每个下载队列可以同时容纳30台客户机11(client1至client30)进行下载。Please refer to FIG. 5 , which is a structural block diagram of a specific embodiment of the present invention. As shown in the figure, assume that there are two file preinstallation servers 10 (imageserver1 and imageserver2) in the file preinstallation system of the balanced load of the present invention, and the two
当有一台客户机11(client1)向文件预装系统中的调度服务器12发出预装请求(下载请求)后,调度服务器12根据客户机11(client1)的预装请求(下载请求)及其机器码,访问一数据资料表查询出此客户机11(client1)所要下载的预装文件为:/hp/fenway/1.img,然后调度服务器12通过TCP/IP协议与两台文件预装服务器10(imageserver1和imageserver2)连接,并且分别询问两文件预装服务器10(imageserver1和imageserver2)的下载状态(负载状况),此两台文件预装服务器10返回给调度服务器12一应答数据(负载状况响应),其中可用Flag值表示正在下载的队列数占总设定队列数之百分比,以及等待下载的队列数占总设定队列数的百分比。当Flag值为0表示此文件预装服务器无此预装文件;Flag值为1表示有此预装文件Flag值为2表示存在正在等待下载此预装文件的队列。在本实施例中,假定两台文件预装服务器10(imageserver1和imageserver2)中都存在客户机11所要下载的预装文件/hp/fenway/1.img,那么二者返回的应答数据(负载状况响应)结果为:imageserver1:1,0%,0%;及imageserver2:1,0%,0%。由于二者后两位都为0%,0%,表示两台文件预装服务器10的负载状况都处于无下载任务的状态,所以调度服务器12随机选取文件预装服务器10(imageserver1)作为下载服务器,并将客户机11(client1)的预装请求(下载请求)放到文件预装服务器10(imageserver1)上,同时文件预装服务器10(imageserver1)开启一个等待下载队列。假定又有一台客户机11(client2)向调度服务器12发出预装请求(下载请求),请求下载预装文件/hp/fenway/1.img,那么两台文件预装服务器10(imageserver1和imageserver2)返回给调度服务器12的应答数据(负载状况响应)结果为:imageserver1:2,0%,1/6;及imageserver2:1,0%,0%。由于文件预装服务器10(imageserver1)返回的Flag值等于2,表明存在正在等待下载此预装文件的队列,那么调度服务器12将选取文件预装服务器10(imageserver1)作为下载服务器,文件预装服务器10(imageserver1)将客户机11(client2)的预装请求(下载请求)放到等待下载队列中。假定随后又陆续传来了28台客户机11(client3至client30)请求下载预装文件/hp/fenway/1.img的预装请求(下载请求),那么这些请求会全部放到文件预装服务器10(imageserver1)的等待下载队列中,由于该等待下载队列中的客户机数量已经达到30台,所以该等待下载队列开始执行下载任务,并变为下载队列。当有第31台客户机11(client31)请求下载预装文件/hp/fenway/1.img时,两台文件预装服务器10(imageserver1和imageserver2)返回给调度服务器12的应答数据(负载状况响应)结果为:imageserver1:1,1/6,0%;及imageserver2:1,0%,0%。由于二者的Flag值都等于1,表明在两台文件预装服务器10(imageserver1和imageserver2)中均不存在等待下载此预装文件的队列,所以调度服务器12将进一步比较正在下载的队列数占总设定队列数的百分比与等待下载的队列数占总设定队列数的百分比之和,以选择二者百分比数量之和最小的文件预装服务器作为下载服务器,即:文件预装服务器10(imageserver1)=1/6+0%;文件预装服务器10(imageserver2)=0%+0%,imageserver2<imageserver1,因此文件预装服务器10(imageserver2)的负载资源占用率小于文件预装服务器10(imageserver1),所以调度服务器12将选取文件预装服务器10(imageserver2)作为下载服务器,并将第31台客户机11(client31)的预装请求(下载请求)放到文件预装服务器10(imageserver2)上,同时文件预装服务器10(imageserver2)开启一个新的等待下载队列。After a client computer 11 (client1) sends a preinstallation request (download request) to the
虽然本发明以前述的优选实施例公开如上,然而其并非用以限定本发明。本领域的技术人员应该意识到在不脱离本发明所附的权利要求所揭示的本发明的范围和精神的情况下,所作的更动与润饰,均属本发明的权利要求范围之内。关于本发明所限定的保护范围请参考所附的权利要求。Although the present invention is disclosed above with the aforementioned preferred embodiments, they are not intended to limit the present invention. Those skilled in the art should realize that without departing from the scope and spirit of the present invention disclosed in the appended claims of the present invention, all changes and modifications are within the scope of the claims of the present invention. For the scope of protection defined by the present invention, please refer to the appended claims.
Claims (12)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CNB2005100746060A CN100371895C (en) | 2005-05-30 | 2005-05-30 | Load-balancing file preassembling system and method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CNB2005100746060A CN100371895C (en) | 2005-05-30 | 2005-05-30 | Load-balancing file preassembling system and method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN1873613A true CN1873613A (en) | 2006-12-06 |
| CN100371895C CN100371895C (en) | 2008-02-27 |
Family
ID=37484095
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CNB2005100746060A Expired - Fee Related CN100371895C (en) | 2005-05-30 | 2005-05-30 | Load-balancing file preassembling system and method |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN100371895C (en) |
Cited By (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102487404A (en) * | 2010-12-03 | 2012-06-06 | 英业达集团(天津)电子技术有限公司 | Method for balancing load of mapping file server |
| CN103533032A (en) * | 2013-09-26 | 2014-01-22 | 北京奇虎科技有限公司 | Bandwidth adjusting device and method |
| CN103902378A (en) * | 2012-12-26 | 2014-07-02 | 鸿富锦精密工业(深圳)有限公司 | File allocation system and method |
| CN104363300A (en) * | 2014-11-26 | 2015-02-18 | 浙江宇视科技有限公司 | Compute task distributed dispatching device in server cluster |
| CN107070716A (en) * | 2017-04-14 | 2017-08-18 | 腾讯科技(深圳)有限公司 | Game server state acquiring method, device, electronic equipment and storage medium |
| CN109120680A (en) * | 2018-07-27 | 2019-01-01 | 北京华为数字技术有限公司 | A kind of control system, method and relevant device |
| CN110278226A (en) * | 2018-03-15 | 2019-09-24 | 阿里巴巴集团控股有限公司 | Load balance process method, apparatus and electronic equipment |
| CN110941848A (en) * | 2018-09-21 | 2020-03-31 | 富士施乐株式会社 | Document management system |
| CN112346845A (en) * | 2021-01-08 | 2021-02-09 | 腾讯科技(深圳)有限公司 | Method, device and equipment for scheduling coding tasks and storage medium |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| GB2309558A (en) * | 1996-01-26 | 1997-07-30 | Ibm | Load balancing across the processors of a server computer |
| JP2001075785A (en) * | 1999-09-09 | 2001-03-23 | Nec Corp | Data updating system |
| CN1298149A (en) * | 1999-11-25 | 2001-06-06 | 戴尔美国公司 | Factory software management system |
| CN1367439A (en) * | 2002-02-10 | 2002-09-04 | 苏州市蜗牛电子有限公司 | Several customer terminals interdynamic load equalizing method and its system |
| CN100349116C (en) * | 2003-08-05 | 2007-11-14 | 华为技术有限公司 | Method for device for improving computer furction for accessing internet |
-
2005
- 2005-05-30 CN CNB2005100746060A patent/CN100371895C/en not_active Expired - Fee Related
Cited By (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102487404A (en) * | 2010-12-03 | 2012-06-06 | 英业达集团(天津)电子技术有限公司 | Method for balancing load of mapping file server |
| CN103902378A (en) * | 2012-12-26 | 2014-07-02 | 鸿富锦精密工业(深圳)有限公司 | File allocation system and method |
| CN103533032A (en) * | 2013-09-26 | 2014-01-22 | 北京奇虎科技有限公司 | Bandwidth adjusting device and method |
| CN104363300A (en) * | 2014-11-26 | 2015-02-18 | 浙江宇视科技有限公司 | Compute task distributed dispatching device in server cluster |
| CN104363300B (en) * | 2014-11-26 | 2018-06-05 | 浙江宇视科技有限公司 | Task distribution formula dispatching device is calculated in a kind of server cluster |
| CN107070716A (en) * | 2017-04-14 | 2017-08-18 | 腾讯科技(深圳)有限公司 | Game server state acquiring method, device, electronic equipment and storage medium |
| CN110278226A (en) * | 2018-03-15 | 2019-09-24 | 阿里巴巴集团控股有限公司 | Load balance process method, apparatus and electronic equipment |
| CN109120680A (en) * | 2018-07-27 | 2019-01-01 | 北京华为数字技术有限公司 | A kind of control system, method and relevant device |
| CN109120680B (en) * | 2018-07-27 | 2022-01-14 | 北京华为数字技术有限公司 | Control system, method and related equipment |
| CN110941848A (en) * | 2018-09-21 | 2020-03-31 | 富士施乐株式会社 | Document management system |
| CN112346845A (en) * | 2021-01-08 | 2021-02-09 | 腾讯科技(深圳)有限公司 | Method, device and equipment for scheduling coding tasks and storage medium |
| CN112346845B (en) * | 2021-01-08 | 2021-04-16 | 腾讯科技(深圳)有限公司 | Method, device and equipment for scheduling coding tasks and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN100371895C (en) | 2008-02-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7467293B2 (en) | Method and computing system for transparence computing on the computer network | |
| US20070180280A1 (en) | Controlling the allocation of power to a plurality of computers whose supply of power is managed by a common power manager | |
| CN1934536A (en) | Computer system, server constituting the same, job execution control method thereof, and program | |
| US20080301406A1 (en) | System and method for allocating communications to processors in a multiprocessor system | |
| CN1495634A (en) | Server clustering load balancing method and system | |
| CN1534949A (en) | Method and equipment used for obtaining state information in network | |
| JP2002169694A (en) | Method and system for automatically assigning a boot server to a PXE client on a network via a DHCP server | |
| CN1794180A (en) | Method and system for monitoring and controlling access to a computer system resource | |
| US20120233261A1 (en) | Optimized prefetching for wide area networks | |
| GB2532834A (en) | A method and system for scalable job processing | |
| US20170171337A1 (en) | Scalable data feed system | |
| US8458702B1 (en) | Method for implementing user space up-calls on java virtual machine before/after garbage collection | |
| CN1873613A (en) | File preinstallation system and method for load balancing | |
| WO2023116434A1 (en) | Data processing system and method and device | |
| CN113065848B (en) | Deep learning scheduling system and scheduling method supporting multi-class cluster back end | |
| US10523746B2 (en) | Coexistence of a synchronous architecture and an asynchronous architecture in a server | |
| CN115242786B (en) | Multi-mode big data job scheduling system and method based on container cluster | |
| CN113094172A (en) | Server management method and device applied to distributed storage system | |
| CN111294383B (en) | Internet of things service management system | |
| CN1521990A (en) | Fully dynamic distributed network service management system and its service method | |
| CN1863051A (en) | Application managing sub-system in multi-node intelligent network application service system and method | |
| CN200944605Y (en) | Domain name server and communication system | |
| CN1238990C (en) | Cooperative starting method for network computer | |
| CN118250331A (en) | Communication method of asynchronous network input/output assembly | |
| CN1581794A (en) | Long-range control method and system for communication device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20080227 Termination date: 20190530 |