CN1519743A - File preassembling system and method for balancing load by using broadcasting mechanism - Google Patents
File preassembling system and method for balancing load by using broadcasting mechanism Download PDFInfo
- Publication number
- CN1519743A CN1519743A CNA031019080A CN03101908A CN1519743A CN 1519743 A CN1519743 A CN 1519743A CN A031019080 A CNA031019080 A CN A031019080A CN 03101908 A CN03101908 A CN 03101908A CN 1519743 A CN1519743 A CN 1519743A
- Authority
- CN
- China
- Prior art keywords
- file
- client
- server
- data
- connection
- 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
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
- Computer And Data Communications (AREA)
Abstract
Description
技术领域technical field
本发明涉及一种文件预装系统及方法,尤其涉及一种应用于客户机/服务器网络结构,利用广播机制均衡负载的文件预装系统及方法。The invention relates to a file preinstallation system and method, in particular to a file preinstallation system and method applied to a client/server network structure and using a broadcast mechanism to balance loads.
背景技术Background technique
计算机(包括笔记型计算机和台式计算机)在出厂之前都要在硬盘上预装操作系统和应用软件,用户购买一台计算器后,打开电源即可使用。Computers (including notebook computers and desktop computers) all have operating systems and application software pre-installed on the hard disk before leaving the factory. After a user buys a calculator, he can turn on the power and use it.
为达到这一目标,一般的做法是:首先,在一台样机上进行常规的操作,包括分区、格式化、安装操作系统、安装随机软件等;然后在DOS下将样机硬盘复制成一个镜像文件,并将该镜像文件放在服务器上的共享目录中;最后通过客户机下载镜像文件,根据镜像文件恢复一个出货镜像。In order to achieve this goal, the general method is: first, perform routine operations on a prototype, including partitioning, formatting, installing the operating system, installing random software, etc.; then copy the hard disk of the prototype into a mirror image file under DOS , and put the image file in the shared directory on the server; finally download the image file through the client computer, and restore a shipping image according to the image file.
这种方法的优点是系统和软件只需安装一次,减少了工序和工时。然而这样做仍然存在下列明显的不足之处:The advantage of this method is that the system and software only need to be installed once, which reduces the process and man-hours. However, this still has the following obvious disadvantages:
1.若有n个客户机同时从服务器上下载出货镜像时,网络流量是一个客户机时的n倍,当客户机数量很多时会对网络造成巨大的负担,不仅使下载效率大大下降,甚至会造成网络数据过多,使网络瘫痪。1. If there are n clients downloading the shipping image from the server at the same time, the network traffic is n times that of one client. When the number of clients is large, it will cause a huge burden on the network, not only greatly reducing the download efficiency, but also It may even cause too much network data and paralyze the network.
2.当有若干个客户机同时在线下载出货镜像文件时,服务器对同一个镜像文件进行并发处理,因为没有对并发处理进行统一调度,所以会对服务器磁盘造成较大的负担,在一定程度上降低了数据下载速率。2. When several clients download the shipping image file online at the same time, the server performs concurrent processing on the same image file. Because there is no unified scheduling for concurrent processing, it will cause a large burden on the server disk. To a certain extent The data download rate has been reduced.
3.当生产线上同时在线的出货镜像较多时,为提高效率,不得不采取使用高性能服务器、增加服务器数量,采用千兆网等措施,这样一来就大大增加了生产成本。3. When there are many shipping images online at the same time on the production line, in order to improve efficiency, measures such as using high-performance servers, increasing the number of servers, and adopting Gigabit networks have to be taken, which greatly increases production costs.
一个明显的例子是,当生产线上同时有20台客户机下载出货镜像时,下载1G的出货镜像文件需要45分钟,而只有一台客户机在线时,下载相同的出货镜像时只需要5分钟。An obvious example is that when there are 20 client computers downloading the shipping image at the same time on the production line, it takes 45 minutes to download the 1G shipping image file, but when only one client computer is online, it only takes 45 minutes to download the same shipping image file 5 minutes.
发明内容Contents of the invention
本发明的目的在于提供一种利用广播机制均衡负载的文件预装系统及其方法,无论每个镜像文件同时对应多少台客户机,其只需要一台客户机的带宽就可实现对多客户机的数据传输,不用扩容现有网络,即可以较低成本实现较高效率的镜像文件的下载安装。本发明提供一种利用广播机制均衡负载的文件预装系统,应用于客户机/服务器网络结构,该系统包括:数据连接,以无面向连接方式建立于所述服务器与客户机之间,用以从服务器向客户机传播数据包;以及命令连接,以面向连接方式建立于所述服务器与客户机之间,用以双向传输命令请求。The purpose of the present invention is to provide a file preinstallation system and method thereof that utilizes a broadcast mechanism to balance loads. No matter how many clients each image file corresponds to at the same time, it only needs the bandwidth of one client to realize multi-client It can download and install image files with high efficiency at a low cost without expanding the existing network. The present invention provides a file preinstallation system using a broadcast mechanism to balance loads, which is applied to a client/server network structure. The system includes: a data connection established between the server and the client in a non-connection-oriented manner for Propagate data packets from the server to the client; and a command connection is established between the server and the client in a connection-oriented manner for bidirectional transmission of command requests.
本发明还提供一种利用广播机制均衡负载的文件预装方法,应用于客户机/服务器网络结构,该方法包括:在该客户机与服务器之间建立两个连接,一个采用无面向连接方式的数据连接,另一个采用面向连接方式的命令连接;通过数据连接,从服务器向客户机传播数据包,通过命令连接,在客户机与服务器之间建立双向的传输命令请求;以及客户机接收到从服务器端广播出来的数据包,并将其写入到磁盘指定位置。The present invention also provides a file preloading method using a broadcast mechanism to balance loads, which is applied to a client/server network structure. The method includes: establishing two connections between the client and the server, one using a non-connection-oriented Data connection, another connection-oriented command connection; through the data connection, the data packet is transmitted from the server to the client, and through the command connection, a two-way transmission command request is established between the client and the server; and the client receives the data packet from the server. The data packet broadcasted by the server is written to the specified location on the disk.
本发明具有以下优点:The present invention has the following advantages:
1.占用较少的网络带宽:由于服务器采用的是广播方式,数据广播一次,所有的客户机均能收到广播资料,因此,无论每个镜像文件同时对应多少台客户机,数据传输只占用和对应一台客户机时相同的带宽。较少的网络带宽带来的进一步的优点是减少了网络数据过多的危险。1. Occupies less network bandwidth: Since the server adopts the broadcast method, all clients can receive the broadcast data once the data is broadcast. Therefore, no matter how many clients correspond to each image file at the same time, the data transmission only takes up Same bandwidth as for one client. A further advantage of less network bandwidth is the reduced danger of network data overload.
2.生产效率高:由于一台和多台客户机同时下载镜像文件所占用的时间是基本相同的,所以在生产线上大批量生产时能体现出较高的生产效率。2. High production efficiency: Since the time taken by one and multiple clients to download the image file at the same time is basically the same, it can reflect high production efficiency in mass production on the production line.
3.工序安排灵活:由于服务器端采用UDP协议向客户机广播数据包时,只要监测到有客户机在线就循环播发镜像文件的数据,客户机只要监测到所有的磁盘位置都已写入数据便退出。这样可保证客户机没有必要从镜像文件的开始下载数据,即客户机没有必要同时启动,从而可保证生产工序的安排有较大的弹性。3. Flexible process arrangement: Since the server uses the UDP protocol to broadcast data packets to the client, as long as it detects that the client is online, it will circulate the data of the mirror file. As long as the client detects that all disk locations have written data, it quit. This can ensure that the client computer does not need to download data from the beginning of the image file, that is, the client computers do not need to be started at the same time, thereby ensuring greater flexibility in the arrangement of the production process.
4.较低的生产成本:从速度上考虑,100M的网络环境已满足客户机的需求,因为当前的速度瓶颈为客户机的解压缩和写硬盘,更快的网速和更高的服务器性能已不再成为必要的需求。这样就没有必要要求速度更高的网络环境和性能更高的服务器。4. Lower production cost: From the perspective of speed, the 100M network environment has met the needs of the client, because the current speed bottleneck is the client's decompression and writing to the hard disk, faster network speed and higher server performance is no longer a necessary requirement. In this way, there is no need to require a higher-speed network environment and a higher-performance server.
附图说明Description of drawings
图1为本发明的利用广播机制均衡负载的文件预装系统及方法所运行的网络环境示意图;Fig. 1 is the schematic diagram of the network environment that utilizes the file preloading system of the present invention to balance load and method to run;
图2为本发明的利用广播机制均衡负载的文件预装系统结构示意图;Fig. 2 is the structural representation of the file preinstallation system utilizing the broadcast mechanism to balance the load of the present invention;
图3为本发明所涉及的服务器端功能模块示意图;FIG. 3 is a schematic diagram of server-side functional modules involved in the present invention;
图4为本发明所涉及的客户机端功能模块示意图;FIG. 4 is a schematic diagram of the functional modules of the client terminal involved in the present invention;
图5为本发明的利用广播机制均衡负载的文件预装方法流程图;Fig. 5 is the flow chart of the file preinstallation method utilizing the broadcast mechanism to balance the load of the present invention;
图6为本发明所涉及的从服务器向客户机传输数据包的步骤流程图;以及FIG. 6 is a flow chart of the steps involved in transmitting data packets from the server to the client according to the present invention; and
图7为本发明所涉及的客户机接收数据包并写入磁盘的步骤流程图。FIG. 7 is a flow chart of the steps of the client receiving the data packet and writing it to the disk according to the present invention.
附图标记说明:Explanation of reference signs:
10服务器端,11服务器管理模块,12读文件模块,13写套接字模块,20客户机端,21客户机管理模块,22读套接字模块,23写文件模块,24解压缩模块,30集线器(Share Hub),40交换机(Switch Hub),101数据连接,102命令连接,10 server side, 11 server management module, 12 file read module, 13 write socket module, 20 client side, 21 client management module, 22 read socket module, 23 write file module, 24 decompression module, 30 Hub (Share Hub), 40 switches (Switch Hub), 101 data connections, 102 command connections,
步骤501 在该客户机与服务器之间建立两个连接,一个采用无面向连接方式的数据连接,另一个采用面向连接方式的命令连接
步骤502 通过数据连接,从服务器向客户机广播数据包,通过命令连接,在客户机与服务器之间建立双向的传输命令请求
步骤503 客户机接收到从服务器端广播出来的数据包,并将其写入到磁盘指定位置
步骤601 服务器端侦听并响应客户机的请求命令
步骤602 查找需要安装的镜像文件的当前数据段
步骤603 确定该当前数据段的位置参数
步骤604 根据该位置参数读取该数据段
步骤605 确定写套接字任务队列的节点
步骤606 按照该节点,将读取出的数据段压入该写套接字任务队列
步骤607 将该节点的数据包广播出去
步骤608 释放该节点
步骤701 从套接字读取数据包
步骤702 创建一写文件任务队列节点
步骤703 根据该节点将数据包压入写文件任务队列
步骤704 从该写文件任务队列中获得该节点Step 704 Obtain the node from the file writing task queue
步骤705 根据该节点将资料写入磁盘指定位置Step 705 Write the data to the specified location on the disk according to the node
步骤706 释放该节点Step 706 Release the node
具体实施方式Detailed ways
请参见图1,为本发明的利用广播机制均衡负载的文件预装系统及方法所运行的网络环境示意图,服务器端10通过集线器(Share Hub)30和交换机(Switch Hub)40与客户机端20组成网络。连接客户机的所有(通常只有一个)的网络集线器连接在一个交换机上,交换机屏蔽掉服务器的IP地址,以免数据的广播影响网络上的其它系统。Please refer to Fig. 1, it is the schematic diagram of the network environment that utilizes the file preinstallation system and the method of broadcasting mechanism load balance of the present invention to run,
参见图2,为本发明的利用广播机制均衡负载的文件预装系统结构示意图,该系统由服务器端10、客户机端20、数据连接101和命令连接102组成。客户机端20负责接收数据、必要时解压缩数据,然后将镜像文件的原始数据写入客户机磁盘中的指定位置;服务器端10负责管理欲安装的镜像文件、响应客户机的请求、向客户机广播镜像文件数据包以及用户交互功能及统一调度客户端20的访问需求;数据连接101以无面向连接方式建立于所述服务器与客户机之间,用以从服务器向客户机广播数据包;命令连接102以面向连接方式建立于所述服务器与客户机之间,用以双向传输命令请求。Referring to FIG. 2 , it is a schematic structural diagram of a file preinstallation system using a broadcast mechanism to balance loads according to the present invention.
上述该无面向连接方式可以是采用UDP协议,而面向连接方式可以采用TCP协议。The above-mentioned non-connection-oriented manner may adopt the UDP protocol, while the connection-oriented manner may adopt the TCP protocol.
当服务器10采用UDP协议向客户机广播数据包时,由于每个数据包的头部均含有数据包的位置信息,因此每个镜像文件只广播一次,所有的客户机都能收到文件数据。客户机端20在内存中维护一个链表,链表的信息表示磁盘上那一块位置已写入数据,那一块位置尚未写入数据,服务器10只要监测到有客户机在线就循环播放镜像文件的数据,客户机只要监测到所有的磁盘位置都已写入数据便退出。这样可保证客户机没有必要从镜像文件的开始下载数据,即客户机没有必要同时激活,从而可保证生产工序的安排有较大的弹性。When
参见图3,系为服务器端功能模块示意图,其由服务器管理模块11、读文件模块12和写套接字模块13组成。其中,读文件模块12用以读取磁盘中的镜像文件,写套接字模块13用以将从镜像文件中读取出的数据包广播出去,服务器管理模块,用以管理该读文件模块和写套接字模块,并监控客户端的请求。Referring to FIG. 3 , it is a schematic diagram of server-side functional modules, which is composed of a server management module 11 , a file reading module 12 and a socket writing module 13 . Wherein, the file reading module 12 is used to read the image file in the disk, the write socket module 13 is used to broadcast the data packets read from the image file, and the server management module is used to manage the file reading module and Write a socket module and monitor client requests.
参见图4,系为客户机端功能模块示意图,其由客户机管理模块21、读套接字模块22和写文件模块23组成。其中,读套接字模块22用以从广播端口读取数据包,写文件模块23用以将数据写入磁盘指定位置,客户机管理模块21用以管理该读套接字模块和写文件模块,监控数据包的丢失情况,并向服务器端发出请求。如果镜像文件是经过压缩处理的,那么在客户机端还可以包含有一解压缩模块24,用以将读取出的经过压缩的数据包解压缩。Referring to FIG. 4 , it is a schematic diagram of the functional modules of the client, which is composed of a
为了提高下载效率,服务器端和客户机端均可采用多线程并行处理,各模块之间可通过队列传递数据。In order to improve the download efficiency, both the server and the client can use multi-thread parallel processing, and the data can be transferred between modules through queues.
参见图5,为本发明的利用广播机制均衡负载的文件预装方法流程图。首先,在该客户机与服务器之间建立两个连接,一个采用无面向连接方式的数据连接,另一个采用面向连接方式的命令连接(步骤501);然后,通过数据连接,从服务器向客户机广播数据包,通过命令连接,在客户机与服务器之间建立双向的传输命令请求(步骤502);最后,客户机接收到从服务器端广播出来的数据包,并将其写入到磁盘指定位置(步骤503)。Referring to FIG. 5 , it is a flow chart of the file preinstallation method using the broadcast mechanism to balance the load of the present invention. At first, two connections are set up between the client computer and the server, one adopts a data connection without a connection-oriented mode, and the other adopts a connection-oriented command connection (step 501); then, through the data connection, from the server to the client computer Broadcast data packet, set up bidirectional transmission order request (step 502) between client computer and server by command connection; Finally, client computer receives the data packet that broadcasts from server end, and writes it to disk specified location (step 503).
参见图6,为本发明所涉及的从服务器向客户机传输资料包数据包的步骤流程图,首先服务器端侦听并响应客户机的请求命令(步骤601);接着,查找需要安装的镜像文件的当前数据段(步骤602);确定该当前数据段的位置参数(步骤603);根据该位置参数读取该数据段(步骤604);确定写套接字任务队列的节点(步骤605);按照该节点,将读取出的数据段压入该写套接字任务队列(步骤606);将该节点的数据包广播出去(步骤607);释放该节点(步骤608)。Referring to Fig. 6, it is the flow chart of the steps of transmitting the data packet data packet from the server to the client computer involved in the present invention, at first the server end listens to and responds to the request command (step 601) of the client computer; then, finds the image file that needs to be installed The current data segment (step 602); determine the position parameter (step 603) of this current data segment; read this data segment (step 604) according to this position parameter; determine the node (step 605) of write socket task queue; According to the node, push the read data segment into the write socket task queue (step 606); broadcast the data packet of the node (step 607); release the node (step 608).
其中,服务器端用于侦听到有客户机在线就循环广播镜像文件的数据包。对于需要安装的镜像文件,可以将其切分成若干数据段,并可通过创建一读文件任务队列来对该镜像文件的数据段进行管理和排序。Wherein, the server end is used for listening to the data packet of the image file being cyclically broadcasted when the client computer is online. For the image file that needs to be installed, it can be divided into several data segments, and the data segment of the image file can be managed and sorted by creating a file read task queue.
在读取文件之前,需要确定当前数据段的位置参数,如:偏移地址(Offset)或长度(LEN)等。Before reading the file, it is necessary to determine the position parameters of the current data segment, such as: offset address (Offset) or length (LEN), etc.
参见图7,为本发明所涉及的客户机接收数据包并写入磁盘的步骤流程图。首先,从套接字读取数据包(步骤701);接着,创建一写文件任务队列节点(步骤702);根据该节点将数据包压入写文件任务队列(步骤703);从该写文件任务队列中获得该节点(步骤704);根据该节点将资料写入磁盘指定位置(步骤705);最后,释放该节点(步骤706)。Referring to FIG. 7 , it is a flow chart of the steps of the client receiving the data packet and writing it to the disk according to the present invention. First, read the data packet (step 701) from the socket; then, create a write file task queue node (step 702); according to the node, the data packet is pressed into the write file task queue (step 703); from the write file Obtain the node from the task queue (step 704); write the data to the designated location on the disk according to the node (step 705); finally, release the node (step 706).
其中,如果镜像文件是经过压缩处理的,那么在上述创建一写文件任务队列节点(步骤702)之后,还包含一将读取出的经压缩的数据包解压缩的步骤。Wherein, if the image file is compressed, after creating a file writing task queue node (step 702 ), a step of decompressing the read compressed data package is also included.
在客户机将数据写入磁盘指定位置之后,如果该客户机监测到所有的磁盘位置都已写入了数据便退出。After the client computer writes data to the designated location on the disk, if the client computer detects that all disk locations have written data, it exits.
以上所述的实施例,只是本发明的较佳实施例,并不是用来限定本发明的实施范围;所有依本发明的权利要求书的范围所作的不脱离本发明的精神和范围内的变化与修饰,都在本发明的保护范围之内。The embodiments described above are only preferred embodiments of the present invention, and are not intended to limit the scope of implementation of the present invention; all changes made within the scope of the claims of the present invention do not depart from the spirit and scope of the present invention and modifications are within the protection scope of the present invention.
Claims (18)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 03101908 CN1278251C (en) | 2003-01-23 | 2003-01-23 | File Preloading System and Method Using Broadcast Mechanism to Balance Load |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 03101908 CN1278251C (en) | 2003-01-23 | 2003-01-23 | File Preloading System and Method Using Broadcast Mechanism to Balance Load |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN1519743A true CN1519743A (en) | 2004-08-11 |
| CN1278251C CN1278251C (en) | 2006-10-04 |
Family
ID=34281506
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN 03101908 Expired - Lifetime CN1278251C (en) | 2003-01-23 | 2003-01-23 | File Preloading System and Method Using Broadcast Mechanism to Balance Load |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN1278251C (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101982955A (en) * | 2010-11-19 | 2011-03-02 | 深圳华大基因科技有限公司 | High-performance file transmission system and method thereof |
| CN117425147A (en) * | 2023-09-08 | 2024-01-19 | 重庆数智融合创新科技有限公司 | Terminal data distribution system and method for production line |
-
2003
- 2003-01-23 CN CN 03101908 patent/CN1278251C/en not_active Expired - Lifetime
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101982955A (en) * | 2010-11-19 | 2011-03-02 | 深圳华大基因科技有限公司 | High-performance file transmission system and method thereof |
| WO2012065520A1 (en) * | 2010-11-19 | 2012-05-24 | 深圳华大基因科技有限公司 | System and method for file transmission |
| CN101982955B (en) * | 2010-11-19 | 2013-09-04 | 深圳华大基因科技有限公司 | High-performance file transmission system and method thereof |
| CN117425147A (en) * | 2023-09-08 | 2024-01-19 | 重庆数智融合创新科技有限公司 | Terminal data distribution system and method for production line |
Also Published As
| Publication number | Publication date |
|---|---|
| CN1278251C (en) | 2006-10-04 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN1171153C (en) | System and method for managing connections between a server and a client | |
| CN1288575C (en) | System and method for managing connections between client and server | |
| CN1132113C (en) | Performance optimizations for computer networks using HTTP | |
| US10783121B2 (en) | Techniques for optimizing data flows in hybrid cloud storage systems | |
| US20060167969A1 (en) | Data caching based on data contents | |
| CN1605071A (en) | Apparatus and methods for delayed network information transfer | |
| CN1372405A (en) | Go-on sustained connection | |
| CN115858184B (en) | RDMA memory management method, device, equipment and medium | |
| EP2011029B1 (en) | Managing network response buffering behavior | |
| CN1714346A (en) | System and method for data transmission and reception | |
| WO2021012723A1 (en) | Multimedia file storage and access method | |
| US20010049727A1 (en) | Method for effficient and scalable interaction in a client-server system in presence of bursty client requests | |
| CN1909462A (en) | Server | |
| CN1197296C (en) | An information switch | |
| US20060224759A1 (en) | System and method for a peer-to-peer streaming content operation by a browser plug-in | |
| CN1519743A (en) | File preassembling system and method for balancing load by using broadcasting mechanism | |
| US20040064644A1 (en) | Structure and method of cache memory data update | |
| CN1873613A (en) | File preinstallation system and method for load balancing | |
| CN101064715A (en) | Realization of embedded system based P2P technique | |
| CN1917512A (en) | Method for establishing direct connected peer-to-peer channel | |
| US7480739B1 (en) | Segregated caching of linked lists for USB | |
| US20040240388A1 (en) | System and method for dynamic assignment of timers in a network transport engine | |
| CN1863051A (en) | Application managing sub-system in multi-node intelligent network application service system and method | |
| CN1725728A (en) | Buffer management method based on signaling protocol | |
| CN1559037A (en) | A backup switch that streams data units into terminals |
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 | ||
| ASS | Succession or assignment of patent right |
Owner name: I VALLEY HOLDINGS CO., LTD. Free format text: FORMER OWNER: YINGYEDA CO., LTD., TAIWAN Effective date: 20150723 |
|
| C41 | Transfer of patent application or patent right or utility model | ||
| TR01 | Transfer of patent right |
Effective date of registration: 20150723 Address after: Cayman Islands, George Town Patentee after: Microsoft Corp. Address before: Taipei City, Taiwan, China Patentee before: Yingda Co.,Ltd. |
|
| CX01 | Expiry of patent term | ||
| CX01 | Expiry of patent term |
Granted publication date: 20061004 |