Short video seo source code construction technology sharing

1. Description of catalog and main documents

  • The bootstrap directory stores the framework bootstrap and startup files, which are not changed at the bottom layer and do not need to be modified. Some global functions can be defined in functions.inc
  • The error directory stores common error template files such as 404 and 500. Do not move unless necessary
  • includes directory, drupal framework guide file, do not move unless necessary
  • The libs directory, which stores the common class libraries of the framework, is similar to the zend framework structure, and does not need to be moved
  • mobile directory, the static file directory for developing h5 storage
  • modules directory, common framework class libraries, do not move unless necessary
  • The public directory stores commonly used static files such as global img/css/js/font, which can be stored in different categories

Two, redis data storage

Redis is an open source key-value pair storage database that supports a variety of data structures, such as strings, lists, hash tables, sets, etc. Redis is characterized by fast speed, high reliability, support for transactions, support for persistence, support for replication and other functions, making it widely used in scenarios such as caching, counters, queues, message publishing and subscription.

The usage of Redis is similar to ordinary key-value pair storage, and users can use commands such as set and get to manipulate data. At the same time, Redis also provides a wealth of data structures, such as list, set, hash, etc., and you can choose different data structures according to different needs when using them.

The advantage of Redis lies in its fast and efficient data storage and query capabilities, making it especially suitable for applications that require speed. And by supporting multiple data structures, Redis can also meet the needs of different application scenarios, such as caching, counters, message queues, etc.

3. Source code function synchronization method

Source code synchronization technology refers to the technology of synchronizing the source code of a software project from one location to another through the network to achieve code sharing, collaborative development and other functions.

Commonly used source code synchronization techniques include:

  1. Git: It is a source code synchronization technology based on a distributed version control system. With Git, you can create different branches, merge code, version control, and more.

  2. SVN: is a centralized version control system that can be used to synchronize source code. SVN can record the historical versions of files, and can also perform version control on files.

  3. Mercurial: It is a distributed version control system that can realize functions such as source code synchronization and merging. Mercurial is used similarly to Git.

  4. Perforce: It is a centralized version control system that can realize functions such as source code synchronization and version control. Perforce can be used across platforms.

 4. Functional Construction

1. First create a creative project and upload the corresponding material files

2. Select the corresponding video material editing mode and create a editing plan

3. Sticky delivery plan, configure mount information

4. Delivery record preview and effect view

5. Intelligent customer service center configuration and clue collection

 5. Technical development (material upload part)

URL request

parameter name Parameter Type Parameter Description parameter example Is it required?
open_id string Obtained through /oauth/access_token/, the unique identifier of the user ba253642-0590-40bc-9bdf-9a1334b94059 true
access_token string Call the token generated by /oauth/access_token/, which requires user authorization. act.1d1021d2aee3d41fee2d2add43456badMFZnrhFhfWotu3Ecuiuka27L56lr true

body request

parameter name Parameter Type Parameter Description parameter example Is it required?
media [] material file <nil> false

response parameters

parameter name Parameter Type Parameter Description parameter example
extra struct <nil>
data struct <nil>

$breadcrumbs = [
    ['title' => 'AI视频创意', 'link' => '#'],
    ['title' => '开始创作', 'link' => ''],
];
$this->buildBreadcrumbs($breadcrumbs);
//搜索专用
$keyword_type = $this->request->getStrParam('keyword_type');
$keyword = $this->request->getStrParam('keyword');
$this->output['keyword_type'] = $keyword_type;
$this->output['keyword'] = $keyword;

$dv_id = $this->request->getIntParam('dv_id');  //视频工程ID
$this->output['dv_id'] = $dv_id;
$type = $this->request->getIntParam('type', 0);   //素材类型
$scene = $this->request->getIntParam('scene', 1);
$this->output['scene'] = $scene;
//获取视频信息
$video_model = new App_Model_Douyin_MysqlVideoStorage();
$video_info = $video_model->getRowByIdSid($dv_id, $this->sid);
if (empty($video_info)) {
    plum_redirect_with_msg('视频创意工程不存在');
}

$mixed_video_mode = $video_info['dv_video_mode'];
if (in_array($mixed_video_mode, [11])) {    //智能图片组合
    $type = in_array($type, [0, 1]) ? 3 : $type;   //默认为图片素材类型
} else {
    $type = in_array($type, [0, 3]) ? 1 : $type;  //默认为视频素材类型
}

//获取素材列表
$where = [
    ['name' => 'dvm_ds_id', 'oper' => '=', 'value' => $this->sid],
    ['name' => 'dvm_dv_id', 'oper' => '=', 'value' => $dv_id],
    ['name' => 'dvm_material_type', 'oper' => '=', 'value' => $type]
];
//视频类型,区分混剪模式
if ($type == 1) {
    $where[] = ['name' => 'dvm_video_mixed_mode', 'oper' => '=', 'value' => $video_info['dv_video_mode']];
}
if (!empty($keyword_type)) {
    $where[] = ['name' => $keyword_type, 'oper' => 'like', 'value' => "%{$keyword}%"];
}
//智能场景组合,视频素材加场景值筛选
if ($type == 1 && $mixed_video_mode == 4) {
    $scene_model = new App_Model_Douyin_MysqlVideoSceneStorage();
    $scene_count = $scene_model->getCountByDvid($dv_id);
    if ($scene_count == 0 && $video_info['dv_video_use'] > 0) {
        for ($i = 1; $i <= $video_info['dv_video_use']; $i++) {
            $indata = [
                'dvs_ds_id' => $this->sid,
                'dvs_dv_id' => $dv_id,
                'dvs_name' => "场景" . $i,
                'dvs_duration' => $video_info['dv_video_shot'] * 1000,
                'dvs_

Guess you like

Origin blog.csdn.net/weixin_59086012/article/details/131371625