百万级数据导出OOM:POI的坑与EasyExcel的流式写入实战(附内存对比)
掘金
POI全量加载百万行数据直接OOM。本文拆解POI内存瓶颈,给出EasyExcel流式写入+分页查询的完整方案,附内存对比与踩坑记录。
Score: 57.21Confidence: 54%
View offerLoading the catalog…
THE AI OPPORTUNITY INDEX
Find your next AI tool. Explore free access, trials, and credits — all in one place.
掘金
POI全量加载百万行数据直接OOM。本文拆解POI内存瓶颈,给出EasyExcel流式写入+分页查询的完整方案,附内存对比与踩坑记录。
Score: 57.21Confidence: 54%
View offer掘金
手写一个 Tool-Calling Agent:为什么要先不用框架 框架能让你十分钟搭出一个 Agent demo。
Score: 57.18Confidence: 54%
View offerReadhub
华为、港中文、港科大的研究者联合推出代码数据工程框架 LegoFlow,可将代码数据流水线全自动化运行,各流程封装为标准插件技能供编码智能体直接调用。其发布的 LegoFlow-SWE 数据集从 1200 万个候选 PR 中筛选出 5000 个覆盖 8 种编程语言的验证任务及 2780 条高质量轨迹,仅用 1000 条轨迹训练 Qwen3.5-35B-A3B-Base,即可在相关基准评测上取得优异成绩。框架采用模块化 block 设计,各模块分别负责任务构建、轨迹生成、微调训练、基准评测等环节,配套看板可监控全流程进度。研究还得出任务质量比数量重要、需采取措施缓解模型评测作弊、SFT 轨迹的推理深度比覆盖率更重要等经验,经两轮智能体自主调整策略的递归迭代,模型在 SWE-bench Verified 上的性能大幅提升。目前项目正沿终端任务、复杂长程软件工程任务、递归式自我改进方向扩展,相关代码、数据、文档均已开源。
Score: 57.17Confidence: 54%
View offerReadhub
TaoMate-H3 是阿里巴巴 TaoLive AIGC 团队基于 MiniMax H3 研发的音视频联合流式生成模型,将三步 LoRA 推理与自回归生成结合,以小片段为单位推进生成,无需等待整段视频完成,支持根据文本描述生成含对白、歌声或环境音的视频,可实现分钟级续写,提供多档横竖屏分辨率输出,大幅缩短首段内容产出时间,为直播、虚拟角色表演等场景提供技术基础。目前其推理代码与 LoRA 权重已在 GitHub 和 Hugging Face 开放,开发者可下载体验开展相关开发与研究。该模型具备三步流式生成、音视频联合生成、分钟级连续续写三大核心能力,可应用于电商讲解、角色演唱表演、动漫对白创作、环境特效生成等多种场景,其推理流程分为分段组织内容、准备音频引导、联合流式生成、解码输出四个环节,依托三步 LoRA、Self Forcing 自回归训练、音视频 KV 缓存、连续时间编码、音频轨迹引导等关键技术实现高效稳定生成,经测试在指定硬件下相比原版 MiniMax H3 生成效率大幅提升,首段内容就绪时间显著缩短。项目遵循相关开源协议,团队后续还将持续优化速度,陆续开源更多流式音视频生成模型。
Score: 57.17Confidence: 54%
View offerReadhub
哈佛大学理论物理学家马修・施瓦茨借助 Claude 搭建的科研工具包 BootLoops 1.0 正式开源。施瓦茨提出「Claude 形状的问题」思路,即利用 AI 跨领域知识广、代码能力强、处理数据速度快的优势,解决不同学科中已有成熟跨领域解法但本领域学者未掌握的卡壳问题,基于该思路打造的 BootLoops 不绑定特定大模型,还设立了可核验的运算标准防范 AI 蒙混。过去三个月,施瓦茨联合 19 位合作者依托这套工具从 400 个候选问题中筛选推进,完成了覆盖 18 个领域的 36 篇学术手稿,在粒子物理、生态学、群体遗传学、经济学、语言学等多个领域取得了诸多跨界科研进展。这套科研架构通过多独立会话分工调度提升运行稳定性,但过程仍高度依赖人类学者把控学术方向、核验成果,当前 AI 仍存在缺乏时间概念、解题爱用蛮力、易夸大成果、无学术鉴别力等明显缺陷。施瓦茨认为当前 AI 最适合助力探索人类此前受限于精力未能涉足的学科交叉地带,同时 AI 深度介入科研也给传统学术评价、人才培养等现有学术生态带来了新的冲击与待解的问题。
Score: 57.17Confidence: 54%
View offer掘金
CFL3D是一款结构化网格、单元中心、迎风偏置的雷诺平均Navier-Stokes(Reynolds-Averaged Navier-Stokes, RANS)求解器。
Score: 57.16Confidence: 54%
View offer掘金
从像素到战场:红外场景仿真引擎的核心技术深度解析 摘要 红外场景仿真(Infrared Scene Simulation),是通过计算机在虚拟环境里"合成"一台红外探测相机的成像结果的技术。
Score: 57.15Confidence: 54%
View offer人人都是产品经理
一家企业做新品开发,要管 34 个节点、4 个阶段,现在靠 Excel 和群里问进度。客户想要一个看板:节点可折叠、自动算逾期,交付物能上传预览写意见,采购单还要从前面下推。采购订单、审批流、库存记账这些 ERP 都有,缺的是进度和跨节点归档这两层。 前阵子客户提了个需求。一家企业做新品开发,从打样到入库 34 个节点、4 个阶段。现在用 Excel 管,每个节点记着计划起止日期、应交交付物、实际完成日期,谁交了、卡在哪一步靠群里问。 他们想要个页面:节点按阶段分组可折叠,自动显示状态和逾期天数;交付物能上传、预览、下载、写意见;节点 29 把前 28 个节点的资料打包归档;节点 30、31 建采购订单,33、34 做采购到货和入库,后面的单子从前面下推,不允许凭空新增。 这里面一半 ERP 有,另一半 ERP 没这个概念。 采购订单、采购到货单、采购入库单是现成的,审批流、下推转换、单据编码、库存记账也是标准能力,不用开发。 ERP 没有的是“进度”。ERP 管单据,单据状态只有未审核、已审核。“这个节点该交什么、交没交、超期几天”不是单据状态,是按计划日期和实际情况算出来的。ERP 里没有节点这个对象,也没有阶段、完成率、逾期数。即使是YonSuite的项目云或专业的项目管理软件也没这种一个页面概览所有节点的功能。 交付物也不是单据。ERP 的附件挂在单据上、跟着签审走,这里的附件挂在节点上,一个节点可能好几份、格式各异,还要在线预览和写意见。 还有几处细节。当天算不算超期,计划结束空的怎么算,上传就算完成还是确认才算,删了要不要退回,这几条组合起来才能得出一个状态,ERP 不会预置。归档同理,把跨节点的资料打成一个包是批处理动作,ERP 的附件按单据存,没有跨对象打包这回事。 另外,ERP 有下推,但标准的单据入口允许手工新增。而客户要求到货单和入库单不允许无源新增,而且只能在看板这个页面弹框操作,不喜欢跳转到ERP原生的《采购订单》、《采购入库单》等页面。 单据能复用,进度和资料要单独做一层。这种 需求难点 是 在ERP的一个页面综合多条个性化需求+原生功能模块(嵌入式) ,从市面上的大erp来看,没有一个能实现,无论是用友ys还是金蝶星空或所谓ai套件,传统开发的难度也很大,咋办呢,头疼。 作者:业财老曾 公众号:业财老曾谈 本文由 @业财老曾 原创发布于人人都是产品经理。未经作者许可,禁止转载 题图来自 Unsplash,基于CC0协议
Score: 57.01Confidence: 54%
View offeriThome 新聞
衛福部健康幣10月1日正式上路,要把民眾健檢、癌篩、打疫苗等預防保健行為,轉換為可查詢、可兌換的數位獎勵。年滿18歲且持有臺灣健保卡的民眾,完成健保快易通App身分驗證並綁定國健署Health GO App後,就能透過健康存摺的健康幣專區,來查詢累積情形。今年12月1日起,累積滿1,000健康幣,民眾可依規定於合作通路兌換健康商品、電子票券或折抵部分自費醫療項目。 健康幣10月1日上路,健保快易通身兼點數查詢入口 做完健檢、癌篩或打疫苗後,能不能不用自己留單據、拍照上傳,也能自動拿到獎勵?
Score: 56.48Confidence: 54%
View offervelog
Dubai is a place where impressive vehicles are a familiar sight on the road. Wide highways, modern attractions, luxury hotels, stylish restaurants, and vibrant entertainment areas create an ideal setting for enjoying a premium car. Among the vehicles that attract attention, Brabus rental Dubai and Ferrari SF90 stand out for very different reasons. A Brabus offers a bold combination of power, luxury, and commanding road presence, while the Ferrari SF90 delivers an exciting sports car experience with remarkable performance. If you are considering renting either vehicle in Dubai, there are several important things to understand before making a booking. From choosing the right car for your plans to checking rental conditions, insurance, mileage, deposits, and driving requirements, careful preparation can make the entire experience more enjoyable. Understand What a Brabus Rental Offers Brabus is known for creating highly customized versions of premium Mercedes vehicles. Depending on the particular model available from a rental company, a Brabus can provide an impressive combination of luxury, performance, distinctive styling, and a carefully finished interior. A Brabus SUV can be particularly practical for Dubai because it combines a spacious cabin with a strong road presence. It can be used for business meetings, hotel transfers, shopping trips, sightseeing, and special occasions. Before booking, ask the rental company about the exact Brabus model. Different Brabus vehicles can have very different specifications, seating arrangements, engine performance, and equipment. Knowing the exact model helps you choose a vehicle that matches your plans. Explore the Ferrari SF90 Experience The Ferrari SF90 provides a completely different type of driving experience. It is a high performance Ferrari designed for drivers who want an exciting sports car with advanced technology and impressive acceleration. Its low profile and sports car design make it especially suited to travelers who want a memorable vehicle for special occasions or leisure drives. The Ferrari SF90 can be an attractive option for photography sessions, celebrations, luxury outings, and enjoying Dubai's modern roads. However, a sports car requires more consideration than a large SUV. Limited luggage space, low ground clearance, and a different seating arrangement can affect where and how you use the vehicle. Consider your itinerary carefully before choosing the SF90 for an entire trip. Think About Your Travel Plans Your schedule should play an important role in deciding between a Brabus and Ferrari SF90. If you need a vehicle for several passengers, luggage, business appointments, and longer journeys, a Brabus may provide greater practicality. If you are traveling alone or with one passenger and your main objective is to enjoy a high performance sports car, the Ferrari SF90 may better match your plans. Some visitors may even choose different vehicles for different occasions. A spacious Brabus can handle daily travel, while the Ferrari SF90 can be reserved for a special evening, celebration, or memorable drive. Check the Rental Price and Inclusions Never look only at the headline rental price. Before confirming your booking, ask exactly what the quoted amount includes. Important details can include insurance, mileage allowance, taxes, delivery and collection charges, additional driver fees, and other rental costs. Premium and high performance vehicles can have specific conditions that differ from standard car rentals. Ask whether the quoted rate is calculated by day, several days, or another rental period. If you intend to keep the car for an extended stay, ask about longer rental packages. A clear understanding of the total cost allows you to plan your budget properly. Understand the Security Deposit Luxury and performance cars may require a security deposit. Before collecting the vehicle, confirm the required amount and payment method. Ask how the deposit is handled and what circumstances can affect its return. Traffic fines, toll charges, fuel differences, or vehicle damage may be handled according to the terms of the rental agreement. Reading this section carefully can prevent misunderstandings later. If anything in the agreement is unclear, ask the rental company for an explanation before signing. Inspect the Vehicle Carefully A detailed inspection is especially important when renting an expensive vehicle. Before driving away, examine the exterior and interior carefully. Look for scratches, dents, wheel marks, paint damage, glass damage, and any other visible imperfections. Inside the vehicle, check the seats, dashboard, displays, controls, and other equipment. Make sure existing damage is documented by the rental company. Taking photographs or videos at the beginning of the rental can also provide a useful record of the vehicle's condition. For a Ferrari SF90 or a customized Brabus, careful inspection is particularly sensible because repairs and cosmetic components can be costly. Understand Mileage Restrictions Mileage conditions can have a major effect on your rental experience. Some rental agreements provide a daily mileage allowance, while additional distance may result in extra charges. Think about where you plan to drive before selecting a rental package. If you expect to visit different parts of Dubai or travel to another emirate, your mileage requirements may be higher. Ask the rental provider how additional mileage is calculated. Knowing this before booking can help you avoid unexpected expenses when returning the vehicle. Learn About Dubai Roads Dubai has an extensive network of modern roads, but traffic conditions can change considerably throughout the day. Drivers should pay attention to speed limits, road signs, lane markings, traffic signals, and other instructions. If you are driving a Ferrari SF90, extra attention is useful because its performance can make it tempting to focus on acceleration rather than normal road conditions. Always follow posted speed limits and local traffic regulations. A Brabus may feel larger than the vehicles you normally drive, particularly when parking or moving through tighter areas. Take time to become familiar with the vehicle before entering busy traffic. Consider Parking and Ground Clearance Parking should be part of your planning when renting a premium vehicle. Dubai has many large shopping centers, hotels, restaurants, and attractions with parking facilities, but individual spaces and entrances can vary. The Ferrari SF90 has a low sports car profile, so drivers should be cautious around ramps, raised surfaces, and other areas where ground clearance may become an issue. A larger Brabus can offer a more comfortable experience for general parking and passenger access, but its size should still be considered in compact parking areas. Follow the Fuel and Return Policy Ask about the fuel policy before beginning your rental. Find out whether the vehicle needs to be returned with the same fuel level as provided at collection. Also confirm the exact return location and time. If the vehicle is being delivered to your hotel or another location, make sure the collection arrangements are clearly understood. For premium cars, the return inspection can be detailed, so keeping the vehicle in good condition throughout the rental period is important. Choose the Vehicle That Fits Your Occasion A Brabus and Ferrari SF90 can both create an unforgettable driving experience, but they serve different purposes. A Brabus can be suitable for travelers who want luxury, strong performance, passenger space, and everyday usability. It can work well for business appointments, family travel, shopping, hotel visits, and longer drives. The Ferrari SF90 is more focused on the sports car experience. Its distinctive design and performance make it suitable for special occasions, leisure drives, celebrations, and travelers who want something truly different from an everyday vehicle. The right choice depends on your passengers, luggage, itinerary, driving preferences, and rental budget. Prepare Before You Collect the Car Before arriving at the rental location, make sure you have all required documents and understand the company's rental requirements. Confirm the accepted driving license, identification documents, payment arrangements, deposit, insurance terms, and rental duration. Take time to read the agreement instead of rushing through the collection process. Pay particular attention to mileage, traffic fines, toll charges, fuel requirements, insurance conditions, and vehicle return procedures. Once these details are clear, you can start your Dubai journey with fewer concerns. Enjoy Your Dubai Drive Renting a Brabus or Ferrari SF90 rental Dubai can turn ordinary transportation into a memorable part of your trip. The Brabus offers a spacious and commanding environment, while the Ferrari SF90 brings the character of a high performance sports car to the road. The most important step is choosing the vehicle according to your actual plans. Consider how many people will travel with you, where you will drive, how much luggage you have, and what type of experience you want. By checking rental terms, inspecting the vehicle, understanding mileage and deposit requirements, and following Dubai road regulations, you can make better use of your chosen vehicle. Whether you select the refined practicality of a Brabus or the thrilling character of a Ferrari SF90, proper preparation can make your time behind the wheel an enjoyable part of your Dubai visit.
velog
P/E Ratio: The One Formula Every Stock Screener Runs (and Gets Wrong) By Marketcaplens. All figures below are illustrative hypotheticals, not data from any real company. If you've ever built a stock screener, a watchlist, or a ranking page, you've computed this number: price divided by earnings per share. The P/E ratio is the most quoted valuation shortcut in markets — and the easiest to misuse. This is the formula behind it, the traps baked into it, and how to use it without fooling yourself. The two formulas P/E asks one question: how many dollars does the market pay for one dollar of a company's earnings? P/E = share price ÷ EPS Implied share price = EPS × P/E multiple The first is what the market is paying . The second is what the stock would be worth if you chose the multiple. Same relationship, solved for a different unknown. Take an illustrative example: a company earns $5 a share and trades at $100 . Its P/E is 20 . Run it through the P/E and PEG calculator and you also get the earnings yield — EPS ÷ price — which is 5% here, plus PEG if you add a growth rate. Turn it around with the P/E valuation calculator : $5 of EPS at a 15× multiple implies $75 a share; at 20× it implies $100 ; at 25× it implies $125 . If the stock actually trades at $90 , those cases sit below, above, and further above the market price. That gap — implied versus actual — is where the real question lives. The denominator is a label, not a number Every screener bug I've seen in P/E logic comes from the denominator. "EPS" is not one number. It's a period you have to name: Trailing — the last reported twelve months (or the last fiscal year, if that's all you have). Fiscal year — the last completed fiscal year, even if a newer quarter exists. Forward — an estimate for a future year. A forecast, not a reported fact. A $100 price over $5 of trailing EPS is a trailing 20×. The same price over $6 of expected next-year EPS is a forward 16.7×. Those are different questions. If your screener mixes trailing prices with forward earnings without labeling the period, the "cheap" stocks it surfaces are unit errors, not bargains. PEG has the same trap: it only makes sense when the P/E period and the growth period match — trailing earnings with trailing growth, or forward with forward. The plain-English P/E guide works through exactly this. What P/E tells you, and what it leaves out P/E compresses price and earnings into one multiple so you can compare companies. A 12× stock is cheaper on earnings than a 30× stock, all else equal. All else is rarely equal. A high multiple often means the market is paying up for growth. It can also mean earnings have collapsed while the price hasn't caught up yet — the ratio looks expensive for the worst possible reason. Read it next to the business, never as a buy or sell signal. And remember P/E only sees equity and earnings, not debt or cash. Two companies can share a P/E and have nothing else in common. Zero and negative EPS: undefined, not zero You cannot divide by zero, so P/E is undefined when EPS is exactly zero. A loss-making company produces a negative mathematical quotient, but that figure is not meaningful (N/M) for the usual comparison. Taking the absolute value, or flipping the sign so a loss looks like a bargain multiple, is a trick — not a valuation. Any screener that displays a negative P/E as a sortable number is lying to its users; blank is the honest output. Until earnings turn positive, use another lens: sales, cash flow, or a DCF model if you have free cash flow. The takeaway for builders P/E is two inputs and one division. The work is everything around it: labeling the EPS period, refusing to compute on zero or negative earnings, and presenting the implied-price cases (low, base, high) instead of a single magic number. Get those right and the ratio does what it was built to do — compress price and earnings into one comparable multiple. Get them wrong and your screener manufactures bargains that don't exist. For general education only. Nothing here is investment advice. More calculators: all MarketCapLens tools .
velog
이번주에는 면접관이 되었다. 이번 장의 주제는 무려 유튜브 설계 ... ! 문제 이해 및 설계 범위 확정 이번 장에서 다루고자하는 서비스 설계의 특징은 이러하다. • 빠른 비디오 업로드 • 원활한 비디오재생 • 재생 품질 선택 기능 • 낮은 인프라 비용(infrastructure cost) • 높은 가용성과 규모확장성, 그리고안정성 • 지원 클라이언트: 모바일 앱, 웹브라우저, 그리고 스마트 TV 개략적 규모 추정 CDN으로 비디오를 서비스하면 비용이 크다. 이 단계에서는 규모를 먼저 추정하고, 비용 절감 방법은 뒤에서 다룬다. 가정: DAU 500만 / 1인당 하루 5개 시청 / 사용자의 10%가 하루 1개 업로드 / 영상 평균 300MB 저장 용량: 500만 × 10% × 300MB = 하루 150TB 증가 CDN 비용: 500만 × 5개 × 0.3GB × $0.02 = 하루 $150,000 (CloudFront, 미국 트래픽 기준, 스트리밍 비용만 계산) 개략적 설계안 제시 및 동의 구하기 주어진 조건에 따라 기존 클라우드 서비스를 이용한다. 규모 확장이 쉬운 BLOB 저장소나 CDN을 직접 만드는 것은 매우 복잡하고 비용도 많이 들어 비효율적이기 때문이다. 넷플릭스나 페이스북 같은 큰 회사도 모든 것을 직접 구축하지는 않는다. 기존 클라우드를 이용할 때 서비스는 개략적으로 아래와 같이 구성되며, 이 구성을 바탕으로 비디오 업로드 절차와 비디오 스트리밍 절차 를 설계한다. ※ 단말(Client) : 컴퓨터, 모바일, 스마트 TV 등 YouTube를 시청할 수 있는 기기 ※ CDN : 비디오를 저장하고, 사용자가 재생 버튼을 누르면 CDN에서 비디오를 스트리밍하여 사용자 단말에서 이를 확인할 수 있게 함. ※ API 서버 : 비디오 스트리밍을 제외한 요청을 처리. (ex. 피드 추천, 비디오 업로드 URL 생성, 메타데이터 DB·캐시 갱신, 사용자 가입 등) 비디오 업로드 절차 해당 구조에서 비디오 업로드와 비디오 메타데이터 갱신 과정이 병렬적으로 수행된다. 비디오 업로드 원본 업로드 → 트랜스코딩 → 저장소 업로드 + 완료 이벤트 큐 → CDN 업로드 + DB/캐시 갱신 → 스트리밍 준비 완료 원본 업로드 단말이 비디오를 원본 저장소 에 업로드한다. 트랜스코딩 시작 트랜스코딩 서버가 원본 저장소에서 비디오를 가져와 여러 화질·형식으로 변환한다. 트랜스코딩 완료 후 병렬 처리 3a. 비디오 저장 : 트랜스코딩된 비디오를 트랜스코딩 비디오 저장소 에 업로드한다. 3b. 완료 이벤트 전달 : 트랜스코딩 완료 이벤트를 완료 큐 에 넣는다. 각 작업 진행 3a-1. CDN 업로드 : 트랜스코딩된 비디오를 CDN에 업로드 한다. 3b-1. 완료 이벤트 처리 : 완료 핸들러가 큐에서 이벤트를 꺼낸다. 3b-1-a/b. 메타데이터 갱신 : 완료 핸들러가 메타데이터 DB와 캐시를 갱신 한다. 스트리밍 준비 완료 알림 API 서버가 단말에 비디오 업로드 및 처리가 완료되어 스트리밍할 수 있음 을 알린다. ※ 트랜스코딩 : 압축된 디지털 파일(주로 오디오나 비디오)을 다른 형식이나 사양으로 변환하는 프로세스. 메타데이터 갱신 비디오 업로드 + 메타데이터 갱신 요청 → API 서버 → 메타데이터 캐시·DB 업데이트 메타데이터 갱신 요청 원본 저장소에 비디오를 업로드하는 동안, 단말이 API 서버에 메타데이터 갱신 요청 을 보낸다. 메타데이터 전달 요청에는 파일 이름, 파일 크기, 파일 포맷 등의 정보가 포함된다. 메타데이터 갱신 API 서버가 전달받은 정보를 이용해 메타데이터 캐시와 데이터베이스를 업데이트 한다. 비디오 스트리밍 절차 비디오는 다운로드 없이 바로 cdn에서 스트리밍된다. 이때, 비디오 스트리밍을 위해 스트리밍 프로토콜이 사용된다는 것을 알아두자. 스트리밍 프로토콜은 비디오 스트리밍을 위해 데이터를 전송할 때 쓰이는 표준화된 통신방법으로, 널리 쓰이는 것으로는 아래와 같은 것들이 있으니 훑어보자. • MPEG-DASH. MPEG • 애플(Apple) HLS. • 마이크로소프트 스무드 스트리밍 (Microsoft Smooth Streaming). • 어도비 HTTP 동적 스트리밍 (Adobe HTTP Dynamic Streaming, HDS) ※ 스트리밍 프로토콜은 각각 지원하는 비디오 인코딩이 다르고 플레이어도 다르다는 것이다. 따라서 비 디 오 스트리밍 서비스를 설계할 때는 서비스의 용례에 맞는 프로토콜을 잘 골라야 한다. 상세설계 비디오 업로드와 비디오 스트리밍을 최적화 하는 방법과, 발생할 수 있는 오류 처리에 대해서 알아본다. 비디오 트랜스코딩 비디오 트랜스코딩은 해상도, 코덱, 비트레이트(bitrate) 등의 매개변수를 조정해 비디오 파일을 다른 형식으로 변환하는 프로세스이다. 비디오를 녹화하면 단말(보통 전화나 카메라)은 해당 비디오를 특정 포맷으로 저장한다. 이 비디오가 저장 공간을 덜 차지하고, 다른 단말과 호환되며, 사용자의 대역폭에 맞는 화질로, 끊김 없이 재생되려면 변환이 필요하다. 트랜스코딩이 변환하는 대상인 비디오 포맷은 크게 두 부분으로 이루어진다. 컨테이너(container): 비디오, 오디오, 메타데이터를 담는 바구니 같은 것이다. 컨테이너 포맷은 .avi, .mov, .mp4 같은 파일 확장자를 보면 알 수 있다. 코덱(codec): 화질을 최대한 유지하면서 파일 크기를 줄이기 위해 고안된 압축 및 압축 해제 알고리즘이다. 가장 많이 쓰이는 비디오 코덱으로는 H.264, VP9, HEVC가 있다. 유향 비순환 그래프(DAG) 모델 비디오를 트랜스코딩하는 것은 컴퓨팅 자원을 많이 소모할 뿐 아니라 시간도 많이 드는 작업이다. 게다가 콘텐츠 창작자는 각자 자기만의 비디오 프로세싱 요구사항을 갖고 있다. 이런 다양한 요구를 지원하려면(=쟤들 말 들어주려면) 처리 과정을 적절히 추상화해서 작업을 직접 정의할 수 있게 해야 한다. 이때 쓸 수 있는 것이 DAG 모델이다. 원본 비디오는 비디오, 오디오, 메타데이터로 나뉘고, 정의된 작업들은 DAG 모델에 따라 단계별로 배열되어 순차적으로 또는 병렬적으로 실행된다. 비디오 트랜스코딩 아키텍처 본 설계안에서는 클라우드 서비스를 활용한 비디오 트랜스코딩 아키텍처를 다음과 같이 정의하였다. 전처리기 비디오 분할 : 비디오를 몇 초 단위의 GOP 로 나눈다. 구형 단말은 전처리기가 분할을 대신한다. DAG 생성 : 설정 파일을 바탕으로 비디오 처리 작업 순서(DAG) 를 생성한다. 데이터 캐시 : 분할된 비디오와 메타데이터를 임시 저장해 인코딩 실패 시 재개 할 수 있도록 한다. DAG 스케줄러 DAG 그래프를 몇 개 단계(stage)로 분할한 다음에 그 각각을 자원 관리자의 작업 큐(task queue)에 집어넣는다 자원 관리자 작업을 적절한 서버에 배분하고 실행 상태를 관리한다. 작업 큐 : 실행할 작업을 우선순위대로 보관 작업 서버 큐 : 사용 가능한 작업 서버 정보를 보관 실행 큐 : 현재 실행 중인 작업과 서버 정보를 보관 작업 스케줄러 : 작업과 서버를 매칭하고 실행을 지시 동작 과정: 우선순위 높은 작업 선택 → 적합한 서버 선택 → 작업 실행 지시 → 실행 큐에 등록 → 작업 완료 후 제거 작업 서버 작업 서버는 DAG에 정의된 작업을 수행한다. 이때, 작업종류에 따라 서버를 나누어 관리한다. 임시 저장소 어떤 시스템을 선택할 것이냐는 저장할 데이터의 유형, 크기, 이용 빈도, 데이터 유효기간 등에 따라 달라진다. 예시: 메타데이터 : 자주 참조하고 크기가 작으므로 메모리에 캐시 한다. 비디오·오디오 데이터 : 크기가 크므로 BLOB 저장소 에 보관한다. 임시 저장소 : 비디오 프로세싱이 완료되면 삭제한다 . 인코딩된 비디오 끝. 파이프라인 최종 결과물 생산완료. 시스템 최적화 속도, 안전성, 비용을 최적화하는 방법에 대해서 다룬다. 속도 최적화: 비디오 병렬 업로드 비디오 전체를 한 번에 업로드하는 것은 비효율적이다. 하나의 비디오를 GOP 단위로 분할해 병렬로 업로드하면 속도가 빨라지고, 일부가 실패해도 실패한 조각만 다시 올리면 되므로 빠르게 재개할 수 있다. 속도 최적화: 업로드 센터를 사용자 근거리에 지정 데이터가 이동해야 하는 네트워크 거리와 경로가 짧아지면 업로드 시간도 줄어든다. 업로드 센터를 여러 곳에 두어, 사용자가 거주지 근처의 업로드 센터를 이용하도록 하자. 속도 최적화: 모든 절차를 병렬화 메시지큐를 도입한다. 메시지 큐 도입 전: 각 모듈이 앞 단계의 작업이 끝나기를 기다려야 해서 속도가 느리다. 메시지 큐 도입 후: 모듈은 결과를 큐에 넣고 바로 다음 작업으로 넘어가고, 뒤 단계는 큐에 쌓인 작업을 여러 대가 병렬로 처리한다. 기다리는 시간이 없어지고 동시에 처리하는 양이 늘어나 속도가 빨라진다. 안전성 최적화: 미리 사인된 업로드 URL API 서버가 사용자의 업로드 권한을 확인한 뒤 미리 사인된 URL을 발급한다. 이 URL은 정해진 위치에만, 제한된 시간 동안만 쓸 수 있어서, 허가받은 사용자만 올바른 위치에 비디오를 업로드할 수 있다. 상세 절차: URL 요청: 클라이언트가 API 서버에 업로드 URL을 요청한다. URL 발급: API 서버가 업로드 권한이 포함된 미리 사인된 URL을 반환한다. 직접 업로드: 클라이언트가 해당 URL을 이용해 저장소에 비디오를 직접 업로드한다. 안전성 최적화: 비디오 보호 비디오 저작권 보호를 위해 움직여보자. 방식 핵심 내용 DRM 디지털 콘텐츠의 접근·복제 권한을 관리 AES 암호화 비디오를 암호화하고, 허가된 사용자만 재생 시 복호화 워터마크 영상에 회사 로고·소유자 정보 등을 표시 비용 최적화 CDN은 비싸다. 데이터 크기가 크면 클수록 더하다. 이 비용은 어떻게 낮출 수 있을까? 인기 영상만 CDN 사용 → 인기 없는 영상의 CDN 저장·전송 비용 을 줄인다. 인기 없는 영상은 필요할 때 인코딩 → 미리 인코딩하고 저장하는 인코딩·저장 비용 을 줄인다. 지역별 인기 영상만 해당 지역에 저장 → 다른 지역으로 영상을 복제하는 저장·전송 비용 을 줄인다. ISP와 제휴 → 사용자와 가까운 ISP를 통해 전송해 네트워크 전송 비용 을 줄인다. 사람들은 소수의 인기 영상을 본다. 인기 영상만 CDN으로 제공하고 나머지는 자체 서버에서 제공해 비용을 줄여보자. 오류 처리 시스템 오류에는 두 가지 종류가 있다. 회복 가능 오류(recoverable error) 재시도, 우회, 교체로 해결한다. 계속 실패하면 클라이언트에 오류 코드를 반환한다. 재시도로 해결 업로드 오류: 몇 회 재시도한다. 트랜스코딩 오류: 재시도한다. 전처리 오류: DAG 그래프를 재생성한다. DAG 스케줄러 오류: 작업을 다시 스케줄링한다. 작업 서버 장애: 다른 서버에서 해당 작업을 재시도한다. 다른 경로로 우회 비디오 분할 오류: 클라이언트가 GOP 단위로 분할하지 못하면 전체 비디오를 서버로 보내 서버가 분할한다. API 서버 장애: 무상태 서버이므로 신규 요청을 다른 API 서버로 보낸다. 사본과 교체로 해결 자원 관리자 큐 장애: 사본(replica)을 이용한다. 메타데이터 캐시 서버 장애: 다중화된 다른 노드에서 데이터를 가져오고, 장애 서버는 새것으로 교체한다. 메타데이터 데이터베이스 서버 장애 주 서버 장애: 부 서버 중 하나를 주 서버로 승격한다. 부 서버 장애: 다른 부 서버로 읽기를 처리하고, 장애 서버는 새것으로 교체한다. 회복 불가능 오류(non-recoverable error) 다시 시도해도 결과가 같은 오류. 해당 비디오의 작업을 중단하고 클라이언트에 오류 코드를 반환한다. 비디오 포맷이 잘못된 경우 이 주의 면접문제 14장은 260페이지를 기준으로 두 파트로 나뉘는데, 이 장의 꽃은 병렬화라고 생각해, 파트별로 병렬화와 관련된 문제를 내려고 한다. FASD92 트랜스코딩 절차에 DAG 모델을 도입하면 어떤 점이 좋은가? msms804 비디오 업로드부터 CDN 배포까지의 과정에서 속도를 최적화하는 방법으로는 업로드 센터를 사용자 가까이 두는 것이 있다. 이 외의 방법을 1가지 이상 서술하시오.
Score: 54.39Confidence: 49%
Score: 54.39Confidence: 49%
Score: 54.38Confidence: 49%