CN118055278A - Multi-period uploading method, device, equipment and medium for video files - Google Patents

Multi-period uploading method, device, equipment and medium for video files Download PDF

Info

Publication number
CN118055278A
CN118055278A CN202410312740.2A CN202410312740A CN118055278A CN 118055278 A CN118055278 A CN 118055278A CN 202410312740 A CN202410312740 A CN 202410312740A CN 118055278 A CN118055278 A CN 118055278A
Authority
CN
China
Prior art keywords
video
uploading
sub
instruction
period
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410312740.2A
Other languages
Chinese (zh)
Inventor
马国庆
王龙
彭飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hainayun IoT Technology Co Ltd
Qingdao Hainayun Digital Technology Co Ltd
Qingdao Hainayun Intelligent System Co Ltd
Original Assignee
Hainayun IoT Technology Co Ltd
Qingdao Hainayun Digital Technology Co Ltd
Qingdao Hainayun Intelligent System Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hainayun IoT Technology Co Ltd, Qingdao Hainayun Digital Technology Co Ltd, Qingdao Hainayun Intelligent System Co Ltd filed Critical Hainayun IoT Technology Co Ltd
Priority to CN202410312740.2A priority Critical patent/CN118055278A/en
Publication of CN118055278A publication Critical patent/CN118055278A/en
Pending legal-status Critical Current

Links

Landscapes

  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The application belongs to the field of video processing, and particularly relates to a method, a device, equipment and a medium for uploading video files in multiple periods. The server responds to a video request of the terminal equipment, firstly divides the video time length into a plurality of sub-video time periods, and sends a first video uploading instruction to the front-end equipment. Then, the front-end equipment executes the first video uploading instruction and simultaneously monitors a first uploading state of the first video uploading instruction to obtain first uploading information. And finally, the server determines a second video uploading instruction of a second sub-video period based on the first network packet loss rate and the first uploading duration in the first uploading information, and resends the second uploading instruction to the front-end equipment until the fact that a plurality of sub-video periods are processed is determined to be completed. The method breaks through the limitation of the fixed speed of the GB28181/T protocol in video uploading, and dynamically adjusts the uploading strategy according to the real-time network condition, so that the quality of video uploading is improved, and the use experience of a user is improved.

Description

Multi-period uploading method, device, equipment and medium for video files
Technical Field
The application belongs to the field of video processing, and particularly relates to a method, a device, equipment and a medium for uploading video files in multiple periods.
Background
With the continuous progress and development of video monitoring systems, the degree of dependence on unified standards and protocols is also increasing. Among the standards, the GB28181/T protocol becomes a core protocol in the video monitoring field due to the unified requirements of the GB28181/T protocol on data transmission, interface specifications and control management mechanisms. The protocol not only simplifies the equipment butt joint process between different manufacturers and systems, but also improves the interoperability and compatibility of the monitoring system, thereby promoting the wide application of the video monitoring technology.
Although the GB28181/T protocol has many advantages in the field of video monitoring, the application still faces some challenges. Especially, the fixability of the video uploading speed is high, and the capability of flexibly adjusting the uploading speed according to actual demands of users is limited, so that the diversity of video application scenes is affected to a certain extent. In addition, because the video uploading under the protocol is closely related to the network condition, when the network condition is poor, the video quality is often reduced, and phenomena such as blurring or mosaic are generated, so that the actual effect of video monitoring is seriously affected.
Therefore, the problem to be solved is how to break the fixed double speed limit of the GB28181/T protocol in the video uploading process and solve the problem of poor quality of the video in the uploading process.
Disclosure of Invention
The application provides a multi-period uploading method, device, equipment and medium of a video file, which are used for solving the problems of fixed speed limit of GB28181/T protocol in the video uploading process and poor quality of the video in the video uploading process.
In a first aspect, the present application provides a method for uploading video files in multiple periods, applied to a server, including:
obtaining a video request instruction sent by a terminal device, wherein the video request instruction comprises the following steps: a target video file and a video playing time length of the target video file;
Equally dividing the video playing time length to obtain a preset number of sub-video time periods, wherein the priorities of the preset number of sub-video time periods are different;
A first video uploading instruction is sent to front-end equipment, a first uploading state of the first video uploading instruction is monitored and processed to obtain first uploading information, the first video uploading instruction is used for indicating uploading processing of a first sub-video file corresponding to a first sub-video period according to a first uploading rate, the priority of the first sub-video period is higher than that of other sub-video periods, and the first uploading information comprises a first network packet loss rate and a first uploading duration of the first sub-video period;
A first stopping instruction is sent to the front-end equipment, and a second uploading rate corresponding to a second sub-video period is determined according to the first network packet loss rate and the first uploading duration, wherein the first stopping instruction is used for indicating the front-end equipment to stop uploading processing of the target video file, and the second sub-video period is a sub-video period with the highest priority after the first sub-video period is removed;
and sending a second video uploading instruction to the front-end equipment, so that the front-end equipment uploads a second sub-video file corresponding to the second sub-video period according to the second uploading rate.
Optionally, if the preset number is greater than two, after the sending the second video upload instruction to the front-end device, the method further includes:
Monitoring the ith uploading state of the ith video uploading instruction to obtain ith uploading information, wherein the ith uploading information comprises an ith network packet loss rate and an ith uploading duration of an ith sub-video period, and i is a positive integer greater than 1;
According to the ith network packet loss rate and the ith uploading duration, determining an ith+1 uploading rate corresponding to an ith+1 sub-video period, wherein the ith+1 sub-video period is a sub-video period with the highest priority after the first sub-video period to the ith sub-video period are removed;
Transmitting an i+1th video uploading instruction to the front-end equipment, and judging whether the i+1 is equal to a preset number M, wherein the i+1th video uploading instruction is used for indicating to upload the i+1th sub-video file corresponding to the i+1th sub-video period according to the i+1th uploading rate;
and when the i+1 is equal to the preset number M, sending an uploading completion instruction to the front-end equipment, wherein the uploading completion instruction is used for indicating that the uploading of the target video file is completed.
Optionally, after the monitoring processing is performed on the ith uploading state of the ith video uploading instruction to obtain the ith uploading information, the method further includes:
And sending an ith stopping instruction to the front-end equipment, wherein the ith stopping instruction is used for indicating the front-end equipment to stop uploading processing of the target video file.
In a second aspect, the present application provides a method for uploading video files in multiple periods, which is applied to a front-end device, and includes:
A first video uploading instruction sent by a server is obtained, and according to the first video uploading instruction, a first sub-video file in a first sub-video period in a target video file is uploaded according to a first uploading rate, wherein the first sub-video period is a sub-video period, the priority of which is greater than that of other sub-video periods, among a preset number of sub-video periods obtained by equally dividing video playing time of the target video file by the server;
After the execution of the first video uploading instruction is finished, a first stopping instruction sent by the server is obtained, and the uploading processing of the target video file is stopped according to the first stopping instruction, wherein the first stopping instruction is used for indicating the front-end equipment to stop the uploading processing of the target video file;
Acquiring a second video uploading instruction sent by the server, wherein the second video uploading instruction comprises: a second sub-video period and a second uploading rate corresponding to the second sub-video period;
and uploading a second sub-video file in the second sub-video period in the target video file according to the second uploading rate according to the second video uploading instruction.
Optionally, if the preset number is greater than two, after the uploading processing is performed on the second sub-video file in the second sub-video period in the target video file according to the second uploading rate according to the second video uploading instruction, the method further includes:
after the execution of the ith video uploading instruction is finished, acquiring an ith+1th video uploading instruction sent by the server, wherein i is a positive integer greater than 1;
and uploading the (i+1) th sub-video file in the (i+1) th sub-video period in the target video file according to the (i+1) th video uploading instruction and the (i+1) th uploading rate.
Optionally, before the step of obtaining the i+1th video upload instruction sent by the server, the method further includes:
acquiring an ith stopping instruction sent by the server, wherein the ith stopping instruction is used for indicating the front-end equipment to stop uploading the target video file;
and stopping uploading the target video file according to the ith stopping instruction until an (i+1) th video uploading instruction sent by the server is obtained.
In a third aspect, the present application provides a multi-period uploading device for video files, applied to a server, including:
The acquisition module is used for acquiring a video request instruction sent by the terminal equipment, wherein the video request instruction comprises the following steps: a target video file and a video playing time length of the target video file;
the processing module is used for equally dividing the video playing time length to obtain a preset number of sub-video time periods, wherein the priorities of the preset number of sub-video time periods are different;
The device comprises a sending module, a front-end device and a receiving module, wherein the sending module is used for sending a first video uploading instruction to the front-end device, the first video uploading instruction is used for indicating to upload a first sub-video file corresponding to a first sub-video period according to a first uploading rate, and the priority of the first sub-video period is higher than that of other sub-video periods;
The processing module is further configured to monitor a first upload state of the first video upload instruction to obtain first upload information, where the first upload information includes a first network packet loss rate and a first upload duration of a first sub-video period;
The sending module is further configured to send a first stopping instruction to the front-end device, where the first stopping instruction is used to instruct the front-end device to stop the uploading process of the target video file;
The determining module is used for determining a second uploading rate corresponding to a second sub-video period according to the first network packet loss rate and the first uploading duration, wherein the second sub-video period is a sub-video period with the highest priority after the first sub-video period is removed;
The sending module is further configured to send a second video upload instruction to the front-end device, so that the front-end device uploads, according to the second upload rate, a second sub-video file corresponding to the second sub-video period.
Optionally, the processing module is further configured to monitor an i-th uploading state of the i-th video uploading instruction to obtain i-th uploading information, where the i-th uploading information includes an i-th network packet loss rate and an i-th uploading duration of the i-th sub-video period, and the i-th uploading duration is a positive integer greater than 1;
The determining module is further configured to determine an i+1 uploading rate corresponding to an i+1 sub-video period according to the i network packet loss rate and the i uploading duration, where the i+1 sub-video period is a sub-video period with the largest priority after the first sub-video period to the i sub-video period are removed;
The sending module is further configured to send an i+1th video uploading instruction to the front-end device, where the i+1th video uploading instruction is configured to instruct to upload, according to an i+1th uploading rate, an i+1th sub-video file corresponding to the i+1th sub-video period;
The device comprises: a judging module;
the judging module is used for judging whether the i+1 is equal to a preset number M or not;
the sending module is further configured to send an upload completion instruction to the front-end device when the i+1 is equal to the preset number M, where the upload completion instruction is used to indicate that the uploading of the target video file is completed.
Optionally, the sending module is further configured to send an ith stopping instruction to the front-end device, where the ith stopping instruction is used to instruct the front-end device to stop the uploading process of the target video file.
In a fourth aspect, the present application provides a multi-period uploading apparatus for video files, applied to a front-end device, including:
the acquisition module is used for acquiring a first video uploading instruction sent by the server;
the processing module is used for uploading a first sub-video file in a first sub-video period in a target video file according to a first uploading rate according to the first video uploading instruction, wherein the first sub-video period is a sub-video period, the priority of which is greater than that of other sub-video periods, among a preset number of sub-video periods obtained by equally dividing the video playing time of the target video file by the server;
The acquisition module is further configured to acquire a first stop instruction sent by the server after the execution of the first video upload instruction is completed, where the first stop instruction is used to instruct the front-end device to stop the upload processing of the target video file;
the stopping module is used for stopping uploading processing of the target video file according to the first stopping instruction;
the obtaining module is further configured to obtain a second video upload instruction sent by the server, where the second video upload instruction includes: a second sub-video period and a second uploading rate corresponding to the second sub-video period;
And the processing module is further configured to upload, according to the second video upload instruction, a second sub-video file in the second sub-video period in the target video file according to the second upload rate.
Optionally, the obtaining module is further configured to obtain an i+1th video upload instruction sent by the server after the execution of the i-th video upload instruction is completed, where i is a positive integer greater than 1;
And the processing module is further used for uploading the (i+1) th sub-video file in the (i+1) th sub-video period in the target video file according to the (i+1) th video uploading instruction and the (i+1) th uploading rate.
Optionally, the obtaining module is further configured to obtain an ith stopping instruction sent by the server, where the ith stopping instruction is used to instruct the front-end device to stop the uploading process of the target video file;
And the stopping module is used for stopping the uploading processing of the target video file according to the ith stopping instruction until the (i+1) th video uploading instruction sent by the server is obtained.
In a fifth aspect, the present application provides a multi-period uploading apparatus for video files, including:
A memory;
A processor;
wherein the memory stores computer-executable instructions;
The processor executes the computer-executable instructions stored in the memory to implement the method for multi-period uploading of video files as described in the first aspect and the various possible implementations of the first aspect.
In a sixth aspect, the present application provides a computer storage medium having stored thereon computer-executable instructions that are executed by a processor to implement a method for multi-period uploading of video files as described in the first aspect and various possible implementations of the first aspect.
According to the multi-period uploading method of the video file, the server responds to the video request of the terminal equipment, firstly, the video time length is divided into a plurality of sub-video periods, and a first video uploading instruction is sent to the front-end equipment. Then, the front-end equipment executes the first video uploading instruction and simultaneously monitors a first uploading state of the first video uploading instruction to obtain first uploading information. And finally, the server determines a second video uploading instruction of a second sub-video period based on the first network packet loss rate and the first uploading duration in the first uploading information, and resends the second uploading instruction to the front-end equipment until the fact that a plurality of sub-video periods are processed is determined to be completed. The method breaks through the limitation of the fixed speed of the GB28181/T protocol in video uploading, and dynamically adjusts the uploading strategy according to the real-time network condition, so that the quality of video uploading is improved, and the use experience of a user is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
FIG. 1 is a flowchart of a method for uploading video files in multiple time periods;
FIG. 2 is a second flowchart of a method for uploading video files in multiple time periods according to the present application;
FIG. 3 is a flowchart III of a multi-period uploading method of video files provided by the present application;
fig. 4 is a schematic structural diagram of a multi-period uploading device for video files according to the present application;
fig. 5 is a schematic diagram ii of a multi-period uploading device for video files according to the present application;
Fig. 6 is a schematic structural diagram of a multi-period uploading device for video files provided by the present application.
Specific embodiments of the present application have been shown by way of the above drawings and will be described in more detail below. The drawings and the written description are not intended to limit the scope of the inventive concepts in any way, but rather to illustrate the inventive concepts to those skilled in the art by reference to the specific embodiments.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims and in the above drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented, for example, in sequences other than those illustrated or otherwise described herein.
In embodiments of the application, words such as "exemplary" or "such as" are used to mean examples, illustrations, or descriptions. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
Along with the continuous upgrading and expansion of the video monitoring system, the application scene of the video monitoring system is increasingly complex and diversified. From the initial security monitoring to the fields of urban management, intelligent transportation, environmental protection and the like, the function and performance requirements of the video monitoring system are continuously improved. In this context, the importance of the GB28181/T protocol is increasingly pronounced. The method not only provides a unified technical framework and standard for the complex scenes, but also ensures the efficient and stable operation of the video monitoring system through a strong control management mechanism.
Although the GB28181/T protocol provides many benefits, it also faces problems in practical use. The most remarkable problem is that the protocol only supports uploading video at a fixed speed at present, and a user cannot adjust the uploading speed of the video according to the current network condition. In addition, since the uploading quality of the video is closely related to the network condition, when the network connection is unstable or the bandwidth is limited, the video playing may have problems of blurring, mosaic and the like, and the watching experience of the user is affected.
Therefore, the problem to be solved is how to break the fixed rate limit of the GB28181/T protocol in the video uploading process and solve the problem of poor quality in the video uploading process.
In view of the above problems, the present application provides a multi-period uploading method for video files. The server responds to a video request of the terminal equipment, firstly divides the video time length into a plurality of sub-video time periods, and sends a first video uploading instruction to the front-end equipment. Then, the front-end equipment executes the first video uploading instruction and simultaneously monitors a first uploading state of the first video uploading instruction to obtain first uploading information. And finally, the server determines a second video uploading instruction of a second sub-video period based on the first network packet loss rate and the first uploading duration in the first uploading information, and resends the second uploading instruction to the front-end equipment until the fact that a plurality of sub-video periods are processed is determined to be completed. The method breaks through the limitation of the fixed speed of the GB28181/T protocol in video uploading, and dynamically adjusts the uploading strategy according to the real-time network condition, so that the quality of video uploading is improved, and the use experience of a user is improved.
The following describes the technical scheme of the present application and how the technical scheme of the present application solves the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 1 is a flowchart of a multi-period uploading method of a video file according to the present embodiment. As shown in fig. 1, the method for uploading video files in multiple periods provided in this embodiment includes:
S101: the server obtains a video request instruction sent by a terminal device, wherein the video request instruction comprises the following steps: the video playing time of the target video file.
The method includes the steps that a target video file which a user wants to watch and a desired video playing duration can be obtained by obtaining a video request instruction sent by a terminal device.
It will be appreciated that the terminal device (e.g., smart phone, computer, tablet, etc.) is the primary interactive interface between the user and the video surveillance system. When users need to view the video files stored in the video monitoring system, they can send video request instructions to the server through the terminal devices. These video request instructions tell the server what particular video file the user wishes to access, as well as other information such as the duration of the video file's play.
The manner of obtaining the video request command sent by the terminal device may be, for example, that the user obtains the video request command by using a monitoring application program on the terminal device. The present application is not particularly limited thereto.
For example, in a monitoring system in an intelligent cell, a user wants to view a monitoring video at his home gate to determine if there is an anomaly in yesterday evening. He takes out his own smart phone and opens a dedicated application of the cell video monitoring system. In this application he can see a list of video files, which are recorded video stored on the cell monitoring server.
The user selects a video file corresponding to a time period, and designates the playing time period from 10 to 11 pm. He clicks the play button, at which point his smartphone sends a video request command to the server via the application. This instruction contains the identification of the video file selected by the user and the playback duration information.
S102: and the server equally divides the video playing time length to obtain a preset number of sub-video time periods.
Wherein the priorities of the preset number of sub-video periods are different. The preset number may be, for example, 4.
The purpose of equally dividing the video playing duration is to better adapt to the network condition and realize flexible processing in the uploading process.
It can be appreciated that, because the instability of the network condition may cause the data transmission speed to be faster and slower, or even cause an interruption, by equally dividing the video duration into a plurality of sub-video periods, the server can upload the video file of each sub-period for the network condition of each sub-period, so that the server can more flexibly cope with the changes of the network conditions.
For example, if a user wishes to obtain video images from 10 to 11 pm from a video surveillance system, the server will divide this period into six sub-video periods according to an equal division per 10 minutes rule. The first sub-video period is 10 pm to 10 pm 10min, followed by the second sub-video period from 10 pm 10min to 10 pm 20 min, and so on, until the last sub-video period is 10 pm to 11 pm 50 min.
S103: and sending a first video uploading instruction to front-end equipment, and monitoring and processing a first uploading state of the first video uploading instruction to obtain first uploading information, wherein the first uploading information comprises a first network packet loss rate and a first uploading duration of a first sub-video period.
The first video uploading instruction is used for indicating to upload the first sub-video file corresponding to the first sub-video period according to the first uploading rate. The priority of the first sub-video period is greater than the priority of the other sub-video periods.
The first uploading rate refers to an uploading rate determined by the server according to a network condition (such as network bandwidth, server performance, video file size, user equipment performance, etc.) corresponding to the first sub-video period after receiving a video request instruction of the terminal equipment. The first upload rate may be, for example, 4 times the rate.
The purpose of this step is to obtain, from the head-end equipment, the video that the user wishes to view with high quality, and the server sends to the head-end equipment a video upload instruction with a first upload rate and a first sub-video period. The purpose of monitoring is to obtain the condition of the uploading process of the server and the time period actually spent in uploading the video when the front-end equipment uploads the video content corresponding to the first sub-video file to the server.
It can be understood that, the server is used as a core component of the uploading process and is responsible for making an uploading policy of the target video file, including what mode is adopted and what uploading rate is set, so that after a preset number of sub-video periods of the target video file are obtained, the video uploading rate can be determined according to the network condition corresponding to the first sub-video period, then the video uploading rate, the first sub-video period and the first sub-video file are comprehensively considered, a first video uploading instruction corresponding to the first sub-video file is generated, and finally the first video uploading instruction is sent to the front-end device, so that the front-end device uploads the video content of the first sub-video file according to the first uploading rate.
For example, assume that there are currently 6 sub-video periods of "10 point-10 point 10 minutes, 10 point 10 minutes-10 point 20 minutes, 10 point 20 minutes to 10 point 30 minutes, 10 point 30 minutes to 10 point 40 minutes, 10 point 40 minutes to 10 point 50 minutes, and 10 point 50 minutes to 11 points", respectively. The server will first select "10-10 minutes" as the first sub-video period and determine a suitable upload rate, e.g., 4 times the rate, for the head-end equipment based on current network conditions. The server then generates a first video upload instruction based on this rate and the time period "10 points-10 points 10 minutes" and sends it to the head-end.
S104: and the front-end equipment uploads a first sub-video file in a first sub-video period in the target video file according to the first video uploading instruction and the first uploading rate.
The first sub-video time period is a sub-video time period with priority higher than that of other sub-video time periods in a preset number of sub-video time periods obtained by equally dividing the video playing time length of the target video file by the server.
The priority includes, but is not limited to, determining in the order of time stamps after the video playback duration is sliced. The front-end equipment can be, for example, a security monitoring camera, a network hard disk video recorder and the like. The present application is not particularly limited thereto.
The purpose of this step is to ensure that the server can obtain the content of the first sub-video file, and upload processing needs to be performed on the first sub-video file in the first sub-video period in the target video file according to the first upload rate.
It can be understood that, the server is configured to determine the video upload rate of each sub-video file, and generate a video upload instruction of each sub-video file, and the front-end device is configured to store the video content of the target video file, so that after obtaining the first video upload instruction sent by the server, the front-end device may upload the video content corresponding to the sub-video period according to the upload rate specified by the server.
For example, assume that the first video upload instruction includes: 4 times of speed and the sub video time period of 10 points-10 minutes, the front-end equipment uploads the sub video file corresponding to the 10 points-10 minutes to the server according to the 4 times of speed.
S105: the server sends a first stopping instruction to the front-end equipment.
The first stopping instruction is used for indicating the front-end equipment to stop uploading the target video file.
The purpose of this step is to ensure accuracy and stability of the video upload, and the server needs to send a stop command to the front-end device to pause the upload of the content of the second sub-video file when analyzing and processing the first sub-video file.
It will be appreciated that since the server needs to analyze the first sub-video file to determine whether the current upload policy needs to be adjusted for the second sub-video file. Therefore, by sending the first stop instruction to the front-end equipment, the front-end equipment can not continue uploading the video in the process of analyzing and processing the uploading information by the server, and the accuracy and the stability of the video uploading process can be ensured.
S106: and after the front-end equipment finishes executing the first video uploading instruction, stopping uploading the target video file according to the first stopping instruction, wherein the first stopping instruction is used for indicating the front-end equipment to stop uploading the target video file.
The purpose of this step is to stop the current uploading process of the target video file in response to the request of the server.
It will be appreciated that since the target video file is split into a predetermined number of sub-video files, each sub-video file is a separate part, but together constitutes the complete video content. Therefore, after the front-end device executes the first video uploading instruction, it is necessary to suspend uploading of the new sub-video file according to the suspension instruction sent by the server, and keep in an idle waiting state until receiving the new video uploading instruction sent by the server.
S107: and the server determines a second uploading rate corresponding to a second sub-video period according to the first network packet loss rate and the first uploading duration.
The second sub-video period is the sub-video period with the highest priority after the first sub-video period is removed.
The purpose of this step is to ensure that the video can be uploaded with high quality, and the network state and the first uploading duration of the first sub-video period need to be comprehensively considered to jointly determine the uploading rate of the second sub-video file corresponding to the second sub-video period.
It can be understood that, in the process of uploading video, the network environment affects the uploading quality of the video file, so in order to ensure that the video can be transmitted to the server with high quality, the network condition of the first sub-video period and the time spent for uploading the sub-video need to be comprehensively considered, so as to avoid the degradation of the video quality caused by network congestion or unstable transmission, thereby ensuring the high efficiency and high quality of the whole video uploading process.
Optionally, according to the first network packet loss rate and the first upload duration, a specific implementation process of determining the second upload rate corresponding to the second sub-video period may be determined, for example, by referring to the following formula:
Wherein n is the ith in the preset quantity, n+1 is the (i+1) in the preset quantity, lambda n+1 is the uploading rate of the (i+1) th sub-video file, lambda n is the uploading rate of the (i) th sub-video file, T is the video duration of the (i) th sub-video file, T n is the (i) th uploading duration corresponding to the (i) th sub-video file, lost n is the (i) th video packet loss number corresponding to the (i) th sub-video file, and p and q are constants respectively.
It can be understood that if n is the first of the preset numbers, n+1 is the second of the preset numbers, λ n+1 is the upload rate of the second sub-video file, λ n is the upload rate of the first sub-video file, T n is the first upload duration corresponding to the first sub-video file, and Lost n is the first network packet loss rate corresponding to the first sub-video file.
For example, assume that the video playing time of the first sub-video file is 10 minutes. Meanwhile, the uploading speed of the first sub-video file is 4 times of the uploading speed and the uploading time period is 2 minutes, and no network packet loss occurs in the process of uploading the first sub-video file. Based on this information, it can be inferred that the second video file needs to be uploaded at 5 times faster.
S108: the server sends a second video uploading instruction to the front-end equipment, wherein the second video uploading instruction comprises: the method comprises the steps of a second sub-video period and a second uploading rate corresponding to the second sub-video period.
The purpose of this step is to inform the head-end equipment how the upload rate for the next stage (i.e. the second sub-video period) should be set.
It will be appreciated that since the video playing duration of the target video file is equally divided into a preset number of sub-video slots, each sub-video slot contains a portion of the content of the video. Therefore, in order to ensure smooth playing of the video, the server needs to sequentially send video uploading instructions to the front-end device according to the priority (such as time stamp order) after the halving process.
Furthermore, by sending the second video upload instruction, the server is actually telling the head-end equipment: "next, you should upload the content of the second sub-video period at this particular upload rate. In this way, the front-end device can perform corresponding uploading operation according to the instruction of the server, so that the video content corresponding to the new sub-video period can be ensured to be uploaded at a proper speed.
S109: and the front-end equipment uploads a second sub-video file in the second sub-video period in the target video file according to the second uploading rate according to the second video uploading instruction.
The purpose of this step is to ensure that when the second sub-video file is uploaded, the second sub-video file can be uploaded at a specified rate, so as to maintain the consistency and stability of video playing.
It can be appreciated that, since the target video file is split into a plurality of sub video files for uploading, after the uploading of the video content of the first sub video file is completed, the uploading of the second sub video file is also required to ensure the integrity of the video images of the video file, so that the user can watch the complete video content.
According to the multi-period uploading method of the video file, after a server obtains a video request instruction sent by a terminal device, equally dividing video playing time in the video request instruction to obtain a preset number of sub-video periods, then sending a first video uploading instruction carrying a first sub-video period and a first uploading rate to a front-end device, then processing the received first video uploading instruction by the front-end device, meanwhile, monitoring and processing a first uploading state of the first video uploading instruction by the server to obtain first uploading information, then determining a second video uploading instruction of a second sub-video period based on a first network packet loss rate and a first uploading time in the first uploading information by the server, and retransmitting the second uploading instruction carrying the second uploading rate to the front-end device until the preset number of sub-video periods are determined to be processed. The method comprises the steps of dividing a plurality of sub-video time periods, and determining the sub-video uploading rate at the current moment by utilizing video uploading information of the sub-video time period at the previous moment. The method breaks through the limitation of fixed speed of GB28181/T protocol in video uploading, dynamically adjusts the uploading strategy according to real-time network conditions, effectively avoids the problem of poor video quality, further improves the efficiency and stability of video uploading, and further improves the use experience of users.
Fig. 2 is a flowchart of a multi-period uploading method of a video file according to the present embodiment. The execution body of the embodiment is a server. As shown in fig. 2, this embodiment describes in detail an implementation procedure after sending a second video upload instruction to a front-end device when the preset number is greater than two based on the embodiment of fig. 1, and the multi-period uploading method of a video file provided in this embodiment includes:
S201: monitoring the ith uploading state of the ith video uploading instruction to obtain ith uploading information, wherein the ith uploading information comprises an ith network packet loss rate and an ith uploading duration of an ith sub-video period and an ith uploading duration, and i is a positive integer greater than 1.
The purpose of this step is to obtain the status of the uploading process of the server and the time spent for uploading the video when the front-end device uploads the video content corresponding to the i-th sub-video file to the server.
It can be appreciated that in the process of uploading video, the uploading speed, stability and video quality are directly affected by the uploading process. If the upload process is unstable, such as high packet loss rate or network delay, the video upload may become slow, even resulting in failed upload or impaired video quality. Therefore, in order to ensure the quality and efficiency of video uploading, it is necessary to monitor the uploading process status in real time during uploading.
At the same time, it is also important to obtain the length of time actually consumed for video uploading. The duration can reflect the uploading efficiency in the current uploading process, and help the server to judge whether the uploading strategy needs to be adjusted. For example, if the upload duration is too long, possibly due to network congestion or excessive server load, it may be considered to use a smaller upload rate for uploading the video file content.
Optionally, after monitoring the ith uploading state of the ith video uploading instruction to obtain the ith uploading information, the following steps are required to be executed; and sending an ith stopping instruction to the front-end equipment, wherein the ith stopping instruction is used for indicating the front-end equipment to stop uploading processing of the target video file.
The objective of this step is to improve the quality and efficiency of video uploading, and after the execution of the ith video uploading instruction is completed, the ith stopping instruction needs to be sent to the front-end equipment.
It can be appreciated that by monitoring the i-th upload status of the i-th video upload instruction, the server has already obtained detailed information about the network packet loss rate and the upload duration. If the data indicates that the current uploading process is not good, or the uploading time is too long, this may mean that continuing uploading may cause problems such as video quality degradation, failure of uploading, or overload of the server.
Therefore, the ith stopping instruction is sent to interrupt the current uploading process in time, so that the situation that the uploading process is poor or the uploading efficiency is low is avoided, the video file is further protected from being damaged, meanwhile, the loads of a server and a network are reduced, and a time window is provided for subsequent uploading strategy adjustment.
S202: and determining an (i+1) th uploading rate corresponding to an (i+1) th sub-video period according to the (i) th network packet loss rate and the (i) th uploading duration, wherein the (i+1) th sub-video period is a sub-video period with the largest priority after the first sub-video period to the (i) th sub-video period are removed.
The explanation of step S202 is referred to the explanation of the above embodiment.
S203: and sending an i+1th video uploading instruction to the front-end equipment, wherein the i+1th video uploading instruction is used for indicating to upload the i+1th sub-video file corresponding to the i+1th sub-video period according to the i+1th uploading rate.
The purpose of this step is, among other things, to provide the head-end equipment with efficient guidance regarding the uploading of the i+1th sub-video period, in particular with respect to the accurate setting of the uploading rate.
It will be appreciated that when the server sends an i+1th video upload instruction to the head-end, it is actually telling the head-end: based on our analysis of the uploading situation of the ith sub-video period and considering the uploading process corresponding to the ith sub-video period, we consider that the uploading of the (i+1) th sub-video period should be performed at the uploading rate specified below. "
Therefore, by sending the i+1th video uploading instruction to the front-end equipment, the server can ensure that the video uploading process is more efficient and stable, and can also avoid network congestion and server overload, thereby ensuring high-quality transmission of video content.
S204: judging whether the i+1 is equal to a preset number M or not; if yes, go to step S205; if not, step S206 is performed.
The preset number M may be, for example, 4.
The purpose of determining whether i+1 is equal to the preset number M is to determine whether the entire content of the preset number M of sub-video files in the target video file has been processed.
It will be appreciated that since the playing duration of the target video file is equally divided into a preset number M of sub-video slots, each sub-video slot contains a portion of the content of the video. Thus, by tracking the sequence number of the sub-video file currently being processed by i+1, it is possible to track and confirm whether each sub-video file has been uploaded.
If i+1 is equal to the preset number M, it indicates that the entire content of the preset number M of sub-video files in the target video file has been processed, and at this time, an upload completion instruction may be sent to the front-end device.
It will be appreciated that when i+1 is equal to the preset number M, it means that the server has completed processing all M sub-video files in the target video file, and at this time, the server will inform the front-end device that the target video file has been uploaded.
If i+1 is not equal to the preset number M, it indicates that the entire content of the preset number M of sub video files in the target video file has not been processed, and at this time, i may be updated to i+1.
It will be appreciated that when i+1 is not equal to the preset number M, it means that the server has not completed processing all M sub-video files in the target video file. In this case, the server does not immediately perform the subsequent operation, but updates the value of the current counter "i" to "i+1" so as to continue processing the next sub-video file, thereby ensuring that the server can process each sub-video file one by one in sequence until all sub-video files are processed.
S205: and sending an uploading completion instruction to the front-end equipment, wherein the uploading completion instruction is used for indicating that the uploading of the target video file is completed.
The purpose of sending the upload completion instruction to the front-end device is to notify the front-end device that the target video file has been successfully uploaded to the server, and the upload process has been completed, at this time, the front-end device may stop the upload work and wait for a new processing task.
It will be appreciated that when the server successfully receives all the data of the target video file and confirms that the upload process has been completed, it will send an upload completion instruction to the head-end. The main purpose of this instruction is to inform the head-end that the server has successfully acquired the video file and no further data need to be sent. Upon receiving this instruction, the head-end may pause its upload work because it has completed its own tasks.
Therefore, the server can orderly and efficiently process the uploaded video files, and meanwhile, the front-end equipment can also enter a standby state to wait for a next instruction or perform other related operations, so that the stability and the reliability of the whole uploading flow can be ensured.
S206: updating i to i+1.
Optionally, after it is determined that the uploading of the target video file is completed, the following steps are further performed; splicing the preset number of sub-video files according to the priority of the preset number of sub-video time periods to obtain a target video; and feeding the target video back to the terminal equipment so that the terminal equipment plays the target video.
The aim of the splicing processing is to combine the uploaded sub-video files according to a preset priority order, so as to generate a complete and continuous target video file. The purpose of feeding back the target video to the terminal device is to enable the user to view and enjoy the video content that has been uploaded on the terminal device.
It can be understood that by the splicing process, not only can the scattered sub-video files be integrated into a high-quality and coherent target video, but also the continuity of each sub-video file in time and content can be ensured, so that the finally generated video file can be smoothly played.
By sending the target video file to the terminal equipment, the user can watch high-quality video images, and the watching experience and the using experience of the user can be improved.
In the multi-period uploading method of the video file provided by the embodiment, the server obtains corresponding ith uploading information in the process of monitoring the ith sub-video period, wherein the corresponding ith uploading information comprises an ith network packet loss rate and an ith uploading duration. Based on this information, the server will comprehensively evaluate and determine the upload rate for the i+1st sub-video period. The server then sends a video upload instruction to the headend device containing this upload rate. Finally, when i+1 is equal to the preset value M, the server sends a notification of completion of uploading to the front-end device. The method breaks through the limitation of fixed speed of GB28181/T protocol in video uploading, dynamically adjusts the uploading strategy according to real-time network conditions, effectively avoids the problem of poor video quality, further improves the efficiency and stability of video uploading, and further improves the use experience of users.
Fig. 3 is a flowchart III of a multi-period uploading method of video files provided in the present embodiment. The execution body of the embodiment is a front-end device. As shown in fig. 3, this embodiment describes in detail, based on the embodiment of fig. 2, a specific implementation process after uploading a second sub-video file in a second sub-video period in a target video file according to a second uploading rate according to a second video uploading instruction when the preset number is greater than two, and the multi-period uploading method of the video file provided in this embodiment includes:
S301: and after the execution of the ith video uploading instruction is finished, acquiring an ith stopping instruction sent by the server, wherein the ith stopping instruction is used for indicating the front-end equipment to stop uploading the target video file, and i is a positive integer greater than 1.
The purpose of this step is to ensure accuracy and stability of video uploading, and when the server needs to analyze and process the ith sub-video file, a stop instruction is sent to the front-end device, so that the server pauses uploading of the content of the (i+1) th sub-video file.
It will be appreciated that since the server needs to analyze the i-th sub-video file to determine whether the current upload policy needs to be adjusted for the i+1-th sub-video file. Therefore, by sending the ith stopping instruction to the front-end equipment, the front-end equipment can not continue uploading the video in the process of analyzing and processing the uploading information by the server, and the accuracy and the stability of the video uploading process can be ensured.
S302: and stopping uploading the target video file according to the ith stopping instruction.
The i-th stop instruction sent by the acquisition server is to respond to the request of the server and stop the uploading process of the target video file.
It will be appreciated that since the target video file is split into a predetermined number of sub-video files, each sub-video file is a separate part, but together constitutes the complete video content. Therefore, when the front-end device receives the ith stop instruction sent by the server, the front-end device needs to stop uploading the new sub-video file and keep in an idle waiting state until receiving a new video uploading instruction sent by the server.
S303: and acquiring an (i+1) th video uploading instruction sent by the server.
The i+1th video uploading instruction comprises: an i+1th sub-video period and the (i+1) th uploading rate corresponding to the (i+1) th sub-video period.
By acquiring the i+1th video uploading instruction sent by the server, the front-end device needs to ensure high-quality and high-efficiency uploading of the i+1th sub-video file according to the uploading instruction sent by the server.
It can be understood that after the front-end device receives the i+1th video uploading instruction sent by the server, the i+1th sub-video file is uploaded strictly according to the determined file uploading requirement, so that the i+1th sub-video file can be uploaded with high quality, and the quality problem of the video file in the sub-video period is avoided.
S304: and uploading the (i+1) th sub-video file in the (i+1) th sub-video period in the target video file according to the (i+1) th video uploading instruction and the (i+1) th uploading rate.
The purpose of this step is to ensure that the i+1th sub video file can be uploaded at a specified rate when the i+1th sub video file is uploaded, so as to ensure high-quality uploading of the i+1th sub video file.
It can be understood that, because the network condition is continuously changed, by dynamically adjusting the uploading rate of each sub-video file, not only can the uploading process be ensured to be more suitable for the current uploading process, but also the mass transfer amount on the video in the current sub-video period can be improved.
According to the multi-period uploading method of the video file, after the front-end device executes the ith video uploading instruction, firstly, the ith stopping instruction sent by the server can be obtained, and then uploading processing of the (i+1) th sub-video file is stopped; and finally, when the (i+1) th video uploading instruction sent by the server is re-acquired, uploading the (i+1) th sub-video file according to the (i+1) th video uploading instruction. The method breaks the fixed rate limit of GB28181/T protocol, so that the video uploading is more flexible, and the video can be adjusted in real time according to the network condition, thereby avoiding the video quality from being damaged and greatly improving the user experience.
Fig. 4 is a schematic structural diagram of a multi-period uploading device for video files provided by the application. As shown in fig. 4, the present application provides a multi-period uploading device for video files, which is applied to a server, and the multi-period uploading device 400 for video files includes:
An obtaining module 401, configured to obtain a video request instruction sent by a terminal device, where the video request instruction includes: a target video file and a video playing time length of the target video file;
A processing module 402, configured to equally divide the video playing duration to obtain a preset number of sub-video periods, where priorities of the preset number of sub-video periods are different;
A sending module 403, configured to send a first video upload instruction to a front-end device, where the first video upload instruction is configured to instruct to upload, according to a first upload rate, a first sub-video file corresponding to a first sub-video period, where a priority of the first sub-video period is greater than a priority of other sub-video periods;
The processing module 402 is further configured to monitor a first upload state of the first video upload instruction to obtain first upload information, where the first upload information includes a first network packet loss rate and a first upload duration of a first sub-video period;
the sending module 403 is further configured to send a first stop instruction to the front-end device, where the first stop instruction is used to instruct the front-end device to stop the uploading process of the target video file;
the determining module 404 is further configured to determine, according to the first network packet loss rate and the first upload duration, a second upload rate corresponding to a second sub-video period, where the second sub-video period is a sub-video period with the highest priority after the first sub-video period is removed;
The sending module 403 is further configured to send a second video upload instruction to the front-end device, so that the front-end device uploads, according to the second upload rate, a second sub-video file corresponding to the second sub-video period.
Optionally, the processing module 402 is further configured to monitor an i-th upload state of the i-th video upload instruction to obtain i-th upload information, where the i-th upload information includes an i-th network packet loss rate and an i-th upload duration of the i-th sub-video period, and the i-th upload duration is a positive integer greater than 1;
The determining module 404 is further configured to determine an i+1 uploading rate corresponding to an i+1 sub-video period according to the i network packet loss rate and the i uploading duration, where the i+1 sub-video period is a sub-video period with the largest priority after the first sub-video period to the i sub-video period are removed;
the sending module 403 is further configured to send an i+1th video upload instruction to the front-end device, where the i+1th video upload instruction is configured to instruct to upload, according to an i+1th upload rate, an i+1th sub-video file corresponding to the i+1th sub-video period;
the device comprises: a judgment module 405;
the judging module 405 is configured to judge whether the i+1 is equal to a preset number M;
The sending module 403 is further configured to send an upload completion instruction to the front-end device when the i+1 is equal to the preset number M, where the upload completion instruction is used to indicate that the uploading of the target video file is completed.
Optionally, the sending module 403 is further configured to send an ith stopping instruction to the front-end device, where the ith stopping instruction is used to instruct the front-end device to stop the uploading process of the target video file.
Fig. 5 is a schematic structural diagram of a multi-period uploading device for video files according to the present application. As shown in fig. 5, the present application provides a multi-period uploading apparatus for a video file, which is applied to a front-end device, and the multi-period uploading apparatus 500 for a video file includes:
an obtaining module 501, configured to obtain a first video upload instruction sent by a server;
The processing module 502 is configured to upload, according to the first video upload instruction, a first sub-video file in a first sub-video period in a target video file according to a first upload rate, where the first sub-video period is a sub-video period, where the priority of a preset number of sub-video periods obtained by the server in the video playing duration of the target video file according to the halving process is greater than that of other sub-video periods;
The obtaining module 501 is further configured to obtain a first stop instruction sent by the server after the execution of the first video upload instruction is completed, where the first stop instruction is used to instruct the front-end device to stop the upload process of the target video file;
a stopping module 503, configured to stop the uploading process of the target video file according to the first stopping instruction;
The obtaining module 501 is further configured to obtain a second video upload instruction sent by the server, where the second video upload instruction includes: a second sub-video period and a second uploading rate corresponding to the second sub-video period;
and the processing module 502 is configured to upload, according to the second video upload instruction, a second sub-video file in the second sub-video period in the target video file according to the second upload rate.
Optionally, the obtaining module 501 is further configured to obtain an i+1th video upload instruction sent by the server after the execution of the i-th video upload instruction is completed, where i is a positive integer greater than 1;
The processing module 502 is further configured to upload, according to the i+1th video upload instruction, the i+1th sub-video file in the i+1th sub-video period in the target video file according to the i+1th upload rate.
Optionally, the obtaining module 501 is further configured to obtain an ith stopping instruction sent by the server, where the ith stopping instruction is used to instruct the front-end device to stop the uploading process of the target video file;
the stopping module 503 is configured to stop the uploading process of the target video file according to the ith stopping instruction until the (i+1) th video uploading instruction sent by the server is obtained.
Fig. 6 is a schematic structural diagram of a multi-period uploading device for video files provided by the present application. As shown in fig. 6, the present application provides a multi-period uploading apparatus of a video file, the multi-period uploading apparatus 600 of the video file comprising: a receiver 601, a transmitter 602, a processor 603 and a memory 604.
A receiver 601 for receiving instructions and data;
a transmitter 602 for transmitting instructions and data;
memory 604 for storing computer-executable instructions;
The processor 603 is configured to execute computer-executable instructions stored in the memory 604, so as to implement the steps executed by the multi-period uploading method of video files in the above embodiment. Reference may be made in particular to the description of the embodiments of the method for multi-period uploading of video files described above.
Alternatively, the memory 604 may be separate or integrated with the processor 603.
When the memory 604 is provided separately, the electronic device further comprises a bus for connecting the memory 604 and the processor 603.
The application also provides a computer readable storage medium, wherein the computer readable storage medium stores computer execution instructions, and when the processor executes the computer execution instructions, the method for uploading the video file in multiple time periods is realized.
Those of ordinary skill in the art will appreciate that all or some of the steps, systems, functional modules/units in the apparatus, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between the functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed cooperatively by several physical components. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as known to those skilled in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media.
While the present application has been described with reference to the preferred embodiments shown in the drawings, it will be readily understood by those skilled in the art that the scope of the application is not limited to those specific embodiments, and the above examples are intended only to illustrate the technical aspects of the application, not to limit it; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the application.

Claims (10)

1. A method for multi-period uploading of video files, applied to a server, the method comprising:
obtaining a video request instruction sent by a terminal device, wherein the video request instruction comprises the following steps: a target video file and a video playing time length of the target video file;
Equally dividing the video playing time length to obtain a preset number of sub-video time periods, wherein the priorities of the preset number of sub-video time periods are different;
A first video uploading instruction is sent to front-end equipment, a first uploading state of the first video uploading instruction is monitored and processed to obtain first uploading information, the first video uploading instruction is used for indicating uploading processing of a first sub-video file corresponding to a first sub-video period according to a first uploading rate, the priority of the first sub-video period is higher than that of other sub-video periods, and the first uploading information comprises a first network packet loss rate and a first uploading duration of the first sub-video period;
A first stopping instruction is sent to the front-end equipment, and a second uploading rate corresponding to a second sub-video period is determined according to the first network packet loss rate and the first uploading duration, wherein the first stopping instruction is used for indicating the front-end equipment to stop uploading processing of the target video file, and the second sub-video period is a sub-video period with the highest priority after the first sub-video period is removed;
and sending a second video uploading instruction to the front-end equipment, so that the front-end equipment uploads a second sub-video file corresponding to the second sub-video period according to the second uploading rate.
2. The method of claim 1, wherein if the preset number is greater than two, after the sending of the second video upload instruction to the front-end device, the method further comprises:
monitoring the ith uploading state of the ith video uploading instruction to obtain ith uploading information, wherein the ith uploading information comprises an ith network packet loss rate and an ith uploading duration of an ith sub-video period and an ith uploading duration, and i is a positive integer greater than 1;
According to the ith network packet loss rate and the ith uploading duration, determining an ith+1 uploading rate corresponding to an ith+1 sub-video period, wherein the ith+1 sub-video period is a sub-video period with the highest priority after the first sub-video period to the ith sub-video period are removed;
Transmitting an i+1th video uploading instruction to the front-end equipment, and judging whether the i+1 is equal to a preset number M, wherein the i+1th video uploading instruction is used for indicating to upload the i+1th sub-video file corresponding to the i+1th sub-video period according to the i+1th uploading rate;
and when the i+1 is equal to the preset number M, sending an uploading completion instruction to the front-end equipment, wherein the uploading completion instruction is used for indicating that the uploading of the target video file is completed.
3. The method according to claim 2, wherein after performing a monitoring process on the i-th upload status of the i-th video upload instruction to obtain i-th upload information, the method further comprises:
And sending an ith stopping instruction to the front-end equipment, wherein the ith stopping instruction is used for indicating the front-end equipment to stop uploading processing of the target video file.
4. A method for multi-period uploading of video files, applied to a front-end device, the method comprising:
A first video uploading instruction sent by a server is obtained, and according to the first video uploading instruction, a first sub-video file in a first sub-video period in a target video file is uploaded according to a first uploading rate, wherein the first sub-video period is a sub-video period, the priority of which is greater than that of other sub-video periods, among a preset number of sub-video periods obtained by equally dividing video playing time of the target video file by the server;
After the execution of the first video uploading instruction is finished, a first stopping instruction sent by the server is obtained, and the uploading processing of the target video file is stopped according to the first stopping instruction, wherein the first stopping instruction is used for indicating the front-end equipment to stop the uploading processing of the target video file;
Acquiring a second video uploading instruction sent by the server, wherein the second video uploading instruction comprises: a second sub-video period and a second uploading rate corresponding to the second sub-video period;
and uploading a second sub-video file in the second sub-video period in the target video file according to the second uploading rate according to the second video uploading instruction.
5. The method of claim 4, wherein if the preset number is greater than two, after the uploading process is performed on the second sub-video file in the second sub-video period in the target video file according to the second uploading rate according to the second video uploading instruction, the method further comprises:
after the execution of the ith video uploading instruction is finished, acquiring an ith+1th video uploading instruction sent by the server, wherein i is a positive integer greater than 1;
and uploading the (i+1) th sub-video file in the (i+1) th sub-video period in the target video file according to the (i+1) th video uploading instruction and the (i+1) th uploading rate.
6. The method of claim 5, wherein prior to the obtaining the i+1th video upload instruction sent by the server, the method further comprises:
acquiring an ith stopping instruction sent by the server, wherein the ith stopping instruction is used for indicating the front-end equipment to stop uploading the target video file;
and stopping uploading the target video file according to the ith stopping instruction until an (i+1) th video uploading instruction sent by the server is obtained.
7. A multi-period uploading device for video files, applied to a server, comprising:
The acquisition module is used for acquiring a video request instruction sent by the terminal equipment, wherein the video request instruction comprises the following steps: a target video file and a video playing time length of the target video file;
the processing module is used for equally dividing the video playing time length to obtain a preset number of sub-video time periods, wherein the priorities of the preset number of sub-video time periods are different;
The device comprises a sending module, a front-end device and a receiving module, wherein the sending module is used for sending a first video uploading instruction to the front-end device, the first video uploading instruction is used for indicating to upload a first sub-video file corresponding to a first sub-video period according to a first uploading rate, and the priority of the first sub-video period is higher than that of other sub-video periods;
The processing module is further configured to monitor a first upload state of the first video upload instruction to obtain first upload information, where the first upload information includes a first network packet loss rate and a first upload duration of a first sub-video period;
The sending module is further configured to send a first stopping instruction to the front-end device, where the first stopping instruction is used to instruct the front-end device to stop the uploading process of the target video file;
The determining module is used for determining a second uploading rate corresponding to a second sub-video period according to the first network packet loss rate and the first uploading duration, wherein the second sub-video period is a sub-video period with the highest priority after the first sub-video period is removed;
The sending module is further configured to send a second video upload instruction to the front-end device, so that the front-end device uploads, according to the second upload rate, a second sub-video file corresponding to the second sub-video period.
8. A multi-period uploading apparatus for video files, applied to a front-end device, comprising:
the acquisition module is used for acquiring a first video uploading instruction sent by the server;
the processing module is used for uploading a first sub-video file in a first sub-video period in a target video file according to a first uploading rate according to the first video uploading instruction, wherein the first sub-video period is a sub-video period, the priority of which is greater than that of other sub-video periods, among a preset number of sub-video periods obtained by equally dividing the video playing time of the target video file by the server;
The acquisition module is further configured to acquire a first stop instruction sent by the server after the execution of the first video upload instruction is completed, where the first stop instruction is used to instruct the front-end device to stop the upload processing of the target video file;
the stopping module is used for stopping uploading processing of the target video file according to the first stopping instruction;
the obtaining module is further configured to obtain a second video upload instruction sent by the server, where the second video upload instruction includes: a second sub-video period and a second uploading rate corresponding to the second sub-video period;
And the processing module is further configured to upload, according to the second video upload instruction, a second sub-video file in the second sub-video period in the target video file according to the second upload rate.
9. A multi-period uploading apparatus for video files, comprising:
A memory;
A processor;
wherein the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored in the memory to implement the multi-period uploading method of video files of any of claims 1-7.
10. A computer storage medium having stored therein computer executable instructions which when executed by a processor are for implementing a multi-period uploading method of a video file as claimed in any of claims 1 to 7.
CN202410312740.2A 2024-03-19 2024-03-19 Multi-period uploading method, device, equipment and medium for video files Pending CN118055278A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410312740.2A CN118055278A (en) 2024-03-19 2024-03-19 Multi-period uploading method, device, equipment and medium for video files

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410312740.2A CN118055278A (en) 2024-03-19 2024-03-19 Multi-period uploading method, device, equipment and medium for video files

Publications (1)

Publication Number Publication Date
CN118055278A true CN118055278A (en) 2024-05-17

Family

ID=91046409

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410312740.2A Pending CN118055278A (en) 2024-03-19 2024-03-19 Multi-period uploading method, device, equipment and medium for video files

Country Status (1)

Country Link
CN (1) CN118055278A (en)

Similar Documents

Publication Publication Date Title
CN111628847A (en) Data transmission method and device
US20210160577A1 (en) Method for playing video, electronic device and storage medium
US11259063B2 (en) Method and system for setting video cover
US9490992B2 (en) Remote conference saving system for managing missing media data and storage medium
JP7496022B2 (en) Client, server, receiving method and transmitting method
CN107484011B (en) Video resource decoding method and device
EP2736263A1 (en) Server, multimedia apparatus and control method thereof for synchronously playing multimedia contents through a plurality of multimedia devices
US11863841B2 (en) Video playing control method and system
CN104079955A (en) Method, device and system of OTT (Over The Top) live broadcast
EP3800894A1 (en) Method and apparatus for detecting video playing quality
CN113382210B (en) Processing method of multi-channel monitoring video data, streaming media server and electronic equipment
CN112492359A (en) Screen projection method for smart phone
US20060271978A1 (en) Electronic apparatus, image control method and image control program
US10674188B2 (en) Playback apparatus, method of controlling playback apparatus, playback method and server apparatus
CN118055278A (en) Multi-period uploading method, device, equipment and medium for video files
CN115941907A (en) RTP data packet sending method, system, electronic equipment and storage medium
CN113271487B (en) Audio and video synchronous playing method, device, system, program product and storage medium
US20160309210A1 (en) Video playback method, apparatus and intelligent terminal
CN111107296B (en) Audio data acquisition method and device, electronic equipment and readable storage medium
CN114416013A (en) Data transmission method, data transmission device, electronic equipment and computer-readable storage medium
CN111405313B (en) Method and system for storing streaming media data
CN105007521A (en) Method and device for playing TS (Transport Stream) video
CN111669539A (en) Video playing method and device and electronic equipment
CN113923468B (en) Live broadcast control method and device, storage medium and electronic equipment
US20230199267A1 (en) Method and apparatus for processing adaptive multi-view streaming

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination