Long video file transmission method, device, equipment, storage medium and program product
By including preset tags in the video index request, the server continuously pushes the video index file, solving the low playback rate and lag problems caused by video file transfer, and improving video playback efficiency and network transmission efficiency.
Patent Information
- Application Number
- CN202211574083.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-08
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2042-12-08
AI Technical Summary
In the prior art, the video file transfer mechanism leads to a low playback rate of video files, which is prone to lag, affecting the video playback efficiency.
By including preset tags in the video index request, the server continuously pushes the first-level index file and the second-level index file when receiving the video index request, and directly pushes the second-level index file after the first-level index file is pushed. Avoid transmission link emptying.
This improves the video output rate, reduces the stutter rate during video playback, and improves the transmission efficiency of network links.
Smart Images

Figure CN116016996B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of data processing technology, and in particular to a method, device, equipment, storage medium and program product for transmitting a long video file. Background Art
[0002] With the development of multimedia and network technology, video files have become a popular and mainstream multimedia interaction method. For video files, they can be roughly divided into short videos and long videos according to the length of the video files.
[0003] In the related art, when a client obtains a long video file from a server, the client first obtains the video file index corresponding to the long video file from the server, and after receiving the video file index, further obtains the video segment file based on the video file index. In the process of obtaining the video file index, the first-level index file is first obtained, and after receiving the first-level index file, the second-level index file is obtained; in the process of obtaining the video segment file, the first segment file is first obtained, and after receiving the first segment file, the second segment file is requested, and so on until all video files are obtained. The above-mentioned video file transmission mechanism is not conducive to the fast playback of video files, and it is easy to cause the video playback to be stuck. Summary of the invention
[0004] The embodiments of the present application provide a long video file transmission method, device, equipment, storage medium and program product, which solve the problems of low video file playback rate and easy occurrence of freeze phenomenon caused by the video transmission mechanism in the related technology, improve the video playback rate, and reduce the freeze rate during video playback.
[0005] In a first aspect, an embodiment of the present application provides a long video file transmission method, which is applied to a server, and the method includes:
[0006] Upon receiving a video index request sent by a client, determining a primary index file corresponding to the video index request and pushing the primary index file, wherein the video index request includes a preset mark for indicating continuous sending of the video index file;
[0007] When the primary index file is pushed to the preset file location, a push notification of the secondary index file is sent to the client;
[0008] After the primary index file is pushed, the secondary index file is pushed.
[0009] In a second aspect, the embodiment of the present application further provides a long video file transmission method, which is applied to a client, comprising:
[0010] Sending a video index request to a server, wherein the video index request includes a preset mark for indicating continuous sending of the video index file;
[0011] Receive the video index file pushed by the server based on the video index request, and after the video index file is received, send a first fragment file request, so that the server pushes the first fragment file and the second fragment file based on the first fragment file request, and the first fragment file request includes the fragment address information of the second fragment file.
[0012] In a third aspect, the embodiment of the present application further provides a long video file transmission device, including:
[0013] A first index pushing module is configured to, upon receiving a video index request sent by a client, determine a primary index file corresponding to the video index request and push the primary index file, wherein the video index request includes a preset mark for indicating continuous sending of the video index file;
[0014] A notification sending module, configured to send a push notification of the secondary index file to the client when the primary index file is pushed to a preset file location;
[0015] The second index pushing module is configured to push the secondary index file after the primary index file is pushed.
[0016] In a fourth aspect, the embodiment of the present application further provides another long video file transmission device, including:
[0017] A first request sending module, configured to send a video index request to a server, wherein the video index request includes a preset mark for indicating continuous sending of a video index file;
[0018] A data receiving module, configured to receive the video index file pushed by the server based on the video index request;
[0019] The second request sending module is configured to send a first fragment file request after the video index file is received, so that the server pushes the first fragment file and the second fragment file based on the first fragment file request, and the first fragment file request includes the fragment address information of the second fragment file.
[0020] In a fifth aspect, an embodiment of the present application further provides a long video file transmission device, the device comprising:
[0021] one or more processors;
[0022] a storage device for storing one or more programs,
[0023] When the one or more programs are executed by the one or more processors, the one or more processors implement the long video file transmission method described in the embodiment of the present application.
[0024] In a sixth aspect, an embodiment of the present application further provides a non-volatile storage medium storing computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute the long video file transmission method described in the embodiment of the present application.
[0025] In the seventh aspect, an embodiment of the present application also provides a computer program product, which includes a computer program, which is stored in a computer-readable storage medium, and at least one processor of the device reads and executes the computer program from the computer-readable storage medium, so that the device executes the long video file transmission method described in the embodiment of the present application.
[0026] In an embodiment of the present application, when the server receives a video index request sent by a client, it determines the first-level index file corresponding to the video index request and pushes it, wherein the video index request includes a preset mark for indicating the continuous sending of the video index file. When the first-level index file is pushed to the preset file location, a push notification of the second-level index file is sent to the client, and after the first-level index file is pushed, the second-level index file is pushed, thereby achieving continuous pushing of the first-level index file and the second-level index file, avoiding the problem of gaps in the transmission link during the video file transmission process, which affects the client video playback efficiency, due to the need to wait for the client to send a request to obtain the second-level index file and then push the second-level index file after the first-level index file is pushed. This can improve the video playback rate, improve the transmission efficiency of the network link, and at the same time reduce the client's freeze rate when playing the video. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 A timing diagram of a long video file transmission method in a related art provided in an embodiment of the present application;
[0028] Figure 2 A flowchart of a long video file transmission method provided in an embodiment of the present application;
[0029] Figure 3 A flowchart of a method for pushing a primary index file provided in an embodiment of the present application;
[0030] Figure 4 A flowchart of a method for pushing video segment files provided in an embodiment of the present application;
[0031] Figure 5 A timing diagram of a long video file transmission method provided in an embodiment of the present application;
[0032] Figure 6 A flowchart of another long video file transmission method is provided for an embodiment of the present application;
[0033] Figure 7 A structural block diagram of a long video file transmission device provided in an embodiment of the present application;
[0034] Figure 8 A structural block diagram of another long video file transmission device provided in an embodiment of the present application;
[0035] Fig. 9 A schematic diagram of the structure of a long video file transmission device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] The embodiments of the present application are further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the embodiments of the present application, rather than to limit the embodiments of the present application. It should also be noted that, for ease of description, only parts related to the embodiments of the present application are shown in the accompanying drawings, rather than all structures.
[0037] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0038] The long video file transmission method provided in the embodiment of the present application can be applied to the transmission of long video files. Among them, the long video can be exemplarily a video with a video playback time greater than 3 minutes or 5 minutes, such as a 30-minute or 60-minute video. In the transmission process of long video files, taking the example of a client obtaining a video file from a server for playing a long video, the client first obtains the video index of the long video file, and then obtains the corresponding video file content based on the video index, so as to play the corresponding video file after receiving the corresponding video file that meets the broadcast requirements. Exemplarily, Figure 1A timing diagram of a long video file transmission method in a related technology provided for an embodiment of the present application, including: S1, the client sends a first-level index file request to the server, after the server receives the first-level index file request, executes S2, sends the corresponding first-level index file to the client, after the client receives the first-level index file, executes S3, sends a second-level index file request to the server, after the server receives the second-level index file request, executes S4, sends the corresponding second-level index file to the client, after the client receives the second-level index file, executes S5, sends a first fragment file request to the server based on the address information of the first fragment file recorded in the second-level index file, after the server receives the first fragment file request, executes S6, sends the corresponding first fragment file to the client, after the client receives the first fragment file, executes S7, sends a second fragment file request, after the server receives the second fragment file request, executes S8 to send the corresponding second fragment file to the client, and so on until all fragment files of the long video file are downloaded by the client.
[0039] Figure 2 A flowchart of a long video file transmission method provided in an embodiment of the present application specifically includes the following steps:
[0040] Step S101: upon receiving a video index request sent by a client, determining a primary index file corresponding to the video index request and pushing the file, wherein the video index request includes a preset mark for indicating continuous sending of the video index file.
[0041] In one embodiment, the transmission process of the video file includes the transmission of the video index file and the transmission of the video segment file. During the video playback process, the client first sends a video index request to the server, wherein the video played by the client may be a movie, variety show, TV series, documentary or other types of long videos.
[0042] In one embodiment, when the server receives the video index request, it determines the corresponding first-level index file according to the video index request. Exemplarily, the client obtains the corresponding first-level index file from the server by sending a request containing the address information of the first-level index file. Different from the related art, the video index request in this scheme includes a preset mark, which is used to indicate the continuous sending of the video index file. Optionally, the video file transmission process includes the transmission of the first-level index file and the transmission of the second-level index file, wherein the content recorded in the first-level index file includes the address pointing to the second-level index file, and the content recorded in the second-level index file includes the address pointing to the segment file of each video. Among them, the first-level index file is also used to describe the video as a multi-bitrate video, and the second-level index file records the addresses of the segment files with different bit rates.
[0043] Step S102: When the primary index file is pushed to a preset file location, a push notification of the secondary index file is sent to the client.
[0044] In one embodiment, when the server receives a video index request with a preset mark and indicating that the video index file is sent continuously, during the process of pushing the primary index file, if it is pushed to the preset file location, a push notification of the secondary index file is sent to the client. The preset file location can be adaptively adjusted, such as being set to the second to last fragment data contained in the primary index file, that is, when the primary index file is pushed, before the last fragment data is pushed, it is determined that it is pushed to the preset file location, and at this time, a push notification of the secondary index file is sent to the client. The push notification of the secondary index file is used to instruct the client to prepare the corresponding storage resources and storage paths to receive the secondary index file.
[0045] Step S103: After the first-level index file is pushed, the second-level index file is pushed.
[0046] In one embodiment, after the server completes pushing the primary index file, it directly pushes the secondary index file and sends it to the client, without waiting for the client to send another video index request after receiving the secondary index file. That is, the client sends a video index request once, and the server continuously pushes the video index file. The above example takes the video index file including the primary index file and the secondary index file as an example. In the case of including more levels of index files, continuous pushing is also performed.
[0047] From the above, it can be seen that when the server receives a video index request sent by the client, it determines the first-level index file corresponding to the video index request and pushes it, wherein the video index request includes a preset mark for indicating the continuous sending of the video index file. When the first-level index file is pushed to the preset file location, a push notification of the second-level index file is sent to the client, and after the first-level index file is pushed, the second-level index file is pushed, thereby realizing the continuous push of the first-level index file and the second-level index file, avoiding the problem that after the first-level index file is pushed, the client needs to wait for the client to send a request to obtain the second-level index file and then push the second-level index file, resulting in a gap in the transmission link during the video file transmission process, which affects the client video playback efficiency. It can improve the video playback rate, improve the transmission efficiency of the network link, and at the same time reduce the client's freeze rate when playing the video.
[0048] Optionally, after receiving the video index request sent by the client, the server may also obtain a preset tag in the video index request, and send a push notification of the secondary index file to the client when the preset tag indicates continuous transmission. The preset tag may be a tag setting in the video index request using a field pre-agreed by the client and the server, and the tag value specifically representing continuous transmission may be pre-set using a protocol. By adding a preset tag to the video index request to achieve continuous transmission of the video index file between the client and the server, the bandwidth of the transmission link is fully utilized, and transmission without gaps is achieved.
[0049] Optionally, before the server pushes the secondary index file, it also includes: determining the file selection strategy of the client, adjusting the secondary index file according to the file selection strategy, and pushing the adjusted secondary index file. The file selection strategy can be determined based on the historical playback data and / or current bandwidth of the client, such as determining the most commonly used gear for the historical playback of the video of the client as the basis for adjusting the secondary index file, or determining the corresponding gear based on the current bandwidth value. In one embodiment, the file selection strategy includes a gear priority. Assuming that the video to be played has a total of 5 optional gears, the gear strategy records 5 gears with high to low priorities. Optionally, the adjustment process of the secondary file can be: sorting different gear files in the secondary index file according to the gear priority in the file selection strategy, or selecting the gear file with the highest gear priority to obtain the adjusted secondary index file. For example, if the gear priority is high-definition, ultra-high-definition, and ordinary, the files indicating high-definition video segments in the secondary index file are sorted first, the files indicating ultra-high-definition video segments are sorted in the middle, and the files indicating ordinary video segments are sorted last; or only the files indicating high-definition video segments are retained. This optimizes the transmission of the secondary index file, so that the files related to the gear that is most likely to be played are transmitted to the client as soon as possible, improving the video playback rate when the client plays the video.
[0050] Figure 3 A flowchart of a method for pushing a primary index file provided in an embodiment of the present application, such as Figure 3 As shown, specifically including:
[0051] Step S201: upon receiving a video index request sent by a client, determine a primary index file corresponding to the video index request, add address information of the first video segment files of multiple different gears corresponding to the primary index file to the primary index file, and push it.
[0052] In one embodiment, during the push of the primary index file, the address information of the first video segment files of multiple different gears is added to the primary index file and sent to the client together. After receiving the specially customized primary index file, the client directly determines the address information of the first video segment file of the same gear based on the address information of the first video segment files of multiple different gears recorded therein and its own actual video playback gear, and directly obtains the first video segment file from the server based on the address information of the first video segment file, without waiting for the secondary index file to be received before obtaining the first video segment file.
[0053] Step S202: When the primary index file is pushed to a preset file location, a push notification of the secondary index file is sent to the client.
[0054] Step S203: After the first-level index file is pushed, the second-level index file is pushed.
[0055] From the above, it can be seen that by adding the address information of the first video fragment file to the first-level index file, the client can directly download the first video fragment file according to the address information after receiving the first-level index file, without having to wait for the second-level index file to be received before downloading the first video fragment file, thereby improving the video playback rate.
[0056] Figure 4 A flowchart of a method for pushing video segment files provided in an embodiment of the present application, such as Figure 4 As shown, specifically including:
[0057] Step S301: upon receiving a video index request sent by a client, determining a primary index file corresponding to the video index request and pushing the file, wherein the video index request includes a preset mark for indicating continuous sending of the video index file.
[0058] Step S302: When the primary index file is pushed to a preset file location, a push notification of the secondary index file is sent to the client.
[0059] Step S303: After the first-level index file is pushed, the second-level index file is pushed.
[0060] Step S304: Receive a first fragment file request sent by the client, where the first fragment file request includes fragment address information of a second fragment file.
[0061] Step S305: Push the first segment file corresponding to the first segment file request to the client, and after the first segment file is pushed, push the second segment file corresponding to the segment address information to the client.
[0062] In one embodiment, after receiving the first fragment file request from the client, the server directly determines the second fragment file based on the fragment address information of the second fragment file recorded in the first fragment file request, and directly pushes the second fragment file after the first fragment file is pushed to the client. The mechanism in the related technology is optimized, in which the client sends the first fragment file request and then sends the second fragment file request after waiting for and receiving the first fragment file, and the server transmits the second fragment file after receiving the second fragment file request, which can realize the continuous transmission of fragment files, shorten the overall communication interaction process between the client and the server, further improve the video playback rate of the client, and avoid the problem of increased freeze rate caused by multiple request interactions of fragment files.
[0063] Figure 5 A timing diagram of a long video file transmission method provided in an embodiment of the present application, such as Figure 5 As shown, an exemplary file transfer process of this solution is given, which includes:
[0064] S9. The client sends a video index request, where the video index request includes a preset mark for indicating continuous sending of video index files.
[0065] S10. When receiving a video index request sent by a client, the server determines the primary index file corresponding to the video index request and pushes it, including sending a push notification of the secondary index file to the client when the primary index file is pushed to a preset file location.
[0066] S11. After the primary index file is pushed, the secondary index file is pushed.
[0067] S12. After receiving the secondary index file, the client sends a first fragment file request, which includes fragment address information of the second fragment file.
[0068] S13: After receiving the request for the first segment file, the server completes pushing the first segment file and then continues pushing the second segment file.
[0069] Through the above-mentioned long video file transmission mechanism, the server can push video index files and video segment files continuously, avoiding the problem that after the first-level index file is pushed, the server needs to wait for the client to send a request to obtain the second-level index file and then push the second-level index file. As a result, there are gaps in the transmission link during the video file transmission process, which affects the client video playback efficiency. It can improve the video playback rate and the transmission efficiency of the network link, and at the same time reduce the client's freeze rate when playing the video.
[0070] Figure 6 A flowchart of another long video file transmission method is provided for an embodiment of the present application, which is applied to a client, such as Figure 6 As shown, specifically including:
[0071] Step S401: Send a video index request to a server, wherein the video index request includes a preset mark for indicating continuous sending of video index files.
[0072] In one embodiment, unlike related technologies, when sending a video index request, the client sets a preset tag in advance, wherein the preset tag can be a tag setting performed using a field pre-agreed by the client and the server in the video index request, and the tag value specifically representing continuous transmission can be pre-set by a protocol.
[0073] Step S402: receiving the video index file pushed by the server based on the video index request, and after the video index file is received, sending a first fragment file request, for the server to push the first fragment file and the second fragment file based on the first fragment file request, wherein the first fragment file request includes the fragment address information of the second fragment file.
[0074] In one embodiment, when the client sends a request for the first fragment file, the fragment address information of the second fragment file is attached thereto, so that the server can continuously transmit the first fragment file and the second fragment file upon receiving the first fragment request, thereby realizing continuous transmission of the fragment files, shortening the overall communication interaction process between the client and the server, and further improving the video playback rate of the client. At the same time, by adding a preset tag to the video index request to realize the continuous transmission of the video index file between the client and the server, the bandwidth of the transmission link is fully utilized, and transmission without gaps is realized.
[0075] Figure 7 This is a structural block diagram of a long video file transmission device provided in an embodiment of the present application. The device is used to execute the long video file transmission method provided in the above embodiment, and has the corresponding functional modules and beneficial effects of the execution method. Figure 7As shown, the device specifically includes: a first index pushing module 101, a notification sending module 102 and a second index pushing module 103, wherein:
[0076] The first index pushing module 101 is configured to, upon receiving a video index request sent by a client, determine the primary index file corresponding to the video index request and push it, wherein the video index request includes a preset mark for indicating continuous sending of the video index file;
[0077] Notification sending module 102, configured to send a push notification of the secondary index file to the client when the primary index file is pushed to a preset file location;
[0078] The second index pushing module 103 is configured to push the secondary index file after the primary index file is pushed.
[0079] It can be seen from the above scheme that when the server receives the video index request sent by the client, it determines the first-level index file corresponding to the video index request and pushes it, wherein the video index request includes a preset mark for indicating the continuous sending of the video index file. When the first-level index file is pushed to the preset file location, a push notification of the second-level index file is sent to the client, and after the first-level index file is pushed, the second-level index file is pushed, thereby realizing the continuous push of the first-level index file and the second-level index file, avoiding the problem that after the first-level index file is pushed, the client needs to wait for the client to send a request to obtain the second-level index file and then push the second-level index file, resulting in a gap in the transmission link during the video file transmission process, which affects the client video playback efficiency. It can improve the video output rate in seconds, improve the transmission efficiency of the network link, and at the same time reduce the client's freeze rate when playing the video.
[0080] In a possible embodiment, when receiving the video index request sent by the client, the first index pushing module 101 is further configured to:
[0081] Obtaining a preset tag in the video index request;
[0082] The notification sending module 102 is configured as follows:
[0083] When the preset mark indicates continuous sending, a push notification of the secondary index file is sent to the client.
[0084] In a possible embodiment, the second index pushing module 103 is further configured to:
[0085] Before pushing the secondary index file, determining the file selection strategy of the client, and adjusting the secondary index file according to the file selection strategy;
[0086] Push the adjusted secondary index file.
[0087] In a possible embodiment, the second index pushing module 103 is specifically configured as follows:
[0088] The different gear files in the secondary index file are sorted according to the gear priority in the gear selection strategy, or the gear file with the highest gear priority is selected to obtain an adjusted secondary index file.
[0089] In a possible embodiment, the first index pushing module 101 is specifically configured as follows:
[0090] Determine a primary index file corresponding to the video index request;
[0091] The address information of the first video segment files of multiple different gears corresponding to the first-level index file is added to the first-level index file and pushed, so that the client can obtain the first video segment file based on the address information when receiving the first-level index file.
[0092] In a possible embodiment, the device further includes a shard request processing module 104, configured to:
[0093] Receive a first fragment file request sent by the client, where the first fragment file request includes fragment address information of a second fragment file;
[0094] The first segment file corresponding to the first segment file request is pushed to the client, and after the first segment file is pushed, the second segment file corresponding to the segment address information is pushed to the client.
[0095] Figure 8 This is a structural block diagram of another long video file transmission device provided in an embodiment of the present application. The device is used to execute the long video file transmission method provided in the above embodiment, and has the corresponding functional modules and beneficial effects of the execution method. Figure 8 As shown, the device specifically includes: a first request sending module 301, a data receiving module 302, and a second request sending module 303, wherein:
[0096] A first request sending module 301 is configured to send a video index request to a server, wherein the video index request includes a preset mark for indicating continuous sending of a video index file;
[0097] A data receiving module 302 is configured to receive a video index file pushed by the server based on the video index request;
[0098] The second request sending module 303 is configured to send a first fragment file request after the video index file is received, so that the server pushes the first fragment file and the second fragment file based on the first fragment file request, and the first fragment file request includes the fragment address information of the second fragment file.
[0099] It can be seen from the above scheme that, unlike the related art, when the client sends a video index request, a preset mark is set in advance, wherein the preset mark can be a mark set in the video index request using a field pre-agreed by the client and the server, and the specific mark value representing continuous transmission can be pre-set by the protocol, and when the client sends the first fragment file request, the fragment address information of the two-fragment file is attached thereto, so that the server can continuously transmit the first fragment file and the second fragment file after receiving the first fragment request, thereby realizing continuous transmission of the fragment files, shortening the overall communication interaction process between the client and the server, and further improving the video playback rate of the client. At the same time, by adding a preset mark to the video index request to realize the continuous transmission of the video index file between the client and the server, the bandwidth of the transmission link is fully utilized, and transmission without gaps is realized.
[0100] Fig. 9 A schematic diagram of the structure of a long video file transmission device provided in an embodiment of the present application, such as Fig. 9 As shown, the device includes a processor 201, a memory 202, an input device 203 and an output device 204; the number of processors 201 in the device can be one or more. Fig. 9 A processor 201 is taken as an example; the processor 201, memory 202, input device 203 and output device 204 in the device can be connected by a bus or other means. Fig. 9 The example of connecting via a bus is taken. The memory 202, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the long video file transmission method in the embodiment of the present application. The processor 201 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 302, that is, implements the above-mentioned long video file transmission method. The input device 203 can be used to receive input digital or character information, and generate key signal input related to user settings and function control of the device. The output device 204 may include a display device such as a display screen.
[0101] The embodiment of the present application further provides a non-volatile storage medium containing computer executable instructions, wherein the computer executable instructions are used to execute a long video file transmission method described in the above embodiment when executed by a computer processor, including:
[0102] Upon receiving a video index request sent by a client, determining a primary index file corresponding to the video index request and pushing the primary index file, wherein the video index request includes a preset mark for indicating continuous sending of the video index file;
[0103] When the primary index file is pushed to the preset file location, a push notification of the secondary index file is sent to the client;
[0104] After the first-level index file is pushed, the second-level index file is pushed. Or,
[0105] Sending a video index request to a server, wherein the video index request includes a preset mark for indicating continuous sending of the video index file;
[0106] Receive the video index file pushed by the server based on the video index request, and after the video index file is received, send a first fragment file request, so that the server pushes the first fragment file and the second fragment file based on the first fragment file request, and the first fragment file request includes the fragment address information of the second fragment file.
[0107] It is worth noting that in the embodiment of the above-mentioned long video file transmission device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present application.
[0108] In some possible implementations, various aspects of the method provided in this application may also be implemented in the form of a program product, which includes a program code. When the program product is run on a computer device, the program code is used to enable the computer device to execute the steps of the method according to various exemplary embodiments of the present application described above in this specification. For example, the computer device may execute the long video file transmission method described in the embodiment of this application. The program product may be implemented in any combination of one or more readable media.
Claims
1. A long video file transmission method, applied to a server, characterized in that: include: Upon receiving a video index request sent by a client, determining a primary index file corresponding to the video index request and pushing the primary index file, wherein the video index request includes a preset mark for indicating continuous sending of the video index file; When the primary index file is pushed to the preset file location, a push notification of the secondary index file is sent to the client; After the primary index file is pushed, the secondary index file is pushed.
2. The long video file transmission method according to claim 1, characterized in that: When the video index request sent by the client is received, the method further includes: Obtaining a preset tag in the video index request; Correspondingly, the sending of a push notification of the secondary index file to the client includes: When the preset mark indicates continuous sending, a push notification of the secondary index file is sent to the client.
3. The long video file transmission method according to claim 1, characterized in that: Before pushing the secondary index file, the method further includes: Determining a file selection strategy of the client, and adjusting the secondary index file according to the file selection strategy; Push the adjusted secondary index file.
4. The long video file transmission method according to claim 3, characterized in that: The adjusting the secondary index file according to the file selection strategy includes: The different gear files in the secondary index file are sorted according to the gear priority in the gear selection strategy, or the gear file with the highest gear priority is selected to obtain an adjusted secondary index file.
5. The long video file transmission method according to any one of claims 1 to 4, characterized in that: The determining the primary index file corresponding to the video index request and pushing it includes: Determine a primary index file corresponding to the video index request; The address information of the first video segment files of multiple different gears corresponding to the first-level index file is added to the first-level index file and pushed, so that the client can obtain the first video segment file based on the address information when receiving the first-level index file.
6. The long video file transmission method according to claim 5, characterized in that: The long video file transmission method also includes: Receive a first fragment file request sent by the client, where the first fragment file request includes fragment address information of a second fragment file; The first segment file corresponding to the first segment file request is pushed to the client, and after the first segment file is pushed, the second segment file corresponding to the segment address information is pushed to the client.
7. A long video file transmission method, applied to a client, characterized in that: include: Sending a video index request to a server, wherein the video index request includes a preset mark for indicating continuous sending of the video index file; Receive the video index file pushed by the server based on the video index request, and after the video index file is received, send a first fragment file request, so that the server pushes the first fragment file and the second fragment file based on the first fragment file request, and the first fragment file request includes the fragment address information of the second fragment file.
8. A long video file transmission device, characterized in that: include: A first index pushing module is configured to, upon receiving a video index request sent by a client, determine a primary index file corresponding to the video index request and push the primary index file, wherein the video index request includes a preset mark for indicating continuous sending of the video index file; A notification sending module, configured to send a push notification of the secondary index file to the client when the primary index file is pushed to a preset file location; The second index pushing module is configured to push the secondary index file after the primary index file is pushed.
9. A long video file transmission device, characterized in that: include: A first request sending module, configured to send a video index request to a server, wherein the video index request includes a preset mark for indicating continuous sending of a video index file; A data receiving module, configured to receive the video index file pushed by the server based on the video index request; The second request sending module is configured to send a first fragment file request after the video index file is received, so that the server pushes the first fragment file and the second fragment file based on the first fragment file request, and the first fragment file request includes the fragment address information of the second fragment file.
10. A long video file transmission device, the device comprising: one or more processors; A storage device 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 long video file transmission method described in any one of claims 1-7.
11. A non-volatile storage medium storing computer executable instructions, wherein the computer executable instructions are used to execute the long video file transmission method according to any one of claims 1 to 7 when executed by a computer processor.
12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the long video file transmission method described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Video file uploading method and storage equipment
CN110636340A