CN111163335B - Video processing method and device for distributed server - Google Patents

Video processing method and device for distributed server Download PDF

Info

Publication number
CN111163335B
CN111163335B CN201911414864.7A CN201911414864A CN111163335B CN 111163335 B CN111163335 B CN 111163335B CN 201911414864 A CN201911414864 A CN 201911414864A CN 111163335 B CN111163335 B CN 111163335B
Authority
CN
China
Prior art keywords
transcoding
video stream
video
server
stream data
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.)
Active
Application number
CN201911414864.7A
Other languages
Chinese (zh)
Other versions
CN111163335A (en
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.)
Shenzhen Ruixun Cloud Technology Co ltd
Original Assignee
Shenzhen Ruixun Cloud Technology 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 Shenzhen Ruixun Cloud Technology Co ltd filed Critical Shenzhen Ruixun Cloud Technology Co ltd
Priority to CN201911414864.7A priority Critical patent/CN111163335B/en
Publication of CN111163335A publication Critical patent/CN111163335A/en
Application granted granted Critical
Publication of CN111163335B publication Critical patent/CN111163335B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234309Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4 or from Quicktime to Realvideo
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
    • H04N21/23424Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving splicing one content stream with another content stream, e.g. for inserting or substituting an advertisement

Abstract

The embodiment of the invention provides a video processing method and a video processing device for a distributed server, wherein the method is applied to a control server, the control server is communicated with a plurality of transcoding servers, and the method comprises the following steps: when the control server receives video stream data, the control server respectively sends work requests to the plurality of transcoding servers; receiving work responses sent by a plurality of transcoding servers; sending the video stream data to a plurality of transcoding servers according to the work response; receiving a plurality of transcoding video blocks, wherein the plurality of transcoding video blocks are generated by transcoding the video stream data by a transcoding server; and splicing the plurality of transcoding video blocks and generating a target video stream. According to the distributed server connection method provided by the embodiment, after the original video stream data is received, each transcoding server can be coordinated to perform coding and transcoding, the coding and transcoding capacity and efficiency can be greatly improved, the user management efficiency is facilitated, the coding or transcoding efficiency is improved, and the resource utilization rate is also improved.

Description

Video processing method and device for distributed server
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a video processing method for a distributed server and a video processing apparatus for a distributed server.
Background
With the increasing popularity of the internet, the information dissemination mode gradually changes from the original traditional paper media to the internet, so that the mobile information is more and more.
In the mobile information, the audio-video information is an important component in the mobile information, including television stations, network companies, IPTV, internet televisions, OTTs, mobile phones and other fields, and these components include a large number of audio-video information files, so as to improve transmission speed, security and practicability, to adapt to different network bandwidths, different terminal processing capabilities and different user requirements, and to perform encoding or transcoding when transmitting a large number of audio-video files.
In order to realize the coding and decoding or transcoding of a large amount of video data, a large amount of data coding and transcoding is difficult to complete by adopting a single transcoding server in the prior art, and a plurality of transcoding servers are required to be jointly operated. The multiple transcoding servers are difficult to coordinate with each other, the resource allocation is unreasonable, the video data resource processed by a certain transcoding server is large, the video data resource processed by a certain transcoding server is small, so that the certain transcoding server is in a standby working state, the video resource allocation is uneven, the memory resource is wasted, and the transcoding efficiency is reduced.
Disclosure of Invention
In view of the above problems, embodiments of the present invention are proposed to provide a video processing method of a distributed server and a video processing apparatus of a distributed server that overcome or at least partially solve the above problems.
In order to solve the above problem, an embodiment of the present invention discloses a video processing method for a distributed server, which is applied to a control server, where the control server communicates with multiple transcoding servers, and the method includes:
when the control server receives video stream data, the control server respectively sends work requests to the plurality of transcoding servers;
receiving work responses sent by the plurality of transcoding servers;
sending the video stream data to a plurality of transcoding servers according to the work response;
receiving a plurality of transcoding video blocks, wherein the plurality of transcoding video blocks are generated by transcoding the video stream data by the transcoding server;
and splicing the plurality of transcoded video blocks and generating a target video stream.
Optionally, the sending the video stream data to a plurality of transcoding servers according to the work response includes:
acquiring a plurality of transcoding addresses corresponding to the plurality of transcoding servers according to the work response;
determining one or more target addresses identical to the pre-stored addresses from the plurality of transcoding addresses;
and sending the video stream data to a transcoding server corresponding to the target address.
Optionally, the sending the video stream data to the transcoding server corresponding to the destination address includes:
counting the address number of the target address;
judging whether the number of the addresses is greater than or equal to two;
if the number of the addresses is larger than or equal to two, segmenting the video stream data into video blocks with corresponding number according to the number of the addresses;
performing identification processing on the video block blocks with the corresponding number to generate identification video blocks;
and sending the identification video block to a transcoding server corresponding to the target address for transcoding processing.
Optionally, the method further comprises:
and if the number of the addresses is less than two, sending the video stream data to a transcoding server corresponding to the target address.
The embodiment of the invention also discloses a video processing device of the distributed server, which is applied to a control server, wherein the control server is communicated with a plurality of transcoding servers, and the device comprises:
the sending request module is used for sending work requests to the plurality of transcoding servers by the control server when the control server receives video stream data;
the receiving response module is used for receiving the work responses sent by the plurality of transcoding servers;
the data sending module is used for sending the video stream data to a plurality of transcoding servers according to the work response;
the receiving video block module is used for receiving a plurality of transcoding video blocks, and the transcoding video blocks are generated by transcoding the video stream data by the transcoding server;
and the generating module is used for splicing the plurality of transcoded video blocks and generating a target video stream.
Optionally, the data sending module includes:
the obtaining module is used for obtaining a plurality of transcoding addresses corresponding to the plurality of transcoding servers according to the work response;
the determining module is used for determining one or more target addresses which are the same as the pre-stored addresses from the plurality of transcoding addresses;
and the target address corresponding module is used for sending the video stream data to the transcoding server corresponding to the target address.
Optionally, the target address corresponding module includes:
the counting module is used for counting the address number of the target address;
the judging module is used for judging whether the number of the addresses is greater than or equal to two;
the segmentation module is used for segmenting the video stream data into video blocks with corresponding number according to the number of the addresses if the number of the addresses is greater than or equal to two;
the identification module is used for identifying the video block blocks with the corresponding number to generate an identification video block;
and the transcoding processing module is used for sending the identification video block to a transcoding server corresponding to the target address for transcoding processing.
Optionally, the apparatus further comprises:
and the quantity module is used for sending the video stream data to the transcoding server corresponding to the target address if the number of the addresses is less than two.
The embodiment of the invention also discloses a device, which comprises:
one or more processors; and
one or more machine-readable media having instructions stored thereon, which when executed by the one or more processors, cause the apparatus to perform one or more methods as described in the embodiments above.
The embodiment of the invention also discloses a computer readable storage medium, which stores a computer program for enabling a processor to execute any one of the methods described in the above embodiments.
The embodiment of the invention has the following advantages: when the control server receives video stream data, work requests are sent to the plurality of transcoding servers through the control server respectively; receiving work responses sent by the plurality of transcoding servers; sending the video stream data to a plurality of transcoding servers according to the work response; receiving a plurality of transcoding video blocks, wherein the plurality of transcoding video blocks are generated by transcoding the video stream data by the transcoding server; and splicing the plurality of transcoded video blocks and generating a target video stream. The distributed server connection method provided by the embodiment is simple and convenient to operate and strong in transcoding capacity, and after the original video stream data can be received, the control server can coordinate each transcoding server to perform coding and transcoding, so that the coordination capacity can be greatly enhanced, the coding and transcoding capacities and efficiency can be greatly improved, the user management efficiency is facilitated, the coding or transcoding efficiency is improved, and the resource utilization rate is also improved.
Drawings
FIG. 1 is a flow chart of the first step of a video processing method of a distributed server according to a first embodiment of the present invention;
FIG. 2 is a flow chart of the steps of a second embodiment of a video processing method of a distributed server according to the present invention;
fig. 3 is a schematic structural diagram of a first embodiment of a video processing apparatus of a distributed server according to the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Referring to fig. 1, a flowchart of a first step of an embodiment of a video processing method for a distributed server according to the present invention is shown, in this embodiment, the method is applied to a control server, and the control server communicates with a plurality of transcoding servers.
In this embodiment, the control server may be a control terminal, a control component, a control device, or the like. The control server may be connected to an external device, which may be a television source, a switching signal source, etc., and the control server may receive or transmit video stream data.
The transcoding server can be composed of a plurality of decoders, encoders and transcoders, or a plurality of encoders and a plurality of transcoders. The formats that the transcoding server can encode or transcode or decode include DVD, MTS, RMVB, MP4, AVI, MPEG, 3GP, etc. The method can simultaneously process a plurality of formats or process a certain format independently, and can be specifically adjusted according to actual use requirements.
Alternatively, the control server may be provided with a plurality of connectors, and the plurality of connectors are respectively connected with the plurality of transcoding servers.
Specifically, the method comprises the following steps:
step 101, when the control server receives video stream data, the control server sends work requests to the plurality of transcoding servers respectively.
In this embodiment, the video stream data received by the control server may be video stream data of an external device, or may directly receive different original video stream data, and if the video stream data of the external device is received, the original video stream of the external device may be received, and video stream data of a television station, a network company, an IPTV, an internet television, an OTT, a mobile phone television, and the like may be received. When the control server receives the original video stream, the control server can receive the original video stream according to time, such as receiving a section of original video stream every 10-15 minutes; the method can also receive the original video stream according to the capacity of the original video stream, such as receiving 10-50 Mm of the original video stream, and also can receive 500-800 Mm of the original video stream; it may also be received as an encoded original video stream, such as an original video stream encoded in MP4 format or DVD format or AVI format, etc.
Optionally, the control server may receive a start instruction or a stop instruction sent by the user, and after receiving the start instruction, the control server may start receiving video stream data; the control server may also stop receiving the video stream data after receiving the stop instruction.
In actual operation, after the control server receives the start instruction, the control server may receive video stream data, and after the control server receives the video stream data, the control server may be triggered to send a work request to the plurality of transcoding servers.
The work request may be connection information, status information, and the like.
And 102, receiving work responses sent by the plurality of transcoding servers.
In this embodiment, after receiving the work request, the transcoding server may send a work response to the control server, where the work response may be heartbeat packet data, and may be integrated information data of the transcoding server, such as address information, hardware information, status information, and the like.
Specifically, after each transcoding server responds to the work request, a work response may be generated according to the work request, and the work response is sent to the control server. The control server may receive work responses sent by a plurality of transcoding servers. When receiving, the control server may receive the work responses sent by the plurality of transcoding servers at the same time, or may receive the work responses one by one.
In an alternative embodiment, the control server may set a predetermined receiving time, such as 5 minutes or 10 minutes or 15 minutes, the control server may send the work response within the preset receiving time, and the control server may not receive the work response sent by the transcoding server when the preset receiving time is exceeded.
And 103, sending the video stream data to a plurality of transcoding servers according to the work response.
In this embodiment, after the control server receives the work response sent by the transcoding server, the information data corresponding to the work response may be obtained. For example, when the work response is information data, the information data may include address information, hardware information, status information, and the like of the transcoding server. The control server can judge whether the transcoding server works or not, whether transcoding work can be completed or not, whether connection is completed or whether the transcoding server is in transcoding or on line or not and the like according to the address information, the hardware information and the state information, so that the control server can determine whether the transcoding server can receive video stream data or not to perform transcoding operation according to the information.
In practical operation, after the control server determines the transcoding servers capable of performing transcoding operation, the video stream data can be sent to the transcoding servers, and the transcoding servers perform transcoding operation on the video stream data. The control server sends the video stream data to different transcoding servers for transcoding, so that video resource allocation can be effectively realized, memory resources are reasonably utilized, and the coding and transcoding efficiency of the video can be effectively improved.
And 104, receiving a plurality of transcoding video blocks, wherein the plurality of transcoding video blocks are generated by the transcoding server through transcoding processing of the video stream data.
In this embodiment, after the plurality of transcoding servers transcode the plurality of video blocks, the transcoded video blocks may be generated, and the transcoded video blocks are sent to the transcoding servers.
In practical operation, the control server may wait for a certain time, for example, 5 minutes or 10 minutes, after sending the identification video block to the transcoding server, and if the waiting time is exceeded, the control server may send an obtaining request to the transcoding server to obtain the transcoded video block. If the transcoding server does not respond to the acquisition request and returns the transcoded video block, the control server may wait for a further period of time until the transcoding server sends the transcoded video block.
And 105, splicing the plurality of transcoded video blocks, and generating a target video stream.
In this embodiment, the control server may obtain the identification data of the transcoded video block after receiving the plurality of transcoded video blocks, rearrange the plurality of transcoded video blocks according to the identification data, and splice the plurality of transcoded video blocks into the target video stream.
In an optional embodiment of the present invention, a video processing method for a distributed server is provided, where when a control server receives video stream data, the control server sends work requests to a plurality of transcoding servers respectively; receiving work responses sent by the plurality of transcoding servers; sending the video stream data to a plurality of transcoding servers according to the work response; receiving a plurality of transcoding video blocks, wherein the plurality of transcoding video blocks are generated by transcoding the video stream data by the transcoding server; and splicing the plurality of transcoded video blocks and generating a target video stream. The distributed server connection method provided by the embodiment is simple and convenient to operate and strong in transcoding capacity, and after the original video stream data can be received, the control server can coordinate each transcoding server to perform coding and transcoding, so that the coordination capacity can be greatly enhanced, the coding and transcoding capacities and efficiency can be greatly improved, the user management efficiency is facilitated, the coding or transcoding efficiency is improved, and the resource utilization rate is also improved.
Referring to fig. 2, a flowchart of steps of a second embodiment of a video processing method for a distributed server according to the present invention is shown, in this embodiment, the method is applied to a control server, and the control server communicates with a plurality of transcoding servers.
In this embodiment, the control server may be a control terminal, a control component, a control device, or the like. The control server may be connected to an external device, which may be a television source, a switching signal source, etc., and the control server may receive or transmit video stream data.
The transcoding server can be composed of a plurality of decoders, encoders and transcoders, or a plurality of encoders and a plurality of transcoders. The formats that the transcoding server can encode or transcode or decode include DVD, MTS, RMVB, MP4, AVI, MPEG, 3GP, etc. The method can simultaneously process a plurality of formats or process a certain format independently, and can be specifically adjusted according to actual use requirements.
Alternatively, the control server may be provided with a plurality of connectors, and the plurality of connectors are respectively connected with the plurality of transcoding servers.
Step 201, when the control server receives video stream data, the control server sends work requests to the plurality of transcoding servers respectively.
In this embodiment, the video stream data received by the control server may be video stream data of an external device, or may directly receive different original video stream data, and if the video stream data of the external device is received, the original video stream of the external device may be received, and video stream data of a television station, a network company, an IPTV, an internet television, an OTT, a mobile phone television, and the like may be received. When the control server receives the original video stream, the control server can receive the original video stream according to time, such as receiving a section of original video stream every 10-15 minutes; the method can also receive the original video stream according to the capacity of the original video stream, such as receiving 10-50 Mm of the original video stream, and also can receive 500-800 Mm of the original video stream; it may also be received as an encoded original video stream, such as an original video stream encoded in MP4 format or DVD format or AVI format, etc.
Optionally, the control server may receive a start instruction or a stop instruction sent by the user, and after receiving the start instruction, the control server may start receiving video stream data; the control server may also stop receiving the video stream data after receiving the stop instruction.
In actual operation, after the control server receives the start instruction, the control server may receive video stream data, and after the control server receives the video stream data, the control server may be triggered to send a work request to the plurality of transcoding servers.
The work request may be connection information, status information, and the like.
Step 202, receiving work responses sent by the plurality of transcoding servers.
In this embodiment, after receiving the work request, the transcoding server may send a work response to the control server, where the work response may be heartbeat packet data, and may be integrated information data of the transcoding server, such as address information, hardware information, status information, and the like.
Specifically, after each transcoding server responds to the work request, a work response may be generated according to the work request, and the work response is sent to the control server. The control server may receive work responses sent by a plurality of transcoding servers. When receiving, the control server may receive the work responses sent by the plurality of transcoding servers at the same time, or may receive the work responses one by one.
In an alternative embodiment, the control server may set a predetermined receiving time, such as 5 minutes or 10 minutes or 15 minutes, the control server may send the work response within the preset receiving time, and the control server may not receive the work response sent by the transcoding server when the preset receiving time is exceeded.
And step 203, sending the video stream data to a plurality of transcoding servers according to the work response.
In this embodiment, after the control server receives the work response sent by the transcoding server, the information data corresponding to the work response may be obtained. For example, when the work response is information data, the information data may include address information, hardware information, status information, and the like of the transcoding server. The control server can judge whether the transcoding server works or not, whether transcoding work can be completed or not, whether connection is completed or whether the transcoding server is in transcoding or on line or not and the like according to the address information, the hardware information and the state information, so that the control server can determine whether the transcoding server can receive video stream data or not to perform transcoding operation according to the information.
In practical operation, after the control server determines the transcoding servers capable of performing transcoding operation, the video stream data can be sent to the transcoding servers, and the transcoding servers perform transcoding operation on the video stream data. The control server sends the video stream data to different transcoding servers for transcoding, so that video resource allocation can be effectively realized, memory resources are reasonably utilized, and the coding and transcoding efficiency of the video can be effectively improved.
In this embodiment, step 203 may include the following sub-steps:
and a substep 2031 of obtaining a plurality of transcoding addresses corresponding to the plurality of transcoding servers according to the work response.
In this embodiment, the transcoding address may be address information of the transcoding server. Since the control server may be connected to a plurality of transcoding servers, each transcoding server may have a corresponding address information in order to allow the control server to efficiently manage each transcoding server. The address information may be address information compiled by a user when the control server is connected with the transcoding server, or address information set by the user on the transcoding server through the control server, or address information allocated to each transcoding server by the control server.
Specifically, since the number of the controlled transcoding servers is large, in order to improve the management efficiency, the transcoding servers can be effectively managed by adding the transcoding addresses.
After the transcoding server receives the work request sent by the control server, the transcoding server can respond to the work request, information such as state information, hardware information and address information of the transcoding server is generated into an information packet, then the transcoding server sends the information packet to the control server, and the control server can take the information packet as a work response. Then, after the information packet is obtained, the control server may obtain a transcoding address corresponding to the transcoding server from the information packet. .
In practical operation, when the transcoding server is idle or in a standby state, the transcoding server may respond to the work request, and when the transcoding server is in a working state, the transcoding server may not respond to the work request during encoding and decoding.
Sub-step 2032 of determining one or more target addresses identical to the pre-stored addresses from the plurality of transcoded addresses.
In this embodiment, since the transcoding server is in idle or standby, it will respond to the work request and return a work response. When the control server receives the work response sent by the transcoding server, it may be determined that the transcoding server sending the work response is currently in an idle state, and may be used to encode and decode video stream data. Also in this embodiment, since the transcoding address of the transcoding server may be added to the transcoding server by the control server for the user, or distributed to a different transcoding server by the control server. After addition or allocation, the control server may record different transcoding addresses. The control server can determine whether the transcoding server corresponding to the transcoding address establishes connection with the control server and can receive video stream data to perform transcoding or encoding and decoding operations by judging the transcoding address. When the transcoding address sent by the transcoding server is the same as the address stored in the control server, it may be determined that the transcoding address is a target address, the transcoding server corresponding to the target address is a target transcoding server, and the target transcoding server is in an idle or standby state, and may perform transcoding operations.
For example, when the obtained transcoding address is 1.11.11.1 and 1.11.11.1 is included in the stored addresses, the address may be determined to be the target address; if 1.11.11.1 is not included in the stored plurality of addresses, it may be determined that the address is not a target address.
In this embodiment, the control server may determine, through the transcoding address, a transcoding server capable of performing transcoding or encoding and decoding operations, so that the idle or standby transcoding server may be used to work, resources may be more reasonably allocated, and resource utilization may be effectively improved.
Substep 2033, sending the video stream data to the transcoding server corresponding to the target address.
In this embodiment, after the corresponding transcoding server in the standby or idle state is determined by the transcoding address, the control server may send the video stream data to the transcoding server in the standby or idle state, and the transcoding server in the standby or idle state transcodes or encodes and decodes the video stream data.
In actual operation, if the transcoding server in a standby or idle state is single, the video stream data can be sent to the transcoding server; if a plurality of transcoding servers are in standby or idle states, in order to improve the efficiency of encoding, decoding and transcoding, the video stream data can be divided into a plurality of video stream data segments, the plurality of video stream data segments are respectively sent to the plurality of transcoding servers, and the plurality of different transcoding servers perform transcoding operation on the video stream data segments, so that the transcoding efficiency can be further improved, and the utilization rate of resources can be improved.
In this embodiment, the sub-step 2033 may comprise the following sub-steps:
substep 20331, counting the number of addresses of the target address.
In this embodiment, after the control server obtains the target addresses, the number of the target addresses may be counted, and the number of the transcoding servers in the current standby or idle state may be determined by counting the number of the target addresses, so as to determine whether to split the video stream data, and further improve the utilization rate of the resources.
Sub-step 20332 of determining whether the number of addresses is greater than or equal to two.
In this embodiment, when the number of addresses is greater than or equal to two, it may be stated that the number of transcoding servers in a waiting or idle state is greater than or equal to two, and in order to improve transcoding efficiency, video stream data may be appropriately divided into video stream data segments equal to the number of transcoding servers, different video stream data segments may be sent to different transcoding servers, and the different transcoding servers transcode the video stream data segments, so that transcoding efficiency may be improved, and resource utilization may also be improved.
When the number of addresses is less than two, it can be said that the number of transcoding servers in a standby or idle state is one, and only one transcoding server is in an idle state, the video stream data can be directly sent to the transcoding server, and the transcoding server performs transcoding operation.
Sub-step 20333, if the number of addresses is greater than or equal to two, segmenting the video stream data into video blocks with corresponding number according to the number of addresses.
In this embodiment, when the number of addresses is greater than two, the control server may slice the video stream data into video blocks of the same number as the addresses. For example, if the number of addresses is five and is greater than two, the control server may divide the video stream data into 5 video blocks, and may send the 5 video blocks to 5 different transcoding servers, respectively, where the transcoding servers perform corresponding transcoding operations.
When splitting, the video stream data may be split into a plurality of video blocks with the same content capacity, or into a plurality of video blocks with different memory capacities. For example, the video stream data is 1000k, and is required to be divided into 4 video blocks, may be divided into 4 video blocks of 250k, or may be divided into video blocks of 100k, 200k, 300k, and 400k, respectively.
Sub-step 20334, performing identification processing on the corresponding number of video block blocks to generate an identification video block.
In this embodiment, the identification process may encode identification or address identification or connection identification, etc. After the video blocks are cut into a plurality of video blocks, in order to splice the cut video blocks into a complete video stream again, each cut video block piece can be identified, the control server can splice the video blocks again according to the identification, and finally, a complete video stream can be generated.
In a specific operation, the control server may add identification data, for example, 111 for the first, 222 for the second, 333 for the third, etc., to the front of the video stream of each sliced video block.
And a substep 20335 of sending the marked video block to a transcoding server corresponding to the target address for transcoding processing.
After identifying the video block, the control server may send the identified video block to a plurality of different transcoding servers having target addresses corresponding thereto.
In actual operation, the identification video blocks may be correspondingly sent to different transcoding servers according to the sequence of sending the work response, or the control server may be controlled to send a plurality of different identification video blocks to different transcoding servers according to the preference of the user, or the identification video blocks may be sent to different transcoding servers according to the correspondence between the capacity of the identification video blocks and the processable memory of the transcoding servers, for example, if the capacity of one of the identification video blocks is 500k, and the processable memory of one of the transcoding servers is 600k, the 500k video block may be sent to the transcoding server capable of processing the memory of 600 k. Specifically, the order of transmission may be adjusted according to actual needs, and the present invention is not limited thereto.
In this embodiment, the sub-step 2033 may further include the sub-steps of:
sub-step 20336, if the number of addresses is less than two, sending the video stream data to the transcoding server corresponding to the target address.
In this embodiment, when the number of addresses is less than two, it can be said that the number of transcoding servers in the standby state or the idle state is also less than two, and the number of transcoding servers in the standby state or the idle state is only one.
The control server can directly send the video stream data to the transcoding server corresponding to the target address, and the transcoding server directly transcodes or encodes and decodes the video stream data.
Step 204, receiving a plurality of transcoding video blocks, wherein the plurality of transcoding video blocks are generated by the transcoding server by transcoding the video stream data.
In this embodiment, after the plurality of transcoding servers transcode the plurality of video blocks, the transcoded video blocks may be generated, and the transcoded video blocks are sent to the transcoding servers.
In practical operation, the control server may wait for a certain time, for example, 5 minutes or 10 minutes, after sending the identification video block to the transcoding server, and if the waiting time is exceeded, the control server may send an obtaining request to the transcoding server to obtain the transcoded video block. If the transcoding server does not respond to the acquisition request and returns the transcoded video block, the control server may wait for a further period of time until the transcoding server sends the transcoded video block.
And step 205, splicing the plurality of transcoded video blocks, and generating a target video stream.
In this embodiment, the control server may obtain the identification data of the transcoded video block after receiving the plurality of transcoded video blocks, rearrange the plurality of transcoded video blocks according to the identification data, and splice the plurality of transcoded video blocks into the target video stream.
Step 206, storing the target video stream.
In this embodiment, after the control server receives the target video stream data, the control server may send the generated target video stream data to the external terminal for the user to use or watch, so as to increase the practicability and flexibility of the whole video decoding unit, and store the target video stream for the user to call or use.
In a preferred embodiment of the present invention, a video processing method for a distributed server is provided, where when a control server receives video stream data, the control server sends work requests to a plurality of transcoding servers respectively; receiving work responses sent by the plurality of transcoding servers; sending the video stream data to a plurality of transcoding servers according to the work response; receiving a plurality of transcoding video blocks, wherein the plurality of transcoding video blocks are generated by transcoding the video stream data by the transcoding server; and splicing the plurality of transcoded video blocks, generating a target video stream, and finally storing the target video stream. The distributed server connection method provided by the embodiment is simple and convenient to operate and strong in transcoding capacity, and after the original video stream data can be received, the control server can coordinate each transcoding server to perform coding and transcoding, so that the coordination capacity can be greatly enhanced, the coding and transcoding capacities and efficiency can be greatly improved, the user management efficiency is facilitated, the coding or transcoding efficiency is improved, and the resource utilization rate is also improved.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 3, a schematic structural diagram of a first embodiment of a video processing apparatus for a distributed server according to the present invention is shown, applied to a control server, where the control server communicates with a plurality of transcoding servers, and the apparatus includes:
a sending request module 301, configured to, when the control server receives video stream data, send a work request to the multiple transcoding servers by the control server respectively;
a receive response module 302, configured to receive work responses sent by the multiple transcoding servers;
a data sending module 303, configured to send the video stream data to multiple transcoding servers according to the work response;
a receiving video block module 304, configured to receive multiple transcoding video blocks, where the multiple transcoding video blocks are generated by the transcoding server by performing transcoding processing on the video stream data;
a generating module 305, configured to perform a splicing process on the multiple transcoded video blocks, and generate a target video stream.
Optionally, the data sending module includes:
the obtaining module is used for obtaining a plurality of transcoding addresses corresponding to the plurality of transcoding servers according to the work response;
the determining module is used for determining one or more target addresses which are the same as the pre-stored addresses from the plurality of transcoding addresses;
and the target address corresponding module is used for sending the video stream data to the transcoding server corresponding to the target address.
Optionally, the sending the video stream data to the transcoding server corresponding to the destination address includes:
the counting module is used for counting the address number of the target address;
the judging module is used for judging whether the number of the addresses is greater than or equal to two;
the segmentation module is used for segmenting the video stream data into video blocks with corresponding number according to the number of the addresses if the number of the addresses is greater than or equal to two;
the identification module is used for identifying the video block blocks with the corresponding number to generate an identification video block;
and the transcoding processing module is used for sending the identification video block to a transcoding server corresponding to the target address for transcoding processing.
Optionally, the apparatus further comprises:
and the quantity module is used for sending the video stream data to the transcoding server corresponding to the target address if the number of the addresses is less than two.
The present embodiment proposes a video processing apparatus of a distributed server, including: a sending request module 301, configured to, when the control server receives video stream data, send a work request to the multiple transcoding servers by the control server respectively; a receive response module 302, configured to receive work responses sent by the multiple transcoding servers; a data sending module 303, configured to send the video stream data to multiple transcoding servers according to the work response; a receiving video block module 304, configured to receive multiple transcoding video blocks, where the multiple transcoding video blocks are generated by the transcoding server by performing transcoding processing on the video stream data; a generating module 305, configured to perform a splicing process on the multiple transcoded video blocks, and generate a target video stream. The video processing device of the distributed server provided by the embodiment has the advantages of simple structure, convenience in operation and strong transcoding capacity, and can coordinate each transcoding server to encode and transcode by adopting the control server after receiving original video stream data, so that the coordination capacity can be greatly enhanced, the encoding and transcoding capacities and efficiency can be greatly improved, the management efficiency of a user is facilitated, the encoding or transcoding efficiency is improved, and the resource utilization rate is also improved.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
An embodiment of the present invention further provides an apparatus, including:
the method comprises one or more processors, a memory and a machine-readable medium stored in the memory and capable of running on the processor, wherein the machine-readable medium is implemented by the processor to realize the processes of the method embodiments, and can achieve the same technical effects, and the details are not repeated here to avoid repetition.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements the processes of the foregoing method embodiments, and can achieve the same technical effects, and is not described herein again to avoid repetition.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The video processing method of the distributed server and the video processing apparatus of the distributed server provided by the present invention are introduced in detail, and a specific example is applied in the text to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method of the present invention and the core idea thereof; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (6)

1. A video processing method for a distributed server, the method being applied to a control server, the control server being in communication with a plurality of transcoding servers, the method comprising:
when the control server receives video stream data, the control server respectively sends work requests to the plurality of transcoding servers;
receiving work responses sent by the plurality of transcoding servers;
sending the video stream data to a plurality of transcoding servers according to the work response;
receiving a plurality of transcoding video blocks, wherein the plurality of transcoding video blocks are generated by transcoding the video stream data by the transcoding server;
splicing the plurality of transcoded video blocks and generating a target video stream;
wherein the sending the video stream data to a plurality of transcoding servers according to the work response comprises:
acquiring a plurality of transcoding addresses corresponding to the plurality of transcoding servers according to the work response;
determining one or more target addresses identical to the pre-stored addresses from the plurality of transcoding addresses;
sending the video stream data to a transcoding server corresponding to the target address;
the sending the video stream data to the transcoding server corresponding to the target address includes:
counting the address number of the target address;
judging whether the number of the addresses is greater than or equal to two;
if the number of the addresses is larger than or equal to two, segmenting the video stream data into video blocks with corresponding number according to the number of the addresses;
performing identification processing on the video block blocks with the corresponding number to generate identification video blocks;
and sending the identification video block to a transcoding server corresponding to the target address for transcoding processing.
2. The method of claim 1, further comprising:
and if the number of the addresses is less than two, sending the video stream data to a transcoding server corresponding to the target address.
3. A video processing apparatus for a distributed server, the apparatus being applied to a control server, the control server being in communication with a plurality of transcoding servers, the apparatus comprising:
the sending request module is used for sending work requests to the plurality of transcoding servers by the control server when the control server receives video stream data;
the receiving response module is used for receiving the work responses sent by the plurality of transcoding servers;
the data sending module is used for sending the video stream data to a plurality of transcoding servers according to the work response;
the receiving video block module is used for receiving a plurality of transcoding video blocks, and the transcoding video blocks are generated by transcoding the video stream data by the transcoding server;
the generating module is used for splicing the plurality of transcoding video blocks and generating a target video stream;
wherein, the data sending module comprises:
the obtaining module is used for obtaining a plurality of transcoding addresses corresponding to the plurality of transcoding servers according to the work response;
the determining module is used for determining one or more target addresses which are the same as the pre-stored addresses from the plurality of transcoding addresses;
the target address corresponding module is used for sending the video stream data to a transcoding server corresponding to the target address;
the target address corresponding module comprises:
the counting module is used for counting the address number of the target address;
the judging module is used for judging whether the number of the addresses is greater than or equal to two;
the segmentation module is used for segmenting the video stream data into video blocks with corresponding number according to the number of the addresses if the number of the addresses is greater than or equal to two;
the identification module is used for identifying the video block blocks with the corresponding number to generate an identification video block;
and the transcoding processing module is used for sending the identification video block to a transcoding server corresponding to the target address for transcoding processing.
4. The apparatus of claim 3, further comprising:
and the quantity module is used for sending the video stream data to the transcoding server corresponding to the target address if the number of the addresses is less than two.
5. An apparatus, comprising:
one or more processors; and
one or more machine-readable media having instructions stored thereon that, when executed by the one or more processors, cause the apparatus to perform one or more methods of claims 1-2.
6. A computer-readable storage medium storing a computer program for causing a processor to perform the method according to any one of claims 1 to 2.
CN201911414864.7A 2019-12-31 2019-12-31 Video processing method and device for distributed server Active CN111163335B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911414864.7A CN111163335B (en) 2019-12-31 2019-12-31 Video processing method and device for distributed server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911414864.7A CN111163335B (en) 2019-12-31 2019-12-31 Video processing method and device for distributed server

Publications (2)

Publication Number Publication Date
CN111163335A CN111163335A (en) 2020-05-15
CN111163335B true CN111163335B (en) 2022-04-01

Family

ID=70560112

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911414864.7A Active CN111163335B (en) 2019-12-31 2019-12-31 Video processing method and device for distributed server

Country Status (1)

Country Link
CN (1) CN111163335B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113055680B (en) * 2021-03-16 2021-12-21 西南科技大学 Distributed transcoding method
CN114710680A (en) * 2022-03-16 2022-07-05 中星电子股份有限公司 Distributed server cluster for video coding and decoding
CN114866808A (en) * 2022-06-10 2022-08-05 深圳市瑞驰信息技术有限公司 High-performance video processing system and method and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101917326A (en) * 2009-11-17 2010-12-15 新奥特(北京)视频技术有限公司 Distributed trans-coding system and task scheduling method thereof
CN102780918A (en) * 2012-08-15 2012-11-14 华数传媒网络有限公司 Video distributed coding format converting method
CN104378665A (en) * 2014-11-24 2015-02-25 深圳市天威视讯股份有限公司 Distributed transcoding system and method based on digital television
CN104469396A (en) * 2014-12-24 2015-03-25 北京中科大洋信息技术有限公司 Distributed transcoding system and method
KR102024160B1 (en) * 2017-11-30 2019-09-23 네이버 주식회사 Optimization method for time reduction of distributed transcoding and system thereof
CN110475125A (en) * 2018-05-10 2019-11-19 视联动力信息技术股份有限公司 Video transcoding method and device
CN110505499A (en) * 2019-07-24 2019-11-26 深圳市瑞讯云技术有限公司 A kind of distributed trans-coding system and distributed trans-coding device

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6795504B1 (en) * 2000-06-21 2004-09-21 Microsoft Corporation Memory efficient 3-D wavelet transform for video coding without boundary effects
US7155475B2 (en) * 2002-02-15 2006-12-26 Sony Corporation System, method, and computer program product for media publishing request processing
CN104243998B (en) * 2014-09-29 2018-01-09 广州华多网络科技有限公司 A kind of data processing method, device and associated server
CN104506881A (en) * 2014-12-31 2015-04-08 成都东方盛行电子有限责任公司 Scheduling method for audio/video fragment transcoding
US20170026311A1 (en) * 2015-07-24 2017-01-26 Le Holdings (Beijing) Co., Ltd. Method and system for allocating video transcoding resources
CN106254867A (en) * 2016-08-08 2016-12-21 暴风集团股份有限公司 Based on picture group, video file is carried out the method and system of transcoding
KR20190059465A (en) * 2017-11-23 2019-05-31 주식회사 에스제이테크놀로지 Method for smart job scaling and distributed transcoding and cloud transcoding farm system
CN110049350B (en) * 2019-04-15 2022-10-11 深圳壹账通智能科技有限公司 Video transcoding processing method and device, computer equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101917326A (en) * 2009-11-17 2010-12-15 新奥特(北京)视频技术有限公司 Distributed trans-coding system and task scheduling method thereof
CN102780918A (en) * 2012-08-15 2012-11-14 华数传媒网络有限公司 Video distributed coding format converting method
CN104378665A (en) * 2014-11-24 2015-02-25 深圳市天威视讯股份有限公司 Distributed transcoding system and method based on digital television
CN104469396A (en) * 2014-12-24 2015-03-25 北京中科大洋信息技术有限公司 Distributed transcoding system and method
KR102024160B1 (en) * 2017-11-30 2019-09-23 네이버 주식회사 Optimization method for time reduction of distributed transcoding and system thereof
CN110475125A (en) * 2018-05-10 2019-11-19 视联动力信息技术股份有限公司 Video transcoding method and device
CN110505499A (en) * 2019-07-24 2019-11-26 深圳市瑞讯云技术有限公司 A kind of distributed trans-coding system and distributed trans-coding device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
分布式视频转码系统研究与设计;胡帆;《中国优秀硕士学位论文全文数据库》;20180731;全文 *

Also Published As

Publication number Publication date
CN111163335A (en) 2020-05-15

Similar Documents

Publication Publication Date Title
CN111163335B (en) Video processing method and device for distributed server
CN108989885B (en) Video file transcoding system, segmentation method, transcoding method and device
CN105451031B (en) Video transcoding method and system
CN108810657B (en) Method and system for setting video cover
US20120304235A1 (en) Method and system for playing video file, and media resource server
AU2022209216A1 (en) Methods and apparatus for use of compact concurrent codecs in multimedia communications
US10476928B2 (en) Network video playback method and apparatus
JP2015501090A (en) Signaling segment characteristics for streaming media data over a network
EP3624453A1 (en) A transcoding task allocation method, scheduling device and transcoding device
US11019123B2 (en) Multi-bitrate component sharding
CN110662017B (en) Video playing quality detection method and device
CN1271834C (en) Multipath real time video-frequency gateway for supporting large capacity user and its application method
CN104349177A (en) Method for turning to play multimedia file under desktop cloud, virtual machine and system
KR20050038646A (en) Method of streaming multimedia data
CN112243158B (en) Media file processing method and device, computer readable medium and electronic equipment
CN104639985A (en) Multimedia playing control method and system
CN104883338A (en) Recording control method, and SIP server and recording server
CN106921634B (en) Multimedia stream multicast method and device
CN110113298A (en) Data transmission method, device, signal server and computer-readable medium
CN107948685B (en) Information promotion method and information promotion device
WO2019007027A1 (en) Video playing method and system, electronic device and readable storage medium
KR102373195B1 (en) Receiving device, transmission device, data communication method, and data processing method
CN111182309B (en) Video decoding processing method and device
Black et al. A compendium of robust data structures
CN103313093A (en) Method and index system for distributed video on demand

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
GR01 Patent grant
GR01 Patent grant