用户反馈的问题:
Failed to load resource: the server responded with a status of 631提高白模判定门槛 (image-analysis.service.ts):
// 修复前:条件宽松,容易误判
if (!content.hasFurniture && !content.hasLighting &&
(detailLevel === 'minimal' || detailLevel === 'basic') && // ❌ basic也算白模
qualityScore < 70) { // ❌ 70分以下都可能是白模
return 'white_model';
}
// 修复后:条件严格,避免误判
if (!content.hasFurniture &&
!content.hasLighting &&
detailLevel === 'minimal' && // ✅ 只有minimal才是白模
qualityScore < 60 && // ✅ 质量必须很低
textureQuality < 50) { // ✅ 纹理质量也必须很低
return 'white_model';
}
优化默认判断逻辑:
// 修复前:低质量图片默认判定为白模
if (qualityScore >= 85) return 'post_process';
else if (qualityScore >= 70) return 'rendering';
else if (qualityScore >= 55) return 'soft_decor';
else return 'white_model'; // ❌ 55分以下都是白模
// 修复后:优先判定为渲染,避免误判为白模
if (qualityScore >= 85) return 'post_process';
else if (qualityScore >= 65) return 'rendering'; // ✅ 降低渲染门槛
else if (qualityScore >= 50) return 'soft_decor';
else if (qualityScore >= 40) return 'rendering'; // ✅ 即使质量低,也优先判定为渲染
else return 'white_model'; // ✅ 只有极低质量才是白模
新的判断标准:
| 阶段 | 修复前条件 | 修复后条件 |
|---|---|---|
| 白模 | 无装饰 + (minimal或basic) + 质量<70 | 无装饰 + minimal + 质量<60 + 纹理<50 |
| 软装 | 有家具 + 无灯光 + 质量60-80 | 有家具 + 无灯光 + 质量60-80 |
| 渲染 | 有灯光 + 质量≥75 | 有灯光 + 质量≥70 或 质量≥65 |
| 后期处理 | 质量≥90 + 超精细 | 质量≥90 + 超精细 |
| 默认兜底 | 质量<55 → 白模 | 质量40-65 → 渲染,<40 → 白模 |
添加详细上传日志 (project-file.service.ts):
console.log(`📤 开始上传文件: ${file.name}`, {
size: `${(file.size / 1024 / 1024).toFixed(2)}MB`,
type: file.type,
prefixKey,
projectId
});
const uploadedFile = await storage.upload(file, {...});
console.log(`✅ 文件上传成功: ${file.name}`, {
url: uploadedFile.url,
key: uploadedFile.key
});
增强错误处理:
catch (error: any) {
console.error('❌ 上传并创建ProjectFile失败:', error);
console.error('❌ 错误详情:', {
message: error?.message,
code: error?.code || error?.status,
name: error?.name,
fileName: file.name,
fileSize: `${(file.size / 1024 / 1024).toFixed(2)}MB`,
projectId
});
// 🔥 特殊处理631错误
if (error?.status === 631 || error?.code === 631) {
const errorMsg = `存储服务错误(631):${file.name}\n可能原因:\n1. 存储配额已满\n2. 项目ID无效\n3. 文件名包含特殊字符\n4. 网络连接问题`;
console.error('❌ 631错误:', errorMsg);
throw new Error(errorMsg);
}
throw error;
}
修复前:
修复后:
测试案例:
| 图片特征 | 修复前判定 | 修复后判定 |
|---|---|---|
| 质量65分 + basic精细度 | ❌ 白模 | ✅ 渲染 |
| 质量55分 + detailed精细度 | ❌ 白模 | ✅ 软装 |
| 质量45分 + 有家具 | ❌ 白模 | ✅ 软装 |
| 质量50分 + 无装饰 | ❌ 白模 | ✅ 渲染 |
| 质量35分 + minimal + 纹理30 | ✅ 白模 | ✅ 白模 |
修复前:
修复后:
调试日志示例:
📤 开始上传文件: IMG_1234.jpg
size: 2.5MB
type: image/jpeg
prefixKey: project/abc123/space/xyz789/stage/delivery
projectId: abc123
✅ 文件上传成功: IMG_1234.jpg
url: https://file-cloud.fmode.cn/...
key: project/abc123/...
631错误日志:
❌ 上传并创建ProjectFile失败: Error
❌ 错误详情:
message: "Upload failed"
code: 631
fileName: IMG_1234.jpg
fileSize: 2.5MB
projectId: abc123
❌ 631错误: 存储服务错误(631):IMG_1234.jpg
可能原因:
1. 存储配额已满
2. 项目ID无效
3. 文件名包含特殊字符
4. 网络连接问题
# 联系管理员查看OBS存储使用情况
# 确认是否接近或超过配额限制
// 打开浏览器控制台
console.log('项目ID:', projectId);
// 确认项目ID不为空且格式正确
// 检查文件名是否包含特殊字符
console.log('文件名:', file.name);
// 建议:使用纯英文文件名,避免中文和特殊符号
# 测试网络连接
ping obs.cn-south-1.myhuaweicloud.com
# 检查防火墙设置
# 确认没有阻止OBS服务的访问
// 检查文件是否超过限制
console.log('文件大小:', (file.size / 1024 / 1024).toFixed(2), 'MB');
// 当前限制:50MB
修改内容:
修改内容:
ng build yss-project --base-href=/dev/yss/
obsutil sync ./dist/yss-project/ obs://nova-cloud/dev/yss -i=... -k=... -e="obs.cn-south-1.myhuaweicloud.com" -acl=public-read
obsutil chattri obs://nova-cloud/dev/yss -r -f -i=... -k=... -e="obs.cn-south-1.myhuaweicloud.com" -acl=public-read
hcloud CDN CreateRefreshTasks/v2 --cli-region="cn-north-1" --refresh_task.urls.1="https://app.fmode.cn/dev/yss/" --refresh_task.type="directory" --cli-access-key=... --cli-secret-key=...
创建时间:2025-11-28 最后更新:2025-11-28