+

CN115421650A - Data storage method and device, electronic equipment and storage medium - Google Patents

Data storage method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115421650A
CN115421650A CN202210993479.8A CN202210993479A CN115421650A CN 115421650 A CN115421650 A CN 115421650A CN 202210993479 A CN202210993479 A CN 202210993479A CN 115421650 A CN115421650 A CN 115421650A
Authority
CN
China
Prior art keywords
usage
data
usage data
storage medium
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210993479.8A
Other languages
Chinese (zh)
Inventor
崔英云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202210993479.8A priority Critical patent/CN115421650A/en
Publication of CN115421650A publication Critical patent/CN115421650A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0625Power saving in storage systems
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0643Management of files
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a data storage method and device, electronic equipment and a storage medium, and relates to the technical field of electronic equipment. The method is applied to the electronic equipment and comprises the following steps: the method comprises the steps of obtaining use data of a program operated by the electronic equipment, determining a use mode of the use data, determining a storage medium corresponding to the use mode from a plurality of storage media as a target storage medium, wherein the plurality of storage media respectively correspond to different access speeds, and storing the use data to the target storage medium. The application realizes the balance of access performance and storage capacity by identifying the use mode of the use data and storing the use data into different storage levels.

Description

数据的存储方法、装置、电子设备以及存储介质Data storage method, device, electronic device and storage medium

技术领域technical field

本申请涉及电子设备技术领域,更具体地,涉及一种数据的存储方法、装置、电子设备以及存储介质。The present application relates to the technical field of electronic equipment, and more specifically, to a data storage method, device, electronic equipment, and storage medium.

背景技术Background technique

随着科学技术的发展,电子设备的使用越来越广泛,功能越来越多,已经成为人们日常生活中的必备之一。同时,随着信息时代数据爆炸性增长,大数据、云计算等技术迅速发展,数据量呈几何增长趋势,因此,对电子设备的后端存储空间的要求越来越高,但是,电子设备目前采用的存储方式固定,造成数据的存储和访问效果不佳。With the development of science and technology, the use of electronic equipment is becoming more and more extensive, with more and more functions, and has become one of the must-haves in people's daily life. At the same time, with the explosive growth of data in the information age, technologies such as big data and cloud computing are developing rapidly, and the amount of data is increasing geometrically. Therefore, the requirements for the back-end storage space of electronic devices are getting higher and higher. However, electronic devices currently use The storage method is fixed, resulting in poor data storage and access effects.

发明内容Contents of the invention

鉴于上述问题,本申请提出了一种数据的存储方法、装置、电子设备以及存储介质,以解决上述问题。In view of the above problems, the present application proposes a data storage method, device, electronic equipment, and storage medium to solve the above problems.

第一方面,本申请实施例提供了一种数据的存储方法,应用于电子设备,所述方法包括:获取所述电子设备运行的程序的使用数据,并确定所述使用数据的使用模式;从多个存储媒介中,确定与所述使用模式对应的存储媒介作为目标存储媒介,其中,所述多个存储媒介各自对应的访问速度不同;将所述使用数据存储至所述目标存储媒介。In the first aspect, an embodiment of the present application provides a method for storing data, which is applied to an electronic device, and the method includes: acquiring usage data of a program run by the electronic device, and determining a usage mode of the usage data; Among the multiple storage media, the storage medium corresponding to the usage mode is determined as the target storage medium, wherein the corresponding access speeds of the multiple storage media are different; and the usage data is stored in the target storage medium.

第二方面,本申请实施例提供了一种数据的存储装置,应用于电子设备,所述装置包括:使用模式确定模块,用于获取所述电子设备运行的程序的使用数据,并确定所述使用数据的使用模式;目标存储媒介确定模块,用于从多个存储媒介中,确定与所述使用模式对应的存储媒介作为目标存储媒介,其中,所述多个存储媒介各自对应的访问速度不同;数据存储模块,用于将所述使用数据存储至所述目标存储媒介。In the second aspect, the embodiment of the present application provides a data storage device, which is applied to electronic equipment, and the device includes: a usage mode determination module, configured to obtain usage data of programs run by the electronic device, and determine the The usage pattern of the usage data; the target storage medium determining module, configured to determine the storage medium corresponding to the usage pattern as the target storage medium from among multiple storage media, wherein the corresponding access speeds of the multiple storage media are different ; a data storage module, configured to store the usage data in the target storage medium.

第三方面,本申请实施例提供了一种电子设备,包括存储器和处理器,所述存储器耦接到所述处理器,所述存储器存储指令,当所述指令由所述处理器执行时所述处理器执行上述方法。In a third aspect, the embodiment of the present application provides an electronic device, including a memory and a processor, the memory is coupled to the processor, the memory stores instructions, and when the instructions are executed by the processor, the The processor executes the above method.

第四方面,本申请实施例提供了一种计算机可读取存储介质,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行上述方法。In a fourth aspect, the embodiment of the present application provides a computer-readable storage medium, where program code is stored in the computer-readable storage medium, and the program code can be invoked by a processor to execute the above method.

本申请实施例提供的数据的存储方法、装置、电子设备以及存储介质,获取电子设备运行的程序的使用数据,并确定使用数据的使用模式,从多个存储媒介中,确定与使用模式对应的存储媒介作为目标存储媒介,其中,多个存储媒介各自对应的访问速度不同,将使用数据存储至目标存储媒介,从而通过识别使用数据的使用模式,将其存储至不同存储层级中,以实现访问性能与存储容量上的平衡。The data storage method, device, electronic device, and storage medium provided in the embodiments of the present application acquire the usage data of the program run by the electronic device, determine the usage mode of the usage data, and determine the usage mode corresponding to the usage mode from a plurality of storage media. The storage medium is used as the target storage medium, in which multiple storage media have different access speeds, and the usage data is stored in the target storage medium, so that by identifying the usage pattern of the usage data, it is stored in different storage levels to achieve access Balance between performance and storage capacity.

附图说明Description of drawings

为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings that need to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, other drawings can also be obtained based on these drawings without any creative effort.

图1示出了本申请一实施例提供的数据的存储方法的流程示意图;FIG. 1 shows a schematic flowchart of a data storage method provided by an embodiment of the present application;

图2示出了本申请一实施例提供的数据的存储方法的流程示意图;FIG. 2 shows a schematic flowchart of a data storage method provided by an embodiment of the present application;

图3示出了本申请一实施例提供的数据的存储方法的流程示意图;FIG. 3 shows a schematic flowchart of a data storage method provided by an embodiment of the present application;

图4示出了本申请一实施例提供的数据的存储方法的流程示意图;FIG. 4 shows a schematic flowchart of a data storage method provided by an embodiment of the present application;

图5示出了本申请的图4所示的数据的存储方法的步骤S421的一实施例的流程示意图;FIG. 5 shows a schematic flowchart of an embodiment of step S421 of the data storage method shown in FIG. 4 of the present application;

图6示出了本申请的图4所示的数据的存储方法的步骤S421的一实施例的流程示意图;FIG. 6 shows a schematic flowchart of an embodiment of step S421 of the data storage method shown in FIG. 4 of the present application;

图7示出了本申请一实施例提供的数据的存储方法的流程示意图;FIG. 7 shows a schematic flowchart of a data storage method provided by an embodiment of the present application;

图8示出了本申请一实施例提供的数据的存储装置的模块框图;FIG. 8 shows a block diagram of a data storage device provided by an embodiment of the present application;

图9示出了本申请实施例用于执行根据本申请实施例的数据的存储方法的电子设备的框图;FIG. 9 shows a block diagram of an electronic device for performing a data storage method according to an embodiment of the present application in an embodiment of the present application;

图10示出了本申请实施例的用于保存或者携带实现根据本申请实施例的数据的存储方法的程序代码的存储单元。Fig. 10 shows a storage unit used to store or carry program codes implementing the data storage method according to the embodiment of the present application according to the embodiment of the present application.

具体实施方式detailed description

为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

其中,电子设备当前是将整个系统的存储在内存中的数据根据其访问频次,将访问频次低的数据存入到带压缩功能的内存或者磁盘。但是,这种方式没有考虑到用户使用数据的真实情况,即,访问频次低并不代表它就可以存入到访问速度慢的存储媒介上。这导致用户在使用数据的时候,可能会用到存储在访问速度慢的存储媒介上的数据,进而引起性能上的衰退。Among them, the electronic device currently stores the data stored in the memory of the entire system according to its access frequency, and stores the data with a low access frequency into the memory or disk with a compression function. However, this method does not take into account the real situation of the user's use of data, that is, the low frequency of access does not mean that it can be stored on a storage medium with a slow access speed. As a result, when users use data, they may use data stored on storage media with slow access speeds, thereby causing performance degradation.

针对上述问题,发明人经过长期的研究发现,并提出了本申请实施例提供的数据的存储方法、装置、电子设备以及存储介质,通过识别使用数据的使用模式,将其存储至不同存储层级中,以实现访问性能与存储容量上的平衡。其中,具体的数据的存储方法在后续的实施例中进行详细的说明。In view of the above problems, the inventor found after long-term research, and proposed the data storage method, device, electronic equipment and storage medium provided by the embodiment of the present application, by identifying the usage mode of the usage data, storing it in different storage levels , to achieve a balance between access performance and storage capacity. Wherein, the specific data storage method is described in detail in the subsequent embodiments.

请参阅图1,图1示出了本申请一实施例提供的数据的存储方法的流程示意图。该方法用于通过识别使用数据的使用模式,将其存储至不同存储层级中,以实现访问性能与存储容量上的平衡。在具体的实施例中,该数据的存储方法应用于如图8所示的数据的存储装置200以及配置有数据的存储装置200的电子设备100(图9)。下面将以电子设备为例,说明本实施例的具体流程,当然,可以理解的,本实施例所应用的电子设备可以包括智能手机、平板电脑、穿戴式电子设备等,在此不做限定。下面将针对图1所示的流程进行详细的阐述,所述数据的存储方法具体可以包括以下步骤:Please refer to FIG. 1 . FIG. 1 shows a schematic flowchart of a data storage method provided by an embodiment of the present application. The method is used to store the usage data in different storage levels by identifying usage patterns, so as to achieve a balance between access performance and storage capacity. In a specific embodiment, the data storage method is applied to the data storage device 200 shown in FIG. 8 and the electronic device 100 ( FIG. 9 ) configured with the data storage device 200 . The following will take an electronic device as an example to illustrate the specific process of this embodiment. Of course, it can be understood that the electronic device applied in this embodiment may include a smart phone, a tablet computer, a wearable electronic device, etc., which is not limited here. The process shown in Figure 1 will be described in detail below, and the data storage method may specifically include the following steps:

步骤S110:获取所述电子设备运行的程序的使用数据,并确定所述使用数据的使用模式。Step S110: Obtain usage data of a program run by the electronic device, and determine a usage mode of the usage data.

在本实施例中,可以获取该电子设备运行的程序的使用数据,并确定该使用数据的使用模式。In this embodiment, the usage data of the programs run by the electronic device can be acquired, and the usage mode of the usage data can be determined.

在一些实施方式,该程序的使用数据是指只要是程序运行过程中会用到的数据,例如,只要程序在运行,该程序必然会用到数据(如内存数据),必然会有某种规律或者特性。In some implementations, the data used by the program refers to the data that will be used during the running of the program. For example, as long as the program is running, the program will inevitably use data (such as memory data), and there must be certain rules or features.

在一些实施方式中,电子设备运行的程序可以包括在电子设备的前台运行的程序、可以包括在电子设备的后台运行的程序、也可以包括在电子设备的前台和后台切换运行的程序等,在此不做限定。In some implementations, the programs run by the electronic device may include programs running in the foreground of the electronic device, programs running in the background of the electronic device, programs running in the foreground and background of the electronic device, etc. This is not limited.

作为一种方式,该电子设备运行的程序的使用数据的数量可能为一个,则可以确定该一个使用数据的使用模式;作为又一种方式,该电子设备运行的程序的使用数量的数量可能为多个,则可以确定该多个使用数据各自的使用模式。As one way, the number of usage data of the program running on the electronic device may be one, and then the usage mode of the one usage data can be determined; as another way, the number of usage data of the program running on the electronic device may be If there are multiple usage data, the respective usage patterns of the multiple usage data can be determined.

其中,使用数据的使用模式可以用于指示该使用数据的使用量和使用方式,从而可以更好的反映该使用数据与用户需求之间的关系,可以提升使用数据的存储准确性。在一些实施方式中,电子设备可以在程序的运行过程中,统计其使用数据的使用情况,并基于该使用数据的使用情况确定该使用数据的使用模式,建立使用数据和该使用数据的使用模式之间的映射关系并存储,后续,在获取到电子设备运行的程序的使用数据的情况下,则可以基于该映射关系,确定该使用数据对应的使用数据的使用模式。Wherein, the usage pattern of the usage data can be used to indicate the usage amount and usage mode of the usage data, so as to better reflect the relationship between the usage data and user needs, and improve the storage accuracy of the usage data. In some implementations, the electronic device can count the usage of its usage data during the running of the program, determine the usage mode of the usage data based on the usage status of the usage data, and establish the usage data and the usage mode of the usage data Then, if the usage data of the program run by the electronic device is obtained, the usage mode of the usage data corresponding to the usage data can be determined based on the mapping relationship.

在一些实施方式中,使用模式可以包括:数据更新频率、数据类型、读操作数据、写操作数据等。In some implementations, the usage pattern may include: data update frequency, data type, read operation data, write operation data, and the like.

步骤S120:从多个存储媒介中,确定与所述使用模式对应的存储媒介作为目标存储媒介,其中,所述多个存储媒介各自对应的访问速度不同。Step S120: From a plurality of storage media, determine a storage medium corresponding to the usage mode as a target storage medium, wherein the access speeds corresponding to the plurality of storage media are different.

在一些实施方式中,电子设备可以预先设置并存储有多个存储媒介,其中,该多个存储媒介各自对应的访问速度不同。因此,在本实施例中,在确定使用数据对应的使用模式的情况下,则可以从多个存储媒介中,确定该使用模式对应的存储媒介,并将该使用模式对应的存储媒介作为目标存储媒介。In some implementation manners, the electronic device may be preset and stored with multiple storage media, where the access speeds of the multiple storage media are different. Therefore, in this embodiment, in the case of determining the use mode corresponding to the use data, the storage medium corresponding to the use mode can be determined from multiple storage media, and the storage medium corresponding to the use mode can be stored as the target. medium.

作为一种可实施的方式,电子设备可以预先设置并存储有多个使用模式、多个存储媒介、以及多个使用模式和多个存储媒介的对应关系,其中,多个使用模式和多个存储媒介的对应关系可以包括:一个使用模式对应一个存储媒介,一个使用模式对应多个存储媒介,或者,多个使用模式对应一个存储媒介等,在此不做限定。因此,在本实施例中,在确定使用数据的使用模式的情况下,则可以基于多个使用模式和多个存储媒介的对应关系,确定该使用数据的使用模式对应的存储媒介,并将该使用数据的使用模式对应的存储媒介确定为目标存储媒介。As an implementable manner, the electronic device may be preset and stored with multiple usage modes, multiple storage media, and the correspondence between the multiple usage modes and the multiple storage media, wherein the multiple usage modes and the multiple storage media The media correspondence may include: one usage mode corresponds to one storage medium, one usage mode corresponds to multiple storage media, or multiple usage modes correspond to one storage medium, etc., which are not limited here. Therefore, in this embodiment, in the case of determining the use mode of the use data, the storage medium corresponding to the use mode of the use data may be determined based on the correspondence between multiple use modes and multiple storage media, and the The storage medium corresponding to the usage pattern of the usage data is determined as the target storage medium.

在一些实施方式中,该多个存储媒介可以包括:无存储媒介(不存储);内存;带有数据压缩功能的内存,且其压缩速度适中、压缩率适中,比如LZ4;带有数据压缩功能的内存,且其压缩速度慢、压缩率高,比如ZSTD;带有压缩功能的磁盘;磁盘;网络存储。其中,无存储媒介意味着不存储,直接删除;内存的访问速度快于带有数据压缩功能的内存的访问速度;带有压缩功能的内存的访问速度大于带有压缩功能的磁盘的访问速度;带有压缩功能的磁盘的访问速度大于磁盘的访问速度;磁盘的访问速度大于网络存储的访问速度。In some implementations, the plurality of storage media may include: no storage media (no storage); memory; memory with data compression function, and its compression speed is moderate, compression rate is moderate, such as LZ4; with data compression function memory, and its compression speed is slow and the compression rate is high, such as ZSTD; disk with compression function; disk; network storage. Among them, no storage medium means no storage, direct deletion; the access speed of memory is faster than that of memory with data compression function; the access speed of memory with compression function is faster than that of disk with compression function; The access speed of disk with compression is faster than that of disk; the access speed of disk is faster than that of network storage.

例如,在使用数据的使用模式表征数据更新频率低的情况下,则可以从多个存储媒介中,将带有数据压缩功能的内存,其压缩与解压速度适中、压缩率适中的存储介质确定为目标存储介质。For example, when the usage pattern of the usage data indicates that the update frequency of the data is low, the memory with data compression function, the storage medium with moderate compression and decompression speed and moderate compression rate can be determined as the target storage medium.

步骤S130:将所述使用数据存储至所述目标存储媒介。Step S130: storing the usage data in the target storage medium.

在本实施例中,在从多个存储媒介中确定目标存储媒介的情况下,则可以将该使用数据存储至该目标存储媒介中,以实现访问性能与存储容量上的平衡。In this embodiment, when a target storage medium is determined from multiple storage media, the usage data may be stored in the target storage medium, so as to achieve a balance between access performance and storage capacity.

本申请一实施例提供的数据的存储方法,获取电子设备运行的程序的使用数据,并确定使用数据的使用模式,从多个存储媒介中,确定与使用模式对应的存储媒介作为目标存储媒介,其中,多个存储媒介各自对应的访问速度不同,将使用数据存储至目标存储媒介,从而通过识别使用数据的使用模式,将其存储至不同存储层级中,以实现访问性能与存储容量上的平衡。The data storage method provided by an embodiment of the present application obtains the usage data of the programs run by the electronic device, and determines the usage mode of the usage data, and determines the storage medium corresponding to the usage mode from a plurality of storage media as the target storage medium, Among them, the corresponding access speeds of multiple storage media are different, and the usage data is stored in the target storage media, so that by identifying the usage mode of the usage data, it is stored in different storage levels, so as to achieve a balance between access performance and storage capacity .

请参阅图2,图2示出了本申请一实施例提供的数据的存储方法的流程示意图。该方法应用于上述电子设备,下面将针对图2所示的流程进行详细的阐述,所述数据的存储方法具体可以包括以下步骤:Please refer to FIG. 2 . FIG. 2 shows a schematic flowchart of a data storage method provided by an embodiment of the present application. The method is applied to the above-mentioned electronic equipment, and the process shown in FIG. 2 will be described in detail below. The data storage method may specifically include the following steps:

步骤S210:获取所述电子设备运行的程序的使用数据。Step S210: Obtain usage data of programs run by the electronic device.

其中,步骤S210的具体描述请参阅步骤S110,在此不再赘述。Wherein, for the specific description of step S210, please refer to step S110, which will not be repeated here.

步骤S220:获取所述使用数据的量化信息,并基于所述使用数据的量化信息确定所述使用数据的使用信息。Step S220: Obtain quantitative information of the usage data, and determine usage information of the usage data based on the quantitative information of the usage data.

在本实施例中,在获取该电子设备运行的程序的使用数据的情况下,则可以获取该使用数据的量化信息,并基于该使用数据的量化信息,确定该使用数据的使用信息。其中,获取使用数据的量化信息的目的在于提出对使用数据的使用信息提供考量维度,是确定使用数据的使用信息的基础,通过使用数据的量化信息可以刻画出使用数据的使用信息。In this embodiment, when the usage data of the program run by the electronic device is acquired, the quantitative information of the usage data may be acquired, and the usage information of the usage data may be determined based on the quantitative information of the usage data. Among them, the purpose of obtaining the quantitative information of the usage data is to provide a dimension of consideration for the usage information of the usage data, which is the basis for determining the usage information of the usage data, and the usage information of the usage data can be described through the quantitative information of the usage data.

作为一种方式,该电子设备运行的程序的使用数据的数量可能为一个,则可以获取该一个使用数据的量化信息;作为又一种方式,该电子设备运行的程序的使用数量的数量可能为多个,则可以确定该多个使用数据各自的量化信息。As a method, the number of usage data of the program running on the electronic device may be one, and the quantitative information of the usage data can be obtained; as another method, the number of usage data of the program running on the electronic device may be If there are more than one, the quantitative information of each of the multiple usage data can be determined.

在一些实施方式中,在获取该电子设备运行的程序的使用数据的情况下,则可以记录该使用数据的使用情况,并基于记录的该使用数据的使用情况,确定该使用数据的量化信息。例如,在获取该电子设备运行的程序的使用数据的情况下,则可以记录该使用数据的使用情况,并统计该使用数据的使用情况(例如,统计该使用数据在预设时间段内的使用情况),确定该使用数据的量化信息。In some implementations, when the usage data of the program run by the electronic device is acquired, the usage of the usage data may be recorded, and the quantitative information of the usage data may be determined based on the recorded usage of the usage data. For example, in the case of obtaining the usage data of the program run by the electronic device, the usage of the usage data can be recorded, and the usage of the usage data can be counted (for example, the usage of the usage data within a preset time period can be counted). situation), determine the quantitative information of the usage data.

在一些实施方式中,在获取该使用数据的量化信息的情况下,则可以对该使用数据的量化信息进行解析,以基于该使用数据的量化信息确定该使用数据的使用信息。作为一种示例,假设使用数据的量化信息表征该使用数据个很少被使用,即,该使用数据的读、写的更新频率都很低,那么可以确定该使用数据的使用信息为rarely_used,以表征该使用数据很少被使用。In some implementations, when the quantitative information of the usage data is obtained, the quantitative information of the usage data may be analyzed to determine the usage information of the usage data based on the quantitative information of the usage data. As an example, assuming that the quantitative information of the usage data indicates that the usage data is rarely used, that is, the update frequency of reading and writing of the usage data is very low, then it can be determined that the usage information of the usage data is rarely_used, and Characterization of this usage data is rarely used.

步骤S230:基于所述使用数据的量化信息和所述使用数据的使用信息,确定所述使用数据的使用模式。Step S230: Determine a usage mode of the usage data based on the quantification information of the usage data and the usage information of the usage data.

在本实施例中,在确定使用数据的量化信息和使用数据的使用信息的情况下,则可以基于该使用数据的量化信息和使用数据的使用信息,确定该使用数据的使用模式。其中,使用数据的量化信息可以用于进行使用数据的定性,使用数据的使用信息可以用于进行使用数据的定量,因此,将使用数据的量化信息和该使用数据的使用信息相结合,可以确定该使用数据的使用模式(定性+定量)。In this embodiment, when the quantitative information of the usage data and the usage information of the usage data are determined, the usage mode of the usage data may be determined based on the quantification information of the usage data and the usage information of the usage data. Among them, the quantitative information of usage data can be used for qualitative usage of data, and the usage information of usage data can be used for quantitative usage of usage data. Therefore, by combining the quantitative information of usage data with the usage information of usage data, it can be determined The usage mode (qualitative+quantitative) of this usage data.

作为一种示例,假设使用数据的量化信息包括使用数据的读量和写量,且使用数据的使用信息包括读操作多于写操作,则使用数据的使用模式可以包括读多写少。As an example, assuming that the quantitative information of the usage data includes the amount of reading and writing of the usage data, and the usage information of the usage data includes more read operations than write operations, the usage pattern of the usage data may include more reads and fewer writes.

步骤S240:从多个存储媒介中,确定与所述使用模式对应的存储媒介作为目标存储媒介,其中,所述多个存储媒介各自对应的访问速度不同。Step S240: From a plurality of storage media, determine a storage medium corresponding to the usage mode as a target storage medium, wherein the access speeds corresponding to the plurality of storage media are different.

步骤S250:将所述使用数据存储至所述目标存储媒介。Step S250: Store the usage data in the target storage medium.

其中,步骤S240-步骤S250的具体描述请参阅步骤S120-步骤S130,在此不再赘述。Wherein, for the specific description of step S240-step S250, please refer to step S120-step S130, which will not be repeated here.

本申请一实施例提供的数据的存储方法,获取电子设备运行的程序的使用数据,获取该使用数据的量化信息,并基于该使用数据的量化信息确定该使用数据的使用信息,基于该使用数据的使用信息和该使用数据的使用信息,确定该使用数据的使用模式,从多个存储媒介中,确定与使用模式对应的存储媒介作为目标存储媒介,其中,该多个存储媒介各自对应的访问速度不同,将使用数据存储至该目标存储媒介。相较于图1所示的数据的存储方法,本实施例还获取使用数据的量化信息和使用数据的使用信息,基于该量化信息和使用信息确定使用模式,从而提升所确定的使用模式的准确性。The data storage method provided by an embodiment of the present application obtains the usage data of the programs run by the electronic device, obtains the quantitative information of the usage data, and determines the usage information of the usage data based on the quantitative information of the usage data, and based on the usage data The use information of the use data and the use information of the use data, determine the use mode of the use data, and determine the storage medium corresponding to the use mode from a plurality of storage media as the target storage medium, wherein the corresponding access to each of the plurality of storage media The speed is different, and the usage data is stored to the target storage medium. Compared with the data storage method shown in FIG. 1 , this embodiment also obtains the quantitative information of the usage data and the usage information of the usage data, and determines the usage mode based on the quantification information and the usage information, thereby improving the accuracy of the determined usage mode. sex.

请参阅图3,图3示出了本申请一实施例提供的数据的存储方法的流程示意图。该方法应用于上述电子设备,下面将针对图3所示的流程进行详细的阐述,所述数据的存储方法具体可以包括以下步骤:Please refer to FIG. 3 , which shows a schematic flowchart of a data storage method provided by an embodiment of the present application. The method is applied to the above-mentioned electronic equipment, and the process shown in FIG. 3 will be described in detail below. The data storage method may specifically include the following steps:

步骤S310:获取所述电子设备运行的程序的使用数据。Step S310: Obtain usage data of programs run by the electronic device.

其中,步骤S310的具体描述请参阅步骤S110,在此不再赘述。Wherein, for the specific description of step S310, please refer to step S110, which will not be repeated here.

步骤S320:确定针对所述使用数据的多个量化维度。Step S320: Determine multiple quantification dimensions for the usage data.

作为一种可实施的方式,电子设备可以预先设置有多个量化维度,且该多个量化维度是针对所有使用数据的,即,电子设备运行的程序的所有使用数据,均对应该多个量化维度。基于此,在本实施例中,在获取该电子设备设备运行的程序的使用数据的情况下,则可以将预设置的多个量化维度确定为针对该使用数据的多个量化维度。As an implementable manner, the electronic device can be preset with multiple quantification dimensions, and the multiple quantification dimensions are for all usage data, that is, all usage data of the programs run by the electronic device correspond to the multiple quantification dimensions dimension. Based on this, in this embodiment, in the case of acquiring usage data of a program run by the electronic device, multiple preset quantitative dimensions may be determined as multiple quantitative dimensions for the usage data.

作为又一种可实施的方式,电子设备可以预先设置有多个量化维度,且多个量化维度中不同的量化维度针对不同的使用数据,即,电子设备运行的程序的使用数据,可以对应该多个量化维度中的一个或者多个量化维度。基于此,在本实施例中,在获取该电子设备运行的程序的使用数据的情况下,则可以基于该使用数据,从预先设置的多个量化维度中,确定与该使用数据对应的多个量化维度,作为针对该使用数据的多个量化维度。As yet another practicable manner, the electronic device may be preset with multiple quantization dimensions, and different quantization dimensions among the multiple quantization dimensions may be used for different usage data, that is, the usage data of programs run by the electronic device may correspond to the One or more quantization dimensions among multiple quantization dimensions. Based on this, in this embodiment, when the usage data of the program run by the electronic device is acquired, based on the usage data, a plurality of quantitative dimensions corresponding to the usage data can be determined from a plurality of preset quantitative dimensions. Quantitative Dimensions, as multiple quantitative dimensions for the usage data.

在一些实施方式中,针对该使用数据的多个量化维度可以包括:In some embodiments, quantified dimensions for the usage data may include:

1.数据操作的量的等级,根据不同的分捅规则,可分为N个等级。其中,最低等级代表不做操作,次低等级是指仅发生一次,其余等级可根据不同的分捅原则进行制定;1. The level of data operation volume can be divided into N levels according to different classification rules. Among them, the lowest level means no operation, the next lowest level means that it only occurs once, and the remaining levels can be formulated according to different splitting principles;

2.数据是读操作,以及它的操作量的等级;2. The data is a read operation, and its level of operation volume;

3.数据是写操作,以及它的操作量的等级;3. The data is a write operation, and its level of operation volume;

4.数据更新频率;4. Data update frequency;

5.数据类型有整数型、浮点数据型、随机内容型、原始位图型、压缩过的数据型(如JPEG、PNG);5. The data types include integer type, floating point data type, random content type, original bitmap type, compressed data type (such as JPEG, PNG);

6.数据来源由磁盘数据映射到内存(指未做任何修改)、程序临时修改内存数据。6. The data source is mapped from the disk data to the memory (referring to no modification), and the program temporarily modifies the memory data.

步骤S330:获取所述使用数据在所述多个量化维度中的每个量化维度下的量化信息。Step S330: Obtain quantization information of the usage data in each quantization dimension of the plurality of quantization dimensions.

在本实施例中,在确定针对该使用数据的多个量化维度的情况下,则可以获取该使用数据在该多个量化维度中的每个量化维度下的量化信息。作为一种方式,该电子设备运行的程序的使用数据的数量可能为一个,则可以获取该一个使用数据在多个量化维度中的每个量化维度下的量化信息;作为又一种方式,该电子设备运行的程序的使用数量的数量可能为多个,则可以确定该多个使用数据各自在多个量化维度中的每个量化维度下的量化信息。In this embodiment, in the case of determining multiple quantization dimensions for the usage data, the quantization information of the usage data in each of the multiple quantization dimensions may be acquired. As a method, the number of usage data of the program run by the electronic device may be one, and then the quantitative information of the usage data in each of the multiple quantification dimensions can be obtained; as another method, the There may be multiple usage quantities of the programs run by the electronic device, and quantitative information of the multiple usage data in each of the multiple quantification dimensions may be determined.

在一些实施方式中,假设针对该使用数据的多个量化维度包括上述6种量化维度,则可以获取该使用数据在上述6种量化维度中的每种量化维度下的量化信息。In some implementation manners, assuming that the multiple quantization dimensions for the usage data include the aforementioned 6 quantization dimensions, the quantification information of the usage data in each of the aforementioned 6 quantization dimensions may be acquired.

步骤S340:在所述使用数据的使用过程中,记录所述使用数据的使用情况并生成分析文件,其中,所述分析文件至少包括所述使用数据的量化信息。Step S340: During the use of the usage data, record the usage of the usage data and generate an analysis file, wherein the analysis file includes at least quantitative information of the usage data.

在本实施例中,电子设备在使用数据的使用过程中,则可以记录该使用数据的使用情况,并根据所所记录的使用数据的使用情况生成至少包括该使用数据的量化信息的分析文件,从而为确定使用数据的使用信息提供依据。In this embodiment, during the use of the usage data, the electronic device may record the usage of the usage data, and generate an analysis file including at least the quantitative information of the usage data according to the recorded usage data, Thereby providing a basis for determining the usage information of the usage data.

在一些实施方式中,在使用数据的使用过程中,电子设备可以实时记录使用数据的使用情况并生成分析文件,可以按预设时间间隔记录使用数据的使用情况并生成分析文件,可以按预设时间点记录使用数据的使用情况并生成分析文件,或者,也可以按照其他预设规则记录使用数据的使用情况并生成分析文件等,在此不做限定。In some implementations, during the use of the usage data, the electronic device can record the usage status of the usage data in real time and generate an analysis file, and can record the usage status of the usage data and generate an analysis file at a preset time interval. Record the use of the usage data at a point in time and generate an analysis file, or record the usage of the usage data and generate an analysis file according to other preset rules, which is not limited here.

作为一种方式,在使用数据的使用过程中,电子设备可以在一开始记录到使用数据的使用情况便可以生成分析文件,后续在记录到使用数据的使用情况时,则根据该使用数据的使用情况更新该分析文件。作为又一种方式,在使用数据的使用过程中,电子设备可以在确定所记录的使用数据的使用情况的数量达到预设数量时生成分析文件,后续在记录到使用数据的使用情况时,则根据该使用数据的使用情况更新该分析文件。作为再一种方式,在使用数据的使用过程中,电子设备可以在确定所记录的使用数据的使用情况的时长达到预设时长时生成粉熊文件,后续在记录到使用数据的使用情况时,则根据该使用数据的使用情况更新该分析文件。As a way, in the process of using the usage data, the electronic device can generate an analysis file after recording the usage of the usage data at the beginning, and then when the usage of the usage data is recorded, the electronic device can generate an analysis file based on the usage of the usage data. The analysis file is updated accordingly. As yet another way, during the use of the usage data, the electronic device may generate an analysis file when it is determined that the number of recorded usage data usage conditions reaches a preset number, and when the usage status of the usage data is recorded later, then The analysis file is updated according to usage of the usage data. As yet another way, during the use of the usage data, the electronic device can generate a pink bear file when it is determined that the usage of the recorded usage data reaches a preset duration, and then when the usage of the usage data is recorded, The analysis file is then updated according to the usage of the usage data.

步骤S350:解析所述分析文件,从多个预设使用信息中确定所述使用数据的量化信息满足的预设使用信息,作为所述使用数据的使用信息。Step S350: Parse the analysis file, and determine the preset usage information that the quantitative information of the usage data satisfies from a plurality of preset usage information, as the usage information of the usage data.

在本实施例中,在获得分析文件的情况下,则可以解析该分析文件,以从多个预设使用信息中确定该使用数据的量化信息满足的预设使用信息,并将该使用数据的量化信息满足的预设使用信息确定为该使用数据的使用信息。In this embodiment, when the analysis file is obtained, the analysis file can be parsed to determine from a plurality of preset usage information that the quantitative information of the usage data satisfies the preset usage information, and the usage data's The preset usage information that the quantitative information satisfies is determined as the usage information of the usage data.

在一些实施方式中,电子设备可以预先设置并存储有多个预设使用信息,例如,电子设备可以预先设置并存储有很少使用、读多写少、读少写多等预设使用信息。因此,在本实施例中,在获得分析文件的情况下,则可以对该分析文件进行解析,以从该多个预设使用信息中确定该使用数据的量化信息所满足的预设使用信息,并将该使用数据的量化信息所满足的预设使用信息确定为该使用数据的使用信息。In some implementations, the electronic device may be preset and stored with a plurality of preset usage information, for example, the electronic device may be preset and stored with preset usage information such as seldom used, more reads and less writes, and less reads and more writes. Therefore, in this embodiment, when the analysis file is obtained, the analysis file may be parsed to determine the preset usage information that the quantitative information of the usage data satisfies from the plurality of preset usage information, And the preset usage information satisfied by the quantitative information of the usage data is determined as the usage information of the usage data.

作为一种可实施的方式,针对使用数据的使用信息的确定,可以通过程序主动标注的方式实现。其中,该方式适用于用户非常清楚程序运行方式的场景,能够提前知道程序既定行为,即使用数据方式的情况下使用。具体方式可以包括:程序通过手动指定某个数据的访问方式,可使用编译器提供的语法或者直接在配置文件中显式的声明。例如,通过使用数据的量化信息发现该使用数据几乎很少被使用,即读、写、更新频率都非常低,因此可以指定为rarely_used,说明该使用数据很少会使用。As an implementable manner, the determination of the usage information of the usage data can be realized by actively marking the program. Among them, this method is suitable for scenarios where the user is very clear about the running mode of the program, and can know the predetermined behavior of the program in advance, that is, it is used in the case of using the data method. The specific method may include: the program manually specifies the access method of a certain data, using the syntax provided by the compiler or directly explicitly declaring it in the configuration file. For example, through the quantitative information of the usage data, it is found that the usage data is rarely used, that is, the frequency of reading, writing, and updating is very low, so it can be specified as rarely_used, indicating that the usage data is rarely used.

作为又一种可实施的方式,针对使用数据的使用信息的确定,可以通过分析运行时数据,再通过主动标注的方式实现。其中,该方式适用于用户不确定程序具体如何使用数据的情况。具体方式可以包括:记录每个使用数据的使用情况,会在磁盘中动态生成一份分析文件,其中详细记录了每一个符合条件的使用数据(内存中的使用数据、磁盘中的使用数据)被使用的情况以及它们的类型。当程序执行一定程度之后,比如完成了一轮它的完整的功能测试,或者,直接从真实用户使用的数据中获取,基于此,用户可以分析该文件,从中获得确认信息之后再对该使用数据进行手动标注。As yet another implementable manner, the determination of the usage information of the usage data can be realized by analyzing the runtime data and then actively marking it. Among them, this method is suitable for the situation where the user is not sure how the program uses the data. Specific methods may include: record the usage of each usage data, and dynamically generate an analysis file in the disk, which records in detail each qualified usage data (usage data in memory, usage data in disk) The situations in which they are used and their types. When the program executes to a certain extent, such as completing a round of its complete functional test, or directly obtained from the data used by real users, based on this, the user can analyze the file and obtain confirmation information from it before using the data Do manual labeling.

作为再一种可实施的方式,针对使用数据的使用信息的确定,可以通过使用运行数据动态调整技术的方式实现。其中,该方式适用于完全脱离人干预的场景。具体方式可以包括:记录每个使用数据的使用情况,会在磁盘中动态生成一份分析文件,其中详细记录了每一个符合条件的使用数据(内存中的使用数据、磁盘中的使用数据)被使用的情况以及它们的类型。分析程序解读生成出来的分析文件,根据一定规则自动将符合条件的使用数据标记为有效的,从而实现使用数据的使用信息的自动标注。As yet another practicable manner, the determination of the usage information for the usage data may be realized by using the dynamic adjustment technology of the operating data. Among them, this method is suitable for scenarios that are completely free from human intervention. Specific methods may include: record the usage of each usage data, and dynamically generate an analysis file in the disk, which records in detail each qualified usage data (usage data in memory, usage data in disk) The situations in which they are used and their types. The analysis program interprets the generated analysis files, and automatically marks the usage data that meets the conditions as valid according to certain rules, so as to realize the automatic labeling of the usage information of the usage data.

步骤S360:基于所述使用数据的量化信息和所述使用数据的使用信息,确定所述使用数据的使用模式。Step S360: Determine a usage mode of the usage data based on the quantification information of the usage data and the usage information of the usage data.

其中,步骤S360的具体描述请参阅步骤S230,在此不再赘述。Wherein, for the specific description of step S360, please refer to step S230, which will not be repeated here.

步骤S370:从多个存储媒介中,确定与所述使用模式对应的存储媒介作为目标存储媒介,其中,所述多个存储媒介各自对应的访问速度不同。Step S370: From a plurality of storage media, determine a storage medium corresponding to the usage mode as a target storage medium, wherein the access speeds corresponding to each of the plurality of storage media are different.

步骤S380:将所述使用数据存储至所述目标存储媒介。Step S380: Store the usage data in the target storage medium.

其中,步骤S370-步骤S380的具体描述请参阅步骤S120-步骤S130,在此不再赘述。Wherein, for the specific description of step S370-step S380, please refer to step S120-step S130, which will not be repeated here.

本申请一实施例提供的数据的存储方法,获取电子设备运行的程序的使用数据,确定针对该使用数据的多个量化维度,获取使用数据在该多个量化维度中的每个量化维度下的量化信息,在使用数据的使用过程中,记录该使用数据的使用情况并生成分析文件,其中,该分析文件至少包括该使用数据的量化信息,解析该分析文件,从多个预设使用信息中确定该使用数据的量化信息满足的预设使用信息,作为使用数据的使用信息,基于该使用数据的量化信息和该使用数据的使用信息,确定该使用数据的使用模式,从多个存储媒介中,确定与使用模式对应的存储媒介作为目标存储媒介,其中,该多个存储媒介各自对应的访问速度不同,将使用数据存储至目标存储媒介。相较于图1所示的数据的存储方法,本实施例还获取该使用数据在多个量化维度中的每个量化维度下的量化信息,以提升所获取的量化信息的准确性和多样性。另外,本实施例还通过对使用数据的使用情况进行分析、对比的方式,实现使用信息的自动标注,提升所获取的使用信息的快捷性和准确性。The data storage method provided by an embodiment of the present application is to obtain the usage data of the program run by the electronic device, determine multiple quantification dimensions for the usage data, and acquire the usage data under each quantization dimension of the multiple quantification dimensions Quantitative information, during the use of the usage data, record the usage of the usage data and generate an analysis file, wherein the analysis file at least includes the quantitative information of the usage data, analyze the analysis file, and obtain from multiple preset usage information Determine the preset usage information that the quantitative information of the usage data satisfies as the usage information of the usage data, determine the usage mode of the usage data based on the quantification information of the usage data and the usage information of the usage data, and select from multiple storage media , determining the storage medium corresponding to the usage pattern as the target storage medium, wherein the access speeds corresponding to the plurality of storage media are different, and storing the usage data in the target storage medium. Compared with the data storage method shown in FIG. 1 , this embodiment also obtains the quantitative information of the usage data in each of the multiple quantitative dimensions, so as to improve the accuracy and diversity of the obtained quantitative information . In addition, this embodiment also implements automatic labeling of usage information by analyzing and comparing usage conditions of usage data, and improves the speed and accuracy of acquired usage information.

请参阅图4,图4示出了本申请一实施例提供的数据的存储方法的流程示意图。该方法应用于上述电子设备,下面将针对图4所示的流程进行详细的阐述,所述数据的存储方法具体可以包括以下步骤:Please refer to FIG. 4 , which shows a schematic flowchart of a data storage method provided by an embodiment of the present application. The method is applied to the above-mentioned electronic equipment, and the process shown in FIG. 4 will be described in detail below. The data storage method may specifically include the following steps:

步骤S410:获取所述电子设备运行的程序的使用数据,并确定所述使用数据的使用模式。Step S410: Obtain usage data of a program run by the electronic device, and determine a usage mode of the usage data.

其中,步骤S410的具体描述请参阅步骤S110,在此不再赘述。Wherein, for the specific description of step S410, please refer to step S110, which will not be repeated here.

步骤S420:获取所述使用数据对应的访问信息,其中,所述访问信息包括属于近期访问数据或者不属于近期访问数据。Step S420: Obtain access information corresponding to the usage data, wherein the access information includes recent access data or non-recent access data.

在本实施例中,电子设备除了获取该使用数据对应的使用模式之外,还可以获取该使用数据对应的访问信息,其中,该访问信息可以包括属于近期访问数据或者不属于近期访问数据。In this embodiment, in addition to acquiring the usage mode corresponding to the usage data, the electronic device may also acquire access information corresponding to the usage data, where the access information may include recent access data or non-recent access data.

在一些实施方式中,电子设备可以同时获取该使用数据对应的使用模式和使用数据对应的访问信息;可以先获取该使用数据对应的使用模式,且后获取该使用数据对应的访问信息;可以先获取该使用数据对应的访问信息,且后获取该使用数据对应的使用模式等,在此不做限定。In some embodiments, the electronic device can obtain the usage mode corresponding to the usage data and the access information corresponding to the usage data at the same time; the usage mode corresponding to the usage data can be acquired first, and then the access information corresponding to the usage data can be acquired; Acquiring the access information corresponding to the usage data, and then acquiring the usage mode corresponding to the usage data, etc., are not limited here.

其中,获取使用数据对应的访问信息,其目的在于确定该使用数据是否属于电子设备的近期访问数据。即,根据该使用数据对应的访问信息,可以确定该使用数据属于该电子设备的近期访问数据,或者,根据该使用数据对应的访问信息,可以确定该使用数据不属于该电子设备的近期访问数据。作为一种可实施的方式,可以获取该使用数据的访问时间,并基于该使用数据的访问时间,确定该使用数据对应的访问信息。作为又一种可实施的方式,可以获取该使用数据的访问频次,并基于该使用数据的访问频次,确定该使用数据对应的访问信息。Wherein, the purpose of obtaining the access information corresponding to the usage data is to determine whether the usage data belongs to the recent access data of the electronic device. That is, according to the access information corresponding to the usage data, it can be determined that the usage data belongs to the recent access data of the electronic device, or, according to the access information corresponding to the usage data, it can be determined that the usage data does not belong to the recent access data of the electronic device . As an implementable manner, the access time of the usage data may be acquired, and based on the access time of the usage data, the access information corresponding to the usage data may be determined. As yet another implementable manner, the access frequency of the usage data may be acquired, and based on the access frequency of the usage data, the access information corresponding to the usage data may be determined.

请参阅图5,图5示出了本申请的图4所示的数据的存储方法的步骤S421的一实施例的流程示意图。下面将针对图5所示的流程进行详细的阐述,所述方法具体可以包括以下步骤:Please refer to FIG. 5 , which shows a schematic flowchart of an embodiment of step S421 of the data storage method shown in FIG. 4 of the present application. The process shown in Figure 5 will be described in detail below, and the method may specifically include the following steps:

步骤S421A:获取所述电子设备在最近的预设时长内的访问数据。Step S421A: Obtain the access data of the electronic device within the latest preset time period.

在一些实施方式中,电子设备可以预先设置并存储有预设时长,该预设时长用于作为电子设备的近期访问数据的判断依据。即,当电子设备访问某个使用数据的时间在最近的预设时长内时,则可以认为该电子设备访问的某个使用数据属于近期访问数据,当电子设备访问某个使用数据的时间不在最近的预设时长内时,则可以认为该电子设备访问的某个使用数据不属于近期访问数据。其中,该最近的预设时长可以包括近N秒。In some implementation manners, the electronic device may be preset and stored with a preset time length, and the preset time length is used as a basis for judging recent access data of the electronic device. That is, when the time when the electronic device accesses a certain usage data is within the latest preset time period, it can be considered that the certain usage data accessed by the electronic device belongs to recent access data; when the time when the electronic device accesses a certain usage data is not within the latest When it is within the preset time period, it can be considered that a certain usage data accessed by the electronic device does not belong to recent access data. Wherein, the latest preset duration may include nearly N seconds.

在本实施例中,可以获取电子设备在最近的预设时长内的访问数据。例如,可以获取电子设备在近N秒的访问数据。In this embodiment, the access data of the electronic device within the latest preset time period can be acquired. For example, the access data of the electronic device in nearly N seconds can be acquired.

步骤S422A:基于所述电子设备在最近的预设时长内的访问数据和所述使用数据的关系,确定所述使用数据对应的访问信息。Step S422A: Determine the access information corresponding to the usage data based on the relationship between the access data and the usage data of the electronic device within the latest preset time period.

在本实施例中,在获取到电子设备在最近的预设时长内的访问数据的情况下,则可以确定该电子设备在最近的预设时长内的访问数据和该使用数据的关系,并基于该电子设备在最近的预设时长内的访问数据和该使用数据的关系,确定该使用数据对应的访问信息。In this embodiment, if the access data of the electronic device within the latest preset time period is obtained, the relationship between the access data of the electronic device within the latest preset time period and the usage data can be determined, and based on The relationship between the access data and the use data of the electronic device within the latest preset time period determines the access information corresponding to the use data.

在一些实施方式中,在获取到电子设备在最近的预设时长内的访问数据的情况下,则可以将电子设备在最近的预设时长内的访问数据和该使用数据进行比较,以判断该电子设备在最近的预设时长内的访问数据是否包括该使用数据。其中,在确定该电子设备在最近的预设时长内的访问数据包括该使用数据时,则可以确定该使用数据属于近期访问数据;在确定该电子设备在最近的预设时长的访问数据不包括该使用数据时,则可以确定该使用数据不属于近期访问数据。In some embodiments, if the access data of the electronic device within the latest preset time period is obtained, the access data of the electronic device within the latest preset time period can be compared with the usage data to determine the Whether the access data of the electronic device within the latest preset time period includes the usage data. Wherein, when it is determined that the access data of the electronic device within the latest preset time span includes the usage data, it can be determined that the usage data belongs to recent access data; when it is determined that the access data of the electronic device within the latest preset duration does not include When the usage data is used, it can be determined that the usage data does not belong to recent access data.

请参阅图6,图6示出了本申请的图4所示的数据的存储方法的步骤S421的一实施例的流程示意图。下面将针对图6所示的流程进行详细的阐述,所述方法具体可以包括以下步骤:Please refer to FIG. 6 , which shows a schematic flowchart of an embodiment of step S421 of the data storage method shown in FIG. 4 of the present application. The process shown in Figure 6 will be described in detail below, and the method may specifically include the following steps:

步骤S421B:获取所述电子设备在最近的预设容量内的访问数据。Step S421B: Obtain the access data of the electronic device within the latest preset capacity.

在一些实施方式中,电子设备可以预先设置并存储有预设容量,该预设容量用于作为电子设备的近期访问数据的判断依据。即,当电子设备访问的某个使用数据在最近的预设容量内时,则可以认为该电子设备访问的某个使用数据属于近期访问数据,当电子设备访问的某个使用数据不在最近的预设容量内时,则可以认为该电子设备访问的某个使用数据不属于近期访问数据。其中,该最近的预设容量可以包括近M KB。In some implementations, the electronic device may be preset and stored with a preset capacity, and the preset capacity is used as a basis for judging recent access data of the electronic device. That is, when a certain usage data accessed by an electronic device is within the latest preset capacity, it can be considered that a certain usage data accessed by the electronic device belongs to recent access data; when a certain usage data accessed by an electronic device is not within the latest preset capacity When it is set within the capacity, it can be considered that a certain usage data accessed by the electronic device does not belong to recent access data. Wherein, the latest preset capacity may include nearly M KB.

在本实施例中,可以获取电子设备在最近的预设容量内的访问数据。例如,可以获取电子设备在近M KB的访问数据。In this embodiment, the access data of the electronic device within the latest preset capacity can be acquired. For example, access data of nearly M KB of electronic equipment can be obtained.

步骤S422B:基于所述电子设备在最近的预设容量内的访问数据和所述使用数据的关系,确定所述使用数据对应的访问信息。Step S422B: Based on the relationship between the access data of the electronic device within the latest preset capacity and the use data, determine the access information corresponding to the use data.

在本实施例中,在获取到电子设备在最近的预设容量内的访问数据的情况下,则可以确定该电子设备在最近的预设容量内的访问数据和该使用数据的关系,并基于该电子设备在最近的预设容量内的访问数据和该使用数据的关系,确定该使用数据对应的访问信息。In this embodiment, when the access data of the electronic device within the latest preset capacity is obtained, the relationship between the access data of the electronic device within the latest preset capacity and the usage data can be determined, and based on The relationship between the access data of the electronic device within the latest preset capacity and the use data determines the access information corresponding to the use data.

在一些实施方式中,在获取到电子设备在最近的预设容量内的访问数据的情况下,则可以将电子设备在最近的预设容量内的访问数据和该使用数据进行比较,以判断该电子设备在最近的预设容量内的访问数据是否包括该使用数据。其中,在确定该电子设备在最近的预设容量内的访问数据包括该使用数据时,则可以确定该使用数据属于近期访问数据;在确定该电子设备在最近的预设容量的访问数据不包括该使用数据时,则可以确定该使用数据不属于近期访问数据。In some embodiments, when the access data of the electronic device within the latest preset capacity is obtained, the access data of the electronic device within the latest preset capacity can be compared with the usage data to determine the Whether the access data of the electronic device within the latest preset capacity includes the usage data. Wherein, when it is determined that the access data of the electronic device in the latest preset capacity includes the usage data, it can be determined that the usage data belongs to recent access data; when it is determined that the access data of the electronic device in the latest preset capacity does not include When the usage data is used, it can be determined that the usage data does not belong to recent access data.

步骤S430:从所述多个存储媒介中,确定与所述使用模式和所述访问信息对应的存储媒介作为所述目标存储媒介,其中,所述多个存储媒介各自对应的访问速度不同。Step S430: From the multiple storage media, determine the storage medium corresponding to the usage pattern and the access information as the target storage medium, wherein the access speeds corresponding to the multiple storage media are different.

在本实施例中,在确定使用数据对应的使用模式以及该使用数据对应的访问信息的情况下,则可以从多个存储媒介中,确定与该使用模式和该访问信息对应的存储媒介,并将该使用模式和该访问信息对应的存储媒介作为目标存储媒介。In this embodiment, in the case of determining the use mode corresponding to the use data and the access information corresponding to the use data, the storage medium corresponding to the use mode and the access information may be determined from a plurality of storage media, and The storage medium corresponding to the usage pattern and the access information is used as the target storage medium.

作为一种可实施的方式,电子设备可以预先设置并存储有多个使用模式、多个存储媒介、多个访问信息、以及多个使用模式、多个存储媒介、多个访问信息的对应关系。因此,在本实施例中,在确定使用数据对应的使用模式和使用数据对应的访问信息的情况下,则可以基于多个使用模式、多个访问信息、多个存储媒介的对应关系,确定该使用数据对应的使用模式和该使用数据对应的访问信息对应的存储媒介,并将该使用数据对应的使用模式和使用数据对应的使用模式对应的存储媒介确定为目标存储媒介。As an implementable manner, the electronic device may preset and store multiple usage modes, multiple storage media, multiple access information, and corresponding relationships among the multiple usage modes, multiple storage media, and multiple access information. Therefore, in this embodiment, in the case of determining the usage mode corresponding to the usage data and the access information corresponding to the usage data, the The use mode corresponding to the use data and the storage medium corresponding to the access information corresponding to the use data, and the use mode corresponding to the use data and the storage medium corresponding to the use mode corresponding to the use data are determined as target storage medium.

步骤S440:将所述使用数据存储至所述目标存储媒介。Step S440: Store the usage data in the target storage medium.

其中,步骤S440的具体描述请参阅步骤S130,在此不再赘述。Wherein, for the specific description of step S440, please refer to step S130, which will not be repeated here.

本申请一实施例提供的数据的存储方法,获取电子设备运行的程序的使用数据,并确定使用数据的使用模式,获取该使用数据对应的访问信息,其中,该访问信息包括属于近期访问数据或者不属于近期访问数据,从多个存储媒介中,确定与该使用模式和该访问信息对应的存储媒介作为目标存储媒介,其中,多个存储媒介各自对应的访问速度不同,将使用数据存储至目标存储媒介。相较于图1所示的数据的存储方法,本实施例还获取该使用数据的访问信息,并基于该使用模式和访问信息确定目标存储媒介,从而可以提升所确定的目标存储媒介的准确性。The data storage method provided by an embodiment of the present application obtains the usage data of the program run by the electronic device, determines the usage mode of the usage data, and acquires the access information corresponding to the usage data, wherein the access information includes recent access data or It does not belong to recent access data. From multiple storage media, determine the storage medium corresponding to the usage pattern and the access information as the target storage medium. Among them, the access speeds corresponding to the multiple storage media are different, and the usage data is stored in the target storage medium. storage medium. Compared with the data storage method shown in Figure 1, this embodiment also obtains the access information of the usage data, and determines the target storage medium based on the usage pattern and access information, thereby improving the accuracy of the determined target storage medium .

请参阅图7,图7示出了本申请一实施例提供的数据的存储方法的流程示意图。该方法应用于上述电子设备,下面将针对图7所示的流程进行详细的阐述,所述数据的存储方法具体可以包括以下步骤:Please refer to FIG. 7 , which shows a schematic flowchart of a data storage method provided by an embodiment of the present application. The method is applied to the above-mentioned electronic equipment, and the flow shown in FIG. 7 will be described in detail below. The data storage method may specifically include the following steps:

步骤S510:获取所述电子设备运行的程序的使用数据,并确定所述使用数据的使用模式。Step S510: Obtain usage data of a program run by the electronic device, and determine a usage mode of the usage data.

其中,步骤S510的具体描述请参阅步骤S110,在此不再赘述。Wherein, for the specific description of step S510, please refer to step S110, which will not be repeated here.

步骤S520:获取所述使用数据与前台操作的关联关系,其中,所述关联关系包括相关联或者无关联。Step S520: Obtain an association relationship between the usage data and the foreground operation, wherein the association relationship includes association or no association.

在本实施例中,电子设备除了获取该使用数据对应的使用模式之外,还可以获取该使用数据与前台操作的关联关系,其中,该关联关系可以包括相关联或者无关联。In this embodiment, in addition to acquiring the usage mode corresponding to the usage data, the electronic device may also acquire an association relationship between the usage data and foreground operations, where the association relationship may include association or no association.

在一些实施方式中,电子设备可以同时获取该使用数据对应的使用模式和使用数据与前台操作的关联关系;可以先获取该使用数据对应的使用模式,且后获取该使用数据与前台操作的关联关系;可以先获取该使用数据与前台操作的关联关系,且后获取该使用数据对应的使用模式等,在此不做限定。In some implementations, the electronic device can acquire the usage mode corresponding to the usage data and the association relationship between the usage data and the foreground operation at the same time; it can first acquire the usage mode corresponding to the usage data, and then acquire the association between the usage data and the foreground operation relationship; the relationship between the usage data and the foreground operation can be obtained first, and then the usage mode corresponding to the usage data can be obtained, which is not limited here.

其中,获取使用数据与前台操作的关联关系,其目的在于确定该使用数据是否与电子设备的前台操作相关联。即,根据该使用数据与前台操作的关联关系,可以确定该使用数据与前台操作相关联,或者,根据该使用数据与前台操作的关联关系,可以确定该使用数据与前台操作无关联。作为一种可实施的方式,可以获取该电子设备的前台操作的调用数据,当该调用数据包括该使用数据时,则可以确定该使用数据与前台操作相关联,当该调用数据不包括该使用数据时,则可以确定该使用数据与前台操作无关联。Wherein, the purpose of obtaining the association relationship between the usage data and the foreground operation is to determine whether the usage data is associated with the foreground operation of the electronic device. That is, according to the association relationship between the usage data and the foreground operation, it can be determined that the usage data is associated with the foreground operation, or, according to the association relationship between the usage data and the foreground operation, it can be determined that the usage data is not associated with the foreground operation. As an implementable manner, the invocation data of the foreground operation of the electronic device can be acquired, and when the invocation data includes the usage data, it can be determined that the usage data is associated with the foreground operation, and when the invocation data does not include the usage data data, it can be determined that the usage data is not associated with the foreground operation.

步骤S530:从所述多个存储媒介中,确定与所述使用模式和所述关联关系对应的存储媒介作为所述目标存储媒介,其中,所述多个存储媒介各自对应的访问速度不同。Step S530: From the multiple storage media, determine the storage medium corresponding to the usage pattern and the association relationship as the target storage medium, wherein the access speeds corresponding to the multiple storage media are different.

在本实施例中,在确定使用数据对应的使用模式以及该使用数据与前台操作的关联关系的情况下,则可以从多个存储媒介中,确定与该使用模式和该关联关系对应的存储媒介,并将该使用模式和该关联关系对应的存储媒介作为目标存储媒介。In this embodiment, in the case of determining the use mode corresponding to the use data and the association relationship between the use data and the foreground operation, the storage medium corresponding to the use mode and the association relationship can be determined from a plurality of storage media , and use the storage medium corresponding to the usage pattern and the association relationship as the target storage medium.

作为一种可实施的方式,电子设备可以预先设置并存储有多个使用模式、多个存储媒介、多个关联关系、以及多个使用模式、多个存储媒介、多个关联关系的对应关系。因此,在本实施例中,在确定使用数据对应的使用模式和与前台操作的关联关系的情况下,则可以基于多个使用模式、多个关联关系、多个存储媒介的对应关系,确定该使用数据对应的使用模式和关联关系对应的存储媒介,并将该使用数据对应的使用模式和关联关系对应的存储媒介确定为目标存储媒介。As an implementable manner, the electronic device may be preset and stored with multiple usage modes, multiple storage media, multiple association relationships, and correspondences between the multiple usage modes, multiple storage media, and multiple association relationships. Therefore, in this embodiment, in the case of determining the use mode corresponding to the use data and the association relationship with the foreground operation, it can be determined based on multiple usage modes, multiple association relationships, and multiple storage media correspondences. The usage pattern corresponding to the usage data and the storage medium corresponding to the association relationship are used, and the storage medium corresponding to the usage pattern and the association relationship corresponding to the usage data is determined as the target storage medium.

作为一种示例,假设使用数据与前台操作相关联(关联关系)、该使用数据不属于近期访问数据(访问信息)、且该使用数据的数据更新频率低(使用模式)的前提下,则如果读与写使用、写多读少或者写少读多(使用模式),则可以将“带有数据压缩功能的内存,且其压缩速度适中、压缩率适中”的存储介质确定为目标存储介质;如果读与写非常少(使用模式),则可以将“带有压缩功能的磁盘”的存储介质确定为目标存储介质。As an example, assuming that the usage data is associated with the foreground operation (association relationship), the usage data does not belong to recent access data (access information), and the data update frequency of the usage data is low (usage mode), then if Read and write usage, write more and read less, or write less and read more (usage mode), then the storage medium with "memory with data compression function, moderate compression speed and moderate compression rate" can be determined as the target storage medium; If there are very few reads and writes (usage pattern), the storage medium of "disk with compression function" can be determined as the target storage medium.

作为又一种示例,假设使用数据与前台操作无关联(关联关系)、该使用数据不属于近期访问数据(访问信息)、且该使用数据的数据更新频率低(使用模式)的前提下,则如果读或者写的数据量较大(使用模式),则将“带有数据压缩功能的内存,且其压缩速度慢、压缩率高”的存储介质确定为目标存储介质;其余情况都将将“带有压缩功能的磁盘”的存储介质确定为目标存储介质。As yet another example, assuming that the usage data is not associated with the foreground operation (association relationship), the usage data does not belong to recent access data (access information), and the data update frequency of the usage data is low (usage mode), then If the amount of data to be read or written is large (usage mode), the storage medium with "memory with data compression function, and its compression speed is slow and the compression rate is high" is determined as the target storage medium; in other cases, " "Disk with Compression" storage medium is determined as the target storage medium.

步骤S540:将所述使用数据存储至所述目标存储媒介。Step S540: Store the usage data in the target storage medium.

其中,步骤S540的具体描述请参阅步骤S130,在此不再赘述。Wherein, for the specific description of step S540, please refer to step S130, which will not be repeated here.

本申请一实施例提供的数据的存储方法,获取电子设备运行的程序的使用数据,并确定该使用数据的使用模式,获取该使用数据与前台操作的关联关系,其中,该关联关系包括相关联或者无关联,从多个存储媒介中,确定与该使用模式和关联关系对应的存储媒介作为目标存储媒介,其中,多个存储媒介各自对应的访问速度不同,将使用数据存储至目标存储媒介。相较于图1所示的数据的存储方法,本实施例还获取该使用数据与前台操作的关联关系,并基于该使用模式和该关联关系确定目标存储媒介,从而可以提升所确定的目标存储媒介的准确性。The data storage method provided by an embodiment of the present application obtains the usage data of the programs run by the electronic device, determines the usage mode of the usage data, and acquires the association relationship between the usage data and the foreground operation, wherein the association relationship includes association Or without association, from a plurality of storage media, determine the storage medium corresponding to the usage mode and the association relationship as the target storage medium, wherein the access speeds corresponding to the multiple storage media are different, and store the usage data in the target storage medium. Compared with the data storage method shown in FIG. 1 , this embodiment also obtains the association relationship between the usage data and the foreground operation, and determines the target storage medium based on the usage mode and the association relationship, so that the determined target storage medium can be improved. Medium Accuracy.

请参阅图8,图8示出了本申请一实施例提供的数据的存储装置的模块框图。该数据的存储装置200应用于上述电子设备,下面将针对图8所示的框图进行阐述,所述数据的存储装置200包括:使用模式确定模块210、目标存储介质确定模块220以及数据存储模块230,其中:Please refer to FIG. 8 , which shows a block diagram of a data storage device provided by an embodiment of the present application. The data storage device 200 is applied to the above-mentioned electronic equipment, and will be described below with respect to the block diagram shown in FIG. ,in:

使用模式确定模块210,用于获取所述电子设备运行的程序的使用数据,并确定所述使用数据的使用模式。The usage mode determining module 210 is configured to acquire usage data of programs run by the electronic device, and determine a usage mode of the usage data.

进一步地,所述使用模式确定模块210包括:信息确定子模块和使用模式确定子模块,其中:Further, the usage mode determination module 210 includes: an information determination submodule and a usage mode determination submodule, wherein:

信息确定子模块,用于获取所述使用数据的量化信息,并基于所述使用数据的量化信息确定所述使用数据的使用信息。The information determining submodule is configured to acquire the quantitative information of the usage data, and determine the usage information of the usage data based on the quantitative information of the usage data.

进一步地,所述信息确定子模块包括:量化维度确定单元和量化信息获取单元,其中:Further, the information determination submodule includes: a quantization dimension determination unit and a quantization information acquisition unit, wherein:

量化维度确定单元,用于确定针对所述使用数据的多个量化维度。A quantitative dimension determining unit, configured to determine multiple quantitative dimensions for the usage data.

量化信息获取单元,用于获取所述使用数据在所述多个量化维度中的每个量化维度下的量化信息。A quantization information acquisition unit, configured to acquire quantization information of the usage data in each quantization dimension of the plurality of quantization dimensions.

进一步地,所述信息确定子模块包括:分析文件生成单元和使用信息确定单元,其中:Further, the information determination submodule includes: an analysis file generation unit and a use information determination unit, wherein:

分析文件生成单元,用于在所述使用数据的使用过程中,记录所述使用数据的使用情况并生成分析文件,其中,所述分析文件至少包括所述使用数据的量化信息。The analysis file generation unit is configured to record the use of the use data and generate an analysis file during the use of the use data, wherein the analysis file includes at least quantitative information of the use data.

使用信息确定单元,用于解析所述分析文件,从多个预设使用信息中确定所述使用数据的量化信息满足的预设使用信息,作为所述使用数据的使用信息。The usage information determining unit is configured to analyze the analysis file, and determine the preset usage information that the quantitative information of the usage data satisfies from a plurality of preset usage information, as the usage information of the usage data.

使用模式确定子模块,用于基于所述使用数据的量化信息和所述使用数据的使用信息,确定所述使用数据的使用模式。The usage mode determining submodule is configured to determine the usage mode of the usage data based on the quantitative information of the usage data and the usage information of the usage data.

目标存储媒介确定模块220,用于从多个存储媒介中,确定与所述使用模式对应的存储媒介作为目标存储媒介,其中,所述多个存储媒介各自对应的访问速度不同。The target storage medium determination module 220 is configured to determine a storage medium corresponding to the usage mode as a target storage medium from a plurality of storage media, wherein the corresponding access speeds of the plurality of storage media are different.

进一步地,所述目标存储媒介确定模块220包括:访问信息获取子模块和第一目标存储媒介确定子模块,其中:Further, the target storage medium determination module 220 includes: an access information acquisition submodule and a first target storage medium determination submodule, wherein:

访问信息获取子模块,用于获取所述使用数据对应的访问信息,其中,所述访问信息包括属于近期访问数据或者不属于近期访问数据。The access information acquisition sub-module is configured to acquire access information corresponding to the usage data, wherein the access information includes recent access data or non-recent access data.

进一步地,所述访问信息获取子模块包括:第一访问数据获取单元和第一访问信息获取单元,其中:Further, the access information acquisition submodule includes: a first access data acquisition unit and a first access information acquisition unit, wherein:

第一访问数据获取单元,用于获取所述电子设备在最近的预设时长内的访问数据。The first access data acquiring unit is configured to acquire the access data of the electronic device within the latest preset time period.

第一访问信息获取单元,用于基于所述电子设备在最近的预设时长内的访问数据和所述使用数据的关系,确定所述使用数据对应的访问信息。The first access information acquiring unit is configured to determine the access information corresponding to the usage data based on the relationship between the access data and the usage data of the electronic device within the latest preset time period.

进一步似,所述访问信息获取子模块包括:第二访问数据获取单元和第二访问信息获取单元,其中:Further, the access information acquisition submodule includes: a second access data acquisition unit and a second access information acquisition unit, wherein:

第二访问数据获取单元,用于获取所述电子设备在最近的预设容量内的访问数据。The second access data acquiring unit is configured to acquire the access data of the electronic device within the latest preset capacity.

第二访问信息获取单元,用于基于所述电子设备在最近的预设容量内的访问数据和所述使用数据的关系,确定所述使用数据对应的访问信息。The second access information acquiring unit is configured to determine the access information corresponding to the usage data based on the relationship between the access data of the electronic device within the latest preset capacity and the usage data.

第一目标存储媒介确定子模块,用于从所述多个存储媒介中,确定与所述使用模式和所述访问信息对应的存储媒介作为所述目标存储媒介。The first target storage medium determining submodule is configured to determine, from the plurality of storage media, a storage medium corresponding to the usage mode and the access information as the target storage medium.

进一步地,所述目标存储媒介确定模块220包括:关联关系获取子模块和第二目标存储媒介确定子模块,其中:Further, the target storage medium determination module 220 includes: an association relationship acquisition submodule and a second target storage medium determination submodule, wherein:

关联关系获取子模块,用于获取所述使用数据与前台操作的关联关系,其中,所述关联关系包括相关联或者无关联。The association relationship acquisition sub-module is configured to acquire the association relationship between the usage data and the foreground operation, wherein the association relationship includes association or non-association.

第二目标存储媒介确定子模块,用于从所述多个存储媒介中,确定与所述使用模式和所述关联关系对应的存储媒介作为所述目标存储媒介。The second target storage medium determining submodule is configured to determine, from the plurality of storage media, a storage medium corresponding to the usage mode and the association relationship as the target storage medium.

数据存储模块230,用于将所述使用数据存储至所述目标存储媒介。The data storage module 230 is configured to store the usage data in the target storage medium.

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the devices and modules described above can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.

在本申请所提供的几个实施例中,模块相互之间的耦合可以是电性,机械或其它形式的耦合。In several embodiments provided in the present application, the coupling between the modules may be electrical, mechanical or other forms of coupling.

另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。In addition, each functional module in each embodiment of the present application may be integrated into one processing module, each module may exist separately physically, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules.

请参阅图9,其示出了本申请实施例提供的一种电子设备100的结构框图。该电子设备100可以是智能手机、平板电脑、电子书等能够运行应用程序的电子设备。本申请中的电子设备100可以包括一个或多个如下部件:处理器110、存储器120以及一个或多个应用程序,其中一个或多个应用程序可以被存储在存储器120中并被配置为由一个或多个处理器110执行,一个或多个程序配置用于执行如前述方法实施例所描述的方法。Please refer to FIG. 9 , which shows a structural block diagram of an electronic device 100 provided by an embodiment of the present application. The electronic device 100 may be an electronic device capable of running application programs, such as a smart phone, a tablet computer, and an e-book. The electronic device 100 in this application may include one or more of the following components: a processor 110, a memory 120, and one or more application programs, wherein one or more application programs may be stored in the memory 120 and configured to be executed by a or a plurality of processors 110, and one or more programs are configured to execute the methods described in the foregoing method embodiments.

其中,处理器110可以包括一个或者多个处理核。处理器110利用各种接口和线路连接整个电子设备100内的各个部分,通过运行或执行存储在存储器120内的指令、程序、代码集或指令集,以及调用存储在存储器120内的数据,执行电子设备100的各种功能和处理数据。可选地,处理器110可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(ProgrammableLogic Array,PLA)中的至少一种硬件形式来实现。处理器110可集成中央处理器(CentralProcessing Unit,CPU)、图形处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责待显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器110中,单独通过一块通信芯片进行实现。Wherein, the processor 110 may include one or more processing cores. The processor 110 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes or executes instructions, programs, code sets or instruction sets stored in the memory 120, and calls data stored in the memory 120 to execute Various functions of the electronic device 100 and processing data. Optionally, the processor 110 may use at least one of Digital Signal Processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (ProgrammableLogic Array, PLA). implemented in the form of hardware. The processor 110 may integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU), a modem, and the like. Among them, the CPU mainly handles the operating system, user interface and application programs, etc.; the GPU is used to render and draw the content to be displayed; the modem is used to handle wireless communication. It can be understood that, the above-mentioned modem may not be integrated into the processor 110, but may be realized by a communication chip alone.

存储器120可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。存储器120可用于存储指令、程序、代码、代码集或指令集。存储器120可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等。存储数据区还可以存储电子设备100在使用中所创建的数据(比如电话本、音视频数据、聊天记录数据)等。The memory 120 may include a random access memory (Random Access Memory, RAM), and may also include a read-only memory (Read-Only Memory). The memory 120 may be used to store instructions, programs, codes, sets of codes, or sets of instructions. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system and instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.) , instructions for implementing the following method embodiments, and the like. The storage data area can also store data created during use of the electronic device 100 (such as phonebook, audio and video data, chat record data) and the like.

请参阅图10,其示出了本申请实施例提供的一种计算机可读存储介质的结构框图。该计算机可读介质300中存储有程序代码,所述程序代码可被处理器调用执行上述方法实施例中所描述的方法。Please refer to FIG. 10 , which shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application. Program codes are stored in the computer-readable medium 300, and the program codes can be invoked by a processor to execute the methods described in the foregoing method embodiments.

计算机可读存储介质300可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。可选地,计算机可读存储介质300包括非易失性计算机可读介质(non-transitory computer-readable storage medium)。计算机可读存储介质300具有执行上述方法中的任何方法步骤的程序代码310的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。程序代码310可以例如以适当形式进行压缩。The computer readable storage medium 300 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 300 includes a non-transitory computer-readable storage medium (non-transitory computer-readable storage medium). The computer-readable storage medium 300 has a storage space for program code 310 for executing any method steps in the above methods. These program codes can be read from or written into one or more computer program products. Program code 310 may, for example, be compressed in a suitable form.

综上所述,本申请实施例提供的数据的存储方法、装置、电子设备以及存储介质,获取电子设备运行的程序的使用数据,并确定使用数据的使用模式,从多个存储媒介中,确定与使用模式对应的存储媒介作为目标存储媒介,其中,多个存储媒介各自对应的访问速度不同,将使用数据存储至目标存储媒介,从而通过识别使用数据的使用模式,将其存储至不同存储层级中,以实现访问性能与存储容量上的平衡。To sum up, the data storage method, device, electronic device, and storage medium provided by the embodiments of the present application acquire the usage data of the program run by the electronic device, determine the usage mode of the usage data, and determine from multiple storage media The storage medium corresponding to the usage pattern is used as the target storage medium, where multiple storage media have different corresponding access speeds, and the usage data is stored in the target storage medium, so that by identifying the usage pattern of the usage data, it is stored in different storage levels In order to achieve a balance between access performance and storage capacity.

最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不驱使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still Modifications are made to the technical solutions described in the foregoing embodiments, or equivalent replacements are made to some of the technical features; and these modifications or replacements do not drive the essence of the corresponding technical solutions away from the spirit and scope of the technical solutions of the various embodiments of the present application.

Claims (11)

1.一种数据的存储方法,其特征在于,应用于电子设备,所述方法包括:1. A data storage method, characterized in that it is applied to electronic equipment, and the method comprises: 获取所述电子设备运行的程序的使用数据,并确定所述使用数据的使用模式;Obtain usage data of a program run by the electronic device, and determine a usage pattern of the usage data; 从多个存储媒介中,确定与所述使用模式对应的存储媒介作为目标存储媒介,其中,所述多个存储媒介各自对应的访问速度不同;From a plurality of storage media, determine a storage medium corresponding to the usage mode as a target storage medium, wherein the corresponding access speeds of the plurality of storage media are different; 将所述使用数据存储至所述目标存储媒介。storing the usage data to the target storage medium. 2.根据权利要求1所述的方法,其特征在于,所述确定所述使用数据的使用模式,包括:2. The method according to claim 1, wherein the determining the usage mode of the usage data comprises: 获取所述使用数据的量化信息,并基于所述使用数据的量化信息确定所述使用数据的使用信息;Acquiring quantitative information of the usage data, and determining usage information of the usage data based on the quantitative information of the usage data; 基于所述使用数据的量化信息和所述使用数据的使用信息,确定所述使用数据的使用模式。A usage pattern of the usage data is determined based on the quantification information of the usage data and the usage information of the usage data. 3.根据权利要求2所述的方法,其特征在于,所述获取所述使用数据的量化信息,包括:3. The method according to claim 2, wherein said acquiring the quantitative information of said usage data comprises: 确定针对所述使用数据的多个量化维度;determining a plurality of quantitative dimensions for the usage data; 获取所述使用数据在所述多个量化维度中的每个量化维度下的量化信息。Quantification information of the usage data in each quantization dimension in the plurality of quantization dimensions is acquired. 4.根据权利要求2所述的方法,其特征在于,所述基于所述使用数据的量化信息确定所述使用数据的使用信息,包括:4. The method according to claim 2, wherein the determining the usage information of the usage data based on the quantitative information of the usage data comprises: 在所述使用数据的使用过程中,记录所述使用数据的使用情况并生成分析文件,其中,所述分析文件至少包括所述使用数据的量化信息;During the use of the usage data, record the usage of the usage data and generate an analysis file, wherein the analysis file includes at least quantitative information of the usage data; 解析所述分析文件,从多个预设使用信息中确定所述使用数据的量化信息满足的预设使用信息,作为所述使用数据的使用信息。The analysis file is parsed, and the preset usage information that the quantitative information of the usage data satisfies is determined from a plurality of preset usage information as the usage information of the usage data. 5.根据权利要求1-4任一项所述的方法,其特征在于,所述从多个存储媒介中,确定与所述使用模式对应的存储媒介作为目标存储媒介,包括:5. The method according to any one of claims 1-4, wherein the determining the storage medium corresponding to the usage mode as the target storage medium from the plurality of storage mediums comprises: 获取所述使用数据对应的访问信息,其中,所述访问信息包括属于近期访问数据或者不属于近期访问数据;Acquiring access information corresponding to the usage data, wherein the access information includes recent access data or non-recent access data; 从所述多个存储媒介中,确定与所述使用模式和所述访问信息对应的存储媒介作为所述目标存储媒介。From the plurality of storage media, a storage medium corresponding to the usage pattern and the access information is determined as the target storage medium. 6.根据权利要求5所述的方法,其特征在于,所述获取所述使用数据对应的访问信息,包括:6. The method according to claim 5, wherein said obtaining the access information corresponding to said usage data comprises: 获取所述电子设备在最近的预设时长内的访问数据;Obtain the access data of the electronic device within the latest preset time period; 基于所述电子设备在最近的预设时长内的访问数据和所述使用数据的关系,确定所述使用数据对应的访问信息。The access information corresponding to the usage data is determined based on the relationship between the access data and the usage data of the electronic device within the latest preset time period. 7.根据权利要求5所述的方法,其特征在于,所述获取所述使用数据对应的访问信息,包括:7. The method according to claim 5, wherein said obtaining the access information corresponding to said usage data comprises: 获取所述电子设备在最近的预设容量内的访问数据;Obtain the access data of the electronic device within the latest preset capacity; 基于所述电子设备在最近的预设容量内的访问数据和所述使用数据的关系,确定所述使用数据对应的访问信息。Based on the relationship between the access data of the electronic device within the latest preset capacity and the use data, the access information corresponding to the use data is determined. 8.根据权利要求1-4任一项所述的方法,其特征在于,所述从多个存储媒介中,确定与所述使用模式对应的存储媒介作为目标存储媒介,包括:8. The method according to any one of claims 1-4, wherein the determining the storage medium corresponding to the usage mode as the target storage medium from among multiple storage media comprises: 获取所述使用数据与前台操作的关联关系,其中,所述关联关系包括相关联或者无关联;Obtain the association relationship between the usage data and the foreground operation, wherein the association relationship includes association or non-association; 从所述多个存储媒介中,确定与所述使用模式和所述关联关系对应的存储媒介作为所述目标存储媒介。From the plurality of storage media, determine a storage medium corresponding to the usage mode and the association relationship as the target storage medium. 9.一种数据的存储装置,其特征在于,应用于电子设备,所述装置包括:9. A data storage device, characterized in that it is applied to electronic equipment, and the device comprises: 使用模式确定模块,用于获取所述电子设备运行的程序的使用数据,并确定所述使用数据的使用模式;A usage pattern determination module, configured to acquire usage data of programs run by the electronic device, and determine a usage pattern of the usage data; 目标存储媒介确定模块,用于从多个存储媒介中,确定与所述使用模式对应的存储媒介作为目标存储媒介,其中,所述多个存储媒介各自对应的访问速度不同;A target storage medium determining module, configured to determine a storage medium corresponding to the usage mode as a target storage medium from a plurality of storage media, wherein the corresponding access speeds of the plurality of storage media are different; 数据存储模块,用于将所述使用数据存储至所述目标存储媒介。A data storage module, configured to store the usage data in the target storage medium. 10.一种电子设备,其特征在于,包括存储器和处理器,所述存储器耦接到所述处理器,所述存储器存储指令,当所述指令由所述处理器执行时所述处理器执行如权利要求1-8任一项所述的方法。10. An electronic device, comprising a memory and a processor, the memory is coupled to the processor, the memory stores instructions, and when the instructions are executed by the processor, the processor executes The method according to any one of claims 1-8. 11.一种计算机可读取存储介质,其特征在于,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行如权利要求1-8任一项所述的方法。11. A computer-readable storage medium, wherein a program code is stored in the computer-readable storage medium, and the program code can be invoked by a processor to execute as described in any one of claims 1-8 Methods.
CN202210993479.8A 2022-08-18 2022-08-18 Data storage method and device, electronic equipment and storage medium Pending CN115421650A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210993479.8A CN115421650A (en) 2022-08-18 2022-08-18 Data storage method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210993479.8A CN115421650A (en) 2022-08-18 2022-08-18 Data storage method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115421650A true CN115421650A (en) 2022-12-02

Family

ID=84198526

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210993479.8A Pending CN115421650A (en) 2022-08-18 2022-08-18 Data storage method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115421650A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160077747A1 (en) * 2014-09-11 2016-03-17 Dell Products, Lp Efficient combination of storage devices for maintaining metadata
CN106155929A (en) * 2015-04-17 2016-11-23 伊姆西公司 Data storage management system and method
CN108829344A (en) * 2018-05-24 2018-11-16 北京百度网讯科技有限公司 Data storage method, device and storage medium
CN109496292A (en) * 2018-10-16 2019-03-19 深圳市锐明技术股份有限公司 Disk management method, disk management device and electronic device
US20190347027A1 (en) * 2018-05-14 2019-11-14 Microsoft Technology Licensing, Llc Pinning in a multi-tiered system
CN112988044A (en) * 2019-12-17 2021-06-18 爱思开海力士有限公司 Memory system and data processing system including the same
CN113703680A (en) * 2021-08-24 2021-11-26 浙江大华存储科技有限公司 Data management method and device, storage medium and electronic device
CN114327273A (en) * 2021-12-28 2022-04-12 浙江大华技术股份有限公司 Data storage method and device, storage medium and electronic device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160077747A1 (en) * 2014-09-11 2016-03-17 Dell Products, Lp Efficient combination of storage devices for maintaining metadata
CN106155929A (en) * 2015-04-17 2016-11-23 伊姆西公司 Data storage management system and method
US20190347027A1 (en) * 2018-05-14 2019-11-14 Microsoft Technology Licensing, Llc Pinning in a multi-tiered system
CN108829344A (en) * 2018-05-24 2018-11-16 北京百度网讯科技有限公司 Data storage method, device and storage medium
CN109496292A (en) * 2018-10-16 2019-03-19 深圳市锐明技术股份有限公司 Disk management method, disk management device and electronic device
CN112988044A (en) * 2019-12-17 2021-06-18 爱思开海力士有限公司 Memory system and data processing system including the same
CN113703680A (en) * 2021-08-24 2021-11-26 浙江大华存储科技有限公司 Data management method and device, storage medium and electronic device
CN114327273A (en) * 2021-12-28 2022-04-12 浙江大华技术股份有限公司 Data storage method and device, storage medium and electronic device

Similar Documents

Publication Publication Date Title
CN109756230B (en) Data compression storage method, data compression method, device, equipment and medium
WO2022062537A1 (en) Data compression method and apparatus, and computer-readable storage medium
CN109343902B (en) Operation method, device, terminal and storage medium of audio processing component
CN110765031B (en) Data storage method, device, mobile terminal and storage medium
CN111459682B (en) Frequency adjustment method, device, electronic device and storage medium
CN111309267B (en) Storage space allocation method and device, storage equipment and storage medium
WO2021093365A1 (en) Gpu video memory management control method and related device
WO2020063008A1 (en) Resource configuration method and apparatus, terminal, and storage medium
CN106095417A (en) A kind of prospect Application Program Interface refresh synchronization method and system
CN111258557A (en) Code processing method, apparatus, electronic device and computer readable medium
CN110599581B (en) Image model data processing method and device and electronic equipment
CN111124282A (en) Storage method, storage device and storage equipment in object storage system
CN111400052A (en) Decompression method, device, electronic device and storage medium
WO2021087981A1 (en) Tag data update method and apparatus, electronic device, and storage medium
CN105320669A (en) Method and device for data storage and method and device for data reading
CN110222046B (en) List data processing method, device, server and storage medium
CN114817160A (en) File decompression method, apparatus, electronic device, and computer-readable storage medium
WO2019227633A1 (en) Methods and apparatuses for establishing user profile and establishing state information analysis model
CN115421650A (en) Data storage method and device, electronic equipment and storage medium
WO2021077263A1 (en) Power consumption log processing method and apparatus, electronic device, and storage medium
WO2021087970A1 (en) Method and apparatus for updating tag data, electronic device, and storage medium
CN110727405A (en) Data processing method and device, electronic equipment and computer readable medium
CN114647411B (en) Programming interface loading method, device, electronic device and storage medium
CN118971892A (en) Data processing method, device, computer equipment and storage medium
CN113849195B (en) Application loading method, device, storage medium and terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载