A method for building dual-pass streaming of large rendered assets
By combining the dual-channel transmission method of TCP and UDP protocols in the cloud rendering scene, and using the decision tree algorithm model to optimize the transmission traffic, the problems of asset file transmission interruption and low network utilization in cloud rendering are solved, and more efficient data transmission is achieved. and improved rendering efficiency.
Patent Information
- Application Number
- CN202211405670.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-10
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2042-11-10
AI Technical Summary
In cloud rendering scenarios, when users need to transfer a large number of asset files, the existing technology uses a single UDP or TCP protocol, resulting in transmission interruption, packet loss and low network utilization, affecting task submission progress.
It adopts a dual-channel transmission method, combines TCP and UDP protocols, automatically allocates transmission traffic through a decision tree algorithm model, optimizes data packet size and congestion window, and dynamically adjusts the usage speed of the transmission engine to maximize network bandwidth utilization.
Effectively reduce transmission interruptions, improve network bandwidth utilization, shorten big data asset upload time, improve rendering efficiency (average time consumption is reduced by 20-30%), and circumvent network operator current limits.
Smart Images

Figure CN115914113B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of file transmission technology, and in particular to a method for constructing a dual-channel transmission method for a large number of rendering assets. Background Art
[0002] In the use scenario of cloud rendering, a user's scene may contain several GB or even hundreds of GB of asset files. Before rendering begins, these files need to be transferred to the platform storage through the client. In mainstream applications, the transmission engine uses the UDP protocol for transmission, but domestic broadband operators will limit the transmission of UDP packets, resulting in slow transmission for users or interruptions, making it impossible for users to smoothly transmit assets, thus affecting the progress of task submission.
[0003] See also Figure 1 ,The technical background of the existing transmission engine is as follows.
[0004] 1. The server listens to a UDP or TCP port and waits for the client to send data. A service only uses one method for data transmission;
[0005] 2. When using TCP transmission, the client starts sending data after establishing a connection with the server;
[0006] 3. When using UDP transmission, there is no need to establish a connection, and the client sends data directly to the server;
[0007] The existing transmission engine has the following technical problems.
[0008] 1. The two protocols will not be used at the same time. If the transmission is interrupted, either switch the protocol manually or automatically, or wait for a retry. However, the interruption problem is often not resolved.
[0009] 2. UDP is connectionless and has no congestion control or flow control, which results in a large number of packets being sent during transmission, which can be interpreted by broadband operators as an attack, leading to packet loss. This results in slow transmission at the user level, as data is discarded, resulting in low network utilization.
[0010] 3. TCP is based on long connections and has congestion control and flow control, which enables stable transmission. However, the transmission speed is limited by this stability, resulting in a transmission speed that is inferior to UDP (under normal circumstances).
[0011] Therefore, the prior art has defects and needs to be improved. Summary of the invention
[0012] The technical problem to be solved by the present invention is: to provide a method for building a dual-channel transmission of a large number of rendering assets, which can use TCP and UDP protocols at the same time during the transmission process, and automatically allocate the traffic transmitted by the protocols according to a decision tree algorithm model, thereby achieving the purpose of reducing transmission interruptions and improving the utilization rate of the customer's local network bandwidth.
[0013] The technical solution of the present invention is as follows: a method for constructing a dual-channel transmission of a large number of rendering assets is provided, comprising the following steps.
[0014] S1: Set up TCP transmission server and UDP transmission server. The TCP transmission server and UDP transmission server listen to the ports related to storage respectively.
[0015] S2: Start the transmission client, the transmission client obtains the configuration information of the TCP line from the TCP transmission server and obtains the configuration information of the UDP line from the UDP transmission server; the transmission client is arranged with a transmission control module.
[0016] S3: The transmission client parses the configuration information of the TCP line and the configuration information of the UDP line, and initializes the TCP transmission engine according to the configuration information of the TCP line, and initializes the UDP transmission engine according to the configuration information of the UDP line.
[0017] S4: After starting the TCP transmission engine, send bandwidth test data to the TCP transmission server to obtain the transmission performance information of the TCP transmission engine; and store the transmission performance information of the TCP transmission engine in the decision cache of the transmission control module; after starting the UDP transmission engine, send the same bandwidth test data to the UDP transmission server to obtain the transmission performance information of the UDP transmission engine; and store the transmission performance information of the UDP transmission engine in the decision cache of the transmission control module. The size of the bandwidth test data is 1M-100M. The transmission performance information includes: available bandwidth, network delay, and packet loss rate. Available bandwidth is the average transmission speed.
[0018] S5: Put the decision cache data in the transmission control module into the decision tree algorithm model to obtain the probability of using the TCP transmission engine for faster transmission and the probability of using the UDP transmission engine for faster transmission; at the same time, obtain the appropriate data packet size and congestion window size.
[0019] S6: Allocate maximum transmission speeds to the TCP transmission engine and the UDP transmission engine according to the probability. The transmission engine with a greater probability is allocated a greater transmission speed. At the same time, adjust the size of the data packet in transmission and the size of the congestion window.
[0020] S7: The TCP transmission engine and the UDP transmission engine transmit files; during the file transmission process, the transmission performance information of the TCP transmission engine and the transmission performance information of the UDP transmission engine are counted every N seconds and stored in the decision cache of the transmission control module. The range of N is 10-60.
[0021] S8: The transmission control module puts the decision cache data in the transmission control module in step S7 into the decision tree algorithm model every M seconds, calculates the probability of using the TCP transmission engine for faster transmission and the probability of using the UDP transmission engine for faster transmission, and obtains the appropriate data packet size and congestion window size. The range of M is 2-10.
[0022] S9: If it is calculated that the probability of using the TCP transmission engine for faster transmission and the probability of using the UDP transmission engine for faster transmission are reversed, the speed of the transmission engine with a larger probability will be increased, and the speed of the transmission engine with a smaller probability will be reduced; if the probability remains basically unchanged, the transmission speed, data packet size, and congestion window size will not be modified.
[0023] S10: During the transmission process, S7-S9 are executed in a loop until the transmission task is completed.
[0024] Furthermore, in step S4, it also includes: if the UDP transmission engine is not working, the TCP transmission engine is used, but the UDP transmission engine continuously tries to send a small amount of data; if the TCP transmission engine is not working, the UDP transmission engine is used, but the TCP transmission engine continuously tries to send a small amount of data; when both the TCP transmission engine and the UDP transmission engine are not working, check the network or restart the TCP transmission engine or the UDP transmission engine and try again.
[0025] Furthermore, in step S6, it also includes: if the UDP transmission engine has a higher transmission speed and a lower packet loss rate, the file transmission volume of the UDP transmission engine is increased, and the congestion control and flow control of the TCP transmission engine are released; if the TCP transmission engine has a higher transmission speed and a lower packet loss rate, the file transmission volume of the TCP transmission engine is increased, and the packet sending rate and packet size of the UDP transmission engine are reduced.
[0026] Furthermore, in step S7, it also includes: when the TCP transmission engine and the UDP transmission engine perform file transmission, if it is a multi-file transmission, the fast transmission engine allocates more files for transmission, and the slow transmission engine allocates fewer files; if it is a single file transmission, the file is allocated to the fast transmission engine, and the slow transmission engine only performs network detection of a small amount of data to obtain transmission performance information.
[0027] Furthermore, the construction of the decision tree algorithm model includes: comparing the available bandwidth (average transmission speed) of the TCP transmission engine and the UDP transmission engine, comparing the network delay of the TCP transmission engine and the UDP transmission engine, and comparing the packet loss rate of the TCP transmission engine and the UDP transmission engine.
[0028] After years of development, the TCP protocol can also achieve fast transmission in the field of file transfer. For example, FTP transmission based on the TCP / IP protocol can reach a transmission speed of Gbps under good network conditions. In addition, the congestion control and flow control of the TCP protocol can minimize packet loss caused by network operators. The UDP protocol is currently widely used in large file and long-distance transmission, and can achieve better transmission speeds than TCP in cross-regional transmission. Due to its non-connectivity, it can achieve one-to-one, one-to-many, or even many-to-one transmission, greatly saving server resources. UDP encapsulates and transmits application layer messages, but does not split or merge them. Therefore, UDP belongs to message stream transmission. The UDP header is short, which can greatly save resources during transmission.
[0029] The decision tree is a decision analysis method that uses a decision tree to construct a decision tree based on the known probabilities of various situations to obtain the probability that the expected value of the net present value is greater than or equal to zero, evaluate project risks, and determine its feasibility. It is a graphical method that intuitively uses probability analysis.
[0030] The present invention creatively combines the advantages of two transmission protocols and obtains a suitable transmission speed distribution scheme through a decision tree algorithm model to avoid the disadvantages of a single protocol, thereby improving the transmission experience and effectively meeting users' requirements for transmission speed and enhancing user experience.
[0031] By adopting the above scheme, the present invention provides a method for constructing a dual-channel transmission of a large number of rendering assets, which can maximize the use of network bandwidth without the problem of non-transmission. It greatly shortens the time for users to upload large data assets. At the same time, since the transmission speed is automatically adjusted, the network operator's current limiting can be avoided. The user's rendering efficiency has been further improved (the average time consumption can be shortened by 20-30%). BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 It is a transmission diagram of the existing scheme;
[0033] Figure 2 A transmission schematic diagram of an embodiment of the present invention;
[0034] Figure 3 A schematic diagram of a decision tree algorithm model according to an embodiment of the present invention. DETAILED DESCRIPTION
[0035] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0036] See also Figure 2 and Figure 3 ,This embodiment provides a method for constructing a dual-channel transmission of a large number of rendering assets, including the following steps.
[0037] S1: Set up TCP transmission server and UDP transmission server. The TCP transmission server and UDP transmission server listen to the ports related to storage respectively.
[0038] S2: Start the transmission client, the transmission client obtains the configuration information of the TCP line from the TCP transmission server and obtains the configuration information of the UDP line from the UDP transmission server; the transmission client is arranged with a transmission control module.
[0039] S3: The transmission client parses the configuration information of the TCP line and the configuration information of the UDP line, and initializes the TCP transmission engine according to the configuration information of the TCP line, and initializes the UDP transmission engine according to the configuration information of the UDP line.
[0040] S4: After starting the TCP transmission engine, send bandwidth test data to the TCP transmission server to obtain the transmission performance information of the TCP transmission engine; and store the transmission performance information of the TCP transmission engine in the decision cache of the transmission control module; after starting the UDP transmission engine, send the same bandwidth test data to the UDP transmission server to obtain the transmission performance information of the UDP transmission engine; and store the transmission performance information of the UDP transmission engine in the decision cache of the transmission control module. The size of the bandwidth test data is 1M-100M. The transmission performance information includes: available bandwidth, network delay, and packet loss rate. The available bandwidth is the average transmission speed. If the UDP transmission engine is not connected, the TCP transmission engine is used, but the UDP transmission engine keeps trying to send a small amount of data; if the TCP transmission engine is not connected, the UDP transmission engine is used, but the TCP transmission engine keeps trying to send a small amount of data; when both the TCP transmission engine and the UDP transmission engine are not connected, check the network or restart the TCP transmission engine and the UDP transmission engine and try again.
[0041] S5: Put the decision cache data in the transmission control module into the decision tree algorithm model to obtain the probability of using the TCP transmission engine for faster transmission and the probability of using the UDP transmission engine for faster transmission; at the same time, obtain the appropriate data packet size and congestion window size.
[0042] S6: Assign the maximum transmission speed to the TCP transmission engine and the UDP transmission engine according to the probability. The transmission engine with a greater probability will be assigned a greater transmission speed. At the same time, adjust the size of the data packet in transmission and the size of the congestion window. If the UDP transmission engine has a higher transmission speed and a lower packet loss rate, increase the file transmission volume of the UDP transmission engine and release the congestion control and flow control of the TCP transmission engine. If the TCP transmission engine has a higher transmission speed and a lower packet loss rate, increase the file transmission volume of the TCP transmission engine and reduce the packet sending rate and packet size of the UDP transmission engine.
[0043] S7: TCP transmission engine and UDP transmission engine transmit files; during the file transmission process, the transmission performance information of the TCP transmission engine and the transmission performance information of the UDP transmission engine are counted every N seconds and stored in the decision cache of the transmission control module. The range of N is 10-60. When the TCP transmission engine and the UDP transmission engine perform file transmission, if it is a multi-file transmission, the fast transmission engine allocates more files for transmission, and the slow transmission engine allocates fewer files; if it is a single file transmission, the file is allocated to the fast transmission engine, and the slow transmission engine only performs a small amount of data network detection to obtain transmission performance information.
[0044] S8: The transmission control module puts the decision cache data in the transmission control module in step S7 into the decision tree algorithm model every M seconds, calculates the probability of using the TCP transmission engine for faster transmission and the probability of using the UDP transmission engine for faster transmission, and obtains the appropriate data packet size and congestion window size. The range of M is 2-10.
[0045] S9: If it is calculated that the probability of using the TCP transmission engine for faster transmission and the probability of using the UDP transmission engine for faster transmission are reversed, the speed of the transmission engine with a larger probability will be increased, and the speed of the transmission engine with a smaller probability will be reduced; if the probability remains basically unchanged, the transmission speed, data packet size, and congestion window size will not be modified.
[0046] S10: During the transmission process, S7-S9 are executed in a loop until the transmission task is completed.
[0047] In this embodiment, the construction of the decision tree algorithm model includes: comparing the available bandwidth (average transmission speed) of the TCP transmission engine and the UDP transmission engine, comparing the network delay of the TCP transmission engine and the UDP transmission engine, and comparing the packet loss rate of the TCP transmission engine and the UDP transmission engine.
[0048] In summary, the present invention provides a method for constructing a dual-channel transmission of a large number of rendering assets, which can maximize the use of network bandwidth without the problem of non-transmission. It greatly shortens the time for users to upload large data assets. At the same time, since the transmission speed is automatically adjusted, the network operator's current limiting can be avoided. The user's rendering efficiency has been further improved (the average time consumption can be shortened by 20-30%).
[0049] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for constructing a dual-channel transmission of a large number of rendering assets, characterized in that: The following steps are involved: S1: Set up TCP transmission server and UDP transmission server. The TCP transmission server and UDP transmission server listen to the ports related to storage respectively. S2: starting the transmission client, the transmission client obtains the configuration information of the TCP line from the TCP transmission server and obtains the configuration information of the UDP line from the UDP transmission server; the transmission client is arranged with a transmission control module; S3: The transmission client parses the configuration information of the TCP line and the configuration information of the UDP line, and initializes the TCP transmission engine according to the configuration information of the TCP line, and initializes the UDP transmission engine according to the configuration information of the UDP line; S4: After starting the TCP transmission engine, bandwidth test data is sent to the TCP transmission server to obtain transmission performance information of the TCP transmission engine; and storing the transmission performance information of the TCP transmission engine in the decision cache of the transmission control module; After starting the UDP transmission engine, the same bandwidth test data is sent to the UDP transmission server to obtain the transmission performance information of the UDP transmission engine; and the transmission performance information of the UDP transmission engine is stored in the decision cache of the transmission control module; S5: Put the decision cache data in the transmission control module into the decision tree algorithm model to obtain the probability of using the TCP transmission engine for faster transmission and the probability of using the UDP transmission engine for faster transmission; at the same time, obtain the appropriate data packet size and congestion window size; S6: assigning maximum transmission speeds to the TCP transmission engine and the UDP transmission engine according to the probability. The transmission engine with a greater probability has a greater transmission speed. Meanwhile, the size of the data packet in transmission and the size of the congestion window are adjusted. S7: TCP transmission engine and UDP transmission engine for file transmission; During the file transmission process, the transmission performance information of the TCP transmission engine and the transmission performance information of the UDP transmission engine are counted every N seconds and stored in the decision cache of the transmission control module; S8: The transmission control module puts the decision cache data in the transmission control module in step S7 into the decision tree algorithm model every M seconds, calculates the probability of using the TCP transmission engine for faster transmission and the probability of using the UDP transmission engine for faster transmission, and obtains the appropriate data packet size and congestion window size; S9: If it is calculated that the probability of using the TCP transmission engine for faster transmission and the probability of using the UDP transmission engine for faster transmission are reversed, the speed of the transmission engine with a larger probability is increased, and the speed of the transmission engine with a smaller probability is decreased; If the probability remains essentially unchanged, the transmission speed, packet size, and congestion window size are not modified; S10: During the transmission process, S7-S9 are executed in a loop until the transmission task is completed.
2. A method for constructing a dual-channel transmission of a large number of rendering assets according to claim 1, characterized in that: In step S4, it also includes: if the UDP transmission engine is not connected, the TCP transmission engine is used, but the UDP transmission engine continuously tries to send a small amount of data; if the TCP transmission engine is not connected, the UDP transmission engine is used, but the TCP transmission engine continuously tries to send a small amount of data; when both the TCP transmission engine and the UDP transmission engine are not connected, check the network or restart the TCP transmission engine or the UDP transmission engine and try again.
3. A method for constructing dual-channel transmission of a large number of rendering assets according to claim 1, characterized in that: The size of the bandwidth test data is 1M-100M.
4. A method for constructing a dual-channel transmission of a large number of rendering assets according to claim 1, characterized in that: The transmission performance information includes: available bandwidth, network delay, and packet loss rate.
5. A method for constructing dual-channel transmission of a large number of rendering assets according to claim 1, characterized in that: In step S6, it also includes: if the UDP transmission engine has a higher transmission speed and a lower packet loss rate, then the file transmission volume of the UDP transmission engine is increased, and the congestion control and flow control of the TCP transmission engine are released; if the TCP transmission engine has a higher transmission speed and a lower packet loss rate, then the file transmission volume of the TCP transmission engine is increased, and the packet sending rate and packet size of the UDP transmission engine are reduced.
6. A method for constructing a dual-channel transmission of a large number of rendering assets according to claim 1, characterized in that: The range of N is 10-60, and the range of M is 2-10.
7. A method for constructing dual-channel transmission of a large number of rendering assets according to claim 1, characterized in that: In step S7, it also includes: when the TCP transmission engine and the UDP transmission engine perform file transmission, if it is a multi-file transmission, the fast transmission engine allocates more files for transmission, and the slow transmission engine allocates fewer files; if it is a single file transmission, the file is allocated to the fast transmission engine, and the slow transmission engine only performs network detection of a small amount of data to obtain transmission performance information.
8. A method for constructing dual-channel transmission of a large number of rendering assets according to claim 4, characterized in that: The decision tree algorithm model includes: comparing the available bandwidth of the TCP transmission engine and the UDP transmission engine, comparing the network delay of the TCP transmission engine and the UDP transmission engine, and comparing the packet loss rate of the TCP transmission engine and the UDP transmission engine.
