基于动态时间窗格的数据仓库流批一体优化方法
2025-09-02陈滨林唐小勇
中图分类号:TP391 文献标志码:A 文章编号:1001-3695(2025)08-028-2460-07
doi:10.19734/j. issn.1001-3695.2024.11.0490
Dynamic time window-based optimization method for unified stream and batch processing in data warehouses
Chen Binlin, Tang Xiaoyong† (Scholof Computer amp;CommunicationEnginering,Changsha UniversityofScience amp; Technology,Changsha 41O114,China)
Abstract:Data warehouse is the coreof enterprise data management,and batch processing and stream procesing are he two coredata processing paradigmsforbigdataanalytics.Toaddressthehighlatencyandresourceconsumptionoftraditionalbatch processing technologies,aswellasthedataqualitychallenges faced bystreamprocessingtechnologies whenhandlingmultistreamdataassociationand historicaldatacomputation,this studyproposedaunified streamandbatch procesing method.The proposedmethodanalyzedthechangesofthedatasetindiferenttime windows,andintegratedthedynamic timewindowdivisionbasedonschedulingtimewiththesimplestdatasetsearchbasedontheDFS(depth-firstsearch)algorithm.Experimental results demonstrate that,comparedwiththe mainstreammicro-batch procesing method,this methodreduces overallcomputation time by 57.2% and memory consumption by 24.2% ,while ensuring strong data consistency. This method holds important referencevalueforenterprises inbuildingdata warehouses withhigh procesing eficiencyandlowresourceconsumption,integrating stream and batch processing.
Key words:data warehouse;data streamprocessing;dynamic time windows;minimal dataset;stream-batch integration
0引言
数据仓库是企业数据管理的核心,它帮助企业从大量复杂的数据中提取有价值的信息,提升企业竞争力和市场响应速度[1]。互联网发展、数字化普及和网络技术进步导致数据量激增,数据仓库技术成为企业利用这些数据的关键[2]。通过ETL流程整合数据,数据仓库确保了数据的一致性、可靠性和高效访问[3]。进一步地,数据查询、统计分析和可视化帮助企业发现商业机会、优化流程、改进决策[4]。大数据时代,数据仓库处理能力增强,但业务需求对数据处理时效性提出更高要求,传统的 t+1 或小时级的更新频率已无法满足实时分析需求。业务场景需要分钟级甚至秒级的数据反馈,以提供及时的业务洞察和优化用户体验。如何在确保数据质量的同时,灵活满足时效性要求,减少系统资源消耗,是当前数据处理领域面临的一个重大挑战[5]
批量处理和流式处理是数据仓库领域中数据处理的两大核心范式,学术界对此进行了广泛研究[1]。数据仓库中的数据集被视为无界限的数据流,每个事件的发生时间是固定的,而处理时间则因数据在处理流程中的流动而动态变化[6]。批量处理和流式处理根据业务时间将数据流划分到不同的时间窗格中,并基于时间窗格处理数据,实现对无界限数据流的有效消费[7]。在数据集成时,数据流从多个异构源同步到数据仓库,由于来源和时间戳的差异,数据可能非顺序到达,引发乱序问题[8]。……
