File transmission method and device
By identifying short video data streams and establishing TCP long connections, the transmission of short videos is optimized, solving the problems of lag and low picture quality during short video transmission, and improving the user experience.
Patent Information
- Application Number
- CN202110719107.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-28
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2041-06-28
AI Technical Summary
The existing network transmission protocol fails to be effectively optimized when transmitting short videos, resulting in freezes and low picture quality, affecting the user experience.
The data stream is optimized through the information carried by the data stream or pre-configured policies, and a TCP proxy is deployed to establish a TCP long connection for transmission, thereby optimizing the transmission of short video data streams.
It increases data transmission rate, reduces transmission delay, and improves user experience.
Smart Images

Figure CN115604248B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a file transmission method and device. Background Art
[0002] Short videos are short videos, a way of disseminating Internet content. They are generally videos of less than 5 minutes in length that are disseminated on new Internet media. With the popularization of mobile terminals and the acceleration of the Internet, short, flat and fast high-traffic content has gradually gained the favor of major platforms, fans and capital.
[0003] For increasingly popular short files like short videos, network transmission protocols and network optimization haven't been optimized differently than for longer videos due to the change in video length. If a video of just a few minutes experiences lag or poor image quality, it will significantly impact the user experience. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a file transmission method and device, which can improve user experience.
[0005] To solve the above technical problems, the embodiments of the present invention provide the following technical solutions:
[0006] In one aspect, a file transmission method is provided, which is performed by a first device, the method comprising:
[0007] Identifying a first data flow for optimization processing through first information carried by the data flow or a pre-configured policy;
[0008] A Transmission Control Protocol TCP proxy is deployed, a TCP persistent connection is established with the terminal according to a pre-configured policy, and the first data stream is transmitted through the TCP persistent connection.
[0009] In some embodiments, the first information includes at least one of the following:
[0010] Uniform Resource Locator (URL) information;
[0011] Extended network layer header field information;
[0012] Application layer header field information.
[0013] In some embodiments, identifying the first data stream for optimization through the first information carried by the data stream includes at least one of the following:
[0014] If the characteristics of the data stream indicated by the URL information indicate that the data stream is a video data stream, and the duration of the video is less than a preset threshold, determining that the data stream is the first data stream;
[0015] If the characteristics of the data stream indicated by the extended network layer header field information indicate that the data stream is a video data stream, and the time length of the video is less than a preset threshold, determining that the data stream is the first data stream;
[0016] If the characteristics of the data stream indicated by the application layer header field information indicate that the data stream is a video data stream, and the time length of the video is less than a preset threshold, the data stream is determined to be the first data stream.
[0017] In some embodiments, the pre-configured strategy is: if the data stream is a video data stream, and the time length of the video is less than a preset threshold, then the data stream is the first data stream that needs to be optimized.
[0018] In some embodiments, the method further comprises:
[0019] A portion of the first data stream is sent to the terminal in advance.
[0020] In some embodiments, the first device is a network data transmission unit, and the network data transmission unit is a user plane function UPF or a public data network gateway PGW.
[0021] In some embodiments, the first device is a server, and the method specifically includes:
[0022] If it is determined that the first data stream to be played by the terminal is a video with a duration less than a preset threshold, prompting the user whether to start the video fast preloading service;
[0023] Upon receiving an instruction from a user to start a fast video preloading service, at least a portion of the first data stream is inserted into a currently transmitted data stream.
[0024] In some embodiments, the preset threshold is 3 minutes.
[0025] An embodiment of the present invention further provides a file transmission device, which is applied to a first device. The device includes a transceiver and a processor.
[0026] The processor is configured to identify a first data stream for optimization processing through first information carried by the data stream or a pre-configured policy;
[0027] The transceiver is used to deploy a Transmission Control Protocol TCP proxy, establish a TCP long connection with the terminal according to a pre-configured strategy, and transmit the first data stream through the TCP long connection.
[0028] In some embodiments, the first information includes at least one of the following:
[0029] Uniform Resource Locator (URL) information;
[0030] Extended network layer header field information;
[0031] Application layer header field information.
[0032] In some embodiments, the processor is configured to perform at least one of the following:
[0033] If the characteristics of the data stream indicated by the URL information indicate that the data stream is a video data stream, and the duration of the video is less than a preset threshold, determining that the data stream is the first data stream;
[0034] If the characteristics of the data stream indicated by the extended network layer header field information indicate that the data stream is a video data stream, and the time length of the video is less than a preset threshold, determining that the data stream is the first data stream;
[0035] If the characteristics of the data stream indicated by the application layer header field information indicate that the data stream is a video data stream, and the time length of the video is less than a preset threshold, the data stream is determined to be the first data stream.
[0036] In some embodiments, the pre-configured strategy is: if the data stream is a video data stream, and the time length of the video is less than a preset threshold, then the data stream is the first data stream that needs to be optimized.
[0037] In some embodiments, the transceiver is further configured to send a portion of the first data stream to the terminal in advance.
[0038] In some embodiments, the first device is a network data transmission unit, and the network data transmission unit is a user plane function UPF or a public data network gateway PGW.
[0039] In some embodiments, the first device is a server, and the transceiver is used to prompt the user whether to start the video fast preloading service if it determines that the first data stream to be played by the terminal is a video with a time length less than a preset threshold; upon receiving the user's instruction to start the video fast preloading service, insert at least part of the first data stream into the currently transmitted data stream.
[0040] In some embodiments, the preset threshold is 3 minutes.
[0041] An embodiment of the present invention further provides a file transmission device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor; when the processor executes the program, the file transmission method described above is implemented.
[0042] In some embodiments, the first information includes at least one of the following:
[0043] Uniform Resource Locator (URL) information;
[0044] Extended network layer header field information;
[0045] Application layer header field information.
[0046] In some embodiments, the processor is configured to perform at least one of the following:
[0047] If the characteristics of the data stream indicated by the URL information indicate that the data stream is a video data stream, and the duration of the video is less than a preset threshold, determining that the data stream is the first data stream;
[0048] If the characteristics of the data stream indicated by the extended network layer header field information indicate that the data stream is a video data stream, and the time length of the video is less than a preset threshold, determining that the data stream is the first data stream;
[0049] If the characteristics of the data stream indicated by the application layer header field information indicate that the data stream is a video data stream, and the time length of the video is less than a preset threshold, the data stream is determined to be the first data stream.
[0050] In some embodiments, the pre-configured strategy is: if the data stream is a video data stream, and the time length of the video is less than a preset threshold, then the data stream is the first data stream that needs to be optimized.
[0051] In some embodiments, the processor is further configured to send part of the first data stream to the terminal in advance. In some embodiments, the first device is a network data transmission unit, and the network data transmission unit is a user plane function UPF or a public data network gateway PGW.
[0052] In some embodiments, the first device is a server, and the processor is used to prompt the user whether to start the video fast preloading service if it determines that the first data stream to be played by the terminal is a video with a time length less than a preset threshold; and upon receiving the user's instruction to start the video fast preloading service, insert at least part of the first data stream into the currently transmitted data stream.
[0053] In some embodiments, the preset threshold is 3 minutes.
[0054] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program, which implements the steps of the above-mentioned file transmission method when executed by a processor.
[0055] The embodiments of the present invention have the following beneficial effects:
[0056] In the above solution, the first data stream for optimization is identified through the first information carried by the data stream or a pre-configured policy. A Transmission Control Protocol (TCP) proxy is deployed, and a TCP persistent connection is established with the terminal according to the pre-configured policy. The first data stream is transmitted via the TCP persistent connection. This optimizes the transmission of the first data stream, increases the data transmission rate, and reduces the transmission delay of the first data stream. This allows the identification of data streams requiring transmission optimization, such as short video data streams, and the implementation of corresponding transmission optimization measures to improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 This is a schematic diagram of the TCP three-way handshake;
[0058] Figure 2 Schematic diagram of the process of a file transmission method according to an embodiment of the present invention;
[0059] Figure 3 A schematic diagram of a URL extension identifier according to an embodiment of the present invention;
[0060] Figure 4 This is a schematic diagram of the IP header option field expansion according to an embodiment of the present invention;
[0061] Figure 5 A schematic diagram of establishing a TCP long connection according to an embodiment of the present invention;
[0062] Figure 6 A schematic diagram of a client requesting preloading according to an embodiment of the present invention;
[0063] Figure 7 A schematic diagram of a server request preloading according to an embodiment of the present invention;
[0064] Figure 8 This is a schematic structural diagram of a file transmission device according to an embodiment of the present invention;
[0065] Figure 9 Schematic diagram of the composition of a file transmission device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0066] In order to make the technical problems, technical solutions and advantages to be solved by the embodiments of the present invention clearer, they will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0067] There are two main methods for transmitting multimedia information, such as audio / video (A / V), over the Internet: downloading and streaming. A / V files are generally large, requiring significant storage capacity. Furthermore, due to network bandwidth limitations, downloads can often take minutes or even hours, leading to significant latency when using a downloading method. Streaming involves the continuous, real-time transmission of time-based media, such as audio, video, or animation, from an audio / video server to the user's computer. Users don't have to wait for the entire file to download. Instead, they can start viewing after a certain amount of data has been transferred, after a few seconds or even tens of seconds. This significantly reduces user wait time. While time-based media, such as audio, is playing on the client, the remaining portion of the file continues to download from the server in the background. Streaming not only reduces startup latency by tenfold or even a hundredfold, but also requires less cache capacity. Streaming avoids the disadvantage of having to wait for the entire file to download from the Internet before viewing.
[0068] Streaming media refers to continuous time-based media that uses streaming transmission technology on the Internet / Intranet, such as audio, video or multimedia files.
[0069] Streaming media does not download the entire file before playing, but only stores the beginning part of the content in memory. The data stream of streaming media is transmitted and played at any time, but there is some delay at the beginning. The key technology to achieve streaming media is streaming transmission.
[0070] Sequential streaming is a method of sequential downloading, allowing users to watch online media while the file is being downloaded. At any given moment, users can only watch the portion that has already been downloaded and cannot skip to the previous portion. Unlike real-time streaming, sequential streaming does not adjust to the user's connection speed during transmission. Because standard HTTP servers can send files in this format and no special protocols are required, it is often referred to as HTTP streaming. Sequential streaming is ideal for high-quality, short segments such as intros, end credits, and advertisements. Because the portion of the file to be viewed before playback is losslessly downloaded, this method ensures the final quality of the movie. However, this means that users must experience a delay before watching, especially over slower connections.
[0071] HTTP, or HyperText Transfer Protocol, is an application layer protocol. Typically, a client sends a request to establish a TCP connection to a server's designated port (default port 80). The HTTP download method treats all data as files and does not support real-time streaming. Essentially, it downloads a video file from the server. The client then uses the header information and partial video frame data in the video file to decode and play it.
[0072] Http protocol generally supports Range-request, which is often used in multi-threaded downloading, that is, multiple threads are used to request part of the file data, and the starting offset number of different threads is set, and the download is started at the same time. After the header of the video file is parsed on the client, the frame position of the subsequent video can be determined to meet the requirements of watching videos on the Internet. There will generally be buffering when watching. The advantages of using http protocol to play videos: a general http server can be used to provide services, and there is no need to build a dedicated streaming media server. A general CDN can be used to simplify the deployment and distribution of videos and reduce bandwidth usage. Most video websites currently provide on-demand video services based on this.
[0073] Progressive download is a term used to describe the transmission of media files from a server to a client, typically using the HTTP protocol. The user can play the media file before it has finished downloading. Progressive download differs from streaming media in how the end-user device receives and stores the digital media data.
[0074] The media player can progressively download and play digital media files that rely on the complete metadata in the file header and the presence of a local buffer already downloaded from the server. When a certain amount of data is available to the playback device, the media file begins playing.
[0075] HLS (HTTP Live Streaming), a dynamic bitrate adaptive technology launched by Apple, is a streaming network transmission protocol for terminal video playback. It includes an m3u8 index file, TS media segmentation file and key encryption string file. It should also be based on the http protocol. Its principle is to divide the entire stream into small, HTTP-based segment files for download, downloading some at a time, and using the addresses of video files with different bitrates given in the index file. The client downloads the same resource at different rates from many different backup sources based on the bandwidth available, and adaptively selects video files with appropriate bitrates to play.
[0076] HTTPS (Secure Hypertext Transfer Protocol) is a secure communication channel developed based on HTTP for exchanging information between a client computer and a server. It uses the Secure Sockets Layer (SSL) for information exchange. Simply put, it is a secure version of HTTP, using TLS / SSL encryption.
[0077] The HTTP protocol uses plain text to transmit information, which poses the risk of information eavesdropping, information tampering, and information hijacking. The TLS / SSL protocol has the functions of authentication, information encryption, and integrity verification, which can avoid such problems.
[0078] TLS / SSL stands for Transport Layer Security. It is a security protocol between TCP and HTTP. It does not affect the original TCP and HTTP protocols. Therefore, using HTTPS basically does not require much modification to HTTP pages.
[0079] TCP (Transmission Control Protocol) is a connection-oriented protocol, which means that before sending or receiving data, you must first establish a connection with the other party.
[0080] A TCP connection must go through three "conversations" to establish, a complex process. Here's a brief description of these three conversations: Host A sends a connection request packet to Host B, "I want to send you data, is that okay?" This is the first conversation. Host B sends a packet to Host A agreeing to the connection and requesting synchronization (synchronization means one host sends and the other receives, coordinating their work). "Sure, when will you send it?" This is the second conversation. Host A then sends another packet to confirm Host B's synchronization request, "I'll send it now, you can continue!" This is the third conversation. These three "conversations" synchronize the sending and receiving of data packets. Only after these three "conversations" can Host A officially send data to Host B.
[0081] like Figure 1 As shown, first the Client sends a connection request, that is, SYN=1ACK=0 (see the introduction of the header field). TCP stipulates that when SYN=1, no data can be carried, but a sequence number must be consumed. Therefore, its 32-bit sequence number is declared to be seq=x. Then the Server replies for confirmation, that is, SYN=1ACK=1seq=y,ack=x+1. Then the Client confirms again, but does not use SYN. At this time, it is ACK=1,seq=x+1,ack=y+1.
[0082] When transmitting long files, such as long videos, using HTTP progressive streaming, the terminal's cache can mitigate delays caused by poor network transmission quality. When using HTTP Live Streaming, the first few segments can be adapted to a low bitrate and quickly fill the terminal's cache. For example, in a two-hour video file, even if there are some pauses or poor video quality in the first 0-2 minutes, the overall user experience will not be significantly impacted.
[0083] For video files, accessing each file typically requires initiating a new TCP connection, which requires a three-way handshake and TCP slow motion. This connection establishment process significantly increases the overall transmission time for longer videos.
[0084] For increasingly popular short files like short videos, network transmission protocols and network optimization haven't been optimized differently than for longer videos due to the change in video length. If a video of just a few minutes experiences lag or poor image quality, it will significantly impact the user experience.
[0085] The embodiments of the present invention provide a file transmission method and device, which can improve user experience.
[0086] The embodiment of the present invention provides a file transmission method, which is executed by a first device, such as Figure 2 As shown, the method includes:
[0087] Step 101: Identify a first data flow to be optimized through first information carried by the data flow or a pre-configured policy;
[0088] Step 102: deploy a Transmission Control Protocol TCP proxy, establish a TCP persistent connection with the terminal according to a pre-configured policy, and transmit the first data stream through the TCP persistent connection.
[0089] In this embodiment, a first data stream for optimization is identified using first information carried by the data stream or a pre-configured policy. A Transmission Control Protocol (TCP) proxy is deployed, and a TCP persistent connection is established with the terminal according to the pre-configured policy. The first data stream is transmitted via the TCP persistent connection, thereby optimizing the transmission of the first data stream, increasing the data transmission rate, and reducing the transmission delay of the first data stream. This allows data streams requiring transmission optimization, such as short video data streams, to be identified, allowing appropriate transmission optimization measures to be taken to improve the user experience.
[0090] In some embodiments, the first information includes at least one of the following:
[0091] Uniform Resource Locator (URL) information;
[0092] Extended network layer header field information;
[0093] Application layer header field information.
[0094] In some embodiments, identifying the first data stream for optimization through the first information carried by the data stream includes at least one of the following:
[0095] If the characteristics of the data stream indicated by the URL information indicate that the data stream is a video data stream, and the duration of the video is less than a preset threshold, determining that the data stream is the first data stream;
[0096] If the characteristics of the data stream indicated by the extended network layer header field information indicate that the data stream is a video data stream, and the time length of the video is less than a preset threshold, determining that the data stream is the first data stream;
[0097] If the characteristics of the data stream indicated by the application layer header field information indicate that the data stream is a video data stream, and the time length of the video is less than a preset threshold, the data stream is determined to be the first data stream.
[0098] In some embodiments, the pre-configured strategy is: if the data stream is a video data stream, and the time length of the video is less than a preset threshold, then the data stream is the first data stream that needs to be optimized.
[0099] In some embodiments, the method further comprises:
[0100] A portion of the first data stream is sent to the terminal in advance.
[0101] In some embodiments, the first device is a network data transmission unit, and the network data transmission unit is a user plane function UPF or a public data network gateway PGW.
[0102] In some embodiments, for a terminal, the operations performed include:
[0103] If it is determined that the first data stream to be played by the terminal is a video with a duration less than a preset threshold, prompting the user whether to start the video fast preloading service;
[0104] An instruction to start a fast video preloading service is received from a user, and at least a portion of the first data stream is pre-downloaded.
[0105] In some embodiments, the first device is a server, and the method specifically includes:
[0106] If it is determined that the first data stream to be played by the terminal is a video with a duration less than a preset threshold, prompting the user whether to start the video fast preloading service;
[0107] Upon receiving an instruction from a user to start a fast video preloading service, at least a portion of the first data stream is inserted into a currently transmitted data stream.
[0108] In some embodiments, the preset threshold is 3 minutes.
[0109] The technical solution of the present invention is further described below in conjunction with specific embodiments:
[0110] Example 1:
[0111] This embodiment uses an optimized URL naming scheme to indicate network file characteristics, such as whether the file is a video service and the file length. This allows the network to determine whether files in a service flow require priority scheduling based on information such as video and file length. This embodiment effectively allows differentiated processing of services even if the server's IP address changes, as long as the same specific URL address is maintained.
[0112] Take a video URL on a certain video website as an example. Its current URL address is: https: / / vip.iqiyi.com / waimeizhy_pc.html?fv=a1dafac4975723d9&bd_vid=11591597467728217423
[0113] Among them, https: / / vip.iqiyi.com / waimeizhy_pc.html generally indicates the server address where it is located, fv=a1dafac4975723d9 generally indicates its video format, and bd_vid=11591597467728217423 generally indicates its video ID. The present invention proposes to add file type and length information to the URL, such as
[0114] https: / / vip.iqiyi.com / waimeizhy_pc.html?fv=a1dafac4975723d9&bd_vid=11591597467728217423&type=video&lenth=123
[0115] The information indicating the characteristics of the network file, such as type=video, length=123, can be encrypted using an encryption algorithm jointly negotiated by the content provider and the network service provider to prevent theft.
[0116] like Figure 3 As shown, in this embodiment, user 1 initiates access to video service A (2 minutes), and a PDU session is established between the UE and UPF; user 2 initiates access to video service B (1 hour), and a PDU session is established between the UE and UPF; the UPF determines whether to optimize the transmission of this service flow based on the specific tag on the URL address sent by the UE, and the UPF determines to perform the same optimization processing on subsequent identical IP five-tuples based on the identifier; without considering other reasons, the UPF identifies the video A service and schedules it first.
[0117] Example 2:
[0118] This embodiment extends the IP header field to indicate network file characteristics, such as whether the file is a video service and the file length, for files encrypted at the application layer. This allows network data transmission entities (such as 5G UPF and 4G PGW) to determine whether files in this service flow should be prioritized based on information such as video and file length.
[0119] like Figure 4 The figure shows the extended diagram of the option field in the IP header.
[0120] Example 3:
[0121] This embodiment implements the establishment and maintenance of a long TCP connection between the UE and the network data transmission unit and the establishment and maintenance of an end-to-end TCP connection between the UPF and the DN by deploying a TCP proxy on the network data transmission unit (such as the UPF of 5G and the PGW of 4G). Figure 5 Taking 5G as an example, the TCP proxy function deployed on the 5G UPF determines the establishment and maintenance of a persistent connection between the UE and the UPF based on configured policies, such as the time period, UE ID, destination IP address, and DNN. As shown in step 3 of the following flowchart, in step 7, the TCP setup packet checks for the persistent connection establishment indicator. Following the instruction in step 7, the UE does not re-establish a persistent TCP connection between the UE and the UPF for subsequent service requests, but instead directly sends data requests. This minimizes the latency wasted by the frequent TCP three-way handshake process in the short video.
[0122] Example 4:
[0123] This embodiment first collects user usage information on the UE side and analyzes user preferences through big data. Then, it collects relevant videos uploaded on the server based on user preferences and recommends them in proportion to different video sizes.
[0124] The specific process of this embodiment is as follows Figure 6As shown, when a user clicks on a video they want to watch, the video is streamed, and this task should be given the highest priority. The requested video is determined and analyzed based on the file type and length information in the video HTTP header. A threshold of 3 minutes is set for video file length. If the video is longer than 3 minutes, other videos likely to be clicked are not pre-cached. If the user clicks on a shorter video under 3 minutes, smaller videos that are likely to be played next based on big data analysis are pre-downloaded and cached. The number of pre-downloaded videos should, if possible, include all videos on the video recommendation page, but the cache size should be limited to ensure a connection to the next video and a normal viewing time of approximately 10 seconds. Note that the cache space for pre-downloaded videos should be separate from the cache space for the currently playing video to prevent pre-downloads from impacting the ongoing download-while-play task.
[0125] The UE determines the length of the video requested by the user. If it is less than 3 minutes, it can present the user with an option to start the video fast preloading service. If the user clicks "Yes", the process of automatically preloading recommended videos will begin. If the user clicks "No", the UE does not take any other action.
[0126] Embodiment 5:
[0127] The difference between this embodiment and the fourth embodiment is that in this embodiment, the subject that determines to pre-buffer the video push is the server.
[0128] The specific process of this embodiment is as follows Figure 7 As shown, when the user clicks on the video he wants to watch, the video is streamed, and this task should be the highest priority at this time. The server makes a judgment and analysis on the video requested by the user based on the video type and length information, and sets the video file length threshold, taking the threshold of 3 minutes as an example. If it is a large video of more than 3 minutes, other videos that may be clicked will not be pre-pushed and cached. If it is a short video of less than 3 minutes, the server determines the video that needs to be pre-pushed, and inserts one or more other videos of a set time (such as less than or equal to 10s) at the end of the video file requested by the user.
[0129] This embodiment leverages the user's already established connection to insert a portion of the next video or videos that might be clicked onto the end of the currently transmitted message frame without affecting the playback of the existing video. This data is then isolated and cached, further shortening the loading time of videos that might be played later. This ensures that even if a new streaming connection is not established, the viewing of the new video will not be affected, thus creating more time for establishing a new video connection. The next videos that might be played can be ranked based on analysis of relevant big data, and the data for the most likely videos can be transmitted sequentially, starting with the most likely videos.
[0130] In step 2, after the server determines the policy and before inserting the pushed video, the user may be prompted to decide whether to enable the video fast preloading service. If the user clicks "Yes", the process of automatically preloading recommended videos begins. If the user clicks "No", the UE does not perform any other processing.
[0131] This embodiment can provide a method for identifying short video services based on the length of videos watched by users to perform network adaptation services. At the same time, it can pre-cache videos that may be played later and impose a limit on the cache size to avoid excessive traffic loss.
[0132] The embodiment of the present invention further provides a file transmission device, which is applied to a first device, such as Figure 8 As shown, the device includes a transceiver 11 and a processor 12.
[0133] The processor 12 is configured to identify a first data flow for optimization processing through first information carried by the data flow or a pre-configured policy;
[0134] The transceiver 11 is used to deploy a Transmission Control Protocol TCP proxy, establish a TCP persistent connection with the terminal according to a pre-configured policy, and transmit the first data stream through the TCP persistent connection.
[0135] In some embodiments, the first information includes at least one of the following:
[0136] Uniform Resource Locator (URL) information;
[0137] Extended network layer header field information;
[0138] Application layer header field information.
[0139] In some embodiments, the processor is configured to perform at least one of the following:
[0140] If the characteristics of the data stream indicated by the URL information indicate that the data stream is a video data stream, and the duration of the video is less than a preset threshold, determining that the data stream is the first data stream;
[0141] If the characteristics of the data stream indicated by the extended network layer header field information indicate that the data stream is a video data stream, and the time length of the video is less than a preset threshold, determining that the data stream is the first data stream;
[0142] If the characteristics of the data stream indicated by the application layer header field information indicate that the data stream is a video data stream, and the time length of the video is less than a preset threshold, the data stream is determined to be the first data stream.
[0143] In some embodiments, the pre-configured strategy is: if the data stream is a video data stream, and the time length of the video is less than a preset threshold, then the data stream is the first data stream that needs to be optimized.
[0144] In some embodiments, the transceiver 11 is further configured to send a portion of the first data stream to the terminal in advance.
[0145] In some embodiments, the first device is a network data transmission unit, and the network data transmission unit is a user plane function UPF or a public data network gateway PGW.
[0146] In some embodiments, the first device is a server, and the transceiver 11 is used to prompt the user whether to start the video fast preloading service if it is determined that the first data stream to be played by the terminal is a video with a time length less than a preset threshold; upon receiving the user's instruction to start the video fast preloading service, insert at least part of the first data stream into the currently transmitted data stream.
[0147] In some embodiments, the preset threshold is 3 minutes.
[0148] The embodiment of the present invention also provides a file transmission device, such as Figure 9 As shown, it includes a memory 21, a processor 22, and a computer program stored in the memory 21 and capable of running on the processor 22; when the processor 22 executes the program, the file transmission method as described above is implemented.
[0149] In some embodiments, the first information includes at least one of the following:
[0150] Uniform Resource Locator (URL) information;
[0151] Extended network layer header field information;
[0152] Application layer header field information.
[0153] In some embodiments, the processor is configured to perform at least one of the following:
[0154] If the characteristics of the data stream indicated by the URL information indicate that the data stream is a video data stream, and the duration of the video is less than a preset threshold, determining that the data stream is the first data stream;
[0155] If the characteristics of the data stream indicated by the extended network layer header field information indicate that the data stream is a video data stream, and the time length of the video is less than a preset threshold, determining that the data stream is the first data stream;
[0156] If the characteristics of the data stream indicated by the application layer header field information indicate that the data stream is a video data stream, and the time length of the video is less than a preset threshold, the data stream is determined to be the first data stream.
[0157] In some embodiments, the pre-configured strategy is: if the data stream is a video data stream, and the time length of the video is less than a preset threshold, then the data stream is the first data stream that needs to be optimized.
[0158] In some embodiments, the processor 22 is further configured to send a portion of the first data stream to the terminal in advance.
[0159] In some embodiments, the first device is a network data transmission unit, and the network data transmission unit is a user plane function UPF or a public data network gateway PGW.
[0160] In some embodiments, the first device is a terminal, and the processor 22 is used to prompt the user whether to start the video fast preloading service if it determines that the first data stream to be played by the terminal is a video with a time length less than a preset threshold; and pre-download at least part of the first data stream upon receiving the user's instruction to start the video fast preloading service.
[0161] In some embodiments, the first device is a server, and the processor 22 is used to prompt the user whether to start the video fast preloading service if it determines that the first data stream to be played by the terminal is a video with a time length less than a preset threshold; and upon receiving the user's instruction to start the video fast preloading service, insert at least part of the first data stream into the currently transmitted data stream.
[0162] In some embodiments, the preset threshold is 3 minutes.
[0163] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program, which implements the steps of the above-mentioned file transmission method when executed by a processor.
[0164] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage terminal devices to be detected, or any other non-transmission media that can be used to store information that can be accessed by the computer terminal devices to be detected. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0165] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. A file transmission method, characterized in that: Executed by a first device, the method includes: Identifying a first data flow for optimization processing through first information carried by the data flow or a pre-configured policy; Deploy a Transmission Control Protocol TCP proxy, establish a TCP persistent connection with the terminal according to a pre-configured policy, and transmit the first data stream through the TCP persistent connection; The first information includes at least one of the following: Uniform Resource Locator (URL) information; Extended network layer header field information; Application layer header information; The pre-configured strategy is: if the data stream is a video data stream, and the time length of the video is less than a preset threshold, then the data stream is the first data stream that needs to be optimized; The step of identifying the optimized first data stream through the first information carried by the data stream includes at least one of the following: If the characteristics of the data stream indicated by the URL information indicate that the data stream is a video data stream, and the duration of the video is less than a preset threshold, determining that the data stream is the first data stream; If the characteristics of the data stream indicated by the extended network layer header field information indicate that the data stream is a video data stream, and the time length of the video is less than a preset threshold, determining that the data stream is the first data stream; If the characteristics of the data stream indicated by the application layer header field information indicate that the data stream is a video data stream, and the time length of the video is less than a preset threshold, the data stream is determined to be the first data stream.
2. The file transmission method according to claim 1, wherein: The method further comprises: A portion of the first data stream is sent to the terminal in advance.
3. The file transmission method according to claim 1, wherein: The first device is a network data transmission unit, and the network data transmission unit is a user plane function UPF or a public data network gateway PGW.
4. The file transmission method according to claim 1, wherein: The first device is a server, and the method specifically includes: If it is determined that the first data stream to be played by the terminal is a video with a duration less than a preset threshold, prompting the user whether to start the video fast preloading service; Upon receiving an instruction from a user to start a fast video preloading service, at least a portion of the first data stream is inserted into a currently transmitted data stream.
5. The file transmission method according to claim 1, wherein: The preset threshold is 3 minutes.
6. A file transmission device, characterized in that: Applied to a first device, the apparatus includes a transceiver and a processor, The processor is configured to identify a first data stream for optimization processing through first information carried by the data stream or a pre-configured policy; The transceiver is used to deploy a Transmission Control Protocol TCP proxy, establish a TCP persistent connection with the terminal according to a pre-configured policy, and transmit the first data stream through the TCP persistent connection; The first information includes at least one of the following: Uniform Resource Locator (URL) information; Extended network layer header field information; Application layer header information; The pre-configured strategy is: if the data stream is a video data stream, and the time length of the video is less than a preset threshold, then the data stream is the first data stream that needs to be optimized; The processor is configured to perform at least one of the following: If the characteristics of the data stream indicated by the URL information indicate that the data stream is a video data stream, and the duration of the video is less than a preset threshold, determining that the data stream is the first data stream; If the characteristics of the data stream indicated by the extended network layer header field information indicate that the data stream is a video data stream, and the time length of the video is less than a preset threshold, determining that the data stream is the first data stream; If the characteristics of the data stream indicated by the application layer header field information indicate that the data stream is a video data stream, and the time length of the video is less than a preset threshold, the data stream is determined to be the first data stream.
7. A file transfer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor; When the processor executes the program, the file transmission method according to any one of claims 1 to 5 is implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the file transmission method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Method and system for transmitting and processing data among network servers
CN105323183A
Content data preloading method and device
CN110868626A