算子使用手册
一、算子功能介绍
1.功能概述
我们将多模态数据处理与建设的经验通过算子与工作流模版进行沉淀,为业务数据处理和建设提供统一工程和策略的一站式解决方案。
业务可通过平台提供的数据生产功能、高质算子和经验模版,提高业务数据生产质量和生产效率。
算子与模板:涵盖多模态数据抽取、处理、过滤、去重、嵌入的算子,全面覆盖文本、文档、图片、语音、视频等多种数据类型的处理需求。无论是从繁杂的文档中精准抽取关键信息,对模糊的图片数据进行清晰清洗,还是对多来源视频片段进行识别理解,都能通过算子的灵活组合轻松实现。
算子工作流:业务人员无需投入大量精力进行底层开发,只需像搭建积木一样,从丰富的算子库中选择合适的算子,按照业务逻辑拖拽组合,即可快速构建专属的分布式数据处理工作流,大大提升开发效率和生产质量。
2.功能入口
2.1预置算子查看
您可以通过元数据中的数据目录system>default>算子,来查看平台提供的预置算子。

单击目标算子,可以查看算子的具体描述功能和使用方法,以及不同版本的列表。

单击目标算子版本,可以查看不同版本算子的使用限制分类,以及输入、输出和运行参数,进行算子的使用。

2.2 预置算子使用
算子可以在工作流和Notebook中使用。
2.2.1 新建工作流使用:
1.创建一个新的工作流,选择工作流画布左侧算子任务组件,单击算子任务组件即可在左侧选择平台预置算子,组件自己的工作流。

2.在算子任务中,添加输入与输出算子,增加数据处理步骤算子,完成算子的参数填写,并且选择算子任务运行的资源,即可完成算子任务的配置。

2.2.2 预置工作流模版使用:
可以通过预置工作流模版使用,单击模版的使用按钮,平台会自动创建对应的工作流,使用平台数据实验效果或者修改算子的参数,选择算子任务运行的资源,完成算子任务配置单击立即运行,出发算子任务的运行。

2.3 工作流算子任务查看
单击工作流Tab页签的运行记录,进行单个工作流运行的实时查看,是否运行成功或者失败,单击单次运行记录,支持查看算子任务的运行结果和日志。

通过菜单运行记录,支持所有工作流运行结果的查看,支持通过记录ID、工作流、运行用户和运行时间状态筛选。

二、算子介绍
1.算子使用规范
1.1 算子处理的数据格式
算子处理的数据类似数据表,以列进行划分,每列有一个列名称字段,算子可以通过列名称访问列数据。
1.2 算子输入和输出参数
算子输入和输出参数,指的就是前面说的算子能够处理的列名称,一个参数表示一个列名称。
- 算子的输出参数指定的列名称可以和输入参数不同,可以是输入数据里不包含的,此时相当于算子输出了新的数据列。
1.3 算子运行参数
算子运行参数分为必选参数和可选参数,可选参数提供默认值,使用时可以只填写必选参数。
1.4 算子串联编排
算子的串联通过算子的输入和输出参数规定,例如算子B的输入参数时 images,那么一个算子的输出参数包含images时,都可以作为算子B的输入算子和算子B进行串联编排。
2.算子介绍
有关算子的详细介绍可参考算子清单。
3.FAQ
3.1.算子串联组成工作流的约束有哪些?
- 工作流必须包含输入(数据加载器)和输出(数据输出器)算子。
- 输入算子作为工作流起始节点,输出算子作为工作流的结束节点。
- 两个算子串联的约束是前一个算子的输出参数包含后一个算子的输入参数。
3.2.不同算子对输入数据的格式要求是什么?
-
文本算子:文本算子(例如 文本长度过滤算子)的输入为纯文本数据,数据列必须为 text,数据列的每一行是要处理的文本数据,csv文件格式的样例如下:
- 第一行的 text 表示列名称
Python1text 2春回中原,万象更新。河南省周口市项城市孙店镇广阳村的农田里,一片忙碌。放眼望去,万亩麦田长势喜人,生机勃勃。 3台湾是中国的一个省 4根据输入的文本提取实体名称、属性、属性描述以及原文中的支持文本片段 -
文档算子:文档算子(例如 PDF内容提取)的输入为文档文件,数据列必须为 documents,数据列的每一行是要处理的文档Volume路径名,这些路径名存放在一个csv文件中,样例如下:
- 第一行的 documents 表示列名称
Python1documents 2/Volumes/catalog_video/default/documents/重型车辆快充最佳方案MCS兆瓦充电BESS电池储能可再生电力_20250630190320.pdf 3/Volumes/catalog_video/default/documents/重卡市场的全员输家正标志着一个时代的落幕_20250630190438.pdf -
图片算子:图片算子(例如 图片宽高比过滤算子)的输入为图片文件,数据列必须为 images,数据列的每一行是要处理的图片Volume路径名,这些路径名存放在一个csv文件中,样例如下:
- 第一行的 images 表示列名称
Python1images 2/Volumes/catalog_video/default/images/1700601631611470432.png 3/Volumes/catalog_video/default/images/1700602121714198432.png 4/Volumes/catalog_video/default/images/1700602758608543872.png 5/Volumes/catalog_video/default/images/1700602853310761728.png 6/Volumes/catalog_video/default/images/1700602885409602080.png -
视频算子:视频算子(例如 视频美学得分过滤算子)的输入为视频文件,数据列必须为 videos,数据列的每一行是要处理的视频Volume路径名,这些路径名存放在一个csv文件中,样例如下:
- 第一行的 videos 表示列名称
Python1videos 2/Volumes/catalog_video/default/input_videos/傻兔子要被揣废废.mp4 3/Volumes/catalog_video/default/input_videos/blur.mp4 4/Volumes/catalog_video/default/input_videos/face.mp4 5/Volumes/catalog_video/default/input_videos/今日头条_1744801955928.mp4 -
音频算子:音频算子(例如 音频添加高斯噪声算子)的输入为音频文件,数据列必须为 audios,数据列的每一行是要处理的音频Volume路径名,这些路径名存放在一个csv文件中,样例如下:
- 第一行的 audios 表示列名称
Python1audios 2/Volumes/catalog_video/default/input_audio/audio1.mp3 3/Volumes/catalog_video/default/input_audio/audio2.wav 4/Volumes/catalog_video/default/input_audio/audio3.ogg -
多模态算子:多模态算子(例如 图片文本匹配度过滤)的输入为图片和文本,数据列必须包含 images 和 text,images 列的内容可以参考上面的图片算子,text列的内容可以参考上面的文本算子,样例如下,这里以jsonl格式举例:
Python1{"images": ["/Volumes/op_test/default/images/blip.jpg"], "text": "<__db__image>a woman sitting on the beach with a dog"} 2{"images": ["/Volumes/op_test/default/images/img2.jpg", "/Volumes/op_test/default/images/cat.jpg"], "text": "<__db__image>this is tv"}
三、预置算子工作流模版介绍
1.视频生文工作流模版
1.1 模版概述
本工作流针对视频进行视频描述的文字生成,可以用来生产高质量的视频-文本数据,用于文生视频模型的训练。

1.2 工作流算子节点配置说明
| 算子别名 | 算子名称 | 功能 | 算子资源类型 | 备注 |
|---|---|---|---|---|
| 数据加载器 | databuilder_location_loader |
读取指定目录下的所有指定格式文件,将文件内容转换为DataBuilder的数据集格式传递给下游算子 | CPU | 可以使用平台数据实验或者可以自定义配置 |
| 视频读取 | video_scanner | 扫描指定目录下的所有视频文件 | CPU | |
| 视频信息提取 | video_info_extractor | 提取视频信息(帧数、高度、宽度、长宽比、帧率、帧率和像素值) | CPU | |
| 视频时长过滤 | column_filter | 按给定列去除满足条件的行 | CPU | |
| 场景检测 | video_scene_detector | 对输入的视频进行场景检测,以起止时间戳方式输出检测到的场景列表 | CPU | |
| 场景分割 | video_scene_cutter | 根据输入的场景时间戳信息将视频按照场景切分为多个子视频,此算子仅输出一个videos列 | CPU | |
| 美学打分 | aesthetic_evaluation | 对视频的美学质量进行打分,采用improved aesthetic predictor模型,分值越高画面越优美,过滤美学分数低的视频 | GPU | |
| 美学分数过滤 | column_filter | 按给定列去除满足条件的行 | CPU | |
| 光流打分 | optical_flow_evaluation | 对视频的运动进行打分,采用UniMatch模型,计算视频的光流分数,过滤运动较少的视频 | GPU | |
| 光流分数过滤 | column_filter | 按给定列去除满足条件的行 | CPU | |
| OCR打分 | ocr_evaluation | 对视频中的文字进行检测,采用DBNet++模型,计算OCR分数,画面中文字越密集得分越高,过滤文字密集的视频 | GPU | |
| OCR分数过滤 | column_filter | 按给定列去除满足条件的行 | CPU | |
| 视频生成文字 | pllava_caption | 采用pllava模型对视频进行caption,只能生成英文 | GPU | |
| 匹配打分 | matching_score | 采用CLIP计算文本和视频之间的匹配分数,得分越高说明匹配度越高 | GPU | |
| 分数过滤 | column_filter | 根据匹配分数对视频-文本对进行过滤 | CPU | |
| 数据输出 | exporter | 将输入的数据持久化输出为Volume结构化文件 | CPU | 需要配置 填写输出结果的元数据卷路径 |
1.3 工作流效果试点
- 工作流输出结果如下:
1[
2 {
3 "videos": "/Volumes/catalog_video/default/output_video/face-63fc595d46e864ef1eef165e1cb1ed062289e341bdd4adc30ce15315b56ea98d_scene-0.mp4",
4 "aesthetic_score": 4.733111381530762,
5 "optical_flow_score": 0.6497821807861328,
6 "ocr_score": 0,
7 "text": "The video is a close-up of a woman speaking in front of a window with a view of a cityscape. She is wearing glasses and a pink top. The window has a plant with red flowers in it. The woman appears to be in a room with a desk and a teapot on it. There is a purple logo in the bottom left corner of the screen. The woman is gesturing with her hands as she speaks. The lighting in the room is natural, suggesting it is daytime. The background is blurred, but it seems to be an indoor setting. The woman's expression is serious, and she seems to be in the middle of a conversation or presentation. The overall style of the video is casual and informal, with a focus on the woman and her speech.",
8 "match_score": 27.515625
9 },
10 {
11 "videos": "/Volumes/catalog_video/default/output_video/今日头条_1744801955928-410c70a1521c6c024661af66970c5f59ed9b1ec9523b741e363feac1bab1bce0_scene-1.mp4",
12 "aesthetic_score": 3.84828519821167,
13 "optical_flow_score": 4.759511947631836,
14 "ocr_score": 0,
15 "text": "The video appears to be a news report or a live broadcast from a location that seems to be a public area with a crowd of people. The image is slightly blurry, making it difficult to discern specific details. There are several individuals visible, some of whom are standing and others who are seated. The people are dressed in various styles of clothing, and there is a mix of genders and ages. In the foreground, there is a person who seems to be operating a motorcycle, as suggested by the handlebars and the rider's posture. The person is wearing a white shirt and has their back to the camera. The background shows a large crowd of people, some of whom are standing close to a fence or barrier. The setting appears to be outdoors during the daytime, as indicated by the natural lighting. There is text overlaying the image, which is likely providing context or information related to the event being reported. However, the text is not in English and is too small to read clearly. The style of the video suggests it is a real-time event, possibly a news report or a live broadcast from a public gathering or protest. The",
16 "match_score": 25.03125
17 }
18]
- 结果描述:
| key | 值 | 描述 |
|---|---|---|
| videos | /Volumes/catalog_video/default/output_video/face-63fc595d46e864ef1eef165e1cb1ed062289e341bdd4adc30ce15315b56ea98d_scene-0.mp4 | 根据场景切分的子视频文件Volume路径 |
| aesthetic_score | 4.733111381530762 | 视频美学打分 |
| optical_flow_score | 0.6497821807861328 | 视频光流打分 |
| ocr_score | 0 | 视频文字密集度打分 |
| text | The video is a close-up of a woman speaking in front of a window with a view of a cityscape. She is wearing glasses and a pink top. The window has a plant with red flowers in it. The woman appears to be in a room with a desk and a teapot on it. There is a purple logo in the bottom left corner of the screen. The woman is gesturing with her hands as she speaks. The lighting in the room is natural, suggesting it is daytime. The background is blurred, but it seems to be an indoor setting. The woman's expression is serious, and she seems to be in the middle of a conversation or presentation. The overall style of the video is casual and informal, with a focus on the woman and her speech. | 视频稠密字幕 |
| match_score | 27.515625 | 视频和稠密字幕的匹配度 |
2.视频理解工作流模版
2.1 工作流模版概述

2.2 工作流算子节点配置说明
| 算子别名 | 算子名称 | 功能 | 算子资源类型 | 备注 |
|---|---|---|---|---|
| 视频输入 | databuilder_location_loader |
读取指定目录下的所有指定格式文件,将文件内容转换为DataBuilder的数据集格式传递给下游算子 | CPU | 可以使用平台数据实验或者可以自定义配置 |
| 视频抽帧 | video_frame_spliter | 通过配置的参数对输入的视频进行抽帧,抽帧结果以压缩jpg内存数据输出 | CPU | 可以使用平台数据实验或者可以自定义配置 |
| 分数过滤 | video_understanding | 支持3种视频理解服务:舆情分析、情感属性、风险识别 | CPU | 可以使用平台数据实验或者可以自定义配置 |
| 数据输出 | exporter | 将输入的数据持久化输出为Volume结构化文件 | CPU | 需要配置 填写输出结果的元数据卷路径 |
2.3 工作流效果试点
- 工作流输出结果如下:
1[
2 {
3 "videos": "/Volumes/catalog_video/default/videos/气氛搞起来.mp4",
4 "video_understanding": {
5 "是否包含": "是",
6 "风险场景": "打架斗殴"
7 }
8 },
9 {
10 "videos": "/Volumes/catalog_video/default/videos/视频人脸模糊算子处理结果视频.mp4",
11 "video_understanding": {
12 "是否包含": "否",
13 "风险场景": ""
14 }
15 }
16]
- 结果描述:
| key | 值 | 描述 |
|---|---|---|
| videos | /Volumes/catalog_video/default/videos/气氛搞起来.mp4 | 原始视频文件Volume路径 |
| video_understanding | { "是否包含": "是", "风险场景": "打架斗殴" } |
视频理解算子的输出结果 |
评价此篇文章
