CN110941436B - Data storage method and device for application program, storage medium and terminal equipment - Google Patents

Data storage method and device for application program, storage medium and terminal equipment Download PDF

Info

Publication number
CN110941436B
CN110941436B CN201911093101.7A CN201911093101A CN110941436B CN 110941436 B CN110941436 B CN 110941436B CN 201911093101 A CN201911093101 A CN 201911093101A CN 110941436 B CN110941436 B CN 110941436B
Authority
CN
China
Prior art keywords
storage area
application program
storage
data
capacity
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.)
Active
Application number
CN201911093101.7A
Other languages
Chinese (zh)
Other versions
CN110941436A (en
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.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent Technology Co 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 Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN201911093101.7A priority Critical patent/CN110941436B/en
Publication of CN110941436A publication Critical patent/CN110941436A/en
Application granted granted Critical
Publication of CN110941436B publication Critical patent/CN110941436B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The disclosure provides a data storage method of an application program, a data storage device of the application program, a storage medium and terminal equipment, and relates to the technical field of electronic equipment. The method comprises the following steps: when an application program is installed, dividing continuous idle storage units in a storage space to obtain a storage area of the application program; and storing the data generated when the application program runs into the storage area. The data read-write of each application program can be limited in the storage area of the application program, so that data isolation among the application programs is realized, data of other application programs are prevented from being tampered and deleted, and the safety of a system and the privacy of the data are improved.

Description

Data storage method and device for application program, storage medium and terminal equipment
Technical Field
The disclosure relates to the technical field of electronic devices, and in particular relates to a data storage method of an application program, a data storage device of the application program, a computer readable storage medium and a terminal device.
Background
Currently, in terminal devices such as a computer, a smart phone, a tablet computer, etc., an application program is not restricted to read and write data on a memory. Taking Android (Android) system as an example, after an APP (Application) obtains permission to read and write memory Data (usually, when running for the first time, a user needs to grant permission), a file can be created, read and written, and deleted in a Data partition (Data partition) of the whole memory. Therefore, the data of other APP can be tampered, safety risks exist, and especially when malicious programs and rogue software are installed on the mobile phone, the system safety and the user privacy are extremely threatened.
It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the present disclosure and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The disclosure provides a data storage method of an application program, a data storage device of the application program, a computer readable storage medium and a terminal device, so as to at least improve the problem that the security risk exists in the prior art when the application program reads and writes data to a certain extent.
Other features and advantages of the present disclosure will be apparent from the following detailed description, or may be learned in part by the practice of the disclosure.
According to a first aspect of the present disclosure, there is provided a data storage method of an application program, including: when an application program is installed, dividing continuous idle storage units in a storage space to obtain a storage area of the application program; and storing the data generated when the application program runs into the storage area.
According to a second aspect of the present disclosure, there is provided a data storage device of an application program, comprising: the storage area dividing module is used for dividing continuous idle storage units in the storage space when the application program is installed so as to obtain the storage area of the application program; and the operation data storage module is used for storing the data generated when the application program runs into the storage area.
According to a third aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the data storage method of the application program described above.
According to a fourth aspect of the present disclosure, there is provided a terminal device comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the data storage method of the application program described above via execution of the executable instructions.
The technical scheme of the present disclosure has the following beneficial effects:
according to the data storage method, the data storage device, the storage medium and the terminal device of the application program, when the application program is installed, a continuous free storage unit is divided in the storage space and used as a storage area of the application program, and data generated when the application program runs is stored in the storage area. On the one hand, the data read-write of each application program can be limited in the storage area of the application program, so that the data read-write of different application programs are isolated, the data of other application programs are prevented from being tampered and deleted, and the safety of the system and the privacy of the data are improved; on the other hand, the storage area of each application program is a continuous storage unit, so that the addressing process in data reading and writing is simplified, and particularly when the data reading quantity is large, the data is not required to be searched from a plurality of addresses, and the continuously stored data is directly read out, so that the efficiency is high; on the other hand, through the data storage mode of the scheme, memory and data management can be conveniently realized, for example, the file size of each application program is counted, smaller data files are combined to carry out defragmentation and the like on the memory, and therefore the storage performance of the system is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure. It will be apparent to those of ordinary skill in the art that the drawings in the following description are merely some embodiments of the present disclosure and that other drawings may be derived from these drawings without undue effort.
FIG. 1 is a diagram illustrating a file distribution of an existing data partition;
fig. 2 is a flowchart showing a data storage method of an application program in the present exemplary embodiment;
FIG. 3 illustrates a file distribution diagram of data partitions in the present exemplary embodiment;
fig. 4 is a block diagram showing a configuration of a data storage device of an application program in the present exemplary embodiment;
fig. 5 illustrates a computer-readable storage medium for implementing the above-described method in the present exemplary embodiment;
fig. 6 shows a terminal device for implementing the above method in the present exemplary embodiment.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the present disclosure. One skilled in the relevant art will recognize, however, that the aspects of the disclosure may be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
Terminal devices typically have many applications installed therein, with data files stored in the memory space of the device. Fig. 1 shows a file distribution situation of a data partition in an android system, the data partition is composed of basic memory units Block (data blocks), each grid in the figure represents a Block, grids with different patterns represent blocks occupied by data of different APP, and non-patterned grids are idle blocks. Therefore, the data of APP1, APP2 and APP3 are discretely and alternately distributed on blocks in different areas, so that the data are messy. When running APP1, it may be necessary to read and write data from and to blocks in different areas, which is inefficient. In addition, different APP influence each other, for example, some APP maliciously delete other APP's data, or the wrong data etc. of other APP of reading and writing when some APP is unusual, the security is lower.
In view of one or more of the above problems, exemplary embodiments of the present disclosure provide a data storage method of an application program, which may be applied to a terminal device having a memory, such as a computer, a smart phone, a tablet computer, and the like. Fig. 2 shows a flow of the method, which may include the following steps S210 and S220:
in step S210, when the application is installed, a continuous free storage unit is divided into the storage space to obtain a storage area of the application.
Step S220, the data generated when the application program runs is stored in the storage area.
The storage space refers to an NVM (Non-Volatile Memory) in the Memory, which may be a ROM (Read-Only Memory), and the ROM may specifically be a hard disk in a computer, or a Non-running Memory in a smart phone. In this exemplary embodiment, the storage space mainly stores data of an application program, and thus may be a data partition of an android system, a disk specified by a Windows system, or the like, for example, a disk D is set in advance to store data of an application program, and the storage space is the disk D. The storage space is composed of a plurality of storage units, such as blocks of an android system, sectors of a Windows system, and the like. The free memory cells refer to cells in which data is not stored, and the free memory cells are consecutive, which means that addresses of the cells in the memory space are consecutive.
The storage area corresponds to a section of continuous storage unit reserved for an application program, and when the application program is run, generated data, files, and the like are stored in the storage area. It should be noted that, the storage areas of different applications should be independent and have no overlapping portions. For example, when installing APP2, even though there are a large number of consecutive free memory cells in the memory area of APP1, the memory area of APP2 should be completely set outside the memory area of APP 1. In the case of storage areas of different application programs, as shown in fig. 3, files of APP1, APP2 and APP3 are respectively located in respective storage areas (one storage area is shown in a row in the figure), and do not affect each other, when running APP1, the generated data are written into storage units of the storage areas in sequence, and when reading the data, the data are also read from the storage areas, that is, all activities can be limited in the storage areas.
In an alternative embodiment, a storage area management table may be maintained to record and update storage area information of each APP, which may include, for example, APP name, start address, end address, used condition, etc. of the storage area; in partitioning storage areas for new applications, the table may be consulted to avoid areas that have been allocated; when the application program is operated, the data of the application program and the address of the file can be determined by inquiring the table, and the data can be read and written by indexing to the corresponding address.
Based on the above description, in this exemplary embodiment, on one hand, the data read/write of each application program may be limited in the storage area of the application program, so as to isolate the data read/write of different application programs, prevent the data of other application programs from being tampered and deleted, and improve the security of the system and the privacy of the data; on the other hand, the storage area of each application program is a continuous storage unit, so that the addressing process in data reading and writing is simplified, and particularly when the data reading quantity is large, the data is not required to be searched from a plurality of addresses, and the continuously stored data is directly read out, so that the efficiency is high; on the other hand, through the data storage mode of the present exemplary embodiment, memory and data management can be very conveniently implemented, for example, the file size of each application program is counted, and smaller data files are combined to perform defragmentation and the like on the memory, so as to improve the storage performance of the system.
Two exemplary embodiments are provided below with respect to how many free memory cells are specifically divided when dividing a memory region, but the present disclosure is not limited thereto:
in the first embodiment, a storage area with a fixed size may be reserved for each application program when the application program is installed. For example, a storage area of 1GB is reserved for each APP in the android system, if 1Block is 4kb,1 gb=250,000 blocks; the data partition may be divided in advance, assuming that the necessary system data occupies 100,000 blocks, and the remaining portion of the data partition is divided into a plurality of areas: region 1 is Block 100,001 to Block350,000; region 2 is Block350, 001-Block 600,000 … … when installing APPs later, one region can be designated as a storage region for each APP in the order of the regions. The size of each memory cell is related to the system and version, and is also related to the physical parameters of the memory, and in a system of a device, the size of each memory cell is generally the same.
In the second embodiment, the capacity of the required storage area may be determined according to the application program, and a corresponding number of consecutive free storage units may be divided in the storage space. For example, when installing the video APP, a storage area for caching video data needs to be reserved, which is generally larger, for example, a capacity of 2GB is needed, and the number of storage units corresponding to 2GB, for example, 2 gb=500,000 blocks, can be calculated; and then dividing the number of continuous idle storage units in the storage space to obtain a storage area of the video APP.
Further, the capacity of the storage area required by the application program may be determined based on the statistics of the user usage data of the application program. The user usage data refers to data stored in an application program by a user, the number and the size of files, the storage capacity occupied by the application program in user equipment, and the like, and the user usage data is counted on a general computer or a smart phone. The present exemplary embodiment may obtain a big data statistics result of user usage data from a channel such as the internet or an APP store, and may include an average storage capacity and a storage capacity range occupied by the user using the APP, a storage capacity occupied by different types of users or different types of devices, and so on, for example, considering that a difference in usage habits of users may be caused by a difference in device memory size, the statistics result may be classified into several levels, including: on a mobile phone with a memory of 64GB, a user uses the average storage capacity occupied by APP; on a 128GB memory cell phone, the average memory capacity occupied by the user using the APP, and so on. According to the statistical result, the capacity of the storage area required by the application program can be calculated by combining the actual situation of the equipment, for example, the equipment is a 128GB mobile phone, and the statistical average storage capacity of the APP corresponding to the 128GB can be adopted as a result.
In order to manage the storage space more efficiently. In an alternative embodiment, after the application is installed, successive free memory locations may be removed from the tail of the memory region to reduce the capacity of the memory region when the following conditions are simultaneously met:
condition 1, in the latest preset time, the running times of the application program reach the preset times;
and 2, counting the utilization rate of the storage area in the latest preset time, wherein the change amplitude of the utilization rate is lower than the preset amplitude.
In summary, during the running of an application, if its data size is relatively stable, the storage area can be reduced appropriately if there is some remaining storage area. The latest preset time may be the latest week, the latest month, etc., and the preset times may be 3 times, 5 times, 10 times, etc., which are related to the length of the preset time. Condition 1 is to ensure that the application has a certain frequency of operation in the near future. The usage rate of the storage area may include a usage size (i.e., how much capacity is used), a usage ratio (used capacity/total capacity), etc., and the variation range of the usage rate may be the maximum value minus the minimum value of the usage rate in a preset time, or the measurement of the amplitude may be performed by an index such as a variance, which is not limited in the present disclosure; the preset amplitude can be set according to experience and actual conditions and is used for measuring whether the use ratio of the storage area is stable or not. When the variation amplitude of the usage rate is lower than the preset amplitude, the usage condition is stable. By combining the condition 1 and the condition 2, the use rate of the storage area can be presumed not to change greatly in the future use process, so that the size of the storage area can be optimally adjusted.
Because the data in the storage area is written in sequence, the storage units at the tail part of the storage area are generally free, and a certain number of free storage units can be removed from the tail part, so that more storage space is saved for other application programs to use. How many units are specifically removed, as the case may be, the present disclosure provides two specific schemes:
(1) And multiplying the current utilization rate by a certain coefficient (the coefficient is larger than 1), and removing the exceeding part as the updated storage area size. For example, the original size of the storage area is 1GB, the current usage is 500MB and is relatively stable, and the current usage can be multiplied by a factor of 1.2, i.e. the storage area of 600MB is reserved, and the 400MB area at the tail is removed to be opened to other applications.
(2) The number of memory cells removed may be determined based on the needs of other applications, and typically the removed portions may form the memory area of the other applications alone. For example, the original size of the storage area is 1GB, the current usage is 500MB and is stable, another application program needs a storage area with a size of 300MB, and then the corresponding 300MB area can be removed from the tail.
In the actual running process, there may be a situation that the storage area is insufficient, if the storage area is full, it means that all storage units are occupied, or the usage rate reaches a higher threshold (for example, 95%), etc., it can detect whether the continuous storage units after the storage area are occupied, and if not, the storage area can be extended backward, that is, the storage area is enlarged. In general, fewer unoccupied conditions are present, and are typically occupied by other applications, based on which, in an alternative embodiment, the storage area may be used as a first storage area of the application, and the storage space may be further divided into consecutive free storage units, so as to obtain a second storage area of the application. A region is additionally divided at other positions corresponding to the storage space for supplementary use. The data generated when the application is run may then be stored to the second storage area. The capacity of the second storage area may be smaller than the first storage area, for example, may be half the capacity of the first storage area or 1/3 the capacity of the first storage area, etc., which may save resources, considering that in case the first storage area is already full, a larger space is not generally needed anymore.
In order to further improve the centralization of application program data, program data of an application program and operation data can be put together, wherein the program data refers to data generated by installing the application program, including code, variable, chart and other data required by program operation, and the operation data is data generated in the operation process, including user data, locally stored temporary data and the like. Specifically, in an alternative embodiment, the capacity of the storage area divided in step S210 may be greater than the storage capacity required for installing the application program; thus, after the storage area is obtained, the application program can be installed to the storage area.
The capacity of the storage area may be the storage capacity required for installation plus the estimated storage capacity required for operation, for example, the capacity required for installation of APP1 is 500MB, and the estimated storage capacity during operation is 1GB, and the storage area may be 1.5GB. The application program is installed in the storage area, data generated during subsequent operation is also stored in the storage area, and the intercommunication of the two parts of data can be better realized, for example, initial setting data is generated during the installation of the application program, and a user can modify the setting during the subsequent operation, so that the initial setting data is read and written, thereby realizing the data reading and writing more conveniently and being easier to manage.
The exemplary embodiments of the present disclosure also provide a data storage device for an application program, which may be configured in a terminal device with a memory, such as a computer, a smart phone, a tablet computer, and the like. As shown in fig. 4, the data storage device 400 may include:
a storage area dividing module 410, configured to divide a continuous free storage unit in a storage space to obtain a storage area of an application program when the application program is installed;
the operation data storage module 420 is configured to store data generated when the application program is operated in the storage area.
In an alternative embodiment, the storage area dividing module 410 may be configured to determine the capacity of the storage area required according to the application program, and divide a corresponding number of consecutive free storage units in the storage space.
In an alternative embodiment, the storage area dividing module 410 may determine the capacity of the storage area required by the application by performing the following steps:
the capacity of the storage area required by the application is determined based on statistics of the user usage data of the application.
In an alternative embodiment, the data storage device 400 may further include: a storage area update module for removing consecutive free storage units from the tail of the storage area to reduce the capacity of the storage area when the following conditions are simultaneously satisfied after the application is installed:
condition 1, in the latest preset time, the running times of the application program reach the preset times;
and 2, counting the utilization rate of the storage area in the latest preset time, wherein the change amplitude of the utilization rate is lower than the preset amplitude.
In an alternative embodiment, the storage area dividing module 410 may be further configured to use the storage area as the first storage area of the application program when the storage area is full, and further divide a continuous free storage unit in the storage space to obtain the second storage area of the application program; a run data storage module 420 that can subsequently store data generated when the application is run into the second storage area; wherein the capacity of the second storage area may be smaller than the first storage area.
In an alternative embodiment, the capacity of the storage area may be greater than the storage capacity required for installing the application program; the data storage device 400 may further include: and the application program installation module is used for installing the application program into the storage area after the storage area is obtained.
In an alternative embodiment, the storage space may be a data partition of an android system.
The specific details of each module in the above apparatus are already described in the method section, and the details that are not disclosed can be referred to the embodiment of the method section, so that they will not be described in detail.
Those skilled in the art will appreciate that the various aspects of the present disclosure may be implemented as a system, method, or program product. Accordingly, various aspects of the disclosure may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
Exemplary embodiments of the present disclosure also provide a computer-readable storage medium having stored thereon a program product capable of implementing the method described above in the present specification. In some possible implementations, various aspects of the disclosure may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the disclosure as described in the "exemplary methods" section of this specification, when the program product is run on the terminal device.
Referring to fig. 5, a program product 500 for implementing the above-described method according to an exemplary embodiment of the present disclosure is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
The exemplary embodiment of the disclosure also provides a terminal device capable of implementing the method, which may be a computer, a smart phone, a tablet computer, etc. A terminal device 600 according to such an exemplary embodiment of the present disclosure is described below with reference to fig. 6. The terminal device 600 shown in fig. 6 is only one example, and should not impose any limitation on the functions and scope of use of the embodiments of the present disclosure.
As shown in fig. 6, the terminal device 600 may be embodied in the form of a general purpose computing device. The components of terminal device 600 may include, but are not limited to: at least one processor 610, at least one memory 620, a bus 630 connecting the various system components (including the memory 620 and the processor 610), and a display 640, the storage space being located within the memory 620.
The memory 620 stores program code that can be executed by the processor 610 to cause the processor 610 to perform steps according to various exemplary embodiments of the present disclosure described in the above section of the "exemplary methods" of the present specification. For example, the processor 610 may perform the method steps shown in fig. 2.
The memory 620 may include readable media in the form of volatile memory, such as RAM (Random Access Memory ) 621 and/or cache memory 622, and non-volatile memory, such as ROM 623.
Memory 620 may also include a program/utility 624 having a set (at least one) of program modules 625, such program modules 625 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Bus 630 may be a local bus representing one or more of several types of bus structures including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or using any of a variety of bus architectures.
The terminal device 600 may also communicate with one or more external devices 700 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the terminal device 600, and/or any device (e.g., router, modem, etc.) that enables the terminal device 600 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 650. Also, terminal device 600 can communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, for example, the Internet, via network adapter 660. As shown, network adapter 660 communicates with other modules of terminal device 600 over bus 630. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with terminal device 600, including, but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the exemplary embodiments of the present disclosure.
Furthermore, the above-described figures are only schematic illustrations of processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with exemplary embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (8)

1. A method for storing data for an application program, comprising:
when an application program is installed, determining the capacity of a required storage area according to the application program, and dividing a corresponding number of continuous idle storage units in a storage space to obtain the storage area of the application program;
storing data generated when the application program runs into the storage area;
recording storage area information of the application program in a storage area management table, wherein the storage area information of the application program comprises a name of the application program, a starting address and an end address of the storage area and the used condition of the storage area;
after installing the application, removing successive free memory cells from the tail of the memory region to reduce the capacity of the memory region when the following conditions are simultaneously satisfied:
in the latest preset time, the running times of the application program reach the preset times;
counting the utilization rate of the storage area in the latest preset time, wherein the variation amplitude of the utilization rate is lower than the preset amplitude;
wherein said removing consecutive free memory cells from the tail of said memory region comprises:
multiplying the current utilization rate of the application program by a certain coefficient to serve as the size of a storage area to be reserved, and removing the rest idle storage units; or alternatively
And removing corresponding free storage units according to the storage capacity required by other application programs, and enabling the removed free storage units to form storage areas of the other application programs.
2. The method of claim 1, wherein said determining the capacity of the required storage area from the application program comprises:
and determining the capacity of the storage area required by the application program based on the statistical result of the user usage data of the application program.
3. The method according to claim 1, wherein the method further comprises:
when the storage area is fully written, taking the storage area as a first storage area of the application program, and additionally dividing continuous idle storage units in the storage space to obtain a second storage area of the application program;
storing data generated when the application program runs into the second storage area;
wherein the capacity of the second storage area is smaller than that of the first storage area.
4. The method of claim 1, wherein the storage area has a capacity greater than a storage capacity required to install the application program; after obtaining the storage area, the method further includes:
and installing the application program to the storage area.
5. The method of any of claims 1 to 4, wherein the storage space comprises a data partition of an android system.
6. A data storage device for an application program, comprising:
the storage area dividing module is used for determining the capacity of a required storage area according to the application program when the application program is installed, and dividing a corresponding number of continuous idle storage units in the storage space to obtain the storage area of the application program;
the operation data storage module is used for storing data generated when the application program runs into the storage area;
the data storage device is further used for recording storage area information of the application program in a storage area management table, wherein the storage area information of the application program comprises a name of the application program, a starting address and an end address of the storage area and the used condition of the storage area;
the data storage device further comprises a storage area update module for removing consecutive free storage units from the tail of the storage area to reduce the capacity of the storage area when the following conditions are simultaneously satisfied after the application is installed:
in the latest preset time, the running times of the application program reach the preset times;
counting the utilization rate of the storage area in the latest preset time, wherein the variation amplitude of the utilization rate is lower than the preset amplitude;
wherein said removing consecutive free memory cells from the tail of said memory region comprises:
multiplying the current utilization rate of the application program by a certain coefficient to serve as the size of a storage area to be reserved, and removing the rest idle storage units; or alternatively
And removing corresponding free storage units according to the storage capacity required by other application programs, and enabling the removed free storage units to form storage areas of the other application programs.
7. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the method of any one of claims 1 to 5.
8. A terminal device, comprising:
a processor;
a memory for storing executable instructions of the processor; and
wherein the processor is configured to perform the method of any one of claims 1 to 5 via execution of the executable instructions.
CN201911093101.7A 2019-11-11 2019-11-11 Data storage method and device for application program, storage medium and terminal equipment Active CN110941436B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911093101.7A CN110941436B (en) 2019-11-11 2019-11-11 Data storage method and device for application program, storage medium and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911093101.7A CN110941436B (en) 2019-11-11 2019-11-11 Data storage method and device for application program, storage medium and terminal equipment

Publications (2)

Publication Number Publication Date
CN110941436A CN110941436A (en) 2020-03-31
CN110941436B true CN110941436B (en) 2023-04-21

Family

ID=69906462

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911093101.7A Active CN110941436B (en) 2019-11-11 2019-11-11 Data storage method and device for application program, storage medium and terminal equipment

Country Status (1)

Country Link
CN (1) CN110941436B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112306411B (en) * 2020-10-29 2023-08-25 西安万像电子科技有限公司 Data storage method and device, nonvolatile storage medium and processor
CN112817526B (en) * 2021-01-19 2023-04-28 杭州和利时自动化有限公司 Data storage method, device and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106227563A (en) * 2016-07-22 2016-12-14 北京奇虎科技有限公司 The data processing method of a kind of application program and relevant device
CN108334541A (en) * 2017-12-18 2018-07-27 中兴通讯股份有限公司 A kind of date storage method, device, equipment and storage medium
CA3070006A1 (en) * 2017-09-29 2019-04-04 Oracle International Corporation Method for reading data stored in a non-volatile cache using rdma
CN109656584A (en) * 2019-02-15 2019-04-19 京信通信系统(中国)有限公司 A kind of method for burn-recording and device of program
CN109933340A (en) * 2019-03-04 2019-06-25 北京空间飞行器总体设计部 A kind of spacecraft EEPROM in-orbit write-in and self checking method based on page mode
CN110413291A (en) * 2019-07-18 2019-11-05 贵阳朗玛信息技术股份有限公司 Movable storage medium and preparation method thereof

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7069305B2 (en) * 2000-06-08 2006-06-27 Hitachi, Ltd. Computer system and a data transfer method thereof using remote direct memory access
CN1992038A (en) * 2005-12-26 2007-07-04 上海乐金广电电子有限公司 Once recordable compact disk defect correcting device and method
CN106462510B (en) * 2014-03-06 2019-12-13 伊姆西公司 Multiprocessor system with independent direct access to large amounts of solid-state storage resources
CN107943650B (en) * 2017-11-21 2021-09-17 Oppo广东移动通信有限公司 Application program control method and device, storage medium and terminal
US11792307B2 (en) * 2018-03-28 2023-10-17 Apple Inc. Methods and apparatus for single entity buffer pool management
CN109472157B (en) * 2018-10-29 2022-04-19 努比亚技术有限公司 Application data storage method, mobile terminal and computer storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106227563A (en) * 2016-07-22 2016-12-14 北京奇虎科技有限公司 The data processing method of a kind of application program and relevant device
CA3070006A1 (en) * 2017-09-29 2019-04-04 Oracle International Corporation Method for reading data stored in a non-volatile cache using rdma
CN108334541A (en) * 2017-12-18 2018-07-27 中兴通讯股份有限公司 A kind of date storage method, device, equipment and storage medium
CN109656584A (en) * 2019-02-15 2019-04-19 京信通信系统(中国)有限公司 A kind of method for burn-recording and device of program
CN109933340A (en) * 2019-03-04 2019-06-25 北京空间飞行器总体设计部 A kind of spacecraft EEPROM in-orbit write-in and self checking method based on page mode
CN110413291A (en) * 2019-07-18 2019-11-05 贵阳朗玛信息技术股份有限公司 Movable storage medium and preparation method thereof

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Manish Gupta 等."Reliability-Aware Data Placement for Heterogeneous Memory Architecture".《2018 IEEE International Symposium on High Performance Computer Architecture》.2018,583-595. *
李林阳 等."海量连续运行参考站网数据云存储模型".《导航定位学报》.2014,第2卷(第3期),64-70. *

Also Published As

Publication number Publication date
CN110941436A (en) 2020-03-31

Similar Documents

Publication Publication Date Title
CN109213696B (en) Method and apparatus for cache management
CN105574141B (en) Method and device for carrying out data migration on database
KR20060129873A (en) Method for executing garbage collection of mobile terminal
CN103294604A (en) Flash memory device and electronic device employing thereof
CN103383660A (en) Method and device for realizing functions of cache partition of Android system as well as terminal equipment
CN111104063A (en) Data storage method and device, electronic equipment and storage medium
CN110941436B (en) Data storage method and device for application program, storage medium and terminal equipment
CN110688062B (en) Cache space management method and device
US11175846B2 (en) Data co-location in a hierarchical storage management (HSM) system
CN113568582B (en) Data management method, device and storage equipment
US10795579B2 (en) Methods, apparatuses, system and computer program products for reclaiming storage units
CN112667405B (en) Information processing method, device, equipment and storage medium
JP2016533588A (en) Storage processing method, apparatus and terminal
CN106156038B (en) Date storage method and device
CN105808451B (en) Data caching method and related device
CN107229421B (en) Method and device for creating video data storage system, method and device for writing file into video data storage system and method and device for reading video data storage system
CN115934002B (en) Solid state disk access method, solid state disk, storage system and cloud server
JP7431490B2 (en) Data migration in hierarchical storage management systems
CN113377278A (en) Solid state disk, garbage recycling and controlling method, equipment, system and storage medium
CN110032340A (en) A kind of data in magnetic disk management method and relevant apparatus
CN112181311B (en) Cyclic recording method, equipment and storage medium
CN111857556A (en) Method, apparatus and computer program product for managing metadata of storage objects
US11341055B2 (en) Method, electronic device, and computer program product for storage management
CN113127438B (en) Method, apparatus, server and medium for storing data
CN108694102A (en) A kind of data manipulation method, equipment, system and medium based on Nexus services

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
GR01 Patent grant
GR01 Patent grant