CN104778016B - A kind of automatic storage controlling method under multiple storage devices environment - Google Patents

A kind of automatic storage controlling method under multiple storage devices environment Download PDF

Info

Publication number
CN104778016B
CN104778016B CN201510195455.8A CN201510195455A CN104778016B CN 104778016 B CN104778016 B CN 104778016B CN 201510195455 A CN201510195455 A CN 201510195455A CN 104778016 B CN104778016 B CN 104778016B
Authority
CN
China
Prior art keywords
storage
storage device
file
specified
memory capacity
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201510195455.8A
Other languages
Chinese (zh)
Other versions
CN104778016A (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.)
Shenzhen Meibeike Technology Co Ltd
Original Assignee
Shenzhen Meibeike Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Meibeike Technology Co Ltd filed Critical Shenzhen Meibeike Technology Co Ltd
Priority to CN201510195455.8A priority Critical patent/CN104778016B/en
Publication of CN104778016A publication Critical patent/CN104778016A/en
Application granted granted Critical
Publication of CN104778016B publication Critical patent/CN104778016B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

Multiple storage devices can be merged into a total memory by the automatic storage controlling method under a kind of multiple storage devices environment, so as to be managed collectively to multiple storage devices, including:Storage device is scanned, dynamically manages the configuration information of each storage device, the configuration information includes the storage ID of each storage device;According to store path, from storage device extraction document;The size of data of storage file is obtained, it will be in file storage to storage device:When specified storage device, file is stored in the storage device specified;When not specified storage device, search and file is stored in a storage device with enough remaining memory capacity.The present invention manages all storage devices automatically, is not required to the multiple storage devices of user's labor management, has only that there are one the usage experience senses of storage device, effectively improves the performance of storage system of electronic equipment.

Description

A kind of automatic storage controlling method under multiple storage devices environment
Technical field
The invention belongs to the automatic storage controlling parties under field of data storage, in particular to a kind of multiple storage devices environment Method.
Background technology
Under the trend nowadays developed, the capacity of storage device is increasing, but also will appear because it is contemplated that it is inconsiderate or Person causes a storage device that cannot meet memory requirement because of demand shift problem.Although current electronic equipment is equipped with There are multiple storage devices, but for the user, user not only needs to pay close attention to the space service condition of each storage device, also It is required that user is fully aware of in the specific deposit position of multiple storage devices to file, therefore multiple storage devices use user Electronic equipment produces certain obstacle, and it is poor that pole is unfavorable for management, usage experience sense.
Invention content
Management is not easy under multiple storage device environment, the technology of usage experience sense difference is asked for existing electronic equipment Topic, the purpose of the present invention is to provide the automatic storage controlling methods under a kind of multiple storage devices environment, use following technology Scheme:
Multiple storage devices can be merged into one and always deposited by the automatic storage controlling method under a kind of multiple storage devices environment Reservoir, so as to be managed collectively to multiple storage devices, including:Storage device is scanned, dynamically manages each storage device Configuration information, the configuration information include the storage ID of each storage device and store the distribution time of ID;According to storage road Diameter, from storage device extraction document;The size of data of storage file is obtained, it will be in file storage to storage device:It is deposited when specified When storing up equipment, file is stored in the storage device specified;When not specified storage device, searching and being stored in file has In one storage device of enough remaining memory capacity.
More preferably, it when scanning storage device, is carried out also according to the storage ID of each storage device by sequence from small to large It searches and marks the storage device with remaining memory capacity, and with remaining memory capacity and storage ID minimums storage Equipment is set as currently stored storage device.
More preferably, when searching the storage device with enough memory capacity, in label depositing with remaining memory capacity It is searched in storage equipment according to the storage ID of each memory by sequence from small to large.
More preferably, when scanning storage device, if the storage ID of two or more storage devices is repeated, the retention time The storage ID of nearest storage device is constant, remaining storage device to repeat storage ID redistributes storage ID.
More preferably, when scanning storage device, when the storage device of scanning to no configuration file, for the storage device point With storage ID, and preserve in configuration file to the memory.
More preferably, it when file is stored in storage device, also generates and preserves storage road corresponding with the file Diameter.
More preferably, when specified storage device carrys out storage file, which does not have enough remaining memory capacity, with And when not specified storage device carrys out storage file, all storage devices are used to store this without enough remaining memory capacity File reports mistake:There is no enough remaining memory capacity.
More preferably, when specified storage device is with storage file, if there is no the memories, mistake is reported:It can not find The memory specified.
More preferably, when from storage device extraction document, if not having this document under store path, mistake is reported:It looks for not To this document.
Compared with prior art, beneficial effects of the present invention are:The environment of multiple storage devices is configured in electronic equipment Under, the present invention manages all storage devices automatically, not only can specify storage device for file manually, can also be according to be stored The size of data of file automatically selects the storage device of enough residual memory spaces to carry out storage file, and generates and deposit Path is stored up, therefore is not required to the multiple storage devices of user's labor management, has only there are one the usage experience sense of storage device, avoids The problem of user worries memory space inadequate and forgets storage positions of files improves the performance of storage system of electronic equipment.
Description of the drawings
Fig. 1 is the scanning process flow chart of the present invention;
Fig. 2 is the access procedure flow chart of the present invention.
Specific embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, with reference to the accompanying drawings and embodiments, it is right The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.
Manage in the environment of multiple storage devices that inconvenient, user experience sense is poor, stores based on existing electronic equipment The problem of system performance is low, the embodiment of the present invention provide the automatic storage controlling method under a kind of multiple storage devices environment, can incite somebody to action Multiple storage devices merge into a total memory, so as to being managed collectively to multiple storage devices, meanwhile, user can be with File is stored in the storage device specified.
The method of the present invention includes:Storage device is scanned, dynamically manages the configuration information of each storage device, it is described to match confidence Breath includes the storage ID of each storage device and stores the distribution time of ID;According to store path, text is extracted from storage device Part;The size of data of storage file is obtained, it will be in file storage to storage device:When specified storage device, file is stored In specified storage device;When not specified storage device, search and file is stored in enough remaining memory capacity A storage device in.When user has the electronic equipment of multiple storage devices using this method management, not only it can oneself Specific storage device is specified to be stored, while multiple storage devices can also be considered as to a total memory, so as to more A storage device is managed collectively, and automatically according to the size of data of file to be stored, selection has enough residual memory spaces Storage device to carry out storage file, therefore be not required to the multiple storage devices of user's labor management, have only there are one storages to set Standby usage experience sense avoids the problem that user worries memory space inadequate and forgets storage positions of files,
The above method scan storage device when, further, according to the storage ID of each storage device press from it is small to The storage device with remaining memory capacity is searched and marked to big sequence, and with remaining memory capacity and storage The storage device of ID minimums is set as currently stored storage device.So as to which during storage file, searching has enough During the storage device of memory capacity, i.e., according to the storage of each memory in the storage device with remaining memory capacity is marked ID is searched by sequence from small to large, can improve the speed searched and can use storage device, improves the performance of storage system.
When the above method scans storage device, further, if the storage ID of two or more storage devices It repeats, then the storage ID of retention time nearest storage device is constant, remaining storage device to repeat storage ID is redistributed Store ID.In addition, when the storage device of scanning to no configuration file, storage ID is distributed, and preserve and match for the storage device It puts in file to the memory.The process is effectively storage device distribution storage ID, preserves configuration file, is subsequent file Extraction and storing process provide orderly list of devices, improve the effect and performance of storage system of storage file.
After the storage device for having memory capacity remaining enough is found for file to be stored, file should be stored in It stores up in equipment, while generates and preserve and the store path corresponding to the storage file.Can be subsequent extracted this document in this way Facility is provided, the trouble for opening storage device locating file is saved, improves the effect of extraction document and the property of storage system Energy.
Under two kinds of storage modes of the present invention, i.e., specified storage device and system store automatically, it is possible that accordingly Storage device there is no enough memory capacity.I.e. when specified storage device carrys out storage file, the storage device is not enough Remaining memory capacity;Or when not specified storage device carrys out storage file, all storage devices are without enough residues Memory capacity is used to store this document.Storage system of the invention can further report mistake at this time:There is no enough residues to deposit Store up capacity.Other methods save file is found, therefore can improve making for the storage system according to error reporting convenient for user in this way Use experience sense.
When specified storage device is with storage file, in fact it could happen that there is no the situation of the memory, therefore meeting of the invention Further provide report mistake:It can not find the memory specified.Reduce what is searched problem according to error reporting in this way convenient for user Range further improves the usage experience sense of storage system.
When from storage device extraction document, in fact it could happen that there is no the corresponding file, therefore the present invention under store path Also report mistake is further provided:It can not find this document.The model to search problem is reduced according to error reporting convenient for user in this way It encloses, further improves the usage experience sense of storage system.
Specifically, the present invention includes two processes:Scanning process and access procedure.
Wherein, as shown in Figure 1, the flow of scanning process is:
S1:N=0 is set;
S2:If there is the storage device not scanned, N=N+1 is set, starts to scan the configuration text of n-th storage device Part performs step S5 if the storage device without not scanning;
S3:If finding the configuration file of storage device, identify and found configuration file, and parse and preserve configuration File;Otherwise it identifies and does not find configuration file;
S4:Return to step S2;
S5:If the storage ID with more than two storage devices is repeated, it is nearest to read distribution time in configuration file Storage device storage ID it is constant, for repeat storage ID remaining storage device redistribute storage ID;
S6:If scanning distributes storage ID, and preserve to the storage device of no configuration file for the storage device In configuration file to the storage device;
S7:The memory space of all storage devices is scanned, and ID is stored by sequence from small to large according to storage device The storage device with remaining memory capacity is searched, and the minimum storage in the storage device with remaining memory capacity ID is set as current storage ID;
S8:Terminate scanning.
In addition, as shown in Fig. 2, the flow of access procedure is:
S1:Judgement is storage or extraction document;If extraction acts, step S10 is performed;
S2:If user specifies storage device, step S5 is performed;
S3:Judge whether the storage device corresponding to current storage ID has enough memory capacity to store text to be deposited Part if there is enough memory spaces, then performs step S7;
S4:Obtain the remaining memory capacity of the storage device bigger than currently stored ID, and according to storage ID press from it is small to Big sequential search has the storage device of memory capacity remaining enough;Step S7 is performed if finding, and minimum tool The storage ID for having remaining memory capacity is set as current storage ID, and step S8 is performed if it can not find;
S5:It searches whether there are the memory, and if so, performing step S6, otherwise performs step S9;
S6:Judge whether the memory there are enough residual memory spaces to store this document, if there is then performing step Otherwise S7 performs step S8;
S7:This document is stored, and reports and stores successfully, preserves store path;
S8:Report mistake:Memory space inadequate, and perform step S12;
S9:Report mistake:The storage device is can not find, and performs step S12;
S10:Obtain the store path of file to be taken;
S11:Judge with the presence or absence of the file to be taken in the storage device specified, and if so, returning to file to be taken, such as There is no then report mistake to fruit:It can not find this document;
S12:Access terminates.
The foregoing is only a preferred embodiment of the present invention, but protection scope of the present invention be not limited thereto, Any one skilled in the art in the technical scope disclosed by the present invention, the change or replacement that can be readily occurred in, It should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with scope of the claims Subject to.

Claims (8)

1. a kind of automatic storage controlling method under multiple storage devices environment, which is characterized in that including:
Storage device is scanned, dynamically manages the configuration information of each storage device, the configuration information includes each storage device Storage ID and store ID distribution time;
According to store path, from storage device extraction document;
The size of data of storage file is obtained, it will be in file storage to storage device:When specified storage device, file is stored In specified storage device;When not specified storage device, search and file is stored in enough remaining memory capacity A storage device in;
When scanning storage device, tool is searched and marked by sequence from small to large also according to the storage ID of each storage device There is the storage device of remaining memory capacity, and with remaining memory capacity and storage ID minimums storage device is set as working as The storage device of preceding storage.
2. the automatic storage controlling method under a kind of multiple storage devices environment according to claim 1, it is characterised in that:It looks into When looking for the storage device with enough memory capacity, basis is each deposited in the storage device with remaining memory capacity is marked The storage ID of reservoir is searched by sequence from small to large.
3. the automatic storage controlling method under a kind of multiple storage devices environment according to claim 1, it is characterised in that:It sweeps When retouching storage device, if the storage ID of two or more storage devices is repeated, the storage for keeping distribution time nearest is set Standby storage ID is constant, remaining storage device to repeat storage ID redistributes storage ID.
4. the automatic storage controlling method under a kind of multiple storage devices environment according to claim 1, it is characterised in that:It sweeps When retouching storage device, when the storage device of scanning to no configuration file, storage ID is distributed, and preserve and match for the storage device It puts in file to the memory.
5. the automatic storage controlling method under a kind of multiple storage devices environment according to claim 1, it is characterised in that:When When file is stored in storage device, also generates and preserve store path corresponding with the file.
6. the automatic storage controlling method under a kind of multiple storage devices environment according to claim 1, it is characterised in that:When When specified storage device carrys out storage file, which does not have enough remaining memory capacity and when not specified storage is set During for carrying out storage file, all storage devices, for storing this document, report mistake without enough remaining memory capacity: There is no enough remaining memory capacity.
7. the automatic storage controlling method under a kind of multiple storage devices environment according to claim 1, it is characterised in that:When When specified storage device is with storage file, if there is no the memories, mistake is reported:It can not find the memory specified.
8. the automatic storage controlling method under a kind of multiple storage devices environment according to claim 1, it is characterised in that:When From storage device extraction document when, if there is no this document under store path, report mistake:It can not find this document.
CN201510195455.8A 2015-04-23 2015-04-23 A kind of automatic storage controlling method under multiple storage devices environment Expired - Fee Related CN104778016B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510195455.8A CN104778016B (en) 2015-04-23 2015-04-23 A kind of automatic storage controlling method under multiple storage devices environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510195455.8A CN104778016B (en) 2015-04-23 2015-04-23 A kind of automatic storage controlling method under multiple storage devices environment

Publications (2)

Publication Number Publication Date
CN104778016A CN104778016A (en) 2015-07-15
CN104778016B true CN104778016B (en) 2018-06-22

Family

ID=53619509

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510195455.8A Expired - Fee Related CN104778016B (en) 2015-04-23 2015-04-23 A kind of automatic storage controlling method under multiple storage devices environment

Country Status (1)

Country Link
CN (1) CN104778016B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107273147A (en) * 2016-04-08 2017-10-20 中国移动通信有限公司研究院 A kind of many SE management method and device
KR102535627B1 (en) * 2018-03-28 2023-05-24 에스케이하이닉스 주식회사 Memory controller and operating method thereof
CN108959463A (en) * 2018-06-19 2018-12-07 广东美的厨房电器制造有限公司 Information sharing method and household appliance and information sharing system and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103064639A (en) * 2012-12-28 2013-04-24 华为技术有限公司 Method and device for storing data
CN103678143A (en) * 2012-09-25 2014-03-26 联想(北京)有限公司 File storage method and device and electronic equipment
US8738621B2 (en) * 2009-01-27 2014-05-27 EchoStar Technologies, L.L.C. Systems and methods for managing files on a storage device
CN104202428A (en) * 2014-09-25 2014-12-10 北京网秦天下科技有限公司 Distributed file storage system and method
CN104537076A (en) * 2014-12-31 2015-04-22 北京奇艺世纪科技有限公司 File reading and writing method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8738621B2 (en) * 2009-01-27 2014-05-27 EchoStar Technologies, L.L.C. Systems and methods for managing files on a storage device
CN103678143A (en) * 2012-09-25 2014-03-26 联想(北京)有限公司 File storage method and device and electronic equipment
CN103064639A (en) * 2012-12-28 2013-04-24 华为技术有限公司 Method and device for storing data
CN104202428A (en) * 2014-09-25 2014-12-10 北京网秦天下科技有限公司 Distributed file storage system and method
CN104537076A (en) * 2014-12-31 2015-04-22 北京奇艺世纪科技有限公司 File reading and writing method and device

Also Published As

Publication number Publication date
CN104778016A (en) 2015-07-15

Similar Documents

Publication Publication Date Title
CN1975772B (en) Method and device for integrating information in multi-system
CN104778016B (en) A kind of automatic storage controlling method under multiple storage devices environment
CN104615691B (en) A kind of method of mobile terminal and data storage
CN104331428B (en) The storage of a kind of small documents and big file and access method
CN109408746A (en) Portrait information query method, device, computer equipment and storage medium
CN103428071A (en) Terminal and information processing method
CN102984357B (en) Contact person information managing method and managing device
CN103997540A (en) Method for achieving distributed storage of network, storage system and customer premise equipment
CN106488529A (en) A kind of method and device for accessing WIFI network
CN103634032B (en) Data transfering method, system and mobile terminal
CN107995098A (en) Information-pushing method and device
CN103019964A (en) Cache data access method and data cache system
CN102724301B (en) Cloud database system and method and equipment for reading and writing cloud data
CN204568583U (en) A kind of intelligent management system
CN105528443B (en) Application management method and device and electronic equipment
CN102272743A (en) Management method for information of universal integrated circuit card and device thereof
CN111078955A (en) Searching method and device based on one-way linked list, computer equipment and storage medium
CN103020107B (en) The method of multifunctional certificate intellectual access management
CN103020300B (en) Method and device for information retrieval
CN102915324B (en) Data storage and retrieval device and data storage and retrieval method
CN201859434U (en) Software upgrading system
CN108829709A (en) Distributed database management method, apparatus, storage medium and processor
CN112766741B (en) Query method, system, terminal and storage medium
CN104219564A (en) Set-top box and data management method thereof
CN111026706B (en) Warehouse entry method, device, equipment and medium for power system data

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180622

CF01 Termination of patent right due to non-payment of annual fee