CN114338700A - Local area network point-to-point distributed storage method - Google Patents
Local area network point-to-point distributed storage method Download PDFInfo
- Publication number
- CN114338700A CN114338700A CN202111590561.8A CN202111590561A CN114338700A CN 114338700 A CN114338700 A CN 114338700A CN 202111590561 A CN202111590561 A CN 202111590561A CN 114338700 A CN114338700 A CN 114338700A
- Authority
- CN
- China
- Prior art keywords
- message
- sending
- area network
- local area
- user
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 34
- 230000006855 networking Effects 0.000 abstract description 5
- 238000004891 communication Methods 0.000 abstract description 4
- 238000005516 engineering process Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
Images
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a point-to-point distributed storage method of a local area network, which is applied to a local area network system, wherein the local area network system comprises a plurality of user nodes, the user nodes are connected to a router, and the method comprises the following steps: one user node sends a storage demand message to a router; the router broadcasts a storage requirement message to all other user nodes in the local area network; the user node receiving the storage demand message sends a first position information message containing the position of the user node to the user node sending the storage demand message; and the user node sending the storage demand message sends the source file to a plurality of corresponding user nodes sending the first position information message according to the plurality of received position information messages. The invention relates to a point-to-point distributed storage method of a local area network, which realizes networking by using router broadcasting in the local area network and enables nodes to carry out one-to-many communication by adopting a UDP protocol, thereby realizing point-to-point distributed storage.
Description
Technical Field
The invention relates to a point-to-point distributed storage method of a local area network.
Background
Distributed storage is a data storage technology, and refers to combining storage spaces on machines through a network to form a virtual storage space. The point-to-point distributed storage is realized by utilizing a point-to-point technology, so that the storage space is expanded from the server to all personal computers, the bandwidth and the storage space can be utilized to the maximum extent, and meanwhile, the server cost is also saved. At present, most of networks for point-to-point distributed storage use the TCP protocol for networking association.
TCP connections have the following drawbacks: the efficiency is low, the TCP connection needs three-way handshake and only one-to-one communication can be performed. A networking central server is needed, and the position of another point must be determined through the central server to carry out communication networking.
Disclosure of Invention
The invention provides a point-to-point distributed storage method for a local area network, which solves the technical problems mentioned above and specifically adopts the following technical scheme:
a point-to-point distributed storage method of local area network is applied to a local area network system, the local area network system comprises a plurality of user nodes, the user nodes are connected to a router, and the method comprises the following steps:
one user node sends a storage demand message to a router;
the router broadcasts a storage requirement message to all other user nodes in the local area network;
the user node receiving the storage demand message sends a first position information message containing the position of the user node to the user node sending the storage demand message;
and the user node sending the storage demand message sends the source file to a plurality of corresponding user nodes sending the first position information message according to the plurality of received position information messages.
Further, the storage requirement message is a UDP protocol message, and the first location information message is a UDP protocol message.
Further, the specific method for the user node sending the storage demand message to send the source file to the corresponding plurality of user nodes sending the first location information messages according to the received plurality of first location information messages is as follows:
and the user node sending the storage demand message sends the source file to a plurality of user nodes sending the first position information message through a UDP protocol.
Further, the specific method for the user node sending the storage demand message to send the source file to the corresponding plurality of user nodes sending the first location information messages according to the received plurality of first location information messages is as follows:
the user node sending the storage demand message generates an uploading queue according to the received first position information messages;
and the user nodes sending the storage demand messages transmit the source files to a plurality of user nodes sending the first position information messages according to the uploading queue.
Further, the user node sending the storage demand message sends the source files to a first number of user nodes sending the first location information message at the same time.
Further, the first number is 1 or more and 5 or less.
Further, one of the user nodes sends a downloading demand message to the router;
the router broadcasts a downloading demand message to all other user nodes in the local area network;
the user node which receives the downloading demand message and stores the source file sends a second position information message containing the position of the user node to the user node which sends the downloading demand message;
and the user node sending the downloading demand message downloads the source file from the corresponding user nodes sending the second position information messages respectively according to the received second position information messages.
Further, the download request message and the second location information message are UDP protocol messages.
Further, the specific method for the user node sending the download demand message to download the source file from the corresponding plurality of user nodes sending the second location information messages according to the plurality of received second location information messages is as follows:
and the user node sending the download demand message downloads the source files from a plurality of user nodes sending the second position information message through a UDP protocol.
Further, the specific method for the user node sending the download demand message to download the source file from the corresponding plurality of user nodes sending the second location information messages according to the plurality of received second location information messages is as follows:
and the user node sending the downloading demand message divides the source file to be downloaded into a plurality of files, and the downloaded files are assembled into a finished source file from one file corresponding to the user nodes sending the second position information messages respectively after the downloading is finished.
The invention has the advantages that the provided point-to-point distributed storage method of the local area network realizes networking by using router broadcasting in the local area network, and the UDP protocol is adopted to enable the nodes to carry out one-to-many communication, thereby realizing point-to-point distributed storage.
Drawings
Fig. 1 is a schematic diagram of a point-to-point distributed storage method of a local area network according to the present invention.
Detailed Description
The invention is described in detail below with reference to the figures and the embodiments.
Fig. 1 shows a point-to-point distributed storage method for a local area network according to the present application, which is applied to a local area network system, where the local area network system includes a plurality of user nodes, and the user nodes are connected to a router. The method for the distributed storage of the local area network point-to-point comprises the following steps: s1: one of the user nodes sends a storage demand message to the router. S2: and the router broadcasts the storage demand message to all other user nodes in the local area network. S3: and the user node receiving the storage demand message sends a first position information message containing the position of the user node to the user node sending the storage demand message. S4: and the user node sending the storage demand message sends the source file to a plurality of corresponding user nodes sending the first position information message according to the plurality of received position information messages. The above steps are specifically described below.
For step S1: one of the user nodes sends a storage demand message to the router.
When one of the user nodes, for example, node a, needs to store a source file, node a needs to broadcast a storage requirement to the lan. Specifically, the node a sends a storage demand message to the router. The storage demand message is a UDP protocol message, and it only needs to send a request to the router, and does not need to respond, and does not need to know which nodes receive the broadcast.
For step S2: and the router broadcasts the storage demand message to all other user nodes in the local area network.
After receiving the storage demand message, the router broadcasts the storage demand message to all connected machines in the local area network.
For step S3: and the user node receiving the storage demand message sends a first position information message containing the position of the user node to the user node sending the storage demand message.
Nodes receiving the storage demand message, such as node B, node C, node D, node E, and node F, actively send a first location information message containing their own location information (MAC and IP) to node a. The first location information message is also a UDP request. So for node B, node C, node D, node E and node F, this request consumes little computing resources, while node B, node C, node D, node E and node F are also not concerned about whether node a receives the request.
For step S4: and the user node sending the storage demand message sends the source file to a plurality of corresponding user nodes sending the first position information message according to the plurality of received position information messages.
After the node A receives the first position information of the plurality of nodes, the node A can send source files to the plurality of target nodes through a UDP protocol, and the requirement of point-to-point distributed storage is met.
As a preferred embodiment, a specific method for sending, by a user node sending a storage demand message, a source file to a plurality of corresponding user nodes sending first location information messages according to a plurality of received first location information messages includes:
and the user node sending the storage demand message generates an uploading queue according to the received first position information messages.
And the user nodes sending the storage demand messages transmit the source files to a plurality of user nodes sending the first position information messages according to the uploading queue.
It will be appreciated that in order to avoid network congestion, the amount of network data will become very large if storage reception is initiated to all nodes at once. Therefore, in the present application, the node a sequences the node B, the node C, the node D, the node E, and the node F, and then sequentially transmits the source file to a plurality of user nodes that send the first location information packet.
Preferably, node a will first pick a first number of nodes from node B, node C, node D, node E and node F to send source files.
In a preferred embodiment, the first number is 1 or more and 5 or less.
In the present application, the first number is 2. For example, node a first uploads a source file to nodes C and D, while node B, E and F queue up for upload in an upload queue.
As a preferred embodiment, when one of the user nodes needs to download a file, one of the user nodes sends a download requirement message to the router. And the router broadcasts the downloading demand message to all other user nodes in the local area network. And the user node which receives the downloading demand message and stores the source file sends a second position information message containing the position of the user node to the user node which sends the downloading demand message. And the user node sending the downloading demand message downloads the source file from the corresponding user nodes sending the second position information messages respectively according to the received second position information messages.
It can be understood that when the node a needs to download the source file, the node a sends a download requirement packet to the router, and the router broadcasts the download requirement packet to other nodes. And the user nodes which receive the downloading demand message and store the source file, such as the node B, the node C, the node D, the node E and the node F, send second position information messages to the node A. After receiving the second location information for the node(s), node a may download source files from the plurality of destination nodes via the UDP protocol. Preferably, the download request message and the second location information message are UDP protocol messages.
As a preferred embodiment, the specific method for downloading the source file by the user node sending the download demand message according to the received plurality of second location information messages from the corresponding plurality of user nodes sending the second location information messages includes:
and the user node sending the downloading demand message divides the source file to be downloaded into a plurality of files, and the downloaded files are assembled into a finished source file from one file corresponding to the user nodes sending the second position information messages respectively after the downloading is finished.
It can be understood that, when downloading a file, if a node is suddenly offline (the machine is shut down or crashed), the program can record the downloading progress, so that the switching node can perform breakpoint resuming, and time is saved. In addition, the file can be divided into a plurality of parts, the parts are transmitted by a plurality of nodes at the same time, and the parts are assembled into a complete file after transmission is finished, so that the file submitting efficiency is high.
The foregoing illustrates and describes the principles, general features, and advantages of the present invention. It should be understood by those skilled in the art that the above embodiments do not limit the present invention in any way, and all technical solutions obtained by using equivalent alternatives or equivalent variations fall within the scope of the present invention.
Claims (10)
1. A point-to-point distributed storage method of local area network is applied to a local area network system, the local area network system comprises a plurality of user nodes, and the user nodes are connected to a router, and the method is characterized by comprising the following steps:
one user node sends a storage demand message to the router;
the router broadcasts the storage demand message to all other user nodes in the local area network;
the user node receiving the storage demand message sends a first position information message containing the position of the user node to the user node sending the storage demand message;
and the user node sending the storage demand message sends a source file to a plurality of corresponding user nodes sending the first position information message according to the plurality of received position information messages.
2. The local area network peer-to-peer distributed storage method of claim 1,
the storage demand message is a UDP protocol message and the first position information message is a UDP protocol message.
3. The local area network peer-to-peer distributed storage method of claim 1,
the specific method for the user node sending the storage demand message to send the source file to the corresponding plurality of user nodes sending the first location information messages according to the received plurality of first location information messages is as follows:
and the user node sending the storage demand message sends a source file to a plurality of user nodes sending the first position information message through a UDP protocol.
4. The local area network peer-to-peer distributed storage method of claim 1,
the specific method for the user node sending the storage demand message to send the source file to the corresponding plurality of user nodes sending the first location information messages according to the received plurality of first location information messages is as follows:
the user node sending the storage demand message generates an uploading queue according to the received first position information messages;
and the user node sending the storage demand message transmits the source file to a plurality of user nodes sending the first position information message according to the uploading queue.
5. The local area network peer-to-peer distributed storage method of claim 4,
and the user nodes sending the storage demand messages simultaneously send source files to a first number of user nodes sending the first position information messages.
6. The local area network peer-to-peer distributed storage method of claim 5,
the first number is 1 or more and 5 or less.
7. The local area network peer-to-peer distributed storage method of claim 1,
one user node sends a downloading demand message to a router;
the router broadcasts the downloading demand message to all other user nodes in the local area network;
the user node which receives the downloading demand message and stores the source file sends a second position information message containing the position of the user node to the user node which sends the downloading demand message;
and the user node sending the download demand message downloads the source files from the corresponding user nodes sending the second position information messages respectively according to the received second position information messages.
8. The local area network peer-to-peer distributed storage method of claim 7,
the download demand message and the second location information message are UDP protocol messages.
9. The local area network peer-to-peer distributed storage method of claim 7,
the specific method for the user node sending the download demand message to download the source file from the corresponding plurality of user nodes sending the second location information messages according to the plurality of received second location information messages is as follows:
and the user node sending the download demand message downloads the source files from a plurality of user nodes sending the second position information message through a UDP protocol.
10. The local area network peer-to-peer distributed storage method of claim 7,
the specific method for the user node sending the download demand message to download the source file from the corresponding plurality of user nodes sending the second location information messages according to the plurality of received second location information messages is as follows:
and the user node sending the download demand message divides the source file to be downloaded into a plurality of files, and the downloaded files are assembled into a finished source file from one file corresponding to the user nodes sending the second position information messages respectively after the download is finished.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111590561.8A CN114338700A (en) | 2021-12-23 | 2021-12-23 | Local area network point-to-point distributed storage method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111590561.8A CN114338700A (en) | 2021-12-23 | 2021-12-23 | Local area network point-to-point distributed storage method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114338700A true CN114338700A (en) | 2022-04-12 |
Family
ID=81054716
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111590561.8A Pending CN114338700A (en) | 2021-12-23 | 2021-12-23 | Local area network point-to-point distributed storage method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114338700A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101325611A (en) * | 2008-07-30 | 2008-12-17 | 金蝶软件(中国)有限公司 | Point-to-point download method and apparatus |
CN101640691A (en) * | 2008-07-28 | 2010-02-03 | 中国移动通信集团公司 | Method for storing and searching data, and data storage network |
US20110131336A1 (en) * | 2009-12-01 | 2011-06-02 | Synacast Computer System (Shanghai) Co., Ltd. | Method and device for file transmission based on multiple protocols |
CN108234518A (en) * | 2018-02-06 | 2018-06-29 | 深圳创维-Rgb电子有限公司 | A kind of method, apparatus, terminal and the storage medium of terminal communication |
CN111182067A (en) * | 2019-12-31 | 2020-05-19 | 上海焜耀网络科技有限公司 | Data writing method and device based on interplanetary file system IPFS |
CN111866176A (en) * | 2020-08-04 | 2020-10-30 | 蝉鸣科技(西安)有限公司 | FTP/FTPS distributed file transmission method and device and computer storage medium |
CN112637351A (en) * | 2020-12-25 | 2021-04-09 | 珠海金山网络游戏科技有限公司 | File downloading method and device |
-
2021
- 2021-12-23 CN CN202111590561.8A patent/CN114338700A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101640691A (en) * | 2008-07-28 | 2010-02-03 | 中国移动通信集团公司 | Method for storing and searching data, and data storage network |
CN101325611A (en) * | 2008-07-30 | 2008-12-17 | 金蝶软件(中国)有限公司 | Point-to-point download method and apparatus |
US20110131336A1 (en) * | 2009-12-01 | 2011-06-02 | Synacast Computer System (Shanghai) Co., Ltd. | Method and device for file transmission based on multiple protocols |
CN108234518A (en) * | 2018-02-06 | 2018-06-29 | 深圳创维-Rgb电子有限公司 | A kind of method, apparatus, terminal and the storage medium of terminal communication |
CN111182067A (en) * | 2019-12-31 | 2020-05-19 | 上海焜耀网络科技有限公司 | Data writing method and device based on interplanetary file system IPFS |
CN111866176A (en) * | 2020-08-04 | 2020-10-30 | 蝉鸣科技(西安)有限公司 | FTP/FTPS distributed file transmission method and device and computer storage medium |
CN112637351A (en) * | 2020-12-25 | 2021-04-09 | 珠海金山网络游戏科技有限公司 | File downloading method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7225243B1 (en) | Device discovery methods and systems implementing the same | |
US9191219B2 (en) | Network multicast peer discovery methods | |
CN106961426B (en) | Communication method and device of intelligent equipment | |
EP2858313B1 (en) | Method, device, and system for routing function activation and data transmission | |
CN111427527B (en) | Screen projection method, device, equipment and computer readable storage medium | |
EP2618539A2 (en) | Method, system, and proxy node for P2P streaming media data distribution | |
CN109327513B (en) | Interaction method, interaction device and computer-readable storage medium | |
US20050063409A1 (en) | Method and apparatus for managing multicast delivery to mobile devices involving a plurality of different networks | |
CN110012083B (en) | Data transmission method, server and data transmission device | |
JP3872051B2 (en) | System and method for searching and distributing contents, and program | |
CN105262836A (en) | Information push method of server and push information reception method of client | |
CN114553799B (en) | Multicast forwarding method, device, equipment and medium based on programmable data plane | |
CN113572864A (en) | Data processing method, network element equipment and readable storage medium | |
WO2016070566A1 (en) | Cloud terminal upgrade method and system, network management server and proxy server | |
CN112217649B (en) | Terminal equipment management method, server and terminal equipment | |
CN102025782A (en) | Point-to-point communication method, device and system | |
JP2006222659A (en) | Radio communication device, system and method | |
CN103746768A (en) | Data packet identification method and equipment thereof | |
CN112968965A (en) | Metadata service method, server and storage medium for NFV network node | |
CN110166487B (en) | Local area network equipment information transmission method, main equipment, storage medium and intelligent equipment | |
CN114338700A (en) | Local area network point-to-point distributed storage method | |
US9936055B2 (en) | Using multicasting to concurrently image multiple client devices | |
CN105210347A (en) | Monitoring server, parsing server, request device and node selection method | |
CN110474781B (en) | Method and device for forwarding multicast data | |
CN109379443B (en) | Method for realizing distributed message queue facing to Internet of things |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |