WO2021189957A1 - Data transmission method, data transmission system, device and storage medium - Google Patents

Data transmission method, data transmission system, device and storage medium Download PDF

Info

Publication number
WO2021189957A1
WO2021189957A1 PCT/CN2020/135265 CN2020135265W WO2021189957A1 WO 2021189957 A1 WO2021189957 A1 WO 2021189957A1 CN 2020135265 W CN2020135265 W CN 2020135265W WO 2021189957 A1 WO2021189957 A1 WO 2021189957A1
Authority
WO
WIPO (PCT)
Prior art keywords
transmission
current transmission
historical
data
transmission parameters
Prior art date
Application number
PCT/CN2020/135265
Other languages
French (fr)
Chinese (zh)
Inventor
徐伟
徐一鸣
蒋慧军
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021189957A1 publication Critical patent/WO2021189957A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0006Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission format
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0006Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission format
    • H04L1/0007Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission format by modifying the frame length
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Definitions

  • This application belongs to the field of data processing, and specifically relates to a data transmission method, data transmission system, equipment, and storage medium.
  • the inventor realizes that the transmission speed and stability of large-capacity data transmission in high-speed and stable network scenarios, such as the same local area network or the same data center, are acceptable. In addition to taking a long time, such scenarios , The possibility of serious problems such as transmission failure is small. However, in some scenarios where the transmission bandwidth is relatively narrow or the bandwidth is unstable, such as large-capacity data transmission across LANs or different data centers, if special technical solutions and transmission strategies are not used, there is a high probability that transmission will be interrupted or time-consuming. The timeout is too long and the transfer cannot be completed eventually.
  • the embodiment of the first aspect of the present application proposes a data transmission method, including:
  • the data to be transmitted is transmitted after initial fragmentation
  • the current transmission parameters are adjusted according to the first preset rule, and the remaining data to be transmitted is transmitted after being fragmented twice according to the adjusted current transmission parameters.
  • the embodiment of the second aspect of the present application provides a data transmission system, including:
  • the query module is used to query historical transmission records and obtain historical transmission parameters
  • the judgment calculation module is configured to determine the current transmission parameters according to the historical transmission parameters; determine whether the current transmission status is normal, and if it is normal, adjust the current transmission parameters according to the first preset rule;
  • the transmission module is configured to perform initial fragmentation and transmission of the data to be transmitted according to the current transmission parameters; and perform second fragmentation and transmission of the remaining data to be transmitted according to the adjusted current transmission parameters.
  • the embodiment of the third aspect of the present application provides a computer device, including a memory and a processor, and computer-readable instructions are stored in the memory.
  • the processing The device executes the following steps of the data transmission method described in the first aspect:
  • the data to be transmitted is transmitted after initial fragmentation
  • the current transmission parameters are adjusted according to the first preset rule, and the remaining data to be transmitted is transmitted after being fragmented twice according to the adjusted current transmission parameters.
  • the embodiment of the fourth aspect of the present application provides a storage medium storing computer-readable instructions.
  • the computer-readable instructions are executed by one or more processors, the one or more processors execute the following first The steps of the data transmission method described in the aspect:
  • the data to be transmitted is transmitted after initial fragmentation
  • the current transmission parameters are adjusted according to the first preset rule, and the remaining data to be transmitted is transmitted after being fragmented twice according to the adjusted current transmission parameters.
  • FIG. 1 shows a schematic diagram of the steps of a data transmission method provided by an embodiment of the present application
  • FIG. 2 shows a schematic flowchart of a data transmission method provided by an embodiment of the present application
  • FIG. 3 shows a schematic structural diagram of a data transmission system provided by an embodiment of the present application
  • FIG. 4 shows a schematic structural diagram of a computer device provided by an embodiment of the present application
  • FIG. 5 shows a schematic diagram of a storage medium provided by an embodiment of the present application.
  • a data transmission method which can determine the current transmission parameters based on historical transmission parameters, and then perform fragmentation and transmission of the data to be transmitted according to the current transmission parameters, thereby avoiding the traditional simple fragmentation method.
  • Step 101 Query historical transmission records and obtain historical transmission parameters.
  • the client when the client is preparing to transfer large-capacity data files across a local area network or across data centers, the client needs to initiate a large-capacity data file transfer request first, query the database in the client, and perform data from the previous
  • the historical transmission parameters corresponding to the file receiving end are obtained from the historical transmission record saved during transmission.
  • the historical transmission parameters are the historical transmission parameters of the large-capacity data file transmission between the client that is going to send the large-capacity data file transmission and the server that will receive the file before this, including the fragment size, the number of transmission threads, Parameters related to data transmission and bandwidth, such as response time and number of retries.
  • Step 102 Determine current transmission parameters according to historical transmission parameters.
  • the historical parameter vectors are vectors composed of related historical parameters in different time periods in the database.
  • the parameter vector includes parameters related to data transmission and bandwidth, such as the size of the fragment, the number of transmission threads, the response time, and the number of retries.
  • the weighted average smoothing formula is used to calculate the current transmission parameters.
  • the weighted average smoothing formula is:
  • Is the current transmission parameter i is the group number of the historical parameter vector, Is the historical parameter vector, a i is the weighted component, usually, the closer the time is, the higher the weight is, n is a positive integer, t is the time, and t 0 is the starting point of the query period corresponding to the current transmission time, namely It is a transmission time period corresponding to the current transmission time.
  • the transmission time period can be 30 minutes, 1 hour, or 2 hours.
  • T 0 is the interval period of the query time period, usually 24 hours as an interval period.
  • the time when the client initiates a large-capacity data file transfer request is at 13:35 on August 18, 2020, with 1 hour as the transmission time period, it corresponds to the current transmission time (13:35 on August 18, 2020)
  • the start point of the query time period is 13:00
  • the end point of the query time period is 14:0. That is, query today (18th) 13:00 to 14:00, yesterday (17th) 13:00 to 14:00, the day before yesterday (16th) 13:00 to 14:00 and before From 13:0 to 14:0 of the date of the historical transmission parameters, one or more sets of historical parameter vectors including the fragment size, the number of transmission threads, the response time, and the number of retries are obtained from these historical transmission parameters.
  • the number of groups of the historical parameter vector is 2, because the historical parameter vector Including the shard size Mt, the number of threads Pt, the response time Rt and the number of retries Ct, so the weighted average smoothing formula is used and the shard size Mt, the number of threads Pt, and the response time Rt in the historical parameter vector on the 17th and 16th And the number of retries Ct, determine the fragment size m, the number of threads p, the response time r, and the number of retries c in the previous transmission parameters.
  • Step 103 According to the current transmission parameters, the data to be transmitted is transmitted after initial fragmentation.
  • the large-capacity data file to be transmitted is fragmented to obtain fragmented data, and the transmission parameters are set according to the number of threads p, response time r, and number of retries c calculated before , To transmit the fragmented data of large-capacity data files to the server. Among them, before judging the current transmission status, the fragmentation of the data to be transmitted is the initial fragmentation.
  • the preset transmission parameter is used directly as the current transmission parameter. That is, the client cannot obtain the historical transmission parameters corresponding to the server receiving the file from the historical transmission records, and uses the transmission parameters with the preset values to fragment the large-capacity data file to be transmitted, set the transmission parameters, and transmit Fragmentation of large-capacity data files to the server.
  • Step 104 Determine whether the current transmission status is normal.
  • the abnormal conditions of timeout include: whether a timeout error occurs, whether the number of retries has been exceeded, whether the response time has been exceeded, etc.
  • Step 105 If it is normal, adjust the current transmission parameters according to the first preset rule, and perform the second fragmentation and transmission of the remaining data to be transmitted according to the current transmission parameters adjusted according to the first preset rule. Increase the fragment size and the number of transmission threads in the current transmission parameters according to the first preset rule, and use the increased fragment size and the number of transmission threads as the current transmission parameters, and perform second fragmentation and transmission of the remaining data to be transmitted . Among them, the remaining data to be transmitted is fragmented according to the adjusted current transmission parameters, which is the second fragmentation.
  • step 104 is continued again, and step 105 is selected again according to whether the transmission status is normal, and so on. .
  • the first preset rule increases the fragment size and the number of transmission threads in the current transmission parameters according to the first preset rule, including: if the transmission status is normal, no timeout abnormality occurs, that is, no timeout error occurs, and the number of retries is not exceeded. If the response time and other parameters are not exceeded, the current transmission parameters are adjusted according to the increment ratio and increment value preset in the first preset rule. It is also possible to use only one of no timeout error, exceeding the number of retries, exceeding the response time, or other conditions as the criterion for judging that the state is normal.
  • the response time and the number of retries In addition to increasing the fragment size and the number of transmission threads in the current transmission parameters, it also includes adjusting (such as increasing or decreasing) the response time and the number of retries. Whether the response time and the number of retries are adjusted, and whether to increase or decrease, can be specifically set as required.
  • the increment ratios of the fragment size, response time, and the number of retries can be 5%, 10%, 15%, 20%, etc., and corresponding increment ratios can also be set for the fragment size, response time, and number of retries.
  • the increment ratio of the fragment size, response time and the number of retries as an example, the fragment size m is adjusted to (1+0.1)m, and the response time r is adjusted to (1+ 0.1)r, the number of retries c is adjusted to (1+0.1)c.
  • the incremental value of the number of threads, response time, and number of retries can be increased by a fixed value.
  • the increment value of the number of threads is 1, the increment value of the response time is 5 milliseconds (ms), and the increment value of the number of retries is 5, the adjusted number of threads is p+1, and the response time is r+5 Milliseconds, the number of retries is c+5.
  • the remaining data to be transmitted that has not yet been transmitted are fragmented and sent correspondingly.
  • its current transmission parameter is the current transmission parameter after adjustment. That is, use the adjusted number of threads to be p+1, the response time to be r+5 milliseconds, and the number of retries to be c+5 to transmit a fragment with a fragment size of (1+0.1)m.
  • the current transmission status is normal. If the transmission status is normal, continue to increase the segment size, number of transmission threads, response time, and number of retries in the current transmission parameters according to the first preset rule, and adjust the segment size, number of transmission threads, and response according to the increment. Time and the number of retries, and perform corresponding secondary fragmentation and transmission of the remaining data to be transmitted that has not yet been transmitted. If there is no abnormal transmission state until the data transmission is completed, the current transmission parameters when the data transmission is completed are saved.
  • If there is an abnormal transmission status save the current transmission parameters to the historical transmission record, use the current transmission parameters to continue to transmit the remaining data to be transmitted, or after decrementing the current transmission parameters, save the current decrement adjustment Transmission parameters, and use the current transmission parameters after decrement adjustment to perform secondary segmentation and transmission of the remaining data to be transmitted.
  • step 104 after judging whether the current transmission status is normal, the method further includes:
  • the above steps are to determine whether the transmission status is normal according to whether the transmission of the transmitted data fragments is normal, whether there is a timeout error, whether the number of retries is exceeded, whether the response time is exceeded, etc., to determine whether the transmission status is normal. If the parameters such as the number of times and response time appear and exceed, or one of them appears or exceeds (that is, to determine whether the fragmented transmission of the transmitted data is normal, it can also only be caused by a timeout error, exceeding the number of retries, exceeding the response time, or other conditions If one of the items is used as the criterion for abnormal status), then continue to use the current transmission parameters to transmit the fragmented data, and no further adjustments are made until the transmission is completed, and the current transmission parameters are saved.
  • Two reduction methods include: using the current transmission parameters before the last current parameter adjustment as the adjusted current transmission parameters, or adjusting the current transmission parameters, reducing the fragment size and the number of transmission threads in the current transmission parameters as the adjusted current transmission parameters Current transmission parameters. Whether the response time and the number of retries are adjusted, and whether to increase or decrease, can be specifically set as required.
  • the current transmission parameters before the last adjustment of the current parameters as the adjusted current transmission parameters, which means that if the current transmission parameters are adjusted transmission parameters, use the transmission parameters before the current transmission parameter adjustments as the adjusted current transmission parameters.
  • Current transmission parameters data transmission. That is, assuming that the current transmission parameters are: the fragment size is (1+0.1)m, the response time is (1+0.1)r, the number of retries c is (1+0.1)c, and the number of threads is p+1; The transmission parameters before the adjustment of the current transmission parameters are: the fragment size is m, the response time is r, the number of retries is c, and the number of threads is p; use these parameters as the adjusted transmission parameters, transmit data, and save these parameters, No further adjustments will be made afterwards until the data transfer is complete.
  • Adjust the current transmission parameters reduce the fragment size and the number of transmission threads in the current transmission parameters as the adjusted current transmission parameters, which means that according to the preset decrement ratio and decrement value, adjust the current transmission parameters to reduce the score Chip size, reduced response time, number of retries, and number of threads.
  • the reduction ratio can be 5%, 10%, 15%, 20%, and so on.
  • the decrement value can be a fixed value corresponding to the reduction in response time, the number of retries, and the number of threads. After decrementing the current transmission parameters, use and save the decremented current transmission parameters to transmit data, and then do not adjust until the data transmission is completed.
  • the historical transmission records of the adjusted current transmission parameters are saved to the client for subsequent data transmission, and the current transmission parameters are no longer adjusted.
  • the saved adjusted current transmission parameters and the current transmission parameters that have not been adjusted all correspond to the transmission time period.
  • the remaining to-be-transmitted data that has not yet been transmitted is subjected to corresponding secondary fragmentation and transmission.
  • its current transmission parameter is the current transmission parameter after adjustment or the current transmission parameter without adjustment.
  • the embodiment of the application utilizes the time period characteristics of the transmission network, determines the current transmission parameters through historical transmission parameters according to the universal characteristics of the transmission network, and then transmits the data to be transmitted in fragments according to the current transmission parameters, thereby avoiding the traditional The naive fragmentation method directly fragments without considering the current bandwidth, resulting in excessive fragmentation transmission request attempts and increased time loss, which makes up for the low transmission efficiency and bandwidth utilization of the existing fragmentation transmission scheme;
  • By judging the current transmission status quantifying and analyzing the real-time parameters of the network, optimizing the fragmentation transmission strategy, dynamically adjusting the current transmission parameters and fragment size, and making maximum use in the large-capacity data transmission scenario across the local area network or across the data center Network bandwidth, thereby reducing transmission time, improving transmission efficiency, increasing bandwidth utilization, reducing transmission delay, and optimizing fragmentation transmission strategy, network transmission efficiency and bandwidth utilization, thereby improving the robustness of the transmission scheme and ensuring high connection availability , And has the universal characteristics of transmission network in the scene of large-capacity data transmission across
  • transoceanic networks usually reach the peak of transmission around 12 noon. Aiming at this network feature, using the historical transmission parameters of the same period of time to optimize the strategy in the fragmented transmission process can improve the transmission success rate on the one hand, and improve the efficiency of network transmission on the other hand.
  • the periodical characteristics of network transmission are used to perform dynamic and real-time intelligent fragmentation transmission of large-capacity data files, effectively using network bandwidth.
  • the fragmented transmission strategy of the current time period is optimized.
  • the current transmission parameters are adjusted in a small range until the error retry rate increases, thereby further optimizing the fragmentation strategy on the basis of the optimal transmission strategy (parameter).
  • a data transmission system including:
  • the query module 301 is used to query historical transmission records and obtain historical transmission parameters
  • the judgment calculation module 302 is configured to determine the current transmission parameters based on the historical transmission parameters; determine whether the current transmission status is normal, and if it is normal, adjust the current transmission parameters according to the first preset rule;
  • the transmission module 303 is configured to perform initial fragmentation and transmission of the data to be transmitted according to the current transmission parameters; and perform second fragmentation and transmission of the remaining data to be transmitted according to the adjusted current transmission parameters.
  • the query module 301 includes:
  • Data query unit for querying historical transmission records
  • the data extraction unit is configured to obtain historical transmission parameters from the historical transmission records, and send the historical transmission parameters to the judgment calculation module 302.
  • the data transmission system When the data transmission system (client) is preparing to transmit large-capacity data files across the local area network or across the data center, the data transmission system needs to first query the database through the data query unit, and then obtain the data from the historical transmission record through the data extraction unit.
  • the historical transmission parameters corresponding to the file receiving end (the server receiving the file).
  • the historical transmission parameters are the historical transmission parameters for the large-capacity data file transmission between the data transmission system that is going to send the large-capacity data file transmission and the server that will receive the file before this.
  • the judgment calculation module 302 includes:
  • the parameter determination unit is configured to determine the current transmission parameters using the weighted average smoothing formula according to the historical transmission parameters, and send the current transmission parameters to the transmission module 303;
  • the state judgment unit is used to judge whether the current transmission state is normal, and send the judgment result of the transmission state to the parameter adjustment unit;
  • the parameter adjustment unit is configured to adjust the current transmission parameters according to the first preset rule according to the judgment result of the transmission state, and send the adjusted current transmission parameters to the transmission module 303.
  • the above parameter determination unit specifically obtains one or more sets of historical parameter vectors from historical transmission parameters, where the parameter vectors include: fragment size, number of transmission threads, response time and number of retries, etc., as well as data transmission and bandwidth Related parameters. According to the obtained one or more sets of historical parameter vectors, the weighted average smoothing formula is used to calculate the current transmission parameters.
  • the weighted average smoothing formula is:
  • Is the current transmission parameter i is the group number of the historical parameter vector, Is the historical parameter vector, a i is the weighted component, usually, the closer the time is, the higher the weight is, n is a positive integer, t is the time, and t 0 is the starting point of the query period corresponding to the current transmission time, namely It is a transmission time period corresponding to the current transmission time.
  • the transmission time period can be 30 minutes, 1 hour, or 2 hours.
  • T 0 is the interval period of the query time period, usually 24 hours as an interval period.
  • the time when the client initiates a large-capacity data file transfer request is at 13:35 on August 18, 2020, with 1 hour as the transmission time period, it corresponds to the current transmission time (13:35 on August 18, 2020)
  • the start point of the query time period is 13:0
  • the end point of the query time period is 14:0. That is, query today (18th) 13:00 to 14:00, yesterday (17th) 13:00 to 14:00, the day before yesterday (16th) 13:00 to 14:00 and before From 13:0 to 14:0 of the date of the historical transmission parameters, one or more sets of historical parameter vectors including the fragment size, the number of transmission threads, the response time, and the number of retries are obtained from these historical transmission parameters.
  • the number of groups of the historical parameter vector is 2, because the historical parameter vector Including the shard size Mt, the number of threads Pt, the response time Rt and the number of retries Ct, so the weighted average smoothing formula is used and the shard size Mt, the number of threads Pt, and the response time Rt in the historical parameter vector on the 17th and 16th And the number of retries Ct, determine the fragment size m, the number of threads p, the response time r, and the number of retries c in the previous transmission parameters.
  • the above-mentioned state judgment unit specifically judges whether the current transmission state is normal and whether an abnormal situation of timeout occurs.
  • the abnormal conditions of timeout include: whether a timeout error occurs, whether the number of retries has been exceeded, whether the response time has been exceeded, etc., to determine whether the current transmission status is normal. If there is no timeout error, the number of retries and the response time are not exceeded, the current transmission status is normal, and the current transmission status is sent to the parameter adjustment unit; One of the number of attempts, exceeding the response time, or other conditions is the criterion for judging that the state is normal.
  • the transmission status is abnormal, and the transmission status is sent to the parameter adjustment unit; the transmission status can also be judged only by the occurrence of a timeout error, exceeding the number of retries, and exceeding the response
  • One item of time or other conditions is used as a criterion for judging abnormal conditions.
  • the above-mentioned parameter adjustment unit specifically adjusts the current transmission parameters according to the transmission status, and sends the adjusted current transmission parameters to the transmission module 303. Determine whether the current transmission status is normal, and if it is normal, adjust the current transmission parameters according to the first preset rule.
  • the current transmission parameters are adjusted according to the increment ratio and increment value preset according to the first preset rule. It is also possible to use only one of no timeout error, exceeding the number of retries, exceeding the response time, or other conditions as the criterion for judging that the state is normal.
  • the increment ratios of the fragment size, response time, and the number of retries can be 5%, 10%, 15%, 20%, etc., and corresponding increment ratios can also be set for the fragment size, response time, and number of retries.
  • the increment ratio of the fragment size, response time and the number of retries as an example, the fragment size m is adjusted to (1+0.1)m, and the response time r is adjusted to (1+ 0.1)r, the number of retries c is adjusted to (1+0.1)c.
  • the incremental value of the number of threads, response time, and number of retries can be increased by a fixed value.
  • the increment value of the number of threads is 1, the increment value of the response time is 5 milliseconds (ms), and the increment value of the number of retries is 5, the adjusted number of threads is p+1, and the response time is r+5 Milliseconds, the number of retries is c+5.
  • the response time and the number of retries In addition to increasing the fragment size and the number of transmission threads in the current transmission parameters, it also includes adjusting (such as increasing or decreasing) the response time and the number of retries. Whether the response time and the number of retries are adjusted, and whether to increase or decrease, can be specifically set as required.
  • the transmission status is abnormal
  • Two reduction methods include: using the current transmission parameters before the last current parameter adjustment as the adjusted current transmission parameters, or adjusting the current transmission parameters, reducing the fragment size and the number of transmission threads in the current transmission parameters as the adjusted current transmission parameters Current transmission parameters.
  • the current transmission parameters before the last adjustment of the current parameters as the adjusted current transmission parameters, which means that if the current transmission parameters are adjusted transmission parameters, use the transmission parameters before the current transmission parameter adjustments as the adjusted current transmission parameters.
  • Current transmission parameters data transmission. That is, assuming that the current transmission parameters are: the fragment size is (1+0.1)m, the response time is (1+0.1)r, the number of retries c is (1+0.1)c, and the number of threads is p+1; The transmission parameters before the current transmission parameter adjustment are: the fragment size is m, the response time is r, the number of retries is c, and the number of threads is p; these parameters are used as the adjusted transmission parameters and sent to the transmission module 303.
  • Adjust the current transmission parameters reduce the fragment size and the number of transmission threads in the current transmission parameters as the adjusted current transmission parameters, which means that according to the preset decrement ratio and decrement value, adjust the current transmission parameters to reduce the score Chip size, reduced response time, number of retries, and number of threads.
  • the reduction ratio can be 5%, 10%, 15%, 20%, and so on.
  • the decrement value can be a fixed value corresponding to the reduction in response time, the number of retries, and the number of threads. After the current transmission parameters are decremented and adjusted, these parameters are used as the adjusted transmission parameters and sent to the transmission module 303.
  • the parameter adjustment unit is also used to send the unadjusted current transmission parameter or the current transmission parameter after decrement adjustment to the historical transmission record of the storage module for storage. After adjusting according to the above two reduction methods, or after continuing to use the unadjusted current transmission parameters, save the current transmission parameters (that is, reduction or unadjusted current transmission parameters) to the client's historical transmission records for later use Data transmission, and no longer any adjustments to the current transmission parameters. The saved current transmission parameters all correspond to the transmission time period.
  • the transmission module 303 includes:
  • the transmission adjustment unit is configured to perform initial fragmentation of the data to be transmitted according to the current transmission parameters; perform secondary fragmentation of the remaining data to be transmitted according to the current transmission parameters adjusted by the first preset rule;
  • the data transmission unit is used to transmit the data to be transmitted after the fragmentation (after the initial fragmentation or the second fragmentation).
  • the above-mentioned transmission adjustment unit is specifically configured to perform secondary fragmentation of the data to be transmitted according to the current transmission parameters.
  • the client fragments the large-capacity data file to be transmitted according to the previously calculated fragment size m, and sets the transmission parameters according to the previously calculated number of threads p, response time r, and number of retries c to transmit large-capacity data Fragmentation of the file to the server.
  • the preset transmission parameter is used directly as the current transmission parameter. That is, the client cannot obtain the historical transmission parameters corresponding to the server receiving the file from the historical transmission records, and uses the transmission parameters with the preset values to fragment the large-capacity data file to be transmitted, set the transmission parameters, and transmit Fragmentation of large-capacity data files to the server.
  • the remaining data to be transmitted that has not yet been transmitted is divided into corresponding fragments according to the current transmission parameter, the current transmission parameter after the incremental adjustment or the decrement adjustment is performed, and then the data is sent through the data transmission unit.
  • the state judging unit continues to judge whether the current transmission state is normal after incrementing (increasing the fragment size and the number of transmission threads in the current transmission parameter). If the current transmission status is normal, the parameter adjustment unit will continue to increase the fragment size, number of transmission threads, response time, and retry times in the current transmission parameters, and adjust the fragment size, number of transmission threads, response time, and retry according to the incremental adjustment. Number of attempts.
  • the transmission adjustment unit performs corresponding fragmentation on the remaining data to be transmitted that has not yet been transmitted, and then sends it. If there is no abnormal transmission state until the data transmission is completed, the parameter adjustment unit saves the current transmission parameters when the data transmission is completed. If an abnormal transmission state occurs, the transmission adjustment unit adjusts the current transmission parameters according to the above two methods, or does not adjust the current transmission parameters, and the parameter adjustment unit saves the current transmission parameters after decrement adjustment or the current transmission parameters that have not been adjusted. Transmission parameters.
  • the current transmission parameters are determined through historical transmission parameters, and then the data to be transmitted is fragmented and transmitted according to the current transmission parameters, thereby avoiding the situation that the traditional simple fragmentation method does not consider the current bandwidth.
  • a computer device includes a processor, a non-volatile storage medium, a memory, and a network interface connected by a system bus.
  • the non-volatile storage medium of the computer device stores an operating system, a database, and computer-readable instructions.
  • the database may store control information sequences.
  • the processor can implement a Kind of data transmission method.
  • the processor of the computer equipment is used to provide calculation and control capabilities, and supports the operation of the entire computer equipment.
  • a computer readable instruction may be stored in the memory of the computer device, and when the computer readable instruction is executed by the processor, the processor may execute a data transmission method.
  • the network interface of the computer device is used to connect and communicate with the terminal.
  • FIG. 4 is only a block diagram of part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
  • the specific computer device may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
  • the computer equipment includes a memory, a processor, and a computer program that is stored on the memory and can run on the processor.
  • the processor executes the computer program, the following steps are implemented: query historical transmission records, obtain historical transmission parameters; determine according to historical transmission parameters Current transmission parameters; according to the current transmission parameters, the data to be transmitted is divided into pieces and transmitted; it is judged whether the current transmission status is normal, and if it is normal, the current transmission parameters are adjusted according to the first preset rule; the data to be transmitted is performed according to the adjusted current transmission parameters Transfer after fragmentation.
  • a storage medium storing computer-readable instructions.
  • the storage medium may be volatile or non-volatile.
  • one or more processors when the computer-readable instruction is executed by one or more processors, one or more processors perform the following steps: query historical transmission records, obtain historical transmission parameters; determine current transmission according to historical transmission parameters Parameters; according to the current transmission parameters, the data to be transmitted is initially fragmented and then transmitted; it is judged whether the current transmission status is normal, and if it is normal, the current transmission parameters are adjusted according to the first preset rule; the remaining transmission parameters are adjusted according to the adjusted current transmission parameters The data is transmitted after the second fragmentation.
  • the computer program can be stored in a computer readable storage medium. When executed, it may include the procedures of the above-mentioned method embodiments.
  • the aforementioned storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disc, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

Provided are a data transmission method, a data transmission system, a device and a storage medium. The method comprises: querying a historical transmission record, and acquiring a historical transmission parameter; determining a current transmission parameter according to the historical transmission parameter; performing, according to the current transmission parameter, initial fragmentation on data to be transmitted and then transmitting same; determining whether the current transmission state is normal; and if the current transmission state is normal, adjusting the current transmission parameter according to a first preset rule, and performing, according to the adjusted current transmission parameter, secondary fragmentation on the remaining data to be transmitted and then transmitting same. A current transmission parameter is determined according to a historical transmission parameter, and data to be transmitted is fragmented according to the current transmission parameter and is then transmitted, such that too many fragmentation and transmission request attempts caused by a solidified fragmentation manner can be prevented from occurring, thereby reducing time loss. By determining the current transmission state, the current transmission parameter is dynamically adjusted, such that the network bandwidth can be utilized to the maximum extent, the transmission time is reduced, the transmission efficiency is improved, the bandwidth utilization rate is improved, and the transmission delay is reduced.

Description

一种数据传输方法、数据传输系统、设备及存储介质A data transmission method, data transmission system, equipment and storage medium
本申请要求于2020年10月14日提交中国专利局、申请号为202011099350.X,发明名称为“一种数据传输方法、数据传输系统、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on October 14, 2020, the application number is 202011099350.X, and the invention title is "a data transmission method, data transmission system, equipment, and storage medium". The entire content is incorporated into this application by reference.
技术领域Technical field
本申请属于数据处理域,具体涉及一种数据传输方法、数据传输系统、设备及存储介质。This application belongs to the field of data processing, and specifically relates to a data transmission method, data transmission system, equipment, and storage medium.
背景技术Background technique
随着大数据时代和5G通信时代的到来,生产和生活中各领域产生的数据量呈指数级别增长。在大容量存储设备和技术的持续支持下,承载这些数据的文件容量也与日俱增,大容量数据文件传输逐渐成为各领域的刚需。在一些特定领域和特殊场景下,仍然不得不通过网络传输大容量数据文件。网络数据传输正是信息技术领域中极其重要的组成部分,然而目前的大数据处理技术大多偏向于移动计算而非数据传输,对于无法避免的大容量数据传输而言,尚未有高可用的稳定传输策略。With the advent of the era of big data and 5G communications, the amount of data generated in various fields of production and life has increased exponentially. With the continuous support of large-capacity storage devices and technologies, the file capacity of these data is also increasing day by day, and the transmission of large-capacity data files has gradually become a rigid demand in various fields. In some specific fields and special scenarios, large-capacity data files still have to be transmitted over the network. Network data transmission is an extremely important part of the field of information technology. However, most of the current big data processing technologies tend to be mobile computing rather than data transmission. For the unavoidable large-capacity data transmission, there is no high-availability and stable transmission. Strategy.
发明人意识到,大容量数据传输在高速稳定的网络场景下,例如同局域网或者同一个数据中心进行大容量数据传输时,传输速度和稳定性尚可,此种场景除耗时较长之外,发生传输失败等严重问题的可能性较小。然而,在一些传输带宽比较窄或者带宽不稳定的场景下,例如跨局域网或不同数据中心进行大容量数据传输,若不采用特别处理的技术方案和传输策略,大概率会因为传输中断或者耗费时间太长超时而导致最终无法完成传输。The inventor realizes that the transmission speed and stability of large-capacity data transmission in high-speed and stable network scenarios, such as the same local area network or the same data center, are acceptable. In addition to taking a long time, such scenarios , The possibility of serious problems such as transmission failure is small. However, in some scenarios where the transmission bandwidth is relatively narrow or the bandwidth is unstable, such as large-capacity data transmission across LANs or different data centers, if special technical solutions and transmission strategies are not used, there is a high probability that transmission will be interrupted or time-consuming. The timeout is too long and the transfer cannot be completed eventually.
针对这种情况,目前已有的技术方案大多都是采用基于断点续传的分片传输策略,即将大容量数据文件进行分片,在某个分片传输失败时,从断点处重新发起该分片的传输,从而避免重新传输整个文件。这种单纯使用分片传输的方式,虽然能够完成传输,却无法有效地利用网络带宽,特别是在一些带宽不稳定的情况下,现有的分片传输方法无法最大限度地利用网络带宽,导致传输时的时间损耗过多,带宽利用率低下。In view of this situation, most of the existing technical solutions currently adopt a fragmented transmission strategy based on resumable transmission, that is, large-capacity data files are fragmented, and when a fragmented transmission fails, restart from the breakpoint. The transmission of the fragments, thereby avoiding retransmission of the entire file. This method of purely using fragmented transmission, although it can complete the transmission, cannot effectively use the network bandwidth, especially in some cases where the bandwidth is unstable, the existing fragmented transmission method cannot make the most of the network bandwidth, resulting in Excessive time loss during transmission and low bandwidth utilization.
发明内容Summary of the invention
本申请第一方面实施例提出了一种数据传输方法,包括:The embodiment of the first aspect of the present application proposes a data transmission method, including:
查询历史传输记录,获取历史传输参数;Query historical transmission records and obtain historical transmission parameters;
根据所述历史传输参数,确定当前传输参数;Determine current transmission parameters according to the historical transmission parameters;
根据所述当前传输参数,对待传输数据进行初始分片后传输;According to the current transmission parameters, the data to be transmitted is transmitted after initial fragmentation;
判断当前传输状态是否正常;Determine whether the current transmission status is normal;
若正常,则按照第一预设规则调整当前传输参数,根据调整后的当前传输参数,对剩余的所述待传输数据进行二次分片后传输。If it is normal, the current transmission parameters are adjusted according to the first preset rule, and the remaining data to be transmitted is transmitted after being fragmented twice according to the adjusted current transmission parameters.
本申请第二方面的实施例提供了一种数据传输系统,包括:The embodiment of the second aspect of the present application provides a data transmission system, including:
查询模块,用于查询历史传输记录,获取历史传输参数;The query module is used to query historical transmission records and obtain historical transmission parameters;
判断计算模块,用于根据所述历史传输参数,确定当前传输参数;判断当前传输状态是否正常,若正常,则按照第一预设规则调整当前传输参数;The judgment calculation module is configured to determine the current transmission parameters according to the historical transmission parameters; determine whether the current transmission status is normal, and if it is normal, adjust the current transmission parameters according to the first preset rule;
传输模块,用于根据所述当前传输参数,对待传输数据进行初始分片后传输;根据调整后的当前传输参数,对剩余的所述待传输数据进行二次分片后传输。The transmission module is configured to perform initial fragmentation and transmission of the data to be transmitted according to the current transmission parameters; and perform second fragmentation and transmission of the remaining data to be transmitted according to the adjusted current transmission parameters.
本申请第三方面的实施例提供了一种计算机设备,包括存储器和处理器,所述存储器 中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行下述第一方面所述的数据传输方法的步骤:The embodiment of the third aspect of the present application provides a computer device, including a memory and a processor, and computer-readable instructions are stored in the memory. When the computer-readable instructions are executed by the processor, the processing The device executes the following steps of the data transmission method described in the first aspect:
查询历史传输记录,获取历史传输参数;Query historical transmission records and obtain historical transmission parameters;
根据所述历史传输参数,确定当前传输参数;Determine current transmission parameters according to the historical transmission parameters;
根据所述当前传输参数,对待传输数据进行初始分片后传输;According to the current transmission parameters, the data to be transmitted is transmitted after initial fragmentation;
判断当前传输状态是否正常;Determine whether the current transmission status is normal;
若正常,则按照第一预设规则调整当前传输参数,根据调整后的当前传输参数,对剩余的所述待传输数据进行二次分片后传输。If it is normal, the current transmission parameters are adjusted according to the first preset rule, and the remaining data to be transmitted is transmitted after being fragmented twice according to the adjusted current transmission parameters.
本申请第四方面的实施例提供了一种存储有计算机可读指令的存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行下述第一方面所述的数据传输方法的步骤:The embodiment of the fourth aspect of the present application provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the following first The steps of the data transmission method described in the aspect:
查询历史传输记录,获取历史传输参数;Query historical transmission records and obtain historical transmission parameters;
根据所述历史传输参数,确定当前传输参数;Determine current transmission parameters according to the historical transmission parameters;
根据所述当前传输参数,对待传输数据进行初始分片后传输;According to the current transmission parameters, the data to be transmitted is transmitted after initial fragmentation;
判断当前传输状态是否正常;Determine whether the current transmission status is normal;
若正常,则按照第一预设规则调整当前传输参数,根据调整后的当前传输参数,对剩余的所述待传输数据进行二次分片后传输。If it is normal, the current transmission parameters are adjusted according to the first preset rule, and the remaining data to be transmitted is transmitted after being fragmented twice according to the adjusted current transmission parameters.
附图说明Description of the drawings
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本申请的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:By reading the detailed description of the preferred embodiments below, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only used for the purpose of illustrating the preferred embodiments, and are not considered as a limitation to the application. Also, throughout the drawings, the same reference symbols are used to denote the same components. In the attached picture:
图1示出了本申请一实施例所提供的一种数据传输方法的步骤示意图;FIG. 1 shows a schematic diagram of the steps of a data transmission method provided by an embodiment of the present application;
图2示出了本申请一实施例所提供的一种数据传输方法的流程示意图;FIG. 2 shows a schematic flowchart of a data transmission method provided by an embodiment of the present application;
图3示出了本申请一实施例所提供的一种数据传输系统的结构示意图;FIG. 3 shows a schematic structural diagram of a data transmission system provided by an embodiment of the present application;
图4示出了本申请一实施例所提供的一种计算机设备的结构示意图;FIG. 4 shows a schematic structural diagram of a computer device provided by an embodiment of the present application;
图5示出了本申请一实施例所提供的一种存储介质的示意图。FIG. 5 shows a schematic diagram of a storage medium provided by an embodiment of the present application.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions, and advantages of this application clearer and clearer, the following further describes the application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, and are not used to limit the present application.
可以理解,本申请所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。It can be understood that the terms "first", "second", etc. used in this application can be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from another element.
在一个实施例中,提出了一种数据传输方法,该方法能够通过历史传输参数确定当前传输参数,再根据当前传输参数对待传输数据进行分片后传输,从而能够避免传统的朴素分片方式由于不考虑当前带宽的情况直接分片,导致的过多的分片传输请求尝试而增加的时间损耗;通过实时判断当前传输状态,动态调整当前传输参数和分片大小,从而最大限度地利用网络带宽,减少传输时间,提升传输效率,提高带宽利用率,减少传输延迟。In one embodiment, a data transmission method is proposed, which can determine the current transmission parameters based on historical transmission parameters, and then perform fragmentation and transmission of the data to be transmitted according to the current transmission parameters, thereby avoiding the traditional simple fragmentation method. Direct fragmentation regardless of the current bandwidth, resulting in excessive fragmentation transmission request attempts and increased time loss; by judging the current transmission status in real time, dynamically adjusting the current transmission parameters and fragment size, so as to maximize the use of network bandwidth , Reduce transmission time, improve transmission efficiency, increase bandwidth utilization, and reduce transmission delay.
通过图1所示的操作过程进行数据传输,具体包括以下步骤:Data transmission through the operation process shown in Figure 1 specifically includes the following steps:
步骤101,查询历史传输记录,获取历史传输参数。Step 101: Query historical transmission records and obtain historical transmission parameters.
如图2所示,当客户端准备跨局域网或跨数据中心进行大容量数据文件的传输时,客户端需要先发起大容量数据文件传输请求,对客户端中的数据库进行查询,从之前进行数据传输时保存的历史传输记录中获取与文件接收端(接收文件的服务端)对应的历史传输参数。历史传输参数即为在此之前,准备发大容量数据文件传输的客户端与将要接收文件 的服务端之间,进行大容量数据文件传输时的历史传输参数,包括分片大小、传输线程数、响应时间和重试次数等与数据传输以及带宽相关的参数。As shown in Figure 2, when the client is preparing to transfer large-capacity data files across a local area network or across data centers, the client needs to initiate a large-capacity data file transfer request first, query the database in the client, and perform data from the previous The historical transmission parameters corresponding to the file receiving end (the server receiving the file) are obtained from the historical transmission record saved during transmission. The historical transmission parameters are the historical transmission parameters of the large-capacity data file transmission between the client that is going to send the large-capacity data file transmission and the server that will receive the file before this, including the fragment size, the number of transmission threads, Parameters related to data transmission and bandwidth, such as response time and number of retries.
步骤102,根据历史传输参数,确定当前传输参数。Step 102: Determine current transmission parameters according to historical transmission parameters.
从历史传输参数中,获取一组或多组历史参数向量,其中,历史参数向量为数据库内不同时间段的相关历史参数组成的向量。参数向量包括:分片大小、传输线程数、响应时间和重试次数等与数据传输以及带宽相关的参数。根据获取的一组或多组历史参数向量,使用加权平均平滑公式,计算当前传输参数。加权平均平滑公式为:From the historical transmission parameters, one or more sets of historical parameter vectors are obtained, where the historical parameter vectors are vectors composed of related historical parameters in different time periods in the database. The parameter vector includes parameters related to data transmission and bandwidth, such as the size of the fragment, the number of transmission threads, the response time, and the number of retries. According to the obtained one or more sets of historical parameter vectors, the weighted average smoothing formula is used to calculate the current transmission parameters. The weighted average smoothing formula is:
Figure PCTCN2020135265-appb-000001
Figure PCTCN2020135265-appb-000001
其中,
Figure PCTCN2020135265-appb-000002
为当前传输参数,i为历史参数向量的组数,
Figure PCTCN2020135265-appb-000003
为历史参数向量,a i为加权分量,通常情况下,设置为时间越近,权值越高,n为正整数,t为时间,t 0为对应当前传输时间的查询时间段起始点,即为当前传输时间对应的一个传输时间段,传输时间段可以是30分钟、1小时或2小时等。T 0为查询时间段间隔周期,通常以24小时为一个间隔周期。假设客户端发起大容量数据文件传输请求的时间为2020年8月18日13时35分,以1小时为传输时间段,则对应当前传输时间(2020年8月18日13时35分)的查询时间段起始点为13时0分,查询时间段结束点为14时0分。即,查询今天(18日)13时0分至14时0分、昨天(17日)13时0分至14时0分、前天(16日)13时0分至14时0分以及再之前的日期的13时0分至14时0分的历史传输参数,从这些历史传输参数中获取一组或多组包括分片大小、传输线程数、响应时间和重试次数的历史参数向量。假设只获取到了17日和16日的历史参数向量,即历史参数向量的组数为2,由于历史参数向量
Figure PCTCN2020135265-appb-000004
中包括分片大小Mt、线程数Pt、响应时间Rt和重试次数Ct,因此使用加权平均平滑公式和17日以及16日的历史参数向量中的分片大小Mt、线程数Pt、响应时间Rt和重试次数Ct,确定前传输参数中的分片大小m、线程数p、响应时间r和重试次数c。
in,
Figure PCTCN2020135265-appb-000002
Is the current transmission parameter, i is the group number of the historical parameter vector,
Figure PCTCN2020135265-appb-000003
Is the historical parameter vector, a i is the weighted component, usually, the closer the time is, the higher the weight is, n is a positive integer, t is the time, and t 0 is the starting point of the query period corresponding to the current transmission time, namely It is a transmission time period corresponding to the current transmission time. The transmission time period can be 30 minutes, 1 hour, or 2 hours. T 0 is the interval period of the query time period, usually 24 hours as an interval period. Assuming that the time when the client initiates a large-capacity data file transfer request is at 13:35 on August 18, 2020, with 1 hour as the transmission time period, it corresponds to the current transmission time (13:35 on August 18, 2020) The start point of the query time period is 13:00, and the end point of the query time period is 14:0. That is, query today (18th) 13:00 to 14:00, yesterday (17th) 13:00 to 14:00, the day before yesterday (16th) 13:00 to 14:00 and before From 13:0 to 14:0 of the date of the historical transmission parameters, one or more sets of historical parameter vectors including the fragment size, the number of transmission threads, the response time, and the number of retries are obtained from these historical transmission parameters. Suppose that only the historical parameter vectors of the 17th and 16th are obtained, that is, the number of groups of the historical parameter vector is 2, because the historical parameter vector
Figure PCTCN2020135265-appb-000004
Including the shard size Mt, the number of threads Pt, the response time Rt and the number of retries Ct, so the weighted average smoothing formula is used and the shard size Mt, the number of threads Pt, and the response time Rt in the historical parameter vector on the 17th and 16th And the number of retries Ct, determine the fragment size m, the number of threads p, the response time r, and the number of retries c in the previous transmission parameters.
以分片大小m为例,
Figure PCTCN2020135265-appb-000005
其中,
Figure PCTCN2020135265-appb-000006
为历史参数向量中的17日的分片大小,
Figure PCTCN2020135265-appb-000007
为历史参数向量中的16日的分片大小,a 1的值大于a 2的值。
Take the fragment size m as an example,
Figure PCTCN2020135265-appb-000005
in,
Figure PCTCN2020135265-appb-000006
Is the 17-day slice size in the historical parameter vector,
Figure PCTCN2020135265-appb-000007
Is the 16-day slice size in the historical parameter vector, and the value of a 1 is greater than the value of a 2 .
以线程数p为例,
Figure PCTCN2020135265-appb-000008
其中,
Figure PCTCN2020135265-appb-000009
为历史参数向量中的17日的线程数,
Figure PCTCN2020135265-appb-000010
为历史参数向量中的16日的线程数,a 1的值大于a 2的值。
Take the number of threads p as an example,
Figure PCTCN2020135265-appb-000008
in,
Figure PCTCN2020135265-appb-000009
Is the number of threads on the 17th in the historical parameter vector,
Figure PCTCN2020135265-appb-000010
Is the number of threads on the 16th in the historical parameter vector, and the value of a 1 is greater than the value of a 2 .
以响应时间r为例,
Figure PCTCN2020135265-appb-000011
其中,
Figure PCTCN2020135265-appb-000012
为历史参数向量中的17日的响应时间,
Figure PCTCN2020135265-appb-000013
为历史参数向量中的16日的响应时间,a 1的值大于a 2的值。
Take the response time r as an example,
Figure PCTCN2020135265-appb-000011
in,
Figure PCTCN2020135265-appb-000012
Is the response time of 17 days in the historical parameter vector,
Figure PCTCN2020135265-appb-000013
Is the 16-day response time in the historical parameter vector, and the value of a 1 is greater than the value of a 2 .
重试次数c为例,
Figure PCTCN2020135265-appb-000014
其中,
Figure PCTCN2020135265-appb-000015
为历史参数向量中的17日的重试次数,
Figure PCTCN2020135265-appb-000016
为历史参数向量中的16日的重试次数,a 1的值大于a 2的值。
Take the number of retries c as an example,
Figure PCTCN2020135265-appb-000014
in,
Figure PCTCN2020135265-appb-000015
Is the number of retries on the 17th day in the historical parameter vector,
Figure PCTCN2020135265-appb-000016
Is the number of retries for 16 days in the historical parameter vector, and the value of a 1 is greater than the value of a 2 .
其他与数据传输以及带宽相关的参数也可以通过上述公式进行计算得到。Other parameters related to data transmission and bandwidth can also be calculated by the above formula.
步骤103,根据当前传输参数,对待传输数据进行初始分片后传输。Step 103: According to the current transmission parameters, the data to be transmitted is transmitted after initial fragmentation.
根据客户端之前计算得到的分片大小m,对待传输的大容量数据文件进行分片,得到分片数据,根据之前计算得到的线程数p、响应时间r和重试次数c对传输参数进行设置, 以传输大容量数据文件的分片数据至服务端。其中,在判断当前传输状态之前,对待传输数据进行的分片,为初始分片。According to the fragment size m previously calculated by the client, the large-capacity data file to be transmitted is fragmented to obtain fragmented data, and the transmission parameters are set according to the number of threads p, response time r, and number of retries c calculated before , To transmit the fragmented data of large-capacity data files to the server. Among them, before judging the current transmission status, the fragmentation of the data to be transmitted is the initial fragmentation.
若在历史传输记录中未查询到与当前传输时间对应的历史传输参数,则使用预设传输参数直接作为当前传输参数。即客户端无法从历史传输记录中获取与接收文件的服务端对应的历史传输参数,则使用预设值好的传输参数,对待传输的大容量数据文件进行分片,对传输参数进行设置,传输大容量数据文件的分片至服务端。If the historical transmission parameter corresponding to the current transmission time is not found in the historical transmission record, the preset transmission parameter is used directly as the current transmission parameter. That is, the client cannot obtain the historical transmission parameters corresponding to the server receiving the file from the historical transmission records, and uses the transmission parameters with the preset values to fragment the large-capacity data file to be transmitted, set the transmission parameters, and transmit Fragmentation of large-capacity data files to the server.
步骤104,判断当前传输状态是否正常。Step 104: Determine whether the current transmission status is normal.
判断待传输数据的分片数据在传输过程中,是否出现超时错误的异常情况。具体地,判断传输数据的分片传输是否正常,是否出现超时的异常情况。其中,超时的异常情况包括:是否出现超时错误,是否超过重试次数,是否超过响应时间等。Determine whether there is an abnormal situation of timeout error during the transmission of the fragmented data of the data to be transmitted. Specifically, it is determined whether the fragmented transmission of the transmitted data is normal, and whether an abnormal situation of timeout occurs. Among them, the abnormal conditions of timeout include: whether a timeout error occurs, whether the number of retries has been exceeded, whether the response time has been exceeded, etc.
步骤105,若正常,则按照第一预设规则调整当前传输参数,根据按照第一预设规则调整后的当前传输参数,对剩余的待传输数据进行二次分片后传输。按照第一预设规则增加当前传输参数中的分片大小和传输线程数,以增加的分片大小和传输线程数为当前传输参数,对剩余的所述待传输数据进行二次分片后传输。其中,根据调整后的当前传输参数,对剩余的待传输数据进行分片,为二次分片。Step 105: If it is normal, adjust the current transmission parameters according to the first preset rule, and perform the second fragmentation and transmission of the remaining data to be transmitted according to the current transmission parameters adjusted according to the first preset rule. Increase the fragment size and the number of transmission threads in the current transmission parameters according to the first preset rule, and use the increased fragment size and the number of transmission threads as the current transmission parameters, and perform second fragmentation and transmission of the remaining data to be transmitted . Among them, the remaining data to be transmitted is fragmented according to the adjusted current transmission parameters, which is the second fragmentation.
其中,在根据调整后的当前传输参数,对剩余的所述待传输数据进行二次分片后传输之后,继续次执行步骤104的判断,根据传输状态是否正常再选择是否执行步骤105,如此循环。Wherein, after the remaining data to be transmitted is fragmented and transmitted for the second time according to the adjusted current transmission parameters, the judgment of step 104 is continued again, and step 105 is selected again according to whether the transmission status is normal, and so on. .
具体地,按照第一预设规则增加当前传输参数中的分片大小和传输线程数,包括:若传输状态正常,没有出现超时的异常情况,即,没有出现超时错误,没有超过重试次数也没有超过响应时间等参数,则按照第一预设规则中预设置的增量比率和增量值调整当前传输参数。也可以只以没有出现超时错误、超过重试次数、超过响应时间或其他情况中的一项作为状态正常的判断标准。Specifically, increase the fragment size and the number of transmission threads in the current transmission parameters according to the first preset rule, including: if the transmission status is normal, no timeout abnormality occurs, that is, no timeout error occurs, and the number of retries is not exceeded. If the response time and other parameters are not exceeded, the current transmission parameters are adjusted according to the increment ratio and increment value preset in the first preset rule. It is also possible to use only one of no timeout error, exceeding the number of retries, exceeding the response time, or other conditions as the criterion for judging that the state is normal.
在增加当前传输参数中的分片大小和传输线程数之外,还包括调整(如增加或减小)响应时间和重试次数。响应时间和重试次数是否调整,以及是增加还是减小,可以根据需要具体设置。In addition to increasing the fragment size and the number of transmission threads in the current transmission parameters, it also includes adjusting (such as increasing or decreasing) the response time and the number of retries. Whether the response time and the number of retries are adjusted, and whether to increase or decrease, can be specifically set as required.
以对分片大小、响应时间和重试次数均进行增加的调整为例。Take, for example, the adjustment of increasing fragment size, response time, and number of retries.
分片大小、响应时间和重试次数的增量比率可以为5%、10%、15%以及20%等,也可以对分片大小、响应时间和重试次数分别设置对应的增量比率。以分片大小、响应时间和重试次数的增量比率均为10%为例,则分片大小m经过调整后,为(1+0.1)m,响应时间r经过调整后,为(1+0.1)r,重试次数c经过调整后,为(1+0.1)c。线程数、响应时间和重试次数的增量值可以按照固定数值增加。假设线程数的增量值为1,响应时间的增量值为5毫秒(ms),重试次数的增量值为5,则调整后的线程数为p+1,响应时间为r+5毫秒,重试次数为c+5。The increment ratios of the fragment size, response time, and the number of retries can be 5%, 10%, 15%, 20%, etc., and corresponding increment ratios can also be set for the fragment size, response time, and number of retries. Taking the increment ratio of the fragment size, response time and the number of retries as an example, the fragment size m is adjusted to (1+0.1)m, and the response time r is adjusted to (1+ 0.1)r, the number of retries c is adjusted to (1+0.1)c. The incremental value of the number of threads, response time, and number of retries can be increased by a fixed value. Assuming that the increment value of the number of threads is 1, the increment value of the response time is 5 milliseconds (ms), and the increment value of the number of retries is 5, the adjusted number of threads is p+1, and the response time is r+5 Milliseconds, the number of retries is c+5.
根据进行增量调整后的当前传输参数对还没传输完的剩下的待传输数据进行对应的分片和发送。对分片进行发送时,其当前传输参数为调整后当前传输参数。即,使用调整后的线程数为p+1,响应时间为r+5毫秒,重试次数为c+5的传输参数传输分片大小为(1+0.1)m的分片。According to the current transmission parameters after incremental adjustment, the remaining data to be transmitted that has not yet been transmitted are fragmented and sent correspondingly. When the segment is sent, its current transmission parameter is the current transmission parameter after adjustment. That is, use the adjusted number of threads to be p+1, the response time to be r+5 milliseconds, and the number of retries to be c+5 to transmit a fragment with a fragment size of (1+0.1)m.
在进行增量(增加当前传输参数中的分片大小和传输线程数)之后,还继续判断当前传输状态是否正常。若传输状态正常,则继续按照第一预设规则,增加当前传输参数中的分片大小、传输线程数、响应时间和重试次数,根据增量调整后的分片大小、传输线程数、响应时间和重试次数,对还没传输完的剩余的待传输数据进行对应的二次分片和传输。若直至数据传输完成,均未出现不正常的传输状态,则保存数据传输完成时的当前传输参数。若出现了不正常的传输状态,则保存当前传输参数至历史传输记录,使用当前传输参数继续传输剩余的待传输数据,或对当前传输参数进行减量调整后,保存进行减量调整后的当 前传输参数,并使用进行减量调整后的当前传输参数对剩余的待传输数据进行二次分片和传输。After incrementing (increasing the fragment size and the number of transmission threads in the current transmission parameters), it continues to determine whether the current transmission status is normal. If the transmission status is normal, continue to increase the segment size, number of transmission threads, response time, and number of retries in the current transmission parameters according to the first preset rule, and adjust the segment size, number of transmission threads, and response according to the increment. Time and the number of retries, and perform corresponding secondary fragmentation and transmission of the remaining data to be transmitted that has not yet been transmitted. If there is no abnormal transmission state until the data transmission is completed, the current transmission parameters when the data transmission is completed are saved. If there is an abnormal transmission status, save the current transmission parameters to the historical transmission record, use the current transmission parameters to continue to transmit the remaining data to be transmitted, or after decrementing the current transmission parameters, save the current decrement adjustment Transmission parameters, and use the current transmission parameters after decrement adjustment to perform secondary segmentation and transmission of the remaining data to be transmitted.
在步骤104,判断当前传输状态是否正常之后,还包括:In step 104, after judging whether the current transmission status is normal, the method further includes:
若异常,则保存当前传输参数至历史传输记录,使用当前传输参数继续传输剩余的待传输数据。If it is abnormal, save the current transmission parameters to the historical transmission record, and use the current transmission parameters to continue to transmit the remaining data to be transmitted.
上述步骤即在根据传输数据的分片传输是否正常,是否出现超时错误,是否超过重试次数,是否超过响应时间等判断传输状态是否正常,之后,若传输状态不正常,即超时错误、重试次数以及响应时间等参数若均出现和超过,或其中之一出现或超过(即判断传输数据的分片传输是否正常,也可以只以出现超时错误、超过重试次数、超过响应时间或其他情况中的一项作为状态不正常的判断标准),则继续使用当前传输参数传输分片数据,不再进行调整,直至传输完成,并保存当前传输参数。The above steps are to determine whether the transmission status is normal according to whether the transmission of the transmitted data fragments is normal, whether there is a timeout error, whether the number of retries is exceeded, whether the response time is exceeded, etc., to determine whether the transmission status is normal. If the parameters such as the number of times and response time appear and exceed, or one of them appears or exceeds (that is, to determine whether the fragmented transmission of the transmitted data is normal, it can also only be caused by a timeout error, exceeding the number of retries, exceeding the response time, or other conditions If one of the items is used as the criterion for abnormal status), then continue to use the current transmission parameters to transmit the fragmented data, and no further adjustments are made until the transmission is completed, and the current transmission parameters are saved.
若出现异常情况,也可以选择下述两种减量方法之一,进行后续传输,以及对调整后的参数进行保存。两种减量方法包括:使用最近一次进行当前参数调整之前的当前传输参数作为调整后的当前传输参数,或调整当前传输参数,减少当前传输参数中的分片大小和传输线程数作为调整后的当前传输参数。响应时间和重试次数是否调整,以及是增加还是减小,可以根据需要具体设置。If an abnormal situation occurs, you can also choose one of the following two decrement methods for subsequent transmission and save the adjusted parameters. Two reduction methods include: using the current transmission parameters before the last current parameter adjustment as the adjusted current transmission parameters, or adjusting the current transmission parameters, reducing the fragment size and the number of transmission threads in the current transmission parameters as the adjusted current transmission parameters Current transmission parameters. Whether the response time and the number of retries are adjusted, and whether to increase or decrease, can be specifically set as required.
其中,使用最近一次进行当前参数调整之前的当前传输参数作为调整后的当前传输参数,表示,如果当前传输参数为调整后的传输参数,则使用在当前传输参数调整之前的传输参数作为调整后的当前传输参数,进行数据传输。即,假设当前传输参数为:分片大小为(1+0.1)m,响应时间为(1+0.1)r,重试次数c为(1+0.1)c,线程数为p+1;则在当前传输参数调整之前的传输参数为:分片大小为m,响应时间为r,重试次数为c,线程数为p;使用这些参数作为调整后的传输参数,传输数据,并保存这些参数,之后不再调整,直至数据传输完成。Among them, use the current transmission parameters before the last adjustment of the current parameters as the adjusted current transmission parameters, which means that if the current transmission parameters are adjusted transmission parameters, use the transmission parameters before the current transmission parameter adjustments as the adjusted current transmission parameters. Current transmission parameters, data transmission. That is, assuming that the current transmission parameters are: the fragment size is (1+0.1)m, the response time is (1+0.1)r, the number of retries c is (1+0.1)c, and the number of threads is p+1; The transmission parameters before the adjustment of the current transmission parameters are: the fragment size is m, the response time is r, the number of retries is c, and the number of threads is p; use these parameters as the adjusted transmission parameters, transmit data, and save these parameters, No further adjustments will be made afterwards until the data transfer is complete.
调整当前传输参数,减少当前传输参数中的分片大小和传输线程数作为调整后的当前传输参数,表示,根据预设置的减量比率和减量值,对当前传输参数进行调整,减小分片大小、减少响应时间、重试次数和线程数。减量比率可以是5%、10%、15%以及20%等。减量值可以是对应减少响应时间、重试次数和线程数的固定值。对当前传输参数进行减量调整后,使用并保存减量调整后的当前传输参数传输数据,之后不再调整,直至数据传输完成。Adjust the current transmission parameters, reduce the fragment size and the number of transmission threads in the current transmission parameters as the adjusted current transmission parameters, which means that according to the preset decrement ratio and decrement value, adjust the current transmission parameters to reduce the score Chip size, reduced response time, number of retries, and number of threads. The reduction ratio can be 5%, 10%, 15%, 20%, and so on. The decrement value can be a fixed value corresponding to the reduction in response time, the number of retries, and the number of threads. After decrementing the current transmission parameters, use and save the decremented current transmission parameters to transmit data, and then do not adjust until the data transmission is completed.
在根据上述两种减量方法进行调整后,保存调整后的当前传输参数至客户端的历史传输记录,用于之后的数据传输,并且不再对当前传输参数进行调整。保存的调整后的当前传输参数已经未调整的当前传输参数均与传输时间段对应。After the adjustments are made according to the above two reduction methods, the historical transmission records of the adjusted current transmission parameters are saved to the client for subsequent data transmission, and the current transmission parameters are no longer adjusted. The saved adjusted current transmission parameters and the current transmission parameters that have not been adjusted all correspond to the transmission time period.
即,在传输状态不正常的时候,一共有三种可选方法。That is, when the transmission status is abnormal, there are three alternative methods.
根据进行减量调整后的当前传输参数对还没传输完的剩余的待传输数据进行对应的二次分片后传输。根据选择的上述三种方法之一,对分片进行发送时,其当前传输参数为调整后当前传输参数或不进行调整的当前传输参数。According to the current transmission parameters after the decrement adjustment, the remaining to-be-transmitted data that has not yet been transmitted is subjected to corresponding secondary fragmentation and transmission. According to one of the above three methods selected, when the segment is sent, its current transmission parameter is the current transmission parameter after adjustment or the current transmission parameter without adjustment.
本申请实施例利用传输网络的时段性特征,根据传输网络的普适性特征,通过历史传输参数,确定当前传输参数,再根据当前传输参数对待传输数据进行分片后传输,从而能够避免传统的朴素分片方式由于不考虑当前带宽的情况直接分片,导致的过多的分片传输请求尝试而增加的时间损耗,弥补了现有分片传输方案传输效率低下、带宽利用率低下的不足;通过判断当前传输状态,对网络实时参数的量化分析最优化分片传输策略,动态调整当前传输参数和分片大小,在跨局域网或跨数据中心的大容量数据传输场景下,能够最大限度地利用网络带宽,从而减少传输时间,提升传输效率,提高带宽利用率,减少传输延迟,使分片传输策略、网络传输效率和带宽利用率达到最优,从而提升传输方案鲁棒性,保证连接高可用,并且在跨局域网或跨数据中心的大容量数据传输场景下,具有传输网络 的普适性特征。The embodiment of the application utilizes the time period characteristics of the transmission network, determines the current transmission parameters through historical transmission parameters according to the universal characteristics of the transmission network, and then transmits the data to be transmitted in fragments according to the current transmission parameters, thereby avoiding the traditional The naive fragmentation method directly fragments without considering the current bandwidth, resulting in excessive fragmentation transmission request attempts and increased time loss, which makes up for the low transmission efficiency and bandwidth utilization of the existing fragmentation transmission scheme; By judging the current transmission status, quantifying and analyzing the real-time parameters of the network, optimizing the fragmentation transmission strategy, dynamically adjusting the current transmission parameters and fragment size, and making maximum use in the large-capacity data transmission scenario across the local area network or across the data center Network bandwidth, thereby reducing transmission time, improving transmission efficiency, increasing bandwidth utilization, reducing transmission delay, and optimizing fragmentation transmission strategy, network transmission efficiency and bandwidth utilization, thereby improving the robustness of the transmission scheme and ensuring high connection availability , And has the universal characteristics of transmission network in the scene of large-capacity data transmission across local area networks or across data centers.
大多数传输网络都有潮汐性的特点,即在固定的时间段有相似的周期性传输性能。其原因在于网络负载和使用者的作息以及使用习惯有很大的相关性。比如跨洋网络通常在中午十二点左右达到传输的峰值。针对这一网络特征,利用同一时段网络参数的历史传输参数优化分片传输过程中的策略,一方面能提高传输成功率,另外一方面提高网络传输的效率。Most transmission networks have tidal characteristics, that is, have similar periodic transmission performance in a fixed time period. The reason is that the network load has a great correlation with the user's work and rest and usage habits. For example, transoceanic networks usually reach the peak of transmission around 12 noon. Aiming at this network feature, using the historical transmission parameters of the same period of time to optimize the strategy in the fragmented transmission process can improve the transmission success rate on the one hand, and improve the efficiency of network transmission on the other hand.
基于历史传输记录中的历史传输参数,在传输大容量数据文件时,利用网络传输时段性的特征对大容量数据文件进行动态的实时智能分片传输,有效利用网络带宽。通过记录并读取当前时间段的历史传输记录,最优化当前时间段的分片传输策略。同时,小幅度调整当前传输参数,直到出错重试率上升,从而在最优传输策略(参数)的基础上进一步优化分片策略。通过最优化分片传输策略,不仅提高了大容量数据文件的传输成功率,而且提升了网络的传输效率。Based on the historical transmission parameters in the historical transmission records, when large-capacity data files are transmitted, the periodical characteristics of network transmission are used to perform dynamic and real-time intelligent fragmentation transmission of large-capacity data files, effectively using network bandwidth. By recording and reading the historical transmission records of the current time period, the fragmented transmission strategy of the current time period is optimized. At the same time, the current transmission parameters are adjusted in a small range until the error retry rate increases, thereby further optimizing the fragmentation strategy on the basis of the optimal transmission strategy (parameter). By optimizing the fragmented transmission strategy, not only the transmission success rate of large-capacity data files is improved, but also the transmission efficiency of the network is improved.
如图3所示,在一个实施例中,提供了一种数据传输系统,包括:As shown in FIG. 3, in one embodiment, a data transmission system is provided, including:
查询模块301,用于查询历史传输记录,获取历史传输参数;The query module 301 is used to query historical transmission records and obtain historical transmission parameters;
判断计算模块302,用于根据历史传输参数,确定当前传输参数;判断当前传输状态是否正常,若正常,则按照第一预设规则调整当前传输参数;The judgment calculation module 302 is configured to determine the current transmission parameters based on the historical transmission parameters; determine whether the current transmission status is normal, and if it is normal, adjust the current transmission parameters according to the first preset rule;
传输模块303,用于根据当前传输参数,对待传输数据进行初始分片后传输;根据调整后的当前传输参数,对剩余的待传输数据进行二次分片后传输。The transmission module 303 is configured to perform initial fragmentation and transmission of the data to be transmitted according to the current transmission parameters; and perform second fragmentation and transmission of the remaining data to be transmitted according to the adjusted current transmission parameters.
查询模块301包括:The query module 301 includes:
数据查询单元,用于查询历史传输记录;Data query unit for querying historical transmission records;
数据提取单元,用于从历史传输记录中获取历史传输参数,将历史传输参数发送至判断计算模块302。The data extraction unit is configured to obtain historical transmission parameters from the historical transmission records, and send the historical transmission parameters to the judgment calculation module 302.
当数据传输系统(客户端)准备跨局域网或跨数据中心进行大容量数据文件的传输时,数据传输系统需要先通过数据查询单元对数据库进行查询,再通过数据提取单元从历史传输记录中获取与文件接收端(接收文件的服务端)对应的历史传输参数。历史传输参数即为在此之前,准备发大容量数据文件传输的数据传输系统与将要接收文件的服务端之间,进行大容量数据文件传输时的历史传输参数。When the data transmission system (client) is preparing to transmit large-capacity data files across the local area network or across the data center, the data transmission system needs to first query the database through the data query unit, and then obtain the data from the historical transmission record through the data extraction unit. The historical transmission parameters corresponding to the file receiving end (the server receiving the file). The historical transmission parameters are the historical transmission parameters for the large-capacity data file transmission between the data transmission system that is going to send the large-capacity data file transmission and the server that will receive the file before this.
判断计算模块302包括:The judgment calculation module 302 includes:
参数确定单元,用于根据历史传输参数,使用加权平均平滑公式,确定当前传输参数,将当前传输参数发送至传输模块303;The parameter determination unit is configured to determine the current transmission parameters using the weighted average smoothing formula according to the historical transmission parameters, and send the current transmission parameters to the transmission module 303;
状态判断单元,用于判断当前传输状态是否正常,将传输状态的判断结果发送至参数调整单元;The state judgment unit is used to judge whether the current transmission state is normal, and send the judgment result of the transmission state to the parameter adjustment unit;
参数调整单元,用于根据传输状态的判断结果,按照第一预设规则调整当前传输参数,将调整后的当前传输参数发送至传输模块303。The parameter adjustment unit is configured to adjust the current transmission parameters according to the first preset rule according to the judgment result of the transmission state, and send the adjusted current transmission parameters to the transmission module 303.
上述参数确定单元,具体地,从历史传输参数中,获取一组或多组历史参数向量,其中,参数向量包括:分片大小、传输线程数、响应时间和重试次数等与数据传输以及带宽相关的参数。根据获取的一组或多组历史参数向量,使用加权平均平滑公式,计算当前传输参数。加权平均平滑公式为:The above parameter determination unit specifically obtains one or more sets of historical parameter vectors from historical transmission parameters, where the parameter vectors include: fragment size, number of transmission threads, response time and number of retries, etc., as well as data transmission and bandwidth Related parameters. According to the obtained one or more sets of historical parameter vectors, the weighted average smoothing formula is used to calculate the current transmission parameters. The weighted average smoothing formula is:
Figure PCTCN2020135265-appb-000017
Figure PCTCN2020135265-appb-000017
其中,
Figure PCTCN2020135265-appb-000018
为当前传输参数,i为历史参数向量的组数,
Figure PCTCN2020135265-appb-000019
为历史参数向量,a i为加权分量,通常情况下,设置为时间越近,权值越高,n为正整数,t为时间,t 0为对应当前传输 时间的查询时间段起始点,即为当前传输时间对应的一个传输时间段,传输时间段可以是30分钟、1小时或2小时等。T 0为查询时间段间隔周期,通常以24小时为一个间隔周期。假设客户端发起大容量数据文件传输请求的时间为2020年8月18日13时35分,以1小时为传输时间段,则对应当前传输时间(2020年8月18日13时35分)的查询时间段起始点为13时0分,查询时间段结束点为14时0分。即,查询今天(18日)13时0分至14时0分、昨天(17日)13时0分至14时0分、前天(16日)13时0分至14时0分以及再之前的日期的13时0分至14时0分的历史传输参数,从这些历史传输参数中获取一组或多组包括分片大小、传输线程数、响应时间和重试次数的历史参数向量。假设只获取到了17日和16日的历史参数向量,即历史参数向量的组数为2,由于历史参数向量
Figure PCTCN2020135265-appb-000020
中包括分片大小Mt、线程数Pt、响应时间Rt和重试次数Ct,因此使用加权平均平滑公式和17日以及16日的历史参数向量中的分片大小Mt、线程数Pt、响应时间Rt和重试次数Ct,确定前传输参数中的分片大小m、线程数p、响应时间r和重试次数c。
in,
Figure PCTCN2020135265-appb-000018
Is the current transmission parameter, i is the group number of the historical parameter vector,
Figure PCTCN2020135265-appb-000019
Is the historical parameter vector, a i is the weighted component, usually, the closer the time is, the higher the weight is, n is a positive integer, t is the time, and t 0 is the starting point of the query period corresponding to the current transmission time, namely It is a transmission time period corresponding to the current transmission time. The transmission time period can be 30 minutes, 1 hour, or 2 hours. T 0 is the interval period of the query time period, usually 24 hours as an interval period. Assuming that the time when the client initiates a large-capacity data file transfer request is at 13:35 on August 18, 2020, with 1 hour as the transmission time period, it corresponds to the current transmission time (13:35 on August 18, 2020) The start point of the query time period is 13:0, and the end point of the query time period is 14:0. That is, query today (18th) 13:00 to 14:00, yesterday (17th) 13:00 to 14:00, the day before yesterday (16th) 13:00 to 14:00 and before From 13:0 to 14:0 of the date of the historical transmission parameters, one or more sets of historical parameter vectors including the fragment size, the number of transmission threads, the response time, and the number of retries are obtained from these historical transmission parameters. Suppose that only the historical parameter vectors of the 17th and 16th are obtained, that is, the number of groups of the historical parameter vector is 2, because the historical parameter vector
Figure PCTCN2020135265-appb-000020
Including the shard size Mt, the number of threads Pt, the response time Rt and the number of retries Ct, so the weighted average smoothing formula is used and the shard size Mt, the number of threads Pt, and the response time Rt in the historical parameter vector on the 17th and 16th And the number of retries Ct, determine the fragment size m, the number of threads p, the response time r, and the number of retries c in the previous transmission parameters.
以分片大小m为例,
Figure PCTCN2020135265-appb-000021
其中,
Figure PCTCN2020135265-appb-000022
为历史参数向量中的17日的分片大小,
Figure PCTCN2020135265-appb-000023
为历史参数向量中的16日的分片大小,a 1的值大于a 2的值。
Take the fragment size m as an example,
Figure PCTCN2020135265-appb-000021
in,
Figure PCTCN2020135265-appb-000022
Is the 17-day slice size in the historical parameter vector,
Figure PCTCN2020135265-appb-000023
Is the 16-day slice size in the historical parameter vector, and the value of a 1 is greater than the value of a 2 .
以线程数p为例,
Figure PCTCN2020135265-appb-000024
其中,
Figure PCTCN2020135265-appb-000025
为历史参数向量中的17日的线程数,
Figure PCTCN2020135265-appb-000026
为历史参数向量中的16日的线程数,a 1的值大于a 2的值。
Take the number of threads p as an example,
Figure PCTCN2020135265-appb-000024
in,
Figure PCTCN2020135265-appb-000025
Is the number of threads on the 17th in the historical parameter vector,
Figure PCTCN2020135265-appb-000026
Is the number of threads on the 16th in the historical parameter vector, and the value of a 1 is greater than the value of a 2 .
以响应时间r为例,
Figure PCTCN2020135265-appb-000027
其中,
Figure PCTCN2020135265-appb-000028
为历史参数向量中的17日的响应时间,
Figure PCTCN2020135265-appb-000029
为历史参数向量中的16日的响应时间,a 1的值大于a 2的值。
Take the response time r as an example,
Figure PCTCN2020135265-appb-000027
in,
Figure PCTCN2020135265-appb-000028
Is the response time of 17 days in the historical parameter vector,
Figure PCTCN2020135265-appb-000029
Is the 16-day response time in the historical parameter vector, and the value of a 1 is greater than the value of a 2 .
重试次数c为例,
Figure PCTCN2020135265-appb-000030
其中,
Figure PCTCN2020135265-appb-000031
为历史参数向量中的17日的重试次数,
Figure PCTCN2020135265-appb-000032
为历史参数向量中的16日的重试次数,a 1的值大于a 2的值。
Take the number of retries c as an example,
Figure PCTCN2020135265-appb-000030
in,
Figure PCTCN2020135265-appb-000031
Is the number of retries on the 17th day in the historical parameter vector,
Figure PCTCN2020135265-appb-000032
Is the number of retries for 16 days in the historical parameter vector, and the value of a 1 is greater than the value of a 2 .
其他与数据传输以及带宽相关的参数也可以通过上述公式进行计算得到。Other parameters related to data transmission and bandwidth can also be calculated by the above formula.
上述状态判断单元,具体地,通过判断当前传输状态是否正常,是否出现超时的异常情况。其中,超时的异常情况包括:是否出现超时错误,是否超过重试次数,是否超过响应时间等,确定当前传输状态是否正常。若没有出现超时错误,没有超过重试次数也没有超过响应时间等参数,则当前传输状态正常,将当前传输状态发送至参数调整单元;传输状态的判断也可以只以未出现超时错误、超过重试次数、超过响应时间或其他情况中的一项作为状态是正常的判断标准。若出现超时错误,超过重试次数并且超过响应时间等参数,则传输状态不正常,将传输状态发送至参数调整单元;传输状态的判断也可以只以出现超时错误、超过重试次数、超过响应时间或其他情况中的一项作为状态不正常的判断标准。The above-mentioned state judgment unit specifically judges whether the current transmission state is normal and whether an abnormal situation of timeout occurs. Among them, the abnormal conditions of timeout include: whether a timeout error occurs, whether the number of retries has been exceeded, whether the response time has been exceeded, etc., to determine whether the current transmission status is normal. If there is no timeout error, the number of retries and the response time are not exceeded, the current transmission status is normal, and the current transmission status is sent to the parameter adjustment unit; One of the number of attempts, exceeding the response time, or other conditions is the criterion for judging that the state is normal. If a timeout error occurs, the number of retries is exceeded, and the response time is exceeded, the transmission status is abnormal, and the transmission status is sent to the parameter adjustment unit; the transmission status can also be judged only by the occurrence of a timeout error, exceeding the number of retries, and exceeding the response One item of time or other conditions is used as a criterion for judging abnormal conditions.
上述参数调整单元,具体地,根据传输状态,对当前传输参数进行调整,将调整后的当前传输参数发送至传输模块303。判断当前传输状态是否正常,若正常,则按照第一预设规则调整当前传输参数。The above-mentioned parameter adjustment unit specifically adjusts the current transmission parameters according to the transmission status, and sends the adjusted current transmission parameters to the transmission module 303. Determine whether the current transmission status is normal, and if it is normal, adjust the current transmission parameters according to the first preset rule.
判断待传输数据的分片数据在传输过程中,是否出现超时错误的异常情况,若无(传输状态正常),则按照第一预设规则调整当前传输参数(对当前传输参数进行增量调整),增加当前传输参数中的分片大小和传输线程数。具体地,判断传输数据的分片传输是否正常,是否出现超时错误,是否超过重试次数,是否超过响应时间等,若传输状态正常,没有出现超时的异常情况,即,没有出现超时错误,没有超过重试次数也没有超过响应时间 等参数,则按照按照第一预设规则预设置的增量比率和增量值调整当前传输参数。也可以只以没有出现超时错误、超过重试次数、超过响应时间或其他情况中的一项作为状态正常的判断标准。分片大小、响应时间和重试次数的增量比率可以为5%、10%、15%以及20%等,也可以对分片大小、响应时间和重试次数分别设置对应的增量比率。以分片大小、响应时间和重试次数的增量比率均为10%为例,则分片大小m经过调整后,为(1+0.1)m,响应时间r经过调整后,为(1+0.1)r,重试次数c经过调整后,为(1+0.1)c。线程数、响应时间和重试次数的增量值可以按照固定数值增加。假设线程数的增量值为1,响应时间的增量值为5毫秒(ms),重试次数的增量值为5,则调整后的线程数为p+1,响应时间为r+5毫秒,重试次数为c+5。Determine whether there is an abnormal situation of timeout error during the transmission of the fragmented data of the data to be transmitted. If not (the transmission status is normal), adjust the current transmission parameters according to the first preset rule (incrementally adjust the current transmission parameters) , Increase the fragment size and the number of transmission threads in the current transmission parameters. Specifically, it is judged whether the fragmented transmission of the transmitted data is normal, whether a timeout error occurs, whether the number of retries is exceeded, whether the response time is exceeded, etc., if the transmission status is normal, no timeout abnormality occurs, that is, no timeout error occurs, no If the number of retries is exceeded and the response time and other parameters are not exceeded, the current transmission parameters are adjusted according to the increment ratio and increment value preset according to the first preset rule. It is also possible to use only one of no timeout error, exceeding the number of retries, exceeding the response time, or other conditions as the criterion for judging that the state is normal. The increment ratios of the fragment size, response time, and the number of retries can be 5%, 10%, 15%, 20%, etc., and corresponding increment ratios can also be set for the fragment size, response time, and number of retries. Taking the increment ratio of the fragment size, response time and the number of retries as an example, the fragment size m is adjusted to (1+0.1)m, and the response time r is adjusted to (1+ 0.1)r, the number of retries c is adjusted to (1+0.1)c. The incremental value of the number of threads, response time, and number of retries can be increased by a fixed value. Assuming that the increment value of the number of threads is 1, the increment value of the response time is 5 milliseconds (ms), and the increment value of the number of retries is 5, the adjusted number of threads is p+1, and the response time is r+5 Milliseconds, the number of retries is c+5.
在增加当前传输参数中的分片大小和传输线程数之外,还包括调整(如增加或减小)响应时间和重试次数。响应时间和重试次数是否调整,以及是增加还是减小,可以根据需要具体设置。In addition to increasing the fragment size and the number of transmission threads in the current transmission parameters, it also includes adjusting (such as increasing or decreasing) the response time and the number of retries. Whether the response time and the number of retries are adjusted, and whether to increase or decrease, can be specifically set as required.
若异常(传输状态不正常),则继续使用当前传输参数。即判断传输数据的分片传输是否正常,是否出现超时错误,是否超过重试次数,是否超过响应时间等,若传输状态不正常,即超时错误、重试次数以及响应时间等参数若均出现和超过,或其中之一出现或超过(即判断传输数据的分片传输是否正常,也可以只以出现超时错误、超过重试次数、超过响应时间或其他情况中的一项作为状态不正常的判断标准),则继续使用当前传输参数并且之后不再进行调整,将未调整(未更改)的当前传输参数发送至传输模块303,并保存当前传输参数。If it is abnormal (the transmission status is abnormal), continue to use the current transmission parameters. That is to determine whether the fragmented transmission of the transmitted data is normal, whether there is a timeout error, whether it exceeds the number of retries, whether it exceeds the response time, etc., if the transmission status is abnormal, that is, if the parameters such as timeout error, number of retries, and response time all appear and Exceeded, or one of them appeared or exceeded (that is, to determine whether the fragmented transmission of the transmitted data is normal, or only one of the occurrence of timeout errors, exceeding the number of retries, exceeding the response time, or other conditions is the judgment of abnormal status Standard), then continue to use the current transmission parameters and no further adjustments will be made later, send the unadjusted (unchanged) current transmission parameters to the transmission module 303, and save the current transmission parameters.
也可以选择下述两种减量方法之一,进行后续传输。两种减量方法包括:使用最近一次进行当前参数调整之前的当前传输参数作为调整后的当前传输参数,或调整当前传输参数,减少当前传输参数中的分片大小和传输线程数作为调整后的当前传输参数。You can also choose one of the following two decrement methods for subsequent transmission. Two reduction methods include: using the current transmission parameters before the last current parameter adjustment as the adjusted current transmission parameters, or adjusting the current transmission parameters, reducing the fragment size and the number of transmission threads in the current transmission parameters as the adjusted current transmission parameters Current transmission parameters.
其中,使用最近一次进行当前参数调整之前的当前传输参数作为调整后的当前传输参数,表示,如果当前传输参数为调整后的传输参数,则使用在当前传输参数调整之前的传输参数作为调整后的当前传输参数,进行数据传输。即,假设当前传输参数为:分片大小为(1+0.1)m,响应时间为(1+0.1)r,重试次数c为(1+0.1)c,线程数为p+1;则在当前传输参数调整之前的传输参数为:分片大小为m,响应时间为r,重试次数为c,线程数为p;使用这些参数作为调整后的传输参数发送至传输模块303。Among them, use the current transmission parameters before the last adjustment of the current parameters as the adjusted current transmission parameters, which means that if the current transmission parameters are adjusted transmission parameters, use the transmission parameters before the current transmission parameter adjustments as the adjusted current transmission parameters. Current transmission parameters, data transmission. That is, assuming that the current transmission parameters are: the fragment size is (1+0.1)m, the response time is (1+0.1)r, the number of retries c is (1+0.1)c, and the number of threads is p+1; The transmission parameters before the current transmission parameter adjustment are: the fragment size is m, the response time is r, the number of retries is c, and the number of threads is p; these parameters are used as the adjusted transmission parameters and sent to the transmission module 303.
调整当前传输参数,减少当前传输参数中的分片大小和传输线程数作为调整后的当前传输参数,表示,根据预设置的减量比率和减量值,对当前传输参数进行调整,减小分片大小、减少响应时间、重试次数和线程数。减量比率可以是5%、10%、15%以及20%等。减量值可以是对应减少响应时间、重试次数和线程数的固定值。对当前传输参数进行减量调整后,使用这些参数作为调整后的传输参数,发送至传输模块303。Adjust the current transmission parameters, reduce the fragment size and the number of transmission threads in the current transmission parameters as the adjusted current transmission parameters, which means that according to the preset decrement ratio and decrement value, adjust the current transmission parameters to reduce the score Chip size, reduced response time, number of retries, and number of threads. The reduction ratio can be 5%, 10%, 15%, 20%, and so on. The decrement value can be a fixed value corresponding to the reduction in response time, the number of retries, and the number of threads. After the current transmission parameters are decremented and adjusted, these parameters are used as the adjusted transmission parameters and sent to the transmission module 303.
参数调整单元还用于将未调整的当前传输参数,或进行减量调整后的当前传输参数发送至存储模块的历史传输记录进行保存。在根据上述两种减量方法进行调整后,或继续使用未调整的当前传输参数后,保存当前传输参数(即进行减量或未调整当前传输参数)至客户端的历史传输记录,用于之后的数据传输,并且不再对当前传输参数进行任何调整。保存的当前传输参数均与传输时间段对应。The parameter adjustment unit is also used to send the unadjusted current transmission parameter or the current transmission parameter after decrement adjustment to the historical transmission record of the storage module for storage. After adjusting according to the above two reduction methods, or after continuing to use the unadjusted current transmission parameters, save the current transmission parameters (that is, reduction or unadjusted current transmission parameters) to the client's historical transmission records for later use Data transmission, and no longer any adjustments to the current transmission parameters. The saved current transmission parameters all correspond to the transmission time period.
传输模块303包括:The transmission module 303 includes:
传输调整单元,用于根据当前传输参数,对待传输数据进行初始分片;根据第一预设规则调整后的当前传输参数,对剩余的待传输数据进行二次分片;The transmission adjustment unit is configured to perform initial fragmentation of the data to be transmitted according to the current transmission parameters; perform secondary fragmentation of the remaining data to be transmitted according to the current transmission parameters adjusted by the first preset rule;
数据传输单元,用于传输分片后(进行初始分片或进行二次分片后)的待传输数据。The data transmission unit is used to transmit the data to be transmitted after the fragmentation (after the initial fragmentation or the second fragmentation).
上述传输调整单元,具体用于根据当前传输参数对待传输数据进行二次分片。客户端根据之前计算得到的分片大小m,对待传输的大容量数据文件进行分片,根据之前计算得到的线程数p、响应时间r和重试次数c对传输参数进行设置,传输大容量数据文件的分 片至服务端。The above-mentioned transmission adjustment unit is specifically configured to perform secondary fragmentation of the data to be transmitted according to the current transmission parameters. The client fragments the large-capacity data file to be transmitted according to the previously calculated fragment size m, and sets the transmission parameters according to the previously calculated number of threads p, response time r, and number of retries c to transmit large-capacity data Fragmentation of the file to the server.
若在历史传输记录中未查询到与当前传输时间对应的历史传输参数,则使用预设传输参数直接作为当前传输参数。即客户端无法从历史传输记录中获取与接收文件的服务端对应的历史传输参数,则使用预设值好的传输参数,对待传输的大容量数据文件进行分片,对传输参数进行设置,传输大容量数据文件的分片至服务端。If the historical transmission parameter corresponding to the current transmission time is not found in the historical transmission record, the preset transmission parameter is used directly as the current transmission parameter. That is, the client cannot obtain the historical transmission parameters corresponding to the server receiving the file from the historical transmission records, and uses the transmission parameters with the preset values to fragment the large-capacity data file to be transmitted, set the transmission parameters, and transmit Fragmentation of large-capacity data files to the server.
根据当前传输参、进行增量调整或者是减量调整后的当前传输参数对还没传输完的剩下的待传输数据进行对应的分片后,通过数据传输单元发送。The remaining data to be transmitted that has not yet been transmitted is divided into corresponding fragments according to the current transmission parameter, the current transmission parameter after the incremental adjustment or the decrement adjustment is performed, and then the data is sent through the data transmission unit.
状态判断单元在进行增量(增加当前传输参数中的分片大小和传输线程数)之后,还继续判断当前传输状态是否正常。若当前传输状态正常,则参数调整单元继续增加当前传输参数中的分片大小、传输线程数、响应时间和重试次数,根据增量调整后的分片大小、传输线程数、响应时间和重试次数。传输调整单元对还没传输完的剩余的待传输数据进行对应的分片后发送。若直至数据传输完成,均未出现不正常的传输状态,则参数调整单元保存数据传输完成时的当前传输参数。若出现了不正常的传输状态,则传输调整单元根据上述的两种方式调整当前传输参数,或不调整当前传输参数,参数调整单元保存进行减量调整后的当前传输参数或未进行调整的当前传输参数。The state judging unit continues to judge whether the current transmission state is normal after incrementing (increasing the fragment size and the number of transmission threads in the current transmission parameter). If the current transmission status is normal, the parameter adjustment unit will continue to increase the fragment size, number of transmission threads, response time, and retry times in the current transmission parameters, and adjust the fragment size, number of transmission threads, response time, and retry according to the incremental adjustment. Number of attempts. The transmission adjustment unit performs corresponding fragmentation on the remaining data to be transmitted that has not yet been transmitted, and then sends it. If there is no abnormal transmission state until the data transmission is completed, the parameter adjustment unit saves the current transmission parameters when the data transmission is completed. If an abnormal transmission state occurs, the transmission adjustment unit adjusts the current transmission parameters according to the above two methods, or does not adjust the current transmission parameters, and the parameter adjustment unit saves the current transmission parameters after decrement adjustment or the current transmission parameters that have not been adjusted. Transmission parameters.
本申请实施例提供的数据传输系统的通过历史传输参数,确定当前传输参数,再根据当前传输参数对待传输数据进行分片后传输,从而能够避免传统的朴素分片方式由于不考虑当前带宽的情况直接分片,导致的过多的分片传输请求尝试而增加的时间损耗;通过判断当前传输状态,动态调整当前传输参数和分片大小,能够最大限度地利用网络带宽,从而减少传输时间,提升传输效率,提高带宽利用率,减少传输延迟。In the data transmission system provided by the embodiment of the application, the current transmission parameters are determined through historical transmission parameters, and then the data to be transmitted is fragmented and transmitted according to the current transmission parameters, thereby avoiding the situation that the traditional simple fragmentation method does not consider the current bandwidth. Direct fragmentation, resulting in excessive fragmentation transmission request attempts and increased time loss; by judging the current transmission status, dynamically adjusting the current transmission parameters and fragment size, the network bandwidth can be maximized, thereby reducing the transmission time and improving Transmission efficiency improves bandwidth utilization and reduces transmission delay.
在一个实施例中,提出了一种计算机设备,如图4所示,该计算机设备包括通过系统总线连接的处理器、非易失性存储介质、存储器和网络接口。其中,该计算机设备的非易失性存储介质存储有操作系统、数据库和计算机可读指令,数据库中可存储有控件信息序列,该计算机可读指令被处理器执行时,可使得处理器实现一种数据传输方法。该计算机设备的处理器用于提供计算和控制能力,支撑整个计算机设备的运行。该计算机设备的存储器中可存储有计算机可读指令,该计算机可读指令被处理器执行时,可使得处理器执行一种数据传输方法。该计算机设备的网络接口用于与终端连接通信。本领域技术人员可以理解,图4中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。In one embodiment, a computer device is proposed. As shown in FIG. 4, the computer device includes a processor, a non-volatile storage medium, a memory, and a network interface connected by a system bus. Wherein, the non-volatile storage medium of the computer device stores an operating system, a database, and computer-readable instructions. The database may store control information sequences. When the computer-readable instructions are executed by the processor, the processor can implement a Kind of data transmission method. The processor of the computer equipment is used to provide calculation and control capabilities, and supports the operation of the entire computer equipment. A computer readable instruction may be stored in the memory of the computer device, and when the computer readable instruction is executed by the processor, the processor may execute a data transmission method. The network interface of the computer device is used to connect and communicate with the terminal. Those skilled in the art can understand that the structure shown in FIG. 4 is only a block diagram of part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
该计算机设备包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行计算机程序时实现以下步骤:查询历史传输记录,获取历史传输参数;根据历史传输参数,确定当前传输参数;根据当前传输参数对待传输数据进行分片后传输;判断当前传输状态是否正常,若正常,则按照第一预设规则调整当前传输参数;根据调整后的当前传输参数对待传输数据进行分片后传输。The computer equipment includes a memory, a processor, and a computer program that is stored on the memory and can run on the processor. When the processor executes the computer program, the following steps are implemented: query historical transmission records, obtain historical transmission parameters; determine according to historical transmission parameters Current transmission parameters; according to the current transmission parameters, the data to be transmitted is divided into pieces and transmitted; it is judged whether the current transmission status is normal, and if it is normal, the current transmission parameters are adjusted according to the first preset rule; the data to be transmitted is performed according to the adjusted current transmission parameters Transfer after fragmentation.
在一个实施例中,提出了一种存储有计算机可读指令的存储介质,所述存储介质可以是易失性的,也可以是非易失性的。如图5所示,该计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:查询历史传输记录,获取历史传输参数;根据历史传输参数,确定当前传输参数;根据当前传输参数对待传输数据进行初始分片后传输;判断当前传输状态是否正常,若正常,则按照第一预设规则调整当前传输参数;根据调整后的当前传输参数对剩余的待传输数据进行二次分片后传输。In one embodiment, a storage medium storing computer-readable instructions is provided. The storage medium may be volatile or non-volatile. As shown in Figure 5, when the computer-readable instruction is executed by one or more processors, one or more processors perform the following steps: query historical transmission records, obtain historical transmission parameters; determine current transmission according to historical transmission parameters Parameters; according to the current transmission parameters, the data to be transmitted is initially fragmented and then transmitted; it is judged whether the current transmission status is normal, and if it is normal, the current transmission parameters are adjusted according to the first preset rule; the remaining transmission parameters are adjusted according to the adjusted current transmission parameters The data is transmitted after the second fragmentation.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,该计算机程序可存储于一计算机可读取存储介质 中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,前述的存储介质可为磁碟、光盘、只读存储记忆体(Read-OnlyMemory,ROM)等非易失性存储介质,或随机存储记忆体(RandomAccessMemory,RAM)等。A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing relevant hardware through a computer program. The computer program can be stored in a computer readable storage medium. When executed, it may include the procedures of the above-mentioned method embodiments. Among them, the aforementioned storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disc, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM), etc.
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the various technical features in the above-mentioned embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, All should be considered as the scope of this specification.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation manners of the present application, and their description is relatively specific and detailed, but they should not be understood as a limitation to the patent scope of the present application. It should be pointed out that for those of ordinary skill in the art, without departing from the concept of this application, several modifications and improvements can be made, and these all fall within the protection scope of this application. Therefore, the scope of protection of the patent of this application shall be subject to the appended claims.

Claims (20)

  1. 一种数据传输方法,其中,包括:A data transmission method, which includes:
    查询历史传输记录,获取历史传输参数;Query historical transmission records and obtain historical transmission parameters;
    根据所述历史传输参数,确定当前传输参数;Determine current transmission parameters according to the historical transmission parameters;
    根据所述当前传输参数,对待传输数据进行初始分片后传输;According to the current transmission parameters, the data to be transmitted is transmitted after initial fragmentation;
    判断当前传输状态是否正常;Determine whether the current transmission status is normal;
    若正常,则按照第一预设规则调整当前传输参数,根据调整后的当前传输参数,对剩余的所述待传输数据进行二次分片后传输。If it is normal, the current transmission parameters are adjusted according to the first preset rule, and the remaining data to be transmitted is transmitted after being fragmented twice according to the adjusted current transmission parameters.
  2. 根据权利要求1所述的数据传输方法,其中,所述根据所述历史传输参数,确定当前传输参数,包括:The data transmission method according to claim 1, wherein the determining current transmission parameters according to the historical transmission parameters comprises:
    从所述历史传输参数中,获取一组或多组历史参数向量,Obtain one or more sets of historical parameter vectors from the historical transmission parameters,
    根据获取的所述一组或多组历史参数向量,使用加权平均平滑公式,计算当前传输参数。According to the obtained one or more sets of historical parameter vectors, a weighted average smoothing formula is used to calculate the current transmission parameters.
  3. 根据权利要求2所述的数据传输方法,其中,所述历史参数向量和当前传输参数均包括:分片大小、传输线程数、响应时间和/或重试次数。The data transmission method according to claim 2, wherein the historical parameter vector and the current transmission parameter both include: fragment size, number of transmission threads, response time and/or number of retries.
  4. 根据权利要求1所述的数据传输方法,其中,所述判断当前传输状态是否正常,包括:The data transmission method according to claim 1, wherein said determining whether the current transmission status is normal comprises:
    判断待传输数据的分片数据在传输过程中,是否出现超时的异常情况。Determine whether there is an abnormal situation of timeout during the transmission of the fragmented data of the data to be transmitted.
  5. 根据权利要求1所述的数据传输方法,其中,所述若正常,则按照第一预设规则调整当前传输参数,根据调整后的当前传输参数,对剩余的所述待传输数据进行二次分片后传输,包括:The data transmission method according to claim 1, wherein if it is normal, the current transmission parameters are adjusted according to a first preset rule, and the remaining data to be transmitted is divided into two parts according to the adjusted current transmission parameters. Post-slice transmission, including:
    按照第一预设规则增加当前传输参数中的分片大小和传输线程数;Increase the fragment size and the number of transmission threads in the current transmission parameters according to the first preset rule;
    以增加的分片大小和传输线程数为当前传输参数,对剩余的所述传输数据进行二次分片后传输。Using the increased fragment size and the number of transmission threads as the current transmission parameters, the remaining transmission data is fragmented for a second time and then transmitted.
  6. 根据权利要求1所述的数据传输方法,其中,在所述当前传输状态是否正常之后,还包括:The data transmission method according to claim 1, wherein after the current transmission state is normal, the method further comprises:
    若异常,则保存当前传输参数至所述历史传输记录;If it is abnormal, save the current transmission parameters to the historical transmission record;
    使用当前传输参数继续传输剩余的所述待传输数据。Use the current transmission parameters to continue to transmit the remaining data to be transmitted.
  7. 根据权利要求1所述的数据传输方法,其中,在所述根据所述历史传输参数,确定当前传输参数之前,还包括:The data transmission method according to claim 1, wherein before said determining the current transmission parameters according to the historical transmission parameters, the method further comprises:
    若在历史传输记录中未查询到与当前传输时间对应的所述历史传输参数,则使用预设传输参数作为当前传输参数。If the historical transmission parameter corresponding to the current transmission time is not found in the historical transmission record, the preset transmission parameter is used as the current transmission parameter.
  8. 一种数据传输系统,其中,包括:A data transmission system, which includes:
    查询模块,用于查询历史传输记录,获取历史传输参数;The query module is used to query historical transmission records and obtain historical transmission parameters;
    判断计算模块,用于根据所述历史传输参数,确定当前传输参数;判断当前传输状态是否正常,若正常,则按照第一预设规则调整当前传输参数;The judgment calculation module is configured to determine the current transmission parameters according to the historical transmission parameters; determine whether the current transmission status is normal, and if it is normal, adjust the current transmission parameters according to the first preset rule;
    传输模块,用于根据所述当前传输参数,对待传输数据进行初始分片后传输;根据调整后的当前传输参数,对剩余的所述待传输数据进行二次分片后传输。The transmission module is configured to perform initial fragmentation and transmission of the data to be transmitted according to the current transmission parameters; and perform second fragmentation and transmission of the remaining data to be transmitted according to the adjusted current transmission parameters.
  9. 一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行如下所述的数据传输方法的步骤:A computer device includes a memory and a processor, and the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor is caused to execute the data transmission method described below. step:
    查询历史传输记录,获取历史传输参数;Query historical transmission records and obtain historical transmission parameters;
    根据所述历史传输参数,确定当前传输参数;Determine current transmission parameters according to the historical transmission parameters;
    根据所述当前传输参数,对待传输数据进行初始分片后传输;According to the current transmission parameters, the data to be transmitted is transmitted after initial fragmentation;
    判断当前传输状态是否正常;Determine whether the current transmission status is normal;
    若正常,则按照第一预设规则调整当前传输参数,根据调整后的当前传输参数,对剩余的所述待传输数据进行二次分片后传输。If it is normal, the current transmission parameters are adjusted according to the first preset rule, and the remaining data to be transmitted is transmitted after being fragmented twice according to the adjusted current transmission parameters.
  10. 根据权利要求9所述的计算机设备,其中,所述根据所述历史传输参数,确定当前传输参数,包括:The computer device according to claim 9, wherein the determining the current transmission parameter according to the historical transmission parameter comprises:
    从所述历史传输参数中,获取一组或多组历史参数向量,Obtain one or more sets of historical parameter vectors from the historical transmission parameters,
    根据获取的所述一组或多组历史参数向量,使用加权平均平滑公式,计算当前传输参数。According to the obtained one or more sets of historical parameter vectors, a weighted average smoothing formula is used to calculate the current transmission parameters.
  11. 根据权利要求9所述的计算机设备,其中,所述判断当前传输状态是否正常,包括:The computer device according to claim 9, wherein said determining whether the current transmission status is normal comprises:
    判断待传输数据的分片数据在传输过程中,是否出现超时的异常情况。Determine whether there is an abnormal situation of timeout during the transmission of the fragmented data of the data to be transmitted.
  12. 根据权利要求9所述的计算机设备,其中,所述若正常,则按照第一预设规则调整当前传输参数,根据调整后的当前传输参数,对剩余的所述待传输数据进行二次分片后传输,包括:9. The computer device according to claim 9, wherein, if it is normal, the current transmission parameter is adjusted according to a first preset rule, and the remaining data to be transmitted is fragmented twice according to the adjusted current transmission parameter Later transmission, including:
    按照第一预设规则增加当前传输参数中的分片大小和传输线程数;Increase the fragment size and the number of transmission threads in the current transmission parameters according to the first preset rule;
    以增加的分片大小和传输线程数为当前传输参数,对剩余的所述传输数据进行二次分片后传输。Using the increased fragment size and the number of transmission threads as the current transmission parameters, the remaining transmission data is fragmented for a second time and then transmitted.
  13. 根据权利要求9所述的计算机设备,其中,在所述当前传输状态是否正常之后,还包括:The computer device according to claim 9, wherein after the current transmission status is normal, it further comprises:
    若异常,则保存当前传输参数至所述历史传输记录;If it is abnormal, save the current transmission parameters to the historical transmission record;
    使用当前传输参数继续传输剩余的所述待传输数据。Use the current transmission parameters to continue to transmit the remaining data to be transmitted.
  14. 根据权利要求9所述的计算机设备,其中,在所述根据所述历史传输参数,确定当前传输参数之前,还包括:The computer device according to claim 9, wherein before the determining the current transmission parameter according to the historical transmission parameter, the method further comprises:
    若在历史传输记录中未查询到与当前传输时间对应的所述历史传输参数,则使用预设传输参数作为当前传输参数。If the historical transmission parameter corresponding to the current transmission time is not found in the historical transmission record, the preset transmission parameter is used as the current transmission parameter.
  15. 一种存储有计算机可读指令的存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行如下所述的数据传输方法的步骤:A storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the data transmission method as described below:
    查询历史传输记录,获取历史传输参数;Query historical transmission records and obtain historical transmission parameters;
    根据所述历史传输参数,确定当前传输参数;Determine current transmission parameters according to the historical transmission parameters;
    根据所述当前传输参数,对待传输数据进行初始分片后传输;According to the current transmission parameters, the data to be transmitted is transmitted after initial fragmentation;
    判断当前传输状态是否正常;Determine whether the current transmission status is normal;
    若正常,则按照第一预设规则调整当前传输参数,根据调整后的当前传输参数,对剩余的所述待传输数据进行二次分片后传输。If it is normal, the current transmission parameters are adjusted according to the first preset rule, and the remaining data to be transmitted is transmitted after being fragmented twice according to the adjusted current transmission parameters.
  16. 根据权利要求15所述的存储介质,其中,所述根据所述历史传输参数,确定当前传输参数,包括:The storage medium according to claim 15, wherein the determining the current transmission parameter according to the historical transmission parameter comprises:
    从所述历史传输参数中,获取一组或多组历史参数向量,Obtain one or more sets of historical parameter vectors from the historical transmission parameters,
    根据获取的所述一组或多组历史参数向量,使用加权平均平滑公式,计算当前传输参数。According to the obtained one or more sets of historical parameter vectors, a weighted average smoothing formula is used to calculate the current transmission parameters.
  17. 根据权利要求15所述的存储介质,其中,所述判断当前传输状态是否正常,包括:The storage medium according to claim 15, wherein said determining whether the current transmission status is normal comprises:
    判断待传输数据的分片数据在传输过程中,是否出现超时的异常情况。Determine whether there is an abnormal situation of timeout during the transmission of the fragmented data of the data to be transmitted.
  18. 根据权利要求15所述的存储介质,其中,所述若正常,则按照第一预设规则调整当前传输参数,根据调整后的当前传输参数,对剩余的所述待传输数据进行二次分片后传输,包括:15. The storage medium according to claim 15, wherein if it is normal, the current transmission parameters are adjusted according to a first preset rule, and the remaining data to be transmitted is fragmented twice according to the adjusted current transmission parameters Later transmission, including:
    按照第一预设规则增加当前传输参数中的分片大小和传输线程数;Increase the fragment size and the number of transmission threads in the current transmission parameters according to the first preset rule;
    以增加的分片大小和传输线程数为当前传输参数,对剩余的所述传输数据进行二次分片后传输。Using the increased fragment size and the number of transmission threads as the current transmission parameters, the remaining transmission data is fragmented for a second time and then transmitted.
  19. 根据权利要求15所述的存储介质,其中,在所述当前传输状态是否正常之后,还包括:The storage medium according to claim 15, wherein after the current transmission status is normal, it further comprises:
    若异常,则保存当前传输参数至所述历史传输记录;If it is abnormal, save the current transmission parameters to the historical transmission record;
    使用当前传输参数继续传输剩余的所述待传输数据。Use the current transmission parameters to continue to transmit the remaining data to be transmitted.
  20. 根据权利要求15所述的存储介质,其中,在所述根据所述历史传输参数,确定当前传输参数之前,还包括:The storage medium according to claim 15, wherein before the determining the current transmission parameter according to the historical transmission parameter, the method further comprises:
    若在历史传输记录中未查询到与当前传输时间对应的所述历史传输参数,则使用预设传输参数作为当前传输参数。If the historical transmission parameter corresponding to the current transmission time is not found in the historical transmission record, the preset transmission parameter is used as the current transmission parameter.
PCT/CN2020/135265 2020-10-14 2020-12-10 Data transmission method, data transmission system, device and storage medium WO2021189957A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011099350.X 2020-10-14
CN202011099350.XA CN112152759B (en) 2020-10-14 2020-10-14 Data transmission method, data transmission system, equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2021189957A1 true WO2021189957A1 (en) 2021-09-30

Family

ID=73951814

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/135265 WO2021189957A1 (en) 2020-10-14 2020-12-10 Data transmission method, data transmission system, device and storage medium

Country Status (2)

Country Link
CN (1) CN112152759B (en)
WO (1) WO2021189957A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114221954A (en) * 2021-12-07 2022-03-22 中国电信股份有限公司 File transmission method and device, electronic equipment and storage medium
CN114339863A (en) * 2021-12-27 2022-04-12 浙江大华技术股份有限公司 Uplink data transmission method and device, storage medium and electronic device
CN114338826A (en) * 2021-12-31 2022-04-12 海光信息技术股份有限公司 Data transmission method, device, system and related equipment
CN114449041A (en) * 2021-12-30 2022-05-06 东软集团股份有限公司 Data transmission method, device, storage medium and electronic equipment
CN115859394A (en) * 2022-12-15 2023-03-28 深圳市数存科技有限公司 Data security storage system and method based on edge calculation
CN116991337A (en) * 2023-09-27 2023-11-03 深圳市凌壹科技有限公司 Cloud storage method and device for educational resources of remote educational system
CN117640655A (en) * 2023-12-05 2024-03-01 中移互联网有限公司 Data transmission method and device, electronic equipment and storage medium

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113518108A (en) * 2021-04-23 2021-10-19 北京奇艺世纪科技有限公司 Fragment uploading method, device, equipment and storage medium
CN113595685A (en) * 2021-07-15 2021-11-02 上海晶赞融宣科技有限公司 Data transmission method and device, storage medium and terminal
CN114817110B (en) * 2022-04-26 2023-04-25 地平线(上海)人工智能技术有限公司 Data transmission method and device
CN115065676A (en) * 2022-05-17 2022-09-16 深圳市绿联科技股份有限公司 Method and device for uploading files and electronic equipment
CN115576995B (en) * 2022-11-09 2023-06-09 广州海量数据库技术有限公司 Stream data loading method based on OpenGauss database
CN118523872B (en) * 2024-07-23 2024-10-18 湖北省自然资源厅信息中心 Cross-domain environment-based data exchange and fusion method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101848067A (en) * 2010-06-22 2010-09-29 中兴通讯股份有限公司 Data transmission method and system for self-adaptive bandwidth
US20140310382A1 (en) * 2011-11-28 2014-10-16 Xinlab, Inc. Method of determining transport parameters for efficient data transport across a network
CN104967635A (en) * 2014-05-22 2015-10-07 腾讯科技(深圳)有限公司 Data transmission method and apparatus thereof
CN108886422A (en) * 2016-03-24 2018-11-23 瑞典爱立信有限公司 Method and apparatus for determining the value of configured transmission
CN109085995A (en) * 2017-06-14 2018-12-25 中国电信股份有限公司 Storage method, the device and system of data Dynamic Program Slicing

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101114867B (en) * 2006-07-25 2012-12-19 深圳Tcl工业研究院有限公司 Multi-channel synchronization transmitting method and system
US11210211B2 (en) * 2017-08-21 2021-12-28 Western Digital Technologies, Inc. Key data store garbage collection and multipart object management
CN109639745A (en) * 2019-02-27 2019-04-16 同济汽车设计研究院有限公司 A kind of the unmanned vehicle course data Transmission system and its method of breakpoint transmission
CN110661727B (en) * 2019-08-14 2022-09-30 平安普惠企业管理有限公司 Data transmission optimization method and device, computer equipment and storage medium
CN111756646B (en) * 2020-07-08 2023-09-29 腾讯科技(深圳)有限公司 Network transmission control method, device, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101848067A (en) * 2010-06-22 2010-09-29 中兴通讯股份有限公司 Data transmission method and system for self-adaptive bandwidth
US20140310382A1 (en) * 2011-11-28 2014-10-16 Xinlab, Inc. Method of determining transport parameters for efficient data transport across a network
CN104967635A (en) * 2014-05-22 2015-10-07 腾讯科技(深圳)有限公司 Data transmission method and apparatus thereof
CN108886422A (en) * 2016-03-24 2018-11-23 瑞典爱立信有限公司 Method and apparatus for determining the value of configured transmission
CN109085995A (en) * 2017-06-14 2018-12-25 中国电信股份有限公司 Storage method, the device and system of data Dynamic Program Slicing

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114221954A (en) * 2021-12-07 2022-03-22 中国电信股份有限公司 File transmission method and device, electronic equipment and storage medium
CN114339863A (en) * 2021-12-27 2022-04-12 浙江大华技术股份有限公司 Uplink data transmission method and device, storage medium and electronic device
CN114339863B (en) * 2021-12-27 2024-06-11 浙江大华技术股份有限公司 Uplink data transmission method and device, storage medium and electronic device
CN114449041A (en) * 2021-12-30 2022-05-06 东软集团股份有限公司 Data transmission method, device, storage medium and electronic equipment
CN114338826A (en) * 2021-12-31 2022-04-12 海光信息技术股份有限公司 Data transmission method, device, system and related equipment
CN115859394A (en) * 2022-12-15 2023-03-28 深圳市数存科技有限公司 Data security storage system and method based on edge calculation
CN115859394B (en) * 2022-12-15 2023-11-21 深圳市数存科技有限公司 Data security storage system and method based on edge calculation
CN116991337A (en) * 2023-09-27 2023-11-03 深圳市凌壹科技有限公司 Cloud storage method and device for educational resources of remote educational system
CN116991337B (en) * 2023-09-27 2023-12-26 深圳市凌壹科技有限公司 Cloud storage method and device for educational resources of remote educational system
CN117640655A (en) * 2023-12-05 2024-03-01 中移互联网有限公司 Data transmission method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112152759A (en) 2020-12-29
CN112152759B (en) 2022-10-21

Similar Documents

Publication Publication Date Title
WO2021189957A1 (en) Data transmission method, data transmission system, device and storage medium
US8918536B1 (en) Method and apparatus for optimizing computer network usage to prevent congestion
US7594022B2 (en) Regulating client requests in an electronic messaging environment
US7945736B2 (en) Dynamic load management of network memory
CN110460534B (en) Method, device, equipment and storage medium for reporting request message
CN109417514B (en) Message sending method and device and storage equipment
CN110858843B (en) Service request processing method and device and computer readable storage medium
US20040095949A1 (en) System and method for receive queue provisioning
WO2022057391A1 (en) Cache memory adjustment method, apparatus, and computer device
CN112165436B (en) Flow control method, device and system
CN108494788A (en) Transmission method, data transmission device and the computer readable storage medium of data
CN113301103B (en) Data processing system, method and device
CN113300817B (en) Data transmission method and device
CN113467969A (en) Method for processing message accumulation
CN111935782B (en) Optimization method of client retry mechanism and storage medium
CN112491951B (en) Request processing method, server and storage medium in peer-to-peer network
CN109756464B (en) Communication method, server and client
CN116031965B (en) Charging method, device, power adapter and storage medium
CN112698927A (en) Bidirectional communication method, device, electronic equipment and machine-readable storage medium
JP5082111B2 (en) Computer system, service utilization apparatus, control method, and program
CN111309442A (en) Method, device, system, medium and equipment for adjusting number of micro-service containers
CN110572851A (en) data uploading method, system, device and computer readable storage medium
CN113535426B (en) Message issuing optimization method and server
CN113315718B (en) System, method and device for self-adaptive current limiting
CN109391682B (en) Information processing method and server cluster

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20926797

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20926797

Country of ref document: EP

Kind code of ref document: A1