CN113590027A - Data storage method, data acquisition method, system, device and medium - Google Patents

Data storage method, data acquisition method, system, device and medium Download PDF

Info

Publication number
CN113590027A
CN113590027A CN202110738843.1A CN202110738843A CN113590027A CN 113590027 A CN113590027 A CN 113590027A CN 202110738843 A CN202110738843 A CN 202110738843A CN 113590027 A CN113590027 A CN 113590027A
Authority
CN
China
Prior art keywords
data
file data
storage
original file
cloud disk
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.)
Granted
Application number
CN202110738843.1A
Other languages
Chinese (zh)
Other versions
CN113590027B (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.)
Spreadtrum Semiconductor Nanjing Co Ltd
Original Assignee
Spreadtrum Semiconductor Nanjing 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 Spreadtrum Semiconductor Nanjing Co Ltd filed Critical Spreadtrum Semiconductor Nanjing Co Ltd
Priority to CN202110738843.1A priority Critical patent/CN113590027B/en
Publication of CN113590027A publication Critical patent/CN113590027A/en
Application granted granted Critical
Publication of CN113590027B publication Critical patent/CN113590027B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • G06F3/0611Improving I/O performance in relation to response time
    • 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/062Securing 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

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 invention discloses a data storage method, a data acquisition method, a system, equipment and a medium, wherein the method comprises the following steps: acquiring original file data in local storage of terminal equipment; constructing reduced file data corresponding to the original file data, wherein the data volume of the reduced file data is smaller than that of the original file data; uploading original file data to a cloud disk server, and establishing mapping relation information between the original file data in the cloud disk server and corresponding reduced file data in terminal equipment; and storing the reduced file data in a local storage, and deleting the corresponding original file data. The method and the device effectively save the space of the local disk, reduce the time cost for arranging the local file by the user, improve the visibility of the cloud disk backup and storage file to the terminal user, improve the safety of user data, improve the recovery probability of the user data after being lost accidentally, effectively improve the user experience and meet the higher storage requirement of the user.

Description

Data storage method, data acquisition method, system, device and medium
Technical Field
The present invention relates to the field of terminal device storage management technologies, and in particular, to a data storage method, a data acquisition method, a system, a device, and a medium.
Background
The mobile phone photographing function is a functional point which is very important and competitive for current mobile phone manufacturers, and the storage, management and application of the corresponding multimedia files are also the most basic functions in current intelligent local storage. However, with the development of media technology, the number of photos and recorded videos is increasing due to the upgrading of the photographing modules of various mobile phone manufacturers, and in addition, the number of media files is increasing due to the appearance of high-pixel photos, special-effect photos, 8K 60-frame videos and the like, so that the occupied storage space is increased, the problem that the storage space of the terminal storage device is often insufficient is caused, and although the storage capacity of the device is continuously increased, the insufficient storage space is still a problem to be faced. The storage space of the terminal storage device may affect the use experience of the terminal user on one hand and may affect the performance and stability of the local storage on the other hand.
In order to solve the problem of insufficient storage of the media data, a user mainly cleans a part of the media data manually according to the actual use requirement, or stores a part of the media data into a mobile storage and a cloud disk to increase the residual space of the equipment. However, the existing processing methods have the following defects:
(1) for the processing mode of clearing data: the user is faced with selection difficulties and is forced to discard a part of the data, so that the user cannot reuse the discarded data; (2) for the processing mode of moving to the mobile storage or the cloud disk storage: part of local storage can browse backed-up or stored files only by opening a cloud disk application; the user cannot visually check the cloud disk storage file in the local media management application, and this phenomenon may cause the user to gradually fade and forget this part of data, for example, part of the terminal does not support the cloud disk album page. The cloud disk storage file is not considered as a real file on a local storage and cannot be identified by the terminal media management service. For example, after uploading a local picture to a cloud disk for storage, although the file can be viewed locally through the cloud disk, the MediaProvider (media storage) of the Android system cannot store the cloud disk picture data. In addition, when the third-party application uses the local terminal media file, the file only stored in the cloud disk cannot be browsed, unless the cloud disk file is downloaded to the local storage again, for example, when the image is shared in the WeChat, the image content in the cloud disk cannot appear, and even if part of the application provides support for the mainstream cloud disk, the part of the application needs to perform additional adaptation work.
Disclosure of Invention
The invention provides a data storage method, a data acquisition method, a system, equipment and a medium, aiming at overcoming the defect that the user experience is poor due to the fact that the problem of insufficient storage space of the equipment cannot be effectively solved by a data storage mode of cleaning a part of data or storing a part of media data into a mobile storage and a cloud disk in the prior art.
The invention solves the technical problems through the following technical scheme:
the invention provides a data storage method, which is applied to terminal equipment and comprises the following steps:
acquiring original file data in a local storage of the terminal equipment;
constructing reduced file data corresponding to the original file data, wherein the data volume of the reduced file data is smaller than that of the original file data;
uploading the original file data to a cloud disk server, and establishing mapping relation information between the original file data and the corresponding reduced file data in the cloud disk server;
and storing the reduced file data in the local storage, and deleting the corresponding original file data.
Preferably, the step of constructing the reduced file data corresponding to the original file data includes:
acquiring the data type of the original file data;
establishing a corresponding reduction processing rule according to the data type;
and adopting the reduction processing rule to carry out reduction processing on the original file data so as to obtain the corresponding reduced file data.
Preferably, the data type of the original file data is consistent with the data type of the corresponding reduced file data; or the like, or, alternatively,
the file name of the original file data is consistent with or associated with the file name of the corresponding reduced file data; or the like, or, alternatively,
and the metadata information in the original file data is consistent with the metadata information in the corresponding reduced file.
Preferably, the method further comprises:
storing the mapping relation information to the terminal equipment; and/or uploading the mapping relation information to the cloud disk server; or the like, or, alternatively,
the step of storing the reduced file data in the local storage and deleting the corresponding original file data further includes:
acquiring storage path information of the original file data in the local storage;
and storing the reduced file data in the storage path information in the local storage, and deleting the original file data in the storage path information.
Preferably, the step of establishing mapping relationship information between the original file data and the corresponding reduced file data in the cloud disk server includes:
acquiring first address information of the original file data in the cloud disk server;
acquiring second address information of the reduced file data in a local database;
and establishing a mapping relation between the first address information and the second address information to acquire the mapping relation information between the original file data and the corresponding reduced file data.
Preferably, when the data type corresponds to an image, the reduction processing rule includes a compression resolution process, and the reduced file data includes a thumbnail file of a set resolution; or the like, or, alternatively,
when the data type corresponds to audio, the reduction processing rule comprises reducing code stream and/or cutting audio duration, and the reduction file data comprises audio files with set code stream and/or set duration; or the like, or, alternatively,
when the data type corresponds to a video, the reduction processing rule comprises at least one of reducing video resolution, reducing code stream and cutting and shortening video time length, and the reduction file data comprises at least one of video files for setting video resolution, setting code stream and setting video time length; or the like, or, alternatively,
when the data type corresponds to a text, the reduction processing rule comprises cutting text content, and the reduced file data comprises a text file with a set number of characters; or the like, or, alternatively,
and when the data type corresponds to a preset format file, the reduction processing rule comprises file replacement, and the reduced file data comprises an empty file with the same file name as the original file data.
Preferably, the method further comprises:
adding local version identification information corresponding to each reduced file data in a local database of the terminal equipment;
acquiring cloud disk version identification information corresponding to the original file data in a cloud disk database of the cloud disk server;
and judging whether the local version identification information is consistent with the cloud disk version identification information, if not, selecting the larger version identification information of the two version identification information as reference version identification information, and updating the data version of the lower version identification information to the reference version identification information.
Preferably, the method further comprises:
adding local synchronization version information and local latest version information corresponding to each reduced file data in a local database of the terminal equipment;
when the local synchronization version information is inconsistent with the local latest version information, sending the local latest version information to the cloud disk server so as to update the version, corresponding to the original file data, in the cloud disk server to the local latest version information; or the like, or, alternatively,
acquiring cloud disk synchronous version information and cloud disk latest version information corresponding to the original file data in a cloud disk database of the cloud disk server;
when the cloud disk synchronization version information is inconsistent with the cloud disk latest version information, the cloud disk latest version information is sent to the terminal equipment so as to update the version corresponding to the reduced file data in the local storage to the cloud disk latest version information; or the like, or, alternatively,
adding local synchronization version information and local latest version information corresponding to each reduced file data in a local database of the terminal equipment;
acquiring cloud disk synchronous version information and cloud disk latest version information corresponding to the original file data in a cloud disk database of the cloud disk server;
when the local synchronization version information is inconsistent with the local latest version information and the cloud disk synchronization version information is inconsistent with the cloud disk latest version information, receiving an input control instruction to determine reference version information, and updating the reduced file data in the local storage or the version of the original file data in the cloud disk server according to the reference version information.
Preferably, the step of constructing the reduced file data corresponding to the original file data includes:
acquiring the space storage state parameters of the local storage;
determining the data optimization storage grade of the terminal equipment based on the space storage state parameter;
constructing reduced file data corresponding to the original file data in the local storage based on the data optimization storage grade;
wherein the data-optimized storage tier is inversely related to the data volume of the reduced file data.
Preferably, the space storage state parameter includes a total storage capacity and a storage usage amount of the terminal device;
the step of determining the data optimized storage level of the terminal device based on the space storage state parameter comprises:
calculating the ratio of the storage usage to the total storage capacity;
generating the data optimized storage grade according to the ratio;
wherein the magnitude of the ratio is positively correlated with the data-optimized storage rank.
Preferably, the step of constructing the reduced file data corresponding to the original file data includes:
acquiring the use frequency corresponding to the original file data in the local storage within a set time period;
determining a data optimization storage level of the original file data based on the use frequency;
when the use frequency reaches different set thresholds, different data optimization storage levels are triggered, and the data optimization storage levels are in negative correlation with the use frequency;
constructing reduced file data corresponding to the original file data in the local storage based on the data optimization storage grade;
wherein the data-optimized storage tier is inversely related to the data volume of the reduced file data.
Preferably, before the reduction operation is performed on the original file data, or after the original file data is acquired from the cloud disk server according to the mapping relationship information, the method further includes:
acquiring the use frequency corresponding to the original file data in the local storage within a set time period;
when the use frequency is larger than a set threshold value, reserving and storing the original file data in the local storage; otherwise, constructing the reduced file data corresponding to the original file data and uploading the reduced file data to the cloud disk server.
Preferably, before the step of constructing the reduced file data corresponding to the original file data, the method further includes:
and judging whether a switch control signal is received or not, if so, executing the step of constructing the reduced file data corresponding to the original file data.
Preferably, the step of constructing the reduced file data corresponding to the original file data includes:
collecting historical operation behavior data of a user in the terminal equipment;
performing analysis processing based on the historical operation behavior data to determine user operation preference data;
and generating a user preference storage optimization rule according to the user operation preference data, and constructing reduced file data corresponding to the original file data according to the user preference storage optimization rule.
Preferably, the method further comprises:
adding attribution information of the reduced file data to the local database of the terminal device and/or other databases except the local database.
The invention also provides a data storage method, which is applied to the cloud disk server and comprises the following steps:
receiving and storing original file data which are sent by terminal equipment and correspond to reduced file data, wherein the data volume of the reduced file data is smaller than that of the original file data;
and receiving and storing mapping relation information sent by the terminal equipment, wherein the mapping relation information is used for representing the mapping relation between the original file data in the cloud disk server and the corresponding reduced file data stored by the terminal equipment.
The invention also provides a data acquisition method, which is applied to terminal equipment and is realized based on the data storage method, and the method comprises the following steps:
acquiring an access request of a local application;
when the access request correspondingly accesses the reduced file data, acquiring the corresponding reduced file data;
and when the access request corresponds to the original file data, generating and sending an original file acquisition request to a cloud disk server based on the reduced file data and the mapping relation information, and receiving the original file data which is issued by the cloud disk server according to the mapping relation information and the original file acquisition request and is matched with the reduced file data after receiving the original file acquisition request.
The invention also provides a data acquisition method, which is applied to the cloud disk server and is realized based on the data storage method, and the method comprises the following steps:
the terminal equipment generates and sends an original file acquisition request based on the reduced file data and the mapping relation information;
and acquiring the original file data matched with the reduced file data according to the mapping relation information and the original file acquisition request, and issuing the original file data to the terminal equipment.
The present invention also provides a data storage system, which is applied in a terminal device, and comprises:
the original file data acquisition module is used for acquiring original file data in the local storage of the terminal equipment;
the reduced file data construction module is used for constructing reduced file data corresponding to the original file data, and the data volume of the reduced file data is smaller than that of the original file data;
the file uploading module is used for uploading the original file data to a cloud disk server;
the mapping relation information establishing module is used for establishing mapping relation information between the original file data and the corresponding reduced file data in the cloud disk server;
and the data storage module is used for storing the reduced file data in the local storage and deleting the corresponding original file data.
Preferably, the reduced file data construction module comprises:
the data type acquisition unit is used for acquiring the data type of the original file data;
a reduction processing rule establishing unit, configured to establish a corresponding reduction processing rule according to the data type;
and the reduction processing unit is used for reducing the original file data by adopting the reduction processing rule so as to obtain the corresponding reduced file data.
Preferably, the data type of the original file data is consistent with the data type of the corresponding reduced file data; or the like, or, alternatively,
the file name of the original file data is consistent with or associated with the file name of the corresponding reduced file data; or the like, or, alternatively,
and the metadata information in the original file data is consistent with the metadata information in the corresponding reduced file.
Preferably, the data storage module is configured to store the mapping relationship information to the terminal device; and/or the file uploading module is used for uploading the mapping relation information to the cloud disk server; or the like, or, alternatively,
the data storage module is used for acquiring storage path information of the original file data in the local storage, storing the reduced file data in the storage path information in the local storage, and deleting the original file data in the storage path information.
Preferably, the mapping relationship information establishing module includes:
a first address information obtaining unit, configured to obtain first address information of the original file data in the cloud disk server;
a second address information obtaining unit, configured to obtain second address information of the reduced file data in the local database;
a mapping relationship establishing unit, configured to establish a mapping relationship between the first address information and the second address information, so as to obtain the mapping relationship information between the original file data and the corresponding reduced file data.
Preferably, when the data type corresponds to an image, the reduction processing rule includes a compression resolution process, and the reduced file data includes a thumbnail file of a set resolution; or the like, or, alternatively,
when the data type corresponds to audio, the reduction processing rule comprises reducing code stream and/or cutting audio duration, and the reduction file data comprises audio files with set code stream and/or set duration; or the like, or, alternatively,
when the data type corresponds to a video, the reduction processing rule comprises at least one of reducing video resolution, reducing code stream and cutting and shortening video time length, and the reduction file data comprises at least one of video files for setting video resolution, setting code stream and setting video time length; or the like, or, alternatively,
when the data type corresponds to a text, the reduction processing rule comprises cutting text content, and the reduced file data comprises a text file with a set number of characters; or the like, or, alternatively,
and when the data type corresponds to a preset format file, the reduction processing rule comprises file replacement, and the reduced file data comprises an empty file with the same file name as the original file data.
Preferably, the system further comprises:
a local version information acquisition module, configured to add local version identification information corresponding to each reduced file data in a local database of the terminal device;
the cloud disk version information acquisition module is used for acquiring cloud disk version identification information corresponding to the original file data in a cloud disk database of the cloud disk server;
the first judging module is used for judging whether the local version identification information is consistent with the cloud disk version identification information or not, if not, the reference version selecting module is called to select the larger version identification information of the two version identification information as the reference version identification information, and the version updating module is called to update the data version of the lower version identification information to the reference version identification information.
Preferably, the system further comprises:
a local version information acquisition module, configured to add local synchronization version information and local latest version information corresponding to each reduced file data in a local database of the terminal device;
the first judgment module is used for sending the local latest version information to the cloud disk server when the local synchronization version information is inconsistent with the local latest version information so as to update the version, corresponding to the original file data, in the cloud disk server to the local latest version information; or the like, or, alternatively,
the cloud disk version information acquisition module is used for acquiring cloud disk synchronous version information and cloud disk latest version information corresponding to the original file data in a cloud disk database of the cloud disk server;
the first judgment module is used for sending the latest version information of the cloud disk to the terminal equipment when the synchronous version information of the cloud disk is inconsistent with the latest version information of the cloud disk so as to update the version of the reduced file data in the local storage to the latest version information of the cloud disk; or the like, or, alternatively,
a local version information acquisition module, configured to add local synchronization version information and local latest version information corresponding to each reduced file data in a local database of the terminal device;
the cloud disk version information acquisition module is used for acquiring cloud disk synchronous version information and cloud disk latest version information corresponding to the original file data in a cloud disk database of the cloud disk server;
a first determining module, configured to receive an input control instruction to determine reference version information when the local synchronization version information is inconsistent with the local latest version information and the cloud disk synchronization version information is inconsistent with the cloud disk latest version information, and update the version of the reduced file data in the local storage or the version of the original file data in the cloud disk server according to the reference version information.
Preferably, the reduced file data construction module comprises:
a state parameter obtaining unit, configured to obtain the locally stored spatial storage state parameter;
an optimized storage level determining unit, configured to construct reduced file data corresponding to the original file data in the local storage based on the data optimized storage level;
the reduced file data construction unit is used for constructing reduced file data corresponding to the original file data in the local storage based on the data optimization storage grade;
wherein the data-optimized storage tier is inversely related to the data volume of the reduced file data.
Preferably, the space storage state parameter includes a total storage capacity and a storage usage amount of the terminal device;
the optimized storage grade determining unit is used for calculating the ratio of the storage usage to the total storage capacity and generating the optimized data storage grade according to the ratio;
wherein the magnitude of the ratio is positively correlated with the data-optimized storage rank.
Preferably, the reduced file data construction module comprises:
the using frequency acquiring unit is used for acquiring the using frequency corresponding to the original file data in the local storage within a set time period;
a data-optimized storage level determination unit configured to determine a data-optimized storage level of the original file data based on the usage frequency;
when the use frequency reaches different set thresholds, different data optimization storage levels are triggered, and the data optimization storage levels are in negative correlation with the use frequency;
the reduced file data construction unit is used for constructing reduced file data corresponding to the original file data in the local storage based on the data optimization storage grade;
wherein the data-optimized storage tier is inversely related to the data volume of the reduced file data.
Preferably, before the reduction operation is performed on the original file data, or after the original file data is acquired from the cloud disk server according to the mapping relationship information, the system further includes:
the using frequency obtaining module is used for obtaining the using frequency corresponding to the original file data in the local storage within a set time period;
the second judgment module is used for reserving and storing the original file data into the local storage when the using frequency is greater than a set threshold value; otherwise, constructing the reduced file data corresponding to the original file data and uploading the reduced file data to the cloud disk server.
Preferably, the system further comprises:
and the third judgment module is used for judging whether a switch control signal is received or not, and if so, the reduced file data construction module is called.
Preferably, the reduced file data construction module comprises:
the historical behavior data acquisition unit is used for acquiring historical operation behavior data of the user in the terminal equipment;
the user operation preference data unit is used for analyzing and processing the historical operation behavior data to determine user operation preference data;
the preference storage optimization rule generating unit is used for generating a user preference storage optimization rule according to the user operation preference data;
and the reduced file data construction unit is used for constructing the reduced file data corresponding to the original file data according to the user preference storage optimization rule.
Preferably, the system comprises:
adding attribution information of the reduced file data to the local database of the terminal device and/or other databases except the local database.
The invention also provides a data storage system, which is applied to the cloud disk server and comprises:
the first data receiving module is used for receiving and storing original file data which are sent by terminal equipment and correspond to reduced file data, and the data volume of the reduced file data is smaller than that of the original file data;
and the mapping relation information receiving module is used for receiving and storing the mapping relation information sent by the terminal equipment, and the mapping relation information is used for representing the mapping relation between the original file data in the cloud disk server and the corresponding reduced file data stored by the terminal equipment.
The invention also provides a data acquisition system, which is applied to terminal equipment and is realized based on the data storage system, and the system comprises:
the access request receiving module is used for receiving an access request of a local application;
a reduced file data obtaining module, configured to obtain corresponding reduced file data when the access request corresponds to access the reduced file data;
the original file acquisition request sending module is used for generating and sending an original file acquisition request to the cloud disk server based on the reduced file data and the mapping relation information when the access request correspondingly accesses the original file data;
and the second data receiving module is used for receiving the original file data matched with the reduced file data issued by the cloud disk server according to the mapping relation information and the original file acquisition request after the cloud disk server receives the original file acquisition request.
The invention also provides a data acquisition system, which is applied to a cloud disk server and is realized based on the data storage system, and the system comprises:
the original file acquisition request receiving module is used for receiving an original file acquisition request generated and sent by the terminal equipment based on the reduced file data and the mapping relation information;
and the data issuing module is used for acquiring the original file data matched with the reduced file data according to the mapping relation information and the original file acquisition request and issuing the original file data to the terminal equipment.
The invention also provides an electronic device, which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the data storage method when executing the computer program; or, implementing the data storage method; or, implementing the data acquisition method; or, the data acquisition method described above is implemented.
The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the data storage method described above; or, implementing the data storage method; or, implementing the data acquisition method; or, the data acquisition method described above is implemented.
On the basis of the common knowledge in the field, the preferred conditions can be combined randomly to obtain the preferred embodiments of the invention.
The positive progress effects of the invention are as follows:
the method comprises the steps of obtaining reduced text data (or reduced parts for short) with small quantity by reducing original file data (or original parts for short) in terminal equipment, uploading the original file data to a cloud disk server, deleting the original file data from the terminal equipment, and establishing mapping relation information between the original file data and the reduced text data to map one-to-one correspondence between the two file data; the storage method optimizes the existing data storage mode, effectively saves the space of a local disk, vacates more storage space for the terminal equipment as far as possible, improves the service performance and the operation stability of the terminal, reduces the time cost for arranging the local files by the user, improves the safety of the data of the user, improves the recovery probability of the data of the user after being lost accidentally, and effectively improves the user experience, and higher storage requirements of users are met.
Drawings
Fig. 1 is a flowchart of a data storage method according to embodiment 1 of the present invention.
Fig. 2 is a first flowchart of a data storage method according to embodiment 2 of the present invention.
Fig. 3 is a schematic diagram of a reduction processing rule in embodiment 2 of the present invention.
Fig. 4 is a diagram illustrating a version synchronization rule in embodiment 2 of the present invention.
Fig. 5 is a schematic diagram of a data storage architecture according to embodiment 2 of the present invention.
Fig. 6 is a first flowchart of a data storage method according to embodiment 3 of the present invention.
Fig. 7 is a second flowchart of the data storage method according to embodiment 3 of the present invention.
Fig. 8 is a schematic diagram of logic control for automatically optimizing storage according to embodiment 3 of the present invention.
Fig. 9 is a schematic diagram of logic control of switch control optimized storage in embodiment 3 of the present invention.
Fig. 10 is a third flowchart of the data storage method according to embodiment 3 of the present invention.
Fig. 11 is a flowchart of a data storage method according to embodiment 4 of the present invention.
Fig. 12 is a flowchart of a data acquisition method according to embodiment 5 of the present invention.
Fig. 13 is a flowchart of a data acquisition method according to embodiment 6 of the present invention.
Fig. 14 is a block diagram of a data storage system according to embodiment 7 of the present invention.
Fig. 15 is a block diagram of a data storage system according to embodiment 8 of the present invention.
Fig. 16 is a block diagram of a data storage system according to embodiment 9 of the present invention.
Fig. 17 is a block diagram of a data storage system according to embodiment 10 of the present invention.
Fig. 18 is a block diagram of a data acquisition system according to embodiment 11 of the present invention.
Fig. 19 is a block diagram of a data acquisition system according to embodiment 12 of the present invention.
Fig. 20 is a schematic structural diagram of an electronic device for implementing a data storage method in a device according to embodiment 13 of the present invention.
Detailed Description
The invention is further illustrated by the following examples, which are not intended to limit the scope of the invention.
Example 1
The data storage method of the embodiment is applied to terminal equipment, and the terminal equipment includes but is not limited to a mobile phone and a tablet computer.
As shown in fig. 1, the data storage method of the present embodiment includes:
s101, acquiring original file data in local storage of the terminal equipment;
s102, constructing reduced file data corresponding to the original file data;
wherein the data volume of the reduced file data is smaller than that of the original file data;
and the metadata information in the original file data is consistent with the metadata information in the corresponding reduced file, so that the one-to-one correspondence between the local reduced file and the original file in the cloud disk is ensured. The metadata information includes multi-dimensional attribute content of the file, and for example, the metadata information includes shooting time information, shooting location information, longitude and latitude of a shooting location, and the like.
Reduced file data can be viewed, moved, copied, modified, etc.; and the reduced file data can be recognized and managed by MediaProvider in the terminal device.
In an implementable scheme, the data type of the original file data is consistent with the data type of the corresponding reduced file data, and the file name of the original file data is consistent with or associated with the file name of the corresponding reduced file data;
s103, uploading original file data to a cloud disk server;
s104, establishing mapping relation information between original file data and corresponding reduced file data in the cloud disk server;
storing the mapping relation information into a local database of the terminal equipment; and/or uploading the mapping relation information to a cloud database of the cloud disk server.
When the mapping relation information is only stored in the terminal equipment or the cloud disk server, the mapping relation information is requested to be acquired from the other side after the communication connection is established between the terminal equipment and the cloud disk server.
And S105, storing the reduced file data in a local storage, and deleting the corresponding original file data.
Specifically, acquiring storage path information of original file data in a local storage;
and storing the reduced file data in the storage path information in the local storage, and deleting the original file data in the storage path information.
And storing the reduced file data under the storage path of the deleted original file data, and ensuring the validity and rationality of file data access and management.
In this embodiment, resource data such as media resources is stored in the terminal device in the form of a reduced file, and an original file of the media resources is stored in the cloud disk, so as to provide a mapping management service for the local reduced file and the original file in the cloud disk, where the local reduced file and the original file in the cloud disk both correspond to the physical file.
In addition, the data storage method of the embodiment further includes:
adding attribution information corresponding to the reduced file data in a local database of the terminal equipment;
the attribution information represents the attribution relationship between the reduced file data and the local storage and is used for triggering and generating request information of authorization operation when the reduced file data is called. The attribution information can also be added in other types of databases besides the local database of the terminal equipment according to actual requirements.
In the embodiment, the storage method optimizes the existing data storage mode, effectively saves the space of the local disk, vacates more storage space for the terminal equipment as much as possible, improves the service performance and the operation stability of the terminal, reduces the time cost for arranging the local file by a user, improves the visibility of cloud disk backup and storage files to the terminal user, improves the safety of user data, improves the recovery probability of the user data after being lost accidentally, effectively improves the user experience, and meets the higher storage requirement of the user.
Example 2
As shown in fig. 2, the data storage method of the present embodiment is a further improvement of embodiment 1, specifically:
step S102 includes:
s10211, acquiring the data type of the original file data;
s10212, establishing a corresponding reduction processing rule according to the data type;
s10213, adopting a reduction processing rule to perform reduction processing on the original file data to obtain corresponding reduced file data.
Specifically, as shown in fig. 3, when the data type corresponds to an image, the reduction processing rule includes a compression resolution process, and the reduced file data includes a thumbnail file of a set resolution;
when the data type corresponds to audio, the reduction processing rule comprises reducing code stream and/or cutting audio duration, and the reduction file data comprises audio files with set code stream and/or set duration (for example, 10 s);
when the data type corresponds to a video, the reduction processing rule comprises at least one of reducing the video resolution, reducing the code stream and cutting to shorten the video time length, and the reduction file data comprises a video file of at least one of setting the video resolution, setting the code stream and setting the video time length (for example, 10 s);
when the data type corresponds to text, the reduction processing rule comprises cutting text content, and the reduced file data comprises a text file with a set word number (for example, 100 bytes); the file data itself occupies a small storage space, and in order to further reduce the volume ratio of such files, a file which only retains 100 bytes of content can be used as a contracted text of the text file.
When the data type corresponds to a preset format file (such as xls, ppt, pdf, etc.), the reduction processing rule includes file replacement, and the reduced file data includes an empty file that is consistent with the file name of the original file data.
Of course, the reduction processing rules of different file types can be reset and adjusted according to actual requirements.
Step S104 includes:
s1041, acquiring first address information of original file data in a cloud disk server;
s1042, obtaining second address information of the reduced file data in a local database;
s1043, establishing a mapping relation between the first address information and the second address information to obtain mapping relation information between the original file data and the corresponding reduced file data.
In an implementation scenario, step S105 is followed by:
adding local version identification information corresponding to each reduced file data in a local database of the terminal equipment; acquiring cloud disk version identification information corresponding to original file data in a cloud disk database of a cloud disk server;
and judging whether the local version identification information is consistent with the cloud disk version identification information, if not, selecting the larger version identification information of the two version identification information as the reference version identification information, and updating the data version of the lower version identification information to the reference version identification information.
In an implementation scenario, step S105 is followed by:
adding local synchronization version information and local latest version information corresponding to each reduced file data in a local storage of the terminal equipment;
when the local synchronization version information is inconsistent with the local latest version information, the local latest version information is sent to the cloud disk server so as to update the version of the corresponding original file data in the cloud disk server to the local latest version information; or the like, or, alternatively,
acquiring cloud disk synchronous version information and cloud disk latest version information corresponding to original file data in a cloud disk database of a cloud disk server;
when the cloud disk synchronization version information is inconsistent with the cloud disk latest version information, the cloud disk latest version information is sent to the terminal equipment so as to update the version of the corresponding reduced file data in the local storage to the cloud disk latest version information; or the like, or, alternatively,
adding local synchronization version information and local latest version information corresponding to each reduced file data in a local database of the terminal equipment;
acquiring cloud disk synchronous version information and cloud disk latest version information corresponding to original file data in a cloud disk database of a cloud disk server;
and when the local synchronization version information is inconsistent with the local latest version information and the cloud disk synchronization version information is inconsistent with the cloud disk latest version information, receiving an input control instruction to determine reference version information, and updating the version of the reduced file data in the corresponding local storage or the version of the original file data in the cloud disk server according to the reference version information.
Specifically, the version synchronization rule in the present embodiment is specifically described with reference to fig. 4:
after the contraction part is constructed through the constructor and the original file is uploaded, the local storage of the terminal device and the cloud disk respectively maintain a file, and the two files have a mapping relation with each other. In order to keep the data synchronization between the local and cloud disk, the data synchronization between the local and cloud disk is needed. However, since the local device has a condition of network disconnection, a version data synchronization rule is needed to maintain that the versions on both sides can be correctly synchronized. The version data synchronization rule adds two data fields, a "synchronization version" and a "latest version", to the databases maintained locally and by the cloud disk. Any updates to files on the local or cloud disk will add the "latest version" version number, and the local and cloud disk "latest version" run independently. When data between the local and the cloud disks are synchronized in a network environment, version numbers of the local and the cloud disks in the latest version are compared with respective version numbers of the synchronous version, and if the latest version is equal to the synchronous version, the latest version indicates that a user does not modify the data from the side, and the data on the side does not need to be synchronized to a mapping end. If the "latest version" is higher than the "synchronization version", that is, it indicates that the user has modified data from the side, the data needs to be synchronized to the corresponding mapping end. If only one side of the local and cloud disks is updated, the files can be directly and synchronously updated to the other side. If the files on both sides of the local cloud disk and the cloud disk are updated, the user is required to solve the conflict and determine to select the party to be finally reserved.
The working principle of the data storage method of the present embodiment is specifically described below with reference to fig. 5:
(1) the local terminal equipment of the user stores file data such as common files, multimedia files and the like, all the stored files have a corresponding set of stored recorded data in a local database, the stored recorded data correspond to the local files one by one, and some main attributes and metadata information of the local files are stored. When a user requests to optimize a storage space or upload files, a 'builder' is used for reducing original files such as common files or multimedia files stored in a local storage according to a 'reduction processing rule';
(2) in the contracted piece construction process in the step (1), the 'constructor' can establish a 'mapping rule' of the original piece and the contracted piece through an algorithm in the mapping management service to ensure the one-to-one corresponding relation of the original piece and the contracted piece; the user can acquire the address information of the corresponding original through the mapping management service, and also can acquire the address information of the contracted piece through the original mapping; the mapping management service can provide support for the following function (5);
(3) after (1) generating the original and the contracted piece, the original is uploaded to a cloud disk, the contracted piece is reserved in a local storage of a terminal device, the storage position of the contracted piece is consistent with the original storage position of the original, the file name and the file type are completely the same, and other metadata information in the contracted piece is completely consistent with the original except data information. After the original file is uploaded, the entity file of the original file is not reserved in the local storage of the terminal equipment.
(4) After (1) generating an original and a contracted piece, actively deleting original data information in a local database by a 'constructor' and inserting newly generated contracted piece data information; in addition, a new mark field in the database maintains the attribution information of the data to the original/contracted piece. When a user uses files such as multimedia files or common files, the local media management actively inquires the data information of the currently operated files, and if the currently operated files are contracted pieces, original pieces corresponding to the contracted pieces are obtained by actively calling the mapping management service through the local media management.
(5) The original stored in the cloud disk server and the local contracted piece in the terminal equipment can be synchronized regularly, the cloud disk server and the local media management can add two field information of a synchronous version and a latest version to the data information of each file, the synchronous version is the last synchronous version number of the original and the contracted piece, and the latest version is the version information of the original or the contracted piece after being changed relative to the synchronous version. When the mapping management service synchronizes the cloud disk original and the local contracted part, different version data synchronization works according to the latest versions of the cloud disk original and the local contracted part.
In the embodiment, the storage method optimizes the existing data storage mode, effectively saves the space of the local disk, vacates more storage space for the terminal equipment as much as possible, improves the service performance and the operation stability of the terminal, reduces the time cost for arranging the local file by a user, improves the visibility of cloud disk backup and storage files to the terminal user, improves the safety of user data, improves the recovery probability of the user data after being lost accidentally, effectively improves the user experience, and meets the higher storage requirement of the user.
Example 3
The data storage method of the present embodiment is a further improvement of embodiment 2, and specifically:
as shown in fig. 6, step S102 includes:
s10221, obtaining a space storage state parameter of local storage;
s10222, determining the data optimized storage grade of the terminal equipment based on the space storage state parameter;
s10223, constructing reduced file data corresponding to the original file data in the local storage based on the data optimization storage level;
wherein the data optimized storage level is inversely related to the data size of the reduced file data.
In an embodiment, the space storage status parameter includes a total storage capacity and a storage usage amount of the terminal device, and step S10222 includes:
calculating the ratio of the storage usage to the total storage capacity;
generating a data optimized storage grade according to the ratio;
wherein, the size of the ratio is positively correlated with the optimized storage level of the data.
As shown in fig. 7, step S102 includes:
s10231, acquiring the use frequency corresponding to the original file data in the local storage within a set time period;
s10232, determining the data optimization storage grade of the original file data based on the use frequency;
when the use frequency reaches different set thresholds, different data optimization storage grades are triggered, and the data optimization storage grades are in negative correlation with the use frequency;
s10233, constructing reduced file data corresponding to the original file data in the local storage based on the data optimization storage grade;
wherein the data optimized storage level is inversely related to the data size of the reduced file data.
Before the reduction operation is performed on the original file data, or after the original file data is acquired from the cloud disk server according to the mapping relationship information, the data storage method of this embodiment further includes:
acquiring the use frequency corresponding to original file data in local storage within a set time period;
when the use frequency is greater than a set threshold value, reserving and storing original file data into a local storage; otherwise, constructing the reduced file data corresponding to the original file data and uploading the reduced file data to the cloud disk server.
In this embodiment, the optimized start algorithm may set multiple thresholds to start different degrees of optimized storage levels of data, for example, 30% of the first-level optimized storage, 60% of the second-level optimized storage, and 90% of the third-level optimized storage. For text type files, the degree of optimal storage can be controlled by controlling how much text content is retained, and other types of files are similar. Therefore, memory optimization of different degrees can be purposefully performed on the stored files according to the use condition of the user, and the purpose of flexibly optimizing storage is achieved.
Specifically, as shown in fig. 8, corresponding to the processing logic of the automatic optimization storage, the optimization start algorithm is used to implement the adaptive optimization of the local storage file, and the optimization start algorithm can calculate and count the file usage frequency. All newly generated files are firstly stored in a local storage, meanwhile, the optimized monitoring service starts monitoring the files, and when the files are frequently used, the optimized monitoring service does not start a storage optimization strategy for the files, so that the files are stored in the local storage in the form of original files. At this time, if there is file access, the original is directly provided for external access, that is, the current storage call logic is an access policy of 1- >4 in the figure. When the file is not used for a long time and reaches the threshold value of the optimization starting algorithm, storage optimization is started, the contracted part is stored in the local storage, and meanwhile the original file is uploaded to the cloud disk. At this time, if there is file access, an original or a contracted piece may be provided according to the user's needs, that is, the current storage invocation policy is 1- >2- >3- >5 in the figure, and finally, according to the user's selection, a corresponding original or contracted piece is provided.
In addition, step S101 further includes a scheme for optimizing storage triggered by an external condition, specifically:
and judging whether a switch control signal is received, if so, executing the step S101. The switch control signal can be triggered by a hardware physical switch, and can also be controlled by a software program, and specifically, which mode can be selected and determined according to actual requirements.
The storage optimization scene controlled by the switch is determined by the user to determine whether the storage optimization strategy is started or not so as to meet the requirement that the user triggers optimization at any time according to the self requirement, and the use experience of the user is effectively improved.
Specifically, as shown in fig. 9, when the storage optimization is triggered by the switch control signal, the processing logic is configured to enable a user to select whether to optimize storage when generating an original, and if the user selects not to execute optimized storage, when accessing the local file from the outside, it may be determined that the locally stored file is of the original type, and then the local storage space may be directly accessed. And if the user selects to execute the optimized storage, uploading the original file to the cloud disk according to a schematic diagram mode, and locally storing the corresponding contracted file. If the external access local file is judged to be the type of the contracted file, the contracted file is acquired from the local storage or the original file is acquired from the cloud disk according to the selection result of the user.
As shown in fig. 10, step S102 includes:
s10241, collecting historical operation behavior data of a user in the terminal equipment;
s10242, performing analysis processing based on historical operation behavior data to determine user operation preference data;
s10243, generating a user preference storage optimization rule according to the user operation preference data, and constructing reduced file data corresponding to the original file data according to the user preference storage optimization rule.
In the embodiment, the storage method optimizes the existing data storage mode, effectively saves the space of the local disk, vacates more storage space for the terminal equipment as much as possible, improves the service performance and the operation stability of the terminal, reduces the time cost for arranging the local file by a user, improves the visibility of cloud disk backup and storage files to the terminal user, improves the safety of user data, improves the recovery probability of the user data after being lost accidentally, effectively improves the user experience, and meets the higher storage requirement of the user.
Example 4
The data storage method of the embodiment is applied to the cloud disk server.
As shown in fig. 11, the data storage method of the present embodiment includes:
s201, receiving and storing original file data which are sent by terminal equipment and correspond to reduced file data, wherein the data volume of the reduced file data is smaller than that of the original file data;
s202, receiving and storing mapping relation information sent by the terminal equipment, wherein the mapping relation information is used for representing the mapping relation between original file data in the cloud disk server and corresponding reduced file data stored by the terminal equipment.
In an implementable scenario, the data storage method of this embodiment further includes:
establishing first address information of original file data in a cloud disk database of a cloud disk server;
and sending the first address information to the terminal equipment to establish a mapping relation between the first address information of the original file data and the second address information of the corresponding reduced file data.
In an implementable scenario, the data storage method of this embodiment further includes:
cloud disk version identification information corresponding to original file data is added in a cloud disk database of a cloud disk server and is sent to terminal equipment, so that the terminal equipment can conveniently compare local version identification information corresponding to each reduced file data with cloud disk version identification information of the original file data, judge whether file versions of the reduced file data and the original file data which correspond to each other one by one are synchronously updated to be consistent, and select version identification information with a higher version as a reference if the file versions are different, so as to update text data with a lower version.
In addition, the data storage method of the embodiment further includes:
the method comprises the steps of adding cloud disk synchronization version information and cloud disk latest version information corresponding to original file data in a cloud disk database of a cloud disk server, comparing whether the cloud disk synchronization version information and the cloud disk latest version information are consistent or not, and sending the cloud disk latest version information to terminal equipment when the cloud disk synchronization version information and the cloud disk latest version information are inconsistent so as to update the version of corresponding reduced file data in local storage to the cloud disk latest version information. Or the like, or, alternatively,
and when the local synchronization version information is inconsistent with the local latest version information and the cloud disk synchronization version information is inconsistent with the cloud disk latest version information, receiving an input control instruction to determine reference version information, and updating the version of the reduced file data in the corresponding local storage or the version of the original file data in the cloud disk server according to the reference version information.
Specifically, whether the synchronization version information in the local database is consistent with the local latest version information is compared, whether the synchronization version information in the cloud disk database is consistent with the cloud disk latest version information is compared, and if the synchronization version information in the cloud disk database is consistent with the cloud disk latest version information, the latest version information in one end is selected as reference version information to update the data version in the other end. And if the synchronous version information of one end is consistent with the latest version information, taking the latest version information as reference version information and updating the data version of the other end.
The operation of comparing the cloud disk synchronization version information with the latest version information of the cloud disk can be executed in the cloud disk server, and can also be sent to the terminal device for execution. Similarly, the operation of comparing the local synchronization version information with the local latest version information may be executed in the cloud disk server, or may be sent to the terminal device for execution.
In the embodiment, the storage method optimizes the existing data storage mode, effectively saves the space of the local disk, vacates more storage space for the terminal equipment as much as possible, improves the service performance and the operation stability of the terminal, reduces the time cost for arranging the local file by a user, improves the visibility of cloud disk backup and storage files to the terminal user, improves the safety of user data, improves the recovery probability of the user data after being lost accidentally, effectively improves the user experience, and meets the higher storage requirement of the user.
Example 5
The data acquisition method of the embodiment is applied to the terminal equipment.
The data acquisition method of this embodiment is implemented based on the data storage method in any one of embodiments 1 to 3.
As shown in fig. 12, the data acquisition method of the present embodiment includes:
s301, receiving an access request of a local application;
s302, when the access request corresponds to access reduced file data, acquiring the corresponding reduced file data;
and when the access request corresponds to the original file data, generating and sending an original file acquisition request to the cloud disk server based on the reduced file data and the mapping relation information, and receiving the original file data which is issued by the cloud disk server according to the mapping relation information and the original file acquisition request and is matched with the reduced file data after the cloud disk server receives the original file acquisition request.
The data acquisition method of the embodiment is based on the data storage mode, and realizes that when a user needs to use a file, and when the current file is identified as reduced file data, original file data matched with the current file is automatically called from a cloud disk server according to a mapping relation, so that the data storage space of terminal equipment is reduced on the basis of traditional cloud disk backup/storage, the user can conveniently manage the entity reduced pieces mapped in the local according to the management mode of the original pieces, and a new data storage method is provided under the condition that the user does not influence file access.
Example 6
The data acquisition method of the embodiment is applied to the cloud disk server.
The data acquisition method of the present embodiment is implemented based on the data storage method in embodiment 4.
As shown in fig. 13, the data acquisition method of the present embodiment includes:
s401, receiving an original file acquisition request generated and sent by terminal equipment based on the reduced file data and the mapping relation information;
s402, according to the mapping relation information and the original file acquisition request, original file data matched with the reduced file data are acquired and sent to the terminal equipment.
The data acquisition method of the embodiment is based on the data storage mode, and realizes that when a user needs to use a file, and when the current file is identified as reduced file data, original file data matched with the current file is automatically called from a cloud disk server according to a mapping relation, so that the data storage space of terminal equipment is reduced on the basis of traditional cloud disk backup/storage, the user can conveniently manage the entity reduced pieces mapped in the local according to the management mode of the original pieces, and a new data storage method is provided under the condition that the user does not influence file access.
Example 7
The data storage system of the embodiment is applied to the terminal equipment.
As shown in fig. 14, the data storage system of the present embodiment includes:
the original file data acquisition module 1 is used for acquiring original file data in a local storage of the terminal equipment;
the reduced file data construction module 2 is used for constructing reduced file data corresponding to the original file data, and the data volume of the reduced file data is smaller than that of the original file data;
in one embodiment, the data type of the original file data is consistent with the data type of the corresponding reduced file data.
The file name of the original file data is consistent with or associated with the file name of the corresponding reduced file data;
the metadata information in the original file data is consistent with the metadata information in the corresponding reduced file. The metadata information includes multi-dimensional attribute content of the file, and for example, the metadata information includes shooting time information, shooting location information, longitude and latitude of a shooting location, and the like.
The file uploading module is used for uploading original file data to the cloud disk server;
the mapping relation information establishing module 3 is used for establishing mapping relation information between original file data and corresponding reduced file data in the cloud disk server;
specifically, the data storage module is used for storing the mapping relationship information to the terminal device; and/or the file uploading module is used for uploading the mapping relation information to the cloud disk server.
When the mapping relation information is only stored in the terminal equipment or the cloud disk server, the mapping relation information is requested to be acquired from the other side after the communication connection is established between the terminal equipment and the cloud disk server.
And the data storage module 4 is used for storing the reduced file data in the local storage and deleting the corresponding original file data.
The data storage module 4 is configured to obtain storage path information of the original file data in the local storage, store the reduced file data in the storage path information in the local storage, and delete the original file data in the storage path information.
And storing the reduced file data under the storage path of the deleted original file data, and ensuring the validity and rationality of file data access and management.
In addition, the data storage system of the present embodiment further includes:
the attribution information adding module 5 is used for adding attribution information corresponding to the reduced file data in the local database;
the attribution information represents the attribution relationship between the reduced file data and the local storage and is used for triggering and generating request information of authorization operation when the reduced file data is called. The attribution information can also be added in other types of databases besides the local database of the terminal equipment according to actual requirements.
In the embodiment, original file data in the terminal device is reduced to obtain reduced text data with a smaller volume, the original file data is uploaded to the cloud disk server and deleted from the terminal device, and mapping relationship information between the original file data and the reduced text data is established to map a one-to-one correspondence relationship between the two file data; the method realizes that when a user needs to use a file, original file data matched with the file is automatically called from a cloud disk server according to a mapping relation when the current file is identified to be reduced file data, so that the data storage space of terminal equipment is reduced on the basis of traditional cloud disk backup/storage, and the user can conveniently manage the entity reduced piece mapped locally according to the management mode of an original piece.
Example 8
As shown in fig. 15, the data storage system of the present embodiment is a further improvement of embodiment 7, specifically:
in an implementable approach, the reduced file data construction module 2 comprises:
the data type acquisition unit is used for acquiring the data type of the original file data;
the reduction processing rule establishing unit is used for establishing a corresponding reduction processing rule according to the data type;
and the reduction processing unit is used for reducing the original file data by adopting a reduction processing rule to obtain corresponding reduced file data.
Specifically, when the data type corresponds to an image, the reduction processing rule includes a compression resolution process, and the reduced file data includes a thumbnail file of a set resolution;
when the data type corresponds to audio, the reduction processing rule comprises reducing code stream and/or cutting audio duration, and the reduction file data comprises audio files with set code stream and/or set duration;
when the data type corresponds to a video, the reduction processing rule comprises at least one of reducing video resolution, reducing code stream and cutting and shortening video time length, and the reduction file data comprises at least one of video files of setting video resolution, setting code stream and setting video time length;
when the data type corresponds to a text, the reduction processing rule comprises cutting text content, and the reduction file data comprises a text file with a set number of characters;
when the data type corresponds to a file with a preset format, the reduction processing rule comprises file replacement, and the reduced file data comprises an empty file consistent with the file name of the original file data.
Of course, the reduction processing rules of different file types can be reset and adjusted according to actual requirements.
In an implementable scheme, the mapping relation information establishing module 3 includes:
the first address information acquisition unit is used for acquiring first address information of original file data in the cloud disk server;
a second address information obtaining unit configured to obtain second address information of the reduced file data in the local database;
and the mapping relation establishing unit is used for establishing the mapping relation between the first address information and the second address information so as to acquire the mapping relation information between the original file data and the corresponding reduced file data.
In an implementation scenario, the system of this embodiment further includes:
a local version information obtaining module 6, configured to add local version identification information corresponding to each reduced file data in a local database of the terminal device;
the cloud disk version information acquisition module 7 is used for acquiring cloud disk version identification information corresponding to original file data in a cloud disk database of the cloud disk server;
and the first judging module 8 is used for judging whether the local version identification information is consistent with the cloud disk version identification information, if not, the reference version selecting module is called to select the larger version identification information of the two version identification information as the reference version identification information, and the version updating module is called to update the data version of the lower version identification information to the reference version identification information.
In one embodiment, the system further comprises:
a local version information acquisition module 6, configured to add local synchronization version information and local latest version information corresponding to each reduced file data in a local database of the terminal device;
the first judgment module 8 is configured to, when the local synchronization version information is inconsistent with the local latest version information, invoke the version update module to send the local latest version information to the cloud disk server, so as to update the version of the original file data in the cloud disk server to the local latest version information; or the like, or, alternatively,
the cloud disk version information acquisition module 7 is used for acquiring cloud disk synchronous version information and cloud disk latest version information corresponding to original file data in a cloud disk database of the cloud disk server;
the first judgment module 8 is used for calling the version updating module to send the latest version information of the cloud disk to the terminal equipment when the synchronous version information of the cloud disk is inconsistent with the latest version information of the cloud disk, so as to update the version of the corresponding reduced file data in the local storage to the latest version information of the cloud disk; or the like, or, alternatively,
a local version information acquisition module 6, configured to add local synchronization version information and local latest version information corresponding to each reduced file data in a local database of the terminal device;
the cloud disk version information acquisition module 7 is used for acquiring cloud disk synchronous version information and cloud disk latest version information corresponding to original file data in a cloud disk database of the cloud disk server;
and the first judgment module 8 is used for calling the version updating module to receive the input control instruction to determine the reference version information when the local synchronization version information is inconsistent with the local latest version information and the cloud disk synchronization version information is inconsistent with the cloud disk latest version information, and updating the version of the corresponding reduced file data in the local storage or the original file data in the cloud disk server according to the reference version information.
In the embodiment, original file data in the terminal device is reduced to obtain reduced text data with a smaller volume, the original file data is uploaded to the cloud disk server and deleted from the terminal device, and mapping relationship information between the original file data and the reduced text data is established to map a one-to-one correspondence relationship between the two file data; the method realizes that when a user needs to use a file, original file data matched with the file is automatically called from a cloud disk server according to a mapping relation when the current file is identified to be reduced file data, so that the data storage space of terminal equipment is reduced on the basis of traditional cloud disk backup/storage, and the user can conveniently manage the entity reduced piece mapped locally according to the management mode of an original piece.
Example 9
The data storage system of the present embodiment is a further improvement of embodiment 8, specifically:
in an embodiment, in order to achieve the effect of automatically triggering the optimized storage, as shown in fig. 16, the reduced file data construction module 2 includes:
the state parameter acquisition unit is used for acquiring the locally stored space storage state parameters;
the optimized storage grade determining unit is used for determining the optimized storage grade of the data of the terminal equipment based on the space storage state parameters;
the reduced file data construction unit is used for constructing reduced file data corresponding to the original file data in the local storage based on the data optimization storage grade;
wherein the data optimized storage level is inversely related to the data size of the reduced file data.
When the space storage state parameters comprise the total storage capacity and the total storage capacity of the terminal equipment, the optimized storage grade determining unit is used for calculating the ratio of the total storage capacity to the total storage capacity and generating a data optimized storage grade according to the ratio;
wherein, the size of the ratio is positively correlated with the optimized storage level of the data.
In an embodiment, in order to achieve the effect of automatically triggering the optimized storage, as shown in fig. 10, the reduced file data construction module 2 includes:
the using frequency acquiring unit is used for acquiring the using frequency corresponding to the original file data in the local storage within a set time period;
a data-optimized storage rank determination unit for determining a data-optimized storage rank of the original document data based on the frequency of use;
when the use frequency reaches different set thresholds, different data optimization storage levels are triggered, and the data optimization storage levels are in negative correlation with the use frequency;
the reduced file data construction unit is used for constructing reduced file data corresponding to the original file data in the local storage based on the data optimization storage grade;
wherein the data optimized storage level is inversely related to the data size of the reduced file data.
Before the reduction operation is performed on the original file data, or after the original file data is acquired from the cloud disk server according to the mapping relationship information, the system of this embodiment further includes:
the using frequency acquiring module 9 is used for acquiring the using frequency corresponding to the original file data in the local storage within a set time period;
the second judgment module 10 is used for reserving and storing original file data to local storage when the use frequency is greater than a set threshold; otherwise, constructing the reduced file data corresponding to the original file data and uploading the reduced file data to the cloud disk server.
In addition, the system of the embodiment further includes:
and the third judging module 11 is configured to judge whether a hardware switch control signal is received, and if so, invoke the reduced file data constructing module 2 to achieve an effect of starting optimized storage through an external trigger condition.
In an embodiment, the reduced file data construction module 2 includes:
the historical behavior data acquisition unit is used for acquiring historical operation behavior data of a user in the terminal equipment;
the user operation preference data unit is used for analyzing and processing the historical operation behavior data to determine user operation preference data;
the preference storage optimization rule generating unit is used for generating a user preference storage optimization rule according to the user operation preference data;
and the reduced file data construction unit is used for constructing reduced file data corresponding to the original file data according to the user preference storage optimization rule.
The operation preference of the user is determined by collecting the operation behavior data of the user using the current terminal device in a historical set time period, if the operation behavior data indicate that the user likes to take a picture and process an image, the storage optimization can reduce the compression of the storage space of the image, improve the compression of other storage files, meet the actual storage requirements of different users and achieve the effect of personalized data storage.
In the embodiment, original file data in the terminal device is reduced to obtain reduced text data with a smaller volume, the original file data is uploaded to the cloud disk server and deleted from the terminal device, and mapping relationship information between the original file data and the reduced text data is established to map a one-to-one correspondence relationship between the two file data; the method realizes that when a user needs to use a file, original file data matched with the file is automatically called from a cloud disk server according to a mapping relation when the current file is identified to be reduced file data, so that the data storage space of terminal equipment is reduced on the basis of traditional cloud disk backup/storage, and the user can conveniently manage the entity reduced piece mapped locally according to the management mode of an original piece.
Example 10
The data storage system of the embodiment is applied to a cloud disk server.
As shown in fig. 17, the data storage system of the present embodiment includes:
the first data receiving module 12 is configured to receive and store original file data corresponding to reduced file data sent by a terminal device, where a data amount of the reduced file data is smaller than a data amount of the original file data;
the mapping relationship information receiving module 13 is configured to receive and store mapping relationship information sent by the terminal device, where the mapping relationship information is used to represent a mapping relationship between original file data in the cloud disk server and corresponding reduced file data stored in the terminal device.
In an implementable aspect, the data storage system of the present embodiment further includes:
establishing first address information of original file data in a cloud disk server;
and sending the first address information to the terminal equipment to establish a mapping relation between the first address information of the original file data and the second address information of the corresponding reduced file data.
In an implementable aspect, the data storage system of the present embodiment further includes:
cloud disk version identification information corresponding to original file data is added in a cloud disk database of a cloud disk server and is sent to terminal equipment, so that the terminal equipment can conveniently compare local version identification information corresponding to each reduced file data with cloud disk version identification information of the original file data, judge whether file versions of the reduced file data and the original file data which correspond to each other one by one are synchronously updated to be consistent, and select version identification information with a higher version as a reference if the file versions are different, so as to update text data with a lower version.
In addition, the data storage system of the present embodiment further includes:
the method comprises the steps of adding cloud disk synchronization version information and cloud disk latest version information corresponding to original file data in a cloud disk database of a cloud disk server, comparing whether the cloud disk synchronization version information and the cloud disk latest version information are consistent or not, and sending the cloud disk latest version information to terminal equipment when the cloud disk synchronization version information and the cloud disk latest version information are inconsistent so as to update the version of corresponding reduced file data in local storage to the cloud disk latest version information. Or the like, or, alternatively,
and when the local synchronization version information is inconsistent with the local latest version information and the cloud disk synchronization version information is inconsistent with the cloud disk latest version information, receiving an input control instruction to determine reference version information, and updating the version of the reduced file data in the corresponding local storage or the version of the original file data in the cloud disk server according to the reference version information.
The operation of comparing the cloud disk synchronization version information with the latest version information of the cloud disk can be executed in the cloud disk server, and can also be sent to the terminal device for execution. Similarly, the operation of comparing the local synchronization version information with the local latest version information may be executed in the terminal device, or may be sent to the cloud disk server for execution.
In the embodiment, original file data in the terminal device is reduced to obtain reduced text data with a smaller volume, the original file data is uploaded to the cloud disk server and deleted from the terminal device, and mapping relationship information between the original file data and the reduced text data is established to map a one-to-one correspondence relationship between the two file data; when a user needs to use a file, the original file data matched with the file is automatically called from the cloud disk server according to the mapping relation when the current file is identified to be reduced file data, so that the data storage space of the terminal equipment is reduced on the basis of traditional cloud disk backup/storage, the user can conveniently manage the entity reduced piece mapped locally according to the management mode of the original piece, the storage system optimizes the existing data storage mode, effectively saves the space of a local disk, reduces the time cost for arranging the local file by the user, improves the visibility of the cloud disk backup and the storage file to the terminal user, improves the safety of the user data, improves the recovery probability after the user data is lost accidentally, effectively improves the user experience, and meets the higher storage requirement of the user.
Example 11
The data acquisition system of the embodiment is applied to the terminal equipment.
The data acquisition system of this embodiment is implemented based on the data storage system in any one of embodiments 7 to 9.
As shown in fig. 18, the data acquisition system of the present embodiment includes:
an access request receiving module 14, configured to receive an access request of a local application;
a reduced file data obtaining module 15, configured to obtain corresponding reduced file data when the access request corresponds to accessing the reduced file data;
an original file obtaining request sending module 16, configured to, when the access request corresponds to the original file data, generate and send an original file obtaining request to the cloud disk server based on the reduced file data and the mapping relationship information
And the second data receiving module 17 is configured to receive the original file data, which is issued by the cloud disk server according to the mapping relationship information and the original file acquisition request and is matched with the reduced file data, after receiving the original file acquisition request.
The data acquisition method of the embodiment is based on the data storage mode, and realizes that when a user needs to use a file, and when the current file is identified as reduced file data, original file data matched with the current file is automatically called from a cloud disk server according to a mapping relation, so that the data storage space of terminal equipment is reduced on the basis of traditional cloud disk backup/storage, the user can conveniently manage the entity reduced pieces mapped in the local according to the management mode of the original pieces, and a new data storage method is provided under the condition that the user does not influence file access.
Example 12
The data acquisition system of the embodiment is applied to a cloud disk server.
The data acquisition system of the present embodiment is implemented based on the data storage system in embodiment 10.
As shown in fig. 19, the data acquisition system of the present embodiment includes:
an original file acquisition request receiving module 18, configured to receive an original file acquisition request generated and sent by a terminal device based on reduced file data and mapping relationship information;
and the data issuing module 19 is configured to acquire the original file data matched with the reduced file data according to the mapping relationship information and the original file acquisition request, and issue the original file data to the terminal device.
The data acquisition system of this embodiment, based on the above data storage manner, realizes that when a user needs to use a file, when the current file is identified as reduced file data, the original file data that is automatically called and matched from the cloud disk server according to the mapping relationship, so as to achieve the purpose of reducing the data storage space of the terminal device on the basis of the conventional cloud disk backup/storage, and the user can conveniently manage the physical reduced pieces that are mapped locally according to the original management manner, and provide a new data storage system without affecting the situation that the user accesses the file.
Example 13
Fig. 20 is a schematic structural diagram of an electronic device according to embodiment 6 of the present invention. The electronic device comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the computer program to implement the data storage method in any one of the embodiments 1-3. The electronic device 30 shown in fig. 20 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.
As shown in FIG. 20, electronic device 30 may take the form of a general purpose computing device, which may be a server device, for example. The components of the electronic device 30 may include, but are not limited to: the at least one processor 31, the at least one memory 32, and a bus 33 connecting the various system components (including the memory 32 and the processor 31).
The bus 33 includes a data bus, an address bus, and a control bus.
The memory 32 may include volatile memory, such as Random Access Memory (RAM)321 and/or cache memory 322, and may further include Read Only Memory (ROM) 323.
Memory 32 may also include a program/utility 325 having a set (at least one) of program modules 324, such program modules 324 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
The processor 31 executes various functional applications and data processing, such as a data storage method in any one of embodiments 1 to 3 of the present invention, by executing the computer program stored in the memory 32.
The electronic device 30 may also communicate with one or more external devices 34 (e.g., keyboard, pointing device, etc.). Such communication may be through input/output (I/O) interfaces 35. Also, model-generating device 30 may also communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via network adapter 36. As shown in FIG. 20, network adapter 36 communicates with the other modules of model-generating device 30 via bus 33. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the model-generating device 30, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.
It should be noted that although in the above detailed description several units/modules or sub-units/modules of the electronic device are mentioned, such a division is merely exemplary and not mandatory. Indeed, the features and functionality of two or more of the units/modules described above may be embodied in one unit/module according to embodiments of the invention. Conversely, the features and functions of one unit/module described above may be further divided into embodiments by a plurality of units/modules.
Example 14
Embodiment 14 of the present invention provides an electronic device, where the electronic device includes a memory, a processor, and a computer program that is stored in the memory and can be run on the processor, and the processor executes the program to implement the data storage method in embodiment 4, where the specific structure of the electronic device refers to the electronic device in embodiment 13, and the operating principle of the electronic device is substantially the same as that of the electronic device in embodiment 13, and is not described herein again.
Example 15
Embodiment 15 of the present invention provides an electronic device, where the electronic device includes a memory, a processor, and a computer program that is stored in the memory and can be run on the processor, and the processor executes the program to implement the data acquisition method in embodiment 5, where the specific structure of the electronic device refers to the electronic device in embodiment 13, and the operating principle of the electronic device is substantially the same as that of the electronic device in embodiment 13, and details of the electronic device are not described here.
Example 16
Embodiment 16 of the present invention provides an electronic device, where the electronic device includes a memory, a processor, and a computer program that is stored in the memory and can be run on the processor, and the processor executes the program to implement the data acquisition method in embodiment 6, where the specific structure of the electronic device refers to the electronic device in embodiment 13, and the operating principle of the electronic device is substantially the same as that of the electronic device in embodiment 13, and details of the electronic device are not described here.
Example 17
The present embodiment provides a computer-readable storage medium on which a computer program is stored, the program, when executed by a processor, implementing the steps in the data storage method in any one of embodiments 1 to 3.
More specific examples, among others, that the readable storage medium may employ may include, but are not limited to: a portable disk, a hard disk, random access memory, read only memory, erasable programmable read only memory, optical storage device, magnetic storage device, or any suitable combination of the foregoing.
In a possible implementation, the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps of implementing the data storage method according to any one of embodiments 1-3 when the program product is run on the terminal device.
Where program code for carrying out the invention is written in any combination of one or more programming languages, the program code may execute entirely on the user device, partly on the user device, as a stand-alone software package, partly on the user device and partly on a remote device or entirely on the remote device.
Example 18
The present embodiment provides a computer-readable storage medium on which a computer program is stored, the program implementing the steps in the data storage method in embodiment 4 when executed by a processor.
More specific examples, among others, that the readable storage medium may employ may include, but are not limited to: a portable disk, a hard disk, random access memory, read only memory, erasable programmable read only memory, optical storage device, magnetic storage device, or any suitable combination of the foregoing.
In a possible implementation, the present invention can also be implemented in the form of a program product including program code for causing a terminal device to perform the steps of implementing the data storage method in embodiment 4 when the program product is run on the terminal device.
Where program code for carrying out the invention is written in any combination of one or more programming languages, the program code may execute entirely on the user device, partly on the user device, as a stand-alone software package, partly on the user device and partly on a remote device or entirely on the remote device.
Example 19
The present embodiment provides a computer-readable storage medium on which a computer program is stored, the program implementing the steps in the data acquisition method in embodiment 5 when executed by a processor.
More specific examples, among others, that the readable storage medium may employ may include, but are not limited to: a portable disk, a hard disk, random access memory, read only memory, erasable programmable read only memory, optical storage device, magnetic storage device, or any suitable combination of the foregoing.
In a possible implementation manner, the present invention can also be implemented in the form of a program product including program code for causing a terminal device to execute the steps of implementing the data acquisition method in embodiment 5 when the program product is run on the terminal device.
Where program code for carrying out the invention is written in any combination of one or more programming languages, the program code may execute entirely on the user device, partly on the user device, as a stand-alone software package, partly on the user device and partly on a remote device or entirely on the remote device.
Example 20
The present embodiment provides a computer-readable storage medium on which a computer program is stored, the program, when executed by a processor, implementing the steps of the data acquisition method in embodiment 6.
More specific examples, among others, that the readable storage medium may employ may include, but are not limited to: a portable disk, a hard disk, random access memory, read only memory, erasable programmable read only memory, optical storage device, magnetic storage device, or any suitable combination of the foregoing.
In a possible implementation manner, the present invention can also be implemented in the form of a program product including program code for causing a terminal device to execute the steps of implementing the data acquisition method in embodiment 6 when the program product is run on the terminal device.
Where program code for carrying out the invention is written in any combination of one or more programming languages, the program code may execute entirely on the user device, partly on the user device, as a stand-alone software package, partly on the user device and partly on a remote device or entirely on the remote device.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that this is by way of example only, and that the scope of the invention is defined by the appended claims. Various changes and modifications to these embodiments may be made by those skilled in the art without departing from the spirit and scope of the invention, and these changes and modifications are within the scope of the invention.

Claims (24)

1. A data storage method is applied to a terminal device, and comprises the following steps:
acquiring original file data in a local storage of the terminal equipment;
constructing reduced file data corresponding to the original file data, wherein the data volume of the reduced file data is smaller than that of the original file data;
uploading the original file data to a cloud disk server, and establishing mapping relation information between the original file data and the corresponding reduced file data in the cloud disk server;
and storing the reduced file data in the local storage, and deleting the corresponding original file data.
2. The data storage method of claim 1, wherein the step of constructing the reduced file data corresponding to the original file data comprises:
acquiring the data type of the original file data;
establishing a corresponding reduction processing rule according to the data type;
and adopting the reduction processing rule to carry out reduction processing on the original file data so as to obtain the corresponding reduced file data.
3. The data storage method according to claim 1 or 2, wherein the data type of the original file data is identical to the data type of the corresponding reduced file data; or the like, or, alternatively,
the file name of the original file data is consistent with or associated with the file name of the corresponding reduced file data; or the like, or, alternatively,
and the metadata information in the original file data is consistent with the metadata information in the corresponding reduced file.
4. The data storage method of claim 1, wherein the method further comprises:
storing the mapping relation information to the terminal equipment; and/or uploading the mapping relation information to the cloud disk server; or the like, or, alternatively,
the step of storing the reduced file data in the local storage and deleting the corresponding original file data further includes:
acquiring storage path information of the original file data in the local storage;
and storing the reduced file data in the storage path information in the local storage, and deleting the original file data in the storage path information.
5. The data storage method of claim 1, wherein the step of establishing mapping relationship information between the original file data and the corresponding reduced file data in the cloud disk server comprises:
acquiring first address information of the original file data in the cloud disk server;
acquiring second address information of the reduced file data in a local database;
and establishing a mapping relation between the first address information and the second address information to acquire the mapping relation information between the original file data and the corresponding reduced file data.
6. The data storage method according to claim 2, wherein when the data type corresponds to an image, the reduction processing rule includes a compression resolution process, the reduced file data includes a thumbnail file of a set resolution; or the like, or, alternatively,
when the data type corresponds to audio, the reduction processing rule comprises reducing code stream and/or cutting audio duration, and the reduction file data comprises audio files with set code stream and/or set duration; or the like, or, alternatively,
when the data type corresponds to a video, the reduction processing rule comprises at least one of reducing video resolution, reducing code stream and cutting and shortening video time length, and the reduction file data comprises at least one of video files for setting video resolution, setting code stream and setting video time length; or the like, or, alternatively,
when the data type corresponds to a text, the reduction processing rule comprises cutting text content, and the reduced file data comprises a text file with a set text quantity; or the like, or, alternatively,
and when the data type corresponds to a preset format file, the reduction processing rule comprises file replacement, and the reduced file data comprises an empty file with the same file name as the original file data.
7. The data storage method of claim 1, wherein the method further comprises:
adding local version identification information corresponding to each reduced file data in a local database of the terminal equipment;
acquiring cloud disk version identification information corresponding to the original file data in a cloud disk database of the cloud disk server;
and judging whether the local version identification information is consistent with the cloud disk version identification information, if not, selecting the larger version identification information of the two version identification information as reference version identification information, and updating the data version of the lower version identification information to the reference version.
8. The data storage method of claim 1, wherein the method further comprises:
adding local synchronization version information and local latest version information corresponding to each reduced file data in a local database of the terminal equipment;
when the local synchronization version information is inconsistent with the local latest version information, sending the local latest version information to the cloud disk server so as to update the version, corresponding to the original file data, in the cloud disk server to the local latest version information; or the like, or, alternatively,
acquiring cloud disk synchronous version information and cloud disk latest version information corresponding to the original file data in a cloud disk database of the cloud disk server;
when the cloud disk synchronization version information is inconsistent with the cloud disk latest version information, the cloud disk latest version information is sent to the terminal device so as to update the version corresponding to the reduced file data in the local storage to the cloud disk latest version; or the like, or, alternatively,
adding local synchronization version information and local latest version information corresponding to each reduced file data in a local database of the terminal equipment;
acquiring cloud disk synchronous version information and cloud disk latest version information corresponding to the original file data in a cloud disk database of the cloud disk server;
when the local synchronization version information is inconsistent with the local latest version information and the cloud disk synchronization version information is inconsistent with the cloud disk latest version information, receiving an input control instruction to determine reference version information, and updating the reduced file data in the local storage or the version of the original file data in the cloud disk server according to the reference version information.
9. The data storage method of claim 1, wherein the step of constructing the reduced file data corresponding to the original file data comprises:
acquiring the space storage state parameters of the local storage;
determining the data optimization storage grade of the terminal equipment based on the space storage state parameter;
constructing reduced file data corresponding to the original file data in the local storage based on the data optimization storage grade;
wherein the data-optimized storage tier is inversely related to the data volume of the reduced file data.
10. The data storage method of claim 9, wherein the spatial storage state parameters include a total storage capacity and a storage usage amount of the terminal device;
the step of determining the data optimized storage level of the terminal device based on the space storage state parameter comprises:
calculating the ratio of the storage usage to the total storage capacity;
generating the data optimized storage grade according to the ratio;
wherein the magnitude of the ratio is positively correlated with the data-optimized storage rank.
11. The data storage method of claim 1, wherein the step of constructing the reduced file data corresponding to the original file data comprises:
acquiring the use frequency corresponding to the original file data in the local storage within a set time period;
determining a data optimization storage level of the original file data based on the use frequency;
when the use frequency reaches different set thresholds, different data optimization storage levels are triggered, and the data optimization storage levels are in negative correlation with the use frequency;
constructing reduced file data corresponding to the original file data in the local storage based on the data optimization storage grade;
wherein the data-optimized storage tier is inversely related to the data volume of the reduced file data.
12. The data storage method of claim 1, wherein before performing the reduction operation on the original file data, or after obtaining the original file data from the cloud disk server according to the mapping relationship information, the method further comprises:
acquiring the use frequency corresponding to the original file data in the local storage within a set time period;
when the use frequency is larger than a set threshold value, reserving and storing the original file data in the local storage; otherwise, constructing the reduced file data corresponding to the original file data and uploading the reduced file data to the cloud disk server.
13. The data storage method of claim 1, wherein the step of constructing the reduced file data corresponding to the original file data further comprises:
and judging whether a switch control signal is received or not, if so, executing the step of constructing the reduced file data corresponding to the original file data.
14. The data storage method of claim 1, wherein the step of constructing the reduced file data corresponding to the original file data comprises:
collecting historical operation behavior data of a user in the terminal equipment;
performing analysis processing based on the historical operation behavior data to determine user operation preference data;
and generating a user preference storage optimization rule according to the user operation preference data, and constructing reduced file data corresponding to the original file data according to the user preference storage optimization rule.
15. The data storage method of claim 1, wherein the method further comprises:
and adding attribution information of the reduced file data in a local database of the terminal equipment and/or other databases except the local database.
16. A data storage method is applied to a cloud disk server, and comprises the following steps:
receiving and storing original file data which are sent by terminal equipment and correspond to reduced file data, wherein the data volume of the reduced file data is smaller than that of the original file data;
and receiving and storing mapping relation information sent by the terminal equipment, wherein the mapping relation information is used for representing the mapping relation between the original file data in the cloud disk server and the corresponding reduced file data stored by the terminal equipment.
17. A data acquisition method, wherein the method is applied in a terminal device, and the method is implemented based on the data storage method of any one of claims 1 to 15, and the method comprises:
acquiring an access request of a local application;
when the access request correspondingly accesses the reduced file data, acquiring the corresponding reduced file data;
and when the access request corresponds to the original file data, generating and sending an original file acquisition request to a cloud disk server based on the reduced file data and the mapping relation information, and receiving the original file data which is issued by the cloud disk server according to the mapping relation information and the original file acquisition request and is matched with the reduced file data after receiving the original file acquisition request.
18. A data acquisition method, wherein the method is applied in a cloud disk server, and the method is implemented based on the data storage method of claim 16, and the method comprises:
the terminal equipment generates and sends an original file acquisition request based on the reduced file data and the mapping relation information;
and acquiring the original file data matched with the reduced file data according to the mapping relation information and the original file acquisition request, and issuing the original file data to the terminal equipment.
19. A data storage system, wherein the system is applied in a terminal device, the system comprising:
the original file data acquisition module is used for acquiring original file data in the local storage of the terminal equipment;
the reduced file data construction module is used for constructing reduced file data corresponding to the original file data, and the data volume of the reduced file data is smaller than that of the original file data;
the file uploading module is used for uploading the original file data to a cloud disk server;
the mapping relation information establishing module is used for establishing mapping relation information between the original file data and the corresponding reduced file data in the cloud disk server;
and the data storage module is used for storing the reduced file data in the local storage and deleting the corresponding original file data.
20. A data storage system, wherein the system is applied in a cloud disk server, and the system comprises:
the first data receiving module is used for receiving and storing original file data which are sent by terminal equipment and correspond to reduced file data, and the data volume of the reduced file data is smaller than that of the original file data;
and the mapping relation information receiving module is used for receiving and storing the mapping relation information sent by the terminal equipment, and the mapping relation information is used for representing the mapping relation between the original file data in the cloud disk server and the corresponding reduced file data stored by the terminal equipment.
21. A data acquisition system, wherein the system is applied in a terminal device, and the system is implemented based on the data storage system of claim 19, and the system comprises:
the access request receiving module is used for receiving an access request of a local application;
a reduced file data obtaining module, configured to obtain corresponding reduced file data when the access request corresponds to access the reduced file data;
the original file acquisition request sending module is used for generating and sending an original file acquisition request to the cloud disk server based on the reduced file data and the mapping relation information when the access request correspondingly accesses the original file data;
and the second data receiving module is used for receiving the original file data which is sent by the cloud disk server according to the mapping relation information and the original file acquisition request and is matched with the reduced file data after the cloud disk server receives the original file acquisition request.
22. A data acquisition system, wherein the system is applied in a cloud disk server, and the system is implemented based on the data storage system of claim 20, and the system comprises:
the original file acquisition request receiving module is used for receiving an original file acquisition request generated and sent by the terminal equipment based on the reduced file data and the mapping relation information;
and the data issuing module is used for acquiring the original file data matched with the reduced file data according to the mapping relation information and the original file acquisition request and issuing the original file data to the terminal equipment.
23. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the data storage method of any one of claims 1-15 when executing the computer program; or, implementing the data storage method of claim 16; or, implementing the data acquisition method of claim 17; or, implementing the data acquisition method of claim 18.
24. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the data storage method of any one of claims 1 to 15; or, implementing the data storage method of claim 16; or, implementing the data acquisition method of claim 17; or, implementing the data acquisition method of claim 18.
CN202110738843.1A 2021-06-30 2021-06-30 Data storage method, data acquisition method, system, device and medium Active CN113590027B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110738843.1A CN113590027B (en) 2021-06-30 2021-06-30 Data storage method, data acquisition method, system, device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110738843.1A CN113590027B (en) 2021-06-30 2021-06-30 Data storage method, data acquisition method, system, device and medium

Publications (2)

Publication Number Publication Date
CN113590027A true CN113590027A (en) 2021-11-02
CN113590027B CN113590027B (en) 2022-10-11

Family

ID=78245300

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110738843.1A Active CN113590027B (en) 2021-06-30 2021-06-30 Data storage method, data acquisition method, system, device and medium

Country Status (1)

Country Link
CN (1) CN113590027B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114422601A (en) * 2021-12-31 2022-04-29 成都鲁易科技有限公司 File processing method and device based on cloud storage and computer equipment
CN115022670A (en) * 2022-05-31 2022-09-06 咪咕文化科技有限公司 Video file storage method, restoration method, device, equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101394397A (en) * 2008-01-03 2009-03-25 ***通信集团湖北有限公司 Compression storage method capable of remote invoking used for mobile network, system thereof
CN102668507A (en) * 2009-08-21 2012-09-12 三星电子株式会社 Method and apparatus for providing contents via network, method and apparatus for receiving contents via network, and method and apparatus for backing up data via network, backup data providing device, and backup system
CN102761540A (en) * 2012-05-30 2012-10-31 北京奇虎科技有限公司 Data compression method, device and system and server
CN103458016A (en) * 2013-08-21 2013-12-18 小米科技有限责任公司 Method and device for picture management and terminal device
CN103701853A (en) * 2013-11-11 2014-04-02 珠海市魅族科技有限公司 File sending method and terminal
TW201416875A (en) * 2012-10-29 2014-05-01 Univ Central Taiwan Sci & Tech Camera with automation cloud file uploading function and cloud image file management system
CN107105338A (en) * 2017-03-17 2017-08-29 深圳市先河***技术有限公司 The method and terminal asked for display image, video and response to network
CN107332939A (en) * 2017-09-02 2017-11-07 刘兴丹 It is a kind of to pass through the cloud storage method that is locally stored, device
CN112449099A (en) * 2019-08-30 2021-03-05 华为技术有限公司 Image processing method, electronic equipment and cloud server

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101394397A (en) * 2008-01-03 2009-03-25 ***通信集团湖北有限公司 Compression storage method capable of remote invoking used for mobile network, system thereof
CN102668507A (en) * 2009-08-21 2012-09-12 三星电子株式会社 Method and apparatus for providing contents via network, method and apparatus for receiving contents via network, and method and apparatus for backing up data via network, backup data providing device, and backup system
CN102761540A (en) * 2012-05-30 2012-10-31 北京奇虎科技有限公司 Data compression method, device and system and server
TW201416875A (en) * 2012-10-29 2014-05-01 Univ Central Taiwan Sci & Tech Camera with automation cloud file uploading function and cloud image file management system
CN103458016A (en) * 2013-08-21 2013-12-18 小米科技有限责任公司 Method and device for picture management and terminal device
CN103701853A (en) * 2013-11-11 2014-04-02 珠海市魅族科技有限公司 File sending method and terminal
CN107105338A (en) * 2017-03-17 2017-08-29 深圳市先河***技术有限公司 The method and terminal asked for display image, video and response to network
CN107332939A (en) * 2017-09-02 2017-11-07 刘兴丹 It is a kind of to pass through the cloud storage method that is locally stored, device
CN112449099A (en) * 2019-08-30 2021-03-05 华为技术有限公司 Image processing method, electronic equipment and cloud server

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114422601A (en) * 2021-12-31 2022-04-29 成都鲁易科技有限公司 File processing method and device based on cloud storage and computer equipment
CN115022670A (en) * 2022-05-31 2022-09-06 咪咕文化科技有限公司 Video file storage method, restoration method, device, equipment and storage medium
CN115022670B (en) * 2022-05-31 2023-09-05 咪咕文化科技有限公司 Video file storage method, video file restoration device, video file storage equipment and storage medium

Also Published As

Publication number Publication date
CN113590027B (en) 2022-10-11

Similar Documents

Publication Publication Date Title
US8171251B2 (en) Data storage management method and device
US20130311742A1 (en) Image management method, mobile terminal and computer storage medium
CN113590027B (en) Data storage method, data acquisition method, system, device and medium
CN109739815B (en) File processing method, system, device, equipment and storage medium
JP4955677B2 (en) Move data from a file on a storage volume to an alternate location to free up space
US20200311026A1 (en) File processing method and server
CN108234554B (en) Cloud file editing method and device
US7506004B2 (en) Moving data from file on storage volume to alternate location to free space
US10579597B1 (en) Data-tiering service with multiple cold tier quality of service levels
EP2418809A1 (en) Method and apparatus for processing and updating service contents in a distributed file system
WO2011108030A1 (en) Computer system and recording medium using a virtual file system in a hierarchical storage management
KR101916240B1 (en) Storage constrained synchronization of shared content items
US20230177003A1 (en) Data migration management and migration metric prediction
CN112734982A (en) Storage method and system for unmanned vehicle driving behavior data
CN113806300A (en) Data storage method, system, device, equipment and storage medium
CN112000971B (en) File permission recording method, system and related device
US7505986B2 (en) Moving data from file on storage volume to alternate location to free space
US7873681B2 (en) Moving data from file on storage volume to alternate location to free space
CN111309796B (en) Data processing method, device and computer readable storage medium
CN110347656B (en) Method and device for managing requests in file storage system
CN115061630A (en) Data migration method, device, equipment and medium
CN116820323A (en) Data storage method, device, electronic equipment and computer readable storage medium
CN103605795A (en) Metadata-based file storage method and device
JP2023509040A (en) DATA TRANSMISSION METHOD, TERMINAL AND COMPUTER-READABLE STORAGE MEDIUM
CN111190549A (en) Method, device, equipment and medium for acquiring available capacity of shared volume

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