A file upload rate management method, system, device and storage medium

Through the upload available rate calculated and sent to the client on the server, the problem of unbalanced transmission speed and bandwidth preemption when the client uploads files in the LAN is solved, and more efficient file upload is achieved.

CN118869618BActive Publication Date: 2025-03-28中国联合网络通信有限公司广东省分公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410927283.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2025-03-28
Estimated Expiration
2044-07-11

AI Technical Summary

Technical Problem

In a local area network, when clients upload files to the server, they are prone to problems such as unbalanced transmission speed, bandwidth preemption and unstable speed, and the upload rate needs to be managed.

Method used

The target incremental rate is calculated by the server based on the client's real-time upload rate and reference upload rate, and the upload available rate is determined, and sent to the client to allocate the upload rate of the internal thread.

Benefits of technology

Without consuming too much bandwidth, improve the upload rate of the client and improve file upload efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118869618B_ABST
    Figure CN118869618B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a file upload rate management method, system, device and storage medium, wherein the method includes: when receiving the upload information sent by the client, the server determines the real-time upload rate and reference upload rate of the client according to the upload information; the server determines the target incremental rate corresponding to the client according to the difference between the real-time upload rate and the reference upload rate; the server determines the available upload rate according to the target incremental rate and the reference upload rate, and sends the available upload rate to the client, so that the client allocates the upload rate of the internal thread based on the available upload rate. The technical solution of the embodiment of the present invention solves the problem of unreasonable upload rate when the client uploads files to the server in the prior art, and can match the corresponding incremental rate based on the real-time upload rate of the client, so as to increase the client's upload rate as much as possible without occupying too much bandwidth, thereby improving the file upload efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the technical field of data transmission, and in particular to a file upload rate management method, system, device and storage medium. Background Art

[0002] There are usually multiple clients in a LAN. When multiple clients in the same LAN upload files to the server, there are often problems such as uneven transmission speed, bandwidth grabbing during transmission, and unstable transmission speed. Therefore, it is necessary to manage the upload rate of clients in the LAN. Summary of the invention

[0003] The embodiments of the present invention provide a file upload rate management method, system, device and storage medium, which can match the corresponding incremental rate based on the real-time upload rate of the client, and increase the client upload rate as much as possible without occupying too much bandwidth, thereby improving the file upload efficiency.

[0004] In a first aspect, an embodiment of the present invention provides a method for managing a file upload rate, the method comprising:

[0005] The server determines the real-time upload rate and the reference upload rate of the client according to the upload information when receiving the upload information sent by the client; wherein the upload information includes at least one of the client identification information and the client upload rate information;

[0006] The server determines a target incremental rate corresponding to the client according to a difference between the real-time upload rate and a reference upload rate;

[0007] The server determines the available upload rate according to the target incremental rate and the reference upload rate, and sends the available upload rate to the client, so that the client allocates the upload rate of the internal thread based on the available upload rate; wherein the available upload rate is the maximum upload rate for the client to upload files.

[0008] In a second aspect, an embodiment of the present invention provides a file upload rate management system, the system comprising:

[0009] An upload rate determination module, configured for determining, when the server receives upload information sent by the client, a real-time upload rate and a reference upload rate of the client according to the upload information; wherein the upload information includes at least one of client identification information and client upload rate information;

[0010] An incremental rate determination module, configured for the server to determine a target incremental rate corresponding to the client according to a difference between the real-time upload rate and a reference upload rate;

[0011] An upload available rate determination module is used for the server to determine the upload available rate according to the target incremental rate and the reference upload rate, and send the upload available rate to the client so that the client allocates the upload rate of the internal thread based on the upload available rate; wherein the upload available rate is the maximum upload rate for the client to upload files.

[0012] In a third aspect, an embodiment of the present invention provides a computer device, the computer device comprising:

[0013] one or more processors;

[0014] A memory for storing one or more programs;

[0015] When the one or more programs are executed by the one or more processors, the one or more processors implement the file upload rate management method described in any embodiment.

[0016] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the file upload rate management method described in any embodiment.

[0017] The technical solution provided by the embodiment of the present invention is that when the server receives the upload information sent by the client, it determines the real-time upload rate and reference upload rate of the client according to the upload information; the server determines the corresponding target incremental rate of the client according to the difference between the real-time upload rate and the reference upload rate; the server determines the available upload rate according to the target incremental rate and the reference upload rate, and sends the available upload rate to the client, so that the client allocates the upload rate of the internal thread based on the available upload rate. The technical solution of the embodiment of the present invention solves the problem of unreasonable upload rate when the client uploads files to the server in the prior art, and can match the corresponding incremental rate based on the real-time upload rate of the client, so as to increase the client's upload rate as much as possible without occupying too much bandwidth, thereby improving the efficiency of file upload. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 This is a flow chart of a file upload rate management method provided by an embodiment of the present invention;

[0019] Figure 2 This is a flow chart of another file upload rate management method provided by an embodiment of the present invention;

[0020] Figure 3 This is a workflow diagram for managing file upload rate provided by an embodiment of the present invention;

[0021] Figure 4 It is a schematic diagram of a framework of a file upload rate management system provided by an embodiment of the present invention;

[0022] Figure 5 It is a structural schematic diagram of a file upload rate management system provided by an embodiment of the present invention;

[0023] Figure 6 It is a structural schematic diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0025] Figure 1 It is a flow chart of a file upload rate management method provided by an embodiment of the present invention. The embodiment of the present invention can be applied to the scenario of managing the rate at which a client uploads files to a server. The method can be executed by a file upload rate management system, which can be implemented by software and / or hardware.

[0026] like Figure 1 As shown, the file upload rate management method includes the following steps:

[0027] S110. When receiving the upload information sent by the client, the server determines the real-time upload rate and the reference upload rate of the client according to the upload information.

[0028] Among them, the upload information may be relevant information about the client uploading the file. Specifically, the upload information includes at least one of the client identification information and the client upload rate information. Among them, the client identification information may be the unique identity identification information of the client. The client upload data information may be the upload rate information of the client within a historical period. Further, the real-time upload rate may be the real-time transmission rate of the client uploading the file to the server. The reference upload rate may be a reference rate for determining whether it is necessary to add an incremental rate for the client. Specifically, the real-time upload rate may be determined from the client upload rate information, and then the local area network to which the client belongs may be determined based on the client identification information, and then the reference upload rate may be determined based on the available bandwidth of the local area network and the number of clients.

[0029] S120: The server determines a target incremental rate corresponding to the client according to a difference between the real-time upload rate and a reference upload rate.

[0030] Among them, the target incremental rate can be the incremental rate currently available to the client. Specifically, based on the rate difference and the preset mapping relationship, the incremental rate corresponding to the rate difference can be matched from the preset incremental range, and the matched incremental rate can be used as the target incremental rate. Among them, the incremental rate can be understood as the additional upload rate quota of the client in addition to the original upload rate. By matching the corresponding incremental rate according to the real-time upload rate of the client, it is possible to ensure that the client can have a higher upload rate quota for file upload as much as possible without occupying too much upload bandwidth in the local area network, thereby improving the efficiency and stability of file upload by the client in the local area network.

[0031] S130: The server determines an available upload rate according to the target incremental rate and the reference upload rate, and sends the available upload rate to the client, so that the client allocates the upload rate of the internal thread based on the available upload rate.

[0032] The available upload rate is the maximum upload rate of the client for uploading files. Specifically, the reference upload rate and the target incremental rate can be added, and the summed rate is used as the available upload rate. Further, the available upload rate can be sent to the client so that the client allocates the upload rate of the internal thread based on the available upload rate.

[0033] The technical solution provided by the embodiment of the present invention is that when the server receives the upload information sent by the client, it determines the real-time upload rate and reference upload rate of the client according to the upload information; the server determines the corresponding target incremental rate of the client according to the difference between the real-time upload rate and the reference upload rate; the server determines the available upload rate according to the target incremental rate and the reference upload rate, and sends the available upload rate to the client, so that the client allocates the upload rate of the internal thread based on the available upload rate. The technical solution of the embodiment of the present invention solves the problem of unreasonable upload rate when the client uploads files to the server in the prior art, and can match the corresponding incremental rate based on the real-time upload rate of the client, so as to increase the client's upload rate as much as possible without occupying too much bandwidth, thereby improving the efficiency of file upload.

[0034] Figure 2It is another flow chart of a file upload rate management method provided by an embodiment of the present invention. The embodiment of the present invention can be applied to the scenario of managing the rate of uploading files from a client to a server. Based on the above embodiment, this embodiment further explains how to determine the real-time upload rate of the client according to the upload information; how to determine the target incremental rate corresponding to the client according to the difference between the real-time upload rate and the reference upload rate; and how the client allocates the upload rate of the internal thread based on the available upload rate. The system can be implemented by software and / or hardware and integrated in a computer device with application development function.

[0035] like Figure 2 As shown, the file upload rate management method includes the following steps:

[0036] S210: When receiving the upload information sent by the client, the server determines the real-time upload rate and the reference upload rate of the client according to the upload information, and subtracts the real-time upload rate from the reference upload rate to obtain a rate difference.

[0037] Among them, the upload information may be relevant information about the client uploading the file. Specifically, the upload information includes at least one of the client identification information and the client upload rate information. Among them, the client identification information may be the unique identity identification information of the client. The client upload data information may be the upload rate information of the client within a historical period. Further, the real-time upload rate may be the real-time transmission rate of the client uploading the file to the server. The reference upload rate may be a reference rate for determining whether it is necessary to add an incremental rate for the client. Specifically, the real-time upload rate may be determined from the client upload rate information, and then the local area network to which the client belongs may be determined based on the client identification information, and then the reference upload rate may be determined based on the available bandwidth of the local area network and the number of clients.

[0038] Furthermore, the rate difference may be the difference between the real-time upload rate and the reference upload rate. Specifically, the real-time upload rate and the reference upload rate may be subtracted to obtain the rate difference. The rate difference may reflect the rate difference between the real-time upload rate and the reference upload rate, so that the corresponding incremental rate may be matched to the client later according to the rate difference between the two.

[0039] Optionally, the real-time upload rate of the client is determined based on the upload information, including: the server determines the current upload rate of the client at the current moment based on the upload rate information in the upload information; the server determines the historical upload rate at the previous moment corresponding to the current moment, and performs exponentially weighted moving average processing on the current upload rate and the historical upload rate to obtain the real-time upload rate.

[0040] Among them, the current upload rate can be the upload rate of the client at the current moment. The historical upload rate can be the upload rate of the client at the previous moment corresponding to the current moment. Specifically, the server can record the upload rate of the client within the historical time length, determine the upload rate of the previous moment corresponding to the current moment from the upload rate of the historical time length, and then obtain the historical upload rate. Furthermore, the current upload rate and the historical upload rate can be subjected to exponentially weighted moving average processing to obtain the real-time upload rate.

[0041] Optionally, determining a reference upload rate of the client based on the upload information, including: the server determines the target LAN corresponding to the client based on the client identification information in the upload information; the server determines the number of clients in the target LAN, the total LAN bandwidth and the incremental occupied bandwidth; the server determines the reference upload rate based on the number of clients, the total LAN bandwidth and the incremental occupied bandwidth.

[0042] Among them, the target LAN may be the LAN where the client is located. Specifically, the LAN to which the client belongs can be determined based on the client identification information, and the LAN to which the client belongs can be used as the target LAN. The number of clients can be the total number of clients in the target LAN. The total bandwidth of the LAN can be the total bandwidth that can be used for file upload by the client in the target LAN. The incremental occupied bandwidth can be the total incremental rate occupied by other clients in the target LAN. Exemplarily, the client currently being processed can be used as the current client, and the other clients in the target LAN except the current client can be used as other clients. That is, the technical solution of the embodiment of the present invention is to determine the file upload rate of the current client. Specifically, the bandwidth difference obtained by subtracting the incremental occupied bandwidth from the total bandwidth of the LAN can be obtained, and then the bandwidth difference can be divided by the number of clients to obtain a reference upload rate.

[0043] Optionally, the server may also determine the rate change range of the client based on the client upload rate information, and determine the current upload status of the client based on the rate change range; when the current upload status is abnormal, the server sends an abnormal status prompt message to the client.

[0044] Among them, the rate change range can be the floating degree of the client's upload rate. Specifically, the difference between the client's upload rate at every two adjacent moments can be determined according to the client upload information, and then the rate change range can be obtained. The current upload state can be the working state of the client currently uploading files. Specifically, the current upload state can be determined according to the size of the client's change range. For example, when the rate change range remains within the preset floating range area, and the upload rate is a higher rate, it can be determined that the current upload state of the client is a normal upload state. Correspondingly, if the client's rate change range exceeds the corresponding floating range for a long time, or the rate change range is relatively constant, but the upload rate approaches zero within a preset time, it can be determined that the current upload state is an abnormal upload state. Further, the abnormal state prompt information can be information that prompts the client's file upload function to be abnormal. Exemplarily, the abnormal state prompt information can be information in the form of a preset prompt box, a preset prompt text, or a preset prompt icon.

[0045] S220: The server matches an incremental rate corresponding to the rate difference within a preset incremental range based on the rate difference and a preset mapping relationship, and uses the matched incremental rate as the target incremental rate.

[0046] Among them, the preset mapping relationship is the mapping relationship between the rate difference and the incremental rate within the preset incremental range. The preset incremental range can be a preset available range of the incremental rate of the client. The target incremental rate can be the incremental rate currently available to the client. Specifically, based on the rate difference and the preset mapping relationship, the incremental rate corresponding to the rate difference can be matched from the preset incremental range, and the matched incremental rate can be used as the target incremental rate. Among them, the incremental rate can be understood as the additional upload rate quota of the client in addition to the original upload rate. By matching the corresponding incremental rate according to the real-time upload rate of the client, it is possible to ensure that the client can have a higher upload rate quota for file upload as much as possible without occupying too much upload bandwidth in the local area network, thereby improving the efficiency and stability of file upload by the client in the local area network.

[0047] S230: The server determines an available upload rate according to the target incremental rate and the reference upload rate, and sends the available upload rate to the client, so that the client allocates the upload rate of the internal thread based on the available upload rate.

[0048] The available upload rate is the maximum upload rate of the client for uploading files. Specifically, the reference upload rate and the target incremental rate can be added, and the summed rate is used as the available upload rate. Further, the available upload rate can be sent to the client so that the client allocates the upload rate of the internal thread based on the available upload rate.

[0049] S240: Upon receiving the available upload rate sent by the server, the client determines the number of threads occupied by the files to be uploaded.

[0050] The number of threads occupied may be the number of threads required by the client to perform the file upload task. Specifically, the client may determine the number of threads required to upload the file according to the memory size of the file to be uploaded. In addition, the number of threads occupied may also be set manually.

[0051] S250: The client determines a thread upload rate according to the available upload rate and the number of occupied threads, so that the thread of the client uploads a file based on the thread upload rate.

[0052] The thread upload rate is the maximum rate at which the client's thread uploads files. Specifically, the client can divide the available upload rate by the number of occupied threads to obtain the thread upload rate.

[0053] Optionally, upon receiving a thread priority instruction, the client may also determine the thread to be accelerated according to the thread priority instruction; the client determines the target thread rate corresponding to the thread to be accelerated according to the client's available upload rate, the number of concurrent threads and a preset rate coefficient; the client determines the thread upload rate of other threads in the client except the thread to be accelerated according to the target thread rate and the preset rate coefficient.

[0054] Among them, the thread preference designation may be an instruction to determine the thread that needs to have its upload rate accelerated. Specifically, the user may select a thread of the client based on an interactive operation so that the device obtains the thread preference instruction according to the thread selection operation. That is, the user may manually choose to speed up a thread of the client to speed up the speed at which the thread uploads the corresponding file. Furthermore, the thread to be accelerated may be a thread that needs to increase the upload rate. Specifically, according to the thread preference instruction, a thread selected in the client may be used as the thread to be accelerated.

[0055] Furthermore, the number of concurrent threads may be the number of threads executing upload tasks at the same time in the client. The preset rate coefficient may be a manually set correlation coefficient. The target thread rate may be the maximum rate at which the thread to be accelerated uploads files. Specifically, the preset rate coefficient may be added to the number of concurrent threads and then subtracted by 1 to obtain the corresponding difference, and then the available upload rate may be divided by the difference and then multiplied by the preset rate coefficient to obtain the target thread rate. Specifically, the formula for determining the target thread rate is as follows: Target thread rate = preset rate coefficient * (available upload rate) / (preset rate coefficient + number of concurrent threads - 1). Furthermore, the target thread rate may be divided by the preset rate coefficient to obtain the thread upload rate of other threads in the client except the thread to be accelerated.

[0056] For example, Figure 3 FIG. 1 is a workflow diagram for managing file upload rate provided by an embodiment of the present invention. Figure 3 As shown, the workflow for file upload rate management includes the following steps:

[0057] First, the user uses the rendering client to analyze the scenes that need to be rendered in Maya, 3dsmax, Cenima4D, etc., and then generates the corresponding compressed package and the file list file that needs to be uploaded, and then uploads and submits it. Among them, the file list is generated by the client; the client analyzes the rendering scene through the analysis script, analyzes the material files used in the rendering scene, and summarizes the scene files and material files into a summary file in json format, which is the upload file list. For example: analyze a 3dsmax scene to generate a list of available material files. The client generates a corresponding json format file together with the material file list and the scene file, and obtains the upload file list through the json format file.

[0058] Afterwards, after the user completes the job submission, the upload task is generated in the client upload list. The client file transfer module limits the number of concurrent tasks and the transmission rate of the current client through user settings, and reports the current client's used transmission rate to the transmission flow control service;

[0059] Then, the transmission flow control service organizes and balances the speeds of the clients collected in the same LAN, and returns the balanced speed to the client. The client then adjusts the speed to reach the target speed, balancing the traffic usage of the entire LAN.

[0060] Among them, the server can first determine a series of client systems in the same LAN according to the client's exit IP. After confirming the client, the real-time transmission speed of each client can be obtained. For the statistics of the transmission speed of each client, the (exponential weighted moving average) calculation formula is as follows: (EMA(t) = α * X(t) + (1 - α) * EMA(t-1)) is used for average processing to obtain the LAN transmission bandwidth data for data caching, and the average speed of the current LAN transmission client can be managed. At the same time, the current state of the client is determined by the change in the client's rate: transmitting, timeout disconnection, etc. At the beginning of the transmission, the server calculates the client transmission rate through the LAN data cache. The calculation formula is: cache LAN bandwidth-timeout client occupied bandwidth / number of clients. After obtaining the transmission rate of a single client, it is notified to the client through the Web socket. During the transmission process, it is possible that the sum of the speeds of all clients is difficult to reach the maximum bandwidth of the LAN. Therefore, when the server is used to control the client speed, for example, a certain increment of the client speed is allowed, and the average speed is increased according to the increment of 1-10Mb to guide each client to gradually and evenly increase the speed. If the actual speed of the client reaches the incremental value after each speed increase, the average speed will continue to be increased with a relatively large incremental value. When the speed of all clients gradually increases to the maximum bandwidth of the LAN, the actual speed increase after each speed increase will be much smaller than the speed increase value. At this time, the incremental value can be reduced, gradually reducing the incremental speed to 1Mb. The client transmission system can ensure that a small increase rate is set on the maximum bandwidth usage, but the actual speed is still transmitted according to the maximum bandwidth usage, and will not cause the client to actually speed up. In this way, after multiple rounds of speed increase settings, it can automatically and evenly ensure that multiple clients occupy most of the export bandwidth network. In addition, the client transmission system runs in a low priority manner to ensure that it does not affect the transmission of other applications.

[0061] PS: The calculation formula of the exponentially weighted moving average (EWMA) algorithm is EMA(t) = α * X(t) + (1 - α) *EMA(t-1), as follows: EMA(t) represents the exponentially weighted moving average at the current time point t, X(t) represents the original data at the current time point t, EMA(t-1) represents the exponentially weighted moving average at the previous time point t-1, and α is the smoothing factor (also called the attenuation factor), which is used to control the distribution of weights.

[0062] There are two items on the right side of the formula. The first item is the product of the original data X(t) at the current time point t and the smoothing factor α, which represents the weighted processing of the current data. The second item is the product of the exponentially weighted moving average EMA(t-1) at the previous time point t-1 and the smoothing factor (1 - α), which represents the weighted processing of the previous time point.

[0063] The calculation process of the entire formula is to perform weighted summation of the current data and the weighted average of the previous time point to obtain the exponentially weighted moving average of the current time point.

[0064] Through continuous iterative calculations, a series of exponentially weighted moving averages can be obtained to smooth the data and capture the trend of the data. Due to the existence of the smoothing factor α, the recent data has a higher weight on the average, while the older data gradually reduces its influence.

[0065] Furthermore, after the client receives the available traffic, it will receive the rate notification sent by the server through the Web socket during the transmission process, and evenly distribute the transmission rate to a single thread according to the rate. If there are multiple concurrent transmissions, the client will speed up a single transmission thread, and the accelerated thread will use the priority transmission rate. The priority transmission rate calculation formula is: priority transmission rate = transmission rate ratio * (total available client transmission rate) / (transmission rate ratio + client upload concurrency number - 1), at this time, the transmission rate of other threads is (priority transmission rate / transmission rate ratio). The basic transmission rate ratio is initially set to 1.5 (a double value greater than 1). This achieves the acceleration of single-thread wired transmission during multi-thread concurrent transmission.

[0066] Finally, when the task is uploaded and rendered, the rendering results are downloaded, and the number of concurrent download tasks and the download rate are limited.

[0067] For example, Figure 4 FIG. 1 is a schematic diagram of a file upload rate management system provided by an embodiment of the present invention. Figure 4 As shown in the figure, the local client is responsible for scene analysis, job submission, and feedback of rate changes during the transmission process; the local client also supports rendering task viewing and scene image download; the cloud flow control service receives the transmission rate changes fed back by the client and allocates the rate to the clients in the same LAN; the local client also adjusts the transmission rate it uses to achieve the purpose of balanced transmission.

[0068] The technical solution provided by the embodiment of the present invention is that the server determines the real-time upload rate and reference upload rate of the client according to the upload information when receiving the upload information sent by the client, and makes a difference between the real-time upload rate and the reference upload rate to obtain the rate difference; the server matches the incremental rate corresponding to the rate difference from the preset incremental range based on the rate difference and the preset mapping relationship, and uses the matched incremental rate as the target incremental rate; the server determines the available upload rate according to the target incremental rate and the reference upload rate, and sends the available upload rate to the client, so that the client allocates the upload rate of the internal thread based on the available upload rate; the client determines the number of threads corresponding to the file to be uploaded when receiving the available upload rate sent by the server; the client determines the thread upload rate according to the available upload rate and the number of threads occupied, so that the thread of the client uploads the file based on the thread upload rate. The technical solution of the embodiment of the present invention solves the problem of unreasonable upload rate when the client uploads files to the server in the prior art, and can match the corresponding incremental rate based on the real-time upload rate of the client, so as to improve the upload rate of the client as much as possible without occupying too much bandwidth, thereby improving the file upload efficiency.

[0069] Figure 5 It is a structural diagram of a file upload rate management system provided by an embodiment of the present invention. The embodiment of the present invention can be applied to the scenario of managing the rate at which files are uploaded from a client to a server. The system can be implemented by software and / or hardware and integrated into a computer device with application development capabilities.

[0070] like Figure 5 As shown, the file upload rate management system includes: an upload rate determination module 310 , an incremental rate determination module 320 and an upload available rate determination module 330 .

[0071] Among them, the upload rate determination module 310 is used for the server to determine the real-time upload rate and reference upload rate of the client according to the upload information sent by the client when the server receives the upload information sent by the client; wherein the upload information includes at least one of the client identification information and the client upload rate information; the incremental rate determination module 320 is used for the server to determine the target incremental rate corresponding to the client according to the difference between the real-time upload rate and the reference upload rate; the upload available rate determination module 330 is used for the server to determine the upload available rate according to the target incremental rate and the reference upload rate, and send the upload available rate to the client, so that the client allocates the upload rate of the internal thread based on the upload available rate; wherein the upload available rate is the maximum upload rate for the client to upload files.

[0072] The technical solution provided by the embodiment of the present invention is that when the server receives the upload information sent by the client, it determines the real-time upload rate and reference upload rate of the client according to the upload information; the server determines the corresponding target incremental rate of the client according to the difference between the real-time upload rate and the reference upload rate; the server determines the available upload rate according to the target incremental rate and the reference upload rate, and sends the available upload rate to the client, so that the client allocates the upload rate of the internal thread based on the available upload rate. The technical solution of the embodiment of the present invention solves the problem of unreasonable upload rate when the client uploads files to the server in the prior art, and can match the corresponding incremental rate based on the real-time upload rate of the client, so as to increase the client's upload rate as much as possible without occupying too much bandwidth, thereby improving the efficiency of file upload.

[0073] In an optional embodiment, the upload rate determination module 310 includes: a real-time upload rate determination unit, which is used for: the server to determine the current upload rate of the client at the current moment based on the upload rate information in the upload information; the server to determine the historical upload rate at the previous moment corresponding to the current moment, and perform exponentially weighted moving average processing on the current upload rate and the historical upload rate to obtain the real-time upload rate.

[0074] In an optional implementation, the upload rate determination module 310 also includes: a reference upload rate determination unit, which is used for: the server to determine the target LAN corresponding to the client based on the client identification information in the upload information; the server to determine the number of clients, the total LAN bandwidth and the incremental occupied bandwidth of the target LAN; the server to determine the reference upload rate based on the number of clients, the total LAN bandwidth and the incremental occupied bandwidth.

[0075] In an optional implementation, the incremental rate determination module 320 is specifically used for: the server side subtracts the real-time upload rate from the reference upload rate to obtain a rate difference; the server side matches the incremental rate corresponding to the rate difference within a preset incremental range based on the rate difference and a preset mapping relationship, and uses the matched incremental rate as the target incremental rate; wherein the preset mapping relationship is a mapping relationship between the rate difference and the incremental rate within the preset incremental range.

[0076] In an optional embodiment, the file upload rate management system also includes: a thread upload rate determination module, which is used for: the client to determine the number of threads occupied corresponding to the file to be uploaded when receiving the available upload rate sent by the server; the client determines the thread upload rate according to the available upload rate and the number of threads occupied, so that the client's thread uploads the file based on the thread upload rate; wherein the thread upload rate is the maximum rate at which the client's thread uploads files.

[0077] In an optional embodiment, the thread upload rate determination module includes: a thread speed-up management unit, which is used for: the client, when receiving a thread priority instruction, determines the thread to be accelerated according to the thread priority instruction; the client determines the target thread rate corresponding to the thread to be accelerated according to the client's available upload rate, the number of concurrent threads and a preset rate coefficient; the client determines the thread upload rates of other threads in the client except the thread to be accelerated according to the target thread rate and the preset rate coefficient.

[0078] In an optional embodiment, the file upload rate management system also includes: an abnormal rate prompt module, which is used for: the server to determine the rate change amplitude of the client according to the client upload rate information, and determine the current upload status of the client according to the rate change amplitude; when the current upload status is an abnormal state, the server sends abnormal status prompt information to the client.

[0079] The file upload rate management system provided in the embodiment of the present invention can execute the file upload rate management method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0080] Figure 6 A schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Figure 6 A block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention is shown. Figure 6 The computer device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention. The computer device 12 can be any terminal device with computing capability and can be configured in the file upload rate management device.

[0081] like Figure 6 As shown, the computer device 12 is in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).

[0082] The bus 18 may be one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. For example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0083] The computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.

[0084] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache 32. The computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 6 not shown, usually called a "hard drive"). Although Figure 6 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.

[0085] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described herein.

[0086] The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), one or more devices that enable a user to interact with the computer device 12, and / or any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the computer device 12 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 20. Figure 6 As shown, the network adapter 20 communicates with other modules of the computer device 12 via the bus 18. It should be understood that although Figure 6 Not shown, other hardware and / or software modules may be used in conjunction with computer device 12, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0087] The processing unit 16 executes various functional applications and data processing by running the program stored in the system memory 28, for example, implementing the file upload rate management method provided in the embodiment of the present invention, the method comprising:

[0088] The server determines the real-time upload rate and the reference upload rate of the client according to the upload information when receiving the upload information sent by the client; wherein the upload information includes at least one of the client identification information and the client upload rate information;

[0089] The server determines a target incremental rate corresponding to the client according to a difference between the real-time upload rate and a reference upload rate;

[0090] The server determines the available upload rate according to the target incremental rate and the reference upload rate, and sends the available upload rate to the client, so that the client allocates the upload rate of the internal thread based on the available upload rate; wherein the available upload rate is the maximum upload rate for the client to upload files.

[0091] This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the file upload rate management method provided by any embodiment of the present invention is implemented, including:

[0092] The server determines the real-time upload rate and the reference upload rate of the client according to the upload information when receiving the upload information sent by the client; wherein the upload information includes at least one of the client identification information and the client upload rate information;

[0093] The server determines a target incremental rate corresponding to the client according to a difference between the real-time upload rate and a reference upload rate;

[0094] The server determines the available upload rate according to the target incremental rate and the reference upload rate, and sends the available upload rate to the client, so that the client allocates the upload rate of the internal thread based on the available upload rate; wherein the available upload rate is the maximum upload rate for the client to upload files.

[0095] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, system or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, system or device or used in combination with it.

[0096] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or upload a program for use by or in conjunction with an instruction execution system, system, or device.

[0097] The program code contained on the computer-readable medium may be uploaded using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0098] Computer program code for performing the operation of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0099] It should be understood by those skilled in the art that the above modules or steps of the present invention can be implemented by a general-purpose computing system, they can be concentrated on a single computing system, or distributed on a network composed of multiple computing systems, optionally, they can be implemented by a program code executable by a computer system, so that they can be stored in a storage system and executed by the computing system, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0100] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A file upload rate management method, characterized in that: include: The server determines the real-time upload rate and the reference upload rate of the client according to the upload information when receiving the upload information sent by the client; wherein the upload information includes at least one of the client identification information and the client upload rate information; The server determines a target incremental rate corresponding to the client according to a difference between the real-time upload rate and a reference upload rate; The server adds the target incremental rate and the reference upload rate to determine the available upload rate, and sends the available upload rate to the client so that the client allocates the upload rate of the internal thread based on the available upload rate; wherein the available upload rate is the maximum upload rate for the client to upload files.

2. The method according to claim 1, characterized in that Determining the real-time upload rate of the client according to the upload information includes: The server determines the current upload rate of the client at the current moment based on the upload rate information in the upload information; The server determines a historical upload rate at a previous moment corresponding to the current moment, performs exponentially weighted moving average processing on the current upload rate and the historical upload rate, and obtains the real-time upload rate.

3. The method according to claim 1, characterized in that The determining a reference upload rate of the client according to the upload information includes: The server determines the target local area network corresponding to the client according to the client identification information in the uploaded information; The server determines the number of clients of the target LAN, the total bandwidth of the LAN and the incremental occupied bandwidth; The server determines the reference upload rate according to the number of clients, the total bandwidth of the local area network and the incremental occupied bandwidth.

4. The method according to claim 1, characterized in that: The determining, according to the difference between the real-time upload rate and the reference upload rate, a target incremental rate corresponding to the client, comprises: The server subtracts the real-time upload rate from the reference upload rate to obtain a rate difference; The server matches the incremental rate corresponding to the rate difference from a preset incremental range based on the rate difference and a preset mapping relationship, and uses the matched incremental rate as the target incremental rate; The preset mapping relationship is a mapping relationship between the rate difference and the incremental rate within the preset incremental range.

5. The method according to claim 1, characterized in that The method further comprises: The client determines the number of threads occupied by the file to be uploaded when receiving the available upload rate sent by the server; The client determines a thread upload rate according to the available upload rate and the number of occupied threads, so that the client's thread uploads files based on the thread upload rate; wherein the thread upload rate is a maximum rate at which the client's thread uploads files.

6. The method according to claim 5, characterized in that The method further comprises: When receiving the thread optimization instruction, the client determines the thread to be accelerated according to the thread optimization instruction; The client determines a target thread rate corresponding to the thread to be accelerated according to the available upload rate of the client, the number of concurrent threads and a preset rate coefficient; The client determines the thread upload rates of other threads in the client except the thread to be accelerated according to the target thread rate and the preset rate coefficient.

7. The method according to claim 1, characterized in that The method further comprises: The server determines the rate change range of the client according to the upload rate information of the client, and determines the current upload state of the client according to the rate change range; When the current upload status is an abnormal status, the server sends abnormal status prompt information to the client.

8. A file upload rate management system, characterized in that: The system comprises: An upload rate determination module, configured for determining, when the server receives upload information sent by the client, a real-time upload rate and a reference upload rate of the client according to the upload information; wherein the upload information includes at least one of client identification information and client upload rate information; An incremental rate determination module, configured for the server to determine a target incremental rate corresponding to the client according to a difference between the real-time upload rate and a reference upload rate; An upload available rate determination module is used for the server to determine the upload available rate by adding the target incremental rate and the reference upload rate, and send the upload available rate to the client so that the client allocates the upload rate of the internal thread based on the upload available rate; wherein the upload available rate is the maximum upload rate for the client to upload files.

9. A computer device, characterized in that: The computer device comprises: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the file upload rate management method as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the file upload rate management method as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Network uploading scheduling method and system, network bandwidth detection method, client and servers

    CN104580305A

  • File uploading method and device

    CN117955975A