A method and system for realizing interconnection based on P2P direct connection and routing strategy
By updating the routing table and node verification in real time, creating relay channels and optimizing transmission paths, the delay and instability problems of network architecture in large-scale or highly concurrent communications in the existing technology are solved, and a more efficient and stable network is achieved. communication.
Patent Information
- Application Number
- CN202410985305.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-07-23
AI Technical Summary
The existing network architecture based on P2P direct connection and routing strategies is unable to handle large-scale or highly concurrent communications, resulting in increased communication delays and difficulty in adapting static configurations to network changes, leading to network instability and affecting real-time applications such as online games and Video conferencing performance.
By initializing the association between the node and the logical ring, the routing table is updated in real time, the virtual network card is used to verify the node connectivity, and the public network address is detected. If the direct connection fails, a relay channel is created. Data multiplexing and redundancy verification technology are used to optimize Transmission path, adjust the transmission path based on historical data patterns.
It improves data exchange efficiency and network stability, quickly adapts to network changes, reduces communication interruptions, enhances network recovery capabilities, reduces delays, and provides a more stable and efficient communication platform.
Smart Images

Figure CN118524054B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network communication technology, and in particular to a method and system for realizing interconnection based on P2P direct connection and routing strategy. Background Art
[0002] The field of network communication technology focuses on the transmission, exchange and interoperability of data between networks. It covers everything from basic physical connections to the development of complex protocols and algorithms, aiming to improve network efficiency, security and scalability. Network communication technology enables users and devices in different geographical locations to exchange data and supports a variety of applications such as web browsing, file transfer, video streaming and cloud computing services. This technology area is constantly evolving, including increasing data transmission speeds, reducing latency, optimizing routing algorithms, enhancing data encryption and security measures, and developing communication protocols that can adapt to different network conditions.
[0003] Among them, the method of achieving interconnection based on P2P direct connection and routing strategy involves the use of peer-to-peer (P2P) network technology to optimize the data exchange and communication process in the network. In the P2P model, each node in the network is both a client and a server, communicating directly with other nodes, thereby reducing the pressure of the traditional client-server architecture. The main uses of this method include improving the efficiency of large-scale and high-concurrency network communications, which is particularly useful in application scenarios with high real-time requirements, such as video conferencing, online games, and large-scale file sharing. By optimizing the node discovery process, the maintenance of network topology, and the data transmission speed, this technology can significantly improve network performance and solve bottleneck problems in traditional network settings.
[0004] The existing methods of achieving interconnection based on P2P direct connection and routing strategies rely on a relatively fixed and centralized network architecture, which is incapable of handling large-scale or highly concurrent network communications. In traditional networks, data exchange between nodes requires multiple transfers, which increases communication delays and affects the real-time transmission efficiency of data. Static network configurations are difficult to quickly adapt to changes in network status, such as node failures or network congestion. The resulting network instability is particularly fatal in application scenarios with high real-time requirements, such as online games and video conferencing. The limitations of this infrastructure are increasingly becoming a bottleneck restricting technological progress in modern network applications. Due to the lack of effective adaptive network management and real-time routing optimization mechanisms, existing technologies are insufficient in terms of network scalability and flexibility, resulting in interruptions and degradation of network services, thereby affecting user experience and application performance. Summary of the invention
[0005] The present application provides a method and system for realizing interconnection based on P2P direct connection and routing strategy. The existing method for realizing interconnection based on P2P direct connection and routing strategy relies on a relatively fixed and centralized network architecture, which is incapable of handling large-scale or highly concurrent network communications. In traditional networks, data exchange between nodes needs to go through multiple transfers, which increases communication delays and affects the real-time transmission efficiency of data. Static network configuration is difficult to quickly adapt to changes in network status, such as node failures or network congestion. The resulting network instability is particularly fatal in application scenarios with high real-time requirements, such as online games and video conferencing. The limitations of this infrastructure are increasingly becoming a bottleneck restricting technological progress in modern network applications. Due to the lack of effective adaptive network management and real-time routing optimization mechanisms, the existing technology is insufficient in terms of network scalability and flexibility, resulting in interruptions and degradation of network services, thereby affecting user experience and application performance.
[0006] In view of the above problems, the present application provides a method and system for achieving interconnection based on P2P direct connection and routing strategy.
[0007] The present application provides a method for realizing interconnection and intercommunication based on P2P direct connection and routing strategy, wherein the method comprises the following steps:
[0008] S1: Based on the initialization node, associate the node with the logical ring, determine the position of the node on the logical ring, generate the initialization state of the node, add the initialization state of the node to the request and send it to the bootstrap node, and generate a bootstrap node response result;
[0009] S2: Based on the response result of the guiding node, the routing table is updated according to the node information before and after the return, and an updated and optimized routing table is generated. The updated and optimized routing table is used to capture and verify the connectivity of the target node through the virtual network card technology to generate a node verification result;
[0010] S3: Based on the node verification result, perform a public network address detection operation, obtain and record its own public network IP and port information, generate a network diagnosis connection result, and based on the network diagnosis connection result, if the direct connection fails, create a relay channel through the relay protocol, and perform a stable connection between nodes to generate a P2P connection state;
[0011] S4: Based on the P2P connection status, enable data multiplexing technology to process data transmission, perform data packet redundancy check operations, generate a verification data set, combine the verification data set with historical data patterns, analyze the transmission path and make adjustments, and generate a transmission path adjustment result.
[0012] Preferably, the step of obtaining the guiding node response result is specifically:
[0013] S111: Based on the initialization node, combined with the node's location parameter and the logic ring, the correlation index of each node and the logic ring is calculated using the formula:
[0014] Generate a node association index, where is the node association index, is the correction constant for the node position parameters, is a small amount added to avoid division by zero errors, It is The position parameters of the nodes, is the radius of the logic ring, is the total number of nodes;
[0015] S112: Calculate the initialization state of each node using the node association index, using the formula:
[0016] Generate the initialization node state, where is the initialization node state, is the node association index, yes The mean of yes The standard deviation of , is the adjustment factor;
[0017] S113: Add the initialization node state to the request and send it to the bootstrap node, and verify the integrity and correctness of the request through the bootstrap node, using the formula:
[0018] Generate a boot node response result, where To guide the node response results, is the response sensitivity adjustment coefficient, is the decision threshold, It is the initialization node state.
[0019] Preferably, the step of acquiring the updated optimized routing table is specifically as follows:
[0020] S211: Based on the response result of the guiding node, the communication status data between nodes is extracted, the information of the previous and next nodes is analyzed and invalid and inefficient links are identified, and the connection index between nodes is calculated by strengthening information processing, using the formula:
[0021] Generate a node connection quality index, where is the node connection quality index, Is a node To Node The communication status, Is a node The weight coefficient of is the delay between nodes, is the delay adjustment factor, is the stability coefficient;
[0022] S212: Perform a preliminary update of the routing table according to the node connection quality index, update the routing priority, and use dynamic routing optimization calculation, through the formula:
[0023] Generate a preliminary updated routing table, where For the initial updated routing table, Adjust the steepness of the curve. is the threshold for priority adjustment, is the normalization coefficient, is the node connection quality index;
[0024] S213: Calculate the routing table using the initially updated routing table and the network traffic model, and combine the real-time demand and traffic distribution of the network using the formula:
[0025] Generate an updated and optimized routing table, where: To update the optimized routing table, Indicates the route value adjusted based on traffic and topology changes. This is the initial updated routing table.
[0026] Preferably, the step of obtaining the node verification result is specifically:
[0027] S221: Based on the updated and optimized routing table, set the target node configuration of the virtual network card, read the node data and configure the network parameters of the virtual network card, and generate the virtual network card configuration parameters using the formula:
[0028] in, It is the virtual network card configuration parameter. Represents the configuration weight of each node, is the amplification factor, is the stabilization parameter, It is the node routing information in the routing table;
[0029] S222: Based on the virtual network card configuration parameters, the reachability of the target node is tested through the virtual network card, the connection quality is calculated, and each node is evaluated using a network test, using the formula:
[0030] Generate a connection quality index where is the connection quality index, is the sensitivity adjustment factor, is the threshold for successful connection, is the normalization factor, is the standardized coefficient, It is the virtual network card configuration parameter;
[0031] S223: Summarize the connection quality indexes and determine the connection status of each node by verifying the formula:
[0032] Generate node verification results, where is the node verification result, is the probability weight of each node successfully connected, is the connection evaluation index, is the overall stabilization coefficient, is the connection quality index.
[0033] Preferably, the steps of obtaining the network diagnosis connection result are specifically as follows:
[0034] S311: Based on the node verification result, perform public network address detection, collect the public network IP and port number of the current device, and calculate the network status index in combination with the external network traffic and timestamp. The calculation formula is:
[0035] Get the initial network status information, where: Indicates network status indicators. Indicates the public IP address. Indicates the port number. Represents external network traffic, Indicates the current timestamp;
[0036] S312: Using the initial network status information, evaluate the network performance, send data packets, receive corresponding data packets, and use the formula:
[0037] The stability weight and attenuation factor are introduced to obtain the network communication stability score, where: Indicates the network communication stability score. Represents the total number of packets, The representative sent Packet size, Represents the received Packet size, represents the stability weight, represents the attenuation factor;
[0038] S313: Compare the network communication stability score with a set threshold and use a judgment formula:
[0039] Generates network diagnostic connection results, where Indicates the network diagnostic connection result. Indicates the network communication stability score. Represents the network stability threshold.
[0040] Preferably, the step of acquiring the P2P connection status is specifically as follows:
[0041] S321: Determine whether the direct connection fails based on the network diagnosis connection result, and generate a network connection status flag , using the formula:
[0042] If the direct connection fails, ,otherwise ,in, It is the network connection status flag. is the sensitivity coefficient, Represents the connection delay time;
[0043] S322: If the network connection status flag indicates that the direct connection fails, a relay channel is created using a relay protocol, and the state of the generated relay channel is set. , through the formula:
[0044] If the relay channel is established successfully, ,otherwise ,in, Represents the relay channel status, It is the network connection status flag. It is a parameter to adjust the relay response frequency;
[0045] S323: According to the relay channel status, the stability connection between nodes is performed, and the P2P connection status is calculated and generated, using the formula:
[0046] in, Indicates the P2P connection status. It is an environmental factor. is the network volatility parameter, is the relay channel status, It is the weight coefficient used to adjust the impact of network volatility.
[0047] Preferably, the step of obtaining the verification data set is specifically:
[0048] S411: Based on the P2P connection status, by analyzing the delay and continuous connection time of each node, the formula is adopted:
[0049] Calculate the connection stability index between generated nodes, where Represents the connection stability index, is the node attenuation coefficient, Indicates the duration of the connection. represents the square of the delay between nodes, represents the stability assessment threshold;
[0050] S412: Optimizing the data transmission process by using the connection stability index between the nodes, processing the data by using data multiplexing technology, using the formula:
[0051] Generate a multiplexed packet where is a multiplexed data packet, is the importance score of each packet, is the connection stability index of each node;
[0052] S413: Perform a data packet redundancy check operation according to the multiplexed data, using the formula:
[0053] Generate a validation data set, where is the validation data set, is a multiplexed data packet, and is the calibration parameter.
[0054] Preferably, the step of obtaining the transmission path adjustment result is specifically:
[0055] S421: Analyze the transmission efficiency and error rate of the data packet according to the verification data set, using the formula:
[0056] Generate a transmission efficiency index, where is the transmission efficiency index, is the data packet record in the verification data set, is the transmission efficiency, and is the sensitivity and baseline threshold of the adjustment formula;
[0057] S422: According to the transmission efficiency index and in combination with the historical data pattern, the transmission path is refined using the formula:
[0058] Generate an optimized transmission path, where is the optimized transmission path, is the optimized response sensitivity parameter, is the transmission efficiency index of each node, is the original transmission path;
[0059] S423: Based on the optimized transmission path and in combination with the real-time network status data, the optimal transmission path is adjusted and determined by the formula:
[0060] Generate a transmission path adjustment result, where: is the transmission path adjustment result, is the response strength parameter, is the optimized transmission path, is the decision threshold.
[0061] A system for realizing interconnection and intercommunication based on P2P direct connection and routing strategy, the system for realizing interconnection and intercommunication based on P2P direct connection and routing strategy is used to execute the above-mentioned method for realizing interconnection and intercommunication based on P2P direct connection and routing strategy, and the system comprises:
[0062] The node initialization and logic ring positioning module sets the basic configuration based on the initialization node, associates the logic ring with the network configuration instruction, packages the node status and sends it to the boot node, processes the response of the boot node and determines the node status and ring position, and obtains the node positioning determination result;
[0063] The routing table update and verification module recompiles the routing table according to the node information based on the point positioning determination result, checks the validity of the new routing table through the network monitoring tool, verifies the target node connectivity through the virtual network card, and generates the routing table and connectivity verification results;
[0064] The P2P connection status confirmation module detects the validity of the direct connection channel based on the routing table and the connectivity verification result. If the direct connection fails, a relay channel stable connection is established, data multiplexing and redundancy check are performed, the data transmission path is adjusted and the network flow is optimized to obtain the P2P connection stability result;
[0065] The data security and integrity check module uses the P2P connection stability result to run a data integrity check program, performs a redundancy check on the transmitted data packets, and generates a data security determination result;
[0066] The network diagnosis and performance adjustment module determines the result according to the data security, performs network diagnosis and evaluates the connection quality, records and analyzes the network performance data, adjusts the network parameters according to the analysis result, and generates the transmission path adjustment result.
[0067] One or more technical solutions provided in this application have at least the following technical effects or advantages:
[0068] By associating the initialization node with the logical ring and updating the routing table in real time, the connectivity between nodes can be captured more accurately, thereby improving the efficiency and accuracy of data exchange, being able to adapt to changes in network conditions more quickly, reducing communication interruptions due to node or connection failures, and further ensuring the reliability of the network through node verification and network diagnosis. By real-time monitoring of public network IP and port information and automatically repairing connection failures using relay protocols, the network's recovery capabilities are significantly enhanced. By optimizing transmission paths and applying data multiplexing technology, not only the data transmission speed is improved, but also the network latency is reduced. Through the design of an adaptive and self-repairing network structure, the problems of network bottlenecks and unstable connections are effectively solved, providing a more stable and efficient communication platform for various network applications.
[0069] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 The present invention proposes an overall flow chart of a method for realizing interconnection based on P2P direct connection and routing strategy;
[0071] Figure 2 The present invention proposes a flow chart of the guiding node response result of a method for realizing interconnection and intercommunication based on P2P direct connection and routing strategy;
[0072] Figure 3 The present invention proposes a flow chart of an updated optimized routing table for a method of realizing interconnection based on P2P direct connection and routing strategy;
[0073] Figure 4 The present invention proposes a flowchart of node verification results of a method for realizing interconnection and intercommunication based on P2P direct connection and routing strategy;
[0074] Figure 5 A flowchart of network diagnosis connection results of a method for realizing interconnection based on P2P direct connection and routing strategy is proposed for the present invention;
[0075] Figure 6 The present invention proposes a flow chart of the P2P connection state of a method for realizing interconnection based on P2P direct connection and routing strategy;
[0076] Figure 7 The present invention proposes a flow chart of a verification data set for a method of realizing interconnection and intercommunication based on P2P direct connection and routing strategy;
[0077] Figure 8 The present invention proposes a flow chart of the transmission path adjustment result of a method for realizing interconnection and intercommunication based on P2P direct connection and routing strategy. DETAILED DESCRIPTION
[0078] The present application provides a method and system for realizing interconnection based on P2P direct connection and routing strategy.
[0079] Application Overview
[0080] The existing methods of achieving interconnection based on P2P direct connection and routing strategies rely on a relatively fixed and centralized network architecture, which is incapable of handling large-scale or highly concurrent network communications. In traditional networks, data exchange between nodes requires multiple transfers, which increases communication delays and affects the real-time transmission efficiency of data. Static network configurations are difficult to quickly adapt to changes in network status, such as node failures or network congestion. The resulting network instability is particularly fatal in application scenarios with high real-time requirements, such as online games and video conferencing. The limitations of this infrastructure are increasingly becoming a bottleneck restricting technological progress in modern network applications. Due to the lack of effective adaptive network management and real-time routing optimization mechanisms, existing technologies are insufficient in terms of network scalability and flexibility, resulting in interruptions and reduced quality of network services, thereby affecting user experience and application performance.
[0081] In response to the above technical problems, the overall idea of the technical solution provided by this application is as follows.
[0082] Example
[0083] like Figure 1 As shown, the present application provides a method for realizing interconnection and intercommunication based on P2P direct connection and routing strategy, wherein the method comprises the following steps:
[0084] S1: Based on the initialization node, associate the node with the logical ring, determine the position of the node on the logical ring, generate the initialization state of the node, add the initialization state of the node to the request and send it to the bootstrap node, and generate the bootstrap node response result;
[0085] S2: Based on the response result of the guiding node, the routing table is updated according to the node information before and after the return, and an updated and optimized routing table is generated. The updated and optimized routing table is used to capture and verify the connectivity of the target node through the virtual network card technology to generate a node verification result;
[0086] S3: Based on the node verification result, perform public network address detection operation, obtain and record its own public network IP and port information, generate network diagnosis connection results, and based on the network diagnosis connection results, if the direct connection fails, create a relay channel through the relay protocol, and perform stability connection between nodes to generate P2P connection status;
[0087] S4: Based on the P2P connection status, enable data multiplexing technology to process data transmission, perform data packet redundancy check operations, generate a verification data set, combine the verification data set with historical data patterns, analyze the transmission path and make adjustments, and generate a transmission path adjustment result.
[0088] The guidance node response results include node sequence and network location; the node verification results include connectivity evaluation and signal quality; the network diagnosis connection results include connection mode and failure reason; the P2P connection status includes connection stability and protocol type; the verification data set includes checksum and error rate; the transmission path adjustment results include optimized path and delay time.
[0089] Specifically, if Figure 2 As shown, the steps for obtaining the response result of the bootstrap node are as follows:
[0090] S111: Based on the initialization node, combined with the node's location parameter and the logic ring, the correlation index of each node and the logic ring is calculated using the formula:
[0091] Generate a node association index, where is the node association index, is the correction constant for the node position parameters, is a small amount added to avoid division by zero errors, It is The position parameters of the nodes, is the radius of the logic ring, is the total number of nodes;
[0092] S112: Calculate the initialization state of each node using the node association index using the formula:
[0093] Generate the initialization node state, where is the initialization node state, is the node association index, yes The mean of yes The standard deviation of , is the adjustment factor;
[0094] S113: Add the initialization node state to the request and send it to the bootstrap node. The bootstrap node verifies the integrity and correctness of the request using the formula:
[0095] Generate a boot node response result, where To guide the node response results, is the response sensitivity adjustment coefficient, is the decision threshold, It is the initialization node state.
[0096] The formula for node association index is:
[0097] Indicates The position parameters of the nodes;
[0098] Indicates the radius of the logical ring;
[0099] Indicates the total number of nodes;
[0100] is a correction constant used to adjust the node position parameters;
[0101] is a small amount used to prevent division by zero errors.
[0102] Calculate for each node ,in Calculate the product of the node's position and the ring radius, Make adjustments, sum the results of all nodes, and divide the final result by To obtain the average, adjusted to include to ensure no division by zero;
[0103] Assumptions , node position parameters , the radius of the logical ring , calibration constant 2, ;
[0104] Calculation process:
[0105] result represents the adjusted mean association index.
[0106] Formula for initializing node status:
[0107] is the node association index;
[0108] yes The mean of
[0109] yes The standard deviation of
[0110] and are adjustment coefficients, which are used to adjust the calculation of the numerator and denominator respectively;
[0111] calculate get The difference between its mean and the square of the difference Add them and divide the result by , square the final result;
[0112] use , assuming , , , ;
[0113] Calculation process:
[0114] result Indicates the initialization state index of the node.
[0115] The formula for guiding the node response result is:
[0116] To initialize the node status;
[0117] is the response sensitivity adjustment factor;
[0118] is the decision threshold;
[0119] calculate ,right The square of Add one, square root, calculate exponent , and add it to one, and divide the above two results;
[0120] use , assuming , ,
[0121] Calculation process:
[0122] result A metric representing the bootstrap node's response.
[0123] Specifically, if Figure 3 As shown, the steps for obtaining the updated optimized routing table are as follows:
[0124] S211: Based on the response result of the guiding node, the communication status data between nodes is extracted, the information of the previous and next nodes is analyzed and the invalid and inefficient links are identified. The connection index between nodes is calculated by strengthening the information processing, using the formula:
[0125] Generate a node connection quality index, where is the node connection quality index, Is a node To Node The communication status, Is a node The weight coefficient of is the delay between nodes, is the delay adjustment factor, is the stability coefficient;
[0126] S212: Perform a preliminary update of the routing table based on the node connection quality index, update the routing priority, and use dynamic routing optimization calculation, through the formula:
[0127] Generate a preliminary updated routing table, where For the initial updated routing table, Adjust the steepness of the curve. is the threshold for priority adjustment, is the normalization coefficient, is the node connection quality index;
[0128] S213: Calculate the routing table using the initially updated routing table and network traffic model, combined with the real-time demand and traffic distribution of the network, using the formula:
[0129] Generate an updated and optimized routing table, where: To update the optimized routing table, Indicates the route value adjusted based on traffic and topology changes. This is the initial updated routing table.
[0130] The formula for the node connection quality index is:
[0131] :node To Node The communication status, such as whether it is reachable (1 for reachable, 0 for unreachable);
[0132] :node The weight coefficient is based on the importance or traffic distribution of the node;
[0133] :node To Node The delay time in milliseconds;
[0134] : Delay adjustment factor, balancing the effect of delay in calculation;
[0135] : Stability coefficient, used to prevent the denominator from being zero, usually takes a very small value such as 0.01;
[0136] : total number of nodes;
[0137] Assume there are 3 nodes, the communication status between nodes , weight ,Delay as follows:
[0138] , , , , ,
[0139] Calculate node connection quality index :
[0140] Calculated The value is 1.22, which means that the node Average weighted quality status per connection time, higher values indicate better connection status.
[0141] The formula for the initial updated routing table is:
[0142] : Adjust the steepness of the curve and determine the sensitivity of the function;
[0143] : The threshold for priority adjustment, which determines when to update;
[0144] : Normalization coefficient, balance impact.
[0145] Assumptions: , , , (from step 1);
[0146] Calculates the initial updated routing table :
[0147] Calculated The value is 0.554, which means that according to the current connection status, the node The priority of routing table updates. The closer the value is to 1, the higher the priority, indicating that the update is more urgent.
[0148] Update the formula of the optimized routing table:
[0149] : Routing values adjusted based on traffic and topology changes;
[0150] : Preliminary updated routing table;
[0151] Assumptions: , ;
[0152] Calculate and update the optimized routing table :
[0153] Calculated The value is 122.3, which means the overall network routing efficiency is adjusted after considering the traffic and topology changes. A high value indicates that the network has good routing efficiency, while a low value requires further optimization.
[0154] Specifically, if Figure 4 As shown in the figure, the specific steps for obtaining the node verification result are:
[0155] S221: Based on the updated and optimized routing table, set the target node configuration of the virtual network card, read the node data and configure the network parameters of the virtual network card, and generate the virtual network card configuration parameters using the formula:
[0156] in, It is the virtual network card configuration parameter. Represents the configuration weight of each node, is the amplification factor, is the stabilization parameter, It is the node routing information in the routing table;
[0157] S222: Based on the virtual network card configuration parameters, the reachability of the target node is tested through the virtual network card, the connection quality is calculated, and each node is evaluated using the network test, through the formula:
[0158] Generate a connection quality index where is the connection quality index, is the sensitivity adjustment factor, is the threshold for successful connection, is the normalization factor, is the standardized coefficient, It is the virtual network card configuration parameter;
[0159] S223: Summarize the connection quality index and determine the connection status of each node by verifying the formula:
[0160] Generate node verification results, where is the node verification result, is the probability weight of each node successfully connected, is the connection evaluation index, is the overall stabilization coefficient, is the connection quality index.
[0161] Virtual network card configuration parameter formula:
[0162] :node The configuration weight of , assuming that all nodes have the same weight, is set to 0.5;
[0163] : Node extracted from the routing table Routing information, assuming that routing information is based on traffic, each node traffic is divided into ;
[0164] : Amplification factor, in order to highlight the nodes with higher traffic, set ;
[0165] : Stabilization parameter, set ;
[0166] : Total number of nodes, assuming there are 5 nodes;
[0167] calculate :
[0168] result Represents the comprehensive configuration parameters of the virtual network card, taking into account the traffic information and configuration weights of all nodes.
[0169] Connection Quality Index formula:
[0170] : Standardized coefficient, assumed to be 1;
[0171] : Virtual network card configuration parameters;
[0172] : Sensitivity adjustment coefficient, assumed to be 0.1;
[0173] : The threshold for successful connection is set to 20;
[0174] : Normalization factor, set to 2;
[0175] calculate and :
[0176] This result Represents the connection quality index of each node, indicating that the connection quality between nodes is low and requires additional configuration or optimization.
[0177] Node verification result formula:
[0178] : connection quality index;
[0179] : The probability weight of each node successfully connecting is assumed to be 0.8;
[0180] : Connection evaluation index, assumed to be 1.5;
[0181] : Overall stabilization coefficient, assumed to be 0.05;
[0182] : Total number of nodes.
[0183] calculate and :
[0184] result Indicates the overall node connection success rate. A low value indicates that there is a problem with the network connection or further optimization is needed.
[0185] Specifically, if Figure 5 As shown in the figure, the steps for obtaining the network diagnosis connection results are as follows:
[0186] S311: Based on the node verification result, perform public network address detection, collect the public network IP and port number of the current device, and calculate the network status index in combination with the external network traffic and timestamp. The calculation formula is:
[0187] Get the initial network status information, where: Indicates network status indicators. Indicates the public IP address. Indicates the port number. Represents external network traffic, Indicates the current timestamp;
[0188] S312: Using the initial network status information, evaluate the network performance, send data packets, and receive corresponding data packets using the formula:
[0189] The stability weight and attenuation factor are introduced to obtain the network communication stability score, where: Indicates the network communication stability score. Represents the total number of packets, The representative sent Packet size, Represents the received Packet size, represents the stability weight, represents the attenuation factor;
[0190] S313: Compare the network communication stability score with the set threshold and use the judgment formula:
[0191] Generates network diagnostic connection results, where Indicates the network diagnostic connection result. Indicates the network communication stability score. Represents the network stability threshold.
[0192] Formula derivation of network status indicators:
[0193] : Public IP address, assumed to be in numerical form, such as 192;
[0194] : Port number, for example 8080;
[0195] : External network traffic, in MB, for example 500MB;
[0196] : Timestamp, in seconds, assumed to be 3600 seconds (1 hour);
[0197] calculate : This part reflects the combined effect of IP address and port number, for example ;
[0198] calculate : This part calculates the network traffic per unit time, for example ;
[0199] Adding the two parts together gives .
[0200] result Indicates the network status indicator passing through the specified port within a given time. The larger the value, the more intensive the network activity.
[0201] Network communication stability scoring formula:
[0202] : The total number of data packets, for example, 5 data packets;
[0203] , : No. The sending and receiving sizes of packets are assumed to be MB, MB;
[0204] : Stability weight, assumed to be 0.5;
[0205] : Attenuation factor, assumed to be 10;
[0206] Calculate for each packet And square:
[0207] , , , , ; Add all the results and multiply by :
[0208] Indicates the communication stability score of the network. The lower the score, the more stable the network.
[0209] Network diagnostics connection results:
[0210] : Network communication stability score;
[0211] : Threshold, used to compare network stability. This value is set based on network performance requirements. Assume that the threshold is 0.005;
[0212] Threshold setting: First determine a threshold , which is obtained based on network performance indicators or historical data analysis. In this case, it is assumed to be 0.005, which means that any stability score above this value indicates that the network is unstable;
[0213] Comparison operation: Stability score With threshold Make comparisons;
[0214] Conditional judgment: If Less than , that is, 0.004535<0.005, the result shows that the network state is stable. If Greater than or equal to , the result is unstable;
[0215] According to the above comparison and the set threshold, we get R=stable, which means that under the given parameters and conditions, the network communication performance is stable and does not exceed the preset performance lower limit.
[0216] Specifically, if Figure 6 As shown, the steps for obtaining the P2P connection status are as follows:
[0217] S321: Determine whether the direct connection fails through network diagnosis connection results, and generate a network connection status flag , using the formula:
[0218] If the direct connection fails, ,otherwise ,in, It is the network connection status flag. is the sensitivity coefficient, Represents the connection delay time;
[0219] S322: If the network connection status flag indicates that the direct connection fails, a relay channel is created using the relay protocol, and the relay channel status is set. , through the formula:
[0220] If the relay channel is established successfully, ,otherwise ,in, Represents the relay channel status, It is the network connection status flag. It is a parameter to adjust the relay response frequency;
[0221] S323: According to the relay channel status, the stability connection between nodes is performed, and the P2P connection status is calculated and generated using the formula:
[0222] in, Indicates the P2P connection status. It is an environmental factor. is the network volatility parameter, is the relay channel status, It is the weight coefficient used to adjust the impact of network volatility.
[0223] Network connection status flag formula:
[0224] is the sensitivity coefficient, controlling the measure of sensitivity to time;
[0225] is the time that elapses from the attempt to connect to the judgment that it failed;
[0226] Determining parameter values: Assumptions (sensitivity coefficient), seconds (time from connection attempt to failure);
[0227] Calculate the exponential part:
[0228] Substitute into the formula to calculate:
[0229] here The value of shows that the calculated network connection status flag indicates that the direct connection is basically a failure because it is close to 0.5 but slightly biased towards 0.
[0230] Relay channel status formula:
[0231] It is the frequency parameter, which adjusts the frequency of the relay protocol response;
[0232] Network connection status flag;
[0233] Determining parameter values: Assumptions , ;
[0234] Compute the sine part:
[0235] Substitute into the formula to calculate:
[0236] here The value of indicates that the relay channel is established successfully because its value is close to 1.
[0237] The calculation formula of P2P connection status is:
[0238] is the relay channel status, It is an environmental factor. is the network volatility parameter, It is the weight coefficient used to adjust the impact of network volatility;
[0239] Determining parameter values: Assumptions , , , ;
[0240] Compute the numerator and denominator:
[0241] molecular: ;
[0242] Denominator: ; Substitute into the formula to calculate:
[0243] here The value indicates that the P2P connection status is relatively stable and reliable.
[0244] Specifically, if Figure 7 As shown in the figure, the steps for obtaining the verification data set are as follows:
[0245] S411: Based on the P2P connection status, by analyzing the delay and continuous connection time of each node, the formula is used:
[0246] Calculate the connection stability index between generated nodes, where Represents the connection stability index, is the node attenuation coefficient, Indicates the duration of the connection. represents the square of the delay between nodes, represents the stability assessment threshold;
[0247] S412: Optimize the data transmission process by using the connection stability index between nodes, process data through data multiplexing technology, and use the formula:
[0248] Generate a multiplexed packet where is a multiplexed data packet, is the importance score of each packet, is the connection stability index of each node;
[0249] S413: Perform a data packet redundancy check operation based on the multiplexed data, using the formula:
[0250] Generate a validation data set, where is the validation data set, is a multiplexed data packet, and is the calibration parameter.
[0251] The formula for the connection stability index is:
[0252] : Node attenuation coefficient, which affects the sensitivity of connection stability assessment, and generally ranges from 0.1 to 1.0;
[0253] : represents the delay between nodes (in milliseconds). Assuming the network is in good condition, the delay is between 10ms and 100ms.
[0254] : Indicates the duration of the connection (in seconds), usually the duration of the connection, such as 30 seconds to 300 seconds;
[0255] : Stability assessment threshold, which represents the square of the expected connection stability time, for example, set to 10000 (i.e., 100 seconds squared);
[0256] Assume there are two nodes :
[0257] For Node 1: , ms, s;
[0258] For Node 2: , ms, s;
[0259] calculate :
[0260] The calculation gives a quantitative assessment of the stability of each node connection, where A lower value of indicates a lower connection stability.
[0261] Formula for multiplexing packets:
[0262] : Connection stability index of each node;
[0263] : The importance score of each data packet is generally assigned according to the priority of the data, assuming a range of 1 to 10;
[0264] Assumptions , (high importance);
[0265] Assumptions , ((low importance);
[0266] calculate :
[0267] This value Indicates the average processing value of data packets after multiplexing technology. A lower value indicates that the data routing or packet processing strategy needs to be further optimized.
[0268] Formula for verifying the data set:
[0269] : Multiplex data packets;
[0270] and : Calibration parameters, usually used to adjust the sensitivity of the calibration process, assuming and ;
[0271] Assumptions , ,
[0272] calculate :
[0273] This value Indicates the data integrity, where a higher value indicates better data transmission quality and integrity.
[0274] Specifically, if Figure 8 As shown, the steps for obtaining the transmission path adjustment result are specifically as follows:
[0275] S421: Analyze the transmission efficiency and error rate of the data packet according to the verification data set, using the formula:
[0276] Generate a transmission efficiency index, where is the transmission efficiency index, is the data packet record in the verification data set, is the transmission efficiency, and is the sensitivity and baseline threshold of the adjustment formula;
[0277] S422: Based on the transmission efficiency index and the historical data pattern, the transmission path is refined using the formula:
[0278] Generate an optimized transmission path, where is the optimized transmission path, is the optimized response sensitivity parameter, is the transmission efficiency index of each node, is the original transmission path;
[0279] S423: Based on the optimized transmission path and combined with the real-time network status data, the optimal transmission path is adjusted and determined by the formula:
[0280] Generate a transmission path adjustment result, where: is the transmission path adjustment result, is the response strength parameter, is the optimized transmission path, is the decision threshold.
[0281] Calculating the transfer efficiency index formula:
[0282] : No. The record of each data packet in the verification data set;
[0283] : No. The transmission efficiency of each data packet;
[0284] : Adjustment coefficient, influence influence;
[0285] : Efficiency baseline threshold, which adjusts the offset of the exponential function.
[0286] Assumed parameters:
[0287] (three packets),
[0288] , , (packet verification record),
[0289] , , (packet transmission efficiency),
[0290] , (Adjustment coefficient and efficiency baseline),
[0291] For each packet calculate:
[0292] : ;
[0293] : ;
[0294] : ;
[0295] This value Represents the overall transmission efficiency index, where higher values indicate better transmission efficiency.
[0296] Optimized transmission path formula:
[0297] : Optimize response sensitivity parameters;
[0298] : No. The transmission efficiency index of each node;
[0299] : original transmission path;
[0300] Assumed parameters:
[0301] (three nodes),
[0302] (response sensitivity),
[0303] , , (Transmission efficiency index obtained from step 1), , , (the value of the original transmission path);
[0304] Calculate the sum of the denominators:
[0305] Compute the optimal path for each node:
[0306] : , : , : , This value Represents the optimized total transmission path, where the weight is determined by the transmission efficiency of the node and the path length.
[0307] Transmission path adjustment results formula:
[0308] : Response intensity parameter;
[0309] : Optimized transmission path;
[0310] : decision threshold;
[0311] Assumed parameters: (response intensity), (calculated from step 2), (decision threshold);
[0312] Calculation process:
[0313] This value It indicates the final decision result of transmission path adjustment, reflecting higher transmission path efficiency.
[0314] A system for realizing interconnection and intercommunication based on P2P direct connection and routing strategy, the system for realizing interconnection and intercommunication based on P2P direct connection and routing strategy is used to execute the above-mentioned method for realizing interconnection and intercommunication based on P2P direct connection and routing strategy, and the system comprises:
[0315] The node initialization and logic ring positioning module sets the basic configuration based on the initialization node, associates the logic ring with the network configuration instruction, packages the node status and sends it to the boot node, processes the response of the boot node and determines the node status and ring position, and obtains the node positioning determination result;
[0316] The routing table update and verification module recompiles the routing table according to the node information based on the point positioning determination result, checks the validity of the new routing table through the network monitoring tool, verifies the target node connectivity through the virtual network card, and generates the routing table and connectivity verification results;
[0317] The P2P connection status confirmation module detects the validity of the direct connection channel based on the routing table and the connectivity verification result. If the direct connection fails, a relay channel stable connection is established, data multiplexing and redundancy check are performed, the data transmission path is adjusted and the network flow is optimized to obtain the P2P connection stability result;
[0318] The data security and integrity check module uses the P2P connection stability result to run a data integrity check program, performs a redundancy check on the transmitted data packets, and generates a data security determination result;
[0319] The network diagnosis and performance adjustment module determines the result according to the data security, performs network diagnosis and evaluates the connection quality, records and analyzes the network performance data, adjusts the network parameters according to the analysis result, and generates the transmission path adjustment result.
[0320] Although the present application has been described in conjunction with specific features and embodiments thereof, it is obvious that various modifications and combinations may be made thereto without departing from the spirit and scope of the present application. Accordingly, this specification and the drawings are merely exemplary illustrations of the present application as defined by the appended claims, and are deemed to have covered any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, a person skilled in the art may make various modifications and variations to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include these modifications and variations.
Claims
1. A method for realizing interconnection based on P2P direct connection and routing strategy, characterized in that: The method comprises the following steps: Based on the initialization node, associate the node with the logical ring, determine the position of the node on the logical ring, generate the initialization state of the node, add the initialization state of the node to the request and send it to the bootstrap node, and generate a bootstrap node response result; Based on the response result of the guiding node, the routing table is updated according to the node information before and after the return, and an updated and optimized routing table is generated. The updated and optimized routing table is used to capture and verify the connectivity of the target node through the virtual network card technology to generate a node verification result; Based on the node verification result, perform a public network address detection operation, obtain and record its own public network IP and port information, generate a network diagnosis connection result, and based on the network diagnosis connection result, if the direct connection fails, create a relay channel through the relay protocol, and perform a stable connection between nodes to generate a P2P connection state; Based on the P2P connection status, data multiplexing technology is enabled to process data transmission, a data packet redundancy check operation is performed, a verification data set is generated, and the verification data set is combined with a historical data pattern to analyze and adjust the transmission path to generate a transmission path adjustment result.
2. The method for realizing interconnection based on P2P direct connection and routing strategy according to claim 1, characterized in that: The steps for obtaining the response result of the bootstrap node are specifically as follows: Based on the initialization node, combined with the node's location parameters and the logical ring, the association index of each node and the logical ring is calculated using the formula: Generate a node association index, where is the node association index, is the correction constant for the node position parameters, is a small amount added to avoid division by zero errors, It is The position parameters of the nodes, is the radius of the logic ring, is the total number of nodes; The node association index is used to calculate the initialization state of each node using the formula: Generate the initialization node state, where is the initialization node state, is the node association index, yes The mean of yes The standard deviation of , is the adjustment factor; The initialization node state is added to the request and sent to the bootstrap node, and the bootstrap node verifies the integrity and correctness of the request using the formula: Generate a boot node response result, where To guide the node response results, is the response sensitivity adjustment coefficient, is the decision threshold, It is the initialization node state.
3. The method for realizing interconnection based on P2P direct connection and routing strategy according to claim 2 is characterized in that: The steps for obtaining the updated and optimized routing table are specifically as follows: Based on the response results of the guiding node, the communication status data between nodes is extracted, the information of the previous and next nodes is analyzed and invalid and inefficient links are identified, and the connection index between nodes is calculated by strengthening information processing, using the formula: Generate a node connection quality index, where is the node connection quality index, Is a node To Node The communication status, Is a node The weight coefficient of is the delay between nodes, is the delay adjustment factor, is the stability factor; According to the node connection quality index, the routing table is initially updated, the routing priority is updated, and dynamic routing optimization calculation is adopted, through the formula: Generate a preliminary updated routing table, where For the initial updated routing table, Adjust the steepness of the curve. is the threshold for priority adjustment, is the normalization coefficient, is the node connection quality index; The routing table is calculated using the initially updated routing table and the network traffic model, and the formula is adopted in combination with the real-time demand and traffic distribution of the network: Generate an updated and optimized routing table, where: To update the optimized routing table, Indicates the route value adjusted based on traffic and topology changes. This is the initial updated routing table.
4. The method for realizing interconnection based on P2P direct connection and routing strategy according to claim 3 is characterized in that: The steps for obtaining the node verification result are specifically as follows: Based on the updated and optimized routing table, the target node configuration of the virtual network card is set, the node data is read and the network parameters of the virtual network card are configured, and the virtual network card configuration parameters are generated using the formula: in, It is the virtual network card configuration parameter. Represents the configuration weight of each node, is the amplification factor, is the stabilization parameter, It is the node routing information in the routing table; Based on the virtual network card configuration parameters, the reachability of the target node is tested through the virtual network card, the connection quality is calculated, and each node is evaluated using the network test, through the formula: Generate a connection quality index where is the connection quality index, is the sensitivity adjustment factor, is the threshold for successful connection, is the normalization factor, is the standardized coefficient, It is the virtual network card configuration parameter; Summarize the connection quality index and determine the connection status of each node by verifying the formula: Generate node verification results, where is the node verification result, is the probability weight of each node successfully connected, is the connection evaluation index, is the overall stabilization coefficient, is the connection quality index.
5. The method for realizing interconnection based on P2P direct connection and routing strategy according to claim 4 is characterized in that: The steps for obtaining the network diagnosis connection result are specifically as follows: Based on the node verification result, perform public network address detection, collect the public network IP and port number of the current device, and calculate the network status index in combination with the external network traffic and timestamp. The calculation formula is: Get the initial network status information, where: Indicates network status indicators. Indicates the public IP address. Indicates the port number. Represents external network traffic, Indicates the current timestamp; Using the initial network status information, the network performance is evaluated, data packets are sent, and corresponding data packets are received, using the formula: The stability weight and attenuation factor are introduced to obtain the network communication stability score, where: Indicates the network communication stability score. Represents the total number of packets, The representative sent Packet size, Represents the received Packet size, represents the stability weight, represents the attenuation factor; According to the network communication stability score, it is compared with the set threshold and the judgment formula is adopted: Generates network diagnostic connection results, where Indicates the network diagnostic connection result. Indicates the network communication stability score. Represents the network stability threshold.
6. The method for realizing interconnection based on P2P direct connection and routing strategy according to claim 5 is characterized in that: The steps for obtaining the P2P connection status are specifically as follows: Determine whether the direct connection fails based on the network diagnosis connection result, and generate a network connection status flag , using the formula: If the direct connection fails, ,otherwise ,in, It is the network connection status flag. is the sensitivity coefficient, Represents the connection delay time; If the network connection status flag indicates that the direct connection fails, a relay channel is created using the relay protocol, and the generated relay channel status is set , through the formula: If the relay channel is established successfully, ,otherwise ,in, Represents the relay channel status, It is the network connection status flag. It is a parameter to adjust the relay response frequency; According to the relay channel status, the stability connection between nodes is performed, and the P2P connection status is calculated and generated using the formula: in, Indicates the P2P connection status. It is an environmental factor. is the network volatility parameter, is the relay channel status, It is a weight coefficient used to adjust the impact of network volatility.
7. The method for realizing interconnection based on P2P direct connection and routing strategy according to claim 6 is characterized in that: The steps for obtaining the verification data set are specifically as follows: Based on the P2P connection status, by analyzing the delay and continuous connection time of each node, the formula is adopted: Calculate the connection stability index between generated nodes, where Represents the connection stability index, is the node attenuation coefficient, Indicates the duration of the connection. represents the square of the delay between nodes, represents the stability assessment threshold; The connection stability index between the nodes is used to optimize the data transmission process, and the data is processed through data multiplexing technology, using the formula: Generate a multiplexed packet where is a multiplexed data packet, is the importance score of each packet, is the connection stability index of each node; According to the multiplexed data, a data packet redundancy check operation is performed using the formula: Generate a validation data set, where is the validation data set, is a multiplexed data packet, and is the calibration parameter.
8. The method for realizing interconnection based on P2P direct connection and routing strategy according to claim 7 is characterized in that: The steps of obtaining the transmission path adjustment result are specifically as follows: The transmission efficiency and error rate of the data packet are analyzed according to the verification data set, using the formula: Generate a transmission efficiency index, where is the transmission efficiency index, is the data packet record in the verification data set, is the transmission efficiency, and is the sensitivity and baseline threshold of the adjustment formula; According to the transmission efficiency index, combined with the historical data pattern, the transmission path is refined and the formula used is: Generate an optimized transmission path, where is the optimized transmission path, is the optimized response sensitivity parameter, is the transmission efficiency index of each node, is the original transmission path; Based on the optimized transmission path, combined with real-time network status data, the optimal transmission path is adjusted and determined, through the formula: Generate a transmission path adjustment result, where: is the transmission path adjustment result, is the response strength parameter, is the optimized transmission path, is the decision threshold.
9. A system for realizing interconnection based on P2P direct connection and routing strategy, characterized in that: According to the method for realizing interconnection and intercommunication based on P2P direct connection and routing strategy according to any one of claims 1 to 8, the system comprises: The node initialization and logic ring positioning module sets the basic configuration based on the initialization node, associates the logic ring with the network configuration instruction, packages the node status and sends it to the boot node, processes the response of the boot node and determines the node status and ring position, and obtains the node positioning determination result; The routing table update and verification module recompiles the routing table according to the node information based on the point positioning determination result, checks the validity of the new routing table through the network monitoring tool, verifies the target node connectivity through the virtual network card, and generates the routing table and connectivity verification results; The P2P connection status confirmation module detects the validity of the direct connection channel based on the routing table and the connectivity verification result. If the direct connection fails, a relay channel stable connection is established, data multiplexing and redundancy check are performed, the data transmission path is adjusted and the network flow is optimized to obtain the P2P connection stability result; The data security and integrity check module uses the P2P connection stability result to run a data integrity check program, performs a redundancy check on the transmitted data packets, and generates a data security determination result; The network diagnosis and performance adjustment module determines the result according to the data security, performs network diagnosis and evaluates the connection quality, records and analyzes the network performance data, adjusts the network parameters according to the analysis result, and generates the transmission path adjustment result.
Citation Information
Patent Citations
Peer-to-peer network organizing method in game middleware base on delay aggregation
CN101252490A
Energy-saving-oriented high-reliability data storage method in data center environment
CN102306157A
P2P (peer-to-peer) network building method and data positioning method
CN102333116A
Data acquisition method and data acquisition device
CN106604352A
Private virtual LAN spanning a public network for connection of arbitrary hosts
US20080183853A1
