General data end-to-end reliable transmission method and system
Through the methods of data encapsulation, ACK packet confirmation and retransmission mechanism, the problem of data loss in the QUIC protocol is solved, and the reliability and integrity of data transmission are improved.
Patent Information
- Application Number
- CN202510256236.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-05
- Publication Date
- 2025-05-16
AI Technical Summary
The QUIC protocol still faces the problem of data loss during data transmission, which affects the integrity and correctness of data, which in turn affects the reliability of data transmission.
It provides a general data end-to-end reliable transmission method, which ensures the integrity and reliability of data packets during transmission through data encapsulation, timer monitoring, ACK packet confirmation and retransmission mechanisms.
Through the ACK packet confirmation and retransmission mechanism, the reliability of data transmission is improved, the integrity and correctness of data packets are ensured during the transmission process, and the risk of data loss is reduced.
Smart Images

Figure CN120017228A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data transmission, and in particular to a method and system for end-to-end reliable transmission of general data. Background Art
[0002] With the continuous development of Internet technology, the requirements for network transmission speed and efficiency are increasing. Although the traditional TCP (Transmission Control Protocol) provides reliable end-to-end data transmission services, its performance is limited in application scenarios with low latency and high bandwidth requirements due to its three-way handshake and slow start mechanisms. In order to overcome these limitations, the QUIC (Quick UDP Internet Connections) protocol came into being.
[0003] The QUIC protocol is a transport layer protocol based on UDP (User Datagram Protocol), which combines the reliable transmission characteristics of TCP and the low latency advantage of UDP. However, despite many optimizations in the design and implementation of the QUIC protocol, it still faces the problem of data loss in the actual data transmission process. In the QUIC protocol, if the data packet is lost during the transmission process, the receiving end will not be able to correctly parse and reassemble the data, which will affect the integrity and correctness of the data, and further affect the reliability of data transmission. Summary of the invention
[0004] In order to improve the reliability of data transmission, the present application provides a general end-to-end reliable data transmission method and system.
[0005] In a first aspect, the present application provides a general end-to-end reliable data transmission method, which adopts the following technical solution: A general end-to-end reliable data transmission method comprises the following steps: First collection: obtain the data to be sent; Data encapsulation: encapsulate the data to be sent into data packets; Data transmission: The sender sends the data packet to the receiver and starts a timer to calculate the transmission time; Signal reception: The sender receives the ACK packet from the receiver; First judgment: judging whether the ACK packets received within the preset time length are all in line with expectations, if so, executing the signal receiving step; if not, executing the retransmission step; the ACK packets are all in line with expectations means: the receiving end successfully receives and parses the data packet; Retransmission: Determine the data packet to be retransmitted based on the ACK packet and send the data packet to be retransmitted to the receiving end.
[0006] The present application first obtains the data to be sent, and then encapsulates the data to be sent to obtain a data packet, so that the data to be transmitted can remain structured and standardized during the transmission process, which is convenient for the receiving end to parse and reorganize. Subsequently, the sending end sends the encapsulated data packet to the receiving end, and starts the timer to monitor the transmission time, which helps to timely discover potential transmission delays or packet loss problems. Subsequently, the receiving end confirms the reception and parsing of the data packet by sending an ACK packet, thereby improving the reliability of data transmission. Subsequently, the sending end determines whether the data packet is successfully transmitted based on the received ACK packet. If the ACK packet is not received as expected or the content does not meet expectations (that is, the data packet is not successfully received or parsed), the retransmission step is performed, further improving the reliability of data transmission.
[0007] Optionally, after performing the first acquisition step and before performing the data packaging step, the method further includes: Data sharding: shard the data to be sent to obtain n data blocks, and integrate all the data blocks into a data block set; Assign weights: Input n data blocks into the pre-built self-attention model in sequence to obtain the weight of each data block; First construction: construct the data sequence to be sent, and load the data block with the largest weight into the data sequence to be sent; Iteration: Delete the data block with the largest weight in the data block set and perform the weight allocation step until all data blocks are loaded into the data sequence to be sent; Data update: Update the data blocks in the data sequence to be sent to the data to be sent in sequence.
[0008] The present application can make the data more suitable for network transmission by slicing the data to be sent, especially when the amount of data is large. Slicing can reduce the size of a single data packet, reduce the risk of packet loss, and is also beneficial to the parsing and reorganization of the receiving end. Subsequently, the present application assigns weights to each data block through a self-attention model, and constructs a sequence of data to be sent according to the weights. Data blocks with larger weights may contain more critical information, so preferentially transmitting these data blocks helps improve transmission efficiency and data availability. Subsequently, the iterative process enables all data blocks to be loaded into the sequence of data to be sent in an orderly manner, and finally updated to the data to be sent. The present application continuously calculates the weight of the current data block in all data blocks in the data block set, and loads the data block with the largest weight into the sequence of data to be sent first, so that the important data blocks can be transmitted first, so that the receiving end can receive the important data blocks first, and under limited resources (such as bandwidth, processing power, etc.), these resources can be used more effectively to transmit the most valuable information, especially in a resource-constrained environment, which helps to improve the overall transmission efficiency.
[0009] Optionally, after the step of executing the iteration and before the step of executing the data update, the method further includes: First encryption: record the i-th data block in the data sequence to be sent as the i-th data block, encrypt the i-th data block, and obtain the i-th encrypted data block; Second encryption: XOR the i-th encrypted data block with the i+1-th encrypted data block to obtain the processed i+1-th encrypted data block, and encrypt the processed i+1-th encrypted data block to obtain the encrypted i+1-th encrypted data block; Second judgment: judge whether i+1 is equal to n, if so, execute the first update step; if not, execute the second update step; First update: Integrate the encrypted data blocks into an encrypted data block sequence according to the encryption order, and update the encrypted data block sequence into a data sequence to be sent; Second update: update the (i+1)th encrypted data block to the (i)th encrypted data block, and perform the second encryption step.
[0010] The present application first independently encrypts the i-th data block to reduce the data from unauthorized access and tampering. Subsequently, the present application performs XOR processing on adjacent encrypted data blocks before encryption, further increasing the security of the data. XOR operation is a simple encryption technique that can mix the contents of two data blocks together, making it difficult to directly obtain the original data even if one of the data blocks is cracked. In addition, the result after XOR processing is encrypted again, further enhancing the security of the data. Through iterative and recursive encryption methods, each data block of the present application undergoes multiple encryption processes, which greatly improves the overall security of the data. Even if part of the encrypted data blocks are cracked, it is difficult to restore the original content of the entire data sequence.
[0011] Optionally, after performing the iteration step and before performing the first encryption step, the method further includes: Generate sequence: Use a random number generation algorithm to generate random numbers with the same number of bytes as the first data block, and integrate all random numbers into a random data block; Initialization: perform XOR processing on the random data block and the first data block to obtain a processed first data block, and update the processed first data block as the first data block.
[0012] The present application generates a random number with the same number of bytes as the first data block by using a random number generation algorithm, and integrates the random number into a random data block, so as to provide an additional layer of protection for the first data block, thereby increasing the difficulty for attackers to crack the data. Subsequently, the present application performs an XOR process on the random data block and the first data block. By introducing the random data block and the XOR process, the original data has been protected before encryption. Even if the encryption process itself is cracked, the attacker still needs to know the random data block to restore the original data, further increasing the security of the data.
[0013] Optionally, after executing the step of data encapsulation and before executing the step of data transmission, the method further includes: Second collection: obtain the uplink bandwidth, downlink bandwidth, and size of each data packet of the sender; First calculation: Calculate the sliding window based on the upstream bandwidth, downstream bandwidth, and the byte size of each data packet. The calculation model is as follows: ; Among them, A is the sliding window size; is the uplink bandwidth; is the downlink bandwidth; RTT is the round-trip time; is the size of the jth data packet; [·] is the rounding down operation; In the data transmission step, data packets are transmitted with a sliding window size A.
[0014] By collecting the uplink bandwidth and downlink bandwidth of the sender, the present application can more accurately understand the current network status, which helps to reasonably allocate resources and improve bandwidth utilization during data transmission. Subsequently, by obtaining the size of each data packet, the present application can more flexibly adjust the size of the data packet to adapt to network conditions. Subsequently, the present application calculates the sliding window size based on the uplink bandwidth, downlink bandwidth and the byte size of each data packet, so that the sender will not send too much data that the receiving end cannot handle, nor will it send too little data to waste network resources. By calculating the sliding window size and transmitting data packets accordingly, the present application can more effectively control the rate of data transmission, thereby reducing the probability of network congestion and helping to maintain the stability and reliability of the network.
[0015] Optionally, after performing the second acquisition step and before performing the first calculation step, the method further includes: The second setting: obtaining the transmission link connecting the sending end and the receiving end, and the routing nodes included in each transmission link; The third collection: constructing a directed ring graph with the sending end as the starting point, the receiving end as the end point, and the routing node as the vertex, wherein the direction of the directed edge of the directed ring graph is from the sending end to the receiving end; Second calculation: Calculate the depth difference between the f-th branch and the g-th branch of the k-th level vertex , the calculation model is as follows: ; in, is the depth of the f-th branch, which is equal to the number of all vertices on the f-th branch plus one; is the depth of the g-th branch, which is equal to the number of all vertices on the g-th branch plus one; The third calculation: calculate the variance value of the depth of each branch of the k-th level vertex. The calculation model is as follows: ; in, is the variance value of the depth of each branch of the k-th level vertex; The average depth of all branches of the k-th level vertex; K is the number of branches of the k-th level vertex; The third setting is: obtaining a branch corresponding to the minimum variance value, recording it as the minimum variance branch, and recording the transmission link corresponding to the minimum variance branch as the first link; In the first calculation step, the sliding window is calculated using the uplink bandwidth and the downlink bandwidth of the transmitter on the first link.
[0016] The present application obtains the transmission link and routing node connecting the sender and the receiver through the second setting, which helps the system understand the network topology. Subsequently, a directed ring graph is constructed with the sender as the starting point, the receiver as the end point, and the routing node as the vertex, and the direction of the directed edge is clarified. This provides a clear framework for the subsequent calculation of branch depth, which helps to identify potential bottlenecks and redundant paths in the network. Subsequently, the depth difference between branches and the variance value of the depth of each branch are calculated respectively, which helps to evaluate the complexity and stability of different paths, thereby providing a basis for selecting the optimal path. Subsequently, by comparing the variance value, the present application selects the transmission link corresponding to the branch with the smallest variance value as the first link, that is, a relatively balanced and stable path in the network topology is selected, which helps to reduce the delay and packet loss rate during data transmission. In the first calculation step, the present application uses the uplink bandwidth and downlink bandwidth of the sender on the first link to calculate the sliding window. Since the first link is optimized and selected, these bandwidth data can better reflect the actual transmission conditions, making the calculation of the sliding window more accurate. The sliding window calculated based on the optimized bandwidth data can more effectively control the data transmission rate, reduce network congestion, and improve transmission efficiency. By collecting network topology and link information in real time, this application can adapt to changes in network conditions, dynamically adjust the transmission path and sliding window size, and maintain the stability and reliability of data transmission.
[0017] Optionally, when performing the step of data transmission, the first link is selected as the transmission path.
[0018] This application selects the first link as the transmission path. Since the first link is optimized and selected, it usually has a higher bandwidth utilization rate, which means that in the process of data transmission, network resources can be used more effectively and the delay of data transmission can be reduced. The first link often represents the most stable and efficient path from the sender to the receiver. Selecting this path for data transmission can reduce the number of jumps of data packets in the network, thereby reducing the loss during the transmission process. The first link is the optimal path obtained by comprehensive evaluation of multiple factors such as network topology and link quality. Therefore, selecting this path for data transmission can reduce the risk of data transmission interruption caused by network failure to a certain extent. Since the first link has high stability and reliability, selecting it for data transmission can improve the integrity and accuracy of data during transmission.
[0019] Optionally, after executing the step of data transmission and before executing the step of signal reception, the method further includes: Count: Use a counter to count the number of times the timer is started; Third judgment: judging whether the number of startup times is greater than a preset number threshold, if so, executing the third acquisition step; if not, executing the signal receiving step; The third collection: collect real-time traffic data; Anomaly detection: Use traffic analysis tools to analyze real-time traffic data to obtain abnormal behaviors; Alarm: Send out an alarm signal, the alarm signal includes: abnormal behavior.
[0020] This application uses a counter to count the number of timer startups, which can monitor the frequency of data transmission activities in real time, helping to promptly discover abnormal behavior or potential problems in data transmission. When the number of startups exceeds the preset threshold, the third collection step is executed to collect real-time traffic data, and the real-time traffic data is analyzed using a traffic analysis tool, so as to accurately identify abnormal behavior in the network, which helps to promptly discover and locate network failures or attacks. Once abnormal behavior is detected, an alarm signal is immediately issued, which helps the administrator to take quick measures to reduce further damage to the system caused by abnormal behavior, thereby improving the stability of the system.
[0021] Optionally, after executing the third judgment step and before executing the third collection step, the method further includes: Fourth collection: Get the IP address and UUID of the receiving end; Fourth judgment: whether the IP address is legal by using DNS resolution, if so, then execute the connection; otherwise, execute the third collection step; Establish connection: re-establish the connection between the sender and the receiver, the sender sends a verification request packet to the receiver, and the connection ID in the verification request packet is replaced with the UUID of the receiver; Fifth judgment: judge whether the receiving end can correctly respond to the verification request packet, if so, execute the signal receiving step; if not, execute the alarm step.
[0022] This application obtains the IP address and UUID of the receiving end through the fourth acquisition step, and adds a means of verifying the identity of the receiving end. As a globally unique identifier, UUID can effectively prevent the situation of impersonating the receiving end. Subsequently, this application uses DNS resolution to verify the legitimacy of the IP address, which helps to prevent security risks caused by tampering or forgery of the IP address. In the connection step, the connection between the sender and the receiver is re-established, and a verification request packet containing the receiving end UUID is sent, so that only a legitimate receiving end can establish a connection, further enhancing security. The fifth judgment step confirms the legitimacy of the receiving end by judging whether the receiving end can correctly respond to the verification request packet, which helps to promptly discover and prevent the access of illegal receiving ends. If the receiving end passes the verification, this application will re-establish the connection between the sender and the receiving end, which helps to solve data transmission problems caused by network fluctuations or connection interruptions and improve the stability of the connection. If the receiving end cannot correctly respond to the verification request packet, this application will execute the alarm step. This helps to promptly discover and deal with connection problems and reduce the risk of data transmission interruption.
[0023] In the second aspect, the present application provides a universal data end-to-end reliable transmission system, which adopts the following technical solutions: A universal data end-to-end reliable transmission system, comprising: a processor and a memory, The memory stores program code; The processor executes the steps of the method when calling the program code in the memory.
[0024] In summary, the present application includes at least one of the following beneficial technical effects: 1. The present application first obtains the data to be sent, and then encapsulates the data to be sent to obtain a data packet, so that the data to be transmitted can remain structured and standardized during the transmission process, which is convenient for the receiving end to parse and reorganize. Subsequently, the sending end sends the encapsulated data packet to the receiving end, and starts a timer to monitor the transmission time, which helps to promptly discover potential transmission delays or packet loss problems. Subsequently, the receiving end confirms the reception and parsing of the data packet by sending an ACK packet, thereby improving the reliability of data transmission. Subsequently, the sending end determines whether the data packet is successfully transmitted based on the received ACK packet. If the ACK packet is not received as expected or the content does not meet expectations (that is, the data packet is not successfully received or parsed), the retransmission step is performed, further improving the reliability of data transmission.
[0025] 2. By collecting the uplink bandwidth and downlink bandwidth of the sender, the present application can more accurately understand the current network status, which helps to reasonably allocate resources and improve bandwidth utilization during data transmission. Subsequently, by obtaining the size of each data packet, the present application can more flexibly adjust the size of the data packet to adapt to network conditions. Subsequently, the present application calculates the sliding window size based on the uplink bandwidth, downlink bandwidth and the byte size of each data packet, so that the sender will not send too much data that the receiving end cannot handle, nor will it send too little data to waste network resources. By calculating the sliding window size and transmitting data packets accordingly, the present application can more effectively control the rate of data transmission, thereby reducing the probability of network congestion and helping to maintain the stability and reliability of the network. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 is a flow chart of Example 1 of the present application; Figure 2 is a flow chart of Example 2 of the present application; Figure 3 is a flow chart of Example 3 of the present application; Figure 4 This is a flow chart of Example 4 of the present application. DETAILED DESCRIPTION
[0027] The following combination Figures 1 to 4 This application is described in further detail.
[0028] Embodiment 1: This embodiment discloses a general data end-to-end reliable transmission method, referring to Figure 1 , the method includes: S1 first acquisition, S2 data encapsulation, S3 data transmission, S4 signal reception, S5 first judgment and S6 retransmission. First, the first acquisition is performed to obtain the data to be sent, and then the data is encapsulated into a data packet, and sent from the sending end to the receiving end, and a timer is started to calculate the transmission time. The sending end then receives the ACK packet from the receiving end, and determines within a preset time whether these ACK packets all indicate that the data packet has been successfully received and parsed. If the ACK packets are all as expected, the signal reception step will continue; otherwise, the retransmission step will be executed, and the data packet to be retransmitted will be determined and resent to the receiving end based on the information in the ACK packet. This embodiment includes the following steps: S1 first collects or generates data to be sent, that is, data to be sent.
[0029] The data to be sent can come from a variety of sources, such as user input, sensor readings, file contents, or database records.
[0030] S2 data encapsulation, data encapsulation is the process of packaging the data to be sent into a format suitable for network transmission to obtain a data packet. The encapsulated data packet has all the information required for transmission in the network and can be sent from the sender to the receiver.
[0031] In S3 data transmission, the sender sends the data packet to the receiver and starts a timer to calculate the transmission time.
[0032] S4 signal reception, the sender waits for and receives the confirmation message (ie, ACK packet) from the receiver. The ACK packet is a message sent by the receiver back to the sender to confirm the reception and parsing of the data. The ACK packet contains the sequence number, checksum or other confirmation information of the received data packet to help the sender verify the integrity of the data.
[0033] S5 is the first judgment, judging whether the ACK packets received within the preset time length are all in line with expectations. If so, S4 signal reception is executed; if not, S6 retransmission is executed; the ACK packets are all in line with expectations when: the receiving end successfully receives and parses the data packet.
[0034] S6 retransmission determines the data packets to be retransmitted based on the ACK packet (by checking the sequence number of the ACK packet to find out which sequence numbers are missing or the corresponding data packets are not confirmed), and sends the data packets to be retransmitted to the receiving end.
[0035] This embodiment first obtains the data to be sent, encapsulates the data to be sent into a data packet, then the sending end sends the data packet to the receiving end and starts the timer, and then receives the ACK packet from the receiving end to confirm the data reception status, and determines whether the ACK packet meets expectations within a preset time. If both meet expectations, the subsequent process continues (note that it is expressed as continuing rather than repeatedly executing signal reception), otherwise the data packet to be retransmitted is determined based on the ACK packet information and retransmission is performed until all data is successfully transmitted and confirmed. This embodiment improves the reliability of data transmission through comprehensive consideration and implementation of multiple aspects such as data encapsulation, confirmation mechanism, timer and timeout retransmission, retransmission strategy, integrity verification, and flexible process design.
[0036] Example 2: Reference Figure 2 The difference between this embodiment and embodiment 1 is that after executing S1 first acquisition and before executing S2 data encapsulation, it also includes: S101 data slicing, dividing the data to be sent into smaller data blocks for more efficient management and transmission. Through slicing, n data blocks are obtained, and then all data blocks are integrated into a data block set.
[0037] S102 first constructs a sequence of data to be sent.
[0038] S103 assigns weights and uses a pre-built self-attention model to process n data blocks. The self-attention model can evaluate the importance or relevance of each data block and assign a weight value to each data block, which reflects the relative importance of the data block in the entire data set. The data block with the largest weight is selected from the data block set and loaded into the data sequence to be sent, so that the most important data blocks are transmitted first, which helps to improve the overall efficiency and reliability of data transmission.
[0039] S104 is an iteration, in which the weight allocation process of S103 is iterated. In each iteration, the selected data blocks are deleted from the data block set, and the weights are re-allocated to the remaining data blocks. This process continues until all data blocks are loaded into the data sequence to be sent.
[0040] S105 generates a sequence, adopts a random number generation algorithm, generates a random number with the same number of bytes as the first data block, and integrates all the random numbers into a random data block.
[0041] S106 is initialized, performing XOR processing on the random data block and the first data block to obtain a processed first data block, and updating the processed first data block as the first data block.
[0042] S107: First encryption: the i-th data block in the data sequence to be sent is recorded as the i-th data block. For the i-th data block in the sequence (i.e., the i-th data block), this embodiment uses an appropriate encryption algorithm to encrypt it to obtain the i-th encrypted data block.
[0043] S108 Second encryption, in addition to encrypting a single data block, this embodiment also adopts a chain encryption method. Specifically, this embodiment performs an XOR process on the i-th encrypted data block and the i+1-th encrypted data block to obtain the processed i+1-th encrypted data block. Then, this embodiment encrypts the processed i+1-th encrypted data block again to obtain the encrypted i+1-th encrypted data block.
[0044] S109 is the second judgment, judging whether i+1 is equal to n. If so, executing S110 is the first update; if not, executing S111 is the second update.
[0045] S110: First update: Integrate the encrypted data blocks into an encrypted data block sequence according to the encryption order, and update the encrypted data block sequence into a data sequence to be sent. This process completes the encryption processing of the data and prepares the encrypted data for transmission.
[0046] S111 is the second update, in which the (i+1)th encrypted data block is updated to the (i)th encrypted data block, and S108 is performed as the second encryption.
[0047] S112 data updating, updating the data blocks in the sequence of data to be sent as data to be sent in sequence.
[0048] This embodiment includes slicing the data to be sent and assigning weights, constructing a data sequence to be sent based on the weights, then generating a random data block of the same size as the first data block and performing XOR initialization processing, then encrypting the data blocks in the sequence, and using a chain encryption method to enhance data security, and finally updating the data blocks according to the processing progress until all data blocks are encrypted and integrated into the final data sequence to be sent, so as to improve the reliability and security of data transmission.
[0049] Example 3: Reference Figure 3 The difference between this embodiment and embodiment 2 is that after executing S2 data encapsulation and before executing S3 data transmission, it also includes: S21 is the second collection, obtaining the uplink bandwidth, downlink bandwidth, and size of each data packet of the sending end.
[0050] Uplink bandwidth refers to the maximum rate at which the sender can send data to the network. It determines the speed at which the sender can inject data into the network.
[0051] Downlink bandwidth is the maximum rate at which the sender receives ACK packets from the network.
[0052] S22 is a second setting, determining all possible transmission paths from the sending end to the receiving end, and recording in detail the routing nodes passed on each path.
[0053] A transmission link refers to a collection of routing nodes and links that a data packet passes through from the sender to the receiver in the network.
[0054] S23 third collection, with the sending end as the starting point, the receiving end as the end point, and the routing node as the vertex to build a directed ring graph, the directed ring graph is an abstract representation of the network topology structure, which describes all the paths that the data packet may pass from the sending end to the receiving end. The direction of the directed edge points from the sending end to the receiving end, indicating the transmission direction of the data flow.
[0055] S24 second calculation, calculate the depth difference between the f-th branch and the g-th branch of the k-th level vertex , the calculation model is as follows: ; in, is the depth of the f-th branch, which is equal to the number of all vertices on the f-th branch plus one; is the depth of the g-th branch, which is equal to the number of all vertices on the g-th branch plus one.
[0056] S25 is the third calculation, which calculates the variance value of the depth of each branch of the k-th level vertex. The calculation model is as follows: ; in, is the variance value of the depth of each branch of the k-th level vertex; The average depth of all branches of the k-th vertex; K is the number of branches of the k-th vertex.
[0057] The variance value reflects the degree of discreteness between the depths of each branch, that is, whether the distribution of each branch in the network topology is uniform. The smaller the variance value, the closer the depths of each branch are and the more balanced the network topology is.
[0058] S26 is a third setting, obtaining the branch corresponding to the minimum variance value, recorded as the minimum variance branch, and recording the transmission link corresponding to the minimum variance branch as the first link. The first link is the best path for data packets to be transmitted from the sending end to the receiving end, and has the best network performance and stability. This application selects the first link to transmit data packets, which can improve the efficiency and reliability of data transmission.
[0059] S27 first calculation, based on the uplink bandwidth, downlink bandwidth and byte size of each data packet of the transmitter on the first link, calculates the sliding window, and the calculation model is as follows: ; Among them, A is the sliding window size; is the uplink bandwidth; is the downlink bandwidth; RTT is the round-trip time; is the size of the jth data packet; [·] is the rounding down operation.
[0060] In S3 data transmission, the first link is selected as the transmission path and the data packet is transmitted with a sliding window size A.
[0061] This embodiment includes collecting the uplink bandwidth, downlink bandwidth and data packet size of the sender, obtaining the transmission link and routing node information from the sender to the receiver, constructing a directed ring graph with the sender as the starting point, the receiver as the end point and the routing node as the vertex, calculating the depth difference of each branch and the variance value of the branch depth, so as to determine the branch with the smallest variance value and its corresponding transmission link as the optimal path. Subsequently, the sliding window size is calculated based on the network bandwidth and data packet size on the optimal path, and the path is selected in the data transmission stage to transmit the data packet with the sliding window size to improve the efficiency and reliability of data transmission.
[0062] Example 4: Reference Figure 4 The difference between this embodiment and embodiment 1 is that after executing S3 data transmission and before executing S4 signal reception, it also includes: S31 counts and uses a counter to count the number of times the timer is started.
[0063] S32 is the third judgment, judging whether the number of startup times is greater than the preset number threshold. If so, it means that packet loss may have occurred or the receiving end cannot parse the data packet normally, and it is necessary to execute S33, the fourth collection; if not, execute S4, signal reception.
[0064] S33 Fourth collection, obtain the IP address and UUID of the receiving end. The IP address is the unique address of the receiving end in the network, which is used for routing and transmission of data packets. The UUID is a unique identifier used to distinguish different devices or sessions.
[0065] S34 is the fourth judgment, using DNS (Domain Name System) to resolve the IP address of the receiving end and determine whether the address is legal. If so, execute S35 to establish a connection; otherwise, execute S37 to collect the third data.
[0066] S35 establishes a connection, reestablishes the connection between the sending end and the receiving end, and the sending end sends a verification request packet to the receiving end, and the connection ID in the verification request packet is replaced with the UUID of the receiving end.
[0067] S36 is the fifth judgment, judging whether the receiving end can correctly respond to the verification request packet. If so, execute S4 signal reception; if not, execute S39 alarm.
[0068] S37 is the third collection, collecting real-time traffic data.
[0069] S38 Anomaly Detection uses traffic analysis tools to analyze real-time traffic data. Traffic analysis tools can identify patterns, trends or abnormal behaviors in network traffic. By analyzing this data, potential network attacks, fraud or other security issues can be detected.
[0070] S39 alarm, sending an alarm signal, the alarm signal includes: abnormal behavior.
[0071] This embodiment effectively optimizes network performance and improves the stability and security of the network environment by real-time monitoring of network activity frequency, collecting and verifying receiving end information to enhance security, using traffic analysis tools to detect anomalies and issue alarm signals in a timely manner.
[0072] Embodiment 5: This embodiment discloses a universal data end-to-end reliable transmission system, the system comprising: processor and memory, The memory stores program code; The processor executes the steps of the method when calling the program code in the memory.
[0073] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.
Claims
1. A general data end-to-end reliable transmission method, characterized in that: include: First collection: obtain the data to be sent; Data encapsulation: encapsulate the data to be sent into data packets; Data transmission: The sender sends the data packet to the receiver and starts a timer to calculate the transmission time; Signal reception: The sender receives the ACK packet from the receiver; First judgment: judging whether the ACK packets received within the preset time length are all in line with expectations, if so, executing the signal receiving step; if not, executing the retransmission step; the ACK packets are all in line with expectations means: the receiving end successfully receives and parses the data packet; Retransmission: Determine the data packet to be retransmitted based on the ACK packet and send the data packet to be retransmitted to the receiving end.
2. The universal data end-to-end reliable transmission method according to claim 1, characterized in that: After executing the first acquisition step and before executing the data packaging step, the method further includes: Data sharding: shard the data to be sent to obtain n data blocks, and integrate all the data blocks into a data block set; First construction: construct the data sequence to be sent; Assign weights: Input n data blocks into the pre-built self-attention model in sequence, obtain the weight of each data block, and load the data block with the largest weight into the data sequence to be sent; Iteration: Delete the data block with the largest weight in the data block set and perform the weight allocation step until all data blocks are loaded into the data sequence to be sent; Data update: Update the data blocks in the data sequence to be sent to the data to be sent in sequence.
3. The universal data end-to-end reliable transmission method according to claim 2, characterized in that: After executing the iteration step and before executing the data update step, it also includes: First encryption: record the i-th data block in the data sequence to be sent as the i-th data block, encrypt the i-th data block, and obtain the i-th encrypted data block; Second encryption: XOR the i-th encrypted data block with the i+1-th encrypted data block to obtain the processed i+1-th encrypted data block, and encrypt the processed i+1-th encrypted data block to obtain the encrypted i+1-th encrypted data block; Second judgment: judge whether i+1 is equal to n, if so, execute the first update step; if not, execute the second update step; First update: Integrate the encrypted data blocks into an encrypted data block sequence according to the encryption order, and update the encrypted data block sequence into a data sequence to be sent; Second update: update the (i+1)th encrypted data block to the (i)th encrypted data block, and perform the second encryption step.
4. The universal data end-to-end reliable transmission method according to claim 3, characterized in that: After executing the iteration step and before executing the first encryption step, the method further includes: Generate sequence: Use a random number generation algorithm to generate random numbers with the same number of bytes as the first data block, and integrate all random numbers into a random data block; Initialization: perform XOR processing on the random data block and the first data block to obtain a processed first data block, and update the processed first data block as the first data block.
5. The universal data end-to-end reliable transmission method according to claim 4, characterized in that: After executing the step of data encapsulation and before executing the step of data transmission, the method further includes: Second collection: obtain the uplink bandwidth, downlink bandwidth, and size of each data packet of the sender; First calculation: Calculate the sliding window based on the upstream bandwidth, downstream bandwidth, and the byte size of each data packet. The calculation model is as follows: ; Among them, A is the sliding window size; is the uplink bandwidth; is the downlink bandwidth; RTT is the round-trip time; is the size of the jth data packet; [·] is the rounding down operation; In the data transmission step, data packets are transmitted with a sliding window size A.
6. The universal data end-to-end reliable transmission method according to claim 5, characterized in that: After performing the second acquisition step and before performing the first calculation step, the method further includes: The second setting: obtaining the transmission link connecting the sending end and the receiving end, and the routing nodes included in each transmission link; The third collection: constructing a directed ring graph with the sending end as the starting point, the receiving end as the end point, and the routing node as the vertex, wherein the direction of the directed edge of the directed ring graph is from the sending end to the receiving end; Second calculation: Calculate the depth difference between the f-th branch and the g-th branch of the k-th level vertex , the calculation model is as follows: ; in, is the depth of the f-th branch, which is equal to the number of all vertices on the f-th branch plus one; is the depth of the g-th branch, which is equal to the number of all vertices on the g-th branch plus one; The third calculation: calculate the variance value of the depth of each branch of the k-th level vertex. The calculation model is as follows: ; in, is the variance value of the depth of each branch of the k-th level vertex; The average depth of all branches of the k-th level vertex; K is the number of branches of the k-th level vertex; The third setting is: obtaining a branch corresponding to the minimum variance value, recording it as the minimum variance branch, and recording the transmission link corresponding to the minimum variance branch as the first link; In the first calculation step, the sliding window is calculated using the uplink bandwidth and the downlink bandwidth of the transmitter on the first link.
7. The universal data end-to-end reliable transmission method according to claim 6, characterized in that: When performing the step of data transmission, the first link is selected as the transmission path.
8. The universal end-to-end reliable data transmission method according to any one of claims 1 to 7, characterized in that: After executing the step of data transmission and before executing the step of signal reception, the method further includes: Count: Use a counter to count the number of times the timer is started; Third judgment: judging whether the number of startup times is greater than a preset number threshold, if so, executing the third acquisition step; if not, executing the signal receiving step; The third collection: collect real-time traffic data; Anomaly detection: Use traffic analysis tools to analyze real-time traffic data to obtain abnormal behaviors; Alarm: Send out an alarm signal, the alarm signal includes: abnormal behavior.
9. The universal end-to-end reliable data transmission method according to claim 8, characterized in that: After executing the third judgment step and before executing the third collection step, the method further includes: Fourth collection: Get the IP address and UUID of the receiving end; Fourth judgment: whether the IP address is legal by using DNS resolution, if so, then execute the connection; otherwise, execute the third collection step; Establish connection: re-establish the connection between the sender and the receiver, the sender sends a verification request packet to the receiver, and the connection ID in the verification request packet is replaced with the UUID of the receiver; Fifth judgment: judge whether the receiving end can correctly respond to the verification request packet, if so, execute the signal receiving step; if not, execute the alarm step.
10. A universal data end-to-end reliable transmission system, characterized in that: include: processor and memory, The memory stores program code; When the processor calls the program code in the memory, the steps of the method according to any one of claims 1 to 9 are executed.
Citation Information
Patent Citations
TCP congestion control method for bandwidth reservation network
CN103929370A
Vehicle-mounted intelligent data connectionless reliable transmission method
CN113965959A
Radar data reliable transmission method
CN117439713A
Railway signal infrastructure data management method and system
CN119046409A