diff --git a/Learn.VideoAnalysis.API/Program.cs b/Learn.VideoAnalysis.API/Program.cs
index 3573147..3aba7f6 100644
--- a/Learn.VideoAnalysis.API/Program.cs
+++ b/Learn.VideoAnalysis.API/Program.cs
@@ -34,6 +34,7 @@ namespace Learn.VideoAnalysis.API
//ʼ
builder.Configuration.AddAppConfig(args);
+ builder.Services.AddHttpClient();
builder.Services.AddSqlSugarExpand();
builder.Services.AddRedisExpand();
builder.Services.AddCoravel();
diff --git a/VideoAnalysis/Components/Pages/VideoTaskShow.razor b/VideoAnalysis/Components/Pages/VideoTaskShow.razor
index 6ef2722..547416a 100644
--- a/VideoAnalysis/Components/Pages/VideoTaskShow.razor
+++ b/VideoAnalysis/Components/Pages/VideoTaskShow.razor
@@ -27,7 +27,7 @@
问题: @q.StartTime 秒
@q.TopicStem
@q.Question
-
+
}
diff --git a/VideoAnalysis/appsettings.Production.json b/VideoAnalysis/appsettings.Production.json
index e7a4068..de03aca 100644
--- a/VideoAnalysis/appsettings.Production.json
+++ b/VideoAnalysis/appsettings.Production.json
@@ -22,6 +22,14 @@
"FFmpeg": {
" TimeSlice": 600
},
+ "AliyunOSS": {
+ "AccessKeyId": "LTAI5tDC6p9h747B7FHbgwkH",
+ "AccessKeySecret": "vRKgmbp1LB05LaGOjh3ZrZxbHSLYLF",
+ "BucketDomain": "https://learn-videoanalysis.oss-cn-chengdu.aliyuncs.com",
+ "Region": "cn-chengdu",
+ "BucketName": "learn-videoanalysis",
+ "EndPoint": "oss-cn-chengdu.aliyuncs.com" //上传节点
+ },
"DB": {
//"ConnectionString": "AllowLoadLocalInfile=true;Server=10.255.255.3;Port=3306;Database=learn.videoanalysis;User ID=marking;Password=qwe123!@#;CharSet=utf8mb4;pooling=true;SslMode=None",
"ConnectionString": "AllowLoadLocalInfile=true;Server=rm-2vc20nd3d11g0oh6g2o.rwlb.cn-chengdu.rds.aliyuncs.com;User ID=marking;Password=poiuytPOIUYT098765)(*&^%;Port=3306;Database=learn.videoanalysis;CharSet=utf8mb4;pooling=true;SslMode=None",
diff --git a/VideoAnalysisCore/AICore/FFMPGE/FFMPGEHandle.cs b/VideoAnalysisCore/AICore/FFMPGE/FFMPGEHandle.cs
index 3768cb3..9babf3e 100644
--- a/VideoAnalysisCore/AICore/FFMPGE/FFMPGEHandle.cs
+++ b/VideoAnalysisCore/AICore/FFMPGE/FFMPGEHandle.cs
@@ -68,7 +68,7 @@ namespace VideoAnalysisCore.AICore.FFMPGE
RedisExpand.SetTaskProgress(task, "Frame=>50%");
Image prevFrame = null;
- var keyFrames = new List();
+ var keyFrames = new List(5);
foreach (var frameFile in frameFiles)
{
using (var currFrame = Image.Load(frameFile))
diff --git a/VideoAnalysisCore/AICore/GPT/DeepSeek/DeepSeek_GPT.cs b/VideoAnalysisCore/AICore/GPT/DeepSeek/DeepSeek_GPT.cs
index ffc4bd6..da82af3 100644
--- a/VideoAnalysisCore/AICore/GPT/DeepSeek/DeepSeek_GPT.cs
+++ b/VideoAnalysisCore/AICore/GPT/DeepSeek/DeepSeek_GPT.cs
@@ -19,6 +19,7 @@ using FFmpeg.NET.Services;
using Aliyun.OSS;
using Yitter.IdGenerator;
using VideoAnalysisCore.Common.Expand;
+using System.Collections.Generic;
namespace VideoAnalysisCore.AICore.GPT.DeepSeek
{
@@ -57,18 +58,9 @@ namespace VideoAnalysisCore.AICore.GPT.DeepSeek
/// 获取内容对应的章节
///
///
- private async Task> GetVideoKnow(List questionRes, VideoTask taskInfo, string sections, int course_Id)
+ private async Task> GetVideoKnow(List questionRes, VideoTask taskInfo,
+ string sections, List knowledgeInfos)
{
-
- var know = await knowledgeInfoDB.GetFirstAsync(s => s.Course_Id == course_Id && s.Name == sections);
- if (know is null)
- throw new Exception("未能找到对应知识点=>" + sections);
-
- var subject = taskInfo.Subject.ToString();
-
- var kInfo = await knowledgeInfoDB.GetByIdAsync(know.Parent_Id);
- var knowledgeInfos = await knowledgeInfoDB.AsQueryable()
- .ToChildListAsync(s => s.Parent_Id, kInfo.Parent_Id == 0 ? kInfo.Id : kInfo.Parent_Id);
var knows = string.Join(',', knowledgeInfos.Select(s => s.Id + "|" + s.Name));
var knowDic = knowledgeInfos
.OrderBy(s => s.Id)
@@ -79,7 +71,7 @@ namespace VideoAnalysisCore.AICore.GPT.DeepSeek
var thems = JsonSerializer.Serialize(questionRes.Adapt());// string.Join(',', questionRes.Select(s => s.StartTime + "->" + s.Theme));
var checkResFormat1 = """[{"StartTime":开始秒(number),"KnowPoint":知识点名称(string),"KnowPointId":知识点Id(string)}]""";
var knowMessages =
- $"我针对{subject}课堂授课视频分析出了视频的授课阶段片段。" +
+ $"我针对{taskInfo.Subject}课堂授课视频分析出了视频的授课阶段片段。" +
$"现在需要你通过每个片段的内容总结来分配正确的知识点(单个片段允许多个知识点用逗号','分割)。" +
$"这是我的分段 {thems}。" +
$"课堂内容与{sections}章节相关" +
@@ -136,7 +128,6 @@ namespace VideoAnalysisCore.AICore.GPT.DeepSeek
&& (s.Depth == 3
|| s.Depth == 2))
.Select(s => s.Name).ToArrayAsync();
- string title = taskInfo.MediaName;
var captionsArr = JsonSerializer.Deserialize(taskInfo.Captions);
var fileNameResFormat = "{授课章节: string|null}";
@@ -378,22 +369,27 @@ namespace VideoAnalysisCore.AICore.GPT.DeepSeek
/// 提取试题
///
///
- private async Task AnalysisVideoQuestions(VideoTask taskInfo)
+ private async Task AnalysisVideoQuestions(VideoTask taskInfo, List knowledgeInfos)
{
Console.WriteLine(DateTime.Now + $"=>{taskInfo.Id} 提取试题");
if (taskInfo is null || string.IsNullOrEmpty(taskInfo.PPTKeyFrame))
return null;
var farmeArr = JsonSerializer.Deserialize(taskInfo.PPTKeyFrame);
+
+ var knowArrStr = string.Join(',', knowledgeInfos.Select(s => s.Id + "|" + s.Name));
var videoKnowArr = await videoKonwPointDB.GetListAsync(s => s.VideoTaskId == taskInfo.Id);
+ var videoKnowDic = knowledgeInfos
+ .GroupBy(s => s.Id)
+ .ToDictionary(s => s.Key, s => s.First());
var insertData =new List();
var insertQuestionKonw = new List();
foreach (var item in farmeArr)
{
var knowInfoArr = videoKnowArr
- .Where(s => item+5 >= s.StartTime && item+5 <= s.EndTime)
+ .Where(s => item+30 >= s.StartTime && item <= s.EndTime)
.ToArray();
if (knowInfoArr is null || knowInfoArr.Count() ==0)
- return null;
+ continue;
var tryCount = 50;
while (tryCount>1)
{
@@ -409,20 +405,24 @@ namespace VideoAnalysisCore.AICore.GPT.DeepSeek
break;
Console.WriteLine(DateTime.Now + $"=>{taskInfo.Id} 提取{knowInfoArr.First().StartTime}秒试题的试题内容");
Console.WriteLine( sRes.Result.res.value);
- var knowArr=JsonSerializer.Serialize(knowInfoArr.Select(s => new { s.KnowPointId, s.KnowPoint }));
+ //var knowArr=JsonSerializer.Serialize(knowInfoArr.Select(s => new { s.KnowPointId, s.KnowPoint }));
var resFormat = """[{"Type":string(试题类型),"TopicStem":string(试题题干),"QuestionArr":[{"Question":string(子问题),"KnowPointId":(string)知识点ID}]}]""";
var postMessages =
- $"我将提供一段内容是md格式的试题内容字符串。" +
- $"请提取出其中的试题内容试,题干以及每个试题的问题。并且为每个试题关联上在我限定范围内的知识点(多个则用逗号分割)。" +
- $"知识点格式(json格式)范围[{knowArr}]。" +
- $"排除不是试题内容的文字,优化公式排版并且去除题号,但不要修改latex数学公式。" +
+ $"我将提供一段内容是Markdown格式的试题。" +
+ $"请提取出其中有效的试题内容(包括 题干,公式试题内提出的问题 )。" +
+ $"为每个问题关联上限定范围内的知识点(多个则用逗号分割),知识点格式 (知识点Id|知识点名称)知识点范围[{knowArrStr}]。" +
+ $"排除不是试题内容的文字,优化试题排版并且去除题号,尽量保留latex数学公式。" +
$"如果存在多道题,则需要拆分成为多个试题对象!" +
- $"试题的类型约束在 填空题/判断题/选择题/解答题 范围内。" +
- $"请检查我提供的字符串内容,如不包含问题试题则返回`[]`" +
+ $"试题的类型约束在 填空题/判断题/选择题/解答题/填空题 范围内。" +
+ $"如果存在题干中存在下划线则试题的题型应该是填空题。" +
+ $"请检查我提供的字符串内容,如果不能识别知识点则不处理知识点,如不包含问题试题则返回`[]`" +
$"输出内容只返回json格式为({resFormat})" +
$"以下是试题内容" +
$"`{sRes.Result.res.value}`";
var resData = await ChatAsync(taskInfo.Id.ToString(), postMessages, "提取试题", "deepseek-chat");
+ //var resData = await ChatAsync(taskInfo.Id.ToString(), postMessages, "提取试题");
+ if(resData is null || resData.Count()==0)
+ break;
foreach (var q in resData)
{
var TopicId = YitIdHelper.NextId();
@@ -436,16 +436,22 @@ namespace VideoAnalysisCore.AICore.GPT.DeepSeek
vq.StageId = knowInfoArr.First().StageId;
vq.Question = qt.Question;
vq.TopicId = TopicId;
+ vq.Type = q.Type;
+ if(string.IsNullOrEmpty(qt.KnowPointId))
+ continue;//重试
insertData.Add(vq);
foreach (var kid in qt.KnowPointId.Split(","))
{
+ var tryOk = int.TryParse(kid.Split("|").First(),out int kidd);
+ if(!tryOk || !videoKnowDic.ContainsKey(kidd))
+ continue;//跳过未识别知识点
insertQuestionKonw.Add(new VideoQuestionKonw()
{
- KnowPoint = knowInfoArr.First(s => s.KnowPointId == kid).KnowPoint,
+ KnowPoint = videoKnowDic[kidd].Name,
KnowPointId = kid,
StageId = q.StageId,
- VideoTaskId = q.VideoTaskId,
- VideoQuestionId = q.Id,
+ VideoTaskId = vq.VideoTaskId,
+ VideoQuestionId = vq.Id,
});
}
}
@@ -467,7 +473,6 @@ namespace VideoAnalysisCore.AICore.GPT.DeepSeek
await videoQuestionKonwDB.AsDeleteable()
.Where(s => s.VideoTaskId == taskInfo.Id)
.ExecuteCommandAsync();
-
await videoQuestionDB.InsertRangeAsync(insertData.Adapt());
await videoQuestionKonwDB.InsertRangeAsync(insertQuestionKonw);
@@ -502,6 +507,14 @@ namespace VideoAnalysisCore.AICore.GPT.DeepSeek
var captionsArr = JsonSerializer.Deserialize(taskInfo.Captions);
//处理视频授课章节
var sections = await GetSections(taskInfo, Course_Id);
+
+ var know = await knowledgeInfoDB.GetFirstAsync(s => s.Course_Id == Course_Id && s.Name == sections);
+ if (know is null)
+ throw new Exception("未能找到对应知识点=>" + sections);
+ var kInfo = await knowledgeInfoDB.GetByIdAsync(know.Parent_Id);
+ var knowledgeInfos = await knowledgeInfoDB.AsQueryable()
+ .ToChildListAsync(s => s.Parent_Id, kInfo.Parent_Id == 0 ? kInfo.Id : kInfo.Parent_Id);
+
//AI优化字幕
captionsArr = await OptimizeSubtitles(taskInfo, captionsArr, sections);
//合并字幕
@@ -516,7 +529,7 @@ namespace VideoAnalysisCore.AICore.GPT.DeepSeek
if (questionRes.Count == 0) continue;
//处理分段 知识点
- var insertData = await GetVideoKnow(questionRes, taskInfo, sections, Course_Id);
+ var insertData = await GetVideoKnow(questionRes, taskInfo, sections, knowledgeInfos);
//校验结果质量
var checkRes = await VerifySpanQuality(questionRes, taskInfo, captions, sections, Course_Id);
@@ -544,7 +557,7 @@ namespace VideoAnalysisCore.AICore.GPT.DeepSeek
.HMSetAsync(RedisExpandKey.Task(task), "VideoKnows", questionRes);
if (taskInfo.VideoType == AttachmentsInfoType.Review)
- await AnalysisVideoQuestions(taskInfo);
+ await AnalysisVideoQuestions(taskInfo, knowledgeInfos);
RedisExpand.InsertChannel(RedisChannelEnum.EndTask, task);
return null;
diff --git a/VideoAnalysisCore/Common/DownloadFile.cs b/VideoAnalysisCore/Common/DownloadFile.cs
index 8cdcb9f..eb916fa 100644
--- a/VideoAnalysisCore/Common/DownloadFile.cs
+++ b/VideoAnalysisCore/Common/DownloadFile.cs
@@ -127,7 +127,7 @@ namespace VideoAnalysisCore.Common
//获取资源文件 地址
var taskInfo = await videoTaskDB.AsQueryable()
.Where(s => s.Id == taskId).FirstAsync();
- if (taskInfo is null || string.IsNullOrEmpty(taskInfo.MediaName) || taskInfo.MediaName.Contains("教研"))
+ if (taskInfo is null )
throw new Exception($"任务为null/是教研视频/没有视频课程名称");
var fileUrl = taskInfo.MediaUrl;
if (string.IsNullOrEmpty(fileUrl))
diff --git a/VideoAnalysisCore/Common/Expand/AliyunOSSExpand.cs b/VideoAnalysisCore/Common/Expand/AliyunOSSExpand.cs
index 74c4965..53470ad 100644
--- a/VideoAnalysisCore/Common/Expand/AliyunOSSExpand.cs
+++ b/VideoAnalysisCore/Common/Expand/AliyunOSSExpand.cs
@@ -88,10 +88,14 @@ namespace VideoAnalysisCore.Common.Expand
{
try
{
- var path = item.VideoTaskId.ToString() + "/" + Path.GetFileName(item.FilePath);
+ var isDebug = false;
+#if DEBUG
+ isDebug = true;
+#endif
+ var path = (isDebug ?"debug/":string.Empty) + item.VideoTaskId.ToString() + "/" + Path.GetFileName(item.FilePath);
if (cached.Contains(item.FilePath))
{
- item.ImageUrl = AppCommon.Config.AliyunOSS.BucketDomain + "/" + path;
+ item.PPTImageUrl = AppCommon.Config.AliyunOSS.BucketDomain + "/" + path;
continue;
}
using var file = File.OpenRead(item.FilePath);
@@ -100,7 +104,7 @@ namespace VideoAnalysisCore.Common.Expand
AppCommon.Config.AliyunOSS.BucketName,
path,
file);
- item.ImageUrl = AppCommon.Config.AliyunOSS.BucketDomain + "/" + path;
+ item.PPTImageUrl = AppCommon.Config.AliyunOSS.BucketDomain + "/" + path;
cached.Add(item.FilePath);
continue;
}
diff --git a/VideoAnalysisCore/Controllers/Dto/ApiDto.cs b/VideoAnalysisCore/Controllers/Dto/ApiDto.cs
index d3bf7ff..203b783 100644
--- a/VideoAnalysisCore/Controllers/Dto/ApiDto.cs
+++ b/VideoAnalysisCore/Controllers/Dto/ApiDto.cs
@@ -46,18 +46,24 @@ namespace VideoAnalysisCore.Controllers.Dto
}
public class NodePackageReq
{
+ ///
+ /// 素材Id 需要返回给我的参数
+ ///
+ public long MaterialId { get; set; }
///
- /// 录播结构目录节点编号
+ /// 文件Id 需要返回给我的参数
///
- [Required(ErrorMessage = "目录节点编号是必填项")]
- public long NodeId { get; set; }
+ public long AttachmentId { get; set; }
///
- /// 科目类型
+ /// 需要返回给我的参数
///
- [Required(ErrorMessage = "科目类型是必填项")]
- public SubjectEnum SubjectType { get; set; }
+ public string VideoCode { get; set; }
+ ///
+ /// 视频地址
+ ///
+ public string VideoUrl { get; set; }
///
/// 任务类型
@@ -66,10 +72,33 @@ namespace VideoAnalysisCore.Controllers.Dto
public TaskTypeEnum TaskType { get; set; }
///
- /// 视频列表
+ /// 课程类型 0=新课 3=复习 4= 活动 5=班会 7=其他资料
///
- [Required(ErrorMessage = "文件数量是必填项")]
- public List AnalyzeItems { get; set; }
+ public AttachmentsInfoType CourseType { get; set; }
+ ///
+ /// 视频类型 PPT课件 = 1, 摄像头 = 2
+ ///
+ public int VideoType { get; set; }
+
+ ///
+ /// 分析完成后的回调地址
+ ///
+ public string CallBackUrl { get; set; }
+
+ ///
+ /// 请求区域 回调的时候 需要把这个添加到Headers里面 Key=Area value=Area的值
+ ///
+ public string Area { get; set; }
+ ///
+ /// 请求区域 回调的时候 需要把这个添加到Headers里面 Key=HostIP value=HostIP的值
+ ///
+ public string HostIP { get; set; }
+
+ ///
+ /// 科目类型
+ ///
+ [Required(ErrorMessage = "科目类型是必填项")]
+ public SubjectEnum SubjectType { get; set; }
}
///
diff --git a/VideoAnalysisCore/Controllers/LJZK_Controller.cs b/VideoAnalysisCore/Controllers/LJZK_Controller.cs
index b390891..efb7e3d 100644
--- a/VideoAnalysisCore/Controllers/LJZK_Controller.cs
+++ b/VideoAnalysisCore/Controllers/LJZK_Controller.cs
@@ -45,79 +45,52 @@ namespace VideoAnalysisCore.Controllers
}
- ///
- /// ǿ_ļڵ
- ///
- ///
- ///
- [HttpPost(Name = "NodeSubscription")]
- [NonAction, Obsolete]
- public async Task NodeSubscription(NodeMonitoringReq req)
- {
- if (req is null || req.NodeId == 0)
- return BadRequest("Чύ");
- if (nodesubscriptionDB.IsAny(s => s.NodeId == req.NodeId))
- return BadRequest("ظ˽ڵ" + req.NodeId);
- var res = await nodesubscriptionDB.InsertReturnEntityAsync(new NodeSubscription()
- {
- NodeId = req.NodeId,
- TaskType = req.Type ?? default,
- Subject = req.Subject ?? default,
-
- });
- return Ok(res);
- }
///
/// ǿ_ļ
///
- ///
+ ///
///
[HttpPost(Name = "NodePackage")]
- public async Task NodePackage(NodePackageReq req)
+ public async Task NodePackage(NodePackageReq[] reqArr)
{
- Console.WriteLine($"{DateTime.Now} ļ req=" + JsonSerializer.Serialize(req));
- if (req.AnalyzeItems is null || req.AnalyzeItems.Count() == 0)
+ Console.WriteLine($"{DateTime.Now} ļ req=" + JsonSerializer.Serialize(reqArr));
+ if (reqArr is null || reqArr.Count() == 0)
return BadRequest("ЧƵб");
- var videos = new List(req.AnalyzeItems.Count);
- var nodePackages = new List(req.AnalyzeItems.Count);
+ var videos = new List(reqArr.Count());
+ var nodePackages = new List(reqArr.Count());
var videoIdArr = videoTaskDB.AsQueryable().Select(v => v.TagId).Distinct().ToArray();
- foreach (var s in req.AnalyzeItems)
+ foreach (var s in reqArr)
{
var np = new NodePackageInfo()
{
VideoCode = s.VideoCode,
- AttachmentsInfoType = s.AttachmentsInfoType,
MaterialId = s.MaterialId,
- StructurePageContentId = s.StructurePageContentId,
- VideoName = s.VideoName,
- NodeId = req.NodeId,
- TaskType = req.TaskType,
- SubjectType = req.SubjectType,
+ AttachmentId = s.AttachmentId,
+ TaskType = s.TaskType,
+ SubjectType = s.SubjectType,
VideoUrl =s.VideoUrl,
+ CourseType = s.CourseType,
CallBackUrl=s.CallBackUrl,
+ Area = s.Area,
+ HostIP = s.HostIP,
};
nodePackages.Add(np);
- if (s.AttachmentsInfoType == AttachmentsInfoType.PPT)
- continue;
if (videoIdArr.Contains(s.VideoCode))
continue;
- var pptInfo = req.AnalyzeItems //ȡppt videoCode
- .FirstOrDefault(x => x.AttachmentsInfoType == AttachmentsInfoType.PPT
- && s.StructurePageContentId == x.StructurePageContentId);
- var pptCode = pptInfo?.VideoCode ?? (pptInfo?.VideoUrl??string.Empty);
+ //todoȡppt videoCode
+ var pptCode = "todoȡppt videoCode";
videos.Add(new VideoTask()
{
Id = YitIdHelper.NextId(),
ComeFrom = "127.0.0.1",
ApiToken = "",
- Type = req.TaskType,
- Subject = req.SubjectType,
+ Type = s.TaskType,
+ Subject = s.SubjectType,
TagId = s.VideoCode,
MediaUrl =s.VideoUrl,
- MediaName = s.VideoName,
PPTVideoCode = pptCode,
- VideoType =s.AttachmentsInfoType
+ VideoType =s.CourseType
});
}
await nodePackageInfoDB.InsertRangeAsync(nodePackages);
diff --git a/VideoAnalysisCore/Job/NodePackageJob.cs b/VideoAnalysisCore/Job/NodePackageJob.cs
index 70938b9..e18a84a 100644
--- a/VideoAnalysisCore/Job/NodePackageJob.cs
+++ b/VideoAnalysisCore/Job/NodePackageJob.cs
@@ -8,7 +8,9 @@ using System.Net;
using System.Net.Http.Json;
using System.Reflection;
using System.Security.Cryptography;
+using System.Security.Policy;
using System.Text;
+using System.Text.Json;
using System.Threading.Tasks;
using UserCenter.Model.Enum;
using VideoAnalysisCore.Common;
@@ -31,6 +33,7 @@ namespace VideoAnalysisCore.Job
private readonly Repository nodePackageInfoDB;
private readonly Repository attachmentsDB;
private readonly Repository videoTaskDB;
+ private readonly IHttpClientFactory _clientFactory;
public NodePackageJob(Repository videoTaskDB,
Repository nodePackageInfoDB, Repository videotaskDB)
{
@@ -65,9 +68,7 @@ namespace VideoAnalysisCore.Job
Console.WriteLine($"{DateTime.Now} 执行=>文件包任务 任务回调 数量{postData.Count} ...");
if (postData.Count() == 0)
return;
- //var responseMessage = await new HttpClient()
- // .PostAsJsonAsync(AppCommon.Config.Subsystem.蓝鲸智库.APIUrl + "/api/callback/platform/videosAnalyze", postData);
- foreach (var item in taskArr)
+ foreach (var item in taskArr)
{
HttpResponseMessage responseMessage = null;
try
@@ -75,8 +76,14 @@ namespace VideoAnalysisCore.Job
var postUrl = !string.IsNullOrWhiteSpace(item.CallBackUrl)
? item.CallBackUrl
: AppCommon.Config.Subsystem.蓝鲸智库.APIUrl + "/api/callback/platform/videosAnalyze";
- responseMessage = await new HttpClient()
- .PostAsJsonAsync(postUrl, postData);
+
+ var apiClent = _clientFactory.CreateClient();
+ var request = new HttpRequestMessage(HttpMethod.Post, postUrl);
+ request.Headers.Add("Area", item.Area); // 直接添加到本次请求头
+ request.Headers.Add("HostIP", item.HostIP); // 直接添加到本次请求头
+ request.Content = new StringContent(JsonSerializer.Serialize(postData), Encoding.UTF8, "application/json");
+ responseMessage = await apiClent.SendAsync(request);
+
if (responseMessage.IsSuccessStatusCode)
{
var res = await responseMessage.Content.ReadAsStringAsync();
diff --git a/VideoAnalysisCore/Job/NodeSubscriptionJob.cs b/VideoAnalysisCore/Job/NodeSubscriptionJob.cs
index db03543..6ac5724 100644
--- a/VideoAnalysisCore/Job/NodeSubscriptionJob.cs
+++ b/VideoAnalysisCore/Job/NodeSubscriptionJob.cs
@@ -92,7 +92,6 @@ namespace VideoAnalysisCore.Job
Tag = item.NodeId.ToString(),
TagId = s.VideoCode,
MediaUrl = string.Empty,
- MediaName = s.Name
});
}
var maxId = data.Max(s => s.Id);
diff --git a/VideoAnalysisCore/Model/NodePackageInfo.cs b/VideoAnalysisCore/Model/NodePackageInfo.cs
index 8681a51..6d09c4b 100644
--- a/VideoAnalysisCore/Model/NodePackageInfo.cs
+++ b/VideoAnalysisCore/Model/NodePackageInfo.cs
@@ -30,18 +30,9 @@ namespace VideoAnalysisCore.Model
[SugarColumn(Length = 32)]
public string VideoCode { get; set; }
///
- /// 视频文件名称
+ /// 文件Id 需要返回给我的参数
///
- [SugarColumn(Length = 32)]
- public string VideoName { get; set; }
- ///
- /// 录播结构目录节点编号
- ///
- public long NodeId { get; set; }
- ///
- /// 录播内容编号
- ///
- public long StructurePageContentId { get; set; }
+ public long AttachmentId { get; set; }
///
/// 素材ID
///
@@ -49,7 +40,7 @@ namespace VideoAnalysisCore.Model
///
/// 内容类型
///
- public AttachmentsInfoType AttachmentsInfoType { get; set; }
+ public AttachmentsInfoType CourseType { get; set; }
///
/// 科目类型
@@ -80,8 +71,17 @@ namespace VideoAnalysisCore.Model
///
/// 通知回调地址
///
-
[SugarColumn(Length = 500)]
public string CallBackUrl { get; set; }
+ ///
+ /// 请求区域
+ /// 回调添加到Headers
+ ///
+ public string Area { get; set; }
+ ///
+ /// 请求区域
+ /// 回调添加到Headers
+ ///
+ public string HostIP { get; set; }
}
}
diff --git a/VideoAnalysisCore/Model/VideoQuestion.cs b/VideoAnalysisCore/Model/VideoQuestion.cs
index 943aab7..755ed23 100644
--- a/VideoAnalysisCore/Model/VideoQuestion.cs
+++ b/VideoAnalysisCore/Model/VideoQuestion.cs
@@ -39,10 +39,10 @@ namespace VideoAnalysisCore.Model
public long TopicId { get; set; }
///
- /// 图片地址
+ /// PPT切图地址
///
[SugarColumn(Length =100)]
- public string? ImageUrl { get; set; }
+ public string? PPTImageUrl { get; set; }
///
/// 题干
///
@@ -53,6 +53,12 @@ namespace VideoAnalysisCore.Model
///
public string? Question { get; set; }
///
+ /// 试题类型
+ /// [填空题/判断题/选择题/解答题]
+ ///
+ [SugarColumn(Length = 10,IsNullable =true)]
+ public string? Type { get; set; }
+ ///
/// 试题开始时间
///
public int StartTime { get; set; }
diff --git a/VideoAnalysisCore/Model/VideoTask.cs b/VideoAnalysisCore/Model/VideoTask.cs
index be5d044..4f29fee 100644
--- a/VideoAnalysisCore/Model/VideoTask.cs
+++ b/VideoAnalysisCore/Model/VideoTask.cs
@@ -28,10 +28,6 @@ namespace VideoAnalysisCore.Model
///
public string MediaUrl { get; set; } = string.Empty;
///
- /// 媒体文件名称
- ///
- public string MediaName { get; set; } = string.Empty;
- ///
/// 下载后本地媒体目录
///
public string LocalMediaPath { get; set; } = string.Empty;