CN112199050A - Storage method, device, storage medium and terminal equipment - Google Patents

Storage method, device, storage medium and terminal equipment Download PDF

Info

Publication number
CN112199050A
CN112199050A CN202011141689.1A CN202011141689A CN112199050A CN 112199050 A CN112199050 A CN 112199050A CN 202011141689 A CN202011141689 A CN 202011141689A CN 112199050 A CN112199050 A CN 112199050A
Authority
CN
China
Prior art keywords
storage
data
domain
stored
domains
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
CN202011141689.1A
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.)
TCL Communication Ningbo Ltd
Original Assignee
TCL Communication Ningbo 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 TCL Communication Ningbo Ltd filed Critical TCL Communication Ningbo Ltd
Priority to CN202011141689.1A priority Critical patent/CN112199050A/en
Publication of CN112199050A publication Critical patent/CN112199050A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/0608Saving storage space on storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/0629Configuration or reconfiguration of storage systems
    • G06F3/0631Configuration or reconfiguration of storage systems by allocating resources to storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/0662Virtualisation aspects
    • G06F3/0664Virtualisation aspects at device level, e.g. emulation of a storage device or system

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 storage method, a storage device, a storage medium and a terminal device, wherein the storage method is applied to the terminal device and comprises the following steps: acquiring a storage instruction, wherein the storage instruction carries the data volume of data to be stored; acquiring the residual storage capacity of each storage domain in all storage domains of the terminal equipment; if no single storage domain with the residual storage capacity not less than the data volume of the data to be stored exists in all the storage domains, generating a virtual storage domain according to the residual storage capacity of each storage domain and the data volume of the data to be stored; and storing the data to be stored to the virtual storage domain. According to the method and the device, the virtual storage domains for storage are generated, so that the residual small storage amount in each storage domain is fully utilized, the storage capacity of the storage domain is not wasted, and the utilization rate of the storage domain is improved.

Description

Storage method, device, storage medium and terminal equipment
Technical Field
The invention relates to the technical field of storage, in particular to a storage method, a storage device, a storage medium and terminal equipment.
Background
At present, one of the most common functions of a terminal device is a storage function. The user can store the content, such as pictures, videos and the like, which the user wants to store, into the storage field of the terminal storage module. Generally, a terminal storage module includes a plurality of storage domains, and the storage capacity of each storage domain is fixed, so that after a certain amount of content is stored in a storage domain, a situation that the remaining storage capacity cannot store other content may occur, thereby causing the storage capacity of the storage domain to be wasted, reducing the utilization rate of the storage domain, and affecting the storage of a user.
Disclosure of Invention
The invention provides a storage method, a storage device, a storage medium and a terminal device, and aims to solve the technical problems that the storage capacity of a storage domain is wasted and the utilization rate of the storage domain is reduced in the existing storage method.
The technical scheme provided by the application is as follows:
the application provides a storage method, which is applied to terminal equipment and comprises the following steps:
acquiring a storage instruction, wherein the storage instruction carries the data volume of data to be stored;
acquiring the residual memory space of each memory domain in all memory domains of the terminal equipment;
if a single storage domain with the residual storage capacity not smaller than the data volume of the data to be stored does not exist in all the storage domains, generating a virtual storage domain according to the residual storage capacity of each storage domain and the data volume of the data to be stored;
and storing the data to be stored to the virtual storage domain.
In the storage method provided by the present application, the generating a virtual storage domain according to the remaining storage amount of each storage domain and the data amount of the data to be stored specifically includes:
determining the storage domain with the residual storage capacity smaller than a preset value and larger than zero in each storage domain as a storage domain to be selected;
and generating a virtual storage domain according to the storage domain to be selected and the data volume of the data to be stored.
In the storage method provided by the present application, the generating a virtual storage domain according to the to-be-selected storage domain and the data size of the to-be-stored data specifically includes:
selecting a plurality of storage domains to be selected as target storage domains according to the data volume of the data to be stored;
and generating a virtual storage domain according to the target storage domains.
In the storage method provided by the present application, the selecting a plurality of storage domains to be selected as target storage domains according to the data size of the data to be stored specifically includes:
combining the storage domains to be selected to obtain a plurality of target combinations;
calculating the remaining total storage capacity of each target combination;
and taking a plurality of storage domains to be selected in a target combination with the residual total storage capacity larger than the data volume of the data to be stored and closest to the data volume of the data to be stored as target storage domains.
In the storage method provided by the present application, after the generating the virtual storage domain according to the plurality of target storage domains, the method further includes:
marking the storage states of the plurality of target storage domains as occupied.
In the storage method provided by the present application, after storing the data to be stored in the virtual storage domain, the method further includes:
acquiring a release instruction, wherein the release instruction is used for indicating that the data to be stored is taken out of the virtual storage domain;
and when the data to be stored is taken out of the virtual storage domain, deleting the virtual storage domain, and marking the storage states of the target storage domains as unoccupied.
The application also provides a storage device, which is applied to the terminal equipment and comprises:
the first acquisition module is used for acquiring a storage instruction, and the storage instruction carries the data volume of the data to be stored;
the second acquisition module is used for acquiring the residual memory space of each memory domain in all memory domains of the terminal equipment;
a generating module, configured to generate a virtual storage domain according to the remaining storage amount of each storage domain and the data amount of the data to be stored if there is no single storage domain in all the storage domains in which the remaining storage amount is not less than the data amount of the data to be stored;
and the storage module is used for storing the data to be stored to the virtual storage domain.
In the storage device provided by the present application, the generating module is specifically configured to:
determining the storage domain with the residual storage capacity smaller than a preset value and larger than zero in each storage domain as a storage domain to be selected;
and generating a virtual storage domain according to the storage domain to be selected and the data volume of the data to be stored.
In the storage device provided by the present application, the generating module is specifically configured to:
selecting a plurality of storage domains to be selected as target storage domains according to the data volume of the data to be stored;
and generating a virtual storage domain according to the target storage domains.
In the storage device provided by the present application, the generating module is specifically configured to:
combining the storage domains to be selected to obtain a plurality of target combinations;
calculating the remaining total storage capacity of each target combination;
and taking a plurality of storage domains to be selected in a target combination with the residual total storage capacity larger than the data volume of the data to be stored and closest to the data volume of the data to be stored as target storage domains.
In the storage apparatus provided by the present application, the storage apparatus further includes a state marking module, configured to mark the storage states of the plurality of target storage domains as occupied after the generating module generates the virtual storage domain according to the plurality of target storage domains.
In the storage device provided by the present application, the state marking module is further configured to:
after the storage module stores the data to be stored in the virtual storage domain, a release instruction is obtained, wherein the release instruction is used for indicating that the data to be stored is taken out of the virtual storage domain;
and when the data to be stored is taken out of the virtual storage domain, deleting the virtual storage domain, and marking the storage states of the target storage domains as unoccupied.
The present application also provides a computer readable storage medium having stored therein a plurality of instructions adapted to be loaded by a processor to perform the storage method of any of the above.
The application also provides a terminal device, which comprises a processor and a memory, wherein the processor is electrically connected with the memory, the memory is used for storing instructions and data, and the processor is used for executing the steps in the storage method.
The beneficial effect of this application does: the application discloses a storage method, a storage device, a storage medium and a terminal device, wherein a virtual storage domain for storage is generated, so that the residual small storage amount in each storage domain is fully utilized, the storage capacity of the storage domain is not wasted, and the utilization rate of the storage domain is improved.
Drawings
The technical solution and other advantages of the present invention will become apparent from the following detailed description of specific embodiments of the present invention, which is to be read in connection with the accompanying drawings.
Fig. 1 is a schematic flow chart of a storage method according to an embodiment of the present application.
Fig. 2 is a schematic structural diagram of a memory domain provided in an embodiment of the present application.
Fig. 3 is a schematic structural diagram of a memory device according to an embodiment of the present application.
Fig. 4 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Fig. 5 is another schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. In the drawings, elements having similar structures are denoted by the same reference numerals. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it is to be understood that the terms "first", "second" and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, features defined as "first", "second", may explicitly or implicitly include one or more of the described features. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
The embodiment of the application provides a storage method, a storage device, a storage medium and terminal equipment.
Referring to fig. 1, fig. 1 is a schematic flowchart of a storage method provided in an embodiment of the present application, where the storage method is applied to a terminal device, where the terminal device may be any intelligent electronic device with a mobile communication function, such as a smart phone, a tablet computer, and a smart watch. As shown in fig. 1, the storage method provided in this embodiment mainly includes steps S101 to S104, which are described as follows:
step S101: and acquiring a storage instruction, wherein the storage instruction carries the data volume of the data to be stored.
At present, with the increasing powerful functions of a terminal, people need to store more and more things in a terminal device, such as photos, videos, application software, files and the like, and generally, the terminal stores the data into a storage domain of a terminal storage module, however, since the storage amount of each storage domain is certain, for example, the storage amount of each storage domain is 2MB, and after one picture of 1.5MB is stored in each storage domain, the remaining storage amount is 0.5MB, the remaining storage amount may not be able to store other contents completely, such as the above-mentioned picture of 1.5MB, so that the remaining storage amount cannot be utilized, the storage capacity of the storage domain is wasted, and the utilization rate of the storage domain is further reduced, which affects the storage of a user.
Specifically, when a user saves a picture, a video, a file or downloads a software application, the terminal generates a storage instruction and automatically obtains the data size of the data to be stored, for example, when the user views the picture, the size of the picture, for example, 56KB, is displayed in the attribute information of the picture, and when the user clicks the save button, the terminal generates the storage instruction and automatically obtains the size of the picture, that is, the data size of the picture, 56 KB.
Step S102: and acquiring the residual storage capacity of each storage domain in all storage domains of the terminal equipment.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a storage domain provided in the present embodiment, and it is assumed that a terminal device includes three storage domains A, B, C, where in a storage domain a, a1 part is occupied storage space, and a2 part is remaining storage space; in the storage domain B, the part B1 is occupied storage space, and the part B2 is residual storage space; in the storage domain C, the part C1 is occupied storage space, and the part C2 is the remaining storage space. The remaining storage amount of each storage domain in all the storage domains of the terminal device, i.e., the storage amounts of a2, B2, and C2, are acquired.
Step S103: and if no single storage domain with the residual storage capacity not less than the data volume of the data to be stored exists in all the storage domains, generating a virtual storage domain according to the residual storage capacity of each storage domain and the data volume of the data to be stored.
Specifically, in the storage process, in order to ensure the integrity of the data to be stored, one data to be stored (e.g., a picture) can only be stored in one storage domain, i.e., cannot be divided, and the data to be stored is also prevented from being damaged, so that if there is no single storage domain with a remaining storage amount not less than the data amount of the data to be stored in all the storage domains, the terminal cannot store the data to be stored, which brings inconvenience to a user.
In some embodiments, the step "generating a virtual storage domain according to the remaining storage amount of each storage domain and the data amount of the data to be stored" mainly includes: determining the storage domain with the residual storage capacity smaller than a preset value and larger than zero in each storage domain as a storage domain to be selected; and generating a virtual storage domain according to the storage domain to be selected and the data volume of the data to be stored.
Specifically, the preset value is a value indicating that the remaining storage amount of the storage domain is small enough, because if the remaining storage amount of a certain storage domain is only smaller than the data amount of the data 1 to be stored, and actually, the data amount of the data 1 to be stored is large, if the storage domain is used as a target storage domain in a subsequent step to generate a virtual storage domain, which causes the storage domain to be occupied, when there is data 2 to be stored whose data amount is smaller than the remaining storage amount of the storage domain, the data 2 to be stored cannot be directly stored in the storage domain, and the virtual storage domain needs to be continuously generated, thereby increasing the power consumption of the mobile terminal.
In some embodiments, the step "generating a virtual storage domain according to the storage domain to be selected and the data amount of the data to be stored" may mainly include: selecting a plurality of storage domains to be selected as target storage domains according to the data volume of the data to be stored; and generating a virtual storage domain according to the plurality of target storage domains.
It is easy to understand that, according to the remaining storage amounts of the plurality of storage domains to be selected, a storage domain whose combined storage amount is greater than the data amount of the data to be stored is selected to generate the virtual storage domain, i.e. the data to be stored can be stored in the virtual storage domain.
In order to further improve the utilization rate of the storage amount in the storage area, the step "selecting a plurality of storage areas to be selected as target storage areas according to the data amount of the data to be stored" may specifically include: combining a plurality of storage domains to be selected to obtain a plurality of target combinations; calculating the remaining total storage capacity of each target combination; and taking a plurality of storage domains to be selected in the target combination with the residual total storage capacity larger than the data quantity of the data to be stored and closest to the data quantity of the data to be stored as target storage domains.
As shown in fig. 2, if the storage amounts of the remaining storage spaces a2, B2, and C2 of the storage domain A, B, C are all smaller than the preset value, A, B, C are combined to obtain four target combinations: { A, B }, { A, C }, { B, C }, and { A, B, C }, the remaining total storage amounts of the four combinations are calculated, for example, if the remaining total storage amount of { A, B } is 1.1MB, the remaining total storage amount of { A, C } is 1.3KB, the remaining total storage amount of { B, C } is 1.4MB, the remaining total storage amount of { A, B, C } is 1.9MB, and the data amount of data to be stored is 1.26MB, the storage domain a and the storage domain C in the target combination { A, C } are taken as target storage domains.
Further, the step "generating a virtual storage domain according to a plurality of target storage domains" specifically includes: and combining the residual storage spaces of the target storage domains to generate a complete virtual storage domain.
Specifically, the total storage amount of the complete virtual storage domain is the sum of the storage amounts of the remaining storage spaces of the target storage domains.
Step S104: and storing the data to be stored to the virtual storage domain.
It is easy to understand that the remaining total storage amount of the virtual storage domain is greater than the data amount of the data to be stored, so that the data to be stored can be stored in the virtual storage domain for storage, thereby improving the storage capacity of the storage domain without waste and improving the utilization rate of the storage domain.
In some embodiments, after the step "generating a virtual storage domain from a plurality of target storage domains", the method further comprises: the storage states of the plurality of target storage domains are marked as occupied.
Specifically, after the remaining storage space of the target storage domain is used to generate the virtual storage domain, the remaining storage space of the target storage domain may be considered to be occupied.
In some embodiments, after the step of "storing the data to be stored in the virtual storage domain", the method may further include: acquiring a release instruction, wherein the release instruction is used for indicating that the data to be stored is taken out of the virtual storage domain; and when the data to be stored is taken out of the virtual storage domain, deleting the virtual storage domain, and marking the storage states of the target storage domains as unoccupied.
Specifically, when the user deletes the storage content in the virtual storage domain, a release instruction is generated. When the storage content in the virtual storage domain is deleted, that is, when the storage content is taken out of the storage domain, the virtual storage domain is deleted, so that a part of storage space of a plurality of target storage domains forming the virtual storage domain is released, and after the part of storage space is released, if other content to be stored exists, the part of storage space can be used for continuously generating the virtual storage space and storing the other content to be stored.
As can be seen from the above, the storage method provided in this embodiment is applied to a terminal device, and by obtaining a storage instruction, where the storage instruction carries a data volume of data to be stored, and obtains a remaining storage amount of each storage domain in all storage domains of the terminal device, if there is no single storage domain whose remaining storage amount is not less than the data volume of the data to be stored in all storage domains, a virtual storage domain is generated according to the remaining storage amount of each storage domain and the data volume of the data to be stored, and then the data to be stored is stored in the virtual storage domain, so that a remaining smaller storage amount in each storage domain is fully utilized, thereby preventing a storage capacity of the storage domain from being wasted, and improving a utilization rate of the storage domain.
According to the method described in the above embodiments, this embodiment will be further described from the perspective of a storage device, which may be specifically implemented as an independent entity or integrated in a terminal device.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a storage device according to an embodiment of the present application, where the storage device 10 includes a first obtaining module 11, a second obtaining module 12, a generating module 13, and a storage module 14, and the description is as follows:
(1) first acquisition module 11
The first obtaining module 11 is configured to obtain a storage instruction, where the storage instruction carries a data size of data to be stored.
(2) Second acquisition module 12
And a second obtaining module 12, configured to obtain the remaining storage amount of each storage domain in all storage domains of the terminal device.
(3) Generating module 13
And a generating module 13, configured to generate a virtual storage domain according to the remaining storage amount of each storage domain and the data amount of the data to be stored, if there is no single storage domain whose remaining storage amount is not less than the data amount of the data to be stored in all the storage domains.
The generating module 13 may specifically be configured to: determining the storage domain with the residual storage capacity smaller than a preset value and larger than zero in each storage domain as a storage domain to be selected; and generating a virtual storage domain according to the storage domain to be selected and the data volume of the data to be stored.
In this embodiment, the generating module 13 may specifically be configured to: selecting a plurality of storage domains to be selected as target storage domains according to the data volume of the data to be stored; and generating a virtual storage domain according to the plurality of target storage domains.
Further, the generating module 13 may specifically be configured to: combining a plurality of storage domains to be selected to obtain a plurality of target combinations; calculating the residual total storage capacity of each target combination; and taking a plurality of storage domains to be selected in the target combination with the residual total storage capacity larger than the data quantity of the data to be stored and closest to the data quantity of the data to be stored as target storage domains.
(4) Memory module 14
And the storage module 14 is used for storing the data to be stored to the virtual storage domain.
Specifically, in the storage apparatus 10 provided by the present application, a status marking module may be further included, configured to mark the storage statuses of the plurality of target storage domains as occupied after the generating module generates the virtual storage domain according to the plurality of target storage domains.
In some embodiments, the status marking module is further to: after the storage module 14 stores the data to be stored in the virtual storage domain, a release instruction is obtained, where the release instruction is used to instruct to take out the data to be stored from the virtual storage domain; and when the data to be stored is taken out of the virtual storage domain, deleting the virtual storage domain, and marking the storage states of the target storage domains as unoccupied.
As can be seen from the above description, the storage apparatus 10 provided in this embodiment is applied to a terminal device, and acquires a storage instruction through the first acquiring module 11, where the storage instruction carries a data amount of data to be stored, then acquires the remaining storage amount of each storage domain in all storage domains of the terminal device through the second acquiring module 12, if there is no single storage domain whose remaining storage amount is not less than the data amount of the data to be stored in all storage domains, the generating module 13 generates a virtual storage domain according to the remaining storage amount of each storage domain and the data amount of the data to be stored, then stores the data to be stored in the virtual storage domain through the storage module 14, so that the remaining smaller storage amount in each storage domain is fully utilized, thereby the storage capacity of the storage domain is not wasted, and the utilization rate of the storage domain is improved.
In addition, the embodiment of the application further provides a terminal device, and the terminal device can be a smart phone, a tablet computer and other devices. As shown in fig. 4, the terminal device 500 includes a processor 501 and a memory 502. The processor 501 is electrically connected to the memory 502.
The processor 501 is a control center of the terminal device 500, connects various parts of the entire terminal device by using various interfaces and lines, and executes various functions of the terminal device and processes data by running or loading an application program stored in the memory 502 and calling data stored in the memory 502, thereby performing overall monitoring of the terminal device.
In this embodiment, the processor 501 in the terminal device 500 loads instructions corresponding to processes of one or more application programs into the memory 502 according to the following steps, and the processor 501 runs the application programs stored in the memory 502, thereby implementing various functions:
acquiring a storage instruction, wherein the storage instruction carries the data volume of data to be stored;
acquiring the residual storage capacity of each storage domain in all storage domains of the terminal equipment;
if no single storage domain with the residual storage capacity not less than the data volume of the data to be stored exists in all the storage domains, generating a virtual storage domain according to the residual storage capacity of each storage domain and the data volume of the data to be stored;
and storing the data to be stored to the virtual storage domain.
Fig. 5 shows a specific structural block diagram of a terminal device provided in an embodiment of the present application, where the terminal device may be used to implement the storage method provided in the foregoing embodiment. The terminal device 300 may be a smart phone or a tablet computer.
The RF circuit 310 is used for receiving and transmitting electromagnetic waves, and performs interconversion between the electromagnetic waves and electrical signals, thereby communicating with a communication network or other devices. RF circuitry 310 may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and so forth. RF circuit 310 may communicate with various networks such as the internet, an intranet, a wireless network, or with other devices over a wireless network. The wireless network may comprise a cellular telephone network, a wireless local area network, or a metropolitan area network. The wireless network may use various communication standards, protocols and technologies, including but not limited to global system for mobile communication (GSM), enhanced mobile communication (EDGE), Wideband Code Division Multiple Access (WCDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), wireless fidelity (Wi-Fi) (such as ieee802.11a, ieee802.11b, ieee802.11g and/or ieee802.11n), voice over internet protocol (VoIP), microwave access (world interoperability for microwave), other suitable protocols for short message communication (Wi-Max), and any other suitable instant messaging protocols, including those currently developed.
The memory 320 may be used for storing software programs and modules, such as the storage methods and corresponding program instructions/modules in the above embodiments, and the processor 380 executes various functional applications and data processing, i.e., implements the communication data saving function, by running the software programs and modules stored in the memory 320. The memory 320 may include high speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 320 may further include memory located remotely from processor 380, which may be connected to terminal device 300 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input unit 330 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, the input unit 330 may include a touch-sensitive surface 331 as well as other input devices 332. The touch-sensitive surface 331, also referred to as a touch screen or touch pad, may collect touch operations by a user on or near the touch-sensitive surface 331 (e.g., operations by a user on or near the touch-sensitive surface 331 using a finger, a stylus, or any other suitable object or attachment), and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface 331 may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 380, and can receive and execute commands sent by the processor 380. In addition, the touch-sensitive surface 331 may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. The input unit 330 may comprise other input devices 332 in addition to the touch sensitive surface 331. In particular, other input devices 332 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 340 may be used to display information input by or provided to the user and various graphic user interfaces of the terminal apparatus 300, which may be configured by graphics, text, icons, video, and any combination thereof. The display unit 340 may include a display panel 341, and optionally, the display panel 341 may be configured in the form of an LCD (liquid crystal display), an OLED (organic light-emitting diode), or the like. Further, touch-sensitive surface 331 may overlay display panel 341, and when touch-sensitive surface 331 detects a touch operation thereon or thereabout, communicate to processor 380 to determine the type of touch event, and processor 380 then provides a corresponding visual output on display panel 341 in accordance with the type of touch event. Although in FIG. 5, touch-sensitive surface 331 and display panel 341 are implemented as two separate components for input and output functions, in some embodiments, touch-sensitive surface 331 and display panel 341 may be integrated for input and output functions.
The terminal device 300 may also include at least one sensor 350, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 341 according to the brightness of ambient light, and a proximity sensor that may turn off the display panel 341 and/or the backlight when the terminal device 300 is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the mobile phone is stationary, and can be used for applications of recognizing the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured in the terminal device 300, detailed descriptions thereof are omitted.
Audio circuitry 360, speaker 361, microphone 362 may provide an audio interface between a user and terminal device 300. The audio circuit 360 may transmit the electrical signal converted from the received audio data to the speaker 361, and the audio signal is converted by the speaker 361 and output; on the other hand, the microphone 362 converts the collected sound signal into an electrical signal, which is received by the audio circuit 360 and converted into audio data, which is then processed by the audio data output processor 380 and then transmitted to, for example, another terminal via the RF circuit 310, or the audio data is output to the memory 320 for further processing. The audio circuit 360 may also include an earbud jack to provide communication of peripheral headphones with the terminal device 300.
The terminal device 300 may assist the user in e-mail, web browsing, streaming media access, etc. through the transmission module 370 (e.g., a Wi-Fi module), which provides the user with wireless broadband internet access. Although fig. 5 shows the transmission module 370, it is understood that it does not belong to the essential constitution of the terminal device 300, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 380 is a control center of the terminal device 300, connects various parts of the entire mobile phone using various interfaces and lines, and performs various functions of the terminal device 300 and processes data by running or executing software programs and/or modules stored in the memory 320 and calling data stored in the memory 320, thereby performing overall monitoring of the mobile phone. Optionally, processor 380 may include one or more processing cores; in some embodiments, processor 380 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 380.
Terminal device 300 also includes a power supply 390 (e.g., a battery) for powering the various components, which may be logically coupled to processor 380 via a power management system in some embodiments to manage charging, discharging, and power consumption management functions via the power management system. The power supply 190 may also include any component including one or more of a dc or ac power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown, the terminal device 300 may further include a camera (e.g., a front camera, a rear camera), a bluetooth module, and the like, which are not described in detail herein. Specifically, in this embodiment, the display unit of the terminal device is a touch screen display, the terminal device further includes a memory, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for:
acquiring a storage instruction, wherein the storage instruction carries the data volume of data to be stored;
acquiring the residual storage capacity of each storage domain in all storage domains of the terminal equipment;
if no single storage domain with the residual storage capacity not less than the data volume of the data to be stored exists in all the storage domains, generating a virtual storage domain according to the residual storage capacity of each storage domain and the data volume of the data to be stored;
and storing the data to be stored to the virtual storage domain.
In specific implementation, the above modules may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and specific implementation of the above modules may refer to the foregoing method embodiments, which are not described herein again.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor. To this end, an embodiment of the present application provides a storage medium including terminal device executable instructions. The terminal device executable instructions, when executed by a terminal device processor, perform the steps of any one of the storage methods provided by the embodiments of the present application.
Wherein the storage medium may include: a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic or optical disk, or the like.
Since the instructions stored in the storage medium can execute the steps in any storage method provided in the embodiments of the present invention, the beneficial effects that can be achieved by any storage method provided in the embodiments of the present invention can be achieved, for details, see the foregoing embodiments, and are not described herein again.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
In summary, although the present application has been described with reference to the preferred embodiments, the above-described preferred embodiments are not intended to limit the present application, and those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present application, so that the scope of the present application shall be determined by the appended claims.

Claims (10)

1. A storage method is applied to a terminal device and comprises the following steps:
acquiring a storage instruction, wherein the storage instruction carries the data volume of data to be stored;
acquiring the residual memory space of each memory domain in all memory domains of the terminal equipment;
if a single storage domain with the residual storage capacity not smaller than the data volume of the data to be stored does not exist in all the storage domains, generating a virtual storage domain according to the residual storage capacity of each storage domain and the data volume of the data to be stored;
and storing the data to be stored to the virtual storage domain.
2. The storage method according to claim 1, wherein the generating a virtual storage domain according to the remaining storage amount of each storage domain and the data amount of the data to be stored specifically includes:
determining the storage domain with the residual storage capacity smaller than a preset value and larger than zero in each storage domain as a storage domain to be selected;
and generating a virtual storage domain according to the storage domain to be selected and the data volume of the data to be stored.
3. The storage method according to claim 2, wherein the generating a virtual storage domain according to the storage domain to be selected and the data size of the data to be stored specifically includes:
selecting a plurality of storage domains to be selected as target storage domains according to the data volume of the data to be stored;
and generating a virtual storage domain according to the target storage domains.
4. The storage method according to claim 3, wherein the selecting a plurality of storage domains to be selected as target storage domains according to the data volume of the data to be stored specifically comprises:
combining the storage domains to be selected to obtain a plurality of target combinations;
calculating the remaining total storage capacity of each target combination;
and taking a plurality of storage domains to be selected in a target combination with the residual total storage capacity larger than the data volume of the data to be stored and closest to the data volume of the data to be stored as target storage domains.
5. The storage method according to claim 3, further comprising, after the generating the virtual storage domain from the plurality of target storage domains:
marking the storage states of the plurality of target storage domains as occupied.
6. The storage method according to claim 5, further comprising, after storing the data to be stored to the virtual storage domain:
acquiring a release instruction, wherein the release instruction is used for indicating that the data to be stored is taken out of the virtual storage domain;
and when the data to be stored is taken out of the virtual storage domain, deleting the virtual storage domain, and marking the storage states of the target storage domains as unoccupied.
7. A storage device is applied to a terminal device, and comprises:
the first acquisition module is used for acquiring a storage instruction, and the storage instruction carries the data volume of the data to be stored;
the second acquisition module is used for acquiring the residual memory space of each memory domain in all memory domains of the terminal equipment;
a generating module, configured to generate a virtual storage domain according to the remaining storage amount of each storage domain and the data amount of the data to be stored if there is no single storage domain in all the storage domains in which the remaining storage amount is not less than the data amount of the data to be stored;
and the storage module is used for storing the data to be stored to the virtual storage domain.
8. The storage device of claim 7, wherein the generation module is specifically configured to:
determining the storage domain with the residual storage capacity smaller than a preset value and larger than zero in each storage domain as a storage domain to be selected;
and generating a virtual storage domain according to the storage domain to be selected and the data volume of the data to be stored.
9. A computer-readable storage medium having stored thereon a plurality of instructions adapted to be loaded by a processor to perform the storage method of any one of claims 1 to 6.
10. A terminal device, comprising a processor and a memory, wherein the processor is electrically connected to the memory, the memory is used for storing instructions and data, and the processor is used for the steps in the storage method according to any one of claims 1 to 6.
CN202011141689.1A 2020-10-22 2020-10-22 Storage method, device, storage medium and terminal equipment Pending CN112199050A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011141689.1A CN112199050A (en) 2020-10-22 2020-10-22 Storage method, device, storage medium and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011141689.1A CN112199050A (en) 2020-10-22 2020-10-22 Storage method, device, storage medium and terminal equipment

Publications (1)

Publication Number Publication Date
CN112199050A true CN112199050A (en) 2021-01-08

Family

ID=74010907

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011141689.1A Pending CN112199050A (en) 2020-10-22 2020-10-22 Storage method, device, storage medium and terminal equipment

Country Status (1)

Country Link
CN (1) CN112199050A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113885795A (en) * 2021-09-23 2022-01-04 惠州Tcl移动通信有限公司 Data storage method and device, terminal equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1690946A (en) * 2004-04-22 2005-11-02 钟巨航 External memory interface switching device
US20080177692A1 (en) * 2007-01-24 2008-07-24 Microsoft Corporation Using virtual repository items for customized display
CN106708428A (en) * 2016-11-21 2017-05-24 平安科技(深圳)有限公司 Data virtual storage method and apparatus
CN107315533A (en) * 2016-04-26 2017-11-03 杭州海康威视数字技术股份有限公司 A kind of date storage method and device
CN108334288A (en) * 2017-11-29 2018-07-27 成都野望数码科技有限公司 Date storage method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1690946A (en) * 2004-04-22 2005-11-02 钟巨航 External memory interface switching device
US20080177692A1 (en) * 2007-01-24 2008-07-24 Microsoft Corporation Using virtual repository items for customized display
CN107315533A (en) * 2016-04-26 2017-11-03 杭州海康威视数字技术股份有限公司 A kind of date storage method and device
CN106708428A (en) * 2016-11-21 2017-05-24 平安科技(深圳)有限公司 Data virtual storage method and apparatus
CN108334288A (en) * 2017-11-29 2018-07-27 成都野望数码科技有限公司 Date storage method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113885795A (en) * 2021-09-23 2022-01-04 惠州Tcl移动通信有限公司 Data storage method and device, terminal equipment and storage medium
CN113885795B (en) * 2021-09-23 2024-01-19 惠州Tcl移动通信有限公司 Data storage method, device, terminal equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110752981B (en) Information control method and electronic equipment
CN108984066B (en) Application icon display method and mobile terminal
CN109714476B (en) Data processing method and device, mobile terminal and storage medium
CN109189303B (en) Text editing method and mobile terminal
CN111443803B (en) Mode switching method and device, storage medium and mobile terminal
CN105513098B (en) Image processing method and device
CN111026457B (en) Hardware configuration method and device, storage medium and terminal equipment
CN111368238A (en) Status bar adjusting method and device, mobile terminal and storage medium
CN112199050A (en) Storage method, device, storage medium and terminal equipment
CN111240451A (en) Heat dissipation method, electronic device and computer-readable storage medium
CN110851014A (en) Touch identification method and device, storage medium and terminal equipment
CN111045737A (en) Equipment identifier acquisition method and device, terminal equipment and storage medium
CN111355991B (en) Video playing method and device, storage medium and mobile terminal
CN111143580B (en) Multimedia data storage method and device, storage medium and electronic equipment
CN107346347B (en) Webpage table display method and device
CN111026488B (en) Communication data saving method, device, terminal equipment and storage medium
CN111651299A (en) Wireless chip reset control method and device, storage medium and mobile terminal
CN110618798A (en) Multi-screen display method, multi-screen device, storage medium and terminal equipment
CN111966271B (en) Screen panorama screenshot method and device, terminal equipment and storage medium
CN104866287B (en) Method and device for generating function bar
CN111245911B (en) Network transmission method and system, storage medium and terminal equipment
CN110806914B (en) Application processing method and device and electronic equipment
CN110990606B (en) Picture storage method and device, storage medium and electronic equipment
CN108616658B (en) Operation determination method and mobile terminal
CN111324763A (en) Photo preview method and system, storage medium and terminal equipment

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210108

RJ01 Rejection of invention patent application after publication