文章目录[隐藏]
一、 短视频矩阵是什么意思?
短视频矩阵,简单来说就是通过抖音,快手等各种短视频平台上管理不同的账号,通过在不同平台上管理不同的账号,实现账号之间流量互通,利用不同平台的推荐机制,实现企业营销价值最大化。常见的企业矩阵的玩法主要有:独立账号之间的互相客串,视频中互相@,给小号做引流等
二、 短视频矩阵系统开发背景
主要是解决问题: 1. 多账号管理效率低 2. 账号多,视频内容批量产出难 3. 多账号下作品带来的客户线索难捕捉问题 4. 非工作时间客服下线 造成的意向客户线索流失问题。
三、 系统主要开发功能
- 同城拓客引流
- 视频批量剪辑产出
- 多账号管理
- 多账号视频发布
- 企业智能客服
- 企业意向客户线索收集
四、 开发流程
源码开发需要准备:
源码所需服务器配置
1、规格:最低4核8G
2、硬盘:不低于100G
3、带宽:可以使用按量付费,100M峰值带宽
4. 系统:CentOS7或CentOS8
部分功能代码展示
class App_Controller_Dydqtshoppc_VideoController extends App_Controller_Dydqtshoppc_InitController {
const VIDEO_PLAY_POSTER = "/public/dydqt/img/video-zw.png";
//支持的视频平台
private $platform = [
'dou_yin' => '抖音',
'kuai_shou' => '快手',
'bai_jia_hao' => '好看视频',
'xiao_hong_shu'=> '小红书',
'xi_gua' => '西瓜',
'tou_tiao' => '头条',
'bili_bili' => '哔哩哔哩',
];
/*
* AI视频创意工作台
*/
public function indexAction() {
//面包屑
$breadcrumbs = [
['title' => 'AI视频创意', 'link' => '#zhyy'],
['title' => '工作台', 'link' => '/video/index'],
];
$this->buildBreadcrumbs($breadcrumbs);
//视频数量统计
$collect_model = new App_Model_Douyin_MysqlCollectShopStorage();
$collect_data = $collect_model->getCollectSurplusBySid($this->sid);
//视频创意统计
$video_model = new App_Model_Douyin_MysqlVideoStorage();
$vt_where = [
['name' => 'dv_s_id', 'oper' => '=', 'value' => $this->sid]
];
$video_total = $video_model->getCount($vt_where);
//素材数量统计
$attachment_model = new App_Model_Douyin_MysqlShopAttachmentStorage();
$attachment_count = $attachment_model->getTotalByGroup($this->sid);
$count_data = [
'image_count' => 0,
'image_size' => '0B',
'audio_count' => 0,
'audio_size' => '0B',
'video_count' => 0,
'video_size' => '0B',
];
foreach ($attachment_count as $count) {
switch ($count['dsa_type']) {
case 1 :
$count_data['image_count'] = $count['total'];
$count_data['image_size'] = plum_compute_byte($count['size']);
break;
case 2 :
$count_data['audio_count'] = $count['total'];
$count_data['audio_size'] = plum_compute_byte($count['size']);
break;
case 3 :
$count_data['video_count'] = $count['total'];
$count_data['video_size'] = plum_compute_byte($count['size']);
break;
}
}
$count_data['video_remain'] = $collect_data['cs_surplus'];
$count_data['video_create'] = $collect_data['cs_rest_num'];
$count_data['video_release']= $collect_data['cs_scan_count'];
$count_data['video_download'] = $collect_data['cs_download_num'];
$count_data['video_total'] = $video_total;
$this->output['count_data'] = $count_data;
if ($this->front_module == 'eui') {
$this->displaySmarty('dspui/video/index.html');
} else {
$this->displaySmarty('dydqtshoppc/video/index.tpl');
}
}
public function itemListAction() {
//面包屑
$breadcrumbs = [
['title' => 'AI视频创意', 'link' => '#'],
['title' => '创意工程', 'link' => '#'],
];
$this->buildBreadcrumbs($breadcrumbs);
$mode = $this->request->getIntParam('mode', 0);
$this->output['mode'] = $mode;
$time_range = $this->request->getStrParam('time_range');
$keyword_type = $this->request->getStrParam('keyword_type');
$keyword = $this->request->getStrParam('keyword');
$where = [
['name' => 'dv_s_id', 'oper' => '=', 'value' => $this->sid]
];
if(!empty($time_range)){
$add_time_range_arr = explode('~',$time_range);
$where[] = ['name' => 'dv_create_time', 'oper' => '>=', 'value' => strtotime($add_time_range_arr[0])];
$where[] = ['name' => 'dv_create_time', 'oper' => '<', 'value' => strtotime($add_time_range_arr[1]) + 86400];
}
if(!empty($keyword_type)){
$where[] = ['name' => $keyword_type, 'oper' => 'like', 'value' => "%{$keyword}%"];
}
if ($mode > 0) {
$where[] = ['name' => 'dv_video_mode', 'oper' => '=', 'value' => $mode];
}
$sort = ['dv_create_time' => 'DESC'];
//获取视频列表
$Video_model = new App_Model_Douyin_MysqlVideoStorage();
$video_list = $Video_model->getList($where,$this->index,$this->count,$sort);
$temp_video_model = new App_Model_Douyin_MysqlVideoTempVideoStorage($this->sid);
$pailie_video_model = new App_Model_Douyin_MysqlVideoMaterialPailieStorage();
foreach ($video_list as &$item) {
$item['cache_num'] = $temp_video_model->getTempVideoCountByItem($item['dv_id']);
$item['pailie'] = $pailie_video_model->getRowByDvid($item['dv_id']);
$progerss = 40;
if ($item['video_num'] > 0 || $item['image_num'] > 0) {
$progerss += 10;
}
if ($item['audio_num'] > 0 || $item['write_num'] > 0) {
$progerss += 10;
}
if ($item['pailie']['dvmp_is_zuhe']) {
$progerss += 20;
}
if ($item['cache_num'] > 0) {
$progerss += 20;
}
$item['progress'] = $progerss;
}
//计算分页
$active_list_all = $Video_model->getCount($where);
$page_libs = new Libs_Pagination_Paginator($active_list_all,$this->count,'jquery',true);
$pageHtml = $page_libs->render();
$this->output['time_range'] = $time_range;
$this->output['keyword_type'] = $keyword_type;
$this->output['keyword'] = $keyword;
$this->output['video_list'] = $video_list;
$this->output['pageHtml'] = $pageHtml;
$this->output['progress_line'] = [
20 => ['color' => 'red', 'tip' => '创建创意工程已完成'],
40 => ['color' => 'red', 'tip' => '选择混剪模式已完成'],
50 => ['color' => 'orange', 'tip' => '添加音视频素材未完成'],
60 => ['color' => 'orange', 'tip' => '添加音视频素材已完成'],
70 => ['color' => 'blue', 'tip' => '视频混剪组合已完成'],
80 => ['color' => 'blue', 'tip' => '视频混剪组合已完成'],
90 => ['color' => 'green', 'tip' => '视频缓存已完成'],
100 => ['color' => 'green', 'tip' => '工程所有步骤已完成'],
];
$this->output_mode_link();
$this->displaySmarty('dydqtshoppc/video/item-list.tpl');
}
/*
* 剪辑模式链接
*/
private function output_mode_link() {
$video_mixed_mode = plum_parse_config('project_mixed_mode', 'dydqt/project');
array_unshift($video_mixed_mode, [
'title' => '全部',
'mode' => 0,
'desc' => '',
]);
foreach ($video_mixed_mode as &$item) {
$item['link'] = "/dydqtshoppc/video/itemList?mode=".$item['mode'];
}
$this->output['video_mixed_mode'] = $video_mixed_mode;
}
/**
原文链接:https://blog.csdn.net/weixin_59086012/article/details/129202674?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522169258329616800182761710%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=169258329616800182761710&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_ecpm_v1~times_rank-13-129202674-null-null.268%5Ev1%5Ekoosearch&utm_term=%E6%8A%96%E9%9F%B3%E7%9F%A9%E9%98%B5