The data processing method, device, electronic equipment and storage medium provided by the embodiment of the present invention are as follows: in the data processing method, the terminal obtains the data to be processed; the terminal stores the data to be processed into the cache; the terminal processes the data to be processed in the cache; and the terminal deletes the data to be processed stored in the cache. In the embodiment of the present invention, the terminal stores the data to be processed into the cache and after processing, deletes the data to be processed from the cache, thereby reducing unnecessary cache consumption while ensuring the fluency of the terminal in processing data.
【技术实现步骤摘要】
数据处理方法、装置、电子设备和存储介质
本专利技术涉及终端技术,尤其涉及一种数据处理方法、装置、电子设备和存储介质。
技术介绍
缓存是终端内用于存储待处理数据的存储空间,多设置在终端的中央处理器(CentralProcessingUnit,CPU)内。由于缓存相对于内存迅速的读取速度,终端在处理数据时通常将终端的存储设备中的数据复制缓存后进行处理。现有技术中,使用IOS操作系统的终端在处理图片时,可以使用IOS操作系统提供的两种应用程序编程接口(ApplicationProgrammingInterface,API)。在第一种imageNamed系列API提供的方法中,终端将待处理的图片都存入缓存后进行处理,以提高图片使用效率。但是imageNamed系列的API无法控制缓存释放,增大缓存的告警几率。在第二种非imageNamed系列API提供的方法中,终端不会将待处理图片存入缓存,而是直接从内存中调用待处理图片,并在使用结束后即释放图片。但是非imageNamed系列的API在较大较多的图片被重复使用时,会造成页面卡顿不流畅。因此,如何使IOS操作系统的终端在处 ...
【技术保护点】
1.一种数据处理方法,其特征在于,包括:终端获取待处理数据;所述终端将所述待处理数据存入缓存;所述终端对所述缓存中的所述待处理数据进行处理;所述终端删除所述缓存中存储的所述待处理数据。
【技术特征摘要】
1.一种数据处理方法,其特征在于,包括:终端获取待处理数据;所述终端将所述待处理数据存入缓存;所述终端对所述缓存中的所述待处理数据进行处理;所述终端删除所述缓存中存储的所述待处理数据。2.根据权利要求1所述的方法,其特征在于,所述终端删除所述缓存中存储的所述待处理数据,包括:所述终端根据所述终端的内存使用情况,删除所述缓存中存储的所述待处理数据。3.根据权利要求2所述的方法,其特征在于,所述终端根据所述终端的内存使用情况,删除所述缓存中存储的所述待处理数据,包括:若获取所述终端的操作系统发出的内存警告,所述终端删除所述缓存中存储的所述待处理数据。4.根据权利要求1所述的方法,其特征在于,所述终端删除所述缓存中存储的所述待处理数据,包括:若所述终端的缓存中存储的数据量大于第一阈值,所述终端删除所述缓存中存储的所述待处理数据。5.根据权利要求1所述的方法,其特征在于,所述终端删除所述缓存中存储的所述待处理数据,包括:若所述待处理数据的数据量大于第二阈值,所述终端删除所述缓存中存储的所述待处理数据。6...
【专利技术属性】
技术研发人员:杨欣霖,魏为,彭飞,
申请(专利权)人:五八同城信息技术有限公司,
类型:发明
国别省市:天津,12
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。