CN106973080A - A kind of big document distribution method of LAN and system - Google Patents

A kind of big document distribution method of LAN and system Download PDF

Info

Publication number
CN106973080A
CN106973080A CN201710089770.1A CN201710089770A CN106973080A CN 106973080 A CN106973080 A CN 106973080A CN 201710089770 A CN201710089770 A CN 201710089770A CN 106973080 A CN106973080 A CN 106973080A
Authority
CN
China
Prior art keywords
file
blocks
files
client
server
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.)
Pending
Application number
CN201710089770.1A
Other languages
Chinese (zh)
Inventor
张锡聪
陈志勐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
GREEN NET WORLD (FUJIAN) NETWORK TECHNOLOGY Co Ltd
Original Assignee
GREEN NET WORLD (FUJIAN) NETWORK TECHNOLOGY Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by GREEN NET WORLD (FUJIAN) NETWORK TECHNOLOGY Co Ltd filed Critical GREEN NET WORLD (FUJIAN) NETWORK TECHNOLOGY Co Ltd
Priority to CN201710089770.1A priority Critical patent/CN106973080A/en
Publication of CN106973080A publication Critical patent/CN106973080A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols

Abstract

The invention discloses a kind of big document distribution method of LAN of the invention and system, method includes:Server safeguards client side list information, and by each client number consecutively be C1, C2 ..., Cn;The server by file virtually be averaged cutting be n blocks, and be designated successively F1, F2 ..., Fn;Server maintenance documentation block message, and client side list information and file block message are issued into all clients;Blocks of files Fi is distributed to client Ci by the server according to file block message;The blocks of files Fi received is distributed to other clients in LAN according to client side list information by client Ci;Each client according to file block message by the blocks of files F1 received, F2 ..., Fn be spliced into complete file, notify server after verification file integrality.The present invention by big file by carrying out cutting, and equilibrium is distributed to each client in the form of blocks of files, then is mutually distributed by client, so as to reduce server stress and lifting distribution speed.

Description

A kind of big document distribution method of LAN and system
Technical field
The present invention relates to field of computer technology, more particularly to a kind of big document distribution method of LAN and system.
Background technology
When big file being handed down into multiple terminals in same LAN using C/S model, current general way is:Clothes Business device sends big file to each client, and flow needed for so causing server distribution is big, and distribution bottleneck concentrates on clothes It is engaged on device, file issues slowly and causes server long time treatment high load condition, once overload, it is also possible to cause clothes Business device is delayed machine, and file need to be resend.Such as teacher issues 100MB file to 60 student terminals by server, Server need to issue 6000MB altogether, if LAN broadband is 100Mbps, completing whole distribution procedure needs 6000MB/100Mbps =480s, is difficult to receive if tangible break is distributed the so long time.
The content of the invention
It is an object of the invention to overcome the deficiencies in the prior art, propose that one kind overcomes above mentioned problem or at least in part A kind of big document distribution method of LAN and system solved the above problems, by the way that big file is carried out into cutting, with blocks of files Form equilibrium is distributed to each client, then is mutually distributed by client, so as to reduce server stress and lifting distribution speed Degree.
The technical solution adopted for the present invention to solve the technical problems is:
On the one hand, the big document distribution method of a kind of LAN, including:
Step 1, server safeguards client side list information, and by each client number consecutively be C1, C2 ..., Cn;Its In, n represents the quantity for the client being in same LAN;
Step 2, the server by file virtually be averaged cutting be n blocks, and be designated successively F1, F2 ..., Fn;
Step 3, the server maintenance documentation block message, and client side list information and file block message are issued all Client;
Step 4, blocks of files Fi is distributed to client Ci by the server according to file block message;Wherein, i is more than or equal to 1 is less than or equal to n;
Step 5, the blocks of files Fi received is distributed to its in LAN according to client side list information by client Ci His client;
Step 6, each client according to file block message by the blocks of files F1 received, F2 ..., Fn be spliced into complete text Server is notified after part, verification file integrality.
Server file is virtually averaged cutting refers to without actual cutting I/O operation, but by Fseek () or Seek () function carries out file read-write deviation post to carry out file block identification.
The blocks of files information includes blocks of files mark, blocks of files destination path, file destination name, file size, file Piecemeal quantity and each file block size.
The client side list information includes the IP address and port numbers of all clients.
Step 5 includes:IP address of the client Ci in client side list information and port numbers are by the file received Block Fi, blocks of files sequence number i and blocks of files Fi size are distributed to other clients in LAN.
Each client according to file block message by the blocks of files F1 received, F2 ..., Fn be spliced into complete file, verify After file integrality before notice server, in addition to:
When each client judges reception blocks of files time-out or the incorrect file block size received, notify that server is direct Distribution of document block or file.
Step 6 includes:Each client is received after a blocks of files from other clients, is sentenced according to file block message Whether disconnected All Files block finishes receiving, if finished receiving, by the blocks of files F1 received, F2 ..., Fn be spliced into complete text Server is notified after part, verification file integrality;Otherwise, wait and being spliced again after receiving All Files block.
Server is notified after the verification file integrality, including:
If client is correct according to blocks of files information checking file size, sends messaging service device and receive into Work(.
A kind of big document distribution method of LAN of the present invention, when server have big file need to be distributed to it is many in LAN During individual client, virtually averagely cutting is carried out by Fseek () or the big file of seek () function pair first, then by after cutting Blocks of files be sent to corresponding client, then blocks of files is mutually transmitted by client, All Files block finishes receiving rear each visitor Blocks of files is spliced into complete file by family end again, so as to reduce server stress and lifting distribution speed.
According to another aspect of the present invention there is provided a kind of big document distribution system of LAN, if including server and The dry client being in same LAN;
The server, for safeguarding client side list information, and by each client number consecutively be C1, C2 ..., Cn; By file virtually be averaged cutting be n blocks, and be designated successively F1, F2 ..., Fn;Maintenance documentation block message, and by client side list Information and file block message issue all clients;Blocks of files Fi is distributed to by client Ci according to file block message;
The client, for the blocks of files Fi received to be distributed to its in LAN according to client side list information His client;According to file block message by the blocks of files F1 received, F2 ..., Fn be spliced into complete file, verification file is complete Server is notified after property.
When the client is additionally operable to judge reception blocks of files time-out or the incorrect file block size received, clothes are notified The business direct distribution of document block of device or file.
The beneficial effect that the technical scheme that the present invention is provided is brought is:Reduce server stress and lifting distribution speed.
Described above is only the general introduction of technical solution of the present invention, in order to more clearly understand the technology hand of the present invention Section, be practiced so as to the content according to specification, and in order to allow the present invention above and other objects, features and advantages It can become apparent, be exemplified below the embodiment of the present invention.
According to the accompanying drawings to the detailed description of the specific embodiment of the invention, those skilled in the art will be brighter Above-mentioned and other purpose, the advantages and features of the present invention.
Brief description of the drawings
Fig. 1 is the inventive method flow chart;
Fig. 2 is the structural representation of present system.
Embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to embodiment party of the present invention Formula is described in further detail.
It should be noted that the executive agent of the method for present embodiment includes server terminal and Duo Tai client computer is whole End, the terminal is the equipment such as tablet personal computer, palm PC PDA, notebook or desktop computer, it is, of course, also possible to have for other The equipment of identity function, the model configuration of the terminal is configured according to the actual requirements, and present embodiment is not any limitation as.
It is shown in Figure 1, a kind of big document distribution method of LAN, including:
Step 101, server safeguards client side list information, and by each client number consecutively be C1, C2 ..., Cn;Its In, n represents the quantity for the client being in same LAN.
Specifically, the client side list information, which includes the client side list information, includes the IP address of all clients And port numbers.
Step 102, the server by file virtually be averaged cutting be n blocks, and be designated successively F1, F2 ..., Fn.
Specifically, file is virtually averaged by the server, cutting refers to without actual cutting I/O operation, but passes through Fseek () or seek () function carries out file read-write deviation post to carry out file block identification.Like this still protect in the server Leave the file of completion.
Step 103, the server maintenance documentation block message, and client side list information and file block message are issued into institute There is client.
Specifically, the blocks of files information is big including blocks of files mark, blocks of files destination path, file destination name, file Small, file block quantity and each file block size.The file block identification be with F1, F2 ..., Fn is the mark that represents;It is shown Blocks of files destination path, which refers to blocks of files, to be needed to be sent under which path of client;The file destination name refers to blocks of files transmission To the file name after client on the client;The file size refers to the size of the whole file before non-cutting, after being used for The integrality of continuous checking file;The file number of blocks of the file block quantity cutting, it is actual to be equal to visitor in same LAN The quantity at family end;Each file block size refers to the size of each blocks of files after cutting, and the present invention uses average cutting, so Actually each file block size is identical.
Further, client is received after the client side list information and file block message of server transmission, can be by These information are preserved in the form of a file.
Step 104, blocks of files Fi is distributed to client Ci by the server according to file block message;Wherein, i be more than etc. It is less than or equal to n in 1.
Specifically, blocks of files destination path and file destination name of the server in file block message, by blocks of files Fi The corresponding paths of client Ci are distributed to, and create corresponding file destination name and are preserved.
Step 105, the blocks of files Fi received is distributed in LAN by client Ci according to client side list information Other clients.
Specifically, IP address of the client Ci in client side list information and port numbers are by the blocks of files received Fi, blocks of files sequence number i and blocks of files Fi size are distributed to other clients in LAN, and text is judged for other clients Whether part block all finishes receiving.
Step 106, each client according to file block message by the blocks of files F1 received, F2 ..., Fn be spliced into complete text Server is notified after part, verification file integrality.
Specifically, each client according to file block message by the blocks of files F1 received, F2 ..., Fn be spliced into complete text Notify before server, can also include after part, verification file integrality:
When each client judges reception blocks of files time-out or the incorrect file block size received, notify that server is direct Distribution of document block or file.
Further, each client is received after a blocks of files from other clients, is sentenced according to file block message Whether disconnected All Files block finishes receiving, if finished receiving, by the blocks of files F1 received, F2 ..., Fn be spliced into complete text Server is notified after part, verification file integrality;Otherwise, wait and being spliced again after receiving All Files block.
Further, server is notified after the verification file integrality, including:
If client is correct according to blocks of files information checking file size, sends messaging service device and receive into Work(.
A kind of big document distribution method of LAN of the present invention, when server have big file need to be distributed to it is many in LAN During individual client, virtually averagely cutting is carried out by Fseek () or the big file of seek () function pair first, then by after cutting Blocks of files be sent to corresponding client, then blocks of files is mutually transmitted by client, All Files block finishes receiving rear each visitor Blocks of files is spliced into complete file by family end again, so as to reduce server stress and lifting distribution speed.
A kind of big document distribution system of LAN, including:Including server and some clients being in same LAN End;
The server, for safeguarding client side list information, and by each client number consecutively be C1, C2 ..., Cn; By file virtually be averaged cutting be n blocks, and be designated successively F1, F2 ..., Fn;By client side list information and file block message Issue all clients;Blocks of files Fi is distributed to by client Ci according to file block message;
The client, for the blocks of files Fi received to be distributed to its in LAN according to client side list information His client;According to file block message by the blocks of files F1 received, F2 ..., Fn be spliced into complete file, verification file is complete Server is notified after property.
Further, the client is additionally operable to judge that the file block size for receiving blocks of files time-out or receiving is incorrect When, notify the direct distribution of document block of server or file.
Shown in Figure 2, the present embodiment includes server S, three clients C1, C2 and C3.Server is by text to be distributed Part switches to blocks of files F1, F2 and F3, and blocks of files F1 is sent into client C1, and blocks of files F2 is distributed into client C2, Blocks of files F3 is distributed to client C3.Afterwards, blocks of files F1 is sent respectively to client C2 and C3, client by client C1 Blocks of files F2 is sent respectively to client C1 and C3 by C2, client and C3 by blocks of files F3 be sent respectively to client C1 and C2。
Further, such as teacher issues 100MB file to 60 student terminals, server by server 100MB file cutting is 60 parts and is handed down to each client, server actually only issues 100MB, if LAN broadband For 100Mbps, the time of server distribution is only 100MB/100Mbps=8s;Any client is needed to other clients point Hair n-1 times, completes whole distribution procedure and totally takes only slight beyond 100MB/100Mbps=8s, less than 100MB*2/100Mbps =16s, the time is far less than the time being only distributed by server, reduces server stress and lifting distribution speed.
Described above is only the general introduction of technical solution of the present invention, in order to more clearly understand the technology hand of the present invention Section, be practiced so as to the content according to specification, and in order to allow the present invention above and other objects, features and advantages It can become apparent, be exemplified below the embodiment of the present invention.
The foregoing is only presently preferred embodiments of the present invention, be not intended to limit the invention, it is all the present invention spirit and Within principle, any modification, equivalent substitution and improvements made etc. should be included in the scope of the protection.

Claims (10)

1. a kind of big document distribution method of LAN, including:
Step 1, server safeguards client side list information, and by each client number consecutively be C1, C2 ..., Cn;Wherein, n tables Show the quantity for the client being in same LAN;
Step 2, the server by file virtually be averaged cutting be n blocks, and be designated successively F1, F2 ..., Fn;
Step 3, server maintenance documentation block message, and client side list information and file block message are issued into all clients;
Step 4, blocks of files Fi is distributed to client Ci by the server according to file block message;Wherein, i is small more than or equal to 1 In equal to n;
Step 5, the blocks of files Fi received is distributed to other visitors in LAN according to client side list information by client Ci Family end;
Step 6, each client according to file block message by the blocks of files F1 received, F2 ..., Fn be spliced into complete file, school Test and server is notified after file integrality.
2. the big document distribution method of LAN according to claim 1, it is characterised in that the server is virtual by file Average cutting includes carrying out file read-write deviation post to carry out file block identification by Fseek () or seek () function.
3. the big document distribution method of LAN according to claim 2, it is characterised in that the blocks of files information includes text Part block identification, blocks of files destination path, file destination name, file size, file block quantity and each file block size.
4. the big document distribution method of LAN according to claim 1, it is characterised in that the client side list packet Include the IP address and port numbers of all clients.
5. the big document distribution method of LAN according to claim 4, it is characterised in that step 5 includes:Client Ci roots According to the IP address and port numbers in client side list information by the blocks of files Fi received, blocks of files sequence number i and blocks of files Fi Size is distributed to other clients in LAN.
6. the big document distribution method of LAN according to claim 3, it is characterised in that each client is believed according to blocks of files Breath by the blocks of files F1 received, F2 ..., Fn be spliced into complete file, before notifying server after verification file integrality, also Including:
When each client judges reception blocks of files time-out or the incorrect file block size received, server is notified directly to distribute Blocks of files or file.
7. the big document distribution method of LAN according to claim 3 or 6, it is characterised in that step 6 includes:Each client Termination is received after a blocks of files from other clients, judges whether All Files block has received according to file block message Into, if finished receiving, by the blocks of files F1 received, F2 ..., Fn be spliced into complete file, lead to after verification file integrality Know server;Otherwise, wait and being spliced again after receiving All Files block.
8. the big document distribution method of LAN according to claim 7, it is characterised in that after the verification file integrality Server is notified, including:
If client is correct according to blocks of files information checking file size, sends messaging service device and receive successfully.
9. a kind of big document distribution system of LAN, including server and some clients being in same LAN;It is special Levy and be,
The server, for safeguarding client side list information, and by each client number consecutively be C1, C2 ..., Cn;By text Part virtually be averaged cutting be n blocks, and be designated successively F1, F2 ..., Fn;Maintenance documentation block message, and by client side list information All clients are issued with file block message;Blocks of files Fi is distributed to by client Ci according to file block message;
The client, for other visitors being distributed to the blocks of files Fi received according to client side list information in LAN Family end;According to file block message by the blocks of files F1 received, F2 ..., Fn be spliced into complete file, after verification file integrality Notify server.
10. system according to claim 9, it is characterised in that the client is additionally operable to judge to receive blocks of files time-out Or the file block size that receives it is incorrect when, notify the direct distribution of document block of server or file.
CN201710089770.1A 2017-02-20 2017-02-20 A kind of big document distribution method of LAN and system Pending CN106973080A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710089770.1A CN106973080A (en) 2017-02-20 2017-02-20 A kind of big document distribution method of LAN and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710089770.1A CN106973080A (en) 2017-02-20 2017-02-20 A kind of big document distribution method of LAN and system

Publications (1)

Publication Number Publication Date
CN106973080A true CN106973080A (en) 2017-07-21

Family

ID=59334967

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710089770.1A Pending CN106973080A (en) 2017-02-20 2017-02-20 A kind of big document distribution method of LAN and system

Country Status (1)

Country Link
CN (1) CN106973080A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109614159A (en) * 2017-09-30 2019-04-12 北京国双科技有限公司 Plan target distribution, introduction method and device
CN110545271A (en) * 2019-08-28 2019-12-06 北京天融信网络安全技术有限公司 method and system for restoring file

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102158847A (en) * 2010-12-01 2011-08-17 北京迅捷英翔网络科技有限公司 Communication method and system between mobilephone and server
CN103986747A (en) * 2014-04-14 2014-08-13 曦威胜科技开发(深圳)有限公司 Method for sharing and downloading files in P2P protocol
CN104602138A (en) * 2015-01-30 2015-05-06 青岛海信电器股份有限公司 Method and device for supporting HLS protocol by streaming media server
CN105718808A (en) * 2016-01-18 2016-06-29 天津科技大学 File encryption storage system and method based on multiple network disks

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102158847A (en) * 2010-12-01 2011-08-17 北京迅捷英翔网络科技有限公司 Communication method and system between mobilephone and server
CN103986747A (en) * 2014-04-14 2014-08-13 曦威胜科技开发(深圳)有限公司 Method for sharing and downloading files in P2P protocol
CN104602138A (en) * 2015-01-30 2015-05-06 青岛海信电器股份有限公司 Method and device for supporting HLS protocol by streaming media server
CN105718808A (en) * 2016-01-18 2016-06-29 天津科技大学 File encryption storage system and method based on multiple network disks

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
黄晓涛,李志永: ""P2P网中基于文件分片的副本建立策略"", 《计算机仿真》 *
黄晓涛,李志永: "P2P网中基于文件分片的副本建立策略", 《计算机仿真》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109614159A (en) * 2017-09-30 2019-04-12 北京国双科技有限公司 Plan target distribution, introduction method and device
CN109614159B (en) * 2017-09-30 2022-01-28 北京国双科技有限公司 Method and device for distributing and importing planning tasks
CN110545271A (en) * 2019-08-28 2019-12-06 北京天融信网络安全技术有限公司 method and system for restoring file

Similar Documents

Publication Publication Date Title
CN105939240B (en) Load-balancing method and device
CN104144207B (en) Interface loading method and system and device
CN104144206B (en) A kind of interface loading method, system and device
CN105939291A (en) Message processing unit and network device
CN105007319B (en) Method for sending information, apparatus and system
CN107734076A (en) Information push method, device and storage medium
CN110048935A (en) A kind of cross-terminal exchange method, apparatus and system
EP3028437A1 (en) Messaging api over http protocol to establish context for data exchange
CN106060075A (en) Method for realizing webpage anonymous chat
CN106973080A (en) A kind of big document distribution method of LAN and system
CN102594912A (en) Data processing method under server architecture, server and server architecture
CN108173737A (en) A kind of group chat method and system, server, mobile terminal
CN104268766A (en) Synchronous release method, device and terminal for e-commerce products
CN105992174A (en) Message processing method and device
WO2006091411A3 (en) Method and system for load balancing in network platform
CN106302117A (en) Message delivery system, method and apparatus
CN108111662A (en) Communication means and system, business platform, client and communication network
CN105592038B (en) Portal authentication method and device
CN104954227B (en) A kind of cross-platform information push method of preemptive type and server
CN104507087A (en) Security service system and security service method for mobile office work
CN105704008B (en) A kind of webpage instant communication method, system and terminal
CN112685395A (en) Method, device, equipment and medium for removing duplicate of unordered data in longitudinal federal statistics
CN102244695A (en) Contact person grouping system and method
CN107257558A (en) Message forwarding method and device
CN106412893A (en) Rapid Portal authentication method, system, and WIFI device

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20170721

WD01 Invention patent application deemed withdrawn after publication