Method and system for parallel P2P file transmission of WebRTC real-time communication protocol of Web client
By using the P2P transmission management system on the Web client to screen and optimize proxy nodes, combined with the WebRTC real-time communication protocol and wide area network distributed storage, the parallel P2P file transfer problem of the Web client is solved, and efficient and stable file transfer and data integrity are achieved.
Patent Information
- Application Number
- CN202510945485.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-09
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-07-09
AI Technical Summary
In the existing technology, Web clients cannot implement parallel P2P file transfer of the WebRTC real-time communication protocol, resulting in slow transmission rate and poor stability. In particular, when transferring large files, the cost is high and is limited by the network quality of the private network.
Through the P2P transmission management system, proxy nodes are screened and optimized, the private network traversal function of the WebRTC real-time communication protocol is utilized, combined with the wide area network distributed storage system, the node reputation value is calculated and multiple proxy nodes are allocated for file cutting and parallel transmission, and the transmission channel is dynamically managed to improve efficiency.
It achieves efficient file transfer across private networks, reduces transmission costs, improves transmission speed and stability, and ensures data integrity.
Smart Images

Figure CN120658719A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of distributed storage, and in particular to a method and system for parallel P2P file transmission using a Web client WebRTC real-time communication protocol. Background Art
[0002] Web clients mainly refer to web browsers. Their main function is to present web resources requested by users from the server and display them in the browser window.
[0003] The WebRTC real-time communication protocol, led by Google, consists of a set of standards, protocols, and JavaScript APIs for enabling end-to-end audio, video, and data sharing between browsers. The WebRTC data channel is specifically designed to transmit any data other than audio, such as short messages, real-time text chat, file transfers, and game controls.
[0004] Peer-to-peer (P2P) technology is a technology used to directly exchange data or services between different computer users without going through relay devices.
[0005] When a web client transfers files to a storage service, either the web client or the storage service often requires a high quality of service (QoS) network and a fixed public IP address. A fixed public IP address is a globally unique IP address used to identify devices on the internet. It can be accessed and communicated with by other internet devices and is crucial for cross-regional communication. However, fixed public IP addresses are typically assigned by internet service providers (ISPs). This requirement significantly increases transmission costs, especially for large file transfers, where transmission requirements are higher and costs are consequently higher.
[0006] WebRTC offers NAT traversal and data transfer capabilities. Using the WebRTC real-time communication protocol effectively improves data transmission success rates and reduces network requirements on both ends of the communication. Web browsers themselves fully implement the WebRTC real-time communication protocol. Using WebRTC to transfer files between web browsers and storage services significantly reduces network requirements and costs for both the web browser and the storage provider.
[0007] The target files to be transmitted on the wide area network can be stored in multiple locations. The complete files can be stored in multiple locations, or the files can be split and each fragment can be stored in a different location, and multi-location backup processing can be performed to form a distributed storage system based on the wide area network. Various BitTorrent and IPFS are such storage systems.
[0008] Because web browsers support a limited number of protocols, most web clients currently use the traditional HTTP protocol for file transfer. HTTP file transfers suffer from slow transmission speeds, prone to interruptions, poor stability, and significant risks associated with single-point transmission. Large files are particularly prone to long transmission times and are susceptible to various uncertainties, leading to poor transmission stability.
[0009] Most domestic web client users do not have fixed public IP addresses. Instead, they use private network addresses for file transfers. The other end of the file transfer must have a public IP address or be on the same local area network. This significantly limits domestic web users' file transfer capabilities. The WebRTC real-time communication protocol features private network traversal, allowing storage nodes to be deployed on private networks. This can effectively reduce transmission costs, but network quality on private networks is difficult to guarantee.
[0010] Patent authorization announcement number CN 101304381 B discloses a method for file transfer in a P2P network. When a source peer node sends a file to a destination peer node, at least two forwarding peer nodes are used to transmit the file to the destination peer node. Alternatively, the source peer node and one or more forwarding peer nodes simultaneously transmit the file to the destination peer node, thereby realizing file transfer through parallel paths at the P2P layer, which helps to improve the throughput, reliability and stability of the transmission; however, parallel P2P file transfer cannot be realized in the WebRTC real-time communication protocol of the Web client.
[0011] There is an urgent need for a new file transfer method that can solve the above problems. Summary of the Invention
[0012] The present invention provides a method and system for parallel P2P file transmission using the WebRTC real-time communication protocol of a Web client, which solves the problem in the prior art that the Web client cannot perform real-time communication and parallel P2P file transmission.
[0013] The technical solution of the present invention is implemented as follows: a method for parallel P2P file transmission using the WebRTC real-time communication protocol of a Web client comprises the following steps: 1. The Web client requests a P2P transmission management system to allocate a proxy node. During the Web client request process, the P2P transmission management system server sends the Web client's Web terminal script to the Web client; 2. The P2P transmission management system screens the proxy nodes according to transmission requirements; 3. The Web terminal script records and regulates the WebRTC real-time communication protocol transmission quality between the Web client and the proxy node in real time during the transmission process; when all screened nodes cannot communicate normally with the Web client, the transmission fails, and a new proxy node is screened for file transfer; 4. After the Web client completes uploading or downloading each fragment, the Web terminal script and the proxy node check each file.
[0014] Furthermore, the step 2 is specifically as follows: 2.1. The number of proxy nodes: The P2P transmission management system calculates the number of N proxy nodes required based on the file size, the total number of nodes in the system, and the number of idle nodes, and cuts the file into integer multiples of N fragments, where N is a natural number greater than or equal to 1. The P2P transmission management system allocates 2N proxy nodes for Web client file transmission based on the average network rate of the proxy nodes. N proxy nodes transmit files with the Web client, and another N proxy nodes prepare for data transmission; 2.2. Preferred proxy nodes: The P2P transmission management system preferably selects proxy nodes that have successfully established a WebRTC real-time communication protocol connection with the Web client and have high network transmission quality.
[0015] The step 2.2 specifically includes: querying the communication history and transmission quality between the web client and the web client and the proxy node; calculating the node reputation value based on the network quality and transmission cumulative history of the proxy node, and prioritizing the node based on the size of the node's global reputation value; Furthermore, the node reputation value includes direct reputation value, indirect reputation value and global reputation value; the node reputation value adopts the calculation model of EigenTrust model: Direct reputation value: The number of transmission tasks completed by each node a and other nodes o is N cmp (a,b), the number of unsuccessful transactions between node a and other node b, N uncmp (a, b), computing node’s transfer completion metric: O ab =N cmp (a,b)-N uncmp (a, b), the average transmission bandwidth of the node is h, then the direct reputation value of the node is: Sab = O ab *h After a certain number of transmissions, the direct transmission reputation value C from node a to other node o ab can be defined as: C ab ; Indirect reputation value: The completion of the direct transmission between node a and other nodes. The indirect reputation value is related to the direct reputation value. The indirect reputation value C of node a and node d without direct transmission ad is: C ad , where k is all the nodes with transmission behavior between node a and node d; Global reputation value: Calculate the global reputation value T of each node through the transmission records between nodes i, The calculation formula is: T i =C 1i T1+...+C ri T i +...+C xi T x , where C ri is the direct or indirect reputation value of node r to node i, x is the total number of nodes in the network, and the value range of i is [1, x].
[0016] Preferably, during the transmission in step 3, regulating the Web client includes regulating the network transmission rate between the Web client and the proxy node to optimize the transmission efficiency; specifically: closing the proxy node with a small network transmission rate and retransmitting the shards to other proxy nodes with a high network transmission rate; The current number of normal proxy nodes M < N, where M is the number of data transmission channels through which the Web client successfully establishes real-time communication with the proxy node, and M is a natural number less than or equal to N; and there are remaining proxy nodes that have not established a WebRTC real-time communication protocol connection, then the script of the Web client continues to attempt to establish a WebRTC real-time communication protocol connection with the remaining proxy nodes, and the newly established WebRTC real-time communication protocol connection will be added to the data transmission queue to provide services for file shard transmission; The current number of normal proxy nodes M < N, and the Web client has attempted to establish a WebRTC real-time communication protocol connection with all 2N proxy nodes, then no longer attempt to create a new connection, and use the current M normal communication nodes to transmit the file shards until all the file shards are transmitted; During the transmission process, the fastest transmitting proxy nodes and the average rate X of the fastest nodes are recorded. Proxy nodes with a transmission speed less than 50K and those with a transmission speed less than 1 / 5X are eliminated. The transmission tasks of the eliminated nodes are sequentially assigned to the fastest nodes. In the case where the proxy node needs to be reselected in step 3: when M=N, the Web client stops trying to establish a new WebRTC real-time communication protocol connection; when M<1, the current transmission fails and the proxy node needs to be reselected.
[0017] Preferably, when the Web client uploads a file, the Web terminal script needs to fragment the file; when the Web client downloads a file, the P2P transmission management system counts the file storage location and file fragmentation; The P2P transmission management system records each proxy node that establishes the WebRTC real-time communication protocol and the communication quality between it and the Web client, records the data transmission rate, connection establishment speed and external IP address; records the proxy nodes that cannot establish the WebRTC real-time communication protocol, have a low transmission rate, and a long connection establishment time, as proxy nodes that need to be eliminated for the next transmission to the Web client.
[0018] A system for parallel P2P file transmission using the WebRTC real-time communication protocol on a Web client includes a Web client for presenting Web resources requested by a user from a server and displaying them in a browser window; a distributed storage system for storing files in multiple locations, the distributed storage system including storage nodes distributed across a wide area network; and a P2P transmission management system. The P2P transmission management system provides a Web terminal script, which is automatically downloaded to the user's Web client when the user accesses the file transfer Web page of the P2P transmission management system through the Web client. It also includes a WebRTC real-time communication protocol proxy node bound to the storage node; file data is transmitted between the Web client and the proxy node via the WebRTC real-time communication protocol;.
[0019] The P2P transmission management system includes a node reputation value calculation module; an agent node selection module; a transmission efficiency management module; a storage copy management module; and a verification module.
[0020] The present invention discloses a method for parallel P2P file transmission using the WebRTC real-time communication protocol on a web client. This method utilizes the private network traversal functionality of the WebRTC real-time communication protocol, combined with a wide area network distributed storage system, to transmit files across private networks. Reputation values are calculated based on the transmission quality of storage nodes in the system, and proxy nodes are rationally allocated based on the reputation values, improving file transfer efficiency. Files are also sliced into multiple fragments and stored in multiple locations, reducing transmission costs. Web client users can upload and download files in parallel using P2P protocols with various storage nodes, dynamically optimizing proxy nodes, reducing file transfer time, ensuring a minimum transmission rate, improving file transfer efficiency, and guaranteeing data integrity. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0022] Figure 1 : Schematic diagram of the process of this method; Figure 2 : System topology diagram. DETAILED DESCRIPTION
[0023] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention. Specific embodiment 1 A method for parallel P2P file transmission using the WebRTC real-time communication protocol of a Web client, wherein the Web client requests a P2P transmission management system to allocate a proxy node. During the Web client request process, the P2P transmission management system server sends the Web client's Web terminal script to the Web client, and the script is mainly responsible for P2P transmission control and data security verification and authentication. The P2P transmission management system determines the transmission requirements of network uplink traffic, downlink traffic, and storage capacity based on transmission requirements and request types. The proxy nodes are screened to ensure transmission efficiency and stability. During the transmission process, the Web terminal script records and regulates the WebRTC real-time communication protocol transmission quality between the Web client and the proxy node in real time to ensure smooth file transmission. When all screened nodes cannot communicate with the Web client normally, the transmission fails, and a new proxy node is selected for file transmission to ensure smooth file transmission. After each fragment of the Web client is uploaded or downloaded, the Web terminal script and the proxy node check each file, verify the data correctness, and ensure data integrity.
[0025] This embodiment is used for point-to-point file transfer on a Web client, especially for large file transfer scenarios. The Web client uses the private network traversal function of the WebRTC real-time communication protocol, combined with a wide area network distributed storage system, to transfer files across the private network. Web client users can upload and download files in parallel with each storage node through P2P, thereby improving file transfer efficiency and ensuring data integrity. Specific embodiment 2 Based on the embodiment, the screening of proxy nodes is optimized.
[0027] The P2P transmission management system calculates the number of N proxy nodes required based on the file size, the total number of nodes in the system, and the number of idle nodes, and cuts the file into fragments that are an integer multiple of N, where N is a natural number greater than or equal to 1. The P2P transmission management system allocates 2N proxy nodes for Web client file transmission based on the average network rate of the proxy nodes. N proxy nodes transmit files to the Web client. Considering the instability of the wide area network, in order to ensure the transmission quality, it is necessary to allocate twice as many nodes for transmission backup, and another N proxy nodes for data transmission preparation; the P2P transmission management system prefers proxy nodes that have successfully established a WebRTC real-time communication protocol connection with the Web client and have high network transmission quality. If the number of proxy nodes in the historical record is <2N, then proxy nodes with adjacent IP addresses are preferred, the selected nodes are prioritized, and 2N RtcAgen nodes are allocated for data transmission preparation.
[0028] The P2P transmission management system selects the preferred proxy node by querying the communication history and transmission quality between the Web client and the Web client and the proxy node; when the Web client uploads a file, the Web terminal script needs to fragment the file and calculate the HASH value of the fragment, and the number of fragments is an integer multiple of N; when the Web client downloads a file, the P2P transmission management system counts the file storage location and file fragmentation; the P2P transmission management system records the various proxy nodes of the WebRTC real-time communication protocol that have been established and the communication quality between them and the Web client, and records the data transmission rate, connection establishment speed and external IP address. The P2P transmission management system calculates the external service capability of the node based on this historical information; and eliminates the proxy nodes that were unable to establish the WebRTC real-time communication protocol with the Web client last time, have a low transmission rate, and take a long time to establish a link.
[0029] The node reputation value is calculated based on the proxy node's network quality and the historical record of the accumulated transmission volume. The node is selected first based on its global reputation value. The node reputation value is divided into direct reputation value, indirect reputation value and global reputation value. The EigenTrust model is used to evaluate the node reputation value: Direct credit value: the number of completed transmission tasks N performed by each node a with other nodes o cmp (a,b), the number of unsuccessful transactions between node a and other node b, N uncmp (a, b), the transmission completion metric of the computing node: O ab =N cmp (a,b)-N uncmp (a, b), the average transmission bandwidth of the node is h, then the direct reputation value of the node is: S ab = O ab *h, after a certain number of transmissions, the direct transmission reputation value C from node a to other nodes o ab It can be defined as: C ab ; The indirect reputation value is the completion status of direct transmission between node a and other nodes. The indirect reputation value is related to the direct reputation value. The indirect reputation value C of node a and node d without direct transmission is ad C ad , where k is all nodes that have transmission behavior between node a and node d; The global reputation value T of each node is calculated through the transmission records between nodes. i, The calculation formula is: i =C 1i T1+...+C ri T i+...+C xi T x , where C ri is the direct or indirect reputation value of node r for node i, x is the total number of nodes in the network, and the value range of i is [1, x].
[0030] In this embodiment, according to the historical transmission records between nodes, a similar algorithm of the EigenTrust model is used to calculate the node reputation value, and the allocated nodes are optimized according to the node reputation value; the upload and download speeds of files are improved, and the overall transmission quality is guaranteed. Specific Embodiment Three On the basis of Specific Embodiment Two, the network transmission rate between the Web client and the proxy node is regulated to optimize the transmission efficiency; By closing the proxy nodes with low network transmission rates and retransmitting the shards to other proxy nodes with high network transmission rates; when the current number of normal proxy nodes M < N, where M is the number of data transmission channels in which the Web client and the proxy node successfully establish real-time communication, and M is a natural number less than or equal to N; and there are remaining proxy nodes that have not established a WebRTC real-time communication protocol connection, then the script of the Web client continues to attempt to establish a WebRTC real-time communication protocol connection with the remaining proxy nodes, and the newly established WebRTC real-time communication protocol connection will be added to the data transmission queue to provide services for file shard transmission; when the current number of normal proxy nodes M < N, and the Web client has attempted to establish a WebRTC real-time communication protocol connection with all 2N proxy nodes, then no new connection will be attempted, and the file shards will be transmitted using the current M normal nodes until all file shards are transmitted; During the transmission process, record the several proxy nodes with the fastest transmission and the average rate X of the fastest several nodes, eliminate the proxy nodes with a transmission speed less than 50K, and eliminate the proxy nodes with a transmission speed < 1 / 5X; arrange the transmission tasks of the eliminated nodes in order to the several nodes with the fastest speed to optimize the transmission speed.
[0032] This embodiment strengthens transmission quality management during Web transmission and dynamically optimizes transmission channels to avoid problems such as transmission interruptions, transmission waits, and transmission data errors. The Web terminal script cuts the file into multiple fragments, which are then transmitted via the WebRTC real-time communication protocol and multiple proxy nodes. The proxy nodes store the received file fragments on the bound storage nodes. Multiple files are distributed and stored on storage nodes in multiple locations, reducing storage costs. By bundling proxy nodes with storage nodes, Web client users can upload and download files in parallel through P2P between each storage node, reducing transmission costs. By dynamically optimizing proxy nodes, users can accelerate file downloads, reduce file transfer time, ensure a minimum transmission rate, improve file transfer efficiency, shorten the transmission time of files or each fragment, and ensure and improve overall transmission quality. Specific embodiment 4 Disclosed is a system for parallel P2P file transmission using a Web client and the WebRTC real-time communication protocol, which is used to implement the transmission methods of embodiments 1 to 4. The system includes a Web client, a distributed storage system, a P2P transmission management system, and a WebRTC real-time communication protocol proxy node bound to a storage node. The WebRTC real-time communication protocol proxy node is software and is usually deployed on the same physical server as the storage node. The proxy node obtains the metadata of the stored files or file fragments from the bound storage node, and uploads the binding relationship and storage information to the P2P transmission management system. When the storage node updates a file or fragment, it notifies the WebRTC proxy node. The proxy node is responsible for receiving and sending file fragment data from the Web terminal via the WebRTC real-time communication protocol, and the distributed storage node provides the WebRTC WebRTC real-time communication protocol with write and read file fragment services.
[0034] The web client presents the web resources requested by the user from the server and displays them in the browser window. When the user's web client browser accesses the file transfer web page provided by the P2P transmission management system, it downloads a web terminal script to the web client. When the user clicks the upload or download button on the web page, the web client invokes the web terminal script, which interacts with the P2P transmission management system to obtain a list of web proxy nodes for upload and download. This script is primarily used for P2P transmission control, data security verification and authentication, and WebRTC real-time communication protocol transmission. The web terminal script divides the file to be uploaded into multiple file segments, transmits each segment to each proxy node, and uploads each file segment to storage nodes in different locations on the wide area network. Distributed storage can provide complete storage services on its own or collaborate with other peer storage nodes to form a geographically distributed storage system, such as IPFS and BitTorrent. Typically, proxy nodes and distributed storage nodes are bundled and deployed together on a physical server or device. A WebRTC real-time communication protocol proxy node bound to a storage node; file data is transmitted between the Web client and the proxy node via the WebRTC real-time communication protocol; the proxy node is responsible for managing the reading and writing data of the bound storage node, and the proxy node needs to adapt to different wide area network distributed storage systems. The proxy node and the bound storage node are generally deployed in the same location, on the same server or in the same computer room. The proxy node and the bound storage node can be located in a private network, but generally have a public network address. The P2P transmission management system interacts with the Web client, manages file transfers, records file transfer status, selects proxy nodes, monitors transmission quality, manages the number and location of backups of files in the distributed storage system, etc. The maximum and minimum backup numbers of the backup data of files in the distributed storage system are set by the P2P transmission management system, and the distributed storage system itself is responsible for maintaining the backup number, and the backup number cannot be lower than the minimum backup number; The node reputation calculation module in the P2P transmission management system calculates based on the file transfer situation and transmission quality; the proxy node selection module selects based on file size, node reputation, and current node status; the transmission efficiency management module optimizes management based on the established data transmission channel and network transmission rate; the storage copy management module manages the number and location of file backups in the distributed storage system; the verification module verifies each transmitted file through a Web terminal script to verify data correctness and ensure data integrity.
[0035] The transmission method is realized through this system, which improves the efficiency of file transmission and ensures data integrity.
[0036] Of course, without departing from the spirit and essence of the present invention, technicians familiar with the field should be able to make various corresponding changes and modifications based on the present invention, but these corresponding changes and modifications should all fall within the scope of protection of the claims attached to the present invention.
Claims
1. A method for parallel P2P file transmission using the WebRTC real-time communication protocol on a Web client, characterized by: The following steps are involved:
1. The web client requests the P2P transmission management system to allocate a proxy node. During the web client request process, the P2P transmission management system server sends the web client's web terminal script to the web client; 2. The P2P transmission management system screens proxy nodes based on transmission requirements; 3. The Web terminal script records and regulates the WebRTC real-time communication protocol transmission quality between the Web client and the proxy node in real time during the transmission process. If all the selected nodes cannot communicate with the Web client normally, the transmission fails and a new proxy node is selected for file transfer.
4. After the web client completes uploading or downloading each shard, the web terminal script and proxy node check each file.
2. The method for parallel P2P file transmission using the WebRTC real-time communication protocol of a Web client according to claim 1, characterized in that: The specific steps of step 2 are: 2.
1. Number of proxy nodes: The P2P transmission management system calculates the number of N proxy nodes required based on the file size, the total number of nodes in the system, and the number of idle nodes. It then cuts the file into pieces that are integer multiples of N, where N is a natural number greater than or equal to 1. The P2P transmission management system allocates 2N proxy nodes for Web client file transfers based on the average network rate of the proxy nodes. N proxy nodes transfer files with the Web client, while another N proxy nodes prepare for data transmission. 2.
2. Preferred proxy nodes: The P2P transmission management system preferably selects proxy nodes that have successfully established a WebRTC real-time communication protocol connection with the Web client and have high network transmission quality.
3. The method for parallel P2P file transmission using the WebRTC real-time communication protocol of a Web client according to claim 2, characterized in that: The step 2.2 specifically includes: querying the communication history and transmission quality between the web client and the web client and the proxy node; calculating the node reputation value based on the network quality and transmission cumulative history of the proxy node, and prioritizing the node based on the size of the node's global reputation value; The node reputation value includes direct reputation value, indirect reputation value and global reputation value; the node reputation value adopts the calculation model of EigenTrust model: Direct reputation value: The number of transmission tasks completed by each node a and other nodes o is N cmp (a,b), the number of unsuccessful transactions between node a and other node b, N uncmp (a, b), computing node’s transfer completion metric: O ab =N cmp (a,b)-N uncmp (a, b), the average transmission bandwidth of the node is h, then the direct reputation value of the node is: S ab = O ab *h, After a certain number of transmissions, the direct transmission credit value C from node a to other nodes o ab It can be defined as: C ab ; Indirect reputation value: The completion status of direct transmission between node a and other nodes. The indirect reputation value is related to the direct reputation value. The indirect reputation value C of node a and node d without direct transmission is ad for: C ad , where k is all nodes that have transmission behavior between node a and node d; Global reputation value: Calculate the global reputation value T of each node through the transmission records between nodes i, The calculation formula is: T i =C 1i T1+...+C ri T i +...+C xi T x , where C ri is the direct or indirect reputation value of node r to node i, x is the total number of nodes in the network, and the value range of i is [1, x].
4. The method for parallel P2P file transmission using the WebRTC real-time communication protocol of a Web client according to claim 3, characterized in that: Regulating the Web client during the transmission process in step 3 includes optimizing the network transmission rate between the Web client and the proxy node; Specifically: shut down the proxy node with low network transmission rate and retransmit the fragment to other proxy nodes with high network transmission rate; If the number of currently functioning proxy nodes, M, is less than N, where M is the number of data transmission channels between the web client and the proxy nodes through which real-time communication has been successfully established, and M is a natural number less than or equal to N, and there are remaining proxy nodes to which a WebRTC real-time communication protocol connection has not yet been established, the web client script will continue attempting to connect to the remaining proxy nodes through the WebRTC real-time communication protocol. New links that successfully establish a WebRTC real-time communication protocol connection will be added to the data transmission queue to provide services for file segment transmission. If the number of currently functioning proxy nodes M < N, and the web client has already attempted to connect to all 2N proxy nodes using the WebRTC real-time communication protocol, no new connections will be attempted. Instead, the M nodes that are currently communicating normally will be used to transfer the file segments until all the file segments are transferred. During the transmission process, the fastest proxy nodes and the average rate X of the fastest nodes are recorded. Proxy nodes with a transmission speed less than 50K are eliminated, as are proxy nodes with a transmission speed less than 1 / 5X. The transmission tasks of the eliminated nodes are then assigned to the fastest nodes in order. In the case where the proxy node needs to be reselected in step 3: when M=N, the Web client stops trying to establish a new WebRTC real-time communication protocol connection; when M<1, the current transmission fails and the proxy node needs to be reselected.
5. The method for parallel P2P file transmission using the WebRTC real-time communication protocol of a Web client according to claim 4, characterized in that: When a Web client uploads a file, the Web terminal script needs to fragment the file and calculate the hash value of the fragments. The number of fragments is an integer multiple of N. When a Web client downloads a file, the P2P transmission management system counts the file storage location and file fragmentation. The P2P transmission management system records each proxy node that establishes the WebRTC real-time communication protocol and the communication quality between it and the Web client, records the data transmission rate, connection establishment speed and external IP address; records the proxy nodes that cannot establish the WebRTC real-time communication protocol, have a low transmission rate, and a long connection establishment time, as proxy nodes that need to be eliminated for the next transmission to the Web client.
6. A system for concurrent P2P file transmission using the WebRTC real-time communication protocol on a web client, for implementing the method for concurrent P2P file transmission using the WebRTC real-time communication protocol on a web client as claimed in any one of claims 1 to 5, comprising: a web client for presenting web resources requested by a user from a server and displaying them in a browser window; and a distributed storage system for sharding files at multiple locations, the distributed storage system comprising storage nodes distributed at different locations in a wide area network. The system is characterized in that: It also includes the Web terminal script provided by the P2P transmission management system Web; It also includes a WebRTC real-time communication protocol proxy node bound to the storage node; file data is transmitted between the Web client and the proxy node via the WebRTC real-time communication protocol.
7. The system for parallel P2P file transmission using the Web client WebRTC real-time communication protocol according to claim 6, characterized in that: The P2P transmission management system includes a node reputation value calculation module; Proxy node selection module; transmission efficiency management module; storage copy management module; verification module.
Citation Information
Patent Citations
Method, system and apparatus for transmitting files of P2P network
CN101304381B
P2P transmission method based on roles and credit access control mechanism
CN101136916A
Heterogeneous wireless peer-to-peer (P2P) network file sharing system and file transmission acceleration method
CN102594926A
Resource downloading method and device, terminal equipment and system
CN111435946A
Grouping PBFT consensus algorithm based on feature trust
CN113781218A